mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Updated and enabled CMSG_UNLEARN_SKILL, CMSG_SELF_RES
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user