diff options
author | Shauren <shauren.trinity@gmail.com> | 2012-04-18 12:45:58 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2012-04-18 12:45:58 +0200 |
commit | a483eb5f11bef57060397ffb8eae07c337f2fc56 (patch) | |
tree | f106f00435630d90c0dc0223e8c7ed18c5c58758 /src | |
parent | bec761a3e0809c93ca0dd84844ed9635fcce2ac6 (diff) |
Core/Scripts: Added possibility to remove phase setting from EventMap and an empty-checking method
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/AI/CreatureAIImpl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h index 98b0afdefc9..d097adf38ec 100755 --- a/src/server/game/AI/CreatureAIImpl.h +++ b/src/server/game/AI/CreatureAIImpl.h @@ -326,11 +326,15 @@ class EventMap : private std::map<uint32, uint32> uint32 GetPhaseMask() const { return (_phase >> 24) & 0xFF; } + bool Empty() const { return empty(); } + // Sets event phase, must be in range 1 - 8 void SetPhase(uint32 phase) { if (phase && phase < 8) _phase = (1 << (phase + 24)); + else if (!phase) + _phase = 0; } // Creates new event entry in map with given id, time, group if given (1 - 8) and phase if given (1 - 8) |