Merge pull request #67 from kadeshar/guild-cross-faction-fix

Fixed cross faction guilds not allowed by config
This commit is contained in:
bash
2025-09-14 10:51:02 +02:00
committed by GitHub

View File

@@ -2207,10 +2207,12 @@ void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 max
bool Guild::AddMember(ObjectGuid guid, uint8 rankId)
{
Player* player = ObjectAccessor::FindConnectedPlayer(guid);
Player* leader = ObjectAccessor::FindConnectedPlayer(this->GetLeaderGUID());
// Player cannot be in guild
if (player)
{
if (player->GetGuildId() != 0)
if (player->GetGuildId() != 0 ||
(!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && (leader->GetTeamId() != player->GetTeamId())))
return false;
}
else if (sCharacterCache->GetCharacterGuildIdByGuid(guid) != 0)