Replace all clog calls, (Mostly WORLD__)

This commit is contained in:
Akkadius 2015-01-17 02:56:10 -06:00
parent 3d5434b91d
commit bcaaaac090

View File

@ -136,7 +136,7 @@ void Client::SendEnterWorld(std::string name)
eqs->Close(); eqs->Close();
return; return;
} else { } else {
clog(WORLD__CLIENT,"Telling client to continue session."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Telling client to continue session.");
} }
} }
@ -378,7 +378,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) {
if (strlen(password) <= 1) { if (strlen(password) <= 1) {
// TODO: Find out how to tell the client wrong username/password // TODO: Find out how to tell the client wrong username/password
clog(WORLD__CLIENT_ERR,"Login without a password"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Login without a password");
return false; return false;
} }
@ -408,31 +408,31 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) {
if ((cle = zoneserver_list.CheckAuth(inet_ntoa(tmpip), password))) if ((cle = zoneserver_list.CheckAuth(inet_ntoa(tmpip), password)))
#else #else
if (loginserverlist.Connected() == false && !pZoning) { if (loginserverlist.Connected() == false && !pZoning) {
clog(WORLD__CLIENT_ERR,"Error: Login server login while not connected to login server."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Error: Login server login while not connected to login server.");
return false; return false;
} }
if (((cle = client_list.CheckAuth(name, password)) || (cle = client_list.CheckAuth(id, password)))) if (((cle = client_list.CheckAuth(name, password)) || (cle = client_list.CheckAuth(id, password))))
#endif #endif
{ {
if (cle->AccountID() == 0 || (!minilogin && cle->LSID()==0)) { if (cle->AccountID() == 0 || (!minilogin && cle->LSID()==0)) {
clog(WORLD__CLIENT_ERR,"ID is 0. Is this server connected to minilogin?"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"ID is 0. Is this server connected to minilogin?");
if(!minilogin) if(!minilogin)
clog(WORLD__CLIENT_ERR,"If so you forget the minilogin variable..."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"If so you forget the minilogin variable...");
else else
clog(WORLD__CLIENT_ERR,"Could not find a minilogin account, verify ip address logging into minilogin is the same that is in your account table."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Could not find a minilogin account, verify ip address logging into minilogin is the same that is in your account table.");
return false; return false;
} }
cle->SetOnline(); cle->SetOnline();
clog(WORLD__CLIENT,"Logged in. Mode=%s",pZoning ? "(Zoning)" : "(CharSel)"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Logged in. Mode=%s",pZoning ? "(Zoning)" : "(CharSel)");
if(minilogin){ if(minilogin){
WorldConfig::DisableStats(); WorldConfig::DisableStats();
clog(WORLD__CLIENT,"MiniLogin Account #%d",cle->AccountID()); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"MiniLogin Account #%d",cle->AccountID());
} }
else { else {
clog(WORLD__CLIENT,"LS Account #%d",cle->LSID()); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"LS Account #%d",cle->LSID());
} }
const WorldConfig *Config=WorldConfig::get(); const WorldConfig *Config=WorldConfig::get();
@ -465,7 +465,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) {
} }
else { else {
// TODO: Find out how to tell the client wrong username/password // TODO: Find out how to tell the client wrong username/password
clog(WORLD__CLIENT_ERR,"Bad/Expired session key '%s'",name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Bad/Expired session key '%s'",name);
return false; return false;
} }
@ -479,7 +479,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) {
bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app) bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app)
{ {
if (GetAccountID() == 0) { if (GetAccountID() == 0) {
clog(WORLD__CLIENT_ERR,"Name approval request with no logged in account"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Name approval request with no logged in account");
return false; return false;
} }
@ -487,7 +487,7 @@ bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app)
uchar race = app->pBuffer[64]; uchar race = app->pBuffer[64];
uchar clas = app->pBuffer[68]; uchar clas = app->pBuffer[68];
clog(WORLD__CLIENT, "Name approval request. Name=%s, race=%s, class=%s", char_name, GetRaceName(race), GetEQClassName(clas)); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Name approval request. Name=%s, race=%s, class=%s", char_name, GetRaceName(race), GetEQClassName(clas));
EQApplicationPacket *outapp; EQApplicationPacket *outapp;
outapp = new EQApplicationPacket; outapp = new EQApplicationPacket;
@ -648,11 +648,11 @@ bool Client::HandleCharacterCreateRequestPacket(const EQApplicationPacket *app)
bool Client::HandleCharacterCreatePacket(const EQApplicationPacket *app) { bool Client::HandleCharacterCreatePacket(const EQApplicationPacket *app) {
if (GetAccountID() == 0) { if (GetAccountID() == 0) {
clog(WORLD__CLIENT_ERR,"Account ID not set; unable to create character."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Account ID not set; unable to create character.");
return false; return false;
} }
else if (app->size != sizeof(CharCreate_Struct)) { else if (app->size != sizeof(CharCreate_Struct)) {
clog(WORLD__CLIENT_ERR,"Wrong size on OP_CharacterCreate. Got: %d, Expected: %d",app->size,sizeof(CharCreate_Struct)); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on OP_CharacterCreate. Got: %d, Expected: %d",app->size,sizeof(CharCreate_Struct));
DumpPacket(app); DumpPacket(app);
// the previous behavior was essentially returning true here // the previous behavior was essentially returning true here
// but that seems a bit odd to me. // but that seems a bit odd to me.
@ -679,14 +679,14 @@ bool Client::HandleCharacterCreatePacket(const EQApplicationPacket *app) {
bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
if (GetAccountID() == 0) { if (GetAccountID() == 0) {
clog(WORLD__CLIENT_ERR,"Enter world with no logged in account"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Enter world with no logged in account");
eqs->Close(); eqs->Close();
return true; return true;
} }
if(GetAdmin() < 0) if(GetAdmin() < 0)
{ {
clog(WORLD__CLIENT,"Account banned or suspended."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Account banned or suspended.");
eqs->Close(); eqs->Close();
return true; return true;
} }
@ -702,14 +702,14 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
uint32 tmpaccid = 0; uint32 tmpaccid = 0;
charid = database.GetCharacterInfo(char_name, &tmpaccid, &zoneID, &instanceID); charid = database.GetCharacterInfo(char_name, &tmpaccid, &zoneID, &instanceID);
if (charid == 0 || tmpaccid != GetAccountID()) { if (charid == 0 || tmpaccid != GetAccountID()) {
clog(WORLD__CLIENT_ERR,"Could not get CharInfo for '%s'",char_name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Could not get CharInfo for '%s'",char_name);
eqs->Close(); eqs->Close();
return true; return true;
} }
// Make sure this account owns this character // Make sure this account owns this character
if (tmpaccid != GetAccountID()) { if (tmpaccid != GetAccountID()) {
clog(WORLD__CLIENT_ERR,"This account does not own the character named '%s'",char_name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"This account does not own the character named '%s'",char_name);
eqs->Close(); eqs->Close();
return true; return true;
} }
@ -737,7 +737,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
zoneID = database.MoveCharacterToBind(charid,4); zoneID = database.MoveCharacterToBind(charid,4);
} }
else { else {
clog(WORLD__CLIENT_ERR,"'%s' is trying to go home before they're able...",char_name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"'%s' is trying to go home before they're able...",char_name);
database.SetHackerFlag(GetAccountName(), char_name, "MQGoHome: player tried to go home before they were able."); database.SetHackerFlag(GetAccountName(), char_name, "MQGoHome: player tried to go home before they were able.");
eqs->Close(); eqs->Close();
return true; return true;
@ -770,7 +770,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
} }
else else
{ {
clog(WORLD__CLIENT_ERR,"'%s' is trying to go to tutorial but are not allowed...",char_name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"'%s' is trying to go to tutorial but are not allowed...",char_name);
database.SetHackerFlag(GetAccountName(), char_name, "MQTutorial: player tried to enter the tutorial without having tutorial enabled for this character."); database.SetHackerFlag(GetAccountName(), char_name, "MQTutorial: player tried to enter the tutorial without having tutorial enabled for this character.");
eqs->Close(); eqs->Close();
return true; return true;
@ -780,7 +780,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
if (zoneID == 0 || !database.GetZoneName(zoneID)) { if (zoneID == 0 || !database.GetZoneName(zoneID)) {
// This is to save people in an invalid zone, once it's removed from the DB // This is to save people in an invalid zone, once it's removed from the DB
database.MoveCharacterToZone(charid, "arena"); database.MoveCharacterToZone(charid, "arena");
clog(WORLD__CLIENT_ERR, "Zone not found in database zone_id=%i, moveing char to arena character:%s", zoneID, char_name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Zone not found in database zone_id=%i, moveing char to arena character:%s", zoneID, char_name);
} }
if(instanceID > 0) if(instanceID > 0)
@ -894,7 +894,7 @@ bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {
uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer); uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer);
if(char_acct_id == GetAccountID()) { if(char_acct_id == GetAccountID()) {
clog(WORLD__CLIENT,"Delete character: %s",app->pBuffer); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Delete character: %s",app->pBuffer);
database.DeleteCharacter((char *)app->pBuffer); database.DeleteCharacter((char *)app->pBuffer);
SendCharInfo(); SendCharInfo();
} }
@ -915,25 +915,25 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
EmuOpcode opcode = app->GetOpcode(); EmuOpcode opcode = app->GetOpcode();
clog(WORLD__CLIENT_TRACE,"Recevied EQApplicationPacket"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Recevied EQApplicationPacket");
_pkt(WORLD__CLIENT_TRACE,app); _pkt(WORLD__CLIENT_TRACE,app);
if (!eqs->CheckState(ESTABLISHED)) { if (!eqs->CheckState(ESTABLISHED)) {
clog(WORLD__CLIENT,"Client disconnected (net inactive on send)"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Client disconnected (net inactive on send)");
return false; return false;
} }
// Voidd: Anti-GM Account hack, Checks source ip against valid GM Account IP Addresses // Voidd: Anti-GM Account hack, Checks source ip against valid GM Account IP Addresses
if (RuleB(World, GMAccountIPList) && this->GetAdmin() >= (RuleI(World, MinGMAntiHackStatus))) { if (RuleB(World, GMAccountIPList) && this->GetAdmin() >= (RuleI(World, MinGMAntiHackStatus))) {
if(!database.CheckGMIPs(long2ip(this->GetIP()).c_str(), this->GetAccountID())) { if(!database.CheckGMIPs(long2ip(this->GetIP()).c_str(), this->GetAccountID())) {
clog(WORLD__CLIENT,"GM Account not permited from source address %s and accountid %i", long2ip(this->GetIP()).c_str(), this->GetAccountID()); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"GM Account not permited from source address %s and accountid %i", long2ip(this->GetIP()).c_str(), this->GetAccountID());
eqs->Close(); eqs->Close();
} }
} }
if (GetAccountID() == 0 && opcode != OP_SendLoginInfo) { if (GetAccountID() == 0 && opcode != OP_SendLoginInfo) {
// Got a packet other than OP_SendLoginInfo when not logged in // Got a packet other than OP_SendLoginInfo when not logged in
clog(WORLD__CLIENT_ERR,"Expecting OP_SendLoginInfo, got %s", OpcodeNames[opcode]); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Expecting OP_SendLoginInfo, got %s", OpcodeNames[opcode]);
return false; return false;
} }
else if (opcode == OP_AckPacket) { else if (opcode == OP_AckPacket) {
@ -1005,7 +1005,7 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
} }
default: default:
{ {
clog(WORLD__CLIENT_ERR,"Received unknown EQApplicationPacket"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Received unknown EQApplicationPacket");
_pkt(WORLD__CLIENT_ERR,app); _pkt(WORLD__CLIENT_ERR,app);
return true; return true;
} }
@ -1024,7 +1024,7 @@ bool Client::Process() {
to.sin_addr.s_addr = ip; to.sin_addr.s_addr = ip;
if (autobootup_timeout.Check()) { if (autobootup_timeout.Check()) {
clog(WORLD__CLIENT_ERR, "Zone bootup timer expired, bootup failed or too slow."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Zone bootup timer expired, bootup failed or too slow.");
ZoneUnavail(); ZoneUnavail();
} }
if(connect.Check()){ if(connect.Check()){
@ -1058,7 +1058,7 @@ bool Client::Process() {
loginserverlist.SendPacket(pack); loginserverlist.SendPacket(pack);
safe_delete(pack); safe_delete(pack);
} }
clog(WORLD__CLIENT,"Client disconnected (not active in process)"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Client disconnected (not active in process)");
return false; return false;
} }
@ -1107,17 +1107,17 @@ void Client::EnterWorld(bool TryBootup) {
} }
else { else {
if (TryBootup) { if (TryBootup) {
clog(WORLD__CLIENT,"Attempting autobootup of %s (%d:%d)",zone_name,zoneID,instanceID); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Attempting autobootup of %s (%d:%d)",zone_name,zoneID,instanceID);
autobootup_timeout.Start(); autobootup_timeout.Start();
pwaitingforbootup = zoneserver_list.TriggerBootup(zoneID, instanceID); pwaitingforbootup = zoneserver_list.TriggerBootup(zoneID, instanceID);
if (pwaitingforbootup == 0) { if (pwaitingforbootup == 0) {
clog(WORLD__CLIENT_ERR,"No zoneserver available to boot up."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"No zoneserver available to boot up.");
ZoneUnavail(); ZoneUnavail();
} }
return; return;
} }
else { else {
clog(WORLD__CLIENT_ERR,"Requested zone %s is no running.",zone_name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Requested zone %s is no running.",zone_name);
ZoneUnavail(); ZoneUnavail();
return; return;
} }
@ -1126,12 +1126,12 @@ void Client::EnterWorld(bool TryBootup) {
cle->SetChar(charid, char_name); cle->SetChar(charid, char_name);
database.UpdateLiveChar(char_name, GetAccountID()); database.UpdateLiveChar(char_name, GetAccountID());
clog(WORLD__CLIENT,"%s %s (%d:%d)",seencharsel ? "Entering zone" : "Zoning to",zone_name,zoneID,instanceID); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"%s %s (%d:%d)",seencharsel ? "Entering zone" : "Zoning to",zone_name,zoneID,instanceID);
// database.SetAuthentication(account_id, char_name, zone_name, ip); // database.SetAuthentication(account_id, char_name, zone_name, ip);
if (seencharsel) { if (seencharsel) {
if (GetAdmin() < 80 && zoneserver_list.IsZoneLocked(zoneID)) { if (GetAdmin() < 80 && zoneserver_list.IsZoneLocked(zoneID)) {
clog(WORLD__CLIENT_ERR,"Enter world failed. Zone is locked."); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Enter world failed. Zone is locked.");
ZoneUnavail(); ZoneUnavail();
return; return;
} }
@ -1169,9 +1169,9 @@ void Client::Clearance(int8 response)
{ {
if (zs == 0) if (zs == 0)
{ {
clog(WORLD__CLIENT_ERR,"Unable to find zoneserver in Client::Clearance!!"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Unable to find zoneserver in Client::Clearance!!");
} else { } else {
clog(WORLD__CLIENT_ERR, "Invalid response %d in Client::Clearance", response); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Invalid response %d in Client::Clearance", response);
} }
ZoneUnavail(); ZoneUnavail();
@ -1181,20 +1181,20 @@ void Client::Clearance(int8 response)
EQApplicationPacket* outapp; EQApplicationPacket* outapp;
if (zs->GetCAddress() == nullptr) { if (zs->GetCAddress() == nullptr) {
clog(WORLD__CLIENT_ERR, "Unable to do zs->GetCAddress() in Client::Clearance!!"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to do zs->GetCAddress() in Client::Clearance!!");
ZoneUnavail(); ZoneUnavail();
return; return;
} }
if (zoneID == 0) { if (zoneID == 0) {
clog(WORLD__CLIENT_ERR, "zoneID is nullptr in Client::Clearance!!"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "zoneID is nullptr in Client::Clearance!!");
ZoneUnavail(); ZoneUnavail();
return; return;
} }
const char* zonename = database.GetZoneName(zoneID); const char* zonename = database.GetZoneName(zoneID);
if (zonename == 0) { if (zonename == 0) {
clog(WORLD__CLIENT_ERR, "zonename is nullptr in Client::Clearance!!"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "zonename is nullptr in Client::Clearance!!");
ZoneUnavail(); ZoneUnavail();
return; return;
} }
@ -1225,7 +1225,7 @@ void Client::Clearance(int8 response)
} }
strcpy(zsi->ip, zs_addr); strcpy(zsi->ip, zs_addr);
zsi->port =zs->GetCPort(); zsi->port =zs->GetCPort();
clog(WORLD__CLIENT,"Sending client to zone %s (%d:%d) at %s:%d",zonename,zoneID,instanceID,zsi->ip,zsi->port); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Sending client to zone %s (%d:%d) at %s:%d",zonename,zoneID,instanceID,zsi->ip,zsi->port);
QueuePacket(outapp); QueuePacket(outapp);
safe_delete(outapp); safe_delete(outapp);
@ -1256,7 +1256,7 @@ bool Client::GenPassKey(char* key) {
} }
void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req) { void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req) {
clog(WORLD__CLIENT_TRACE, "Sending EQApplicationPacket OpCode 0x%04x",app->GetOpcode()); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Sending EQApplicationPacket OpCode 0x%04x",app->GetOpcode());
_pkt(WORLD__CLIENT_TRACE, app); _pkt(WORLD__CLIENT_TRACE, app);
ack_req = true; // It's broke right now, dont delete this line till fix it. =P ack_req = true; // It's broke right now, dont delete this line till fix it. =P
@ -1358,27 +1358,27 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
in.s_addr = GetIP(); in.s_addr = GetIP();
clog(WORLD__CLIENT, "Character creation request from %s LS#%d (%s:%d) : ", GetCLE()->LSName(), GetCLE()->LSID(), inet_ntoa(in), GetPort()); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Character creation request from %s LS#%d (%s:%d) : ", GetCLE()->LSName(), GetCLE()->LSID(), inet_ntoa(in), GetPort());
clog(WORLD__CLIENT, "Name: %s", name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Name: %s", name);
clog(WORLD__CLIENT, "Race: %d Class: %d Gender: %d Deity: %d Start zone: %d Tutorial: %s", logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Race: %d Class: %d Gender: %d Deity: %d Start zone: %d Tutorial: %s",
cc->race, cc->class_, cc->gender, cc->deity, cc->start_zone, cc->tutorial ? "true" : "false"); cc->race, cc->class_, cc->gender, cc->deity, cc->start_zone, cc->tutorial ? "true" : "false");
clog(WORLD__CLIENT, "STR STA AGI DEX WIS INT CHA Total"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "STR STA AGI DEX WIS INT CHA Total");
clog(WORLD__CLIENT, "%3d %3d %3d %3d %3d %3d %3d %3d", logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "%3d %3d %3d %3d %3d %3d %3d %3d",
cc->STR, cc->STA, cc->AGI, cc->DEX, cc->WIS, cc->INT, cc->CHA, cc->STR, cc->STA, cc->AGI, cc->DEX, cc->WIS, cc->INT, cc->CHA,
stats_sum); stats_sum);
clog(WORLD__CLIENT, "Face: %d Eye colors: %d %d", cc->face, cc->eyecolor1, cc->eyecolor2); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Face: %d Eye colors: %d %d", cc->face, cc->eyecolor1, cc->eyecolor2);
clog(WORLD__CLIENT, "Hairstyle: %d Haircolor: %d", cc->hairstyle, cc->haircolor); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Hairstyle: %d Haircolor: %d", cc->hairstyle, cc->haircolor);
clog(WORLD__CLIENT, "Beard: %d Beardcolor: %d", cc->beard, cc->beardcolor); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Beard: %d Beardcolor: %d", cc->beard, cc->beardcolor);
/* Validate the char creation struct */ /* Validate the char creation struct */
if (ClientVersionBit & BIT_SoFAndLater) { if (ClientVersionBit & BIT_SoFAndLater) {
if (!CheckCharCreateInfoSoF(cc)) { if (!CheckCharCreateInfoSoF(cc)) {
clog(WORLD__CLIENT_ERR,"CheckCharCreateInfo did not validate the request (bad race/class/stats)"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"CheckCharCreateInfo did not validate the request (bad race/class/stats)");
return false; return false;
} }
} else { } else {
if (!CheckCharCreateInfoTitanium(cc)) { if (!CheckCharCreateInfoTitanium(cc)) {
clog(WORLD__CLIENT_ERR,"CheckCharCreateInfo did not validate the request (bad race/class/stats)"); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"CheckCharCreateInfo did not validate the request (bad race/class/stats)");
return false; return false;
} }
} }
@ -1440,21 +1440,21 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
/* If it is an SoF Client and the SoF Start Zone rule is set, send new chars there */ /* If it is an SoF Client and the SoF Start Zone rule is set, send new chars there */
if (ClientVersionBit & BIT_SoFAndLater && RuleI(World, SoFStartZoneID) > 0) { if (ClientVersionBit & BIT_SoFAndLater && RuleI(World, SoFStartZoneID) > 0) {
clog(WORLD__CLIENT,"Found 'SoFStartZoneID' rule setting: %i", RuleI(World, SoFStartZoneID)); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Found 'SoFStartZoneID' rule setting: %i", RuleI(World, SoFStartZoneID));
pp.zone_id = RuleI(World, SoFStartZoneID); pp.zone_id = RuleI(World, SoFStartZoneID);
if (pp.zone_id) if (pp.zone_id)
database.GetSafePoints(pp.zone_id, 0, &pp.x, &pp.y, &pp.z); database.GetSafePoints(pp.zone_id, 0, &pp.x, &pp.y, &pp.z);
else else
clog(WORLD__CLIENT_ERR,"Error getting zone id for Zone ID %i", RuleI(World, SoFStartZoneID)); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Error getting zone id for Zone ID %i", RuleI(World, SoFStartZoneID));
} else { } else {
/* if there's a startzone variable put them in there */ /* if there's a startzone variable put them in there */
if (database.GetVariable("startzone", startzone, 50)) { if (database.GetVariable("startzone", startzone, 50)) {
clog(WORLD__CLIENT,"Found 'startzone' variable setting: %s", startzone); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Found 'startzone' variable setting: %s", startzone);
pp.zone_id = database.GetZoneID(startzone); pp.zone_id = database.GetZoneID(startzone);
if (pp.zone_id) if (pp.zone_id)
database.GetSafePoints(pp.zone_id, 0, &pp.x, &pp.y, &pp.z); database.GetSafePoints(pp.zone_id, 0, &pp.x, &pp.y, &pp.z);
else else
clog(WORLD__CLIENT_ERR,"Error getting zone id for '%s'", startzone); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Error getting zone id for '%s'", startzone);
} else { /* otherwise use normal starting zone logic */ } else { /* otherwise use normal starting zone logic */
bool ValidStartZone = false; bool ValidStartZone = false;
if (ClientVersionBit & BIT_TitaniumAndEarlier) if (ClientVersionBit & BIT_TitaniumAndEarlier)
@ -1493,11 +1493,11 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
pp.binds[0].z = pp.z; pp.binds[0].z = pp.z;
pp.binds[0].heading = pp.heading; pp.binds[0].heading = pp.heading;
clog(WORLD__CLIENT,"Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f", logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f",
database.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading); database.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading);
clog(WORLD__CLIENT,"Bind location: %s (%d) %0.2f, %0.2f, %0.2f", logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Bind location: %s (%d) %0.2f, %0.2f, %0.2f",
database.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z); database.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z);
clog(WORLD__CLIENT,"Home location: %s (%d) %0.2f, %0.2f, %0.2f", logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Home location: %s (%d) %0.2f, %0.2f, %0.2f",
database.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z); database.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z);
/* Starting Items inventory */ /* Starting Items inventory */
@ -1506,10 +1506,10 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
// now we give the pp and the inv we made to StoreCharacter // now we give the pp and the inv we made to StoreCharacter
// to see if we can store it // to see if we can store it
if (!database.StoreCharacter(GetAccountID(), &pp, &inv)) { if (!database.StoreCharacter(GetAccountID(), &pp, &inv)) {
clog(WORLD__CLIENT_ERR,"Character creation failed: %s", pp.name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Character creation failed: %s", pp.name);
return false; return false;
} }
clog(WORLD__CLIENT,"Character creation successful: %s", pp.name); logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Character creation successful: %s", pp.name);
return true; return true;
} }