summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-28 15:41:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-28 15:42:39 +0300
commit905642f167858017e1fa1582f6253da3c9a8ff97 (patch)
tree792d0cd12bab53cb03addb634ec0baa1cc2171ea /src/map/clif.c
parent1ea90a6de5d0dc506b4be96ded4fe50e27df7e2b (diff)
downloadevol-hercules-905642f167858017e1fa1582f6253da3c9a8ff97.tar.gz
evol-hercules-905642f167858017e1fa1582f6253da3c9a8ff97.tar.bz2
evol-hercules-905642f167858017e1fa1582f6253da3c9a8ff97.tar.xz
evol-hercules-905642f167858017e1fa1582f6253da3c9a8ff97.zip
Send map mask to clients.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c4766dc..3ceaabd 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -20,6 +20,8 @@
#include "map/mapd.h"
#include "map/mapdext.h"
#include "map/send.h"
+#include "map/session.h"
+#include "map/sessionext.h"
void eclif_quest_send_list(struct map_session_data *sd)
{
@@ -145,7 +147,20 @@ void eclif_getareachar_unit_post(struct map_session_data* sd, struct block_list
void eclif_authok_post(struct map_session_data *sd)
{
+ if (!sd)
+ return;
+
eclif_send_additional_slots(sd, sd);
+ struct MapdExt *data = mapd_get(sd->bl.m);
+ int mask = data ? data->mask : 1;
+ send_mapmask(sd->fd, mask);
+}
+
+void eclif_changemap_post(struct map_session_data *sd, short *m, int *x, int *y)
+{
+ struct MapdExt *data = mapd_get(sd->bl.m);
+ int mask = data ? data->mask : 1;
+ send_mapmask(sd->fd, mask);
}
void eclif_handle_invisible_map(struct block_list *bl, enum send_target target)
@@ -179,3 +194,23 @@ void eclif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, en
eclif_handle_invisible_map(bl, *target);
}
+
+int eclif_send_actual(int *fd, void *buf, int *len)
+{
+ if (*len >= 2)
+ {
+ const int packet = RBUFW (buf, 0);
+ if (packet == 0xb02)
+ {
+ struct SessionExt *data = session_get(*fd);
+ if (!data)
+ return 0;
+ if (data->clientVersion < 3)
+ { // not sending 0xb02 to old clients
+ hookStop();
+ return 0;
+ }
+ }
+ }
+ return 0;
+}