Core/RBAC: Add permission that prevents getting a battleground deserter debuff.
(cherry picked from commit 196dd226dfb0ffe80d4db8531d8d337fba3d2003)
This commit is contained in:
@@ -24392,14 +24392,18 @@ Team Player::GetBGTeam() const
|
||||
return m_bgData.bgTeam ? m_bgData.bgTeam : GetTeam();
|
||||
}
|
||||
|
||||
void Player::LeaveBattleground(bool teleportToEntryPoint)
|
||||
void Player::LeaveBattleground(bool teleportToEntryPoint /*= true*/)
|
||||
{
|
||||
if (Battleground* bg = GetBattleground())
|
||||
{
|
||||
bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true);
|
||||
Battleground* bg = GetBattleground();
|
||||
if (!bg)
|
||||
return;
|
||||
|
||||
// call after remove to be sure that player resurrected for correct cast
|
||||
if (bg->isBattleground() && !IsGameMaster() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_CAST_DESERTER))
|
||||
bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true);
|
||||
|
||||
// call after remove to be sure that player resurrected for correct cast
|
||||
if (bg->isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_CAST_DESERTER))
|
||||
{
|
||||
if (!GetSession()->HasPermission(rbac::RBAC_PERM_NO_BATTLEGROUND_DESERTER_DEBUFF))
|
||||
{
|
||||
if (bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user