mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Scripts: Limited possible phase number for EventMap to prevent overflows
This commit is contained in:
@@ -329,7 +329,7 @@ class EventMap : private std::map<uint32, uint32>
|
||||
// Sets event phase, must be in range 1 - 8
|
||||
void SetPhase(uint32 phase)
|
||||
{
|
||||
if (phase && phase < 9)
|
||||
if (phase && phase < 8)
|
||||
_phase = (1 << (phase + 24));
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ class EventMap : private std::map<uint32, uint32>
|
||||
time += _time;
|
||||
if (groupId && groupId < 9)
|
||||
eventId |= (1 << (groupId + 16));
|
||||
if (phase && phase < 9)
|
||||
if (phase && phase < 8)
|
||||
eventId |= (1 << (phase + 24));
|
||||
const_iterator itr = find(time);
|
||||
while (itr != end())
|
||||
|
||||
Reference in New Issue
Block a user