diff options
| author | Ghost Rider <ghostrider@gmail.com> | 2016-09-23 13:20:28 +0330 |
|---|---|---|
| committer | Ghost Rider <ghostrider@gmail.com> | 2016-09-23 13:21:03 +0330 |
| commit | fc858d14281941c92ad9f26fbbdc333af6da8822 (patch) | |
| tree | d0a305c353e8342be7e918a379d46b8c91e9ce58 | |
| parent | 429700e614c27627becc50bcc45cfa5315b9d4ed (diff) | |
Core/Battlefield: Fix buff unstack from horde team when new player join WG
Close issues: #17977
| -rw-r--r-- | src/server/game/Battlefield/Zones/BattlefieldWG.cpp | 7 | ||||
| -rw-r--r-- | src/server/game/Battlefield/Zones/BattlefieldWG.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index cb640d8f86d..20ccad003db 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -1449,9 +1449,9 @@ void BattlefieldWG::UpdateTenacity() if (newStack == int32(m_tenacityStack)) return; - if (m_tenacityStack > 0 && newStack <= 0) // old buff was on alliance + if (m_buffedTeam == 0) // old buff was on alliance team = TEAM_ALLIANCE; - else if (newStack >= 0) // old buff was on horde + else if (m_buffedTeam == 1) // old buff was on horde team = TEAM_HORDE; m_tenacityStack = newStack; @@ -1472,6 +1472,7 @@ void BattlefieldWG::UpdateTenacity() if (newStack) { team = newStack > 0 ? TEAM_ALLIANCE : TEAM_HORDE; + m_buffedTeam = team; if (newStack < 0) newStack = -newStack; @@ -1505,6 +1506,8 @@ void BattlefieldWG::UpdateTenacity() creature->CastSpell(creature, buff_honor, true); } } + else + m_buffedTeam = 2; } WintergraspCapturePoint::WintergraspCapturePoint(BattlefieldWG* battlefield, TeamId teamInControl) : BfCapturePoint(battlefield) diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index aa420e08fc3..81a0a158008 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -408,6 +408,7 @@ class TC_GAME_API BattlefieldWG : public Battlefield uint32 m_tenacityStack; uint32 m_saveTimer; + uint8 m_buffedTeam; ObjectGuid m_titansRelicGUID; }; |
