summaryrefslogtreecommitdiff
path: root/src/emap/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-06 18:19:03 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-06 18:19:03 +0300
commitf03b90ff34e16a5fdd50e3994defffabd088f116 (patch)
treed0be221e465002ba3f7601bfd3fd48b26cd603d0 /src/emap/clif.c
parent43e788045d34933ad520e4c9687e9e4b16523087 (diff)
downloadevol-hercules-f03b90ff34e16a5fdd50e3994defffabd088f116.tar.gz
evol-hercules-f03b90ff34e16a5fdd50e3994defffabd088f116.tar.bz2
evol-hercules-f03b90ff34e16a5fdd50e3994defffabd088f116.tar.xz
evol-hercules-f03b90ff34e16a5fdd50e3994defffabd088f116.zip
Show equipped slots weapon and shield always.
Before it was invisible in some cases.
Diffstat (limited to 'src/emap/clif.c')
-rw-r--r--src/emap/clif.c26
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)
{