mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
- Fixed cross faction guilds not allowed by config
This commit is contained in:
@@ -2207,10 +2207,12 @@ void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 max
|
|||||||
bool Guild::AddMember(ObjectGuid guid, uint8 rankId)
|
bool Guild::AddMember(ObjectGuid guid, uint8 rankId)
|
||||||
{
|
{
|
||||||
Player* player = ObjectAccessor::FindConnectedPlayer(guid);
|
Player* player = ObjectAccessor::FindConnectedPlayer(guid);
|
||||||
|
Player* leader = ObjectAccessor::FindConnectedPlayer(this->GetLeaderGUID());
|
||||||
// Player cannot be in guild
|
// Player cannot be in guild
|
||||||
if (player)
|
if (player)
|
||||||
{
|
{
|
||||||
if (player->GetGuildId() != 0)
|
if (player->GetGuildId() != 0 ||
|
||||||
|
(!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && (leader->GetTeamId() != player->GetTeamId())))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (sCharacterCache->GetCharacterGuildIdByGuid(guid) != 0)
|
else if (sCharacterCache->GetCharacterGuildIdByGuid(guid) != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user