*Fix build

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-27 23:35:44 -07:00
parent b243cf3228
commit 6f097c724c
4 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -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);
+6
View File
@@ -1656,3 +1656,9 @@ TRINITY_DLL_SPEC bool IsHolidayActive( HolidayIds id )
return false;
}
TRINITY_DLL_SPEC bool IsEventActive(uint16 event_id)
{
GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
return ae.find(event_id) != ae.end();
}
+1
View File
@@ -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