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,18 +901,10 @@ 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
|
||||
if (!object->elunaEvents)
|
||||
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
|
||||
{
|
||||
object->elunaEvents->Update(diff);
|
||||
|
||||
Reference in New Issue
Block a user