mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
DeletePetItems converted to QueryDatabase
This commit is contained in:
parent
510a51e564
commit
04045dfc27
14
zone/bot.cpp
14
zone/bot.cpp
@ -2769,18 +2769,12 @@ void Bot::DeletePetBuffs(uint32 botPetSaveId) {
|
||||
}
|
||||
|
||||
void Bot::DeletePetItems(uint32 botPetSaveId) {
|
||||
if(botPetSaveId > 0) {
|
||||
std::string errorMessage;
|
||||
char* Query = 0;
|
||||
char TempErrorMessageBuffer[MYSQL_ERRMSG_SIZE];
|
||||
if(botPetSaveId == 0)
|
||||
return;
|
||||
|
||||
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "DELETE FROM botpetinventory WHERE BotPetsId = %u;", botPetSaveId), TempErrorMessageBuffer)) {
|
||||
errorMessage = std::string(TempErrorMessageBuffer);
|
||||
}
|
||||
std::string query = StringFormat("DELETE FROM botpetinventory WHERE BotPetsId = %u;", botPetSaveId);
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
safe_delete(Query);
|
||||
Query = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Bot::DeletePetStats(uint32 botPetSaveId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user