mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/SAI: Implemented new source type SMART_SCRIPT_TYPE_EVENT (3) (#28816)
This commit is contained in:
@@ -990,6 +990,20 @@ class TC_GAME_API WorldStateScript : public ScriptObject
|
||||
virtual void OnValueChange(int32 worldStateId, int32 oldValue, int32 newValue, Map const* map);
|
||||
};
|
||||
|
||||
class TC_GAME_API EventScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit EventScript(char const* name);
|
||||
|
||||
public:
|
||||
|
||||
~EventScript();
|
||||
|
||||
// Called when a game event is triggered
|
||||
virtual void OnTrigger(WorldObject* object, WorldObject* invoker, uint32 eventId);
|
||||
};
|
||||
|
||||
// Manages registration, loading, and execution of scripts.
|
||||
class TC_GAME_API ScriptMgr
|
||||
{
|
||||
@@ -1296,6 +1310,10 @@ class TC_GAME_API ScriptMgr
|
||||
|
||||
void OnWorldStateValueChange(WorldStateTemplate const* worldStateTemplate, int32 oldValue, int32 newValue, Map const* map);
|
||||
|
||||
public: /* EventScript */
|
||||
|
||||
void OnEventTrigger(WorldObject* object, WorldObject* invoker, uint32 eventId);
|
||||
|
||||
private:
|
||||
uint32 _scriptCount;
|
||||
bool _scriptIdUpdated;
|
||||
|
||||
Reference in New Issue
Block a user