diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2015-08-08 18:10:02 +0200 | 
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2015-08-08 18:10:02 +0200 | 
| commit | d8b36dfc173fb66248cf86d1723ee7343c3cfc9f (patch) | |
| tree | 475f221d4b5f7471e7c5be5053cf4ad5215348d2 /src/server/game/Handlers/LootHandler.cpp | |
| parent | 910944036737ab0fa1852ddb95c8cf8427097760 (diff) | |
Core/PacketIO: Added and enabled CMSG_SET_LOOT_SPECIALIZATION opcode
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/LootHandler.cpp | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index fe6cb4674bc..34649e80e1c 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -482,3 +482,17 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)      loot->NotifyItemRemoved(slotid);      --loot->unlootedCount;  } + +void WorldSession::HandleSetLootSpecialization(WorldPackets::Loot::SetLootSpecialization& packet) +{ +    if (packet.SpecID) +    { +        if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(packet.SpecID)) +        { +            if (chrSpec->ClassID == GetPlayer()->getClass()) +                GetPlayer()->SetLootSpecId(packet.SpecID); +        } +    } +    else +        GetPlayer()->SetLootSpecId(packet.SpecID); +}  | 
