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