mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
DeletePetBuffs converted to QueryDatabase
This commit is contained in:
parent
54b2c50109
commit
510a51e564
14
zone/bot.cpp
14
zone/bot.cpp
@ -2760,18 +2760,12 @@ void Bot::SavePetItems(uint32* petItems, uint32 botPetSaveId) {
|
||||
}
|
||||
|
||||
void Bot::DeletePetBuffs(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 botpetbuffs WHERE BotPetsId = %u;", botPetSaveId), TempErrorMessageBuffer)) {
|
||||
errorMessage = std::string(TempErrorMessageBuffer);
|
||||
}
|
||||
std::string query = StringFormat("DELETE FROM botpetbuffs WHERE BotPetsId = %u;", botPetSaveId);
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
safe_delete(Query);
|
||||
Query = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Bot::DeletePetItems(uint32 botPetSaveId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user