fix: player timed events not carrying over between maps (#106)

This commit is contained in:
Rochet2
2023-03-09 13:16:27 +02:00
committed by GitHub
parent 39c4117927
commit 554bf506c5

View File

@@ -901,16 +901,8 @@ public:
void OnWorldObjectSetMap(WorldObject* object, Map* /*map*/) override
{
delete object->elunaEvents;
// On multithread replace this with a pointer to map's Eluna pointer stored in a map
object->elunaEvents = new ElunaEventProcessor(&Eluna::GEluna, object);
}
void OnWorldObjectResetMap(WorldObject* object) override
{
delete object->elunaEvents;
object->elunaEvents = nullptr;
if (!object->elunaEvents)
object->elunaEvents = new ElunaEventProcessor(&Eluna::GEluna, object);
}
void OnWorldObjectUpdate(WorldObject* object, uint32 diff) override