summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-20 00:16:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-20 00:16:20 +0300
commitc90ec19afcfc826a077ed300fc2a9f8347d9b1e6 (patch)
tree3fa00022e89b3d92a64da4afa94e7bb503f7dcd5 /src
parente38b7606911d4763bd24dfa627f9ec6a7c1971d0 (diff)
downloadevol-hercules-c90ec19afcfc826a077ed300fc2a9f8347d9b1e6.tar.gz
evol-hercules-c90ec19afcfc826a077ed300fc2a9f8347d9b1e6.tar.bz2
evol-hercules-c90ec19afcfc826a077ed300fc2a9f8347d9b1e6.tar.xz
evol-hercules-c90ec19afcfc826a077ed300fc2a9f8347d9b1e6.zip
add packet to get state from client.
Diffstat (limited to 'src')
-rw-r--r--src/map/data/session.c1
-rw-r--r--src/map/init.c1
-rw-r--r--src/map/parse.c6
-rw-r--r--src/map/parse.h1
-rw-r--r--src/map/struct/sessionext.h1
5 files changed, 10 insertions, 0 deletions
diff --git a/src/map/data/session.c b/src/map/data/session.c
index fd1c0d5..81fe697 100644
--- a/src/map/data/session.c
+++ b/src/map/data/session.c
@@ -42,5 +42,6 @@ struct SessionExt *session_create(void)
return NULL;
data->clientVersion = 0;
data->language = 0;
+ data->state = 0;
return data;
}
diff --git a/src/map/init.c b/src/map/init.c
index c00c884..e5dff10 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -109,6 +109,7 @@ HPExport void plugin_init (void)
addPacket(0xb09, 26, map_parse_part_channel, hpClif_Parse);
addPacket(0xb0c, -1, map_parse_pet_say, hpClif_Parse);
addPacket(0xb0d, 3, map_parse_pet_emote, hpClif_Parse);
+ addPacket(0xb0e, 4, map_parse_set_status, hpClif_Parse);
addHookPre("pc->readparam", epc_readparam_pre);
addHookPre("pc->setregistry", epc_setregistry);
addHookPre("pc->equipitem_pos", epc_equipitem_pos);
diff --git a/src/map/parse.c b/src/map/parse.c
index bf3f296..7044197 100644
--- a/src/map/parse.c
+++ b/src/map/parse.c
@@ -124,3 +124,9 @@ void map_parse_pet_emote(int fd)
sd->emotionlasttime = t;
send_pet_emote(sd, RFIFOB(fd, 2));
}
+
+void map_parse_set_status(int fd)
+{
+ struct SessionExt *data = session_get(fd);
+ data->state = RFIFOB(fd, 2);
+}
diff --git a/src/map/parse.h b/src/map/parse.h
index eaa3e37..75a0392 100644
--- a/src/map/parse.h
+++ b/src/map/parse.h
@@ -9,5 +9,6 @@ void map_parse_join_channel(int fd);
void map_parse_part_channel(int fd);
void map_parse_pet_say(int fd);
void map_parse_pet_emote(int fd);
+void map_parse_set_status(int fd);
#endif // EVOL_MAP_PARSE
diff --git a/src/map/struct/sessionext.h b/src/map/struct/sessionext.h
index cd94393..c742faa 100644
--- a/src/map/struct/sessionext.h
+++ b/src/map/struct/sessionext.h
@@ -8,6 +8,7 @@ struct SessionExt
{
int clientVersion;
int language;
+ uint8 state;
};
#endif // EVOL_MAP_SESSIONEXT