mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Skills: Check if a skill can be unlearned with SkillRaceClassInfo.dbc data and use max skill level from SkillTiers.dbc
This commit is contained in:
@@ -98,7 +98,8 @@ void WorldSession::HandleUnlearnSkillOpcode(WorldPacket& recvData)
|
||||
uint32 skillId;
|
||||
recvData >> skillId;
|
||||
|
||||
if (!IsPrimaryProfessionSkill(skillId))
|
||||
SkillRaceClassInfoEntry const* rcEntry = GetSkillRaceClassInfo(skillId, GetPlayer()->getRace(), GetPlayer()->getClass());
|
||||
if (!rcEntry || !(rcEntry->Flags & SKILL_FLAG_UNLEARNABLE))
|
||||
return;
|
||||
|
||||
GetPlayer()->SetSkill(skillId, 0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user