aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-06 22:13:59 -0500
committermegamage <none@none>2009-09-06 22:13:59 -0500
commite72065780a43401d95db3426f49828d3c6718237 (patch)
treefaad10bf05670c9e97b4acfb613e01bd2820e255 /src
parentc6a831e0aee14d78ec300768dd429d790c716944 (diff)
*Fix the bug that tenacity buff in wintergrasp is not casted correctly. Thanks to drahy.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Wintergrasp.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp
index 35602251715..153249aed50 100644
--- a/src/game/Wintergrasp.cpp
+++ b/src/game/Wintergrasp.cpp
@@ -721,19 +721,19 @@ void OPvPWintergrasp::UpdateTenacityStack()
int32 newStack = 0;
if(allianceNum && hordeNum)
{
- if(allianceNum > hordeNum)
- newStack = allianceNum / hordeNum - 1;
- else if(allianceNum < hordeNum)
- newStack = 1 - int32(hordeNum / allianceNum);
+ if(allianceNum < hordeNum)
+ newStack = hordeNum / allianceNum - 1; // positive, should cast on alliance
+ else if(allianceNum > hordeNum)
+ newStack = 1 - int32(allianceNum / hordeNum); // negative, should cast on horde
}
if(newStack == m_tenacityStack)
return;
// Remove old buff
- if(m_tenacityStack > 0)
+ if(m_tenacityStack > 0) // old buff was on alliance
{
- if(newStack <= 0)
+ if(newStack <= 0) // new buff should on horde
{
TeamCastSpell(TEAM_ALLIANCE, -SPELL_TENACITY);
VehicleCastSpell(TEAM_ALLIANCE, -SPELL_TENACITY_VEHICLE);
@@ -752,7 +752,7 @@ void OPvPWintergrasp::UpdateTenacityStack()
// Apply new buff
if(newStack)
{
- TeamId team = newStack > 0 ? TEAM_HORDE : TEAM_ALLIANCE;
+ TeamId team = newStack > 0 ? TEAM_ALLIANCE : TEAM_HORDE;
if(newStack < 0) newStack = -newStack;
for(PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
(*itr)->SetAuraStack(SPELL_TENACITY, *itr, newStack);