public BestiaryUICollectionInfo GetEntryUICollectionInfo() { BestiaryEntryUnlockState unlockStateForCritter1 = this.GetUnlockStateForCritter(this._goldCritterPersistentId); BestiaryEntryUnlockState entryUnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0; if (unlockStateForCritter1 > entryUnlockState) { entryUnlockState = unlockStateForCritter1; } foreach (string persistentId in this._normalCritterPersistentId) { BestiaryEntryUnlockState unlockStateForCritter2 = this.GetUnlockStateForCritter(persistentId); if (unlockStateForCritter2 > entryUnlockState) { entryUnlockState = unlockStateForCritter2; } } BestiaryUICollectionInfo uiCollectionInfo = new BestiaryUICollectionInfo() { UnlockState = entryUnlockState }; if (entryUnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0 || this.TryFindingOneGoldCritterThatIsAlreadyUnlocked()) { return(uiCollectionInfo); } return(new BestiaryUICollectionInfo() { UnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0 }); }
public static BestiaryEntryUnlockState GetUnlockStateByKillCount(int killCount, bool quickUnlock) { BestiaryEntryUnlockState bestiaryEntryUnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0; if (quickUnlock && killCount > 0) { return(BestiaryEntryUnlockState.CanShowDropsWithDropRates_4); } if (killCount >= 50) { return(BestiaryEntryUnlockState.CanShowDropsWithDropRates_4); } if (killCount >= 25) { return(BestiaryEntryUnlockState.CanShowDropsWithoutDropRates_3); } if (killCount >= 10) { return(BestiaryEntryUnlockState.CanShowStats_2); } if (killCount >= 1) { return(BestiaryEntryUnlockState.CanShowPortraitOnly_1); } return(BestiaryEntryUnlockState.NotKnownAtAll_0); }
public BestiaryUICollectionInfo GetEntryUICollectionInfo() { BestiaryEntryUnlockState unlockStateForCritter = GetUnlockStateForCritter(_goldCritterPersistentId); BestiaryEntryUnlockState bestiaryEntryUnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0; if (unlockStateForCritter > bestiaryEntryUnlockState) { bestiaryEntryUnlockState = unlockStateForCritter; } string[] normalCritterPersistentId = _normalCritterPersistentId; foreach (string persistentId in normalCritterPersistentId) { BestiaryEntryUnlockState unlockStateForCritter2 = GetUnlockStateForCritter(persistentId); if (unlockStateForCritter2 > bestiaryEntryUnlockState) { bestiaryEntryUnlockState = unlockStateForCritter2; } } BestiaryUICollectionInfo bestiaryUICollectionInfo = default(BestiaryUICollectionInfo); bestiaryUICollectionInfo.UnlockState = bestiaryEntryUnlockState; BestiaryUICollectionInfo result = bestiaryUICollectionInfo; if (bestiaryEntryUnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0) { return(result); } if (!TryFindingOneGoldCritterThatIsAlreadyUnlocked()) { bestiaryUICollectionInfo = default(BestiaryUICollectionInfo); bestiaryUICollectionInfo.UnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0; return(bestiaryUICollectionInfo); } return(result); }
public BestiaryUICollectionInfo GetEntryUICollectionInfo() { BestiaryEntryUnlockState unlockStateByKillCount = GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(_persistentIdentifierToCheck), _quickUnlock); BestiaryUICollectionInfo result = default(BestiaryUICollectionInfo); result.UnlockState = unlockStateByKillCount; return(result); }
public BestiaryUICollectionInfo GetEntryUICollectionInfo() { BestiaryEntryUnlockState stateByKillCount = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(this._persistentIdentifierToCheck), this._quickUnlock); return(new BestiaryUICollectionInfo() { UnlockState = stateByKillCount }); }
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 }); }
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); }
public BestiaryUICollectionInfo GetEntryUICollectionInfo() { BestiaryUICollectionInfo entryUICollectionInfo = _providers[_mainProviderIndex].GetEntryUICollectionInfo(); BestiaryEntryUnlockState unlockState = entryUICollectionInfo.UnlockState; for (int i = 0; i < _providers.Length; i++) { BestiaryUICollectionInfo entryUICollectionInfo2 = _providers[i].GetEntryUICollectionInfo(); if (unlockState < entryUICollectionInfo2.UnlockState) { unlockState = entryUICollectionInfo2.UnlockState; } } entryUICollectionInfo.UnlockState = unlockState; return(entryUICollectionInfo); }
public BestiaryUICollectionInfo GetEntryUICollectionInfo() { BestiaryUICollectionInfo uiCollectionInfo1 = this._providers[this._mainProviderIndex].GetEntryUICollectionInfo(); BestiaryEntryUnlockState unlockState = uiCollectionInfo1.UnlockState; for (int index = 0; index < this._providers.Length; ++index) { BestiaryUICollectionInfo uiCollectionInfo2 = this._providers[index].GetEntryUICollectionInfo(); if (unlockState < uiCollectionInfo2.UnlockState) { unlockState = uiCollectionInfo2.UnlockState; } } uiCollectionInfo1.UnlockState = unlockState; return(uiCollectionInfo1); }
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); }
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); }