mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 22:06:46 +00:00
Logs::Guilds to LogGuilds
This commit is contained in:
+35
-35
@@ -5896,7 +5896,7 @@ void Client::Handle_OP_FriendsWho(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GetGuildMOTD(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GetGuildMOTD");
|
||||
LogGuilds("Received OP_GetGuildMOTD");
|
||||
|
||||
SendGuildMOTD(true);
|
||||
|
||||
@@ -5909,7 +5909,7 @@ void Client::Handle_OP_GetGuildMOTD(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GetGuildsList(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GetGuildsList");
|
||||
LogGuilds("Received OP_GetGuildsList");
|
||||
|
||||
SendGuildList();
|
||||
}
|
||||
@@ -7271,7 +7271,7 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
|
||||
|
||||
uint32 NewGuildID = guild_mgr.CreateGuild(GuildName, CharacterID());
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s: Creating guild %s with leader %d via UF+ GUI. It was given id %lu.", GetName(),
|
||||
LogGuilds("[{}]: Creating guild [{}] with leader [{}] via UF+ GUI. It was given id [{}]", GetName(),
|
||||
GuildName, CharacterID(), (unsigned long)NewGuildID);
|
||||
|
||||
if (NewGuildID == GUILD_NONE)
|
||||
@@ -7293,12 +7293,12 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildDelete(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildDelete");
|
||||
LogGuilds("Received OP_GuildDelete");
|
||||
|
||||
if (!IsInAGuild() || !guild_mgr.IsGuildLeader(GuildID(), CharacterID()))
|
||||
Message(0, "You are not a guild leader or not in a guild.");
|
||||
else {
|
||||
Log(Logs::Detail, Logs::Guilds, "Deleting guild %s (%d)", guild_mgr.GetGuildName(GuildID()), GuildID());
|
||||
LogGuilds("Deleting guild [{}] ([{}])", guild_mgr.GetGuildName(GuildID()), GuildID());
|
||||
if (!guild_mgr.DeleteGuild(GuildID()))
|
||||
Message(0, "Guild delete failed.");
|
||||
else {
|
||||
@@ -7309,10 +7309,10 @@ void Client::Handle_OP_GuildDelete(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildDemote(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildDemote");
|
||||
LogGuilds("Received OP_GuildDemote");
|
||||
|
||||
if (app->size != sizeof(GuildDemoteStruct)) {
|
||||
Log(Logs::Detail, Logs::Guilds, "Error: app size of %i != size of GuildDemoteStruct of %i\n", app->size, sizeof(GuildDemoteStruct));
|
||||
LogGuilds("Error: app size of [{}] != size of GuildDemoteStruct of [{}]\n", app->size, sizeof(GuildDemoteStruct));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7342,7 +7342,7 @@ void Client::Handle_OP_GuildDemote(const EQApplicationPacket *app)
|
||||
uint8 rank = gci.rank - 1;
|
||||
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Demoting %s (%d) from rank %s (%d) to %s (%d) in %s (%d)",
|
||||
LogGuilds("Demoting [{}] ([{}]) from rank [{}] ([{}]) to [{}] ([{}]) in [{}] ([{}])",
|
||||
demote->target, gci.char_id,
|
||||
guild_mgr.GetRankName(GuildID(), gci.rank), gci.rank,
|
||||
guild_mgr.GetRankName(GuildID(), rank), rank,
|
||||
@@ -7360,7 +7360,7 @@ void Client::Handle_OP_GuildDemote(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildInvite");
|
||||
LogGuilds("Received OP_GuildInvite");
|
||||
|
||||
if (app->size != sizeof(GuildCommand_Struct)) {
|
||||
std::cout << "Wrong size: OP_GuildInvite, size=" << app->size << ", expected " << sizeof(GuildCommand_Struct) << std::endl;
|
||||
@@ -7401,7 +7401,7 @@ void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
||||
//we could send this to the member and prompt them to see if they want to
|
||||
//be demoted (I guess), but I dont see a point in that.
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s (%d) is demoting %s (%d) to rank %d in guild %s (%d)",
|
||||
LogGuilds("[{}] ([{}]) is demoting [{}] ([{}]) to rank [{}] in guild [{}] ([{}])",
|
||||
GetName(), CharacterID(),
|
||||
client->GetName(), client->CharacterID(),
|
||||
gc->officer,
|
||||
@@ -7420,7 +7420,7 @@ void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s (%d) is asking to promote %s (%d) to rank %d in guild %s (%d)",
|
||||
LogGuilds("[{}] ([{}]) is asking to promote [{}] ([{}]) to rank [{}] in guild [{}] ([{}])",
|
||||
GetName(), CharacterID(),
|
||||
client->GetName(), client->CharacterID(),
|
||||
gc->officer,
|
||||
@@ -7432,7 +7432,7 @@ void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
||||
if (gc->guildeqid == 0)
|
||||
gc->guildeqid = GuildID();
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending OP_GuildInvite for promotion to %s, length %d", client->GetName(), app->size);
|
||||
LogGuilds("Sending OP_GuildInvite for promotion to [{}], length [{}]", client->GetName(), app->size);
|
||||
client->QueuePacket(app);
|
||||
|
||||
}
|
||||
@@ -7455,7 +7455,7 @@ void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Inviting %s (%d) into guild %s (%d)",
|
||||
LogGuilds("Inviting [{}] ([{}]) into guild [{}] ([{}])",
|
||||
client->GetName(), client->CharacterID(),
|
||||
guild_mgr.GetGuildName(GuildID()), GuildID());
|
||||
|
||||
@@ -7475,7 +7475,7 @@ void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
||||
gc->officer = 8;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending OP_GuildInvite for invite to %s, length %d", client->GetName(), app->size);
|
||||
LogGuilds("Sending OP_GuildInvite for invite to [{}], length [{}]", client->GetName(), app->size);
|
||||
client->SetPendingGuildInvitation(true);
|
||||
client->QueuePacket(app);
|
||||
|
||||
@@ -7498,7 +7498,7 @@ void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildInviteAccept");
|
||||
LogGuilds("Received OP_GuildInviteAccept");
|
||||
|
||||
SetPendingGuildInvitation(false);
|
||||
|
||||
@@ -7536,7 +7536,7 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
else if (!worldserver.Connected())
|
||||
Message(0, "Error: World server disconnected");
|
||||
else {
|
||||
Log(Logs::Detail, Logs::Guilds, "Guild Invite Accept: guild %d, response %d, inviter %s, person %s",
|
||||
LogGuilds("Guild Invite Accept: guild [{}], response [{}], inviter [{}], person [{}]",
|
||||
gj->guildeqid, gj->response, gj->inviter, gj->newmember);
|
||||
|
||||
//ok, the invite is also used for changing rank as well.
|
||||
@@ -7566,7 +7566,7 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
if (gj->guildeqid == GuildID()) {
|
||||
//only need to change rank.
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Changing guild rank of %s (%d) to rank %d in guild %s (%d)",
|
||||
LogGuilds("Changing guild rank of [{}] ([{}]) to rank [{}] in guild [{}] ([{}])",
|
||||
GetName(), CharacterID(),
|
||||
gj->response,
|
||||
guild_mgr.GetGuildName(GuildID()), GuildID());
|
||||
@@ -7578,7 +7578,7 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
}
|
||||
else {
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Adding %s (%d) to guild %s (%d) at rank %d",
|
||||
LogGuilds("Adding [{}] ([{}]) to guild [{}] ([{}]) at rank [{}]",
|
||||
GetName(), CharacterID(),
|
||||
guild_mgr.GetGuildName(gj->guildeqid), gj->guildeqid,
|
||||
gj->response);
|
||||
@@ -7607,10 +7607,10 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildLeader(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildLeader");
|
||||
LogGuilds("Received OP_GuildLeader");
|
||||
|
||||
if (app->size < 2) {
|
||||
Log(Logs::Detail, Logs::Guilds, "Invalid length %d on OP_GuildLeader", app->size);
|
||||
LogGuilds("Invalid length [{}] on OP_GuildLeader", app->size);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7629,7 +7629,7 @@ void Client::Handle_OP_GuildLeader(const EQApplicationPacket *app)
|
||||
Client* newleader = entity_list.GetClientByName(gml->target);
|
||||
if (newleader) {
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Transfering leadership of %s (%d) to %s (%d)",
|
||||
LogGuilds("Transfering leadership of [{}] ([{}]) to [{}] ([{}])",
|
||||
guild_mgr.GetGuildName(GuildID()), GuildID(),
|
||||
newleader->GetName(), newleader->CharacterID());
|
||||
|
||||
@@ -7650,9 +7650,9 @@ void Client::Handle_OP_GuildLeader(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_GuildManageBanker(const EQApplicationPacket *app)
|
||||
{
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Got OP_GuildManageBanker of len %d", app->size);
|
||||
LogGuilds("Got OP_GuildManageBanker of len [{}]", app->size);
|
||||
if (app->size != sizeof(GuildManageBanker_Struct)) {
|
||||
Log(Logs::Detail, Logs::Guilds, "Error: app size of %i != size of OP_GuildManageBanker of %i\n", app->size, sizeof(GuildManageBanker_Struct));
|
||||
LogGuilds("Error: app size of [{}] != size of OP_GuildManageBanker of [{}]\n", app->size, sizeof(GuildManageBanker_Struct));
|
||||
return;
|
||||
}
|
||||
GuildManageBanker_Struct* gmb = (GuildManageBanker_Struct*)app->pBuffer;
|
||||
@@ -7727,16 +7727,16 @@ void Client::Handle_OP_GuildManageBanker(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildPeace(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Got OP_GuildPeace of len %d", app->size);
|
||||
LogGuilds("Got OP_GuildPeace of len [{}]", app->size);
|
||||
return;
|
||||
}
|
||||
|
||||
void Client::Handle_OP_GuildPromote(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildPromote");
|
||||
LogGuilds("Received OP_GuildPromote");
|
||||
|
||||
if (app->size != sizeof(GuildPromoteStruct)) {
|
||||
Log(Logs::Detail, Logs::Guilds, "Error: app size of %i != size of GuildDemoteStruct of %i\n", app->size, sizeof(GuildPromoteStruct));
|
||||
LogGuilds("Error: app size of [{}] != size of GuildDemoteStruct of [{}]\n", app->size, sizeof(GuildPromoteStruct));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7768,7 +7768,7 @@ void Client::Handle_OP_GuildPromote(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Promoting %s (%d) from rank %s (%d) to %s (%d) in %s (%d)",
|
||||
LogGuilds("Promoting [{}] ([{}]) from rank [{}] ([{}]) to [{}] ([{}]) in [{}] ([{}])",
|
||||
promote->target, gci.char_id,
|
||||
guild_mgr.GetRankName(GuildID(), gci.rank), gci.rank,
|
||||
guild_mgr.GetRankName(GuildID(), rank), rank,
|
||||
@@ -7785,7 +7785,7 @@ void Client::Handle_OP_GuildPromote(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildPublicNote(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildPublicNote");
|
||||
LogGuilds("Received OP_GuildPublicNote");
|
||||
|
||||
if (app->size < sizeof(GuildUpdate_PublicNote)) {
|
||||
// client calls for a motd on login even if they arent in a guild
|
||||
@@ -7804,7 +7804,7 @@ void Client::Handle_OP_GuildPublicNote(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Setting public note on %s (%d) in guild %s (%d) to: %s",
|
||||
LogGuilds("Setting public note on [{}] ([{}]) in guild [{}] ([{}]) to: [{}]",
|
||||
gpn->target, gci.char_id,
|
||||
guild_mgr.GetGuildName(GuildID()), GuildID(),
|
||||
gpn->note);
|
||||
@@ -7821,7 +7821,7 @@ void Client::Handle_OP_GuildPublicNote(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildRemove(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_GuildRemove");
|
||||
LogGuilds("Received OP_GuildRemove");
|
||||
|
||||
if (app->size != sizeof(GuildCommand_Struct)) {
|
||||
std::cout << "Wrong size: OP_GuildRemove, size=" << app->size << ", expected " << sizeof(GuildCommand_Struct) << std::endl;
|
||||
@@ -7851,7 +7851,7 @@ void Client::Handle_OP_GuildRemove(const EQApplicationPacket *app)
|
||||
}
|
||||
char_id = client->CharacterID();
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Removing %s (%d) from guild %s (%d)",
|
||||
LogGuilds("Removing [{}] ([{}]) from guild [{}] ([{}])",
|
||||
client->GetName(), client->CharacterID(),
|
||||
guild_mgr.GetGuildName(GuildID()), GuildID());
|
||||
}
|
||||
@@ -7867,7 +7867,7 @@ void Client::Handle_OP_GuildRemove(const EQApplicationPacket *app)
|
||||
}
|
||||
char_id = gci.char_id;
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Removing remote/offline %s (%d) into guild %s (%d)",
|
||||
LogGuilds("Removing remote/offline [{}] ([{}]) into guild [{}] ([{}])",
|
||||
gci.char_name.c_str(), gci.char_id,
|
||||
guild_mgr.GetGuildName(GuildID()), GuildID());
|
||||
}
|
||||
@@ -7977,7 +7977,7 @@ void Client::Handle_OP_GuildUpdateURLAndChannel(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_GuildWar(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Got OP_GuildWar of len %d", app->size);
|
||||
LogGuilds("Got OP_GuildWar of len [{}]", app->size);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12286,7 +12286,7 @@ void Client::Handle_OP_SenseTraps(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_SetGuildMOTD(const EQApplicationPacket *app)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds, "Received OP_SetGuildMOTD");
|
||||
LogGuilds("Received OP_SetGuildMOTD");
|
||||
|
||||
if (app->size != sizeof(GuildMOTD_Struct)) {
|
||||
// client calls for a motd on login even if they arent in a guild
|
||||
@@ -12304,7 +12304,7 @@ void Client::Handle_OP_SetGuildMOTD(const EQApplicationPacket *app)
|
||||
|
||||
GuildMOTD_Struct* gmotd = (GuildMOTD_Struct*)app->pBuffer;
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Setting MOTD for %s (%d) to: %s - %s",
|
||||
LogGuilds("Setting MOTD for [{}] ([{}]) to: [{}] - [{}]",
|
||||
guild_mgr.GetGuildName(GuildID()), GuildID(), GetName(), gmotd->motd);
|
||||
|
||||
if (!guild_mgr.SetGuildMOTD(GuildID(), gmotd->motd, GetName())) {
|
||||
|
||||
+7
-8
@@ -5968,9 +5968,9 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
if(guild_id == GUILD_NONE) {
|
||||
Log(Logs::Detail, Logs::Guilds, "%s: Removing %s (%d) from guild with GM command.", c->GetName(), sep->arg[2], charid);
|
||||
LogGuilds("[{}]: Removing [{}] ([{}]) from guild with GM command", c->GetName(), sep->arg[2], charid);
|
||||
} else {
|
||||
Log(Logs::Detail, Logs::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);
|
||||
LogGuilds("[{}]: Putting [{}] ([{}]) into guild [{}] ([{}]) with GM command", c->GetName(), sep->arg[2], charid, guild_mgr.GetGuildName(guild_id), guild_id);
|
||||
}
|
||||
|
||||
if(!guild_mgr.SetGuild(charid, guild_id, GUILD_MEMBER)) {
|
||||
@@ -6017,8 +6017,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s: Setting %s (%d)'s guild rank to %d with GM command.", c->GetName(),
|
||||
sep->arg[2], charid, rank);
|
||||
LogGuilds("[{}]: Setting [{}] ([{}])'s guild rank to [{}] with GM command", c->GetName(), sep->arg[2], charid, rank);
|
||||
|
||||
if(!guild_mgr.SetGuildRank(charid, rank))
|
||||
c->Message(Chat::Red, "Error while setting rank %d on '%s'.", rank, sep->arg[2]);
|
||||
@@ -6059,7 +6058,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
|
||||
uint32 id = guild_mgr.CreateGuild(sep->argplus[3], leader);
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s: Creating guild %s with leader %d with GM command. It was given id %lu.", c->GetName(),
|
||||
LogGuilds("[{}]: Creating guild [{}] with leader [{}] with GM command. It was given id [{}]", c->GetName(),
|
||||
sep->argplus[3], leader, (unsigned long)id);
|
||||
|
||||
if (id == GUILD_NONE)
|
||||
@@ -6098,7 +6097,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s: Deleting guild %s (%d) with GM command.", c->GetName(),
|
||||
LogGuilds("[{}]: Deleting guild [{}] ([{}]) with GM command", c->GetName(),
|
||||
guild_mgr.GetGuildName(id), id);
|
||||
|
||||
if (!guild_mgr.DeleteGuild(id))
|
||||
@@ -6132,7 +6131,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s: Renaming guild %s (%d) to '%s' with GM command.", c->GetName(),
|
||||
LogGuilds("[{}]: Renaming guild [{}] ([{}]) to [{}] with GM command", c->GetName(),
|
||||
guild_mgr.GetGuildName(id), id, sep->argplus[3]);
|
||||
|
||||
if (!guild_mgr.RenameGuild(id, sep->argplus[3]))
|
||||
@@ -6183,7 +6182,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "%s: Setting leader of guild %s (%d) to %d with GM command.", c->GetName(),
|
||||
LogGuilds("[{}]: Setting leader of guild [{}] ([{}]) to [{}] with GM command", c->GetName(),
|
||||
guild_mgr.GetGuildName(id), id, leader);
|
||||
|
||||
if(!guild_mgr.SetGuildLeader(id, leader))
|
||||
|
||||
+8
-8
@@ -56,7 +56,7 @@ void Client::SendGuildMOTD(bool GetGuildMOTDReply) {
|
||||
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending OP_GuildMOTD of length %d", outapp->size);
|
||||
LogGuilds("Sending OP_GuildMOTD of length [{}]", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
@@ -147,10 +147,10 @@ void Client::SendGuildSpawnAppearance() {
|
||||
if (!IsInAGuild()) {
|
||||
// clear guildtag
|
||||
SendAppearancePacket(AT_GuildID, GUILD_NONE);
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending spawn appearance for no guild tag.");
|
||||
LogGuilds("Sending spawn appearance for no guild tag");
|
||||
} else {
|
||||
uint8 rank = guild_mgr.GetDisplayedRank(GuildID(), GuildRank(), CharacterID());
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending spawn appearance for guild %d at rank %d", GuildID(), rank);
|
||||
LogGuilds("Sending spawn appearance for guild [{}] at rank [{}]", GuildID(), rank);
|
||||
SendAppearancePacket(AT_GuildID, GuildID());
|
||||
if (ClientVersion() >= EQEmu::versions::ClientVersion::RoF)
|
||||
{
|
||||
@@ -174,11 +174,11 @@ void Client::SendGuildList() {
|
||||
//ask the guild manager to build us a nice guild list packet
|
||||
outapp->pBuffer = guild_mgr.MakeGuildList(/*GetName()*/"", outapp->size);
|
||||
if(outapp->pBuffer == nullptr) {
|
||||
Log(Logs::Detail, Logs::Guilds, "Unable to make guild list!");
|
||||
LogGuilds("Unable to make guild list!");
|
||||
return;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending OP_ZoneGuildList of length %d", outapp->size);
|
||||
LogGuilds("Sending OP_ZoneGuildList of length [{}]", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ void Client::SendGuildMembers() {
|
||||
outapp->pBuffer = data;
|
||||
data = nullptr;
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending OP_GuildMemberList of length %d", outapp->size);
|
||||
LogGuilds("Sending OP_GuildMemberList of length [{}]", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
@@ -227,7 +227,7 @@ void Client::RefreshGuildInfo()
|
||||
|
||||
CharGuildInfo info;
|
||||
if(!guild_mgr.GetCharInfo(CharacterID(), info)) {
|
||||
Log(Logs::Detail, Logs::Guilds, "Unable to obtain guild char info for %s (%d)", GetName(), CharacterID());
|
||||
LogGuilds("Unable to obtain guild char info for [{}] ([{}])", GetName(), CharacterID());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ void Client::SendGuildJoin(GuildJoin_Struct* gj){
|
||||
outgj->rank = gj->rank;
|
||||
outgj->zoneid = gj->zoneid;
|
||||
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending OP_GuildManageAdd for join of length %d", outapp->size);
|
||||
LogGuilds("Sending OP_GuildManageAdd for join of length [{}]", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
|
||||
+11
-12
@@ -32,7 +32,7 @@ extern WorldServer worldserver;
|
||||
extern volatile bool is_zone_loaded;
|
||||
|
||||
void ZoneGuildManager::SendGuildRefresh(uint32 guild_id, bool name, bool motd, bool rank, bool relation) {
|
||||
Log(Logs::Detail, Logs::Guilds, "Sending guild refresh for %d to world, changes: name=%d, motd=%d, rank=d, relation=%d", guild_id, name, motd, rank, relation);
|
||||
LogGuilds("Sending guild refresh for [{}] to world, changes: name=[{}], motd=[{}], rank=d, relation=[{}]", guild_id, name, motd, rank, relation);
|
||||
auto 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(Logs::Detail, Logs::Guilds, "Guild lookup for char %d when sending char refresh.", charid);
|
||||
LogGuilds("Guild lookup for char [{}] 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(Logs::Detail, Logs::Guilds, "Sending char refresh for %d from guild %d to world", charid, guild_id);
|
||||
LogGuilds("Sending char refresh for [{}] from guild [{}] to world", charid, guild_id);
|
||||
|
||||
auto 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(Logs::Detail, Logs::Guilds, "Sending guild delete for guild %d to world", guild_id);
|
||||
LogGuilds("Sending guild delete for guild [{}] to world", guild_id);
|
||||
auto 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(Logs::Detail, Logs::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);
|
||||
LogGuilds("Received guild refresh from world for [{}], changes: name=[{}], motd=[{}], rank=[{}], relation=[{}]", 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(Logs::Detail, Logs::Guilds, "Received guild member refresh from world for char %d from guild %d", s->char_id, s->guild_id);
|
||||
LogGuilds("Received guild member refresh from world for char [{}] from guild [{}]", 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(Logs::Detail, Logs::Guilds, "Received guild delete from world for guild %d", s->guild_id);
|
||||
LogGuilds("Received guild delete from world for guild [{}]", s->guild_id);
|
||||
|
||||
//clear all the guild tags.
|
||||
entity_list.RefreshAllGuildInfo(s->guild_id);
|
||||
@@ -417,23 +417,22 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
|
||||
if (!c || !c->IsInAGuild())
|
||||
{
|
||||
Log(Logs::Detail, Logs::Guilds,"Invalid Client or not in guild. ID=%i", FromID);
|
||||
LogGuilds("Invalid Client or not in guild. ID=[{}]", FromID);
|
||||
break;
|
||||
}
|
||||
Log(Logs::Detail, Logs::Guilds,"Processing ServerOP_OnlineGuildMembersResponse");
|
||||
LogGuilds("Processing ServerOP_OnlineGuildMembersResponse");
|
||||
auto outapp = new EQApplicationPacket(OP_GuildMemberUpdate, sizeof(GuildMemberUpdate_Struct));
|
||||
GuildMemberUpdate_Struct *gmus = (GuildMemberUpdate_Struct*)outapp->pBuffer;
|
||||
char Name[64];
|
||||
gmus->LastSeen = time(nullptr);
|
||||
gmus->InstanceID = 0;
|
||||
gmus->GuildID = c->GuildID();
|
||||
for (int i=0;i<Count;i++)
|
||||
{
|
||||
for (int i = 0; i < Count; i++) {
|
||||
// Just make the packet once and swap out name/zone and send
|
||||
VARSTRUCT_DECODE_STRING(Name, Buffer);
|
||||
strn0cpy(gmus->MemberName, Name, sizeof(gmus->MemberName));
|
||||
gmus->ZoneID = VARSTRUCT_DECODE_TYPE(uint32, Buffer);
|
||||
Log(Logs::Detail, Logs::Guilds,"Sending OP_GuildMemberUpdate to %i. Name=%s ZoneID=%i",FromID,Name,gmus->ZoneID);
|
||||
LogGuilds("Sending OP_GuildMemberUpdate to [{}]. Name=[{}] ZoneID=[{}]", FromID, Name, gmus->ZoneID);
|
||||
c->QueuePacket(outapp);
|
||||
}
|
||||
safe_delete(outapp);
|
||||
|
||||
Reference in New Issue
Block a user