diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-06 18:19:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-06 18:19:03 +0300 |
commit | f03b90ff34e16a5fdd50e3994defffabd088f116 (patch) | |
tree | d0be221e465002ba3f7601bfd3fd48b26cd603d0 | |
parent | 43e788045d34933ad520e4c9687e9e4b16523087 (diff) | |
download | plugin-f03b90ff34e16a5fdd50e3994defffabd088f116.tar.gz plugin-f03b90ff34e16a5fdd50e3994defffabd088f116.tar.bz2 plugin-f03b90ff34e16a5fdd50e3994defffabd088f116.tar.xz plugin-f03b90ff34e16a5fdd50e3994defffabd088f116.zip |
Show equipped slots weapon and shield always.
Before it was invisible in some cases.
-rw-r--r-- | src/emap/clif.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/emap/clif.c b/src/emap/clif.c index ee5e838..9cf2c76 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -214,6 +214,15 @@ void eclif_charnameack(int *fdPtr, struct block_list *bl) send_changelook(sd, sd2, fd, id, field, item->look, 0, item, equip); \ } +#define equipPosId(index, field) \ + equip = sd->equip_index[index]; \ + if (equip >= 0) \ + { \ + item = sd->inventory_data[equip]; \ + if (item && item->nameid) \ + send_changelook(sd, sd2, fd, id, field, item->nameid, 0, item, equip); \ + } + static void eclif_send_additional_slots(TBL_PC* sd, TBL_PC* sd2) { if (!sd || !sd2) @@ -228,6 +237,8 @@ static void eclif_send_additional_slots(TBL_PC* sd, TBL_PC* sd2) if (!data || data->invisible) return; + equipPosId(EQI_HAND_R, LOOK_WEAPON); + equipPosId(EQI_HAND_L, LOOK_SHIELD); equipPos(EQI_HEAD_LOW, LOOK_HEAD_BOTTOM); equipPos(EQI_HEAD_TOP, LOOK_HEAD_TOP); equipPos(EQI_HEAD_MID, LOOK_HEAD_MID); @@ -244,6 +255,7 @@ static void eclif_send_additional_slots(TBL_PC* sd, TBL_PC* sd2) } #undef equipPos +#undef equipPosId #define equipPos2(index, field) \ equip = sd->equip_index[index]; \ @@ -256,6 +268,17 @@ static void eclif_send_additional_slots(TBL_PC* sd, TBL_PC* sd2) } \ } +#define equipPos2Id(index, field) \ + equip = sd->equip_index[index]; \ + if (equip >= 0) \ + { \ + item = sd->inventory_data[equip]; \ + if (item && item->nameid) \ + { \ + send_changelook2(sd, bl, bl->id, field, item->nameid, 0, item, equip, AREA); \ + } \ + } + static void eclif_send_additional_slots2(struct block_list *bl) { if (!bl) @@ -268,6 +291,8 @@ static void eclif_send_additional_slots2(struct block_list *bl) if (!data || data->invisible) return; + equipPos2Id(EQI_HAND_R, LOOK_WEAPON); + equipPos2Id(EQI_HAND_L, LOOK_SHIELD); equipPos2(EQI_HEAD_LOW, LOOK_HEAD_BOTTOM); equipPos2(EQI_HEAD_TOP, LOOK_HEAD_TOP); equipPos2(EQI_HEAD_MID, LOOK_HEAD_MID); @@ -284,6 +309,7 @@ static void eclif_send_additional_slots2(struct block_list *bl) } #undef equipPos2 +#undef equipPos2Id void eclif_getareachar_unit_post(TBL_PC* sd, struct block_list *bl) { |