aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundAB.cpp
diff options
context:
space:
mode:
authorw12x <none@none>2008-10-17 16:36:07 -0500
committerw12x <none@none>2008-10-17 16:36:07 -0500
commitab9eb277b4f001332ef2d0b623f72cfe176130d9 (patch)
treec39e35d77fd89997dc1091910746fd84899fa7a4 /src/game/BattleGroundAB.cpp
parent62409ac2a44b4af071aad765fd60e8281593aad7 (diff)
[svn] Enabled game events to change the honor and reputation gaining speed in battlegrounds. This is done by a new table in the world database, game_event_battleground_holiday. Structure is the following:
event - id of the game event bgflag - bitmask, used to set which battleground(s) give extra honor/reputation when the event is active. To add extra honor on a battleground, use 2 ^ bgTypeId as mask. Multiple battlegrounds can be set by logical 'or' ('|') operation. You will need database data for the table, please check trinitydatabase.org. --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundAB.cpp')
-rw-r--r--src/game/BattleGroundAB.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp
index 74d97a64695..ea40889f7b2 100644
--- a/src/game/BattleGroundAB.cpp
+++ b/src/game/BattleGroundAB.cpp
@@ -30,6 +30,17 @@
#include "World.h"
#include "Util.h"
+// these variables aren't used outside of this file, so declare them only here
+uint32 BG_AB_HonorScoreTicks[BG_HONOR_MODE_NUM] = {
+ 330, // normal honor
+ 200 // holiday
+};
+
+uint32 BG_AB_ReputationScoreTicks[BG_HONOR_MODE_NUM] = {
+ 200, // normal honor
+ 150 // holiday
+};
+
BattleGroundAB::BattleGroundAB()
{
m_BuffChange = true;
@@ -186,15 +197,15 @@ void BattleGroundAB::Update(time_t diff)
m_TeamScores[team] += BG_AB_TickPoints[points];
m_HonorScoreTics[team] += BG_AB_TickPoints[points];
m_ReputationScoreTics[team] += BG_AB_TickPoints[points];
- if( m_ReputationScoreTics[team] >= 200 )
+ if( m_ReputationScoreTics[team] >= BG_AB_ReputationScoreTicks[m_HonorMode] )
{
(team == BG_TEAM_ALLIANCE) ? RewardReputationToTeam(509, 10, ALLIANCE) : RewardReputationToTeam(510, 10, HORDE);
- m_ReputationScoreTics[team] -= 200;
+ m_ReputationScoreTics[team] -= BG_AB_ReputationScoreTicks[m_HonorMode];
}
- if( m_HonorScoreTics[team] >= BG_HONOR_SCORE_TICKS )
+ if( m_HonorScoreTics[team] >= BG_AB_HonorScoreTicks[m_HonorMode] )
{
(team == BG_TEAM_ALLIANCE) ? RewardHonorToTeam(20, ALLIANCE) : RewardHonorToTeam(20, HORDE);
- m_HonorScoreTics[team] -= BG_HONOR_SCORE_TICKS;
+ m_HonorScoreTics[team] -= BG_AB_HonorScoreTicks[m_HonorMode];
}
if( !m_IsInformedNearVictory && m_TeamScores[team] > 1800 )
{