Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources

This commit is contained in:
ariel-
2018-03-22 04:20:35 -03:00
parent 7fff6c424f
commit 5ff847159c
1243 changed files with 29780 additions and 36517 deletions

View File

@@ -16,6 +16,7 @@
*/
#include "EventMap.h"
#include "Random.h"
void EventMap::Reset()
{
@@ -32,6 +33,11 @@ void EventMap::SetPhase(uint8 phase)
_phase = uint8(1 << (phase - 1));
}
void EventMap::ScheduleEvent(uint32 eventId, Milliseconds const& minTime, Milliseconds const& maxTime, uint32 group /*= 0*/, uint32 phase /*= 0*/)
{
ScheduleEvent(eventId, urand(uint32(minTime.count()), uint32(maxTime.count())), group, phase);
}
void EventMap::ScheduleEvent(uint32 eventId, uint32 time, uint32 group /*= 0*/, uint8 phase /*= 0*/)
{
if (group && group <= 8)
@@ -43,6 +49,16 @@ void EventMap::ScheduleEvent(uint32 eventId, uint32 time, uint32 group /*= 0*/,
_eventMap.insert(EventStore::value_type(_time + time, eventId));
}
void EventMap::RescheduleEvent(uint32 eventId, Milliseconds const& minTime, Milliseconds const& maxTime, uint32 group /*= 0*/, uint32 phase /*= 0*/)
{
RescheduleEvent(eventId, urand(uint32(minTime.count()), uint32(maxTime.count())), group, phase);
}
void EventMap::Repeat(uint32 minTime, uint32 maxTime)
{
Repeat(urand(minTime, maxTime));
}
uint32 EventMap::ExecuteEvent()
{
while (!Empty())