Core/Scripts: Added possibility to remove phase setting from EventMap and an empty-checking method
This commit is contained in:
@@ -326,11 +326,15 @@ class EventMap : private std::map<uint32, uint32>
|
|||||||
|
|
||||||
uint32 GetPhaseMask() const { return (_phase >> 24) & 0xFF; }
|
uint32 GetPhaseMask() const { return (_phase >> 24) & 0xFF; }
|
||||||
|
|
||||||
|
bool Empty() const { return empty(); }
|
||||||
|
|
||||||
// Sets event phase, must be in range 1 - 8
|
// Sets event phase, must be in range 1 - 8
|
||||||
void SetPhase(uint32 phase)
|
void SetPhase(uint32 phase)
|
||||||
{
|
{
|
||||||
if (phase && phase < 8)
|
if (phase && phase < 8)
|
||||||
_phase = (1 << (phase + 24));
|
_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)
|
// Creates new event entry in map with given id, time, group if given (1 - 8) and phase if given (1 - 8)
|
||||||
|
|||||||
Reference in New Issue
Block a user