Beispiel #1
0
        public bool OnImpacted(bool isBroadCast)
        {
            if (null == mCurrImpact)
            {
                return(false);
            }
            if (null == mCurrImpact.Owner)
            {
                return(false);
            }
            if (null == mCurrImpact.Skill)
            {
                return(false);
            }

            ChangeHP(mCurrImpact.DamageHP, mCurrImpact.Owner);
            if (mCurrImpact.DamageHP < 0)
            {
                if (IsDie)
                {
                    mCurrImpact.mKilled = true;
                }
                if (mCurrImpact.HitType == eHitType.Crit)
                {
                    //击退
                }
            }

            ChangeMP(mCurrImpact.DamageMP);

            if (mCurrImpact.DamageHP == 0 && (mCurrImpact.HitType == eHitType.Hit || mCurrImpact.HitType == eHitType.Crit))
            {
            }
            else
            {
                //发送飘字效果
                SendFlutterInfo((int)mCurrImpact.HitType, mCurrImpact.Skill.ID, mCurrImpact.Skill.Level, -1 * mCurrImpact.DamageHP, mCurrImpact.Owner);
            }

            if (isBroadCast)
            {
                //广播结果
            }

            mCurrImpact = null;

            return(true);
        }
Beispiel #2
0
 public virtual bool OnImpactBegin(Impact imp)
 {
     mCurrImpact = imp;
     return(true);
 }