mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[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:
parent
4523a47155
commit
be74937146
19 changed files with 162 additions and 62 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue