Core/PacketIO: Updated and enabled CMSG_UNLEARN_SKILL, CMSG_SELF_RES

This commit is contained in:
DJScias
2015-04-23 20:18:48 +02:00
parent 149ff8da87
commit 291259ac0c
6 changed files with 34 additions and 11 deletions

View File

@@ -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)