mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
fix: player timed events not carrying over between maps (#106)
This commit is contained in:
@@ -901,16 +901,8 @@ public:
|
|||||||
|
|
||||||
void OnWorldObjectSetMap(WorldObject* object, Map* /*map*/) override
|
void OnWorldObjectSetMap(WorldObject* object, Map* /*map*/) override
|
||||||
{
|
{
|
||||||
delete object->elunaEvents;
|
if (!object->elunaEvents)
|
||||||
|
object->elunaEvents = new ElunaEventProcessor(&Eluna::GEluna, object);
|
||||||
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnWorldObjectUpdate(WorldObject* object, uint32 diff) override
|
void OnWorldObjectUpdate(WorldObject* object, uint32 diff) override
|
||||||
|
|||||||
Reference in New Issue
Block a user