[7393] Implement access to client side holiday ids.

* src/game/GameEvent.* renamed to src/game/GameEventMgr.* for consistence
* `game_event` now have new `holiday` field for store client side holiday id associated with game event
* Added new enum HolidayIds with existed at this moment holiday ids.
* New function "bool IsHolidayActive(HolidayIds id)" added accessabel from scripts for active holidays check.
This commit is contained in:
VladimirMangos 2009-03-07 01:34:46 +03:00
parent 4523a47155
commit be74937146
19 changed files with 162 additions and 62 deletions

View file

@ -21,10 +21,10 @@
#include "Player.h"
#include "WorldPacket.h"
#include "Database/DBCEnums.h"
#include "GameEventMgr.h"
#include "ObjectMgr.h"
#include "Guild.h"
#include "Database/DatabaseEnv.h"
#include "GameEvent.h"
#include "World.h"
#include "SpellMgr.h"
#include "ArenaTeam.h"
@ -607,7 +607,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if(Player::GetDrunkenstateByValue(GetPlayer()->GetDrunkValue()) != DRUNKEN_SMASHED)
continue;
// TODO: hardcoding eventid is bad, it can differ from DB to DB - maye implement something using HolidayNames.dbc?
if(!gameeventmgr.IsActiveEvent(26))
if(!IsHolidayActive(HOLIDAY_BREWFEST))
continue;
}
// miscvalue1 is the ingame fallheight*100 as stored in dbc