mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-26 22:52:24 +00:00
UpdateBuyLine converted to QueryDatabase
This commit is contained in:
parent
a7efa9d4e4
commit
41769a3fa8
@ -778,14 +778,10 @@ void ZoneDatabase::UpdateBuyLine(uint32 CharID, uint32 BuySlot, uint32 Quantity)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
std::string query = StringFormat("UPDATE buyer SET quantity = %i WHERE charid = %i AND buyslot = %i", Quantity, CharID, BuySlot);
|
||||||
char* query = 0;
|
auto results = QueryDatabase(query);
|
||||||
|
if (!results.Success())
|
||||||
if (!(RunQuery(query,MakeAnyLenString(&query, "update buyer set quantity=%i where charid=%i and buyslot=%i",
|
_log(TRADING__CLIENT, "Failed to update quantity in buyslot %i for charid: %i, the error was: %s\n", BuySlot, CharID, results.ErrorMessage().c_str());
|
||||||
Quantity, CharID, BuySlot), errbuf)))
|
|
||||||
_log(TRADING__CLIENT, "Failed to update quantity in buyslot %i for charid: %i, the error was: %s\n", BuySlot, CharID, errbuf);
|
|
||||||
|
|
||||||
safe_delete_array(query);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user