aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/LootHandler.cpp
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2015-08-08 18:10:02 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2015-08-08 18:10:02 +0200
commitd8b36dfc173fb66248cf86d1723ee7343c3cfc9f (patch)
tree475f221d4b5f7471e7c5be5053cf4ad5215348d2 /src/server/game/Handlers/LootHandler.cpp
parent910944036737ab0fa1852ddb95c8cf8427097760 (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.cpp14
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);
+}