mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Moved all EQEmuLogSys:: enum references used in Log.Out to a namespace 'Logs' for shortening of syntax
This commit is contained in:
+23
-23
@@ -44,12 +44,12 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
zoning = true;
|
||||
if (app->size != sizeof(ZoneChange_Struct)) {
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::None, "Wrong size: OP_ZoneChange, size=%d, expected %d", app->size, sizeof(ZoneChange_Struct));
|
||||
Log.Out(Logs::General, Logs::None, "Wrong size: OP_ZoneChange, size=%d, expected %d", app->size, sizeof(ZoneChange_Struct));
|
||||
return;
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 5
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::None, "Zone request from %s", GetName());
|
||||
Log.Out(Logs::General, Logs::None, "Zone request from %s", GetName());
|
||||
DumpPacket(app);
|
||||
#endif
|
||||
ZoneChange_Struct* zc=(ZoneChange_Struct*)app->pBuffer;
|
||||
@@ -97,7 +97,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
CheatDetected(MQZone, zc->x, zc->y, zc->z);
|
||||
Message(13, "Invalid unsolicited zone request.");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
Log.Out(Logs::General, Logs::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
//if we didnt get a zone point, or its to a different zone,
|
||||
//then we assume this is invalid.
|
||||
if(!zone_point || zone_point->target_zone_id != target_zone_id) {
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
Log.Out(Logs::General, Logs::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
CheatDetected(MQGate, zc->x, zc->y, zc->z);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
@@ -160,7 +160,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
if(target_zone_name == nullptr) {
|
||||
//invalid zone...
|
||||
Message(13, "Invalid target zone ID.");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id);
|
||||
Log.Out(Logs::General, Logs::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
if(!database.GetSafePoints(target_zone_name, database.GetInstanceVersion(target_instance_id), &safe_x, &safe_y, &safe_z, &minstatus, &minlevel, flag_needed)) {
|
||||
//invalid zone...
|
||||
Message(13, "Invalid target zone while getting safe points.");
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name);
|
||||
Log.Out(Logs::General, Logs::Error, "Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
switch(zone_mode) {
|
||||
case EvacToSafeCoords:
|
||||
case ZoneToSafeCoords:
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::None, "Zoning %s to safe coords (%f,%f,%f) in %s (%d)", GetName(), safe_x, safe_y, safe_z, target_zone_name, target_zone_id);
|
||||
Log.Out(Logs::General, Logs::None, "Zoning %s to safe coords (%f,%f,%f) in %s (%d)", GetName(), safe_x, safe_y, safe_z, target_zone_name, target_zone_id);
|
||||
dest_x = safe_x;
|
||||
dest_y = safe_y;
|
||||
dest_z = safe_z;
|
||||
@@ -253,7 +253,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
//could not find a valid reason for them to be zoning, stop it.
|
||||
CheatDetected(MQZoneUnknownDest, 0.0, 0.0, 0.0);
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
|
||||
Log.Out(Logs::General, Logs::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
default:
|
||||
@@ -288,7 +288,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
//we have successfully zoned
|
||||
DoZoneSuccess(zc, target_zone_id, target_instance_id, dest_x, dest_y, dest_z, dest_h, ignorerestrictions);
|
||||
} else {
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Rules prevent this char from zoning into '%s'", GetName(), target_zone_name);
|
||||
Log.Out(Logs::General, Logs::Error, "Zoning %s: Rules prevent this char from zoning into '%s'", GetName(), target_zone_name);
|
||||
SendZoneError(zc, myerror);
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ void Client::SendZoneCancel(ZoneChange_Struct *zc) {
|
||||
|
||||
void Client::SendZoneError(ZoneChange_Struct *zc, int8 err)
|
||||
{
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID);
|
||||
Log.Out(Logs::General, Logs::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID);
|
||||
|
||||
SetPortExemption(true);
|
||||
|
||||
@@ -347,7 +347,7 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
||||
if(this->GetPet())
|
||||
entity_list.RemoveFromHateLists(this->GetPet());
|
||||
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Status, "Zoning '%s' to: %s (%i) - (%i) x=%f, y=%f, z=%f", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z);
|
||||
Log.Out(Logs::General, Logs::Status, "Zoning '%s' to: %s (%i) - (%i) x=%f, y=%f, z=%f", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z);
|
||||
|
||||
//set the player's coordinates in the new zone so they have them
|
||||
//when they zone into it
|
||||
@@ -472,7 +472,7 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y,
|
||||
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
|
||||
break;
|
||||
default:
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::ProcessMovePC received a reguest to perform an unsupported client zone operation.");
|
||||
Log.Out(Logs::General, Logs::Error, "Client::ProcessMovePC received a reguest to perform an unsupported client zone operation.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -534,7 +534,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
heading = m_pp.binds[0].heading;
|
||||
|
||||
zonesummon_ignorerestrictions = 1;
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::None, "Player %s has died and will be zoned to bind point in zone: %s at LOC x=%f, y=%f, z=%f, heading=%f", GetName(), pZoneName, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, m_pp.binds[0].heading);
|
||||
Log.Out(Logs::General, Logs::None, "Player %s has died and will be zoned to bind point in zone: %s at LOC x=%f, y=%f, z=%f, heading=%f", GetName(), pZoneName, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, m_pp.binds[0].heading);
|
||||
break;
|
||||
case SummonPC:
|
||||
zonesummon_x = x_pos = x;
|
||||
@@ -543,14 +543,14 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
SetHeading(heading);
|
||||
break;
|
||||
case Rewind:
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::None, "%s has requested a /rewind from %f, %f, %f, to %f, %f, %f in %s", GetName(), x_pos, y_pos, z_pos, rewind_x, rewind_y, rewind_z, zone->GetShortName());
|
||||
Log.Out(Logs::General, Logs::None, "%s has requested a /rewind from %f, %f, %f, to %f, %f, %f in %s", GetName(), x_pos, y_pos, z_pos, rewind_x, rewind_y, rewind_z, zone->GetShortName());
|
||||
zonesummon_x = x_pos = x;
|
||||
zonesummon_y = y_pos = y;
|
||||
zonesummon_z = z_pos = z;
|
||||
SetHeading(heading);
|
||||
break;
|
||||
default:
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::ZonePC() received a reguest to perform an unsupported client zone operation.");
|
||||
Log.Out(Logs::General, Logs::Error, "Client::ZonePC() received a reguest to perform an unsupported client zone operation.");
|
||||
ReadyToZone = false;
|
||||
break;
|
||||
}
|
||||
@@ -680,7 +680,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::None, "Player %s has requested a zoning to LOC x=%f, y=%f, z=%f, heading=%f in zoneid=%i", GetName(), x, y, z, heading, zoneID);
|
||||
Log.Out(Logs::Detail, Logs::None, "Player %s has requested a zoning to LOC x=%f, y=%f, z=%f, heading=%f in zoneid=%i", GetName(), x, y, z, heading, zoneID);
|
||||
//Clear zonesummon variables if we're zoning to our own zone
|
||||
//Client wont generate a zone change packet to the server in this case so
|
||||
//They aren't needed and it keeps behavior on next zone attempt from being undefined.
|
||||
@@ -768,7 +768,7 @@ void Client::SetZoneFlag(uint32 zone_id) {
|
||||
std::string query = StringFormat("INSERT INTO zone_flags (charID,zoneID) VALUES(%d,%d)", CharacterID(), zone_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
Log.Out(Logs::General, Logs::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Client::ClearZoneFlag(uint32 zone_id) {
|
||||
@@ -781,7 +781,7 @@ void Client::ClearZoneFlag(uint32 zone_id) {
|
||||
std::string query = StringFormat("DELETE FROM zone_flags WHERE charID=%d AND zoneID=%d", CharacterID(), zone_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to clear zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
Log.Out(Logs::General, Logs::Error, "MySQL Error while trying to clear zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -791,7 +791,7 @@ void Client::LoadZoneFlags() {
|
||||
std::string query = StringFormat("SELECT zoneID from zone_flags WHERE charID=%d", CharacterID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
Log.Out(Logs::General, Logs::Error, "MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -854,23 +854,23 @@ bool Client::CanBeInZone() {
|
||||
char flag_needed[128];
|
||||
if(!database.GetSafePoints(zone->GetShortName(), zone->GetInstanceVersion(), &safe_x, &safe_y, &safe_z, &minstatus, &minlevel, flag_needed)) {
|
||||
//this should not happen...
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Unable to query zone info for ourself '%s'", zone->GetShortName());
|
||||
Log.Out(Logs::Detail, Logs::None, "[CLIENT] Unable to query zone info for ourself '%s'", zone->GetShortName());
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(GetLevel() < minlevel) {
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not meet min level requirement (%d < %d)!", GetLevel(), minlevel);
|
||||
Log.Out(Logs::Detail, Logs::None, "[CLIENT] Character does not meet min level requirement (%d < %d)!", GetLevel(), minlevel);
|
||||
return(false);
|
||||
}
|
||||
if(Admin() < minstatus) {
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not meet min status requirement (%d < %d)!", Admin(), minstatus);
|
||||
Log.Out(Logs::Detail, Logs::None, "[CLIENT] Character does not meet min status requirement (%d < %d)!", Admin(), minstatus);
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(flag_needed[0] != '\0') {
|
||||
//the flag needed string is not empty, meaning a flag is required.
|
||||
if(Admin() < minStatusToIgnoreZoneFlags && !HasZoneFlag(zone->GetZoneID())) {
|
||||
Log.Out(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not have the flag to be in this zone (%s)!", flag_needed);
|
||||
Log.Out(Logs::Detail, Logs::None, "[CLIENT] Character does not have the flag to be in this zone (%s)!", flag_needed);
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user