mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 00:19:59 +01:00
*Fix build
--HG-- branch : trunk
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "../ScriptMgr.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "GameEventMgr.cpp"
|
||||
#include "GameEventMgr.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Unit.h"
|
||||
|
||||
@@ -40,7 +40,7 @@ EndScriptData */
|
||||
|
||||
bool GossipHello_npc_innkeeper(Player *pPlayer, Creature *pCreature)
|
||||
{
|
||||
if (gameeventmgr.IsActiveEvent(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
if (IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
{
|
||||
char* localizedEntry;
|
||||
switch (pPlayer->GetSession()->GetSessionDbcLocale())
|
||||
@@ -77,7 +77,7 @@ bool GossipHello_npc_innkeeper(Player *pPlayer, Creature *pCreature)
|
||||
|
||||
bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
{
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && gameeventmgr.IsActiveEvent(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true);
|
||||
|
||||
|
||||
@@ -1645,14 +1645,20 @@ void GameEventMgr::SendWorldStateUpdate(Player * plr, uint16 event_id)
|
||||
}
|
||||
}
|
||||
|
||||
TRINITY_DLL_SPEC bool IsHolidayActive( HolidayIds id )
|
||||
TRINITY_DLL_SPEC bool IsHolidayActive(HolidayIds id)
|
||||
{
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
|
||||
|
||||
for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
|
||||
if(events[*itr].holiday_id==id)
|
||||
if(events[*itr].holiday_id == id)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
TRINITY_DLL_SPEC bool IsEventActive(uint16 event_id)
|
||||
{
|
||||
GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
|
||||
return ae.find(event_id) != ae.end();
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class GameEventMgr
|
||||
uint32 NextCheck(uint16 entry) const;
|
||||
void LoadFromDB();
|
||||
uint32 Update();
|
||||
bool IsActiveEvent(uint16 event_id) { return ( m_ActiveEvents.find(event_id)!=m_ActiveEvents.end()); }
|
||||
bool IsActiveEvent(uint16 event_id) { return ( m_ActiveEvents.find(event_id) != m_ActiveEvents.end()); }
|
||||
uint32 Initialize();
|
||||
void StartInternalEvent(uint16 event_id);
|
||||
bool StartEvent(uint16 event_id, bool overwrite = false);
|
||||
@@ -173,6 +173,7 @@ class GameEventMgr
|
||||
#define gameeventmgr Trinity::Singleton<GameEventMgr>::Instance()
|
||||
|
||||
TRINITY_DLL_SPEC bool IsHolidayActive(HolidayIds id);
|
||||
TRINITY_DLL_SPEC bool IsEventActive(uint16 event_id);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user