Пример #1
0
        private GamePlayer EffectOwner;			// Owner of the effect

        public MinionRescueEffect()
            : base(RealmAbilities.MinionRescueAbility.DURATION)
        {
            // Init NPC & Timer array
            spirits = new GameNPC[spiritCount];
            spiritTimer = new RegionTimer[spiritCount];

            // Build spell
            DBSpell tSpell = new DBSpell();
            tSpell.AllowAdd = false;
            tSpell.Description = "Target is stunned and can't move or do any action during spell duration.";
            tSpell.Name = "Rescue stun";
            tSpell.Target = "Enemy";
            tSpell.Radius = 0;
            tSpell.Range = WorldMgr.VISIBILITY_DISTANCE;
            tSpell.CastTime = 0;
            tSpell.Duration = spellDuration;
            tSpell.Uninterruptible = true;
            tSpell.Type = "Stun";
            tSpell.ResurrectMana = 1;
            tSpell.ResurrectHealth = 1;
            tSpell.Damage = 0;
            tSpell.DamageType = 0;
            tSpell.Value = 0;
            tSpell.Icon = 7049;
            tSpell.ClientEffect = 7049;
            spiritSpell = new Spell(tSpell, 1);
            spiritSpellLine = new SpellLine("RAs", "RealmAbilitys", "RealmAbilitys", true);
        }
Пример #2
0
        private int currentTick = 0;		// Count ticks

        public SearingPetEffect(GamePlayer owner)
            : base(RealmAbilities.SearingPetAbility.DURATION)
        {
            EffectOwner = owner;

            // Build spell
            DBSpell tSpell = new DBSpell();
            tSpell.AllowAdd = false;
            tSpell.Description = "Damage the target.";
            tSpell.Name = "PBAoE damage";
            tSpell.Target = "Enemy";
            tSpell.Radius = 0;
            tSpell.Range = WorldMgr.VISIBILITY_DISTANCE;
            tSpell.CastTime = 0;
            tSpell.Duration = 0;
            tSpell.Frequency = 0;
            tSpell.Pulse = 0;
            tSpell.Uninterruptible = true;
            tSpell.Type = "DirectDamage";
            tSpell.Damage = spellDamage;
            tSpell.DamageType = (int)eDamageType.Heat;
            tSpell.Value = 0;
            tSpell.Icon = 476;			// not official effect
            tSpell.ClientEffect = 476;	// not official effect
            petSpell = new Spell(tSpell, 1);
            petSpellLine = new SpellLine("RAs", "RealmAbilitys", "RealmAbilitys", true);
        }
Пример #3
0
		public void OnCommand(GameClient client, string[] args)
		{
			if (args.Length == 1)
			{
				DisplaySyntax( client );
				return;
			}

			GamePlayer player = client.Player.TargetObject as GamePlayer;

			if ( player == null )
				player = client.Player;

			ushort model;

			if ( ushort.TryParse( args[1], out model ) == false )
			{
				DisplaySyntax( client );
				return;
			}

			int duration = 10;

			if ( args.Length > 2 )
			{
				if ( int.TryParse( args[2], out duration ) == false )
					duration = 10;
			}

			DBSpell dbSpell = new DBSpell();
			dbSpell.Name = "GM Morph";
			dbSpell.Description = "Target has been shapechanged.";
			dbSpell.ClientEffect = 8000;
			dbSpell.Icon = 805;
			dbSpell.Target = "Realm";
			dbSpell.Range = 4000;
			dbSpell.Power = 0;
			dbSpell.CastTime = 0;
			dbSpell.Type = "Morph";
			dbSpell.Duration = duration * 60;
			dbSpell.LifeDrainReturn = model;

			Spell morphSpell = new Spell( dbSpell, 0 );
			SpellLine gmLine = new SpellLine( "GMSpell", "GM Spell", "none", false );

			ISpellHandler spellHandler = ScriptMgr.CreateSpellHandler( client.Player, morphSpell, gmLine );

			if ( spellHandler == null )
			{
				DisplayMessage( client, "Unable to create spell handler." );
			}
			else
			{
				spellHandler.StartSpell( player );
			}
		}
