Переглянути джерело

Corrected script command atcommand (fixes #1894)
* Resolves the map ID being stored instead of the map index when a dummy player is used.
Thanks to @Tokeiburu!

aleos89 8 роки тому
батько
коміт
2c4cd07af0
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/map/script.c

+ 1 - 1
src/map/script.c

@@ -14062,7 +14062,7 @@ int atcommand_sub(struct script_state* st,int type) {
 			memcpy(&dummy_sd.bl, bl, sizeof(struct block_list));
 			if (bl->type == BL_NPC)
 				safestrncpy(dummy_sd.status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH);
-			sd->mapindex = (bl->m > 0) ? bl->m : mapindex_name2id(map_default.mapname);
+			sd->mapindex = (bl->m > 0) ? map_id2index(bl->m) : mapindex_name2id(map_default.mapname);
 		}
 
 		// Init Group ID, Level, & permissions