Skip to content

Commit

Permalink
Fix player timed events not carrying over between maps (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 authored Apr 19, 2023
1 parent bd80536 commit 19f71b2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/game/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1580,18 +1580,13 @@ void WorldObject::SetMap(Map* map)
m_InstanceId = map->GetInstanceId();

#ifdef ENABLE_ELUNA
delete elunaEvents;
// On multithread replace this with a pointer to map's Eluna pointer stored in a map
elunaEvents = new ElunaEventProcessor(&Eluna::GEluna, this);
if (!elunaEvents)
elunaEvents = new ElunaEventProcessor(&Eluna::GEluna, this);
#endif
}

void WorldObject::ResetMap()
{
#ifdef ENABLE_ELUNA
delete elunaEvents;
elunaEvents = NULL;
#endif
}

void WorldObject::AddObjectToRemoveList()
Expand Down

0 comments on commit 19f71b2

Please sign in to comment.