Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
Removes perk check for item comparison coloring. Now no perk is requi…
Browse files Browse the repository at this point in the history
…red.
  • Loading branch information
Tyler-IN committed Apr 6, 2020
1 parent 2944916 commit ddeeabd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CommunityPatch/Patches/ItemComparisonColorPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public class ItemComparisonColorPatch : IPatch {

public bool Applied { get; private set; }

private static readonly MethodInfo TargetMethodInfo = typeof(ItemMenuVM).GetMethod("GetColorFromComparison", BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.DeclaredOnly);
private static readonly MethodInfo TargetMethodInfo = typeof(ItemMenuVM).GetMethod("GetColorFromComparison", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);

private static readonly MethodInfo PatchMethodInfo = typeof(ItemComparisonColorPatch).GetMethod(nameof(GetColorFromComparisonPatched), BindingFlags.NonPublic|BindingFlags.Static|BindingFlags.DeclaredOnly);
private static readonly MethodInfo PatchMethodInfo = typeof(ItemComparisonColorPatch).GetMethod(nameof(GetColorFromComparisonPatched), BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.DeclaredOnly);

public bool IsApplicable(Game game) {
var patchInfo = Harmony.GetPatchInfo(TargetMethodInfo);
Expand All @@ -44,7 +44,7 @@ public void Apply(Game game) {
}

private static bool GetColorFromComparisonPatched(int result, bool isCompared, ref Color __result) {
if (MobileParty.MainParty != null && !(MobileParty.MainParty.HasPerk(DefaultPerks.Trade.WholeSeller) || MobileParty.MainParty.HasPerk(DefaultPerks.Trade.Appraiser))) {
if (MobileParty.MainParty != null) {
__result = Colors.Black;
return false;
}
Expand Down

0 comments on commit ddeeabd

Please sign in to comment.