mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7551] apply deserter debuff also if player leaves the bg in preparation phase
prior this deserter debuff was only applied at status_in_progress
This commit is contained in:
parent
bf5ba338d9
commit
02d05a2339
2 changed files with 6 additions and 5 deletions
|
|
@ -17504,14 +17504,15 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
|
||||||
{
|
{
|
||||||
if(BattleGround *bg = GetBattleGround())
|
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);
|
bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true);
|
||||||
|
|
||||||
// call after remove to be sure that player resurrected for correct cast
|
// call after remove to be sure that player resurrected for correct cast
|
||||||
if(need_debuf)
|
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
|
CastSpell(this, 26013, true); // Deserter
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::CanJoinToBattleground() const
|
bool Player::CanJoinToBattleground() const
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7550"
|
#define REVISION_NR "7551"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue