mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Scripts/Deadmines: added some safety checks for some spellscripts in all boss scripts
This commit is contained in:
@@ -393,7 +393,8 @@ class spell_ripsnarl_go_for_the_throat_targeting : public SpellScriptLoader
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -293,7 +293,8 @@ class spell_cookie_throw_food_targeting : public SpellScriptLoader
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints);
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -469,7 +469,8 @@ class spell_foe_reaper_5000_acquire_target : public SpellScriptLoader
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints);
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -524,7 +525,8 @@ class spell_foe_reaper_5000_fixate_targeting : public SpellScriptLoader
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -660,7 +660,8 @@ class spell_helix_oaf_grab_targeting : public SpellScriptLoader
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -710,7 +710,8 @@ class spell_vanessa_backslash_targeting : public SpellScriptLoader
|
||||
|
||||
void HandleHit(SpellEffIndex effIndex)
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[effIndex].BasePoints, true);
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
|
||||
Reference in New Issue
Block a user