Core/Group: Add sanity checks to CMSG_LOOT_METHOD's handler

If lootMethod or lootThreshold is invalid, portrait menus become unusable to the entire raid.
This commit is contained in:
Dehravor
2014-02-09 10:51:11 +01:00
parent aaa4b3a124
commit 916d84bdca

View File

@@ -425,6 +425,12 @@ void WorldSession::HandleLootMethodOpcode(WorldPacket& recvData)
/** error handling **/
if (!group->IsLeader(GetPlayer()->GetGUID()))
return;
if (lootMethod > NEED_BEFORE_GREED)
return;
if (lootThreshold < ITEM_QUALITY_UNCOMMON || lootThreshold > ITEM_QUALITY_ARTIFACT)
return;
/********************/
// everything's fine, do it