Пример #4
0
		// constructor
		public PrescienceNodeSpellHandler(GameLiving caster, Spell spell, SpellLine line)
			: base(caster, spell, line)
		{
			ApplyOnNPC = false;
			ApplyOnCombat = true;

			//Construct a new font.
			font = new GameFont();
			font.Model = 2584;
			font.Name = spell.Name;
			font.Realm = caster.Realm;
			font.X = caster.X;
			font.Y = caster.Y;
			font.Z = caster.Z;
			font.CurrentRegionID = caster.CurrentRegionID;
			font.Heading = caster.Heading;
			font.Owner = (GamePlayer)caster;

			// Construct the font spell
			dbs = new DBSpell();
			dbs.Name = spell.Name;
			dbs.Icon = 7312;
			dbs.ClientEffect = 7312;
			dbs.Damage = spell.Damage;
			dbs.DamageType = (int)spell.DamageType;
			dbs.Target = "Enemy";
			dbs.Radius = 0;
			dbs.Type = "Prescience";
			dbs.Value = spell.Value;
			dbs.Duration = spell.ResurrectHealth;
			dbs.Frequency = spell.ResurrectMana;
			dbs.Pulse = 0;
			dbs.PulsePower = 0;
			dbs.LifeDrainReturn = spell.LifeDrainReturn;
			dbs.Power = 0;
			dbs.CastTime = 0;
			dbs.Range = WorldMgr.VISIBILITY_DISTANCE;
			sRadius = 2000;
			s = new Spell(dbs, 50);
			sl = SkillBase.GetSpellLine(GlobalSpellsLines.Reserved_Spells);
			heal = ScriptMgr.CreateSpellHandler(m_caster, s, sl);
		}
Пример #5
0
 public StaticTempestBase(int stunDuration)
 {
     dbs = new DBSpell();
     dbs.Name = GetStaticName();
     dbs.Icon = GetStaticEffect();
     dbs.ClientEffect = GetStaticEffect();
     dbs.Damage = 0;
     dbs.DamageType = (int)eDamageType.Energy;
     dbs.Target = "Enemy";
     dbs.Radius = 0;
     dbs.Type = "UnresistableStun";
     dbs.Value = 0;
     dbs.Duration = stunDuration;
     dbs.Pulse = 0;
     dbs.PulsePower = 0;
     dbs.Power = 0;
     dbs.CastTime = 0;
     dbs.Range = WorldMgr.VISIBILITY_DISTANCE;
     s = new Spell(dbs,1);
     sl = new SpellLine("RAs","RealmAbilitys","RealmAbilitys",true);
 }
Пример #6
0
 public ThornweedFieldBase(int damage)
 {
     dbs = new DBSpell();
     dbs.Name = GetStaticName();
     dbs.Icon = GetStaticEffect();
     dbs.ClientEffect = GetStaticEffect();
     dbs.Damage = damage;
     dbs.DamageType = (int)eDamageType.Natural;
     dbs.Target = "Enemy";
     dbs.Radius = 0;
     dbs.Type = "DamageSpeedDecreaseNoVariance";
     dbs.Value = 50;
     dbs.Duration = 5;
     dbs.Pulse = 0;
     dbs.PulsePower = 0;
     dbs.Power = 0;
     dbs.CastTime = 0;
     dbs.Range = WorldMgr.VISIBILITY_DISTANCE;
     s = new Spell(dbs,1);
     sl = new SpellLine("RAs","RealmAbilitys","RealmAbilitys",true);
 }
 public NegativeMaelstromBase(int damage)
 {
     this.damage = damage;
     dbs = new DBSpell();
     dbs.Name = GetStaticName();
     dbs.Icon = GetStaticEffect();
     dbs.ClientEffect = GetStaticEffect();
     dbs.Damage = damage;
     dbs.DamageType = (int)eDamageType.Cold;
     dbs.Target = "Enemy";
     dbs.Radius = 0;
     dbs.Type = "DirectDamageNoVariance";
     dbs.Value = 0;
     dbs.Duration = 0;
     dbs.Pulse = 0;
     dbs.PulsePower = 0;
     dbs.Power = 0;
     dbs.CastTime = 0;
     dbs.Range = WorldMgr.VISIBILITY_DISTANCE;
     sl = new SpellLine("RAs", "RealmAbilitys", "RealmAbilitys", true);
 }
