[7551] apply deserter debuff also if player leaves the bg in preparation phase Author: balrok
prior this deserter debuff was only applied at status_in_progress --HG-- branch : trunk
This commit is contained in:
+5
-4
@@ -17954,13 +17954,14 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
|
||||
{
|
||||
if(BattleGround *bg = GetBattleGround())
|
||||
{
|
||||
bool need_debuf = bg->isBattleGround() && (bg->GetStatus() == STATUS_IN_PROGRESS) && sWorld.getConfig(CONFIG_BATTLEGROUND_CAST_DESERTER);
|
||||
|
||||
bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true);
|
||||
|
||||
// call after remove to be sure that player resurrected for correct cast
|
||||
if(need_debuf)
|
||||
CastSpell(this, 26013, true); // Deserter
|
||||
if( bg->isBattleGround() && sWorld.getConfig(CONFIG_BATTLEGROUND_CAST_DESERTER) )
|
||||
{
|
||||
if( bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN )
|
||||
CastSpell(this, 26013, true); // Deserter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user