Skip to content

Commit

Permalink
Corrected script command atcommand (fixes #1894)
Browse files Browse the repository at this point in the history
* Resolves the map ID being stored instead of the map index when a dummy player is used.
Thanks to @Tokeiburu!
  • Loading branch information
aleos89 committed Jan 18, 2017
1 parent b311255 commit 2c4cd07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c4cd07

Please sign in to comment.