aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorDoctorKraft <DoctorKraft@users.noreply.github.com>2017-03-21 17:36:44 +0100
committerShauren <shauren.trinity@gmail.com>2017-03-21 17:36:44 +0100
commit76dd3ae36849bc44cb77cad497575be446172d53 (patch)
tree2a2ff8949fbea14d46000d2de2c31da3acd92372 /src/server/game/Spells/SpellEffects.cpp
parent481825bd6d3139799cde79e14718d75ec603d728 (diff)
Core/Spells: Fixed EffectActivateSpec for hunter pets
Closes #19325
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index e29f4c5eea1..af1fc188256 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5400,7 +5400,15 @@ void Spell::EffectActivateSpec(SpellEffIndex /*effIndex*/)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
- unitTarget->ToPlayer()->ActivateTalentGroup(sChrSpecializationStore.AssertEntry(m_misc.SpecializationId));
+ Player* player = unitTarget->ToPlayer();
+ uint32 specID = m_misc.SpecializationId;
+ ChrSpecializationEntry const* spec = sChrSpecializationStore.AssertEntry(specID);
+
+ // Safety checks done in Spell::CheckCast
+ if (!spec->IsPetSpecialization())
+ player->ActivateTalentGroup(spec);
+ else
+ player->GetPet()->SetSpecialization(specID);
}
void Spell::EffectPlaySound(SpellEffIndex /*effIndex*/)