mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
feat(Core/Player): Allow stay in group when logged out (#10887)
* Config option * Extra check * Fixes Updated some comments Removed the config option from the first if since it's not necessary (afaik) * REVERT Reverting the if to what I had it at originally until I can get some input on it... * Updated if Got some input and this is working as intended * Update World.cpp * Update src/server/worldserver/worldserver.conf.dist Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -616,12 +616,13 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
// there are some positive auras from boss encounters that can be kept by logging out and logging in after boss is dead, and may be used on next bosses
|
||||
_player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP);
|
||||
|
||||
///- If the player is in a group (or invited), remove him. If the group if then only 1 person, disband the group.
|
||||
_player->UninviteFromGroup();
|
||||
///- If the player is in a group and LeaveGroupOnLogout is enabled or if the player is invited to a group, remove him. If the group is then only 1 person, disband the group.
|
||||
if (!_player->GetGroup() || sWorld->getBoolConfig(CONFIG_LEAVE_GROUP_ON_LOGOUT))
|
||||
_player->UninviteFromGroup();
|
||||
|
||||
// remove player from the group if he is:
|
||||
// a) in group; b) not in raid group; c) logging out normally (not being kicked or disconnected)
|
||||
if (_player->GetGroup() && !_player->GetGroup()->isRaidGroup() && !_player->GetGroup()->isLFGGroup() && m_Socket)
|
||||
// a) in group; b) not in raid group; c) logging out normally (not being kicked or disconnected) d) LeaveGroupOnLogout is enabled
|
||||
if (_player->GetGroup() && !_player->GetGroup()->isRaidGroup() && !_player->GetGroup()->isLFGGroup() && m_Socket && sWorld->getBoolConfig(CONFIG_LEAVE_GROUP_ON_LOGOUT))
|
||||
_player->RemoveFromGroup();
|
||||
|
||||
// pussywizard: checked second time after being removed from a group
|
||||
|
||||
Reference in New Issue
Block a user