From 036c72327f50af5f231c5ec8cc69af7db7f4aaa8 Mon Sep 17 00:00:00 2001 From: robinsch Date: Mon, 5 Dec 2022 10:16:38 +0100 Subject: Core/Guild: Fixed possible guild exploit (#28577) * Core/Guild: Fixed possible guild exploit * Core/Guild: Do not process HandleGuildDeclineOpcode if player is in guild --- src/server/game/Handlers/GuildHandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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*/) -- cgit v1.2.3