Skip to content

Commit b4020fa

Browse files
authored
Add Eluna event processor reset
Required in those cases where Eluna is not active on some maps for whatever reason
1 parent e58b802 commit b4020fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/server/game/Entities/Object/Object.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,8 +1825,12 @@ void WorldObject::SetMap(Map* map)
18251825
m_mapId = map->GetId();
18261826
m_InstanceId = map->GetInstanceId();
18271827
#ifdef ELUNA
1828+
// in multistate mode, always reset in case Eluna is not active on the new map
1829+
if (elunaEvents && !sElunaConfig->IsElunaCompatibilityMode())
1830+
elunaEvents.reset();
1831+
18281832
if (Eluna* e = map->GetEluna())
1829-
if (!elunaEvents || (elunaEvents && !sElunaConfig->IsElunaCompatibilityMode()))
1833+
if (!elunaEvents)
18301834
elunaEvents = std::make_unique<ElunaEventProcessor>(e, this);
18311835
#endif
18321836
if (IsStoredInWorldObjectGridContainer())

0 commit comments

Comments
 (0)