Scripts/Spells: Deathbolt (#23531)

* Scripts/Spells: Deathbolt

* Rename 9999_99_99_99_world.sql to 2019_06_28_01_world.sql

(cherry picked from commit 62b2c379b3)
This commit is contained in:
Sorikoff
2019-06-28 18:18:02 +00:00
committed by Shauren
parent ea4c1ae7d0
commit 88457030cc
3 changed files with 31 additions and 32 deletions

View File

@@ -15,23 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Sholazar_Basin
SD%Complete: 100
SDComment: Quest support: 12550, 12645, 12688, 12726, 13957
SDCategory: Sholazar_Basin
EndScriptData */
/* ContentData
npc_engineer_helice
npc_jungle_punch_target
spell_q12620_the_lifewarden_wrath
spell_q12589_shoot_rjr
npc_haiphoon (Quest: "Song of Wind and Water")
npc_vics_flying_machine
spell_shango_tracks
EndContentData */
#include "ScriptMgr.h"
#include "CombatAI.h"
#include "Map.h"
@@ -768,6 +751,34 @@ public:
}
};
enum ReturnedSevenfold
{
SPELL_FREYAS_WARD = 51845,
SPELL_SEVENFOLD_RETRIBUTION = 51856,
SPELL_DEATHBOLT = 51855
};
class spell_q12611_deathbolt : public SpellScript
{
PrepareSpellScript(spell_q12611_deathbolt);
void HandleScriptEffect(SpellEffIndex /* effIndex */)
{
Unit* caster = GetCaster();
Unit* target = GetHitUnit();
if (target->HasAura(SPELL_FREYAS_WARD))
target->CastSpell(caster, SPELL_SEVENFOLD_RETRIBUTION, true);
else
caster->CastSpell(target, SPELL_DEATHBOLT, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q12611_deathbolt::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
void AddSC_sholazar_basin()
{
new npc_engineer_helice();
@@ -777,4 +788,5 @@ void AddSC_sholazar_basin()
new npc_haiphoon();
new npc_vics_flying_machine();
new spell_shango_tracks();
RegisterSpellScript(spell_q12611_deathbolt);
}