summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/mob_db.conf2
-rw-r--r--db/re/mob_db.conf2
-rw-r--r--doc/mob_db.txt5
-rw-r--r--src/map/mob.c4
4 files changed, 9 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 4f5c6ad9b..492b75a04 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.
diff --git a/src/map/mob.c b/src/map/mob.c
index 3b39542da..0830e5a5a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -4349,8 +4349,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)