diff options
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 5da9a7162..bc78c6098 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4060,6 +4060,7 @@ int mob_read_db_sub(config_setting_t *mobt, int n, const char *source) * Id: ID * SpriteName: "SPRITE_NAME" * Name: "Mob name" + * JName: "Mob name" * // Optional fields * Lv: level * Hp: health @@ -4149,6 +4150,13 @@ int mob_read_db_sub(config_setting_t *mobt, int n, const char *source) } } else { safestrncpy(md.name, str, sizeof(md.name)); + } + + if (!libconfig->setting_lookup_string(mobt, "JName", &str) || !*str ) { + if (!inherit) { + safestrncpy(md.jname, md.name, sizeof(md.jname)); + } + } else { safestrncpy(md.jname, str, sizeof(md.jname)); } |