diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 41 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 32 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 2 |
13 files changed, 68 insertions, 27 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 86b92eebfe3..f62d62c671a 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 17849027dd4..130f61565f7 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 298e9b6410e..38e5771ccca 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 1318a9aa333..8a3424ab1e7 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 2346a30640c..5a0ffbd2c90 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 339f6ed8eca..b0b619c8b08 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 84df4418078..39360e04aa1 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -37,6 +37,10 @@ enum PaladinSpells SPELL_BLESSING_OF_LOWER_CITY_PALADIN = 37879, SPELL_BLESSING_OF_LOWER_CITY_PRIEST = 37880, SPELL_BLESSING_OF_LOWER_CITY_SHAMAN = 37881, + + SPELL_DIVINE_STORM = 53385, + SPELL_DIVINE_STORM_DUMMY = 54171, + SPELL_DIVINE_STORM_HEAL = 54172, }; // 31850 - Ardent Defender @@ -327,6 +331,40 @@ public: } }; +class spell_pal_divine_storm : public SpellScriptLoader +{ +public: + spell_pal_divine_storm() : SpellScriptLoader("spell_pal_divine_storm") { } + + class spell_pal_divine_storm_SpellScript : public SpellScript + { + PrepareSpellScript(spell_pal_divine_storm_SpellScript); + + uint32 healPct; + + bool Load() + { + healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster()); + return true; + } + + void TriggerHeal() + { + GetCaster()->CastCustomSpell(SPELL_DIVINE_STORM_DUMMY, SPELLVALUE_BASE_POINT0, (GetHitDamage() * healPct) / 100, GetCaster(), true); + } + + void Register() + { + AfterHit += SpellHitFn(spell_pal_divine_storm_SpellScript::TriggerHeal); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_pal_divine_storm_SpellScript(); + } +}; + void AddSC_paladin_spell_scripts() { new spell_pal_ardent_defender(); @@ -335,4 +373,5 @@ void AddSC_paladin_spell_scripts() new spell_pal_guarded_by_the_light(); new spell_pal_holy_shock(); new spell_pal_judgement_of_command(); + new spell_pal_divine_storm(); } diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 07b8a79691a..ee5f6a6d772 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index ecdbd582b76..d266b42f50a 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index e9caa40255e..c88d7b891d6 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 76dac9b59f1..b0116d6d33d 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -26,16 +26,16 @@ enum ShamanSpells { - SHAMAN_SPELL_GLYPH_OF_MANA_TIDE = 55441, - SHAMAN_SPELL_MANA_TIDE_TOTEM = 39609, - SHAMAN_SPELL_FIRE_NOVA_R1 = 1535, - SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349, - SHAMAN_SPELL_SATED = 57724, - SHAMAN_SPELL_EXHAUSTION = 57723, - - //For Earthen Power - SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474, //Spell casted by totem - SHAMAN_TOTEM_SPELL_EARTHEN_POWER = 59566, //Spell witch remove snare effect + SHAMAN_SPELL_GLYPH_OF_MANA_TIDE = 55441, + SHAMAN_SPELL_MANA_TIDE_TOTEM = 39609, + SHAMAN_SPELL_FIRE_NOVA_R1 = 1535, + SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349, + SHAMAN_SPELL_SATED = 57724, + SHAMAN_SPELL_EXHAUSTION = 57723, + + // For Earthen Power + SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474, + SHAMAN_TOTEM_SPELL_EARTHEN_POWER = 59566, }; // 51474 - Astral shift @@ -125,7 +125,7 @@ class spell_sha_fire_nova : public SpellScriptLoader { Creature* totem = caster->GetMap()->GetCreature(caster->m_SummonSlot[1]); if (totem && totem->isTotem()) - totem->CastSpell(totem, spellId, true); + caster->CastSpell(totem, spellId, true); } } @@ -215,9 +215,11 @@ class spell_sha_earthbind_totem : public SpellScriptLoader { Unit* target = GetTarget(); if (Unit* caster = aurEff->GetBase()->GetCaster()) - if (AuraEffect* aur = caster->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, 2289, 0)) - if (roll_chance_i(aur->GetBaseAmount())) - target->CastSpell(target, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff); + if (TempSummon* summon = caster->ToTempSummon()) + if (Unit* owner = summon->GetOwner()) + if (AuraEffect* aur = owner->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, 2289, 0)) + if (roll_chance_i(aur->GetBaseAmount()) && target->HasAuraWithMechanic(1 << MECHANIC_SNARE)) + caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff); } void Register() diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 17035c2a3d2..51b2de5d0f3 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index b9def701fca..f39ad3d1426 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the |
