summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-11-02 18:13:13 +0300
committerAndrei Karas <akaras@inbox.ru>2017-11-04 23:24:24 +0300
commitca0128cacba1117bacad99f4b5b325caa52b43d5 (patch)
treeb0ddea5fda658f363156a19356a6265e9f61fb15 /src/map
parente8346ea6e4019fc98a97cbe3e0c4dad028df1652 (diff)
downloadhercules-ca0128cacba1117bacad99f4b5b325caa52b43d5.tar.gz
hercules-ca0128cacba1117bacad99f4b5b325caa52b43d5.tar.bz2
hercules-ca0128cacba1117bacad99f4b5b325caa52b43d5.tar.xz
hercules-ca0128cacba1117bacad99f4b5b325caa52b43d5.zip
Add view_data related fields to npc into setunitdata/getunitdata.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 2d4f60f37..729aa549e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -19155,6 +19155,33 @@ BUILDIN(setunitdata)
case UDT_DMOTION:
nd->status.dmotion = (unsigned short) val;
break;
+ case UDT_SEX:
+ nd->vd.sex = (char) val;
+ break;
+ case UDT_HAIRSTYLE:
+ clif->changelook(bl, LOOK_HAIR, val);
+ break;
+ case UDT_HAIRCOLOR:
+ clif->changelook(bl, LOOK_HAIR_COLOR, val);
+ break;
+ case UDT_HEADBOTTOM:
+ clif->changelook(bl, LOOK_HEAD_BOTTOM, val);
+ break;
+ case UDT_HEADMIDDLE:
+ clif->changelook(bl, LOOK_HEAD_MID, val);
+ break;
+ case UDT_HEADTOP:
+ clif->changelook(bl, LOOK_HEAD_TOP, val);
+ break;
+ case UDT_CLOTHCOLOR:
+ clif->changelook(bl, LOOK_CLOTHES_COLOR, val);
+ break;
+ case UDT_SHIELD:
+ clif->changelook(bl, LOOK_SHIELD, val);
+ break;
+ case UDT_WEAPON:
+ clif->changelook(bl, LOOK_WEAPON, val);
+ break;
default:
ShowWarning("buildin_setunitdata: Invalid data type '%s' for NPC unit.\n", udtype);
script_pushint(st, 0);
@@ -19565,6 +19592,16 @@ BUILDIN(getunitdata)
case UDT_AMOTION: script_pushint(st, nd->status.amotion); break;
case UDT_ADELAY: script_pushint(st, nd->status.adelay); break;
case UDT_DMOTION: script_pushint(st, nd->status.dmotion); break;
+ case UDT_SEX: script_pushint(st, nd->vd.sex); break;
+ case UDT_CLASS: script_pushint(st, nd->vd.class); break;
+ case UDT_HAIRSTYLE: script_pushint(st, nd->vd.hair_style); break;
+ case UDT_HAIRCOLOR: script_pushint(st, nd->vd.hair_color); break;
+ case UDT_HEADBOTTOM: script_pushint(st, nd->vd.head_bottom); break;
+ case UDT_HEADMIDDLE: script_pushint(st, nd->vd.head_mid); break;
+ case UDT_HEADTOP: script_pushint(st, nd->vd.head_top); break;
+ case UDT_CLOTHCOLOR: script_pushint(st, nd->vd.cloth_color); break;
+ case UDT_SHIELD: script_pushint(st, nd->vd.shield); break;
+ case UDT_WEAPON: script_pushint(st, nd->vd.weapon); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype);
script_pushint(st, 0);