summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-23 11:43:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-23 11:43:12 +0300
commit9aa109f1e404c60cf94832f95c82b7056916d14a (patch)
treee0f0778b4427f7959094b3b2ad1ec432a6e6c7d8 /src/map/clif.c
parent2404bb2a08f98713d872743c33811ee7e4c69c49 (diff)
downloadevol-hercules-9aa109f1e404c60cf94832f95c82b7056916d14a.tar.gz
evol-hercules-9aa109f1e404c60cf94832f95c82b7056916d14a.tar.bz2
evol-hercules-9aa109f1e404c60cf94832f95c82b7056916d14a.tar.xz
evol-hercules-9aa109f1e404c60cf94832f95c82b7056916d14a.zip
map: show most slots to other players on warp or enter visible area.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 66a7312..0bcd990 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17,6 +17,7 @@
#include "map/clif.h"
#include "map/lang.h"
+#include "map/send.h"
void eclif_quest_send_list(struct map_session_data *sd)
{
@@ -97,3 +98,44 @@ void eclif_charnameack(int *fdPtr, struct block_list *bl)
}
}
}
+
+#define equipPos(index, field) \
+ equip = sd->equip_index[index]; \
+ if (equip >= 0) \
+ { \
+ item = sd->inventory_data[equip]; \
+ if (item && item->look) \
+ send_changelook(fd, id, field, item->look); \
+ }
+
+static void eclif_send_additional_slots(struct map_session_data* sd, struct map_session_data* sd2)
+{
+ int f;
+ const int id = sd->bl.id;
+ const int fd = sd2->fd;
+
+ struct item_data *item;
+ short equip;
+
+ equipPos(EQI_HEAD_LOW, LOOK_HEAD_BOTTOM);
+ equipPos(EQI_HEAD_TOP, LOOK_HEAD_TOP);
+ equipPos(EQI_HEAD_MID, LOOK_HEAD_MID);
+ equipPos(EQI_GARMENT, LOOK_ROBE);
+ //skip EQI_ARMOR
+ equipPos(EQI_SHOES, LOOK_SHOES);
+ equipPos(EQI_COSTUME_TOP, 13);
+ equipPos(EQI_COSTUME_MID, 14);
+ equipPos(EQI_COSTUME_LOW, 15);
+ equipPos(EQI_COSTUME_GARMENT, 16);
+ //skipping SHADOW slots
+}
+
+void eclif_getareachar_unit_post(struct map_session_data* sd, struct block_list *bl)
+{
+ // need replace it to _post
+ if (bl->type == BL_PC)
+ {
+ eclif_send_additional_slots(sd, (struct map_session_data *)bl);
+ eclif_send_additional_slots((struct map_session_data *)bl, sd);
+ }
+}