Beispiel #1
0
 public void OnActorHemophagia(ref HemophagiaEventResultInfo prm)
 {
     if (prm.src == this.actorHero)
     {
         base.m_uiHealNum++;
         base.m_iBeHeal  += prm.hpChanged;
         base.m_BeHealMax = (base.m_BeHealMax >= prm.hpChanged) ? base.m_BeHealMax : prm.hpChanged;
         if (base.m_BeHealMin == -1)
         {
             base.m_BeHealMin = prm.hpChanged;
         }
         else
         {
             base.m_BeHealMin = (base.m_BeHealMin <= prm.hpChanged) ? base.m_BeHealMin : prm.hpChanged;
         }
         base.m_iSelfHealNum++;
         base.m_iSelfHealCount += prm.hpChanged;
         base.m_iSelfHealMax    = (base.m_iSelfHealMax >= prm.hpChanged) ? base.m_iSelfHealMax : prm.hpChanged;
         if (base.m_iSelfHealMin == -1)
         {
             base.m_iSelfHealMin = prm.hpChanged;
         }
         else
         {
             base.m_iSelfHealMin = (base.m_iSelfHealMin <= prm.hpChanged) ? base.m_iSelfHealMin : prm.hpChanged;
         }
     }
 }
 public void OnActorHemophagia(ref HemophagiaEventResultInfo prm)
 {
     if (prm.src == this.actorHero)
     {
         this.m_uiHealNum += 1u;
         this.m_iBeHeal   += prm.hpChanged;
         this.m_BeHealMax  = ((this.m_BeHealMax < prm.hpChanged) ? prm.hpChanged : this.m_BeHealMax);
         if (this.m_BeHealMin == -1)
         {
             this.m_BeHealMin = prm.hpChanged;
         }
         else
         {
             this.m_BeHealMin = ((this.m_BeHealMin > prm.hpChanged) ? prm.hpChanged : this.m_BeHealMin);
         }
         this.m_iSelfHealNum++;
         this.m_iSelfHealCount += prm.hpChanged;
         this.m_iSelfHealMax    = ((this.m_iSelfHealMax < prm.hpChanged) ? prm.hpChanged : this.m_iSelfHealMax);
         if (this.m_iSelfHealMin == -1)
         {
             this.m_iSelfHealMin = prm.hpChanged;
         }
         else
         {
             this.m_iSelfHealMin = ((this.m_iSelfHealMin > prm.hpChanged) ? prm.hpChanged : this.m_iSelfHealMin);
         }
     }
 }
Beispiel #3
0
 private void OnActorHemophagia(ref HemophagiaEventResultInfo hri)
 {
     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().OnActorHemophagia(ref hri);
         }
     }
 }
Beispiel #4
0
        private int Hemophagia(ref HurtDataInfo hurt, int hurtValue)
        {
            int num = 0;

            if (hurt.atker)
            {
                if (hurt.hurtType == HurtTypeDef.PhysHurt)
                {
                    int num2 = 0;
                    int num3 = hurt.attackInfo.iPhysicsHemophagia + hurt.attackInfo.iActorLvl * (int)this.battleParam.dwM_PhysicsHemophagia + (int)this.battleParam.dwN_PhysicsHemophagia;
                    if (num3 > 0)
                    {
                        num2 = hurt.attackInfo.iPhysicsHemophagia * 10000 / num3;
                    }
                    num = hurtValue * (num2 + hurt.attackInfo.iPhysicsHemophagiaRate) / 10000;
                }
                else if (hurt.hurtType == HurtTypeDef.MagicHurt)
                {
                    int num4 = 0;
                    int num5 = hurt.attackInfo.iMagicHemophagia + hurt.attackInfo.iActorLvl * (int)this.battleParam.dwM_MagicHemophagia + (int)this.battleParam.dwN_MagicHemophagia;
                    if (num5 > 0)
                    {
                        num4 = hurt.attackInfo.iMagicHemophagia * 10000 / num5;
                    }
                    num = hurtValue * (num4 + hurt.attackInfo.iMagicHemophagiaRate) / 10000;
                }
                if (hurt.iEffectCountInSingleTrigger > 1)
                {
                    num = num * hurt.followUpHemoFadeRate / 10000;
                }
                else
                {
                    num = num * hurt.firstHemoFadeRate / 10000;
                }
                if (num > 0)
                {
                    int num6 = hurt.atker.handle.ValueComponent.actorHp;
                    hurt.atker.handle.ActorControl.ReviveHp(num);
                    num6 = hurt.atker.handle.ValueComponent.actorHp - num6;
                    HemophagiaEventResultInfo hemophagiaEventResultInfo = new HemophagiaEventResultInfo(hurt.atker, num6);
                    Singleton <GameEventSys> .instance.SendEvent <HemophagiaEventResultInfo>(GameEventDef.Event_Hemophagia, ref hemophagiaEventResultInfo);
                }
                return(num);
            }
            return(num);
        }
Beispiel #5
0
        private int Hemophagia(ref HurtDataInfo hurt, int hurtValue)
        {
            int nAddHp = 0;

            if (hurt.atker != 0)
            {
                if (hurt.hurtType == HurtTypeDef.PhysHurt)
                {
                    int num2 = 0;
                    int num3 = (int)((hurt.attackInfo.iPhysicsHemophagia + (hurt.attackInfo.iActorLvl * this.battleParam.dwM_PhysicsHemophagia)) + this.battleParam.dwN_PhysicsHemophagia);
                    if (num3 > 0)
                    {
                        num2 = (hurt.attackInfo.iPhysicsHemophagia * 0x2710) / num3;
                    }
                    nAddHp = (hurtValue * (num2 + hurt.attackInfo.iPhysicsHemophagiaRate)) / 0x2710;
                    nAddHp = (nAddHp * hurt.hemoFadeRate) / 0x2710;
                }
                else if (hurt.hurtType == HurtTypeDef.MagicHurt)
                {
                    int num4 = 0;
                    int num5 = (int)((hurt.attackInfo.iMagicHemophagia + (hurt.attackInfo.iActorLvl * this.battleParam.dwM_MagicHemophagia)) + this.battleParam.dwN_MagicHemophagia);
                    if (num5 > 0)
                    {
                        num4 = (hurt.attackInfo.iMagicHemophagia * 0x2710) / num5;
                    }
                    nAddHp = (hurtValue * (num4 + hurt.attackInfo.iMagicHemophagiaRate)) / 0x2710;
                    nAddHp = (nAddHp * hurt.hemoFadeRate) / 0x2710;
                }
                if (nAddHp > 0)
                {
                    int actorHp = hurt.atker.handle.ValueComponent.actorHp;
                    hurt.atker.handle.ActorControl.ReviveHp(nAddHp);
                    actorHp = hurt.atker.handle.ValueComponent.actorHp - actorHp;
                    HemophagiaEventResultInfo prm = new HemophagiaEventResultInfo(hurt.atker, actorHp);
                    Singleton <GameEventSys> .instance.SendEvent <HemophagiaEventResultInfo>(GameEventDef.Event_Hemophagia, ref prm);
                }
            }
            return(nAddHp);
        }