summaryrefslogtreecommitdiff
path: root/src/emap/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-16 20:42:18 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-16 20:42:18 +0300
commit38efe26b9982a176f89910f9b6b3650558175360 (patch)
tree8513fb39f578a720a06349899b2b3e2292cd3338 /src/emap/clif.c
parent063fa3b10532807caebe3a10ae15d0cb878d5f75 (diff)
downloadevol-hercules-38efe26b9982a176f89910f9b6b3650558175360.tar.gz
evol-hercules-38efe26b9982a176f89910f9b6b3650558175360.tar.bz2
evol-hercules-38efe26b9982a176f89910f9b6b3650558175360.tar.xz
evol-hercules-38efe26b9982a176f89910f9b6b3650558175360.zip
Add packet with cards and other attributes for dropped item on ground.
Diffstat (limited to 'src/emap/clif.c')
-rw-r--r--src/emap/clif.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/emap/clif.c b/src/emap/clif.c
index b1201f6..9583ac3 100644
--- a/src/emap/clif.c
+++ b/src/emap/clif.c
@@ -367,6 +367,28 @@ int eclif_send_actual(int *fd, void *buf, int *len)
return 0;
}
}
+ if (packet == 0x84b)
+ {
+ struct SessionExt *data = session_get(*fd);
+ if (!data)
+ return 0;
+ if (data->clientVersion >= 10)
+ { // not sending old packets to new clients
+ hookStop();
+ return 0;
+ }
+ }
+ if (packet == 0xb19)
+ {
+ struct SessionExt *data = session_get(*fd);
+ if (!data)
+ return 0;
+ if (data->clientVersion < 10)
+ { // not sending new packets to old clients
+ hookStop();
+ return 0;
+ }
+ }
}
return 0;
}
@@ -568,3 +590,28 @@ void eclif_getareachar_item(struct map_session_data *sd, struct flooritem_data *
WFIFOB(fd, 27) = fitem->suby;
WFIFOSET(fd, 28);
}
+
+void eclif_dropflooritem(struct flooritem_data* fitem)
+{
+ char buf[28];
+ int view;
+
+ WBUFW(buf, 0) = 0xb19;
+ WBUFL(buf, 2) = fitem->bl.id;
+ if((view = itemdb_viewid(fitem->item_data.nameid)) > 0)
+ WBUFW(buf, 6) = view;
+ else
+ WBUFW(buf, 6) = fitem->item_data.nameid;
+ WBUFB(buf, 8) = itemtype(itemdb_type(fitem->item_data.nameid));
+ WBUFB(buf, 9) = fitem->item_data.identify;
+ WBUFB(buf, 10) = fitem->item_data.attribute;
+ WBUFB(buf, 11) = fitem->item_data.refine;
+ clif->addcards(WBUFP(buf, 12), &fitem->item_data);
+ WBUFW(buf, 20) = fitem->bl.x;
+ WBUFW(buf, 22) = fitem->bl.y;
+ WBUFW(buf, 24) = fitem->item_data.amount;
+ WBUFB(buf, 26) = fitem->subx;
+ WBUFB(buf, 27) = fitem->suby;
+
+ clif->send(&buf, 28, &fitem->bl, AREA);
+}