aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorShocker <none@none>2010-12-22 20:14:30 +0200
committerShocker <none@none>2010-12-22 20:14:30 +0200
commit42304c0b257ca8a6e5a374d8c8719fea84cb8105 (patch)
treeae42b549d0f0d2df35410e6a907792eb7ae33d36 /src/server/game/Spells/SpellEffects.cpp
parent12c970f5dc98f7de80adbf9241e5735b73b3a7a5 (diff)
Core/Spells: Implement SPELL_EFFECT_UNTRAIN_TALENTS, thanks to Heisenberg, closes issue #5238
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 03d9fb17dae..de4c91af9b4 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -137,7 +137,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectPull, // 70 SPELL_EFFECT_PULL one spell: Distract Move
&Spell::EffectPickPocket, // 71 SPELL_EFFECT_PICKPOCKET
&Spell::EffectAddFarsight, // 72 SPELL_EFFECT_ADD_FARSIGHT
- &Spell::EffectUnused, // 73 SPELL_EFFECT_UNTRAIN_TALENTS
+ &Spell::EffectUntrainTalents, // 73 SPELL_EFFECT_UNTRAIN_TALENTS
&Spell::EffectApplyGlyph, // 74 SPELL_EFFECT_APPLY_GLYPH
&Spell::EffectHealMechanical, // 75 SPELL_EFFECT_HEAL_MECHANICAL one spell: Mechanical Patch Kit
&Spell::EffectSummonObjectWild, // 76 SPELL_EFFECT_SUMMON_OBJECT_WILD
@@ -3314,6 +3314,15 @@ void Spell::EffectAddFarsight(SpellEffIndex effIndex)
//m_caster->ToPlayer()->UpdateVisibilityOf(dynObj);
}
+void Spell::EffectUntrainTalents(SpellEffIndex effIndex)
+{
+ if (!unitTarget || m_caster->GetTypeId() == TYPEID_PLAYER)
+ return;
+
+ if (uint64 guid = m_caster->GetGUID()) // the trainer is the caster
+ unitTarget->ToPlayer()->SendTalentWipeConfirm(guid);
+}
+
void Spell::EffectTeleUnitsFaceCaster(SpellEffIndex effIndex)
{
if (!unitTarget)