mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
Fix for another bazaar problem
This commit is contained in:
parent
a569e20110
commit
b6a01871d8
@ -1626,23 +1626,10 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs, Client* Trader, const EQApplic
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnTraderReq(app, outtbs->Quantity, ItemID);
|
|
||||||
|
|
||||||
outtbs->TraderID = this->GetID();
|
|
||||||
outtbs->Action = BazaarBuyItem;
|
|
||||||
strn0cpy(outtbs->ItemName, BuyItem->GetItem()->Name, 64);
|
|
||||||
|
|
||||||
int TraderSlot = 0;
|
|
||||||
|
|
||||||
if(BuyItem->IsStackable())
|
|
||||||
SendTraderItem(BuyItem->GetItem()->ID, outtbs->Quantity);
|
|
||||||
else
|
|
||||||
SendTraderItem(BuyItem->GetItem()->ID, BuyItem->GetCharges());
|
|
||||||
|
|
||||||
// This cannot overflow assuming MAX_TRANSACTION_VALUE, checked above, is the default of 2000000000
|
// This cannot overflow assuming MAX_TRANSACTION_VALUE, checked above, is the default of 2000000000
|
||||||
uint32 TotalCost = tbs->Price * outtbs->Quantity;
|
uint32 TotalCost = tbs->Price * outtbs->Quantity;
|
||||||
|
|
||||||
if (Trader->GetClientVersion() >= ClientVersion::RoF)
|
if(Trader->GetClientVersion() >= ClientVersion::RoF)
|
||||||
{
|
{
|
||||||
// RoF+ uses individual item price where older clients use total price
|
// RoF+ uses individual item price where older clients use total price
|
||||||
outtbs->Price = tbs->Price;
|
outtbs->Price = tbs->Price;
|
||||||
@ -1673,6 +1660,19 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs, Client* Trader, const EQApplic
|
|||||||
|
|
||||||
Log.Out(Logs::Detail, Logs::Trading, "Trader Received: %d Platinum, %d Gold, %d Silver, %d Copper", platinum, gold, silver, copper);
|
Log.Out(Logs::Detail, Logs::Trading, "Trader Received: %d Platinum, %d Gold, %d Silver, %d Copper", platinum, gold, silver, copper);
|
||||||
|
|
||||||
|
ReturnTraderReq(app, outtbs->Quantity, ItemID);
|
||||||
|
|
||||||
|
outtbs->TraderID = this->GetID();
|
||||||
|
outtbs->Action = BazaarBuyItem;
|
||||||
|
strn0cpy(outtbs->ItemName, BuyItem->GetItem()->Name, 64);
|
||||||
|
|
||||||
|
int TraderSlot = 0;
|
||||||
|
|
||||||
|
if(BuyItem->IsStackable())
|
||||||
|
SendTraderItem(BuyItem->GetItem()->ID, outtbs->Quantity);
|
||||||
|
else
|
||||||
|
SendTraderItem(BuyItem->GetItem()->ID, BuyItem->GetCharges());
|
||||||
|
|
||||||
TraderSlot = Trader->FindTraderItem(tbs->ItemID, outtbs->Quantity);
|
TraderSlot = Trader->FindTraderItem(tbs->ItemID, outtbs->Quantity);
|
||||||
|
|
||||||
if(RuleB(Bazaar, AuditTrail))
|
if(RuleB(Bazaar, AuditTrail))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user