mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
More cleanup of some QueryDatabase references that no longer need auto results
This commit is contained in:
parent
5ab131dcd6
commit
99baba4762
@ -223,8 +223,6 @@ void ZoneDatabase::UpdatePetitionToDB(Petition* wpet) {
|
|||||||
wpet->GetCheckouts(), wpet->GetUnavails(),
|
wpet->GetCheckouts(), wpet->GetUnavails(),
|
||||||
wpet->CheckedOut() ? 1: 0, wpet->GetID());
|
wpet->CheckedOut() ? 1: 0, wpet->GetID());
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneDatabase::InsertPetitionToDB(Petition* wpet)
|
void ZoneDatabase::InsertPetitionToDB(Petition* wpet)
|
||||||
|
|||||||
@ -669,8 +669,7 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) {
|
|||||||
|
|
||||||
query = StringFormat("SELECT slot, item_id FROM pets_equipmentset_entries WHERE set_id='%s'", curset);
|
query = StringFormat("SELECT slot, item_id FROM pets_equipmentset_entries WHERE set_id='%s'", curset);
|
||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
if (!results.Success())
|
if (results.Success()){
|
||||||
else {
|
|
||||||
for (row = results.begin(); row != results.end(); ++row)
|
for (row = results.begin(); row != results.end(); ++row)
|
||||||
{
|
{
|
||||||
slot = atoi(row[0]);
|
slot = atoi(row[0]);
|
||||||
|
|||||||
@ -769,8 +769,7 @@ void ClientTaskState::DisableTask(int charID, int taskCount, int *taskList) {
|
|||||||
queryStream << ")";
|
queryStream << ")";
|
||||||
std::string query = queryStream.str();
|
std::string query = queryStream.str();
|
||||||
Log.Out(Logs::General, Logs::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
Log.Out(Logs::General, Logs::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||||
auto results = database.QueryDatabase(query);
|
database.QueryDatabase(query);
|
||||||
if(!results.Success())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClientTaskState::IsTaskEnabled(int TaskID) {
|
bool ClientTaskState::IsTaskEnabled(int TaskID) {
|
||||||
|
|||||||
@ -1494,8 +1494,6 @@ void Client::LearnRecipe(uint32 recipeID)
|
|||||||
"ON DUPLICATE KEY UPDATE madecount = madecount;",
|
"ON DUPLICATE KEY UPDATE madecount = madecount;",
|
||||||
recipeID, CharacterID());
|
recipeID, CharacterID());
|
||||||
results = database.QueryDatabase(query);
|
results = database.QueryDatabase(query);
|
||||||
if (!results.Success())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Client::CanIncreaseTradeskill(SkillUseTypes tradeskill) {
|
bool Client::CanIncreaseTradeskill(SkillUseTypes tradeskill) {
|
||||||
|
|||||||
@ -1476,9 +1476,7 @@ static void BazaarAuditTrail(const char *seller, const char *buyer, const char *
|
|||||||
"(`time`, `seller`, `buyer`, `itemname`, `quantity`, `totalcost`, `trantype`) "
|
"(`time`, `seller`, `buyer`, `itemname`, `quantity`, `totalcost`, `trantype`) "
|
||||||
"VALUES (NOW(), '%s', '%s', '%s', %i, %i, %i)",
|
"VALUES (NOW(), '%s', '%s', '%s', %i, %i, %i)",
|
||||||
seller, buyer, itemName, quantity, totalCost, tranType);
|
seller, buyer, itemName, quantity, totalCost, tranType);
|
||||||
auto results = database.QueryDatabase(query);
|
database.QueryDatabase(query);
|
||||||
if(!results.Success())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1165,15 +1165,9 @@ void ZoneDatabase::ModifyGrid(Client *client, bool remove, uint32 id, uint8 type
|
|||||||
|
|
||||||
std::string query = StringFormat("DELETE FROM grid where id=%i", id);
|
std::string query = StringFormat("DELETE FROM grid where id=%i", id);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success())
|
|
||||||
else if(client)
|
|
||||||
client->LogSQL(query.c_str());
|
|
||||||
|
|
||||||
query = StringFormat("DELETE FROM grid_entries WHERE zoneid = %i AND gridid = %i", zoneid, id);
|
query = StringFormat("DELETE FROM grid_entries WHERE zoneid = %i AND gridid = %i", zoneid, id);
|
||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
if(!results.Success())
|
|
||||||
else if(client)
|
|
||||||
client->LogSQL(query.c_str());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user