public void OnActorDamage(ref HurtEventResultInfo prm) { DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <uint, PlayerKDA> current = enumerator.get_Current(); ListView <HeroKDA> .Enumerator enumerator2 = current.get_Value().GetEnumerator(); while (enumerator2.MoveNext()) { enumerator2.get_Current().OnActorDamage(ref prm); } KeyValuePair <uint, PlayerKDA> current2 = enumerator.get_Current(); if (current2.get_Value().IsHost) { KeyValuePair <uint, PlayerKDA> current3 = enumerator.get_Current(); if (current3.get_Value().m_hostHeroDamage != null) { KeyValuePair <uint, PlayerKDA> current4 = enumerator.get_Current(); ListView <CHostHeroDamage> .Enumerator enumerator3 = current4.get_Value().m_hostHeroDamage.GetEnumerator(); while (enumerator3.MoveNext()) { if (enumerator3.get_Current() != null) { enumerator3.get_Current().OnActorDamage(ref prm); } } } } } }
private void onActorDamage(ref HurtEventResultInfo info) { if ((info.src == base.sourceActor) && (info.hpChanged < 0)) { this.bNoHurt = false; } }
public void OnActorDamage(ref HurtEventResultInfo prm) { if (prm.src == this.m_actorHero && prm.hurtInfo.hurtType != HurtTypeDef.Therapic && prm.atker) { this.AddDamageValue(ref prm); } }
public void StatisticActorInfo(HurtEventResultInfo prm) { ActorValueStatistic objValueStatistic = this.actorHero.handle.ValueComponent.ObjValueStatistic; if (objValueStatistic != null) { objValueStatistic.iActorLvl = Math.Max(objValueStatistic.iActorLvl, prm.hurtInfo.attackInfo.iActorLvl); objValueStatistic.iActorATT = Math.Max(objValueStatistic.iActorATT, prm.hurtInfo.attackInfo.iActorATT); objValueStatistic.iActorINT = Math.Max(objValueStatistic.iActorINT, prm.hurtInfo.attackInfo.iActorINT); objValueStatistic.iActorMaxHp = Math.Max(objValueStatistic.iActorMaxHp, prm.hurtInfo.attackInfo.iActorMaxHp); objValueStatistic.iActorMinHp = Math.Max(objValueStatistic.iActorMinHp, prm.src.handle.ValueComponent.actorHp); objValueStatistic.iDEFStrike = Math.Max(objValueStatistic.iDEFStrike, prm.hurtInfo.attackInfo.iDEFStrike); objValueStatistic.iRESStrike = Math.Max(objValueStatistic.iRESStrike, prm.hurtInfo.attackInfo.iRESStrike); objValueStatistic.iFinalHurt = Math.Max(objValueStatistic.iFinalHurt, prm.hurtInfo.attackInfo.iFinalHurt); objValueStatistic.iCritStrikeRate = Math.Max(objValueStatistic.iCritStrikeRate, prm.hurtInfo.attackInfo.iCritStrikeRate); objValueStatistic.iCritStrikeValue = Math.Max(objValueStatistic.iCritStrikeValue, prm.hurtInfo.attackInfo.iCritStrikeValue); objValueStatistic.iReduceCritStrikeRate = Math.Max(objValueStatistic.iReduceCritStrikeRate, prm.hurtInfo.attackInfo.iReduceCritStrikeRate); objValueStatistic.iReduceCritStrikeValue = Math.Max(objValueStatistic.iReduceCritStrikeValue, prm.hurtInfo.attackInfo.iReduceCritStrikeValue); objValueStatistic.iCritStrikeEff = Math.Max(objValueStatistic.iCritStrikeEff, prm.hurtInfo.attackInfo.iCritStrikeEff); objValueStatistic.iPhysicsHemophagiaRate = Math.Max(objValueStatistic.iPhysicsHemophagiaRate, prm.hurtInfo.attackInfo.iPhysicsHemophagiaRate); objValueStatistic.iMagicHemophagiaRate = Math.Max(objValueStatistic.iMagicHemophagiaRate, prm.hurtInfo.attackInfo.iMagicHemophagiaRate); objValueStatistic.iPhysicsHemophagia = Math.Max(objValueStatistic.iPhysicsHemophagia, prm.hurtInfo.attackInfo.iPhysicsHemophagia); objValueStatistic.iMagicHemophagia = Math.Max(objValueStatistic.iMagicHemophagia, prm.hurtInfo.attackInfo.iMagicHemophagia); objValueStatistic.iHurtOutputRate = Math.Max(objValueStatistic.iHurtOutputRate, prm.hurtInfo.attackInfo.iHurtOutputRate); } }
private void OnActorDamage(ref HurtEventResultInfo prm) { DebugHelper.Assert(this.m_NonHeroInfo != null, "invalid m_NonHeroInfo"); this.OnActorDamageAtker(ref prm); if (prm.src && prm.src.get_handle().TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero && prm.hurtInfo.hurtType != HurtTypeDef.Therapic) { DictionaryView <uint, NONHERO_STATISTIC_INFO> dictionaryView; if (!this.m_NonHeroInfo.TryGetValue((uint)prm.src.get_handle().TheActorMeta.ActorType, ref dictionaryView)) { dictionaryView = new DictionaryView <uint, NONHERO_STATISTIC_INFO>(); this.m_NonHeroInfo.Add((uint)prm.src.get_handle().TheActorMeta.ActorType, dictionaryView); } NONHERO_STATISTIC_INFO nONHERO_STATISTIC_INFO; if (!dictionaryView.TryGetValue(prm.src.get_handle().TheActorMeta.ActorCamp, ref nONHERO_STATISTIC_INFO)) { nONHERO_STATISTIC_INFO = new NONHERO_STATISTIC_INFO(); dictionaryView.Add(prm.src.get_handle().TheActorMeta.ActorCamp, nONHERO_STATISTIC_INFO); } nONHERO_STATISTIC_INFO.uiTotalBeAttackedNum += 1u; nONHERO_STATISTIC_INFO.uiTotalBeHurtCount += (uint)prm.hurtTotal; nONHERO_STATISTIC_INFO.uiBeHurtMax = (uint)((nONHERO_STATISTIC_INFO.uiBeHurtMax <= (uint)prm.hurtTotal) ? prm.hurtTotal : ((int)nONHERO_STATISTIC_INFO.uiBeHurtMax)); nONHERO_STATISTIC_INFO.uiBeHurtMin = (uint)((nONHERO_STATISTIC_INFO.uiBeHurtMin >= (uint)prm.hurtTotal) ? prm.hurtTotal : ((int)nONHERO_STATISTIC_INFO.uiBeHurtMin)); int num = (prm.src.get_handle().ValueComponent == null) ? 0 : prm.src.get_handle().ValueComponent.actorHp; int num2 = num - prm.hurtTotal; if (num2 < 0) { num2 = 0; } nONHERO_STATISTIC_INFO.uiHpMax = (uint)((nONHERO_STATISTIC_INFO.uiHpMax <= (uint)num) ? num : ((int)nONHERO_STATISTIC_INFO.uiHpMax)); nONHERO_STATISTIC_INFO.uiHpMin = (uint)((nONHERO_STATISTIC_INFO.uiHpMin >= (uint)num2) ? num2 : ((int)nONHERO_STATISTIC_INFO.uiHpMin)); this.m_NonHeroInfo.get_Item((uint)prm.src.get_handle().TheActorMeta.ActorType).set_Item(prm.src.get_handle().TheActorMeta.ActorCamp, nONHERO_STATISTIC_INFO); } }
private void onActorDamage(ref HurtEventResultInfo info) { if (info.src != this.sourceActor) { return; } if (info.hpChanged < 0) { if (info.hurtInfo.bBounceHurt && this.localParams[2] == 1) { return; } bool flag = this.CheckDamageRateForHp(ref info); if (flag) { flag = this.CheckAttackType(ref info); if (flag) { this.bHurt = true; if (this.localParams[4] == 1) { return; } this.rootEvent.SetTriggerActor(info.atker); } } } }
public void onActorDamage(ref HurtEventResultInfo info) { if (info.hurtInfo.hurtType != HurtTypeDef.Therapic && info.hurtInfo.hurtCount == 0 && ActorHelper.IsHostCtrlActor(ref info.atker) && info.src.get_handle().MatHurtEffect != null) { info.src.get_handle().MatHurtEffect.PlayHurtEffect(); } }
private void OnActorDamage(ref HurtEventResultInfo prm) { DebugHelper.Assert(this.m_NonHeroInfo != null, "invalid m_NonHeroInfo"); this.OnActorDamageAtker(ref prm); if (prm.src && prm.src.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero && prm.hurtInfo.hurtType != HurtTypeDef.Therapic) { DictionaryView <uint, NONHERO_STATISTIC_INFO> dictionaryView; if (!this.m_NonHeroInfo.TryGetValue((uint)prm.src.handle.TheActorMeta.ActorType, out dictionaryView)) { dictionaryView = new DictionaryView <uint, NONHERO_STATISTIC_INFO>(); this.m_NonHeroInfo.Add((uint)prm.src.handle.TheActorMeta.ActorType, dictionaryView); } NONHERO_STATISTIC_INFO nONHERO_STATISTIC_INFO; if (!dictionaryView.TryGetValue((uint)prm.src.handle.TheActorMeta.ActorCamp, out nONHERO_STATISTIC_INFO)) { nONHERO_STATISTIC_INFO = new NONHERO_STATISTIC_INFO(); dictionaryView.Add((uint)prm.src.handle.TheActorMeta.ActorCamp, nONHERO_STATISTIC_INFO); } nONHERO_STATISTIC_INFO.uiTotalBeAttackedNum += 1u; nONHERO_STATISTIC_INFO.uiTotalBeHurtCount += (uint)prm.hurtTotal; nONHERO_STATISTIC_INFO.uiBeHurtMax = ((nONHERO_STATISTIC_INFO.uiBeHurtMax > (uint)prm.hurtTotal) ? nONHERO_STATISTIC_INFO.uiBeHurtMax : ((uint)prm.hurtTotal)); nONHERO_STATISTIC_INFO.uiBeHurtMin = ((nONHERO_STATISTIC_INFO.uiBeHurtMin < (uint)prm.hurtTotal) ? nONHERO_STATISTIC_INFO.uiBeHurtMin : ((uint)prm.hurtTotal)); int num = (prm.src.handle.ValueComponent != null) ? prm.src.handle.ValueComponent.actorHp : 0; int num2 = num - prm.hurtTotal; if (num2 < 0) { num2 = 0; } nONHERO_STATISTIC_INFO.uiHpMax = ((nONHERO_STATISTIC_INFO.uiHpMax > (uint)num) ? nONHERO_STATISTIC_INFO.uiHpMax : ((uint)num)); nONHERO_STATISTIC_INFO.uiHpMin = ((nONHERO_STATISTIC_INFO.uiHpMin < (uint)num2) ? nONHERO_STATISTIC_INFO.uiHpMin : ((uint)num2)); this.m_NonHeroInfo[(uint)prm.src.handle.TheActorMeta.ActorType][(uint)prm.src.handle.TheActorMeta.ActorCamp] = nONHERO_STATISTIC_INFO; } }
private void OnActorDamage(ref HurtEventResultInfo prm) { DebugHelper.Assert(this.m_NonHeroInfo != null, "invalid m_NonHeroInfo"); this.OnActorDamageAtker(ref prm); if (((prm.src != 0) && (prm.src.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)) && (prm.hurtInfo.hurtType != HurtTypeDef.Therapic)) { DictionaryView <uint, NONHERO_STATISTIC_INFO> view; NONHERO_STATISTIC_INFO nonhero_statistic_info; if (!this.m_NonHeroInfo.TryGetValue((uint)prm.src.handle.TheActorMeta.ActorType, out view)) { view = new DictionaryView <uint, NONHERO_STATISTIC_INFO>(); this.m_NonHeroInfo.Add((uint)prm.src.handle.TheActorMeta.ActorType, view); } if (!view.TryGetValue((uint)prm.src.handle.TheActorMeta.ActorCamp, out nonhero_statistic_info)) { nonhero_statistic_info = new NONHERO_STATISTIC_INFO(); view.Add((uint)prm.src.handle.TheActorMeta.ActorCamp, nonhero_statistic_info); } nonhero_statistic_info.uiTotalBeAttackedNum++; nonhero_statistic_info.uiTotalBeHurtCount += (uint)prm.hurtTotal; nonhero_statistic_info.uiBeHurtMax = (nonhero_statistic_info.uiBeHurtMax <= prm.hurtTotal) ? ((uint)prm.hurtTotal) : nonhero_statistic_info.uiBeHurtMax; nonhero_statistic_info.uiBeHurtMin = (nonhero_statistic_info.uiBeHurtMin >= prm.hurtTotal) ? ((uint)prm.hurtTotal) : nonhero_statistic_info.uiBeHurtMin; int num = (prm.src.handle.ValueComponent == null) ? 0 : prm.src.handle.ValueComponent.actorHp; int num2 = num - prm.hurtTotal; if (num2 < 0) { num2 = 0; } nonhero_statistic_info.uiHpMax = (nonhero_statistic_info.uiHpMax <= num) ? ((uint)num) : nonhero_statistic_info.uiHpMax; nonhero_statistic_info.uiHpMin = (nonhero_statistic_info.uiHpMin >= num2) ? ((uint)num2) : nonhero_statistic_info.uiHpMin; this.m_NonHeroInfo[(uint)prm.src.handle.TheActorMeta.ActorType][(uint)prm.src.handle.TheActorMeta.ActorCamp] = nonhero_statistic_info; } }
public void OnActorDamage(ref HurtEventResultInfo prm) { DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <uint, PlayerKDA> current = enumerator.Current; ListView <HeroKDA> .Enumerator enumerator2 = current.get_Value().GetEnumerator(); while (enumerator2.MoveNext()) { enumerator2.Current.OnActorDamage(ref prm); } KeyValuePair <uint, PlayerKDA> current2 = enumerator.Current; if (current2.get_Value().IsHost) { KeyValuePair <uint, PlayerKDA> current3 = enumerator.Current; if (current3.get_Value().m_hostHeroDamage != null) { KeyValuePair <uint, PlayerKDA> current4 = enumerator.Current; ListView <CHostHeroDamage> .Enumerator enumerator3 = current4.get_Value().m_hostHeroDamage.GetEnumerator(); while (enumerator3.MoveNext()) { if (enumerator3.Current != null) { enumerator3.Current.OnActorDamage(ref prm); } } } } } Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.BATTLE_TEAMFIGHT_DAMAGE_UPDATE); }
public void StatisticSkillInfo(HurtEventResultInfo prm) { if (prm.hurtInfo.atkSlot >= SkillSlotType.SLOT_SKILL_COUNT) { return; } if (!this.actorHero || this.actorHero.handle.SkillControl == null || this.actorHero.handle.SkillControl.stSkillStat == null || this.actorHero.handle.SkillControl.stSkillStat.SkillStatistictInfo == null) { return; } SKILLSTATISTICTINFO sKILLSTATISTICTINFO = this.actorHero.handle.SkillControl.stSkillStat.SkillStatistictInfo[(int)prm.hurtInfo.atkSlot]; if (prm.hurtInfo.hurtType != HurtTypeDef.Therapic) { sKILLSTATISTICTINFO.iHurtTotal += prm.hurtTotal; if (prm.src && prm.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) { sKILLSTATISTICTINFO.iHurtToHeroTotal += prm.hurtTotal; if (!sKILLSTATISTICTINFO.bIsCurUseSkillHitHero) { sKILLSTATISTICTINFO.bIsCurUseSkillHitHero = true; sKILLSTATISTICTINFO.iUseSkillHitHeroTimes++; } sKILLSTATISTICTINFO.iHitHeroCount++; } sKILLSTATISTICTINFO.iHurtMax = Math.Max(sKILLSTATISTICTINFO.iHurtMax, prm.hurtTotal); if (sKILLSTATISTICTINFO.iHurtMin == -1) { sKILLSTATISTICTINFO.iHurtMin = prm.hurtTotal; } else { sKILLSTATISTICTINFO.iHurtMin = Math.Min(sKILLSTATISTICTINFO.iHurtMin, prm.hurtTotal); } if (sKILLSTATISTICTINFO.iTmpHitAllHurtCountIndex++ < sKILLSTATISTICTINFO.iHitCount) { sKILLSTATISTICTINFO.iTmpHitAllHurtTotal += prm.hurtTotal; } if (sKILLSTATISTICTINFO.iTmpHitAllHurtCountIndex == sKILLSTATISTICTINFO.iHitCount) { sKILLSTATISTICTINFO.iHitAllHurtTotalMax = Math.Max(sKILLSTATISTICTINFO.iHitAllHurtTotalMax, sKILLSTATISTICTINFO.iTmpHitAllHurtTotal); if (sKILLSTATISTICTINFO.iHitAllHurtTotalMin == -1) { sKILLSTATISTICTINFO.iHitAllHurtTotalMin = sKILLSTATISTICTINFO.iTmpHitAllHurtTotal; } else { sKILLSTATISTICTINFO.iHitAllHurtTotalMin = Math.Min(sKILLSTATISTICTINFO.iHitAllHurtTotalMin, sKILLSTATISTICTINFO.iTmpHitAllHurtTotal); } } sKILLSTATISTICTINFO.iadValue = Math.Max(sKILLSTATISTICTINFO.iadValue, prm.hurtInfo.adValue); sKILLSTATISTICTINFO.iapValue = Math.Max(sKILLSTATISTICTINFO.iapValue, prm.hurtInfo.apValue); sKILLSTATISTICTINFO.ihemoFadeRate = Math.Max(sKILLSTATISTICTINFO.ihemoFadeRate, prm.hurtInfo.firstHemoFadeRate); sKILLSTATISTICTINFO.ihpValue = Math.Max(sKILLSTATISTICTINFO.ihpValue, prm.hurtInfo.hpValue); sKILLSTATISTICTINFO.ihurtCount = Math.Max(sKILLSTATISTICTINFO.ihurtCount, prm.hurtInfo.hurtCount); sKILLSTATISTICTINFO.ihurtValue = Math.Max(sKILLSTATISTICTINFO.ihurtValue, prm.hurtInfo.hurtValue); sKILLSTATISTICTINFO.iloseHpValue = Math.Max(sKILLSTATISTICTINFO.iloseHpValue, prm.hurtInfo.loseHpValue); } }
private void onActorDamage(ref HurtEventResultInfo info) { if ((((info.src == base.sourceActor) && (info.hpChanged < 0)) && (!info.hurtInfo.bBounceHurt || (base.localParams[2] != 1))) && this.CheckAttackType(ref info)) { this.bHurt = true; base.rootEvent.SetTriggerActor(info.atker); } }
private bool CheckSkillSlot(ref HurtEventResultInfo info) { bool flag = false; if (base.localParams[1] == info.hurtInfo.atkSlot) { flag = true; } return(flag); }
private bool CheckSkillSlot(ref HurtEventResultInfo info) { bool result = false; if (this.localParams[1] == (int)info.hurtInfo.atkSlot) { result = true; } return(result); }
private void onActorDamage(ref HurtEventResultInfo info) { if (info.src != this.sourceActor) { return; } if (info.hpChanged < 0) { this.bNoHurt = false; } }
public void StatisticSkillInfo(HurtEventResultInfo prm) { if (prm.hurtInfo.atkSlot < SkillSlotType.SLOT_SKILL_COUNT) { SkillSlot slot = this.actorHero.handle.SkillControl.SkillSlotArray[(int)prm.hurtInfo.atkSlot]; if ((slot != null) && (prm.hurtInfo.hurtType != HurtTypeDef.Therapic)) { slot.SkillStatistictInfo.iHurtTotal += prm.hurtTotal; if ((prm.src != 0) && (prm.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)) { slot.SkillStatistictInfo.iHurtToHeroTotal += prm.hurtTotal; } } if (((slot != null) && (slot.SkillObj != null)) && (slot.SkillObj.cfgData.iCfgID == slot.SkillStatistictInfo.iSkillCfgID)) { if (prm.hurtInfo.hurtType != HurtTypeDef.Therapic) { slot.SkillStatistictInfo.iHurtMax = Math.Max(slot.SkillStatistictInfo.iHurtMax, prm.hurtTotal); if (slot.SkillStatistictInfo.iHurtMin == -1) { slot.SkillStatistictInfo.iHurtMin = prm.hurtTotal; } else { slot.SkillStatistictInfo.iHurtMin = Math.Min(slot.SkillStatistictInfo.iHurtMin, prm.hurtTotal); } if (slot.SkillStatistictInfo.iTmpHitAllHurtCountIndex++ < slot.SkillStatistictInfo.iHitCount) { slot.SkillStatistictInfo.iTmpHitAllHurtTotal += prm.hurtTotal; } if (slot.SkillStatistictInfo.iTmpHitAllHurtCountIndex == slot.SkillStatistictInfo.iHitCount) { slot.SkillStatistictInfo.iHitAllHurtTotalMax = Math.Max(slot.SkillStatistictInfo.iHitAllHurtTotalMax, slot.SkillStatistictInfo.iTmpHitAllHurtTotal); if (slot.SkillStatistictInfo.iHitAllHurtTotalMin == -1) { slot.SkillStatistictInfo.iHitAllHurtTotalMin = slot.SkillStatistictInfo.iTmpHitAllHurtTotal; } else { slot.SkillStatistictInfo.iHitAllHurtTotalMin = Math.Min(slot.SkillStatistictInfo.iHitAllHurtTotalMin, slot.SkillStatistictInfo.iTmpHitAllHurtTotal); } } } slot.SkillStatistictInfo.iadValue = Math.Max(slot.SkillStatistictInfo.iadValue, prm.hurtInfo.adValue); slot.SkillStatistictInfo.iapValue = Math.Max(slot.SkillStatistictInfo.iapValue, prm.hurtInfo.apValue); slot.SkillStatistictInfo.ihemoFadeRate = Math.Max(slot.SkillStatistictInfo.ihemoFadeRate, prm.hurtInfo.hemoFadeRate); slot.SkillStatistictInfo.ihpValue = Math.Max(slot.SkillStatistictInfo.ihpValue, prm.hurtInfo.hpValue); slot.SkillStatistictInfo.ihurtCount = Math.Max(slot.SkillStatistictInfo.ihurtCount, prm.hurtInfo.hurtCount); slot.SkillStatistictInfo.ihurtValue = Math.Max(slot.SkillStatistictInfo.ihurtValue, prm.hurtInfo.hurtValue); slot.SkillStatistictInfo.iloseHpValue = Math.Max(slot.SkillStatistictInfo.iloseHpValue, prm.hurtInfo.loseHpValue); } } }
private void onActorDamage(ref HurtEventResultInfo prm) { int length = this.TriggerMatches.Length; for (int i = 0; i < length; i++) { CTriggerMatch match = this.TriggerMatches[i]; if ((match != null) && this.FilterMatch(EGlobalGameEvent.ActorDamage, match, prm.src, prm.atker, (HurtEventResultInfo) prm, i)) { this.DoTriggering(match, prm.src, prm.atker, (HurtEventResultInfo) prm); } } }
public void OnActorDamage(ref HurtEventResultInfo prm) { DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <uint, PlayerKDA> current = enumerator.Current; IEnumerator <HeroKDA> enumerator2 = current.Value.GetEnumerator(); while (enumerator2.MoveNext()) { enumerator2.Current.OnActorDamage(ref prm); } } }
private void onActorDamage(ref HurtEventResultInfo prm) { int num = this.TriggerMatches.Length; SFilterMatchParam sFilterMatchParam = default(SFilterMatchParam); sFilterMatchParam.hurtInfo = prm; for (int i = 0; i < num; i++) { CTriggerMatch cTriggerMatch = this.TriggerMatches[i]; if (cTriggerMatch != null && this.FilterMatch(EGlobalGameEvent.ActorDamage, cTriggerMatch, prm.src, prm.atker, ref sFilterMatchParam, i)) { this.DoTriggering(cTriggerMatch, prm.src, prm.atker); } } }
public void StatisticSkillInfo(HurtEventResultInfo prm) { if ((prm.hurtInfo.atkSlot < SkillSlotType.SLOT_SKILL_COUNT) && (((this.actorHero != 0) && (this.actorHero.handle.SkillControl != null)) && ((this.actorHero.handle.SkillControl.stSkillStat != null) && (this.actorHero.handle.SkillControl.stSkillStat.SkillStatistictInfo != null)))) { SKILLSTATISTICTINFO skillstatistictinfo = this.actorHero.handle.SkillControl.stSkillStat.SkillStatistictInfo[(int)prm.hurtInfo.atkSlot]; if (prm.hurtInfo.hurtType != HurtTypeDef.Therapic) { skillstatistictinfo.iHurtTotal += prm.hurtTotal; if ((prm.src != 0) && (prm.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)) { skillstatistictinfo.iHurtToHeroTotal += prm.hurtTotal; } skillstatistictinfo.iHurtMax = Math.Max(skillstatistictinfo.iHurtMax, prm.hurtTotal); if (skillstatistictinfo.iHurtMin == -1) { skillstatistictinfo.iHurtMin = prm.hurtTotal; } else { skillstatistictinfo.iHurtMin = Math.Min(skillstatistictinfo.iHurtMin, prm.hurtTotal); } if (skillstatistictinfo.iTmpHitAllHurtCountIndex++ < skillstatistictinfo.iHitCount) { skillstatistictinfo.iTmpHitAllHurtTotal += prm.hurtTotal; } if (skillstatistictinfo.iTmpHitAllHurtCountIndex == skillstatistictinfo.iHitCount) { skillstatistictinfo.iHitAllHurtTotalMax = Math.Max(skillstatistictinfo.iHitAllHurtTotalMax, skillstatistictinfo.iTmpHitAllHurtTotal); if (skillstatistictinfo.iHitAllHurtTotalMin == -1) { skillstatistictinfo.iHitAllHurtTotalMin = skillstatistictinfo.iTmpHitAllHurtTotal; } else { skillstatistictinfo.iHitAllHurtTotalMin = Math.Min(skillstatistictinfo.iHitAllHurtTotalMin, skillstatistictinfo.iTmpHitAllHurtTotal); } } skillstatistictinfo.iadValue = Math.Max(skillstatistictinfo.iadValue, prm.hurtInfo.adValue); skillstatistictinfo.iapValue = Math.Max(skillstatistictinfo.iapValue, prm.hurtInfo.apValue); skillstatistictinfo.ihemoFadeRate = Math.Max(skillstatistictinfo.ihemoFadeRate, prm.hurtInfo.hemoFadeRate); skillstatistictinfo.ihpValue = Math.Max(skillstatistictinfo.ihpValue, prm.hurtInfo.hpValue); skillstatistictinfo.ihurtCount = Math.Max(skillstatistictinfo.ihurtCount, prm.hurtInfo.hurtCount); skillstatistictinfo.ihurtValue = Math.Max(skillstatistictinfo.ihurtValue, prm.hurtInfo.hurtValue); skillstatistictinfo.iloseHpValue = Math.Max(skillstatistictinfo.iloseHpValue, prm.hurtInfo.loseHpValue); } } }
private void OnActorDamageAtker(ref HurtEventResultInfo prm) { if (prm.atker && prm.atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero && prm.hurtInfo.hurtType != HurtTypeDef.Therapic) { DictionaryView <uint, NONHERO_STATISTIC_INFO> dictionaryView; if (!this.m_NonHeroInfo.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorType, out dictionaryView)) { dictionaryView = new DictionaryView <uint, NONHERO_STATISTIC_INFO>(); this.m_NonHeroInfo.Add((uint)prm.atker.handle.TheActorMeta.ActorType, dictionaryView); } NONHERO_STATISTIC_INFO nONHERO_STATISTIC_INFO; if (!dictionaryView.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorCamp, out nONHERO_STATISTIC_INFO)) { nONHERO_STATISTIC_INFO = new NONHERO_STATISTIC_INFO(); dictionaryView.Add((uint)prm.atker.handle.TheActorMeta.ActorCamp, nONHERO_STATISTIC_INFO); } nONHERO_STATISTIC_INFO.uiTotalAttackNum += 1u; nONHERO_STATISTIC_INFO.uiTotalHurtCount += (uint)prm.hurtTotal; nONHERO_STATISTIC_INFO.uiHurtMax = ((nONHERO_STATISTIC_INFO.uiHurtMax > (uint)prm.hurtTotal) ? nONHERO_STATISTIC_INFO.uiHurtMax : ((uint)prm.hurtTotal)); nONHERO_STATISTIC_INFO.uiHurtMin = ((nONHERO_STATISTIC_INFO.uiHurtMin < (uint)prm.hurtTotal) ? nONHERO_STATISTIC_INFO.uiHurtMin : ((uint)prm.hurtTotal)); DebugHelper.Assert(prm.atker.handle.SkillControl != null, "empty skill control"); if (prm.atker.handle.SkillControl != null && prm.atker.handle.SkillControl.stSkillStat != null && prm.atker.handle.SkillControl.stSkillStat.SkillStatistictInfo != null) { int atkSlot = (int)prm.hurtInfo.atkSlot; int num = prm.atker.handle.SkillControl.stSkillStat.SkillStatistictInfo.Length; bool flag = atkSlot >= 0 && atkSlot < num; if (flag) { SKILLSTATISTICTINFO sKILLSTATISTICTINFO = prm.atker.handle.SkillControl.stSkillStat.SkillStatistictInfo[(int)prm.hurtInfo.atkSlot]; nONHERO_STATISTIC_INFO.uiAttackDistanceMax = (uint)sKILLSTATISTICTINFO.iAttackDistanceMax; if (prm.atker.handle.SkillControl.CurUseSkillSlot != null && prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj != null && prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj.cfgData != null) { uint num2 = prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj.cfgData.iMaxAttackDistance; nONHERO_STATISTIC_INFO.uiAttackDistanceMin = ((nONHERO_STATISTIC_INFO.uiAttackDistanceMin < num2) ? nONHERO_STATISTIC_INFO.uiAttackDistanceMin : num2); } } } if (nONHERO_STATISTIC_INFO.uiFirstBeAttackTime == 0u) { nONHERO_STATISTIC_INFO.uiFirstBeAttackTime = (uint)Singleton <FrameSynchr> .instance.LogicFrameTick; } this.m_NonHeroInfo[(uint)prm.atker.handle.TheActorMeta.ActorType][(uint)prm.atker.handle.TheActorMeta.ActorCamp] = nONHERO_STATISTIC_INFO; } }
private void OnActorDamageAtker(ref HurtEventResultInfo prm) { if (((prm.atker != 0) && (prm.atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)) && (prm.hurtInfo.hurtType != HurtTypeDef.Therapic)) { DictionaryView <uint, NONHERO_STATISTIC_INFO> view; NONHERO_STATISTIC_INFO nonhero_statistic_info; if (!this.m_NonHeroInfo.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorType, out view)) { view = new DictionaryView <uint, NONHERO_STATISTIC_INFO>(); this.m_NonHeroInfo.Add((uint)prm.atker.handle.TheActorMeta.ActorType, view); } if (!view.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorCamp, out nonhero_statistic_info)) { nonhero_statistic_info = new NONHERO_STATISTIC_INFO(); view.Add((uint)prm.atker.handle.TheActorMeta.ActorCamp, nonhero_statistic_info); } nonhero_statistic_info.uiTotalAttackNum++; nonhero_statistic_info.uiTotalHurtCount += (uint)prm.hurtTotal; nonhero_statistic_info.uiHurtMax = (nonhero_statistic_info.uiHurtMax <= prm.hurtTotal) ? ((uint)prm.hurtTotal) : nonhero_statistic_info.uiHurtMax; nonhero_statistic_info.uiHurtMin = (nonhero_statistic_info.uiHurtMin >= prm.hurtTotal) ? ((uint)prm.hurtTotal) : nonhero_statistic_info.uiHurtMin; DebugHelper.Assert(prm.atker.handle.SkillControl != null, "empty skill control"); if (prm.atker.handle.SkillControl.CurUseSkillSlot != null) { nonhero_statistic_info.uiAttackDistanceMax = (uint)prm.atker.handle.SkillControl.CurUseSkillSlot.SkillStatistictInfo.iAttackDistanceMax; uint iMaxAttackDistance = (uint)prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj.cfgData.iMaxAttackDistance; nonhero_statistic_info.uiAttackDistanceMin = (nonhero_statistic_info.uiAttackDistanceMin >= iMaxAttackDistance) ? iMaxAttackDistance : nonhero_statistic_info.uiAttackDistanceMin; } else if (prm.atker.handle.SkillControl.SkillSlotArray[0] != null) { nonhero_statistic_info.uiAttackDistanceMax = (uint)prm.atker.handle.SkillControl.SkillSlotArray[0].SkillStatistictInfo.iAttackDistanceMax; uint num2 = 0; if ((prm.atker.handle.SkillControl.SkillSlotArray[0].SkillObj != null) && (prm.atker.handle.SkillControl.SkillSlotArray[0].SkillObj.cfgData != null)) { num2 = (uint)prm.atker.handle.SkillControl.SkillSlotArray[0].SkillObj.cfgData.iMaxAttackDistance; } nonhero_statistic_info.uiAttackDistanceMin = (nonhero_statistic_info.uiAttackDistanceMin >= num2) ? num2 : nonhero_statistic_info.uiAttackDistanceMin; } if (nonhero_statistic_info.uiFirstBeAttackTime == 0) { nonhero_statistic_info.uiFirstBeAttackTime = (uint)Singleton <FrameSynchr> .instance.LogicFrameTick; } this.m_NonHeroInfo[(uint)prm.atker.handle.TheActorMeta.ActorType][(uint)prm.atker.handle.TheActorMeta.ActorCamp] = nonhero_statistic_info; } }
public int TakeBouncesDamage(ref HurtDataInfo hurt) { int num = this.CriticalDamagePart(ref hurt); int num2 = (int)(9900 + FrameRandom.Random(200u)); this.actor.BuffHolderComp.OnDamageExtraValueEffect(ref hurt, hurt.atker, hurt.atkSlot); if (this.ImmuneDamage(ref hurt) || this.actor.BuffHolderComp.BuffImmuneDamage(ref hurt)) { return(0); } bool flag = hurt.atker && hurt.atker.handle.bOneKiller; int actorHp = this.actor.ValueComponent.actorHp; int num3 = this.CommonDamagePart(ref hurt) * (10000 - this.ReduceDamagePart(ref hurt, hurt.hurtType)) / 10000 * (10000 + num) / 10000 - this.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_REALHURTLESS].totalValue; num3 = num3 * (10000 - this.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_HURTREDUCERATE].totalValue) / 10000; if (num3 < 0) { num3 = 0; } if (hurt.atker) { num3 = num3 * Singleton <BattleLogic> .GetInstance().clashAddition.CalcDamageAddition(hurt.atker.handle.TheStaticData.TheBaseAttribute.ClashMark, this.actor.TheStaticData.TheBaseAttribute.ClashMark) / 10000; } num3 = this.actor.BuffHolderComp.OnDamage(ref hurt, num3); int num4 = this.actor.ValueComponent.actorHp; this.actor.ValueComponent.actorHp -= num3; num4 = this.actor.ValueComponent.actorHp - num4; if (flag) { this.actor.ValueComponent.actorHp = 0; num4 = actorHp * -1; } if (hurt.atker && this.actor.TheActorMeta.ActorCamp != hurt.atker.handle.TheActorMeta.ActorCamp && this.actor.ValueComponent.actorHp > 0) { this.actor.ActorControl.AddHurtSelfActor(hurt.atker); } HurtEventResultInfo hurtEventResultInfo = new HurtEventResultInfo(base.GetActor(), hurt.atker, hurt, num3, num4, num); Singleton <GameEventSys> .instance.SendEvent <HurtEventResultInfo>(GameEventDef.Event_ActorDamage, ref hurtEventResultInfo); return(num4); }
private bool CheckDamageRateForHp(ref HurtEventResultInfo info) { bool result = false; int num = this.localParams[3]; if (num <= 0) { result = true; } else if (info.src && info.src.handle.ValueComponent != null) { int num2 = -info.hpChanged; if (num2 > num * (info.src.handle.ValueComponent.actorHp + num2) / 100) { result = true; } } return(result); }
private void OnActorDamage(ref HurtEventResultInfo info) { if (!this.bHasFailure && ActorHelper.IsHostActor(ref info.src)) { int actorHp = info.src.get_handle().ValueComponent.actorHp; int actorHpTotal = info.src.get_handle().ValueComponent.actorHpTotal; int num = actorHp * 100 / actorHpTotal; if (num < this.LoweastHealthPercent) { this.LoweastHealthPercent = num; } bool flag = !SmartCompare.Compare <int>(num, this.healthPercent, this.operation); if (this.bHasFailure != flag) { this.bHasFailure = flag; this.TriggerChangedEvent(); } } }
private bool CheckDamageRateForHp(ref HurtEventResultInfo info) { bool flag = false; int num = base.localParams[3]; if (num <= 0) { return(true); } if ((info.src != 0) && (info.src.handle.ValueComponent != null)) { int num2 = -info.hpChanged; if (num2 > ((num * (info.src.handle.ValueComponent.actorHp + num2)) / 100)) { flag = true; } } return(flag); }
private bool CheckAttackType(ref HurtEventResultInfo info) { bool result = false; if (this.localParams[0] == 0) { result = true; } else if (this.localParams[0] == 1) { if (info.atker && info.atker.handle.TheStaticData.TheHeroOnlyInfo.AttackDistanceType == 1) { result = this.CheckSkillSlot(ref info); } } else if (this.localParams[0] == 2 && info.atker && info.atker.handle.TheStaticData.TheHeroOnlyInfo.AttackDistanceType == 2) { result = this.CheckSkillSlot(ref info); } return(result); }
private bool CheckAttackType(ref HurtEventResultInfo info) { bool flag = false; if (base.localParams[0] == 0) { return(true); } if (base.localParams[0] == 1) { if ((info.atker != 0) && (info.atker.handle.TheStaticData.TheHeroOnlyInfo.AttackDistanceType == 1)) { flag = this.CheckSkillSlot(ref info); } return(flag); } if (((base.localParams[0] == 2) && (info.atker != 0)) && (info.atker.handle.TheStaticData.TheHeroOnlyInfo.AttackDistanceType == 2)) { flag = this.CheckSkillSlot(ref info); } return(flag); }
private bool FilterMatchDamage(ref HurtEventResultInfo inHurtInfo) { if (!this.bPercent) { return(true); } int actorHp = inHurtInfo.src.handle.ValueComponent.actorHp; int hpChanged = inHurtInfo.hpChanged; int num3 = actorHp - hpChanged; int percent = this.Percent; if (percent < 0) { percent = 0; } else if (percent > 100) { percent = 100; } int num5 = (inHurtInfo.src.handle.ValueComponent.actorHpTotal * percent) / 100; return(((num3 > actorHp) && (num3 >= num5)) && (actorHp <= num5)); }
private bool FilterMatchDamage(ref HurtEventResultInfo inHurtInfo) { if (!this.bPercent) { return(true); } int actorHp = inHurtInfo.src.handle.ValueComponent.actorHp; int hpChanged = inHurtInfo.hpChanged; int num = actorHp - hpChanged; int num2 = this.Percent; if (num2 < 0) { num2 = 0; } else if (num2 > 100) { num2 = 100; } int num3 = inHurtInfo.src.handle.ValueComponent.actorHpTotal * num2 / 100; return(num > actorHp && num >= num3 && actorHp <= num3); }