aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundMgr.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/BattleGroundMgr.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/BattleGroundMgr.cpp')
-rw-r--r--src/game/BattleGroundMgr.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp
index 23f240721bb..4c6d94f6b10 100644
--- a/src/game/BattleGroundMgr.cpp
+++ b/src/game/BattleGroundMgr.cpp
@@ -1784,3 +1784,14 @@ void BattleGroundMgr::ToggleArenaTesting()
m_ArenaTesting = !m_ArenaTesting;
sWorld.SendWorldText(LANG_ARENA_TESTING, m_ArenaTesting ? "on" : "off");
}
+
+void BattleGroundMgr::SetHolidayWeekends(uint32 mask)
+{
+ for(uint32 bgtype = 1; bgtype <= 8; ++bgtype)
+ {
+ if(BattleGround * bg = GetBattleGroundTemplate(bgtype))
+ {
+ bg->SetHoliday(mask & (1 << bgtype));
+ }
+ }
+}