diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index 8737b9395..68936d998 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -21,7 +21,8 @@ #include "BattleGround.h" #include "BattleGroundAB.h" #include "Creature.h" -#include "ObjectMgr.h" +#include "GameObject.h" +#include "BattleGroundMgr.h" #include "Language.h" #include "Util.h" #include "WorldPacket.h" @@ -580,7 +581,7 @@ void BattleGroundAB::Reset() m_ReputationScoreTics[BG_TEAM_ALLIANCE] = 0; m_ReputationScoreTics[BG_TEAM_HORDE] = 0; m_IsInformedNearVictory = false; - bool isBGWeekend = false; //TODO FIXME - call sBattleGroundMgr.IsBGWeekend(m_TypeID); - you must also implement that call! + bool isBGWeekend = sBattleGroundMgr.IsBGWeekend(GetTypeID()); m_HonorTics = (isBGWeekend) ? BG_AB_ABBGWeekendHonorTicks : BG_AB_NotABBGWeekendHonorTicks; m_ReputationTics = (isBGWeekend) ? BG_AB_ABBGWeekendReputationTicks : BG_AB_NotABBGWeekendReputationTicks; m_TeamScores500Disadvantage[BG_TEAM_ALLIANCE] = false; diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 824a8dd99..2b3d35f8f 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -22,6 +22,7 @@ #include "BattleGroundEY.h" #include "Creature.h" #include "ObjectMgr.h" +#include "BattleGroundMgr.h" #include "Language.h" #include "WorldPacket.h" #include "Util.h" @@ -519,7 +520,7 @@ void BattleGroundEY::Reset() m_DroppedFlagGUID = 0; m_PointAddingTimer = 0; m_TowerCapCheckTimer = 0; - bool isBGWeekend = false; //TODO FIXME - call sBattleGroundMgr.IsBGWeekend(m_TypeID); - you must also implement that call! + bool isBGWeekend = sBattleGroundMgr.IsBGWeekend(GetTypeID()); m_HonorTics = (isBGWeekend) ? BG_EY_EYWeekendHonorTicks : BG_EY_NotEYWeekendHonorTicks; for(uint8 i = 0; i < EY_POINTS_MAX; ++i) diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index f0a30dbd3..599108606 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -40,7 +40,7 @@ #include "ArenaTeam.h" #include "World.h" #include "WorldPacket.h" -#include "ProgressBar.h" +#include "GameEventMgr.h" #include "Policies/SingletonImp.h" @@ -2082,3 +2082,19 @@ void BattleGroundMgr::LoadBattleMastersEntry() sLog.outString( ">> Loaded %u battlemaster entries", count ); } +bool BattleGroundMgr::IsBGWeekend(BattleGroundTypeId bgTypeId) +{ + switch (bgTypeId) + { + case BATTLEGROUND_AV: + return IsHolidayActive(HOLIDAY_CALL_TO_ARMS_AV); + case BATTLEGROUND_EY: + return IsHolidayActive(HOLIDAY_CALL_TO_ARMS_EY); + case BATTLEGROUND_WS: + return IsHolidayActive(HOLIDAY_CALL_TO_ARMS_WS); + case BATTLEGROUND_SA: + return IsHolidayActive(HOLIDAY_CALL_TO_ARMS_SA); + default: + return false; + } +} diff --git a/src/game/BattleGroundMgr.h b/src/game/BattleGroundMgr.h index 7044a4de2..cad25abae 100644 --- a/src/game/BattleGroundMgr.h +++ b/src/game/BattleGroundMgr.h @@ -244,6 +244,8 @@ class BattleGroundMgr static BattleGroundQueueTypeId BGQueueTypeId(BattleGroundTypeId bgTypeId, uint8 arenaType); static BattleGroundTypeId BGTemplateId(BattleGroundQueueTypeId bgQueueTypeId); static uint8 BGArenaType(BattleGroundQueueTypeId bgQueueTypeId); + + static bool IsBGWeekend(BattleGroundTypeId bgTypeId); private: BattleMastersMap mBattleMastersMap; diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index 312735654..258c54887 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -23,6 +23,7 @@ #include "Creature.h" #include "GameObject.h" #include "ObjectMgr.h" +#include "BattleGroundMgr.h" #include "WorldPacket.h" #include "Language.h" @@ -591,7 +592,7 @@ void BattleGroundWS::Reset() m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE; m_TeamScores[BG_TEAM_ALLIANCE] = 0; m_TeamScores[BG_TEAM_HORDE] = 0; - bool isBGWeekend = false; //TODO FIXME - call sBattleGroundMgr.IsBGWeekend(m_TypeID); - you must also implement that call! + bool isBGWeekend = sBattleGroundMgr.IsBGWeekend(GetTypeID()); m_ReputationCapture = (isBGWeekend) ? 45 : 35; m_HonorWinKills = (isBGWeekend) ? 3 : 1; m_HonorEndKills = (isBGWeekend) ? 4 : 2; diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index b71801467..95b46ff0a 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1899,7 +1899,7 @@ enum HolidayIds HOLIDAY_NOBLEGARDEN = 181, HOLIDAY_CHILDRENS_WEEK = 201, HOLIDAY_CALL_TO_ARMS_AV = 283, - HOLIDAY_CALL_TO_ARMS_WG = 284, + HOLIDAY_CALL_TO_ARMS_WS = 284, HOLIDAY_CALL_TO_ARMS_AB = 285, HOLIDAY_FISHING_EXTRAVAGANZA = 301, HOLIDAY_HARVEST_FESTIVAL = 321, @@ -1907,7 +1907,7 @@ enum HolidayIds HOLIDAY_LUNAR_FESTIVAL = 327, HOLIDAY_LOVE_IS_IN_THE_AIR = 335, HOLIDAY_FIRE_FESTIVAL = 341, - HOLIDAY_CALL_TO_ARMS_ES = 353, + HOLIDAY_CALL_TO_ARMS_EY = 353, HOLIDAY_BREWFEST = 372, HOLIDAY_DARKMOON_FAIRE_ELWYNN = 374, HOLIDAY_DARKMOON_FAIRE_THUNDER = 375, diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 35c6292ef..9754a3804 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8545" + #define REVISION_NR "8546" #endif // __REVISION_NR_H__