[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
This commit is contained in:
w12x
2008-10-17 16:36:07 -05:00
parent 62409ac2a4
commit ab9eb277b4
10 changed files with 144 additions and 13 deletions
+8 -2
View File
@@ -30,6 +30,12 @@
#include "World.h"
#include "Util.h"
// these variables aren't used outside of this file, so declare them only here
uint32 BG_EY_HonorScoreTicks[BG_HONOR_MODE_NUM] = {
330, // normal honor
200 // holiday
};
BattleGroundEY::BattleGroundEY()
{
m_BuffChange = true;
@@ -159,10 +165,10 @@ void BattleGroundEY::AddPoints(uint32 Team, uint32 Points)
uint8 team_index = GetTeamIndexByTeamId(Team);
m_TeamScores[team_index] += Points;
m_HonorScoreTics[team_index] += Points;
if (m_HonorScoreTics[team_index] >= BG_HONOR_SCORE_TICKS)
if (m_HonorScoreTics[team_index] >= BG_EY_HonorScoreTicks[m_HonorMode])
{
RewardHonorToTeam(20, Team);
m_HonorScoreTics[team_index] -= BG_HONOR_SCORE_TICKS;
m_HonorScoreTics[team_index] -= BG_EY_HonorScoreTicks[m_HonorMode];
}
UpdateTeamScore(Team);
}