Convert 'Guilds' debugging _log to logger.LogDebugType

This commit is contained in:
Akkadius
2015-01-12 22:32:44 -06:00
parent 6c0e2631dc
commit c288ca5204
7 changed files with 100 additions and 98 deletions
+1 -1
View File
@@ -8447,7 +8447,7 @@ void Bot::ProcessGuildInvite(Client* guildOfficer, Bot* botToGuild) {
SetBotGuildMembership(botToGuild->GetBotID(), guildOfficer->GuildID(), GUILD_MEMBER);
//_log(GUILDS__REFRESH, "Sending char refresh for BOT %s from guild %d to world", botToGuild->GetName(), guildOfficer->GuildID();
//logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending char refresh for BOT %s from guild %d to world", botToGuild->GetName(), guildOfficer->GuildID();
ServerPacket* pack = new ServerPacket(ServerOP_GuildCharRefresh, sizeof(ServerGuildCharRefresh_Struct));
ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer;
+1 -1
View File
@@ -7196,7 +7196,7 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
uint32 NewGuildID = guild_mgr.CreateGuild(GuildName, CharacterID());
_log(GUILDS__ACTIONS, "%s: Creating guild %s with leader %d via UF+ GUI. It was given id %lu.", GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Creating guild %s with leader %d via UF+ GUI. It was given id %lu.", GetName(),
GuildName, CharacterID(), (unsigned long)NewGuildID);
if (NewGuildID == GUILD_NONE)
+7 -7
View File
@@ -4602,10 +4602,10 @@ void command_guild(Client *c, const Seperator *sep)
}
if(guild_id == GUILD_NONE) {
_log(GUILDS__ACTIONS, "%s: Removing %s (%d) from guild with GM command.", c->GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Removing %s (%d) from guild with GM command.", c->GetName(),
sep->arg[2], charid);
} else {
_log(GUILDS__ACTIONS, "%s: Putting %s (%d) into guild %s (%d) with GM command.", c->GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Putting %s (%d) into guild %s (%d) with GM command.", c->GetName(),
sep->arg[2], charid,
guild_mgr.GetGuildName(guild_id), guild_id);
}
@@ -4654,7 +4654,7 @@ void command_guild(Client *c, const Seperator *sep)
return;
}
_log(GUILDS__ACTIONS, "%s: Setting %s (%d)'s guild rank to %d with GM command.", c->GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting %s (%d)'s guild rank to %d with GM command.", c->GetName(),
sep->arg[2], charid, rank);
if(!guild_mgr.SetGuildRank(charid, rank))
@@ -4696,7 +4696,7 @@ void command_guild(Client *c, const Seperator *sep)
uint32 id = guild_mgr.CreateGuild(sep->argplus[3], leader);
_log(GUILDS__ACTIONS, "%s: Creating guild %s with leader %d with GM command. It was given id %lu.", c->GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Creating guild %s with leader %d with GM command. It was given id %lu.", c->GetName(),
sep->argplus[3], leader, (unsigned long)id);
if (id == GUILD_NONE)
@@ -4735,7 +4735,7 @@ void command_guild(Client *c, const Seperator *sep)
}
}
_log(GUILDS__ACTIONS, "%s: Deleting guild %s (%d) with GM command.", c->GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Deleting guild %s (%d) with GM command.", c->GetName(),
guild_mgr.GetGuildName(id), id);
if (!guild_mgr.DeleteGuild(id))
@@ -4769,7 +4769,7 @@ void command_guild(Client *c, const Seperator *sep)
}
}
_log(GUILDS__ACTIONS, "%s: Renaming guild %s (%d) to '%s' with GM command.", c->GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Renaming guild %s (%d) to '%s' with GM command.", c->GetName(),
guild_mgr.GetGuildName(id), id, sep->argplus[3]);
if (!guild_mgr.RenameGuild(id, sep->argplus[3]))
@@ -4820,7 +4820,7 @@ void command_guild(Client *c, const Seperator *sep)
}
}
_log(GUILDS__ACTIONS, "%s: Setting leader of guild %s (%d) to %d with GM command.", c->GetName(),
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting leader of guild %s (%d) to %d with GM command.", c->GetName(),
guild_mgr.GetGuildName(id), id, leader);
if(!guild_mgr.SetGuildLeader(id, leader))
+10 -10
View File
@@ -32,7 +32,7 @@ extern WorldServer worldserver;
extern volatile bool ZoneLoaded;
void ZoneGuildManager::SendGuildRefresh(uint32 guild_id, bool name, bool motd, bool rank, bool relation) {
_log(GUILDS__REFRESH, "Sending guild refresh for %d to world, changes: name=%d, motd=%d, rank=d, relation=%d", guild_id, name, motd, rank, relation);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending guild refresh for %d to world, changes: name=%d, motd=%d, rank=d, relation=%d", guild_id, name, motd, rank, relation);
ServerPacket* pack = new ServerPacket(ServerOP_RefreshGuild, sizeof(ServerGuildRefresh_Struct));
ServerGuildRefresh_Struct *s = (ServerGuildRefresh_Struct *) pack->pBuffer;
s->guild_id = guild_id;
@@ -46,7 +46,7 @@ void ZoneGuildManager::SendGuildRefresh(uint32 guild_id, bool name, bool motd, b
void ZoneGuildManager::SendCharRefresh(uint32 old_guild_id, uint32 guild_id, uint32 charid) {
if(guild_id == 0) {
_log(GUILDS__REFRESH, "Guild lookup for char %d when sending char refresh.", charid);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Guild lookup for char %d when sending char refresh.", charid);
CharGuildInfo gci;
if(!GetCharInfo(charid, gci)) {
@@ -56,7 +56,7 @@ void ZoneGuildManager::SendCharRefresh(uint32 old_guild_id, uint32 guild_id, uin
}
}
_log(GUILDS__REFRESH, "Sending char refresh for %d from guild %d to world", charid, guild_id);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending char refresh for %d from guild %d to world", charid, guild_id);
ServerPacket* pack = new ServerPacket(ServerOP_GuildCharRefresh, sizeof(ServerGuildCharRefresh_Struct));
ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer;
@@ -89,7 +89,7 @@ void ZoneGuildManager::SendRankUpdate(uint32 CharID)
}
void ZoneGuildManager::SendGuildDelete(uint32 guild_id) {
_log(GUILDS__REFRESH, "Sending guild delete for guild %d to world", guild_id);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending guild delete for guild %d to world", guild_id);
ServerPacket* pack = new ServerPacket(ServerOP_DeleteGuild, sizeof(ServerGuildID_Struct));
ServerGuildID_Struct *s = (ServerGuildID_Struct *) pack->pBuffer;
s->guild_id = guild_id;
@@ -266,7 +266,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
}
ServerGuildRefresh_Struct *s = (ServerGuildRefresh_Struct *) pack->pBuffer;
_log(GUILDS__REFRESH, "Received guild refresh from world for %d, changes: name=%d, motd=%d, rank=%d, relation=%d", s->guild_id, s->name_change, s->motd_change, s->rank_change, s->relation_change);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild refresh from world for %d, changes: name=%d, motd=%d, rank=%d, relation=%d", s->guild_id, s->name_change, s->motd_change, s->rank_change, s->relation_change);
//reload all the guild details from the database.
RefreshGuild(s->guild_id);
@@ -300,7 +300,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
}
ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer;
_log(GUILDS__REFRESH, "Received guild member refresh from world for char %d from guild %d", s->char_id, s->guild_id);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild member refresh from world for char %d from guild %d", s->char_id, s->guild_id);
Client *c = entity_list.GetClientByCharID(s->char_id);
@@ -369,7 +369,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
}
ServerGuildID_Struct *s = (ServerGuildID_Struct *) pack->pBuffer;
_log(GUILDS__REFRESH, "Received guild delete from world for guild %d", s->guild_id);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild delete from world for guild %d", s->guild_id);
//clear all the guild tags.
entity_list.RefreshAllGuildInfo(s->guild_id);
@@ -417,10 +417,10 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
if (!c || !c->IsInAGuild())
{
_log(GUILDS__ERROR,"Invalid Client or not in guild. ID=%i", FromID);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Invalid Client or not in guild. ID=%i", FromID);
break;
}
_log(GUILDS__IN_PACKETS,"Processing ServerOP_OnlineGuildMembersResponse");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Processing ServerOP_OnlineGuildMembersResponse");
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildMemberUpdate, sizeof(GuildMemberUpdate_Struct));
GuildMemberUpdate_Struct *gmus = (GuildMemberUpdate_Struct*)outapp->pBuffer;
char Name[64];
@@ -433,7 +433,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
VARSTRUCT_DECODE_STRING(Name, Buffer);
strn0cpy(gmus->MemberName, Name, sizeof(gmus->MemberName));
gmus->ZoneID = VARSTRUCT_DECODE_TYPE(uint32, Buffer);
_log(GUILDS__OUT_PACKETS,"Sending OP_GuildMemberUpdate to %i. Name=%s ZoneID=%i",FromID,Name,gmus->ZoneID);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Sending OP_GuildMemberUpdate to %i. Name=%s ZoneID=%i",FromID,Name,gmus->ZoneID);
c->QueuePacket(outapp);
}
safe_delete(outapp);