Skip to content

Commit

Permalink
Fix player timed events not carrying over between maps (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 committed Apr 19, 2023
1 parent 2868fe1 commit b927a60
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/game/Object/Object.cpp
Expand Up @@ -1754,19 +1754,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

m_currMap = NULL;
}

Expand Down

0 comments on commit b927a60

Please sign in to comment.