aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 525e1448ce8..54e35a28466 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17145,6 +17145,15 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
SendBuyError( BUY_ERR_CANT_FIND_ITEM, NULL, item, 0);
return false;
}
+ else
+ {
+ if(slot > pProto->ContainerSlots)
+ {
+ sLog.outDebug("CHEATING ATTEMPT slot > pProto->ContainerSlots in BuyItemFromVendor playerGUID: "I64FMT" name: %s slot: %u", GetGUID(), GetName(), slot);
+ return false;
+ }
+ }
+
Creature *pCreature = ObjectAccessor::GetNPCIfCanInteractWith(*this, vendorguid,UNIT_NPC_FLAG_VENDOR);
if (!pCreature)