mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Replaced Status log calls
This commit is contained in:
parent
b76e179d75
commit
fdbd76e4ad
@ -1429,7 +1429,7 @@ SendAA_Struct* Zone::FindAA(uint32 id) {
|
||||
}
|
||||
|
||||
void Zone::LoadAAs() {
|
||||
LogFile->write(EQEmuLog::Status, "Loading AA information...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading AA information...");
|
||||
totalAAs = database.CountAAs();
|
||||
if(totalAAs == 0) {
|
||||
logger.Log(EQEmuLogSys::Error, "Failed to load AAs!");
|
||||
@ -1447,9 +1447,9 @@ void Zone::LoadAAs() {
|
||||
}
|
||||
|
||||
//load AA Effects into aa_effects
|
||||
LogFile->write(EQEmuLog::Status, "Loading AA Effects...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading AA Effects...");
|
||||
if (database.LoadAAEffects2())
|
||||
LogFile->write(EQEmuLog::Status, "Loaded %d AA Effects.", aa_effects.size());
|
||||
logger.Log(EQEmuLogSys::Status, "Loaded %d AA Effects.", aa_effects.size());
|
||||
else
|
||||
logger.Log(EQEmuLogSys::Error, "Failed to load AA Effects!");
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ void PerlembParser::ReloadQuests() {
|
||||
perl = nullptr;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Error re-initializing perlembed: %s", e.what());
|
||||
logger.Log(EQEmuLogSys::Status, "Error re-initializing perlembed: %s", e.what());
|
||||
throw e.what();
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ PathManager* PathManager::LoadPathFile(const char* ZoneName)
|
||||
|
||||
if(Ret->loadPaths(PathFile))
|
||||
{
|
||||
LogFile->write(EQEmuLog::Status, "Path File %s loaded.", ZonePathFileName);
|
||||
logger.Log(EQEmuLogSys::Status, "Path File %s loaded.", ZonePathFileName);
|
||||
|
||||
}
|
||||
else
|
||||
@ -109,7 +109,7 @@ bool PathManager::loadPaths(FILE *PathFile)
|
||||
|
||||
fread(&Head, sizeof(Head), 1, PathFile);
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Path File Header: Version %ld, PathNodes %ld",
|
||||
logger.Log(EQEmuLogSys::Status, "Path File Header: Version %ld, PathNodes %ld",
|
||||
(long)Head.version, (long)Head.PathNodeCount);
|
||||
|
||||
if(Head.version != 2)
|
||||
|
||||
@ -90,7 +90,7 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Booting %s (%d:%d)", zonename, iZoneID, iInstanceID);
|
||||
logger.Log(EQEmuLogSys::Status, "Booting %s (%d:%d)", zonename, iZoneID, iInstanceID);
|
||||
|
||||
numclients = 0;
|
||||
zone = new Zone(iZoneID, iInstanceID, zonename);
|
||||
@ -117,13 +117,13 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
log_levels[i]=0; //set to zero on a bogue char
|
||||
}
|
||||
zone->loglevelvar = log_levels[0];
|
||||
LogFile->write(EQEmuLog::Status, "General logging level: %i", zone->loglevelvar);
|
||||
logger.Log(EQEmuLogSys::Status, "General logging level: %i", zone->loglevelvar);
|
||||
zone->merchantvar = log_levels[1];
|
||||
LogFile->write(EQEmuLog::Status, "Merchant logging level: %i", zone->merchantvar);
|
||||
logger.Log(EQEmuLogSys::Status, "Merchant logging level: %i", zone->merchantvar);
|
||||
zone->tradevar = log_levels[2];
|
||||
LogFile->write(EQEmuLog::Status, "Trade logging level: %i", zone->tradevar);
|
||||
logger.Log(EQEmuLogSys::Status, "Trade logging level: %i", zone->tradevar);
|
||||
zone->lootvar = log_levels[3];
|
||||
LogFile->write(EQEmuLog::Status, "Loot logging level: %i", zone->lootvar);
|
||||
logger.Log(EQEmuLogSys::Status, "Loot logging level: %i", zone->lootvar);
|
||||
}
|
||||
else {
|
||||
zone->loglevelvar = uint8(atoi(tmp)); //continue supporting only command logging (for now)
|
||||
@ -145,7 +145,7 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Normal, "---- Zone server %s, listening on port:%i ----", zonename, ZoneConfig::get()->ZonePort);
|
||||
LogFile->write(EQEmuLog::Status, "Zone Bootup: %s (%i: %i)", zonename, iZoneID, iInstanceID);
|
||||
logger.Log(EQEmuLogSys::Status, "Zone Bootup: %s (%i: %i)", zonename, iZoneID, iInstanceID);
|
||||
parse->Init();
|
||||
UpdateWindowTitle();
|
||||
zone->GetTimeSync();
|
||||
@ -171,7 +171,7 @@ bool Zone::LoadZoneObjects() {
|
||||
return false;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading Objects from DB...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading Objects from DB...");
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
if (atoi(row[9]) == 0)
|
||||
{
|
||||
@ -288,7 +288,7 @@ bool Zone::LoadGroundSpawns() {
|
||||
|
||||
memset(&groundspawn, 0, sizeof(groundspawn));
|
||||
int gsindex=0;
|
||||
LogFile->write(EQEmuLog::Status, "Loading Ground Spawns from DB...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading Ground Spawns from DB...");
|
||||
database.LoadGroundSpawns(zoneid, GetInstanceVersion(), &groundspawn);
|
||||
uint32 ix=0;
|
||||
char* name=0;
|
||||
@ -402,7 +402,7 @@ uint32 Zone::GetTempMerchantQuantity(uint32 NPCID, uint32 Slot) {
|
||||
}
|
||||
|
||||
void Zone::LoadTempMerchantData() {
|
||||
LogFile->write(EQEmuLog::Status, "Loading Temporary Merchant Lists...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading Temporary Merchant Lists...");
|
||||
std::string query = StringFormat(
|
||||
"SELECT "
|
||||
"DISTINCT ml.npcid, "
|
||||
@ -474,7 +474,7 @@ void Zone::LoadNewMerchantData(uint32 merchantid) {
|
||||
}
|
||||
|
||||
void Zone::GetMerchantDataForZoneLoad() {
|
||||
LogFile->write(EQEmuLog::Status, "Loading Merchant Lists...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading Merchant Lists...");
|
||||
std::string query = StringFormat(
|
||||
"SELECT "
|
||||
"DISTINCT ml.merchantid, "
|
||||
@ -707,7 +707,7 @@ void Zone::Shutdown(bool quite)
|
||||
}
|
||||
zone->ldon_trap_entry_list.clear();
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Zone Shutdown: %s (%i)", zone->GetShortName(), zone->GetZoneID());
|
||||
logger.Log(EQEmuLogSys::Status, "Zone Shutdown: %s (%i)", zone->GetShortName(), zone->GetZoneID());
|
||||
petition_list.ClearPetitions();
|
||||
zone->GotCurTime(false);
|
||||
if (!quite)
|
||||
@ -725,12 +725,12 @@ void Zone::Shutdown(bool quite)
|
||||
|
||||
void Zone::LoadZoneDoors(const char* zone, int16 version)
|
||||
{
|
||||
LogFile->write(EQEmuLog::Status, "Loading doors for %s ...", zone);
|
||||
logger.Log(EQEmuLogSys::Status, "Loading doors for %s ...", zone);
|
||||
|
||||
uint32 maxid;
|
||||
int32 count = database.GetDoorsCount(&maxid, zone, version);
|
||||
if(count < 1) {
|
||||
LogFile->write(EQEmuLog::Status, "... No doors loaded.");
|
||||
logger.Log(EQEmuLogSys::Status, "... No doors loaded.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -899,53 +899,53 @@ Zone::~Zone() {
|
||||
bool Zone::Init(bool iStaticZone) {
|
||||
SetStaticZone(iStaticZone);
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading spawn conditions...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading spawn conditions...");
|
||||
if(!spawn_conditions.LoadSpawnConditions(short_name, instanceid)) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading spawn conditions failed, continuing without them.");
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading static zone points...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading static zone points...");
|
||||
if (!database.LoadStaticZonePoints(&zone_point_list, short_name, GetInstanceVersion())) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading static zone points failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading spawn groups...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading spawn groups...");
|
||||
if (!database.LoadSpawnGroups(short_name, GetInstanceVersion(), &spawn_group_list)) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading spawn groups failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading spawn2 points...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading spawn2 points...");
|
||||
if (!database.PopulateZoneSpawnList(zoneid, spawn2_list, GetInstanceVersion()))
|
||||
{
|
||||
logger.Log(EQEmuLogSys::Error, "Loading spawn2 points failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading player corpses...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading player corpses...");
|
||||
if (!database.LoadCharacterCorpses(zoneid, instanceid)) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading player corpses failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading traps...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading traps...");
|
||||
if (!database.LoadTraps(short_name, GetInstanceVersion()))
|
||||
{
|
||||
logger.Log(EQEmuLogSys::Error, "Loading traps failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading adventure flavor text...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading adventure flavor text...");
|
||||
LoadAdventureFlavor();
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading ground spawns...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading ground spawns...");
|
||||
if (!LoadGroundSpawns())
|
||||
{
|
||||
logger.Log(EQEmuLogSys::Error, "Loading ground spawns failed. continuing.");
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading World Objects from DB...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading World Objects from DB...");
|
||||
if (!LoadZoneObjects())
|
||||
{
|
||||
logger.Log(EQEmuLogSys::Error, "Loading World Objects failed. continuing.");
|
||||
@ -1005,10 +1005,10 @@ bool Zone::Init(bool iStaticZone) {
|
||||
}
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Loading timezone data...");
|
||||
logger.Log(EQEmuLogSys::Status, "Loading timezone data...");
|
||||
zone->zone_time.setEQTimeZone(database.GetZoneTZ(zoneid, GetInstanceVersion()));
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Init Finished: ZoneID = %d, Time Offset = %d", zoneid, zone->zone_time.getEQTimeZone());
|
||||
logger.Log(EQEmuLogSys::Status, "Init Finished: ZoneID = %d, Time Offset = %d", zoneid, zone->zone_time.getEQTimeZone());
|
||||
|
||||
LoadTickItems();
|
||||
|
||||
@ -1019,29 +1019,29 @@ bool Zone::Init(bool iStaticZone) {
|
||||
}
|
||||
|
||||
void Zone::ReloadStaticData() {
|
||||
LogFile->write(EQEmuLog::Status, "Reloading Zone Static Data...");
|
||||
logger.Log(EQEmuLogSys::Status, "Reloading Zone Static Data...");
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Reloading static zone points...");
|
||||
logger.Log(EQEmuLogSys::Status, "Reloading static zone points...");
|
||||
zone_point_list.Clear();
|
||||
if (!database.LoadStaticZonePoints(&zone_point_list, GetShortName(), GetInstanceVersion())) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading static zone points failed.");
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Reloading traps...");
|
||||
logger.Log(EQEmuLogSys::Status, "Reloading traps...");
|
||||
entity_list.RemoveAllTraps();
|
||||
if (!database.LoadTraps(GetShortName(), GetInstanceVersion()))
|
||||
{
|
||||
logger.Log(EQEmuLogSys::Error, "Reloading traps failed.");
|
||||
}
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Reloading ground spawns...");
|
||||
logger.Log(EQEmuLogSys::Status, "Reloading ground spawns...");
|
||||
if (!LoadGroundSpawns())
|
||||
{
|
||||
logger.Log(EQEmuLogSys::Error, "Reloading ground spawns failed. continuing.");
|
||||
}
|
||||
|
||||
entity_list.RemoveAllObjects();
|
||||
LogFile->write(EQEmuLog::Status, "Reloading World Objects from DB...");
|
||||
logger.Log(EQEmuLogSys::Status, "Reloading World Objects from DB...");
|
||||
if (!LoadZoneObjects())
|
||||
{
|
||||
logger.Log(EQEmuLogSys::Error, "Reloading World Objects failed. continuing.");
|
||||
@ -1060,7 +1060,7 @@ void Zone::ReloadStaticData() {
|
||||
if (!LoadZoneCFG(zone->GetShortName(), zone->GetInstanceVersion(), true)) // try loading the zone name...
|
||||
LoadZoneCFG(zone->GetFileName(), zone->GetInstanceVersion()); // if that fails, try the file name, then load defaults
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Zone Static Data Reloaded.");
|
||||
logger.Log(EQEmuLogSys::Status, "Zone Static Data Reloaded.");
|
||||
}
|
||||
|
||||
bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDefault)
|
||||
@ -1098,7 +1098,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe
|
||||
strcpy(newzone_data.zone_long_name, GetLongName());
|
||||
strcpy(newzone_data.zone_short_name2, GetShortName());
|
||||
|
||||
LogFile->write(EQEmuLog::Status, "Successfully loaded Zone Config.");
|
||||
logger.Log(EQEmuLogSys::Status, "Successfully loaded Zone Config.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1580,8 +1580,8 @@ ZonePoint* Zone::GetClosestZonePoint(float x, float y, float z, uint32 to, Clien
|
||||
{
|
||||
if(client)
|
||||
client->CheatDetected(MQZoneUnknownDest, x, y, z); // Someone is trying to use /zone
|
||||
LogFile->write(EQEmuLog::Status, "WARNING: Closest zone point for zone id %d is %f, you might need to update your zone_points table if you dont arrive at the right spot.", to, closest_dist);
|
||||
LogFile->write(EQEmuLog::Status, "<Real Zone Points>. %f x %f y %f z ", x, y, z);
|
||||
logger.Log(EQEmuLogSys::Status, "WARNING: Closest zone point for zone id %d is %f, you might need to update your zone_points table if you dont arrive at the right spot.", to, closest_dist);
|
||||
logger.Log(EQEmuLogSys::Status, "<Real Zone Points>. %f x %f y %f z ", x, y, z);
|
||||
}
|
||||
|
||||
if(closest_dist > max_distance2)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user