From 15b0f4924fa8030778d0eefe0a461d2ec069ab5a Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sat, 1 Feb 2020 03:48:23 +0100 Subject: Make mob DB field ViewData->HairStyleId defaulting to 1 instead of 0. --- src/map/mob.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/map/mob.c b/src/map/mob.c index 4b74abc8f..37d7ce370 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4206,8 +4206,12 @@ static void mob_read_db_viewdata_sub(struct mob_db *entry, struct config_setting entry->vd.head_mid = libconfig->setting_get_int(it); if ((it = libconfig->setting_get_member(t, "HeadLowId")) != NULL) entry->vd.head_bottom = libconfig->setting_get_int(it); + if ((it = libconfig->setting_get_member(t, "HairStyleId")) != NULL) entry->vd.hair_style = libconfig->setting_get_int(it); + else + entry->vd.hair_style = 1; + if ((it = libconfig->setting_get_member(t, "BodyStyleId")) != NULL) entry->vd.body_style = libconfig->setting_get_int(it); if ((it = libconfig->setting_get_member(t, "HairColorId")) != NULL) -- cgit v1.2.3-70-g09d2 From 4c630a6d239afae8f231977fa41ac460d2288679 Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sat, 1 Feb 2020 03:52:36 +0100 Subject: Updated documentation of default value for mob DB field ViewData->HairStyleId. Additionally fixed reference to monster modes deocumentation in doc/mob_db.txt. --- db/pre-re/mob_db.conf | 2 +- db/re/mob_db.conf | 2 +- doc/mob_db.txt | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/db/pre-re/mob_db.conf b/db/pre-re/mob_db.conf index 45592ad90..78e255f36 100644 --- a/db/pre-re/mob_db.conf +++ b/db/pre-re/mob_db.conf @@ -102,7 +102,7 @@ mob_db: ( HeadTopId: top headgear id (int, defaults to 0) HeadMidId: middle headgear id (int, defaults to 0) HeadLowId: lower headgear id (int, defaults to 0) - HairStyleId: hair style id (int, defaults to 0) + HairStyleId: hair style id (int, defaults to 1) BodyStyleId: clothes id (int, defaults to 0) HairColorId: hair color id (int, defaults to 0) BodyColorId: clothes color id (int, defaults to 0) diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index c0c726f25..dd2a4982d 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -102,7 +102,7 @@ mob_db: ( HeadTopId: top headgear id (int, defaults to 0) HeadMidId: middle headgear id (int, defaults to 0) HeadLowId: lower headgear id (int, defaults to 0) - HairStyleId: hair style id (int, defaults to 0) + HairStyleId: hair style id (int, defaults to 1) BodyStyleId: clothes id (int, defaults to 0) HairColorId: hair color id (int, defaults to 0) BodyColorId: clothes color id (int, defaults to 0) diff --git a/doc/mob_db.txt b/doc/mob_db.txt index 53d345255..0280ae9c4 100644 --- a/doc/mob_db.txt +++ b/doc/mob_db.txt @@ -82,7 +82,7 @@ mob_db: ( HeadTopId: top headgear id (int, defaults to 0) HeadMidId: middle headgear id (int, defaults to 0) HeadLowId: lower headgear id (int, defaults to 0) - HairStyleId: hair style id (int, defaults to 0) + HairStyleId: hair style id (int, defaults to 1) BodyStyleId: clothes id (int, defaults to 0) HairColorId: hair color id (int, defaults to 0) BodyColorId: clothes color id (int, defaults to 0) @@ -193,7 +193,7 @@ Element: Monster's element. Sets element type and level. Mode: Monster AI behaviour. If this block is omitted, monster doesn't react to anything. All the settings in this group are boolean values, Default value is false (mode not set) for any missing setting. - See /doc/sample/mob_db_mode_list.txt for more information about monsters Mode types. + See /doc/mob_db_mode_list.md for more information about monsters Mode types. MoveSpeed: Monster's speed. Sets speed (cells/sec). MoveSpeed is calculated to Hercules with this formula: 1000 / SPEED (CELLS/SEC) @@ -278,3 +278,4 @@ DamageTakenRate: ViewData: Overrides the default view data sent to the client with the given values for: Sprite, Weapon, Shield, Robe, HeadTop, HeadMid, HeadLow, HairStyle, BodyStyle, HairColor, BodyColor, Gender, Options + Note: HairStyleId will only default to 1, if the ViewData block is defined. -- cgit v1.2.3-70-g09d2