summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-10-18 15:08:03 +0200
committerGitHub <noreply@github.com>2019-10-18 15:08:03 +0200
commit9ccfb2defb07670b4f350ed5853ae1a997d917d2 (patch)
treef0a93da2ac6b5d2fa06e4db8d78f0e950fbf24d0 /src/map/clif.c
parent1e72ad082e6e10b0a4fbbe703ce6ad44efb4063d (diff)
parent9e82150f9c3cbe2f83843a6d5fffaf3d91a7b119 (diff)
downloadhercules-9ccfb2defb07670b4f350ed5853ae1a997d917d2.tar.gz
hercules-9ccfb2defb07670b4f350ed5853ae1a997d917d2.tar.bz2
hercules-9ccfb2defb07670b4f350ed5853ae1a997d917d2.tar.xz
hercules-9ccfb2defb07670b4f350ed5853ae1a997d917d2.zip
Merge pull request #2537 from 4144/updatepackets
Update packets up to 2019-10-02
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ace733b75..cd4281b6f 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
@@ -5268,7 +5268,7 @@ static void clif_playerSkillToPacket(struct map_session_data *sd, struct SKILLDA
skillData->sp = 0;
skillData->range2 = 0;
}
-#if PACKETVER_RE_NUM >= 20190807
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
if (newSkill)
skillData->level2 = 0;
else
@@ -5419,7 +5419,7 @@ static void clif_skillinfo(struct map_session_data *sd, int skill_id, int inf)
p->sp = 0;
p->range2 = 0;
}
-#if PACKETVER_RE_NUM >= 20190807
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
p->level2 = skill_lv;
#endif
if (sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT)
@@ -16091,7 +16091,10 @@ static void clif_ranklist(struct map_session_data *sd, enum fame_list_type type)
p->packetType = HEADER_ZC_ACK_RANKING;
p->rankType = type;
#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
+PRAGMA_GCC9(GCC diagnostic push)
+PRAGMA_GCC9(GCC diagnostic ignored "-Waddress-of-packed-member")
clif->ranklist_sub2(p->chars, p->points, type);
+PRAGMA_GCC9(GCC diagnostic pop)
#else
clif->ranklist_sub(&p->ranks, type);
#endif