mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
More cleanup of some QueryDatabase references that no longer need auto results
This commit is contained in:
parent
f20ff5c6e3
commit
5ab131dcd6
@ -508,8 +508,6 @@ void Database::ExpireMail() {
|
|||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
if(results.Success())
|
if(results.Success())
|
||||||
Log.Out(Logs::Detail, Logs::UCS_Server, "Expired %i trash messages.", results.RowsAffected());
|
Log.Out(Logs::Detail, Logs::UCS_Server, "Expired %i trash messages.", results.RowsAffected());
|
||||||
else
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expire Read
|
// Expire Read
|
||||||
@ -519,7 +517,6 @@ void Database::ExpireMail() {
|
|||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
if(results.Success())
|
if(results.Success())
|
||||||
Log.Out(Logs::Detail, Logs::UCS_Server, "Expired %i read messages.", results.RowsAffected());
|
Log.Out(Logs::Detail, Logs::UCS_Server, "Expired %i read messages.", results.RowsAffected());
|
||||||
else
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expire Unread
|
// Expire Unread
|
||||||
@ -529,7 +526,6 @@ void Database::ExpireMail() {
|
|||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
if(results.Success())
|
if(results.Success())
|
||||||
Log.Out(Logs::Detail, Logs::UCS_Server, "Expired %i unread messages.", results.RowsAffected());
|
Log.Out(Logs::Detail, Logs::UCS_Server, "Expired %i unread messages.", results.RowsAffected());
|
||||||
else
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,8 +535,7 @@ void Database::AddFriendOrIgnore(int charID, int type, std::string name) {
|
|||||||
"VALUES('%i', %i, '%s')",
|
"VALUES('%i', %i, '%s')",
|
||||||
charID, type, CapitaliseName(name).c_str());
|
charID, type, CapitaliseName(name).c_str());
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if(!results.Success())
|
if(results.Success())
|
||||||
else
|
|
||||||
Log.Out(Logs::Detail, Logs::UCS_Server, "Wrote Friend/Ignore entry for charid %i, type %i, name %s to database.", charID, type, name.c_str());
|
Log.Out(Logs::Detail, Logs::UCS_Server, "Wrote Friend/Ignore entry for charid %i, type %i, name %s to database.", charID, type, name.c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -402,8 +402,7 @@ void Adventure::MoveCorpsesToGraveyard()
|
|||||||
"x = %f, y = %f, z = %f WHERE instanceid = %d",
|
"x = %f, y = %f, z = %f WHERE instanceid = %d",
|
||||||
GetTemplate()->graveyard_zone_id,
|
GetTemplate()->graveyard_zone_id,
|
||||||
x, y, z, GetInstanceID());
|
x, y, z, GetInstanceID());
|
||||||
auto results = database.QueryDatabase(query);
|
database.QueryDatabase(query);
|
||||||
if(!results.Success())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto c_iter = charid_list.begin();
|
auto c_iter = charid_list.begin();
|
||||||
|
|||||||
@ -212,8 +212,6 @@ void ZoneDatabase::DeletePetitionFromDB(Petition* wpet) {
|
|||||||
|
|
||||||
std::string query = StringFormat("DELETE FROM petitions WHERE petid = %i", wpet->GetID());
|
std::string query = StringFormat("DELETE FROM petitions WHERE petid = %i", wpet->GetID());
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneDatabase::UpdatePetitionToDB(Petition* wpet) {
|
void ZoneDatabase::UpdatePetitionToDB(Petition* wpet) {
|
||||||
|
|||||||
@ -668,9 +668,7 @@ void SpawnConditionManager::UpdateDBEvent(SpawnEvent &event) {
|
|||||||
event.next.day, event.next.month,
|
event.next.day, event.next.month,
|
||||||
event.next.year, event.enabled? 1: 0,
|
event.next.year, event.enabled? 1: 0,
|
||||||
event.strict? 1: 0, event.id);
|
event.strict? 1: 0, event.id);
|
||||||
auto results = database.QueryDatabase(query);
|
database.QueryDatabase(query);
|
||||||
if(!results.Success())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnConditionManager::UpdateDBCondition(const char* zone_name, uint32 instance_id, uint16 cond_id, int16 value) {
|
void SpawnConditionManager::UpdateDBCondition(const char* zone_name, uint32 instance_id, uint16 cond_id, int16 value) {
|
||||||
@ -679,9 +677,7 @@ void SpawnConditionManager::UpdateDBCondition(const char* zone_name, uint32 inst
|
|||||||
"(id, value, zone, instance_id) "
|
"(id, value, zone, instance_id) "
|
||||||
"VALUES( %u, %u, '%s', %u)",
|
"VALUES( %u, %u, '%s', %u)",
|
||||||
cond_id, value, zone_name, instance_id);
|
cond_id, value, zone_name, instance_id);
|
||||||
auto results = database.QueryDatabase(query);
|
database.QueryDatabase(query);
|
||||||
if(!results.Success())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpawnConditionManager::LoadDBEvent(uint32 event_id, SpawnEvent &event, std::string &zone_name) {
|
bool SpawnConditionManager::LoadDBEvent(uint32 event_id, SpawnEvent &event, std::string &zone_name) {
|
||||||
|
|||||||
@ -723,9 +723,7 @@ void ClientTaskState::EnableTask(int characterID, int taskCount, int *tasks) {
|
|||||||
|
|
||||||
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())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientTaskState::DisableTask(int charID, int taskCount, int *taskList) {
|
void ClientTaskState::DisableTask(int charID, int taskCount, int *taskList) {
|
||||||
|
|||||||
@ -1457,8 +1457,7 @@ void ZoneDatabase::UpdateRecipeMadecount(uint32 recipe_id, uint32 char_id, uint3
|
|||||||
"SET recipe_id = %u, char_id = %u, madecount = %u "
|
"SET recipe_id = %u, char_id = %u, madecount = %u "
|
||||||
"ON DUPLICATE KEY UPDATE madecount = %u;",
|
"ON DUPLICATE KEY UPDATE madecount = %u;",
|
||||||
recipe_id, char_id, madeCount, madeCount);
|
recipe_id, char_id, madeCount, madeCount);
|
||||||
auto results = QueryDatabase(query);
|
QueryDatabase(query);
|
||||||
if (!results.Success())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::LearnRecipe(uint32 recipeID)
|
void Client::LearnRecipe(uint32 recipeID)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user