public override void Execute(GameLiving living)
        {
            #region preCheck
            if (CheckPreconditions(living, DEAD | SITTING | MEZZED | STUNNED))
            {
                return;
            }

            if (living.EffectList.CountOfType <BadgeOfValorEffect>() > 0)
            {
                if (living is GamePlayer)
                {
                    (living as GamePlayer).Out.SendMessage("You already an effect of that type!", eChatType.CT_SpellResisted, eChatLoc.CL_SystemWindow);
                }
                return;
            }

            #endregion


            //send spelleffect
            foreach (GamePlayer visPlayer in living.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
            {
                visPlayer.Out.SendSpellEffectAnimation(living, living, 7057, 0, false, 0x01);
            }

            new BadgeOfValorEffect().Start(living);
            living.DisableSkill(this, m_reuseTimer * 1000);
        }
        // Lifeflight add
        /// <summary>
        /// Resurrects target if it accepts
        /// </summary>
        /// <param name="player"></param>
        /// <param name="response"></param>
        protected virtual void ResurrectResponceHandler(GamePlayer player, byte response)
        {
            // DOLConsole.WriteLine("resurrect responce: " + response);
            GameTimer resurrectExpiredTimer;

            lock (_resTimersByLiving.SyncRoot)
            {
                resurrectExpiredTimer = (GameTimer)_resTimersByLiving[player];
                _resTimersByLiving.Remove(player);
            }

            resurrectExpiredTimer?.Stop();

            GameLiving rezzer = (GameLiving)player.TempProperties.getProperty <object>(ResurrectCasterProperty, null);

            if (!player.IsAlive)
            {
                if (rezzer == null)
                {
                    player.Out.SendMessage("No one is currently trying to resurrect you.", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else
                {
                    if (response == 1)
                    {
                        ResurrectLiving(player, rezzer); // accepted
                    }
                    else
                    {
                        player.Out.SendMessage("You decline to be resurrected.", eChatType.CT_System, eChatLoc.CL_SystemWindow);

                        // Dont need to refund anything with PR
                        // m_caster.Mana += CalculateNeededPower(player);
                        // but we do need to give them PR back
                        // Lifeflight: Seems like the best way to do this is to send a 0 duration to DisableSkill, which will enable to ability
                        rezzer.DisableSkill(this, 0);
                    }
                }
            }

            player.TempProperties.removeProperty(ResurrectCasterProperty);
        }
        public override void Execute(GameLiving living)
        {
            #region preCheck
            if (CheckPreconditions(living, DEAD | SITTING | MEZZED | STUNNED)) return;

            if (living.EffectList.CountOfType<BadgeOfValorEffect>() > 0)
            {
                if (living is GamePlayer)
                    (living as GamePlayer).Out.SendMessage("You already an effect of that type!", eChatType.CT_SpellResisted, eChatLoc.CL_SystemWindow);
                return;
            }

            #endregion

            //send spelleffect
            foreach (GamePlayer visPlayer in living.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
                visPlayer.Out.SendSpellEffectAnimation(living, living, 7057, 0, false, 0x01);

            new BadgeOfValorEffect().Start(living);
            living.DisableSkill(this, m_reuseTimer * 1000);
        }
Beispiel #4
0
 public void DisableSkill(GameLiving living)
 {
     living.DisableSkill(this, GetReUseDelay(Level) * 1000);
 }
Beispiel #5
0
		public void DisableSkill(GameLiving living)
		{
			living.DisableSkill(this, GetReUseDelay(Level) * 1000);
		}