mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 17:38:26 +00:00
Renamed DoLog to Out as the aggregate logging function for simplicity of use and shortened syntax of Log.Out
This commit is contained in:
+23
-23
@@ -445,7 +445,7 @@ void Client::HandleAAAction(aaID activate) {
|
||||
break;
|
||||
|
||||
default:
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown AA nonspell action type %d", caa->action);
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown AA nonspell action type %d", caa->action);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
PetRecord record;
|
||||
if(!database.GetPetEntry(spells[spell_id].teleport_zone, &record))
|
||||
{
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id);
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id);
|
||||
Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
|
||||
return;
|
||||
}
|
||||
@@ -528,7 +528,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
const NPCType *npc_type = database.GetNPCType(pet.npc_id);
|
||||
if(npc_type == nullptr) {
|
||||
//log write
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet spell id: %d", spell_id);
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet spell id: %d", spell_id);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
}
|
||||
@@ -625,7 +625,7 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
|
||||
const NPCType *npc_type = database.GetNPCType(typesid);
|
||||
if(npc_type == nullptr) {
|
||||
//log write
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet type id: %d", typesid);
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet type id: %d", typesid);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
}
|
||||
@@ -951,7 +951,7 @@ void Client::SendAAStats() {
|
||||
|
||||
void Client::BuyAA(AA_Action* action)
|
||||
{
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Starting to buy AA %d", action->ability);
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Starting to buy AA %d", action->ability);
|
||||
|
||||
//find the AA information from the database
|
||||
SendAA_Struct* aa2 = zone->FindAA(action->ability);
|
||||
@@ -963,7 +963,7 @@ void Client::BuyAA(AA_Action* action)
|
||||
a = action->ability - i;
|
||||
if(a <= 0)
|
||||
break;
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Could not find AA %d, trying potential parent %d", action->ability, a);
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Could not find AA %d, trying potential parent %d", action->ability, a);
|
||||
aa2 = zone->FindAA(a);
|
||||
if(aa2 != nullptr)
|
||||
break;
|
||||
@@ -980,7 +980,7 @@ void Client::BuyAA(AA_Action* action)
|
||||
|
||||
uint32 cur_level = GetAA(aa2->id);
|
||||
if((aa2->id + cur_level) != action->ability) { //got invalid AA
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Unable to find or match AA %d (found %d + lvl %d)", action->ability, aa2->id, cur_level);
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Unable to find or match AA %d (found %d + lvl %d)", action->ability, aa2->id, cur_level);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1011,7 +1011,7 @@ void Client::BuyAA(AA_Action* action)
|
||||
if (m_pp.aapoints >= real_cost && cur_level < aa2->max_level) {
|
||||
SetAA(aa2->id, cur_level + 1);
|
||||
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Set AA %d to level %d", aa2->id, cur_level + 1);
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Set AA %d to level %d", aa2->id, cur_level + 1);
|
||||
|
||||
m_pp.aapoints -= real_cost;
|
||||
|
||||
@@ -1429,10 +1429,10 @@ SendAA_Struct* Zone::FindAA(uint32 id) {
|
||||
}
|
||||
|
||||
void Zone::LoadAAs() {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA information...");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA information...");
|
||||
totalAAs = database.CountAAs();
|
||||
if(totalAAs == 0) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AAs!");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AAs!");
|
||||
aas = nullptr;
|
||||
return;
|
||||
}
|
||||
@@ -1447,11 +1447,11 @@ void Zone::LoadAAs() {
|
||||
}
|
||||
|
||||
//load AA Effects into aa_effects
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA Effects...");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA Effects...");
|
||||
if (database.LoadAAEffects2())
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loaded %d AA Effects.", aa_effects.size());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Status, "Loaded %d AA Effects.", aa_effects.size());
|
||||
else
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AA Effects!");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AA Effects!");
|
||||
}
|
||||
|
||||
bool ZoneDatabase::LoadAAEffects2() {
|
||||
@@ -1460,12 +1460,12 @@ bool ZoneDatabase::LoadAAEffects2() {
|
||||
const std::string query = "SELECT aaid, slot, effectid, base1, base2 FROM aa_effects ORDER BY aaid ASC, slot ASC";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!results.RowCount()) { //no results
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading AA Effects, none found in the database.");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading AA Effects, none found in the database.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1802,7 +1802,7 @@ bool ZoneDatabase::LoadAAEffects() {
|
||||
"redux_aa, redux_rate, redux_aa2, redux_rate2 FROM aa_actions";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadAAEffects query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadAAEffects query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1841,7 +1841,7 @@ uint8 ZoneDatabase::GetTotalAALevels(uint32 skill_id) {
|
||||
std::string query = StringFormat("SELECT count(slot) FROM aa_effects WHERE aaid = %i", skill_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTotalAALevels '%s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTotalAALevels '%s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1895,7 +1895,7 @@ uint32 ZoneDatabase::CountAAs(){
|
||||
const std::string query = "SELECT count(title_sid) FROM altadv_vars";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1912,7 +1912,7 @@ uint32 ZoneDatabase::CountAAEffects() {
|
||||
const std::string query = "SELECT count(id) FROM aa_effects";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAALevels query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAALevels query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1945,14 +1945,14 @@ void ZoneDatabase::LoadAAs(SendAA_Struct **load){
|
||||
load[index]->seq = index+1;
|
||||
}
|
||||
} else {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
AARequiredLevelAndCost.clear();
|
||||
query = "SELECT skill_id, level, cost from aa_required_level_cost order by skill_id";
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1970,7 +1970,7 @@ SendAA_Struct* ZoneDatabase::GetAASkillVars(uint32 skill_id)
|
||||
std::string query = "SET @row = 0"; //initialize "row" variable in database for next query
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1990,7 +1990,7 @@ SendAA_Struct* ZoneDatabase::GetAASkillVars(uint32 skill_id)
|
||||
"FROM altadv_vars a WHERE skill_id=%i", skill_id);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user