aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/SkillHandler.cpp
diff options
context:
space:
mode:
authorDJScias <djscias@gmail.com>2015-04-23 20:18:48 +0200
committerDJScias <djscias@gmail.com>2015-04-23 21:34:55 +0200
commit291259ac0c2ea50b0faa72efd141a8b31405fdab (patch)
treecee85f3b0b7e65dac02695ebd96302726b32ca10 /src/server/game/Handlers/SkillHandler.cpp
parent149ff8da879a8286a01081d4ffb1f200a67ddefd (diff)
Core/PacketIO: Updated and enabled CMSG_UNLEARN_SKILL, CMSG_SELF_RES
Diffstat (limited to 'src/server/game/Handlers/SkillHandler.cpp')
-rw-r--r--src/server/game/Handlers/SkillHandler.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index a83ce9f996d..870fdea69ac 100644
--- a/src/server/game/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
@@ -27,6 +27,7 @@
#include "WorldPacket.h"
#include "WorldSession.h"
#include "TalentPackets.h"
+#include "SpellPackets.h"
void WorldSession::HandleLearnTalentsOpcode(WorldPackets::Talent::LearnTalents& packet)
{
@@ -69,16 +70,13 @@ void WorldSession::HandleConfirmRespecWipeOpcode(WorldPacket& recvData)
unit->CastSpell(_player, 14867, true); //spell: "Untalent Visual Effect"
}
-void WorldSession::HandleUnlearnSkillOpcode(WorldPacket& recvData)
+void WorldSession::HandleUnlearnSkillOpcode(WorldPackets::Spells::UnlearnSkill& packet)
{
- uint32 skillId;
- recvData >> skillId;
-
- SkillRaceClassInfoEntry const* rcEntry = GetSkillRaceClassInfo(skillId, GetPlayer()->getRace(), GetPlayer()->getClass());
+ SkillRaceClassInfoEntry const* rcEntry = GetSkillRaceClassInfo(packet.SkillLine, GetPlayer()->getRace(), GetPlayer()->getClass());
if (!rcEntry || !(rcEntry->Flags & SKILL_FLAG_UNLEARNABLE))
return;
- GetPlayer()->SetSkill(skillId, 0, 0, 0);
+ GetPlayer()->SetSkill(packet.SkillLine, 0, 0, 0);
}
void WorldSession::HandleSetSpecializationOpcode(WorldPackets::Talent::SetSpecialization& packet)