mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-26 08:29:21 -04:00
Core/Guilds: Fix Guild::HandleSetMemberNote logic according to method declaration. (#17078)
This change has no effect on server behavior.
This commit is contained in:
committed by
Duarte Duarte
parent
b36da77185
commit
dd39cb8714
@@ -1443,17 +1443,17 @@ void Guild::HandleSetBankTabInfo(WorldSession* session, uint8 tabId, std::string
|
||||
_BroadcastEvent(GE_BANK_TAB_UPDATED, ObjectGuid::Empty, aux, name.c_str(), icon.c_str());
|
||||
}
|
||||
|
||||
void Guild::HandleSetMemberNote(WorldSession* session, std::string const& name, std::string const& note, bool isPublic)
|
||||
void Guild::HandleSetMemberNote(WorldSession* session, std::string const& name, std::string const& note, bool officer)
|
||||
{
|
||||
// Player must have rights to set public/officer note
|
||||
if (!_HasRankRight(session->GetPlayer(), isPublic ? GR_RIGHT_EPNOTE : GR_RIGHT_EOFFNOTE))
|
||||
if (!_HasRankRight(session->GetPlayer(), officer ? GR_RIGHT_EOFFNOTE : GR_RIGHT_EPNOTE))
|
||||
SendCommandResult(session, GUILD_COMMAND_PUBLIC_NOTE, ERR_GUILD_PERMISSIONS);
|
||||
else if (Member* member = GetMember(name))
|
||||
{
|
||||
if (isPublic)
|
||||
member->SetPublicNote(note);
|
||||
else
|
||||
if (officer)
|
||||
member->SetOfficerNote(note);
|
||||
else
|
||||
member->SetPublicNote(note);
|
||||
|
||||
HandleRoster(session);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
|
||||
|
||||
if (normalizePlayerName(playerName))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetMemberNote(this, playerName, note, true);
|
||||
guild->HandleSetMemberNote(this, playerName, note, false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
|
||||
@@ -192,7 +192,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
|
||||
|
||||
if (normalizePlayerName(playerName))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetMemberNote(this, playerName, note, false);
|
||||
guild->HandleSetMemberNote(this, playerName, note, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
|
||||
|
||||
Reference in New Issue
Block a user