File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -378,11 +378,20 @@ function init_game() {
378
378
create_instance ( "d_b1" ) ;
379
379
create_instance ( "d_a1" ) ;
380
380
create_instance ( "d_a2" ) ;
381
- server_bfs ( "crypt" ) ;
382
- server_bfs ( "winter_instance" ) ;
383
- server_bfs ( "tomb" ) ;
384
- server_bfs ( "dungeon0" ) ;
385
- server_bfs ( "cgallery" ) ;
381
+
382
+ for ( const name in G . maps ) {
383
+ const gMap = G . maps [ name ] ;
384
+ if ( gMap . ignore ) {
385
+ continue ;
386
+ }
387
+
388
+ const hasNpcs = gMap . npcs && gMap . npcs . length > 0 ;
389
+ const hasMonsters = gMap . monsters && gMap . monsters . length > 0 ;
390
+ if ( gMap . instance && ( hasNpcs || hasMonsters ) ) {
391
+ // running this is important for instances, so that npcs and monsters can navigate / move
392
+ server_bfs ( name ) ;
393
+ }
394
+ }
386
395
} else if ( gameplay == "dungeon" ) {
387
396
for ( var name in G . maps ) {
388
397
if ( G . maps [ name ] . world == "dungeon" ) {
You can’t perform that action at this time.
0 commit comments