diff options
author | robinsch <robinsch@users.noreply.github.com> | 2022-12-05 10:16:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 10:16:38 +0100 |
commit | 036c72327f50af5f231c5ec8cc69af7db7f4aaa8 (patch) | |
tree | dd2c496b7f4b30bc769cb85efeb1a9b861ecdcd7 | |
parent | 297541e9c9bf90d410922db397d2f94dff9592cc (diff) |
Core/Guild: Fixed possible guild exploit (#28577)
* Core/Guild: Fixed possible guild exploit
* Core/Guild: Do not process HandleGuildDeclineOpcode if player is in guild
-rw-r--r-- | src/server/game/Handlers/GuildHandler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp index b7f8c2898c5..fb80466f687 100644 --- a/src/server/game/Handlers/GuildHandler.cpp +++ b/src/server/game/Handlers/GuildHandler.cpp @@ -69,9 +69,10 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPackets::Guild::AcceptGuildInvit void WorldSession::HandleGuildDeclineOpcode(WorldPackets::Guild::GuildDeclineInvitation& /*decline*/) { TC_LOG_DEBUG("guild", "CMSG_GUILD_DECLINE [%s]", GetPlayerInfo().c_str()); + if (GetPlayer()->GetGuildId()) + return; GetPlayer()->SetGuildIdInvited(0); - GetPlayer()->SetInGuild(0); } void WorldSession::HandleGuildInfoOpcode(WorldPackets::Guild::GuildGetInfo& /*packet*/) |