Exemplo n.º 1
0
        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);
        }