public RefreshBuffEventArgs Fill(ActorBase actor)
 {
     Actor = actor;
     return(this);
 }
 public override void Clear()
 {
     Actor = null;
 }
示例#3
0
        public void AddBuff(int id, ActorBase caster)
        {
            if (m_Owner.IsDead)
            {
                return;
            }

            DRBuff db = GameEntry.DataTable.GetDataTable <DRBuff>()?.GetDataRow(id);

            if (db == null)
            {
                return;
            }

            BuffBase commonBuff = FindBuff(id);

            if (commonBuff != null)
            {
                switch ((BuffOverlayType)commonBuff.Data.OverlayType)
                {
                case BuffOverlayType.Overlay:
                    commonBuff.Overlay();
                    break;

                case BuffOverlayType.Reset:
                    commonBuff.Refresh();
                    break;

                case BuffOverlayType.Cancle:
                    m_DelBuffList.Add(commonBuff.Id);
                    break;
                }
                return;
            }
            CommandReplyType reply = CommandReplyType.NO;

            switch ((BattleActType)db.Result)
            {
            case BattleActType.Addattr:
            case BattleActType.Subattr:
            case BattleActType.Lddattr:
            case BattleActType.Lubattr:
            {
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Super:
            {
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Variation:
            {
                reply = m_Owner.ExecuteCommand(new VariationCommand(db.LifeTime, db.ChangeModelID));
            }
            break;

            case BattleActType.Hitfly:
            {
                reply = m_Owner.ExecuteCommand(new BeatFlyCommand());
            }
            break;

            case BattleActType.Hitdown:
            {
                reply = m_Owner.ExecuteCommand(new BeatDownCommand());
            }
            break;

            case BattleActType.Hitback:
            {
                reply = m_Owner.ExecuteCommand(new BeatBackCommand());
            }
            break;

            case BattleActType.Stun:
            {
                reply = m_Owner.ExecuteCommand(new StunCommand(db.LifeTime));
            }
            break;

            case BattleActType.Fixbody:
            {
                reply = m_Owner.ExecuteCommand(new FixBodyCommand(db.LifeTime));
            }
            break;

            case BattleActType.Stealth:
            {
                reply = m_Owner.ExecuteCommand(new StealthCommand(db.LifeTime));
            }
            break;

            case BattleActType.Frozen:
            {
                reply = m_Owner.ExecuteCommand(new FrostCommand(db.LifeTime));
            }
            break;

            case BattleActType.Blind:
            {
                reply = m_Owner.ExecuteCommand(new BlindCommand(db.LifeTime));
            }
            break;

            case BattleActType.Silent:
            {
                reply = m_Owner.ExecuteCommand(new SilentCommand(db.LifeTime));
            }
            break;

            case BattleActType.Sleep:
            {
                reply = m_Owner.ExecuteCommand(new SleepCommand(db.LifeTime));
            }
            break;

            case BattleActType.Absorb:
            {
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Wild:
            {
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Divive:
            {
                RemoveAllDebuff();
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Paraly:
            {
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Fear:
            {
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Reflex:
            {
                reply = CommandReplyType.YES;
            }
            break;

            case BattleActType.Dead:
            {
                reply = CommandReplyType.YES;
            }
            break;
            }

            if (reply == CommandReplyType.YES)
            {
                BuffBase buff = new BuffBase(id, m_Owner, caster);
                m_BuffMap.Add(id, buff);
            }

            m_Owner.UpdateCurAttribute();
        }
示例#4
0
 public virtual void SetHost(ActorBase actor)
 {
     m_Host = actor;
 }
示例#5
0
 public ActorBuff(ActorBase owner)
 {
     this.m_Owner = owner;
 }