diff options
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 9be4feb70..a9d82b1ac 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -20533,34 +20533,41 @@ void clif_parse_open_ui_request(int fd, struct map_session_data *sd) void clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType) { -#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411 - int claimed = 0; +#if PACKETVER >= 20150128 struct PACKET_ZC_OPEN_UI p; nullpo_retv(sd); - p.PacketType = 0xAE2; + p.PacketType = openUiType; switch (uiType) { case CZ_STYLIST_UI: - p.UIType = STYLIST_UI; + p.UIType = ZC_STYLIST_UI; +#if PACKETVER >= 20171122 p.data = 0; +#endif break; case CZ_ATTENDANCE_UI: + { +#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411 + int claimed = 0; if (clif->attendance_timediff(sd) != true) ++claimed; else if (sd->status.attendance_count >= VECTOR_LENGTH(clif->attendance_data)) sd->status.attendance_count = 0; p.UIType = ZC_ATTENDANCE_UI; p.data = sd->status.attendance_count * 10 + claimed; +#else + ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n"); + return; +#endif break; + } default: - ShowWarning("clif_open_ui: Requested UI (%d) is not implemented yet.\n", uiType); + ShowWarning("clif_open_ui: Requested UI (%u) is not implemented yet.\n", uiType); return; } clif->send(&p, sizeof(p), &sd->bl, SELF); -#else - ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n"); #endif } |