summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mmo.h5
-rw-r--r--src/common/packets/packets2019_len_main.h23
-rw-r--r--src/common/packets/packets2019_len_re.h23
-rw-r--r--src/common/packets/packets2019_len_zero.h35
-rw-r--r--src/common/socket.c7
-rw-r--r--src/common/socket.h1
6 files changed, 72 insertions, 22 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 3a0f73520..2fc464243 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -487,6 +487,7 @@ enum e_mmo_charstatus_opt {
OPT_NONE = 0x0,
OPT_SHOW_EQUIP = 0x1,
OPT_ALLOW_PARTY = 0x2,
+ OPT_ALLOW_CALL = 0x4,
};
enum e_item_bound_type {
@@ -733,7 +734,9 @@ struct mmo_charstatus {
#ifdef HOTKEY_SAVING
struct hotkey hotkeys[MAX_HOTKEYS];
#endif
- bool show_equip, allow_party;
+ bool show_equip;
+ bool allow_party;
+ bool allow_call;
unsigned short rename;
unsigned short slotchange;
diff --git a/src/common/packets/packets2019_len_main.h b/src/common/packets/packets2019_len_main.h
index 3b46c26cb..79c8d3f51 100644
--- a/src/common/packets/packets2019_len_main.h
+++ b/src/common/packets/packets2019_len_main.h
@@ -3787,7 +3787,7 @@ packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
packetLen(0x0a44, -1) // ZC_GROUP_LIST
// Packet: 0x0a46
-packetLen(0x0a46, 14)
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
// Packet: 0x0a47
packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
@@ -4288,7 +4288,7 @@ packetLen(0x0afa, 54)
packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
// Packet: 0x0afc
-packetLen(0x0afc, 16)
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
// Packet: 0x0afd
packetLen(0x0afd, -1) // ZC_GUILD_POSITION
@@ -4379,17 +4379,17 @@ packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
// Packet: 0x0b1b
#if PACKETVER >= 20190213
-packetLen(0x0b1b, 2)
+packetLen(0x0b1b, 2) // ZC_ALT_PING
#endif
// Packet: 0x0b1c
#if PACKETVER >= 20190227
-packetLen(0x0b1c, 2)
+packetLen(0x0b1c, 2) // CZ_PING
#endif
// Packet: 0x0b1d
#if PACKETVER >= 20190227
-packetLen(0x0b1d, 2)
+packetLen(0x0b1d, 2) // ZC_PING
#endif
// Packet: 0x0b1e
@@ -4402,15 +4402,24 @@ packetLen(0x0b1e, 10)
packetLen(0x0b1f, 10)
#endif
+// Packet: 0x0b20
+#if PACKETVER >= 20190403
+packetLen(0x0b20, 271)
+#endif
+
// Packet: 0x0b21
-#if PACKETVER >= 20190306
+#if PACKETVER >= 20190403
+packetLen(0x0b21, 13)
+#elif PACKETVER >= 20190306
// removed
#elif PACKETVER >= 20190227
packetLen(0x0b21, 10)
#endif
// Packet: 0x0b22
-#if PACKETVER >= 20190306
+#if PACKETVER >= 20190403
+packetLen(0x0b22, 5)
+#elif PACKETVER >= 20190306
// removed
#elif PACKETVER >= 20190227
packetLen(0x0b22, 6)
diff --git a/src/common/packets/packets2019_len_re.h b/src/common/packets/packets2019_len_re.h
index 6614fa8fd..c43b65cd9 100644
--- a/src/common/packets/packets2019_len_re.h
+++ b/src/common/packets/packets2019_len_re.h
@@ -3793,7 +3793,7 @@ packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
packetLen(0x0a44, -1) // ZC_GROUP_LIST
// Packet: 0x0a46
-packetLen(0x0a46, 14)
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
// Packet: 0x0a47
packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
@@ -4294,7 +4294,7 @@ packetLen(0x0afa, 54)
packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
// Packet: 0x0afc
-packetLen(0x0afc, 16)
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
// Packet: 0x0afd
packetLen(0x0afd, -1) // ZC_GUILD_POSITION
@@ -4385,17 +4385,17 @@ packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
// Packet: 0x0b1b
#if PACKETVER >= 20190213
-packetLen(0x0b1b, 2)
+packetLen(0x0b1b, 2) // ZC_ALT_PING
#endif
// Packet: 0x0b1c
#if PACKETVER >= 20190220
-packetLen(0x0b1c, 2)
+packetLen(0x0b1c, 2) // CZ_PING
#endif
// Packet: 0x0b1d
#if PACKETVER >= 20190220
-packetLen(0x0b1d, 2)
+packetLen(0x0b1d, 2) // ZC_PING
#endif
// Packet: 0x0b1e
@@ -4408,15 +4408,24 @@ packetLen(0x0b1e, 10)
packetLen(0x0b1f, 10)
#endif
+// Packet: 0x0b20
+#if PACKETVER >= 20190403
+packetLen(0x0b20, 271)
+#endif
+
// Packet: 0x0b21
-#if PACKETVER >= 20190306
+#if PACKETVER >= 20190403
+packetLen(0x0b21, 13)
+#elif PACKETVER >= 20190306
// removed
#elif PACKETVER >= 20190227
packetLen(0x0b21, 10)
#endif
// Packet: 0x0b22
-#if PACKETVER >= 20190306
+#if PACKETVER >= 20190403
+packetLen(0x0b22, 5)
+#elif PACKETVER >= 20190306
// removed
#elif PACKETVER >= 20190227
packetLen(0x0b22, 6)
diff --git a/src/common/packets/packets2019_len_zero.h b/src/common/packets/packets2019_len_zero.h
index 8ddbdcc18..85098505a 100644
--- a/src/common/packets/packets2019_len_zero.h
+++ b/src/common/packets/packets2019_len_zero.h
@@ -3787,7 +3787,7 @@ packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
packetLen(0x0a44, -1) // ZC_GROUP_LIST
// Packet: 0x0a46
-packetLen(0x0a46, 14)
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
// Packet: 0x0a47
packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
@@ -4288,7 +4288,7 @@ packetLen(0x0afa, 54)
packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
// Packet: 0x0afc
-packetLen(0x0afc, 16)
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
// Packet: 0x0afd
packetLen(0x0afd, -1) // ZC_GUILD_POSITION
@@ -4379,17 +4379,42 @@ packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
// Packet: 0x0b1b
#if PACKETVER >= 20190130
-packetLen(0x0b1b, 2)
+packetLen(0x0b1b, 2) // ZC_ALT_PING
#endif
// Packet: 0x0b1c
#if PACKETVER >= 20190220
-packetLen(0x0b1c, 2)
+packetLen(0x0b1c, 2) // CZ_PING
#endif
// Packet: 0x0b1d
#if PACKETVER >= 20190220
-packetLen(0x0b1d, 2)
+packetLen(0x0b1d, 2) // ZC_PING
+#endif
+
+// Packet: 0x0b1e
+#if PACKETVER >= 20190313
+packetLen(0x0b1e, 10)
+#endif
+
+// Packet: 0x0b1f
+#if PACKETVER >= 20190313
+packetLen(0x0b1f, 10)
+#endif
+
+// Packet: 0x0b20
+#if PACKETVER >= 20190327
+packetLen(0x0b20, 271)
+#endif
+
+// Packet: 0x0b21
+#if PACKETVER >= 20190327
+packetLen(0x0b21, 13)
+#endif
+
+// Packet: 0x0b22
+#if PACKETVER >= 20190327
+packetLen(0x0b22, 5)
#endif
diff --git a/src/common/socket.c b/src/common/socket.c
index faf57f412..dc5b06da0 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -488,11 +488,12 @@ static int send_from_fifo(int fd)
return 0;
}
- if( len > 0 )
+ if (len > 0)
{
+ sockt->session[fd]->wdata_tick = sockt->last_tick;
// some data could not be transferred?
// shift unsent data to the beginning of the queue
- if( (size_t)len < sockt->session[fd]->wdata_size )
+ if ((size_t)len < sockt->session[fd]->wdata_size)
memmove(sockt->session[fd]->wdata, sockt->session[fd]->wdata + len, sockt->session[fd]->wdata_size - len);
sockt->session[fd]->wdata_size -= len;
@@ -649,6 +650,7 @@ static int make_listen_bind(uint32 ip, uint16 port)
create_session(fd, sockt->connect_client, null_send, null_parse);
sockt->session[fd]->client_addr = 0; // just listens
sockt->session[fd]->rdata_tick = 0; // disable timeouts on this socket
+ sockt->session[fd]->wdata_tick = 0;
return fd;
}
@@ -731,6 +733,7 @@ static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseF
sockt->session[fd]->func_send = func_send;
sockt->session[fd]->func_parse = func_parse;
sockt->session[fd]->rdata_tick = sockt->last_tick;
+ sockt->session[fd]->wdata_tick = sockt->last_tick;
sockt->session[fd]->session_data = NULL;
sockt->session[fd]->hdata = NULL;
return 0;
diff --git a/src/common/socket.h b/src/common/socket.h
index 193b22645..b20b0b07e 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -130,6 +130,7 @@ struct socket_data {
size_t rdata_pos;
uint32 last_head_size;
time_t rdata_tick; // time of last recv (for detecting timeouts); zero when timeout is disabled
+ time_t wdata_tick; // time of last send (for detecting timeouts);
RecvFunc func_recv;
SendFunc func_send;