summaryrefslogtreecommitdiff
path: root/src/emap/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-16 00:01:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-16 00:02:53 +0300
commit42cd207c4c5f0be387f85f4c89bdcf21929a7f84 (patch)
tree59c38e8d75180a252419af867d747191faa361a2 /src/emap/clif.c
parentab731862f899dd87b84613ebf12a82cdc73e094f (diff)
downloadplugin-42cd207c4c5f0be387f85f4c89bdcf21929a7f84.tar.gz
plugin-42cd207c4c5f0be387f85f4c89bdcf21929a7f84.tar.bz2
plugin-42cd207c4c5f0be387f85f4c89bdcf21929a7f84.tar.xz
plugin-42cd207c4c5f0be387f85f4c89bdcf21929a7f84.zip
Add script function and packet to set group of cells to given mask (gat value)
New script function: setcells "map name", x1, y1, x2, y2, mask, "wall name"
Diffstat (limited to 'src/emap/clif.c')
-rw-r--r--src/emap/clif.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/emap/clif.c b/src/emap/clif.c
index 4eec6a6..5618848 100644
--- a/src/emap/clif.c
+++ b/src/emap/clif.c
@@ -412,6 +412,17 @@ int eclif_send_actual(int *fd, void *buf, int *len)
return 0;
}
}
+ if (packet == 0xb1b)
+ {
+ struct SessionExt *data = session_get(*fd);
+ if (!data)
+ return 0;
+ if (data->clientVersion < 14)
+ { // not sending new packets to old clients
+ hookStop();
+ return 0;
+ }
+ }
}
return 0;
}
@@ -450,10 +461,22 @@ void eclif_move(struct unit_data *ud)
send_advmoving(ud, false, ud->bl, AREA_WOS);
}
+bool tempChangeMap;
+
void eclif_parse_LoadEndAck_pre(int *fdPtr __attribute__ ((unused)),
struct map_session_data *sd)
{
sd->state.warp_clean = 0;
+ tempChangeMap = sd->state.changemap;
+}
+
+void eclif_parse_LoadEndAck_post(int *fdPtr __attribute__ ((unused)),
+ struct map_session_data *sd)
+{
+ if (!tempChangeMap)
+ { // some messages not sent if map not changed
+ map->iwall_get(sd);
+ }
}
void eclif_changelook2(struct block_list *bl, int type, int val,