Fix exploit in BuyItemFromVendor
--HG-- branch : trunk
This commit is contained in:
@@ -17145,6 +17145,15 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||||||
SendBuyError( BUY_ERR_CANT_FIND_ITEM, NULL, item, 0);
|
SendBuyError( BUY_ERR_CANT_FIND_ITEM, NULL, item, 0);
|
||||||
return false;
|
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);
|
Creature *pCreature = ObjectAccessor::GetNPCIfCanInteractWith(*this, vendorguid,UNIT_NPC_FLAG_VENDOR);
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
|
|||||||
Reference in New Issue
Block a user