fix(Scripts/Spell): properly script collapsing cave aura (#10092)
* cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/8d1a5fa1266dc98438cabfb1ced7891791245ff0) Co-authored-by: Sorikoff <46191832+Sorikoff@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1641693211435782900');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q12823_remove_collapsing_cave_aura';
|
||||||
|
INSERT INTO `spell_script_names` VALUES (55693,'spell_q12823_remove_collapsing_cave_aura');
|
||||||
@@ -3806,11 +3806,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
|||||||
{
|
{
|
||||||
switch (m_spellInfo->Id)
|
switch (m_spellInfo->Id)
|
||||||
{
|
{
|
||||||
case 55693: // Remove Collapsing Cave Aura
|
|
||||||
if (!unitTarget)
|
|
||||||
return;
|
|
||||||
unitTarget->RemoveAurasDueToSpell(m_spellInfo->Effects[effIndex].CalcValue());
|
|
||||||
break;
|
|
||||||
// Bending Shinbone
|
// Bending Shinbone
|
||||||
case 8856:
|
case 8856:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1067,21 +1067,40 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum CollapsingCave
|
||||||
|
{
|
||||||
|
SPELL_COLLAPSING_CAVE = 55486
|
||||||
|
};
|
||||||
|
|
||||||
|
// 55693 - Remove Collapsing Cave Aura
|
||||||
|
class spell_q12823_remove_collapsing_cave_aura : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_q12823_remove_collapsing_cave_aura);
|
||||||
|
|
||||||
|
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||||
|
{
|
||||||
|
GetHitUnit()->RemoveAurasDueToSpell(SPELL_COLLAPSING_CAVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_q12823_remove_collapsing_cave_aura::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_storm_peaks()
|
void AddSC_storm_peaks()
|
||||||
{
|
{
|
||||||
// Ours
|
|
||||||
new npc_frosthound();
|
new npc_frosthound();
|
||||||
new npc_iron_watcher();
|
new npc_iron_watcher();
|
||||||
new npc_time_lost_proto_drake();
|
new npc_time_lost_proto_drake();
|
||||||
new npc_wild_wyrm();
|
new npc_wild_wyrm();
|
||||||
new spell_q13003_thursting_hodirs_spear();
|
new spell_q13003_thursting_hodirs_spear();
|
||||||
new spell_q13007_iron_colossus();
|
new spell_q13007_iron_colossus();
|
||||||
|
|
||||||
// Theirs
|
|
||||||
new npc_roxi_ramrocket();
|
new npc_roxi_ramrocket();
|
||||||
new npc_brunnhildar_prisoner();
|
new npc_brunnhildar_prisoner();
|
||||||
new npc_freed_protodrake();
|
new npc_freed_protodrake();
|
||||||
new npc_icefang();
|
new npc_icefang();
|
||||||
new npc_hyldsmeet_protodrake();
|
new npc_hyldsmeet_protodrake();
|
||||||
new spell_close_rift();
|
new spell_close_rift();
|
||||||
|
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user