@@ 14,5 14,5 @@ namespace NosSmooth.Game.Events.Map;
public record MapChangedEvent
(
Data.Maps.Map? PreviousMap,
- Data.Maps.Map? CurrentMap
+ Data.Maps.Map CurrentMap
) : IGameEvent;=
\ No newline at end of file
@@ 97,6 97,11 @@ public class CMapResponder : IPacketResponder<CMapPacket>
ct: ct
);
- return await _eventDispatcher.DispatchEvent(new MapChangedEvent(previousMap, _game.CurrentMap), ct);
+ if (currentMap is not null)
+ {
+ return await _eventDispatcher.DispatchEvent(new MapChangedEvent(previousMap, currentMap), ct);
+ }
+
+ return Result.FromSuccess();
}
}=
\ No newline at end of file