diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-11-02 18:56:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-11-04 23:24:24 +0300 |
commit | 497a25b19d58ace8e450614f0b6cab433a040428 (patch) | |
tree | fe644b2ab356fe3b3b253d9e446510802542e702 | |
parent | ca0128cacba1117bacad99f4b5b325caa52b43d5 (diff) | |
download | hercules-497a25b19d58ace8e450614f0b6cab433a040428.tar.gz hercules-497a25b19d58ace8e450614f0b6cab433a040428.tar.bz2 hercules-497a25b19d58ace8e450614f0b6cab433a040428.tar.xz hercules-497a25b19d58ace8e450614f0b6cab433a040428.zip |
Add into setunitdata/getunitdata new options UDT_ROBE and UDT_BODY2.
-rw-r--r-- | db/constants.conf | 2 | ||||
-rw-r--r-- | src/map/script.c | 10 | ||||
-rw-r--r-- | src/map/script.h | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/db/constants.conf b/db/constants.conf index 921acbeaf..eda877671 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -3870,4 +3870,6 @@ constants_db: { UDT_LIFETIME: 52 UDT_MERC_KILLCOUNT: 53 UDT_STATADD: 54 + UDT_ROBE: 55 + UDT_BODY2: 56 } diff --git a/src/map/script.c b/src/map/script.c index 729aa549e..bbaa5f6ed 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -18217,6 +18217,8 @@ BUILDIN(setunitdata) case UDT_INTIMACY: case UDT_LIFETIME: case UDT_MERC_KILLCOUNT: + case UDT_ROBE: + case UDT_BODY2: setunitdata_check_min(4, 0); break; case UDT_MASTERAID: @@ -19182,6 +19184,12 @@ BUILDIN(setunitdata) case UDT_WEAPON: clif->changelook(bl, LOOK_WEAPON, val); break; + case UDT_ROBE: + clif->changelook(bl, LOOK_ROBE, val); + break; + case UDT_BODY2: + clif->changelook(bl, LOOK_BODY2, val); + break; default: ShowWarning("buildin_setunitdata: Invalid data type '%s' for NPC unit.\n", udtype); script_pushint(st, 0); @@ -19602,6 +19610,8 @@ BUILDIN(getunitdata) 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; + case UDT_ROBE: script_pushint(st, nd->vd.robe); break; + case UDT_BODY2: script_pushint(st, nd->vd.body_style); break; default: ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype); script_pushint(st, 0); diff --git a/src/map/script.h b/src/map/script.h index 283afa496..b2ab7510c 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -423,6 +423,8 @@ enum script_unit_data_types { UDT_LIFETIME, UDT_MERC_KILLCOUNT, UDT_STATPOINT, + UDT_ROBE, + UDT_BODY2, UDT_MAX }; |