From e62562efbfb4f414e6b977989682da42fc487f20 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 Sep 2019 09:27:26 +0300 Subject: Define constants for packet names ZC_INVENTORY_START and ZC_INVENTORY_END --- src/map/clif.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/map/clif.c') 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 -- cgit v1.2.3-60-g2f50