mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 16:46:37 +00:00
[Performance] Reworked how all log calls are made in the source, see changelog.txt for more details
This commit is contained in:
+11
-11
@@ -103,7 +103,7 @@ void Raid::AddMember(Client *c, uint32 group, bool rleader, bool groupleader, bo
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
if(!results.Success()) {
|
||||
Log.Out(Logs::General, Logs::Error, "Error inserting into raid members: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Error inserting into raid members: %s", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
LearnMembers();
|
||||
@@ -259,12 +259,12 @@ void Raid::SetRaidLeader(const char *wasLead, const char *name)
|
||||
std::string query = StringFormat("UPDATE raid_members SET israidleader = 0 WHERE name = '%s'", wasLead);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.Out(Logs::General, Logs::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
query = StringFormat("UPDATE raid_members SET israidleader = 1 WHERE name = '%s'", name);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.Out(Logs::General, Logs::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
strn0cpy(leadername, name, 64);
|
||||
|
||||
@@ -297,7 +297,7 @@ void Raid::SaveGroupLeaderAA(uint32 gid)
|
||||
safe_delete_array(queryBuffer);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.Out(Logs::General, Logs::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Raid::SaveRaidLeaderAA()
|
||||
@@ -311,7 +311,7 @@ void Raid::SaveRaidLeaderAA()
|
||||
safe_delete_array(queryBuffer);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.Out(Logs::General, Logs::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Raid::UpdateGroupAAs(uint32 gid)
|
||||
@@ -524,7 +524,7 @@ void Raid::CastGroupSpell(Mob* caster, uint16 spellid, uint32 gid)
|
||||
#endif
|
||||
}
|
||||
else{
|
||||
Log.Out(Logs::Detail, Logs::Spells, "Raid spell: %s is out of range %f at distance %f from %s", members[x].member->GetName(), range, distance, caster->GetName());
|
||||
Log(Logs::Detail, Logs::Spells, "Raid spell: %s is out of range %f at distance %f from %s", members[x].member->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -825,7 +825,7 @@ void Raid::GroupBardPulse(Mob* caster, uint16 spellid, uint32 gid){
|
||||
members[z].member->GetPet()->BardPulse(spellid, caster);
|
||||
#endif
|
||||
} else
|
||||
Log.Out(Logs::Detail, Logs::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z].member->GetName(), range, distance, caster->GetName());
|
||||
Log(Logs::Detail, Logs::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z].member->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1433,7 +1433,7 @@ void Raid::GetRaidDetails()
|
||||
return;
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
Log.Out(Logs::General, Logs::Error, "Error getting raid details for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Error getting raid details for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1465,7 +1465,7 @@ bool Raid::LearnMembers()
|
||||
return false;
|
||||
|
||||
if(results.RowCount() == 0) {
|
||||
Log.Out(Logs::General, Logs::Error, "Error getting raid members for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Error getting raid members for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
disbandCheck = true;
|
||||
return false;
|
||||
}
|
||||
@@ -1671,7 +1671,7 @@ void Raid::SetGroupMentor(uint32 group_id, int percent, char *name)
|
||||
name, percent, group_id, GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.Out(Logs::General, Logs::Error, "Unable to set raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Unable to set raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Raid::ClearGroupMentor(uint32 group_id)
|
||||
@@ -1686,7 +1686,7 @@ void Raid::ClearGroupMentor(uint32 group_id)
|
||||
group_id, GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.Out(Logs::General, Logs::Error, "Unable to clear raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "Unable to clear raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
// there isn't a nice place to add this in another function, unlike groups
|
||||
|
||||
Reference in New Issue
Block a user