From 0426f8c42f9f6d94db8d6a23f248e876b79c7973 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 20 Dec 2015 03:28:55 +0100 Subject: Re-added support for the JName field in the mob db Signed-off-by: Haru --- src/map/mob.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/map/mob.c') 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)); } -- cgit v1.2.3-70-g09d2