Пример #1
0
 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;
     }
 }
 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;
     }
 }
Пример #3
0
 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);
     }
 }
Пример #4
0
 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;
     }
 }
 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;
     }
 }
Пример #6
0
 private void OnActorInit(ref PoolObjHandle <ActorRoot> inActor)
 {
     if (inActor.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
     {
         DictionaryView <uint, NONHERO_STATISTIC_INFO> view;
         NONHERO_STATISTIC_INFO nonhero_statistic_info;
         if (!this.m_NonHeroInfo.TryGetValue((uint)inActor.handle.TheActorMeta.ActorType, out view))
         {
             view = new DictionaryView <uint, NONHERO_STATISTIC_INFO>();
             this.m_NonHeroInfo.Add((uint)inActor.handle.TheActorMeta.ActorType, view);
         }
         if (!view.TryGetValue((uint)inActor.handle.TheActorMeta.ActorCamp, out nonhero_statistic_info))
         {
             nonhero_statistic_info = new NONHERO_STATISTIC_INFO();
             view.Add((uint)inActor.handle.TheActorMeta.ActorCamp, nonhero_statistic_info);
         }
         nonhero_statistic_info.ActorType = inActor.handle.TheActorMeta.ActorType;
         nonhero_statistic_info.ActorCamp = inActor.handle.TheActorMeta.ActorCamp;
         nonhero_statistic_info.uiTotalSpawnNum++;
         this.m_NonHeroInfo[(uint)inActor.handle.TheActorMeta.ActorType][(uint)inActor.handle.TheActorMeta.ActorCamp] = nonhero_statistic_info;
     }
 }
 private void OnActorInit(ref PoolObjHandle <ActorRoot> inActor)
 {
     if (inActor.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
     {
         DictionaryView <uint, NONHERO_STATISTIC_INFO> dictionaryView;
         if (!this.m_NonHeroInfo.TryGetValue((uint)inActor.handle.TheActorMeta.ActorType, out dictionaryView))
         {
             dictionaryView = new DictionaryView <uint, NONHERO_STATISTIC_INFO>();
             this.m_NonHeroInfo.Add((uint)inActor.handle.TheActorMeta.ActorType, dictionaryView);
         }
         NONHERO_STATISTIC_INFO nONHERO_STATISTIC_INFO;
         if (!dictionaryView.TryGetValue((uint)inActor.handle.TheActorMeta.ActorCamp, out nONHERO_STATISTIC_INFO))
         {
             nONHERO_STATISTIC_INFO = new NONHERO_STATISTIC_INFO();
             dictionaryView.Add((uint)inActor.handle.TheActorMeta.ActorCamp, nONHERO_STATISTIC_INFO);
         }
         nONHERO_STATISTIC_INFO.ActorType        = inActor.handle.TheActorMeta.ActorType;
         nONHERO_STATISTIC_INFO.ActorCamp        = inActor.handle.TheActorMeta.ActorCamp;
         nONHERO_STATISTIC_INFO.uiTotalSpawnNum += 1u;
         this.m_NonHeroInfo[(uint)inActor.handle.TheActorMeta.ActorType][(uint)inActor.handle.TheActorMeta.ActorCamp] = nONHERO_STATISTIC_INFO;
     }
 }