diff options
| author | DoctorKraft <DoctorKraft@users.noreply.github.com> | 2017-03-21 17:36:44 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-03-21 17:36:44 +0100 |
| commit | 76dd3ae36849bc44cb77cad497575be446172d53 (patch) | |
| tree | 2a2ff8949fbea14d46000d2de2c31da3acd92372 /src/server/game/Spells/SpellEffects.cpp | |
| parent | 481825bd6d3139799cde79e14718d75ec603d728 (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.cpp | 10 |
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*/) |
