-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue with the bestiary not updating certain NPCs, officially fix #5
- Loading branch information
Showing
7 changed files
with
107 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...es/Terraclient/Terraria/GameContent/Bestiary/CommonEnemyUICollectionInfoProvider.cs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- src/Terraria/Terraria/GameContent/Bestiary/CommonEnemyUICollectionInfoProvider.cs | ||
+++ src/Terraclient/Terraria/GameContent/Bestiary/CommonEnemyUICollectionInfoProvider.cs | ||
@@ -1,3 +_,5 @@ | ||
+using Terraria.Terraclient; | ||
+using Terraria.Terraclient.Cheats.General; | ||
using Terraria.UI; | ||
|
||
namespace Terraria.GameContent.Bestiary | ||
@@ -20,6 +_,9 @@ | ||
} | ||
|
||
public static BestiaryEntryUnlockState GetUnlockStateByKillCount(int killCount, bool quickUnlock) { | ||
+ if (CheatHandler.GetCheat<BestiaryForceUnlockCheat>().isEnabled) | ||
+ return BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; | ||
+ | ||
BestiaryEntryUnlockState bestiaryEntryUnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0; | ||
if (quickUnlock && killCount > 0) | ||
return BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; |
17 changes: 17 additions & 0 deletions
17
patches/Terraclient/Terraria/GameContent/Bestiary/CritterUICollectionInfoProvider.cs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- src/Terraria/Terraria/GameContent/Bestiary/CritterUICollectionInfoProvider.cs | ||
+++ src/Terraclient/Terraria/GameContent/Bestiary/CritterUICollectionInfoProvider.cs | ||
@@ -1,3 +_,5 @@ | ||
+using Terraria.Terraclient; | ||
+using Terraria.Terraclient.Cheats.General; | ||
using Terraria.UI; | ||
|
||
namespace Terraria.GameContent.Bestiary | ||
@@ -13,6 +_,8 @@ | ||
public BestiaryUICollectionInfo GetEntryUICollectionInfo() { | ||
BestiaryUICollectionInfo result = default(BestiaryUICollectionInfo); | ||
result.UnlockState = (Main.BestiaryTracker.Sights.GetWasNearbyBefore(_persistentIdentifierToCheck) ? BestiaryEntryUnlockState.CanShowDropsWithDropRates_4 : BestiaryEntryUnlockState.NotKnownAtAll_0); | ||
+ if (CheatHandler.GetCheat<BestiaryForceUnlockCheat>().isEnabled) | ||
+ result.UnlockState = BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; | ||
return result; | ||
} | ||
|
18 changes: 18 additions & 0 deletions
18
...es/Terraclient/Terraria/GameContent/Bestiary/GoldCritterUICollectionInfoProvider.cs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- src/Terraria/Terraria/GameContent/Bestiary/GoldCritterUICollectionInfoProvider.cs | ||
+++ src/Terraclient/Terraria/GameContent/Bestiary/GoldCritterUICollectionInfoProvider.cs | ||
@@ -1,4 +_,6 @@ | ||
using Terraria.ID; | ||
+using Terraria.Terraclient; | ||
+using Terraria.Terraclient.Cheats.General; | ||
|
||
namespace Terraria.GameContent.Bestiary | ||
{ | ||
@@ -56,7 +_,7 @@ | ||
} | ||
|
||
private BestiaryEntryUnlockState GetUnlockStateForCritter(string persistentId) { | ||
- if (!Main.BestiaryTracker.Sights.GetWasNearbyBefore(persistentId)) | ||
+ if (!Main.BestiaryTracker.Sights.GetWasNearbyBefore(persistentId) && !CheatHandler.GetCheat<BestiaryForceUnlockCheat>().isEnabled) | ||
return BestiaryEntryUnlockState.NotKnownAtAll_0; | ||
|
||
return BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; |
17 changes: 17 additions & 0 deletions
17
...raclient/Terraria/GameContent/Bestiary/HighestOfMultipleUICollectionInfoProvider.cs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- src/Terraria/Terraria/GameContent/Bestiary/HighestOfMultipleUICollectionInfoProvider.cs | ||
+++ src/Terraclient/Terraria/GameContent/Bestiary/HighestOfMultipleUICollectionInfoProvider.cs | ||
@@ -1,3 +_,5 @@ | ||
+using Terraria.Terraclient; | ||
+using Terraria.Terraclient.Cheats.General; | ||
using Terraria.UI; | ||
|
||
namespace Terraria.GameContent.Bestiary | ||
@@ -21,7 +_,7 @@ | ||
unlockState = entryUICollectionInfo2.UnlockState; | ||
} | ||
|
||
- entryUICollectionInfo.UnlockState = unlockState; | ||
+ entryUICollectionInfo.UnlockState = CheatHandler.GetCheat<BestiaryForceUnlockCheat>().isEnabled ? BestiaryEntryUnlockState.CanShowDropsWithDropRates_4 : unlockState; | ||
return entryUICollectionInfo; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
patches/Terraclient/Terraria/GameContent/Bestiary/TownNPCUICollectionInfoProvider.cs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- src/Terraria/Terraria/GameContent/Bestiary/TownNPCUICollectionInfoProvider.cs | ||
+++ src/Terraclient/Terraria/GameContent/Bestiary/TownNPCUICollectionInfoProvider.cs | ||
@@ -1,3 +_,5 @@ | ||
+using Terraria.Terraclient; | ||
+using Terraria.Terraclient.Cheats.General; | ||
using Terraria.UI; | ||
|
||
namespace Terraria.GameContent.Bestiary | ||
@@ -13,6 +_,8 @@ | ||
public BestiaryUICollectionInfo GetEntryUICollectionInfo() { | ||
BestiaryUICollectionInfo result = default(BestiaryUICollectionInfo); | ||
result.UnlockState = (Main.BestiaryTracker.Chats.GetWasChatWith(_persistentIdentifierToCheck) ? BestiaryEntryUnlockState.CanShowDropsWithDropRates_4 : BestiaryEntryUnlockState.NotKnownAtAll_0); | ||
+ if (CheatHandler.GetCheat<BestiaryForceUnlockCheat>().isEnabled) | ||
+ result.UnlockState = BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; | ||
return result; | ||
} | ||
|