summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-09-30 09:27:26 +0300
committerAndrei Karas <akaras@inbox.ru>2019-10-17 03:30:39 +0300
commite62562efbfb4f414e6b977989682da42fc487f20 (patch)
treedf0cd33379fb3a1e66b6363ac1c14ba3d3909b1c /src/map/clif.c
parent1bc17b805aec9dff503afca1e4b7120c5c836b75 (diff)
downloadhercules-e62562efbfb4f414e6b977989682da42fc487f20.tar.gz
hercules-e62562efbfb4f414e6b977989682da42fc487f20.tar.bz2
hercules-e62562efbfb4f414e6b977989682da42fc487f20.tar.xz
hercules-e62562efbfb4f414e6b977989682da42fc487f20.zip
Define constants for packet names ZC_INVENTORY_START and ZC_INVENTORY_END
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3e6a3469d..999a232dc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2935,10 +2935,10 @@ static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type
nullpo_retv(sd);
nullpo_retv(name);
- char buf[sizeof(struct ZC_INVENTORY_START) + 24];
+ char buf[sizeof(struct PACKET_ZC_INVENTORY_START) + 24];
memset(buf, 0, sizeof(buf));
- struct ZC_INVENTORY_START *p = (struct ZC_INVENTORY_START *)buf;
- p->packetType = 0xb08;
+ struct PACKET_ZC_INVENTORY_START *p = (struct PACKET_ZC_INVENTORY_START *)buf;
+ p->packetType = HEADER_ZC_INVENTORY_START;
#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
p->invType = type;
#endif
@@ -2946,11 +2946,11 @@ static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type
int strLen = (int)safestrnlen(name, 24) + 1;
if (strLen > 24)
strLen = 24;
- const int len = sizeof(struct ZC_INVENTORY_START) + strLen;
+ const int len = sizeof(struct PACKET_ZC_INVENTORY_START) + strLen;
p->packetLength = len;
safestrncpy(p->name, name, strLen);
#else
- const int len = sizeof(struct ZC_INVENTORY_START);
+ const int len = sizeof(struct PACKET_ZC_INVENTORY_START);
safestrncpy(p->name, name, NAME_LENGTH);
#endif
clif->send(p, len, &sd->bl, SELF);
@@ -2962,8 +2962,8 @@ static void clif_inventoryEnd(struct map_session_data *sd, enum inventory_type t
#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
nullpo_retv(sd);
- struct ZC_INVENTORY_END p;
- p.packetType = 0xb0b;
+ struct PACKET_ZC_INVENTORY_END p;
+ p.packetType = HEADER_ZC_INVENTORY_END;
#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
p.invType = type;
#endif