From 0cf5cca4159c4a73265c7260afac7051bd843a4a Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 22 Mar 2015 23:18:08 -0700 Subject: [PATCH] Other half of bazaar exploit --- zone/trading.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zone/trading.cpp b/zone/trading.cpp index a521e63cc..b6c869b61 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -1652,7 +1652,12 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs, Client* Trader, const EQApplic outtbs->Price = TotalCost; } - this->TakeMoneyFromPP(TotalCost); + if(!TakeMoneyFromPP(TotalCost)) { + database.SetHackerFlag(account_name, name, "Attempted to buy something in bazaar but did not have enough money."); + TradeRequestFailed(app); + safe_delete(outapp); + return; + } Log.Out(Logs::Detail, Logs::Trading, "Customer Paid: %d in Copper", TotalCost);