aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
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*/)