Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetEntryUICollectionInfo()

BestiaryUICollectionInfo Terraria.GameContent.Bestiary.GoldCritterUICollectionInfoProvider.GetEntryUICollectionInfo ( )
inline

Implements Terraria.GameContent.Bestiary.IBestiaryUICollectionInfoProvider.

Definition at line 21 of file GoldCritterUICollectionInfoProvider.cs.

22 {
23 BestiaryEntryUnlockState unlockStateForCritter = GetUnlockStateForCritter(_goldCritterPersistentId);
24 BestiaryEntryUnlockState bestiaryEntryUnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0;
25 if (unlockStateForCritter > bestiaryEntryUnlockState)
26 {
27 bestiaryEntryUnlockState = unlockStateForCritter;
28 }
29 string[] normalCritterPersistentId = _normalCritterPersistentId;
30 foreach (string persistentId in normalCritterPersistentId)
31 {
32 BestiaryEntryUnlockState unlockStateForCritter2 = GetUnlockStateForCritter(persistentId);
33 if (unlockStateForCritter2 > bestiaryEntryUnlockState)
34 {
35 bestiaryEntryUnlockState = unlockStateForCritter2;
36 }
37 }
38 BestiaryUICollectionInfo bestiaryUICollectionInfo = default(BestiaryUICollectionInfo);
39 bestiaryUICollectionInfo.UnlockState = bestiaryEntryUnlockState;
40 BestiaryUICollectionInfo result = bestiaryUICollectionInfo;
41 if (bestiaryEntryUnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0)
42 {
43 return result;
44 }
46 {
47 bestiaryUICollectionInfo = default(BestiaryUICollectionInfo);
48 bestiaryUICollectionInfo.UnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0;
49 return bestiaryUICollectionInfo;
50 }
51 return result;
52 }

References Terraria.GameContent.Bestiary.GoldCritterUICollectionInfoProvider._goldCritterPersistentId, Terraria.GameContent.Bestiary.GoldCritterUICollectionInfoProvider._normalCritterPersistentId, Terraria.GameContent.Bestiary.GoldCritterUICollectionInfoProvider.GetUnlockStateForCritter(), and Terraria.GameContent.Bestiary.GoldCritterUICollectionInfoProvider.TryFindingOneGoldCritterThatIsAlreadyUnlocked().