public void Enter(YiObj obj) { Entities.AddOrUpdate(obj.UniqueId, obj); switch (obj) { case Npc npc: AddNpc(obj); break; case DynamicNpc npc: AddNpc(obj); break; case Monster monster: AddMob(obj); break; case FloorItem item: AddItem(obj); break; } (obj as Player)?.Send(MsgAction.MapShowPacket(obj)); (obj as Player)?.Send(MsgStatus.Create(Id, (uint)Flags)); if (!ScreenSystem.Entities.ContainsKey(obj.UniqueId)) { ScreenSystem.Create(obj); } ScreenSystem.Update(obj); if (!(obj is Player player)) { return; } WeatherSystem.SetWeatherFor(player); DayNightSystem.SetTimeFor(player); }