public BestiaryUICollectionInfo GetEntryUICollectionInfo()
        {
            BestiaryEntryUnlockState stateByKillCount = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(this._persistentIdentifierToCheck), this._quickUnlock);

            return(new BestiaryUICollectionInfo()
            {
                UnlockState = stateByKillCount
            });
        }
Esempio n. 2
0
        public BestiaryUICollectionInfo GetEntryUICollectionInfo()
        {
            BestiaryEntryUnlockState unlockstatus = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(this._persistentIdentifierToCheck), false);

            if (!this.IsIncludedInCurrentWorld())
            {
                unlockstatus = this.GetLowestAvailableUnlockStateFromEntriesThatAreInWorld(unlockstatus);
            }
            return(new BestiaryUICollectionInfo()
            {
                UnlockState = unlockstatus
            });
        }
Esempio n. 3
0
        public BestiaryUICollectionInfo GetEntryUICollectionInfo()
        {
            BestiaryEntryUnlockState bestiaryEntryUnlockState = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(_persistentIdentifierToCheck), quickUnlock: false);

            if (!IsIncludedInCurrentWorld())
            {
                bestiaryEntryUnlockState = GetLowestAvailableUnlockStateFromEntriesThatAreInWorld(bestiaryEntryUnlockState);
            }
            BestiaryUICollectionInfo result = default(BestiaryUICollectionInfo);

            result.UnlockState = bestiaryEntryUnlockState;
            return(result);
        }
Esempio n. 4
0
        private BestiaryEntryUnlockState GetLowestAvailableUnlockStateFromEntriesThatAreInWorld(BestiaryEntryUnlockState unlockstatus)
        {
            BestiaryEntryUnlockState bestiaryEntryUnlockState = BestiaryEntryUnlockState.CanShowDropsWithDropRates_4;

            int[,] cavernMonsterType = NPC.cavernMonsterType;
            for (int i = 0; i < cavernMonsterType.GetLength(0); i++)
            {
                for (int j = 0; j < cavernMonsterType.GetLength(1); j++)
                {
                    string persistentId = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[cavernMonsterType[i, j]];
                    BestiaryEntryUnlockState unlockStateByKillCount = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(persistentId), quickUnlock: false);
                    if (bestiaryEntryUnlockState > unlockStateByKillCount)
                    {
                        bestiaryEntryUnlockState = unlockStateByKillCount;
                    }
                }
            }
            unlockstatus = bestiaryEntryUnlockState;
            return(unlockstatus);
        }
Esempio n. 5
0
        private BestiaryEntryUnlockState GetLowestAvailableUnlockStateFromEntriesThatAreInWorld(
            BestiaryEntryUnlockState unlockstatus)
        {
            BestiaryEntryUnlockState entryUnlockState = BestiaryEntryUnlockState.CanShowDropsWithDropRates_4;

            int[,] cavernMonsterType = NPC.cavernMonsterType;
            for (int index1 = 0; index1 < cavernMonsterType.GetLength(0); ++index1)
            {
                for (int index2 = 0; index2 < cavernMonsterType.GetLength(1); ++index2)
                {
                    string creditIdsByNpcNetId = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[cavernMonsterType[index1, index2]];
                    BestiaryEntryUnlockState stateByKillCount = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(creditIdsByNpcNetId), false);
                    if (entryUnlockState > stateByKillCount)
                    {
                        entryUnlockState = stateByKillCount;
                    }
                }
            }
            unlockstatus = entryUnlockState;
            return(unlockstatus);
        }