From afd21517699e736a2b8dc3ea4ddf098498c61c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Thu, 22 Sep 2022 15:58:07 -0600 Subject: [PATCH] Fix bots not able to invite nearby players to existing guild --- src/strategy/actions/GuildManagementActions.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/strategy/actions/GuildManagementActions.cpp b/src/strategy/actions/GuildManagementActions.cpp index ce4ab601..a5d1de12 100644 --- a/src/strategy/actions/GuildManagementActions.cpp +++ b/src/strategy/actions/GuildManagementActions.cpp @@ -158,9 +158,6 @@ bool GuildManageNearbyAction::Execute(Event event) if (!player || bot == player) continue; - if (player->GetGuildId() != bot->GetGuildId()) - continue; - if (player->GetGuildId()) //Promote or demote nearby members based on chance. { Guild::Member* member = guild->GetMember(player->GetGUID()); @@ -231,7 +228,7 @@ bool GuildManageNearbyAction::isUseful() Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId()); Guild::Member* botMember = guild->GetMember(bot->GetGUID()); - return guild->GetRankRights(botMember->GetRankId()) & (GR_RIGHT_DEMOTE | GR_RIGHT_PROMOTE | GR_RIGHT_INVITE); + return guild->GetRankRights(botMember->GetRankId()) & (GR_RIGHT_DEMOTE | GR_RIGHT_PROMOTE | GR_RIGHT_INVITE); } bool GuildLeaveAction::Execute(Event event)