public void ForceSetSoulLevel(int inNewLevel) { int maxSoulLvl = ValueProperty.GetMaxSoulLvl(); if (inNewLevel > maxSoulLvl) { inNewLevel = maxSoulLvl; } if (inNewLevel < 1) { inNewLevel = 1; } this.actorSoulLevel = inNewLevel; int num = inNewLevel - 1; if (num >= 1) { ResSoulLvlUpInfo resSoulLvlUpInfo = Singleton <BattleLogic> .get_instance().incomeCtrl.QuerySoulLvlUpInfo((uint)num); if (resSoulLvlUpInfo != null) { this.actorSoulExp = (int)(resSoulLvlUpInfo.dwExp + 1u); } } else { this.actorSoulExp = 1; } }
public void ForceSetSoulLevel(int inNewLevel) { int maxSoulLvl = GetMaxSoulLvl(); if (inNewLevel > maxSoulLvl) { inNewLevel = maxSoulLvl; } if (inNewLevel < 1) { inNewLevel = 1; } this.actorSoulLevel = inNewLevel; int num2 = inNewLevel - 1; if (num2 >= 1) { ResSoulLvlUpInfo info = Singleton <BattleLogic> .instance.incomeCtrl.QuerySoulLvlUpInfo((uint)num2); if (info != null) { this.actorSoulExp = ((int)info.dwExp) + 1; } } else { this.actorSoulExp = 1; } }
public void SetSoulMaxExp() { ResSoulLvlUpInfo info = Singleton <BattleLogic> .instance.incomeCtrl.QuerySoulLvlUpInfo((uint)this.actorSoulLevel); if (info != null) { this.actorSoulMaxExp = (int)info.dwExp; } }
public void SetSoulMaxExp() { ResSoulLvlUpInfo resSoulLvlUpInfo = Singleton <BattleLogic> .get_instance().incomeCtrl.QuerySoulLvlUpInfo((uint)this.actorSoulLevel); if (resSoulLvlUpInfo == null) { return; } this.actorSoulMaxExp = (int)resSoulLvlUpInfo.dwExp; }
public ResSoulLvlUpInfo QuerySoulLvlUpInfo(uint inLevel) { int count = this.m_allocSoulLvlList.Count; for (int i = 0; i < count; i++) { ResSoulLvlUpInfo resSoulLvlUpInfo = this.m_allocSoulLvlList[i]; if (resSoulLvlUpInfo != null && resSoulLvlUpInfo.dwLevel == inLevel) { return(resSoulLvlUpInfo); } } return(null); }
public uint GetHeroKilledIncome(ref PoolObjHandle <ActorRoot> target, enIncomeType incomeType) { if (!target) { return(0u); } int heroKillOrDeadState = this.GetHeroKillOrDeadState(ref target); ResSoulAddition resSoulAddition = this.QueryIncomeAdditonInfo(heroKillOrDeadState); int num = 10000; if (resSoulAddition != null) { if (incomeType == enIncomeType.Soul) { num = resSoulAddition.iExpAddRate; } else if (incomeType == enIncomeType.GoldCoinInBattle) { num = resSoulAddition.iGoldCoinInBattleAddRate; } } int actorSoulLevel = target.handle.ValueComponent.actorSoulLevel; ResSoulLvlUpInfo resSoulLvlUpInfo = this.QuerySoulLvlUpInfo((uint)actorSoulLevel); uint num2 = 0u; uint num3 = 0u; if (resSoulLvlUpInfo != null) { if (incomeType == enIncomeType.Soul) { num2 = resSoulLvlUpInfo.dwKilledExp; num3 = resSoulLvlUpInfo.dwExtraKillExp; } else if (incomeType == enIncomeType.GoldCoinInBattle) { num2 = (uint)resSoulLvlUpInfo.wKillGoldCoinInBattle; num3 = (uint)resSoulLvlUpInfo.wExtraKillGoldCoinInBattle; } } uint num4 = (uint)((ulong)num2 * (ulong)((long)num) / 10000uL); if (Singleton <BattleStatistic> .instance.GetCampScore(COM_PLAYERCAMP.COM_PLAYERCAMP_1) + Singleton <BattleStatistic> .instance.GetCampScore(COM_PLAYERCAMP.COM_PLAYERCAMP_2) == 1) { num4 += num3; } return(num4); }
public ResSoulLvlUpInfo QuerySoulLvlUpInfo(uint inLevel) { int count = this.m_allocSoulLvlList.get_Count(); for (int i = 0; i < count; i++) { ResSoulLvlUpInfo resSoulLvlUpInfo = this.m_allocSoulLvlList.get_Item(i); if (resSoulLvlUpInfo != null) { if (resSoulLvlUpInfo.dwLevel == inLevel) { return(resSoulLvlUpInfo); } } } return(null); }
public void ResetAllocSoulLvlMap() { this.ClearAllocSoulLvlList(); SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext(); DebugHelper.Assert(curLvelContext != null); if (curLvelContext == null) { return; } if (!Singleton <BattleLogic> .instance.m_LevelContext.IsSoulGrow()) { return; } uint soulAllocId = curLvelContext.m_soulAllocId; int mapID = curLvelContext.m_mapID; HashSet <object> hashSet; if (soulAllocId > 0u) { hashSet = GameDataMgr.soulLvlUpDatabin.GetDataByKey(soulAllocId); } else { hashSet = GameDataMgr.soulLvlUpDatabin.GetDataByIndex(0); } if (hashSet != null) { HashSet <object> .Enumerator enumerator = hashSet.GetEnumerator(); while (enumerator.MoveNext()) { ResSoulLvlUpInfo resSoulLvlUpInfo = enumerator.get_Current() as ResSoulLvlUpInfo; if (resSoulLvlUpInfo != null) { this.m_allocSoulLvlList.Add(resSoulLvlUpInfo); } } } }
public uint GetHeroKilledIncome(HeroWrapper heroWrapper, enIncomeType incomeType) { if (heroWrapper == null) { return(0); } int key = 0; ResSoulAddition dataByKey = null; if (heroWrapper.ContiKillNum > 0) { if (heroWrapper.ContiKillNum >= 7) { key = 7; } else { key = heroWrapper.ContiKillNum; } dataByKey = GameDataMgr.soulAdditionDatabin.GetDataByKey(key); } else { if (heroWrapper.ContiDeadNum >= 7) { key = -7; } else { key = -heroWrapper.ContiDeadNum; } dataByKey = GameDataMgr.soulAdditionDatabin.GetDataByKey(key); } int iExpAddRate = 0x2710; if (dataByKey != null) { if (incomeType == enIncomeType.Soul) { iExpAddRate = dataByKey.iExpAddRate; } else if (incomeType == enIncomeType.GoldCoinInBattle) { iExpAddRate = dataByKey.iGoldCoinInBattleAddRate; } } int actorSoulLevel = heroWrapper.actor.ValueComponent.actorSoulLevel; ResSoulLvlUpInfo info = this.QuerySoulLvlUpInfo((uint)actorSoulLevel); uint dwKilledExp = 0; uint dwExtraKillExp = 0; if (info != null) { if (incomeType == enIncomeType.Soul) { dwKilledExp = info.dwKilledExp; dwExtraKillExp = info.dwExtraKillExp; } else if (incomeType == enIncomeType.GoldCoinInBattle) { dwKilledExp = info.wKillGoldCoinInBattle; dwExtraKillExp = info.wExtraKillGoldCoinInBattle; } } uint num8 = (uint)((dwKilledExp * iExpAddRate) / ((ulong)0x2710L)); if ((Singleton <BattleStatistic> .instance.GetCampScore(COM_PLAYERCAMP.COM_PLAYERCAMP_1) + Singleton <BattleStatistic> .instance.GetCampScore(COM_PLAYERCAMP.COM_PLAYERCAMP_2)) == 1) { num8 += dwExtraKillExp; } return(num8); }