Scripts/Instances: Replace manual criteria timer starts in instances with new GameEvents api
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "ZoneScript.h"
|
||||
#include "Creature.h"
|
||||
#include "GameEventSender.h"
|
||||
|
||||
ZoneScript::ZoneScript()
|
||||
{
|
||||
@@ -30,3 +31,11 @@ uint32 ZoneScript::GetCreatureEntry(ObjectGuid::LowType /*guidLow*/, CreatureDat
|
||||
{
|
||||
return data->id;
|
||||
}
|
||||
|
||||
void ZoneScript::TriggerGameEvent(uint32 gameEventId, WorldObject* source /*= nullptr*/, WorldObject* target /*= nullptr*/)
|
||||
{
|
||||
if (source)
|
||||
GameEvents::Trigger(gameEventId, source, target);
|
||||
else
|
||||
ProcessEvent(nullptr, gameEventId, nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user