Пример #8
0
        public virtual void CreateSpell(double damage)
        {
            m_dbspell = new DBSpell();
            m_dbspell.Name = "Anger of the Gods";
            m_dbspell.Icon = 7023;
            m_dbspell.ClientEffect = 7023;
            m_dbspell.Damage = damage;
            m_dbspell.DamageType = 0;
            m_dbspell.Target = "Group";
            m_dbspell.Radius = 0;
            m_dbspell.Type = "DamageAdd";
            m_dbspell.Value = 0;
            m_dbspell.Duration = 30;
            m_dbspell.Pulse = 0;
            m_dbspell.PulsePower = 0;
            m_dbspell.Power = 0;
            m_dbspell.CastTime = 0;
			m_dbspell.EffectGroup = 99999; // stacks with other damage adds
            m_dbspell.Range = 1000;
            m_spell = new Spell(m_dbspell, 0); // make spell level 0 so it bypasses the spec level adjustment code
            m_spellline = new SpellLine("RAs", "RealmAbilities", "RealmAbilities", true);
        }	
Пример #9
0
        // constructor
        public DazzlingArraySpellHandler(GameLiving caster, Spell spell, SpellLine line)
            : base(caster, spell, line)
        {
            //Construct a new storm.
            storm = new GameStorm();
            storm.Realm = caster.Realm;
            storm.X = caster.X;
            storm.Y = caster.Y;
            storm.Z = caster.Z;
            storm.CurrentRegionID = caster.CurrentRegionID;
            storm.Heading = caster.Heading;
            storm.Owner = (GamePlayer)caster;
            storm.Movable = true;

            // Construct the storm spell
            dbs = new DBSpell();
            dbs.Name = spell.Name;
            dbs.Icon = 7210;
            dbs.ClientEffect = 7210;
            dbs.Damage = spell.Damage;
            dbs.DamageType = (int)spell.DamageType;
            dbs.Target = "Realm";
            dbs.Radius = 0;
            dbs.Type = "StormMissHit";
            dbs.Value = spell.Value;
            dbs.Duration = spell.ResurrectHealth; // should be 4
            dbs.Frequency = spell.ResurrectMana;
            dbs.Pulse = 0;
            dbs.PulsePower = 0;
            dbs.LifeDrainReturn = spell.LifeDrainReturn;
            dbs.Power = 0;
            dbs.CastTime = 0;
            dbs.Range = WorldMgr.VISIBILITY_DISTANCE;
            sRadius = 350;
            s = new Spell(dbs, 1);
            sl = SkillBase.GetSpellLine(GlobalSpellsLines.Reserved_Spells);
            tempest = ScriptMgr.CreateSpellHandler(m_caster, s, sl);
        }
