Scripts/Instances: Replace manual criteria timer starts in instances with new GameEvents api

This commit is contained in:
Shauren
2022-04-24 13:58:18 +02:00
parent e1abd8256b
commit 1c62b0b90f
23 changed files with 52 additions and 32 deletions
+9
View File
@@ -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);
}