mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user