summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
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);
+ }
+}