aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-08-14 17:24:52 -0700
committermaximius <none@none>2009-08-14 17:24:52 -0700
commit2fd68eab44c1c0ea02d93ea1b5de47f0880f84ea (patch)
treef411b81aa63bcb7908746676a5461d8332aa63dd /src/game/SpellEffects.cpp
parentc7aa2f64e3593f86ddf3ee5c13eb4ea4d8c1db2d (diff)
*Add Dual Spec support, original by EnderGT, thanks to Thyros and XTElite1 for helping me test :)
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 154357c76f8..89c75e4d563 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -225,8 +225,8 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectMilling, //158 SPELL_EFFECT_MILLING milling
&Spell::EffectRenamePet, //159 SPELL_EFFECT_ALLOW_RENAME_PET allow rename pet once again
&Spell::EffectNULL, //160 SPELL_EFFECT_160 unused
- &Spell::EffectNULL, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert)
- &Spell::EffectNULL, //162 SPELL_EFFECT_TALENT_SPEC_SELECT activate primary/secondary spec
+ &Spell::EffectSpecCount, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert)
+ &Spell::EffectActivateSpec, //162 SPELL_EFFECT_TALENT_SPEC_SELECT activate primary/secondary spec
};
void Spell::EffectNULL(uint32 /*i*/)
@@ -6935,3 +6935,19 @@ void Spell::EffectPlayMusic(uint32 i)
((Player*)unitTarget)->GetSession()->SendPacket(&data);
}
+void Spell::EffectSpecCount(uint32 /*eff_idx*/)
+{
+ if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ ((Player*)unitTarget)->UpdateSpecCount(damage);
+}
+
+void Spell::EffectActivateSpec(uint32 /*eff_idx*/)
+{
+ if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ ((Player*)unitTarget)->ActivateSpec(damage-1); // damage is 1 or 2, spec is 0 or 1
+}
+