Пример #10
0
        public Spell(DBSpell dbspell, int requiredLevel, bool minotaur)
			: base(dbspell.Name, (ushort)dbspell.SpellID, requiredLevel)
		{

			m_description = dbspell.Description;
			m_target = dbspell.Target;
			m_spelltype = dbspell.Type;
			m_range = dbspell.Range;
			m_radius = dbspell.Radius;
			m_value = dbspell.Value;
			m_damage = dbspell.Damage;
			m_damageType = (eDamageType)dbspell.DamageType;
			m_concentration = (byte)dbspell.Concentration;
			m_duration = dbspell.Duration * 1000;
			m_frequency = dbspell.Frequency * 100;
			m_pulse = dbspell.Pulse;
			m_pulse_power = dbspell.PulsePower;
			m_power = dbspell.Power;
			m_casttime = (int)(dbspell.CastTime * 1000);
			m_recastdelay = dbspell.RecastDelay * 1000;
			m_reshealth = dbspell.ResurrectHealth;
			m_resmana = dbspell.ResurrectMana;
			m_lifedrain_return = dbspell.LifeDrainReturn;
			m_amnesia_chance = dbspell.AmnesiaChance;
			m_message1 = dbspell.Message1;
			m_message2 = dbspell.Message2;
			m_message3 = dbspell.Message3;
			m_message4 = dbspell.Message4;
			m_effectID = (ushort)dbspell.ClientEffect;
			m_icon = (ushort)dbspell.Icon;
			m_instrumentRequirement = dbspell.InstrumentRequirement;
			m_spellGroup = dbspell.SpellGroup;
			m_effectGroup = dbspell.EffectGroup;
			m_subSpellID = dbspell.SubSpellID;
			m_moveCast = dbspell.MoveCast;
			m_uninterruptible = dbspell.Uninterruptible;
			m_isfocus = dbspell.IsFocus;
			// warlocks
			m_isprimary = dbspell.IsPrimary;
			m_issecondary = dbspell.IsSecondary;
			m_allowbolt = dbspell.AllowBolt;
            m_sharedtimergroup = dbspell.SharedTimerGroup;
            m_minotaurspell = minotaur;
		}
Пример #11
0
 public Spell(DBSpell dbspell, int requiredLevel)
     : this(dbspell, requiredLevel, false)
 {
 }
Пример #12
0
		// constructor
		public DissonanceTrapSpellHandler(GameLiving caster, Spell spell, SpellLine line)
			: base(caster, spell, line)
		{
			//Construct a new mine.
			mine = new GameMine();
			mine.Model = 2588;
			mine.Name = spell.Name;
			mine.Realm = caster.Realm;
			mine.X = caster.X;
			mine.Y = caster.Y;
			mine.Z = caster.Z;
			mine.CurrentRegionID = caster.CurrentRegionID;
			mine.Heading = caster.Heading;
			mine.Owner = (GamePlayer)caster;

			// Construct the mine spell
			dbs = new DBSpell();
			dbs.Name = spell.Name;
			dbs.Icon = 7255;
			dbs.ClientEffect = 7255;
			dbs.Damage = spell.Damage;
			dbs.DamageType = (int)spell.DamageType;
			dbs.Target = "Enemy";
			dbs.Radius = 0;
			dbs.Type = "DirectDamage";
			dbs.Value = spell.Value;
			dbs.Duration = spell.ResurrectHealth;
			dbs.Frequency = spell.ResurrectMana;
			dbs.Pulse = 0;
			dbs.PulsePower = 0;
			dbs.LifeDrainReturn = spell.LifeDrainReturn;
			dbs.Power = 0;
			dbs.CastTime = 0;
			dbs.Range = WorldMgr.VISIBILITY_DISTANCE;
			sRadius = 350;
			s = new Spell(dbs, 1);
			sl = SkillBase.GetSpellLine(GlobalSpellsLines.Reserved_Spells);
			trap = ScriptMgr.CreateSpellHandler(m_caster, s, sl);
		}
Пример #13
0
 private ISpellHandler MakeTrap()
 {
     DBSpell dbs = new DBSpell();
     dbs.Name = "Increased Essence Consumption";
     dbs.Icon = 11020;
     dbs.ClientEffect = 11020;
     dbs.DamageType = 10;
     dbs.Target = "Enemy";
     dbs.Radius = 0;
     dbs.Type = "PetLifedrain";
     dbs.Damage = 70;
     dbs.LifeDrainReturn = 100;
     dbs.Value = -100;
     dbs.Duration = 0;
     dbs.Frequency = 0;
     dbs.Pulse = 0;
     dbs.PulsePower = 0;
     dbs.Power = 0;
     dbs.CastTime = 0;
     dbs.Range = 350;
     Spell s = new Spell(dbs, 50);
     SpellLine sl = SkillBase.GetSpellLine(GlobalSpellsLines.Reserved_Spells);
     return ScriptMgr.CreateSpellHandler(m_pet, s, sl);
 }
