private void AllocIncome(PoolObjHandle <ActorRoot> target, PoolObjHandle <ActorRoot> attacker, ResDT_IncomeAttackRule allocIncomeRule, enIncomeType incomeType, int[] soulExpIncomeChangeRate, int computerChangeRate) { uint actorKilledIncome = this.GetActorKilledIncome(target, incomeType); this.m_actorIncomes.Clear(); for (int i = 0; i < allocIncomeRule.astIncomeMemberArr.Length; i++) { this.m_allocIncomeRelatedHeros.Clear(); RES_INCOME_MEMBER_CHOOSE_TYPE wMemberChooseType = (RES_INCOME_MEMBER_CHOOSE_TYPE)allocIncomeRule.astIncomeMemberArr[i].wMemberChooseType; this.GetAllocIncomeRelatedHeros(ref this.m_allocIncomeRelatedHeros, target, attacker, wMemberChooseType, allocIncomeRule, i); this.AllocIncomeToHeros(ref this.m_actorIncomes, this.m_allocIncomeRelatedHeros, target, attacker, incomeType, actorKilledIncome, allocIncomeRule, i, soulExpIncomeChangeRate, computerChangeRate); this.m_allocIncomeRelatedHeros.Clear(); } for (int j = 0; j < this.m_actorIncomes.Count; j++) { stActorIncome income = this.m_actorIncomes[j]; if (income.m_actorRoot != null) { stActorIncome income2 = this.m_actorIncomes[j]; if (income2.m_actorRoot.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { stActorIncome income3 = this.m_actorIncomes[j]; uint incomeValue = income3.m_incomeValue; if ((incomeType == enIncomeType.Soul) && this.m_isExpCompensate) { stActorIncome income4 = this.m_actorIncomes[j]; stActorIncome income5 = this.m_actorIncomes[j]; incomeValue = this.GetCompensateExp(income4.m_actorRoot, income5.m_incomeValue); } if (incomeType == enIncomeType.Soul) { stActorIncome income6 = this.m_actorIncomes[j]; income6.m_actorRoot.ValueComponent.AddSoulExp((int)incomeValue, false, AddSoulType.Income); } else if (incomeType == enIncomeType.GoldCoinInBattle) { stActorIncome income7 = this.m_actorIncomes[j]; bool isLastHit = object.ReferenceEquals(attacker.handle, income7.m_actorRoot); stActorIncome income8 = this.m_actorIncomes[j]; income8.m_actorRoot.ValueComponent.ChangeGoldCoinInBattle((int)incomeValue, true, true, target.handle.gameObject.transform.position, isLastHit); } if (incomeType == enIncomeType.Soul) { stActorIncome income9 = this.m_actorIncomes[j]; if (income9.m_actorRoot.IsHostCamp() && (incomeValue > 0)) { stActorIncome income10 = this.m_actorIncomes[j]; Singleton <CBattleSystem> .GetInstance().CreateBattleFloatDigit((int)incomeValue, DIGIT_TYPE.ReceiveSpirit, income10.m_actorRoot.gameObject.transform.position); } } } } } this.m_actorIncomes.Clear(); }
private void AllocIncome(ref PoolObjHandle <ActorRoot> target, ref PoolObjHandle <ActorRoot> attacker, ResDT_IncomeAttackRule allocIncomeRule, enIncomeType incomeType, int[] soulExpIncomeChangeRate, int computerChangeRate) { uint actorKilledIncome = this.GetActorKilledIncome(ref target, incomeType); this.m_actorIncomes.Clear(); for (int i = 0; i < allocIncomeRule.astIncomeMemberArr.Length; i++) { this.m_allocIncomeRelatedHeros.Clear(); RES_INCOME_MEMBER_CHOOSE_TYPE wMemberChooseType = (RES_INCOME_MEMBER_CHOOSE_TYPE)allocIncomeRule.astIncomeMemberArr[i].wMemberChooseType; this.GetAllocIncomeRelatedHeros(ref this.m_allocIncomeRelatedHeros, ref target, ref attacker, wMemberChooseType, allocIncomeRule, i); this.AllocIncomeToHeros(ref this.m_actorIncomes, this.m_allocIncomeRelatedHeros, ref target, ref attacker, incomeType, actorKilledIncome, allocIncomeRule, i, soulExpIncomeChangeRate, computerChangeRate); this.m_allocIncomeRelatedHeros.Clear(); } if (incomeType == enIncomeType.GoldCoinInBattle && target && target.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { this.AllocGoldRewardToCamp(ref this.m_actorIncomes, ref attacker, ref target); } for (int j = 0; j < this.m_actorIncomes.get_Count(); j++) { if (this.m_actorIncomes.get_Item(j).m_actorRoot != null && this.m_actorIncomes.get_Item(j).m_actorRoot.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { uint num = this.m_actorIncomes.get_Item(j).m_incomeValue; if (incomeType == enIncomeType.Soul && IncomeControl.m_isExpCompensate) { num = IncomeControl.GetCompensateExp(this.m_actorIncomes.get_Item(j).m_actorRoot, this.m_actorIncomes.get_Item(j).m_incomeValue); } if (incomeType == enIncomeType.Soul) { if (target && target.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) { num = num * (uint)(10000 + Singleton <BattleLogic> .GetInstance().organControl.GetSoldierDropExpAddByOrgan(target.handle.TheActorMeta.ActorCamp)) / 10000u; } this.m_actorIncomes.get_Item(j).m_actorRoot.ValueComponent.AddSoulExp((int)num, false, AddSoulType.Income); } else if (incomeType == enIncomeType.GoldCoinInBattle) { if (target && target.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) { num = num * (uint)(10000 + Singleton <BattleLogic> .GetInstance().organControl.GetSoldierDropCoinAddByOrgan(target.handle.TheActorMeta.ActorCamp)) / 10000u; } bool isLastHit = object.ReferenceEquals(attacker.handle, this.m_actorIncomes.get_Item(j).m_actorRoot); this.m_actorIncomes.get_Item(j).m_actorRoot.ValueComponent.ChangeGoldCoinInBattle((int)num, true, true, target.handle.myTransform.position, isLastHit, target); } if (incomeType == enIncomeType.Soul && this.m_actorIncomes.get_Item(j).m_actorRoot.IsHostCamp() && num > 0u) { Singleton <CBattleSystem> .GetInstance().CreateBattleFloatDigit((int)num, DIGIT_TYPE.ReceiveSpirit, this.m_actorIncomes.get_Item(j).m_actorRoot.gameObject.transform.position); } } } this.m_actorIncomes.Clear(); }
private void GetAllocIncomeRelatedHeros(ref ListView <ActorRoot> relatedHeros, ref PoolObjHandle <ActorRoot> target, ref PoolObjHandle <ActorRoot> attacker, RES_INCOME_MEMBER_CHOOSE_TYPE chooseType, ResDT_IncomeAttackRule allocIncomeRule, int paramIndex) { switch (chooseType) { case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_CAMP: { List <PoolObjHandle <ActorRoot> > heroActors = Singleton <GameObjMgr> .instance.HeroActors; int count = heroActors.get_Count(); for (int i = 0; i < count; i++) { if (heroActors.get_Item(i).handle.TheActorMeta.ActorCamp == attacker.handle.TheActorMeta.ActorCamp && heroActors.get_Item(i).handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!heroActors.get_Item(i).handle.ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(heroActors.get_Item(i).handle); } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_RANGE: { if (attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!attacker.handle.ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(attacker.handle); } List <Player> allPlayers = Singleton <GamePlayerCenter> .instance.GetAllPlayers(); if (allPlayers != null) { int count2 = allPlayers.get_Count(); for (int j = 0; j < count2; j++) { if (!(allPlayers.get_Item(j).Captain == attacker) && allPlayers.get_Item(j).Captain.handle.TheActorMeta.ActorCamp == attacker.handle.TheActorMeta.ActorCamp && this.IsActorInRange(allPlayers.get_Item(j).Captain, target, allocIncomeRule.astIncomeMemberArr[paramIndex].iRangeRadius) && (!allPlayers.get_Item(j).Captain.handle.ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { if (allPlayers.get_Item(j).Captain.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Call) { CallActorWrapper callActorWrapper = allPlayers.get_Item(j).Captain.handle.ActorControl as CallActorWrapper; if (callActorWrapper != null) { relatedHeros.Add(callActorWrapper.GetHostActor()); } } else { relatedHeros.Add(allPlayers.get_Item(j).Captain.handle); } } } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_LAST_KILL: if (attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!attacker.handle.ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(attacker.handle); } break; case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_ASSIST: { HashSet <uint> assistSet = BattleLogic.GetAssistSet(target, attacker, true); HashSet <uint> .Enumerator enumerator = assistSet.GetEnumerator(); while (enumerator.MoveNext()) { PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(enumerator.get_Current()); if (actor.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!actor.handle.ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(actor.handle); } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_ALL_KILL: { if (attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!attacker.handle.ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(attacker.handle); } HashSet <uint> assistSet2 = BattleLogic.GetAssistSet(target, attacker, true); HashSet <uint> .Enumerator enumerator2 = assistSet2.GetEnumerator(); while (enumerator2.MoveNext()) { PoolObjHandle <ActorRoot> actor2 = Singleton <GameObjMgr> .GetInstance().GetActor(enumerator2.get_Current()); if (actor2.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && !relatedHeros.Contains(actor2.handle) && (!actor2.handle.ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(actor2.handle); } } break; } } }
private void GetAllocIncomeRelatedHeros(ref ListView <ActorRoot> relatedHeros, ref PoolObjHandle <ActorRoot> target, ref PoolObjHandle <ActorRoot> attacker, RES_INCOME_MEMBER_CHOOSE_TYPE chooseType, ResDT_IncomeAttackRule allocIncomeRule, int paramIndex) { switch (chooseType) { case 1: { List <PoolObjHandle <ActorRoot> > heroActors = Singleton <GameObjMgr> .get_instance().HeroActors; int count = heroActors.get_Count(); for (int i = 0; i < count; i++) { if (heroActors.get_Item(i).get_handle().TheActorMeta.ActorCamp == attacker.get_handle().TheActorMeta.ActorCamp&& heroActors.get_Item(i).get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!heroActors.get_Item(i).get_handle().ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(heroActors.get_Item(i).get_handle()); } } break; } case 2: { if (attacker.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!attacker.get_handle().ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(attacker.get_handle()); } List <PoolObjHandle <ActorRoot> > heroActors2 = Singleton <GameObjMgr> .get_instance().HeroActors; int count2 = heroActors2.get_Count(); for (int j = 0; j < count2; j++) { if (!(heroActors2.get_Item(j) == attacker)) { if (heroActors2.get_Item(j).get_handle().TheActorMeta.ActorCamp == attacker.get_handle().TheActorMeta.ActorCamp&& heroActors2.get_Item(j).get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && this.IsActorInRange(heroActors2.get_Item(j), target, allocIncomeRule.astIncomeMemberArr[paramIndex].iRangeRadius) && (!heroActors2.get_Item(j).get_handle().ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(heroActors2.get_Item(j).get_handle()); } } } break; } case 3: if (attacker.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!attacker.get_handle().ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(attacker.get_handle()); } break; case 4: { HashSet <uint> assistSet = BattleLogic.GetAssistSet(target, attacker, true); HashSet <uint> .Enumerator enumerator = assistSet.GetEnumerator(); while (enumerator.MoveNext()) { PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(enumerator.get_Current()); if (actor.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!actor.get_handle().ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(actor.get_handle()); } } break; } case 5: { if (attacker.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (!attacker.get_handle().ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(attacker.get_handle()); } HashSet <uint> assistSet2 = BattleLogic.GetAssistSet(target, attacker, true); HashSet <uint> .Enumerator enumerator2 = assistSet2.GetEnumerator(); while (enumerator2.MoveNext()) { PoolObjHandle <ActorRoot> actor2 = Singleton <GameObjMgr> .GetInstance().GetActor(enumerator2.get_Current()); if (actor2.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && !relatedHeros.Contains(actor2.get_handle()) && (!actor2.get_handle().ActorControl.IsDeadState || allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { relatedHeros.Add(actor2.get_handle()); } } break; } } }
private void GetAllocIncomeRelatedHeros(ref ListView <ActorRoot> relatedHeros, PoolObjHandle <ActorRoot> target, PoolObjHandle <ActorRoot> attacker, RES_INCOME_MEMBER_CHOOSE_TYPE chooseType, ResSoulExpAllocRule allocIncomeRule, int paramIndex) { switch (chooseType) { case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_CAMP: { List <PoolObjHandle <ActorRoot> > heroActors = Singleton <GameObjMgr> .instance.HeroActors; int count = heroActors.Count; for (int i = 0; i < count; i++) { PoolObjHandle <ActorRoot> handle3 = heroActors[i]; if (handle3.handle.TheActorMeta.ActorCamp == attacker.handle.TheActorMeta.ActorCamp) { PoolObjHandle <ActorRoot> handle4 = heroActors[i]; if (handle4.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { PoolObjHandle <ActorRoot> handle5 = heroActors[i]; if (!handle5.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { PoolObjHandle <ActorRoot> handle6 = heroActors[i]; relatedHeros.Add(handle6.handle); } } } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_RANGE: { List <PoolObjHandle <ActorRoot> > list2 = Singleton <GameObjMgr> .instance.HeroActors; int num3 = list2.Count; for (int j = 0; j < num3; j++) { PoolObjHandle <ActorRoot> handle7 = list2[j]; if (handle7.handle.TheActorMeta.ActorCamp == attacker.handle.TheActorMeta.ActorCamp) { PoolObjHandle <ActorRoot> handle8 = list2[j]; if ((handle8.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && this.IsActorInRange(list2[j], target, allocIncomeRule.astIncomeMemberArr[paramIndex].iRangeRadius)) { PoolObjHandle <ActorRoot> handle9 = list2[j]; if (!handle9.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { PoolObjHandle <ActorRoot> handle10 = list2[j]; relatedHeros.Add(handle10.handle); } } } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_LAST_KILL: if ((attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (!attacker.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(attacker.handle); } break; case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_ASSIST: { int num5 = target.handle.ActorControl.hurtSelfActorList.Count; for (int k = 0; k < num5; k++) { KeyValuePair <uint, ulong> pair = target.handle.ActorControl.hurtSelfActorList[k]; PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(pair.Key); if ((actor != attacker) && ((actor.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (!actor.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)))) { relatedHeros.Add(actor.handle); } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_ALL_KILL: { if ((attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (!attacker.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(attacker.handle); } int num7 = target.handle.ActorControl.hurtSelfActorList.Count; for (int m = 0; m < num7; m++) { KeyValuePair <uint, ulong> pair2 = target.handle.ActorControl.hurtSelfActorList[m]; PoolObjHandle <ActorRoot> handle2 = Singleton <GameObjMgr> .GetInstance().GetActor(pair2.Key); if (((handle2.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && !relatedHeros.Contains(handle2.handle)) && (!handle2.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(handle2.handle); } } break; } } }
private void GetAllocIncomeRelatedHeros(ref ListView <ActorRoot> relatedHeros, PoolObjHandle <ActorRoot> target, PoolObjHandle <ActorRoot> attacker, RES_INCOME_MEMBER_CHOOSE_TYPE chooseType, ResDT_IncomeAttackRule allocIncomeRule, int paramIndex) { switch (chooseType) { case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_CAMP: { List <PoolObjHandle <ActorRoot> > heroActors = Singleton <GameObjMgr> .instance.HeroActors; int count = heroActors.Count; for (int i = 0; i < count; i++) { PoolObjHandle <ActorRoot> handle3 = heroActors[i]; if (handle3.handle.TheActorMeta.ActorCamp == attacker.handle.TheActorMeta.ActorCamp) { PoolObjHandle <ActorRoot> handle4 = heroActors[i]; if (handle4.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { PoolObjHandle <ActorRoot> handle5 = heroActors[i]; if (!handle5.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { PoolObjHandle <ActorRoot> handle6 = heroActors[i]; relatedHeros.Add(handle6.handle); } } } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_RANGE: { if ((attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (!attacker.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(attacker.handle); } List <PoolObjHandle <ActorRoot> > list2 = Singleton <GameObjMgr> .instance.HeroActors; int num3 = list2.Count; for (int j = 0; j < num3; j++) { if (list2[j] != attacker) { PoolObjHandle <ActorRoot> handle7 = list2[j]; if (handle7.handle.TheActorMeta.ActorCamp == attacker.handle.TheActorMeta.ActorCamp) { PoolObjHandle <ActorRoot> handle8 = list2[j]; if ((handle8.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && this.IsActorInRange(list2[j], target, allocIncomeRule.astIncomeMemberArr[paramIndex].iRangeRadius)) { PoolObjHandle <ActorRoot> handle9 = list2[j]; if (!handle9.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0)) { PoolObjHandle <ActorRoot> handle10 = list2[j]; relatedHeros.Add(handle10.handle); } } } } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_LAST_KILL: if ((attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (!attacker.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(attacker.handle); } break; case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_ASSIST: { HashSet <uint> .Enumerator enumerator = BattleLogic.GetAssistSet(target, attacker, true).GetEnumerator(); while (enumerator.MoveNext()) { PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(enumerator.Current); if ((actor.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (!actor.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(actor.handle); } } break; } case RES_INCOME_MEMBER_CHOOSE_TYPE.RES_INCOME_MEMBER_ALL_KILL: { if ((attacker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (!attacker.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(attacker.handle); } HashSet <uint> .Enumerator enumerator2 = BattleLogic.GetAssistSet(target, attacker, true).GetEnumerator(); while (enumerator2.MoveNext()) { PoolObjHandle <ActorRoot> handle2 = Singleton <GameObjMgr> .GetInstance().GetActor(enumerator2.Current); if (((handle2.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && !relatedHeros.Contains(handle2.handle)) && (!handle2.handle.ActorControl.IsDeadState || (allocIncomeRule.astIncomeMemberArr[paramIndex].bDeadAddIncome > 0))) { relatedHeros.Add(handle2.handle); } } break; } } }