feat(Core/Hook): New GlobalScript hook (#2665)

This allows you to change the behavior of phase system
This commit is contained in:
Stoabrogga
2020-02-26 09:44:12 +01:00
committed by GitHub
parent 17fc93d864
commit 8f5c628836
4 changed files with 19 additions and 5 deletions

View File

@@ -1103,6 +1103,9 @@ class GlobalScript : public ScriptObject
// Called when a dungeon encounter is updated.
virtual void OnAfterUpdateEncounterState(Map* /*map*/, EncounterCreditType /*type*/, uint32 /*creditEntry*/, Unit* /*source*/, Difficulty /*difficulty_fixed*/, DungeonEncounterList const* /*encounters*/, uint32 /*dungeonCompleted*/, bool /*updated*/) { }
// Called before the phase for a WorldObject is set
virtual void OnBeforeWorldObjectSetPhaseMask(WorldObject const* /*worldObject*/, uint32& /*oldPhaseMask*/, uint32& /*newPhaseMask*/, bool& /*useCombinedPhases*/, bool& /*update*/) { }
};
class BGScript : public ScriptObject
@@ -1472,7 +1475,7 @@ class ScriptMgr
void OnInitializeLockedDungeons(Player* player, uint8& level, uint32& lockData);
void OnAfterInitializeLockedDungeons(Player* player);
void OnAfterUpdateEncounterState(Map* map, EncounterCreditType type, uint32 creditEntry, Unit* source, Difficulty difficulty_fixed, DungeonEncounterList const* encounters, uint32 dungeonCompleted, bool updated);
void OnBeforeWorldObjectSetPhaseMask(WorldObject const* worldObject, uint32& oldPhaseMask, uint32& newPhaseMask, bool& useCombinedPhases, bool& update);
public: /* Scheduled scripts */