*Fix build
--HG-- branch : trunk
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
#include "../ScriptMgr.h"
|
#include "../ScriptMgr.h"
|
||||||
#include "Cell.h"
|
#include "Cell.h"
|
||||||
#include "CellImpl.h"
|
#include "CellImpl.h"
|
||||||
#include "GameEventMgr.cpp"
|
#include "GameEventMgr.h"
|
||||||
#include "GridNotifiers.h"
|
#include "GridNotifiers.h"
|
||||||
#include "GridNotifiersImpl.h"
|
#include "GridNotifiersImpl.h"
|
||||||
#include "Unit.h"
|
#include "Unit.h"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ EndScriptData */
|
|||||||
|
|
||||||
bool GossipHello_npc_innkeeper(Player *pPlayer, Creature *pCreature)
|
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;
|
char* localizedEntry;
|
||||||
switch (pPlayer->GetSession()->GetSessionDbcLocale())
|
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)
|
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);
|
pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true);
|
||||||
|
|
||||||
|
|||||||
@@ -1656,3 +1656,9 @@ TRINITY_DLL_SPEC bool IsHolidayActive( HolidayIds id )
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRINITY_DLL_SPEC bool IsEventActive(uint16 event_id)
|
||||||
|
{
|
||||||
|
GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
|
||||||
|
return ae.find(event_id) != ae.end();
|
||||||
|
}
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ class GameEventMgr
|
|||||||
#define gameeventmgr Trinity::Singleton<GameEventMgr>::Instance()
|
#define gameeventmgr Trinity::Singleton<GameEventMgr>::Instance()
|
||||||
|
|
||||||
TRINITY_DLL_SPEC bool IsHolidayActive(HolidayIds id);
|
TRINITY_DLL_SPEC bool IsHolidayActive(HolidayIds id);
|
||||||
|
TRINITY_DLL_SPEC bool IsEventActive(uint16 event_id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user