Пример #14
0
		public Song(DBSpell spell, int requiredLevel)
			: base(spell, requiredLevel)
		{
		}
Пример #15
0
 // Creates the trap(spell)
 private ISpellHandler MakeTrap()
 {
     DBSpell dbs = new DBSpell();
     dbs.Name = "irritatin wisp";
     dbs.Icon = 4107;
     dbs.ClientEffect = 5435;
     dbs.DamageType = 15;
     dbs.Target = "Enemy";
     dbs.Radius = 0;
     dbs.Type = "DirectDamage";
     dbs.Damage = 80;
     dbs.Value = 0;
     dbs.Duration = 0;
     dbs.Frequency = 0;
     dbs.Pulse = 0;
     dbs.PulsePower = 0;
     dbs.Power = 0;
     dbs.CastTime = 0;
     dbs.Range = 1500;
     Spell s = new Spell(dbs, 50);
     SpellLine sl = SkillBase.GetSpellLine(GlobalSpellsLines.Reserved_Spells);
     return ScriptMgr.CreateSpellHandler(m_pet, s, sl);
 }
Пример #16
0
        /// <summary>
        /// Action
        /// </summary>
        /// <param name="living"></param>
        public override void Execute(GameLiving living)
        {
            if (CheckPreconditions(living, DEAD | SITTING | MEZZED | STUNNED)) return;

            GamePlayer player = living as GamePlayer;
            if (player != null)
            {
                /*BlissfulIgnoranceEffect BlissfulIgnorance = (BlissfulIgnoranceEffect)player.EffectList.GetOfType(typeof(BlissfulIgnoranceEffect));
                if (BlissfulIgnorance != null)
                    BlissfulIgnorance.Cancel(false);

                new BlissfulIgnoranceEffect().Start(player);*/

                Hashtable table_spells = new Hashtable();
                foreach (Spell spell in SkillBase.GetSpellList("Savagery"))
                {
                    if(spell.Group==0 || spell.Target.ToLower()!="self") continue;

                    if (spell.Level <= player.GetSpellLine("Savagery").Level)
                    {
                        if (!table_spells.ContainsKey(spell.Group))
                            table_spells.Add(spell.Group, spell);
                        else
                        {
                            Spell oldspell = (Spell)table_spells[spell.Group];
                            if (spell.Level > oldspell.Level)
                                table_spells[spell.Group] = spell;
                        }
                    }
                }
                foreach (object obj in table_spells.Values)
                {
                    if (obj == null || !(obj is Spell)) continue;
                    Spell spell = obj as Spell;
                    try
                    {
                        DBSpell db = new DBSpell();
                        db.ClientEffect = spell.ClientEffect;
                        db.Icon = spell.Icon;
                        db.Name = spell.Name;
                        db.Description = spell.Description;
                        db.Duration = spell.Duration / 1000;
                        db.Power = 0;
                        db.Value = spell.Value;
                        db.Message1 = "";
                        db.Message2 = "";
                        db.Message3 = "";
                        db.Message4 = "";
                        db.Type = spell.SpellType;
                        db.Target = "Self";
                        db.MoveCast = true;
                        db.Uninterruptible = true;

                        SpellHandler handler = new SpellHandler(player, new Spell(db, 0), SkillBase.GetSpellLine("Savagery"));
                        if(handler!=null)
                            handler.CastSpell();
                    }
                    catch (Exception e)
                    {
                        if (log.IsErrorEnabled)
                            log.Error("RR5 Savage : use spell, ", e);
                    }
                }
            }
            DisableSkill(living);
        }