aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorjoschiwald <joschiwald.trinity@gmail.com>2014-11-14 23:53:22 +0100
committerjoschiwald <joschiwald.trinity@gmail.com>2014-11-14 23:53:22 +0100
commit41ac4d5822ba9daecfbb39639b86e16c748755de (patch)
tree1b6bc3118fb4b550caf1671ca77ab37ae9813de8 /src/server/scripts
parent5e95a0fd8105766f2b51a9919e16a73539afa446 (diff)
Script/Spells: fixed crash in spell_hun_aspect_of_the_beast
Closes #13560
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 22968d70ff1..6717bec109f 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -69,7 +69,7 @@ class spell_hun_aspect_of_the_beast : public SpellScriptLoader
bool Load() override
{
- return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ return GetOwner()->GetTypeId() == TYPEID_PLAYER;
}
bool Validate(SpellInfo const* /*spellInfo*/) override
@@ -81,16 +81,16 @@ class spell_hun_aspect_of_the_beast : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (Player* caster = GetCaster()->ToPlayer())
- if (Pet* pet = caster->GetPet())
- pet->RemoveAurasDueToSpell(SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET);
+ Player* player = GetTarget()->ToPlayer();
+ if (Pet* pet = player->GetPet())
+ pet->RemoveAurasDueToSpell(SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET);
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (Player* caster = GetCaster()->ToPlayer())
- if (caster->GetPet())
- caster->CastSpell(caster, SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET, true);
+ Player* player = GetTarget()->ToPlayer();
+ if (player->GetPet())
+ player->CastSpell(player, SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET, true);
}
void Register() override