Exploit fixes

Bind Wound was spammable via packet sending. You could buy a larger
stack than the max StackSize of an item from merchants that had
unlimited of those stackable items.
This commit is contained in:
JohnsonAskot
2015-02-07 12:34:50 -05:00
parent d5047da637
commit 63810d5c1b
3 changed files with 14 additions and 4 deletions
+5
View File
@@ -12145,6 +12145,10 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
mp->quantity = prevcharges;
}
// Item's stackable, but the quantity they want to buy exceeds the max stackable quantity. -Lecht
if (item->Stackable && mp->quantity > item->StackSize)
mp->quantity = item->StackSize;
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ShopPlayerBuy, sizeof(Merchant_Sell_Struct));
Merchant_Sell_Struct* mpo = (Merchant_Sell_Struct*)outapp->pBuffer;
mpo->quantity = mp->quantity;
@@ -12171,6 +12175,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
mpo->price = SinglePrice;
else
mpo->price = SinglePrice * mp->quantity;
if (mpo->price < 0)
{
safe_delete(outapp);