summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-05-15 05:35:40 +0300
committerAndrei Karas <akaras@inbox.ru>2019-06-02 00:23:24 +0300
commit0f4fd231e6660860c991bbcc59c075547245e71d (patch)
treee2a99f2b9a4b0f8ab2aa83191d0bbbe66e5931df /src/map
parentc7cccdb4bcf02470a63b1cf36b00eb6135998849 (diff)
downloadhercules-0f4fd231e6660860c991bbcc59c075547245e71d.tar.gz
hercules-0f4fd231e6660860c991bbcc59c075547245e71d.tar.bz2
hercules-0f4fd231e6660860c991bbcc59c075547245e71d.tar.xz
hercules-0f4fd231e6660860c991bbcc59c075547245e71d.zip
Use new shortcuts packets in zero 2019-05-15 and main 2019-05-22
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c8
-rw-r--r--src/map/packets.h2
-rw-r--r--src/map/packets_struct.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index f5fcc7d9d..2bab6391c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10825,7 +10825,7 @@ static void clif_hotkeysAll_send(struct map_session_data *sd)
{
#ifdef HOTKEY_SAVING
clif->hotkeys(sd, 0);
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
// send second tab only if data exists
for (int i = MAX_HOTKEYS; i < MAX_HOTKEYS * 2; i++) {
if (sd->status.hotkeys[i].type != 0 || sd->status.hotkeys[i].id != 0 || sd->status.hotkeys[i].lv != 0) {
@@ -10854,7 +10854,7 @@ static void clif_hotkeys_send(struct map_session_data *sd, int tab)
else
p.rotate = sd->status.hotkey_rowshift2;
#endif
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
p.tab = tab;
#endif
const int offset = tab * MAX_HOTKEYS;
@@ -10879,7 +10879,7 @@ static void clif_parse_HotkeyRowShift1(int fd, struct map_session_data *sd)
static void clif_parse_HotkeyRowShift2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_HotkeyRowShift2(int fd, struct map_session_data *sd)
{
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
const struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 *p = RFIFOP(fd, 0);
if (p->tab == 0)
sd->status.hotkey_rowshift = p->rowshift;
@@ -10911,7 +10911,7 @@ static void clif_parse_Hotkey2(int fd, struct map_session_data *sd) __attribute_
static void clif_parse_Hotkey2(int fd, struct map_session_data *sd)
{
#ifdef HOTKEY_SAVING
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
const struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 *p = RFIFOP(fd, 0);
const unsigned short idx = p->index + p->tab * MAX_HOTKEYS;
Assert_retv(idx < MAX_HOTKEYS_DB);
diff --git a/src/map/packets.h b/src/map/packets.h
index 6df05900e..8ff6c4993 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1949,7 +1949,7 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0b1c,clif->pPing);
#endif
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
packet(0x0b21,clif->pHotkey2);
packet(0x0b22,clif->pHotkeyRowShift2); // CZ_SHORTCUTKEYBAR_ROTATE
#endif
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 5cc58affb..9d77540e2 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1423,7 +1423,7 @@ struct hotkey_data {
int16 count; // Item Quantity/Skill Level
} __attribute__((packed));
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
#define MAX_HOTKEYS_PACKET 38
struct PACKET_ZC_SHORTCUT_KEY_LIST {
int16 packetType;
@@ -1472,7 +1472,7 @@ struct PACKET_CZ_SHORTCUT_KEY_CHANGE1 {
DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE1, 0x02ba);
#endif
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 {
int16 packetType;
uint16 tab;
@@ -1490,7 +1490,7 @@ struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE1 {
DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE1, 0x0a01);
#endif
-#if PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190515
struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 {
int16 packetType;
uint16 tab;