@@ -50,8 +50,8 @@ public GuiWindow(MapDto map, int width, int height, string title, DataAccessHelp
5050 GraphicsMode . Default , title )
5151 {
5252 var dbContextBuilder1 = dbContextBuilder ;
53- var mapMonsterDao = new Dao < MapMonster , MapMonsterDto , int > ( Logger , dbContextBuilder1 ) ;
54- var mapNpcDao = new Dao < MapNpc , MapNpcDto , int > ( Logger , dbContextBuilder1 ) ;
53+ var mapMonsterDao = new Dao < MapMonster , MapMonsterDto , int > ( Logger , dbContextBuilder1 . CreateContext ) ;
54+ var mapNpcDao = new Dao < MapNpc , MapNpcDto , int > ( Logger , dbContextBuilder1 . CreateContext ) ;
5555 _originalWidth = Width ;
5656 _originalCellSize = Width / map . Width ;
5757 _cellSize = Width / map . Width ;
@@ -82,8 +82,8 @@ public GuiWindow(MapDto map, int width, int height, string title, DataAccessHelp
8282 mapNpc . Map = _map ;
8383 }
8484
85- Parallel . ForEach ( _monsters , monster => monster . StartLife ( CancellationToken . None ) ) ;
86- Parallel . ForEach ( _npcs , npc => npc . StartLife ( CancellationToken . None ) ) ;
85+ Parallel . ForEach ( _monsters , monster => _ = monster . StartLife ( CancellationToken . None ) ) ;
86+ Parallel . ForEach ( _npcs , npc => _ = npc . StartLife ( CancellationToken . None ) ) ;
8787
8888 var wallpixels = new List < Vector2 [ ] > ( ) ;
8989 for ( short y = 0 ; y < _map . Length ; y ++ )
0 commit comments