diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 10 | ||||
-rw-r--r-- | src/map/packets_struct.h | 4 | ||||
-rw-r--r-- | src/map/status.c | 24 |
3 files changed, 23 insertions, 15 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 60f4b18c0..47d5a1586 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -819,7 +819,7 @@ void clif_dropflooritem(struct flooritem_data* fitem) { p.subX = fitem->subx; p.subY = fitem->suby; p.count = fitem->item_data.amount; -#ifdef PACKETVER_ZERO +#if defined(PACKETVER_ZERO) || PACKETVER >= 20180418 if (fitem->showdropeffect) { p.showdropeffect = itemdb_showdropeffect(fitem->item_data.nameid); p.dropeffectmode = itemdb_dropeffectmode(fitem->item_data.nameid); @@ -20519,7 +20519,7 @@ void clif_parse_open_ui_request(int fd, struct map_session_data *sd) void clif_open_ui(struct map_session_data *sd, int8 UIType) { -#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 +#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411 int claimed = 0; struct PACKET_ZC_OPEN_UI p; @@ -20542,14 +20542,14 @@ void clif_open_ui(struct map_session_data *sd, int8 UIType) clif->send(&p, sizeof(p), &sd->bl, SELF); #else - ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404.\n"); + ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n"); #endif } void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd) { -#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 +#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411 struct rodex_message msg = { 0 }; struct attendance_entry *entry; @@ -20593,7 +20593,7 @@ void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd) intif->rodex_sendmail(&msg); clif->ui_action(sd, 0, sd->status.attendance_count); #else - ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404.\n"); + ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n"); #endif } diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 438084778..5b9a4344a 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -191,7 +191,7 @@ enum packet_headers { skill_entryType = 0x9ca, #endif graffiti_entryType = 0x1c9, -#ifdef PACKETVER_ZERO +#if defined(PACKETVER_ZERO) || PACKETVER >= 20180418 dropflooritemType = 0xadd, #elif PACKETVER > 20130000 /* not sure date */ dropflooritemType = 0x84b, @@ -530,7 +530,7 @@ struct packet_dropflooritem { uint8 subX; uint8 subY; int16 count; -#ifdef PACKETVER_ZERO +#if defined(PACKETVER_ZERO) || PACKETVER >= 20180418 int8 showdropeffect; int16 dropeffectmode; #endif diff --git a/src/map/status.c b/src/map/status.c index b2f67735b..a39449b11 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -10189,8 +10189,8 @@ void status_change_start_stop_action(struct block_list *bl, enum sc_type type) * @param val3 Additional value (meaning depends on type). * @param val4 Additional value (meaning depends on type). * - * @retval 0 if no status change happened. - * @retval 1 if the status change was successfully applied. + * @retval false if no status change happened, or the other sc can be started regardless. + * @retval true if the status change was successfully applied and the other sc shouldn't be started. */ bool status_end_sc_before_start(struct block_list *bl, struct status_data *st, struct status_change* sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4) { @@ -10200,14 +10200,22 @@ bool status_end_sc_before_start(struct block_list *bl, struct status_data *st, s switch (type) { case SC_BLESSING: - //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM - //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm] - if ((!undead_flag && st->race != RC_DEMON) || bl->type == BL_PC) { - status_change_end(bl, SC_CURSE, INVALID_TIMER); - if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) + // TODO: Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM + // but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm] + if ((undead_flag == 0 && st->race != RC_DEMON) || bl->type == BL_PC) { + bool prevent_start = false; + if (sc->data[SC_CURSE] != NULL) { + prevent_start = true; + status_change_end(bl, SC_CURSE, INVALID_TIMER); + } + if (sc->data[SC_STONE] != NULL && sc->opt1 == OPT1_STONE) { + prevent_start = true; status_change_end(bl, SC_STONE, INVALID_TIMER); + } + if (prevent_start) + return true; } - if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH) + if (sc->data[SC_SOULLINK] != NULL && sc->data[SC_SOULLINK]->val2 == SL_HIGH) status_change_end(bl, SC_SOULLINK, INVALID_TIMER); break; case SC_INC_AGI: |