aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-26 16:50:29 -0600
committermegamage <none@none>2009-03-26 16:50:29 -0600
commita97f5c8d988aecccc9396b2219842222a352836c (patch)
tree26d5a4edbf848b5b593b17e12482ce2d9522dcc9
parent4ba4e193e7a99ac248fc2246b5005ad6e0da77ec (diff)
[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
-rw-r--r--src/game/Player.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index f992d882d62..b441ad63dd2 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -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
+ }
}
}