예제 #1
0
파일: ReviveActor.cs 프로젝트: Mixi59/Stump
        void ReviveActor(FightActor actor, int heal)
        {
            var cell = TargetedCell;

            if (!Fight.IsCellFree(cell))
            {
                cell = Map.GetRandomAdjacentFreeCell(TargetedPoint, true);
            }

            actor.Revive(heal, Caster);
            actor.SummoningEffect = this;
            actor.Position.Cell   = cell;
            actor.BuffRemoved    += OnBuffRemoved;

            if (Spell.Id == (int)SpellIdEnum.LAISSE_SPIRITUELLE_420)
            {
                var actorBuffId = actor.PopNextBuffId();

                var addStateHandler = new AddState(new EffectDice(EffectsEnum.Effect_AddState, (short)SpellStatesEnum.ZOMBI_74, 0, 0), actor, null, actor.Cell, false);
                var actorBuff       = new StateBuff(actorBuffId, actor, Caster, addStateHandler,
                                                    Spell, FightDispellableEnum.DISPELLABLE_BY_DEATH, SpellManager.Instance.GetSpellState((uint)SpellStatesEnum.ZOMBI_74))
                {
                    Duration = -1000
                };

                actor.AddBuff(actorBuff, true);
            }

            ActionsHandler.SendGameActionFightReviveMessage(Fight.Clients, Caster, actor);
            ContextHandler.SendGameFightTurnListMessage(Fight.Clients, Fight);
        }
        protected override void OnDead(FightActor killedBy)
        {
            base.OnDead(killedBy);
            base.Fight.TimeLine.RemoveFighter(this);
            this.Summoner.RemoveSummon(this);

            this.PostDead();
            ContextHandler.SendGameFightTurnListMessage(base.Fight.Clients, base.Fight);
        }