mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
new BattlegroundDesertionTypes for hook OnBattlegroundDesertion (#20039)
* new BattlegroundDesertionTypes for hook OnBattlegroundDesertion * chore: minor improvements --------- Co-authored-by: laasker <79991768+laasker@users.noreply.github.com>
This commit is contained in:
@@ -637,6 +637,9 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
sScriptMgr->OnBattlegroundDesertion(_player, BG_DESERTION_TYPE_INVITE_LOGOUT);
|
||||
}
|
||||
|
||||
if (bgQueueTypeId >= BATTLEGROUND_QUEUE_2v2 && bgQueueTypeId < MAX_BATTLEGROUND_QUEUE_TYPES && _player->IsInvitedForBattlegroundQueueType(bgQueueTypeId))
|
||||
sScriptMgr->OnBattlegroundDesertion(_player, ARENA_DESERTION_TYPE_INVITE_LOGOUT);
|
||||
|
||||
_player->RemoveBattlegroundQueueId(bgQueueTypeId);
|
||||
sBattlegroundMgr->GetBattlegroundQueue(bgQueueTypeId).RemovePlayer(_player->GetGUID(), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user