diff options
Diffstat (limited to 'src/map/clif.h')
-rw-r--r-- | src/map/clif.h | 66 |
1 files changed, 57 insertions, 9 deletions
diff --git a/src/map/clif.h b/src/map/clif.h index 5281c68cf..4b625023f 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -67,6 +67,10 @@ enum clif_messages; #define MAX_ROULETTE_COLUMNS 9 /** client-defined value **/ #define RGB2BGR(c) (((c) & 0x0000FF) << 16 | ((c) & 0x00FF00) | ((c) & 0xFF0000) >> 16) +#ifndef MAX_STYLIST_TYPE +#define MAX_STYLIST_TYPE LOOK_MAX +#endif + #define COLOR_CYAN 0x00ffffU #define COLOR_RED 0xff0000U #define COLOR_GREEN 0x00ff00U @@ -546,19 +550,36 @@ enum CZ_CONFIG { CZ_CONFIG_PET_AUTOFEEDING = 2, CZ_CONFIG_HOMUNCULUS_AUTOFEEDING = 3, }; + /** * Client UI types * used with packet 0xAE2 to request the client to open a specific ui **/ -enum ui_types { - BANK_UI = 0, - STYLIST_UI, - CAPTCHA_UI, - MACRO_UI, - TIPBOX_UI = 5, - RENEWQUEST_UI, - ATTENDANCE_UI +enum zc_ui_types { +#if PACKETVER >= 20150128 + ZC_BANK_UI = 0, + ZC_STYLIST_UI = 1, + ZC_CAPTCHA_UI = 2, + ZC_MACRO_UI = 3, +#endif + zc_ui_unused = 4, // for avoid compilation errors +#if PACKETVER >= 20171122 + ZC_TIPBOX_UI = 5, + ZC_RENEWQUEST_UI = 6, + ZC_ATTENDANCE_UI = 7 +#endif }; + +/** +* Client to server open ui request types (packet 0x0a68) +**/ +enum cz_ui_types { + CZ_STYLIST_UI = 1, + //unknown = 2, + //unknown = 3, + CZ_ATTENDANCE_UI = 5 +}; + /** * Private Airship Responds **/ @@ -602,6 +623,23 @@ struct attendance_entry { int qty; }; +/* Stylist data [Asheraf/Hercules]*/ +struct stylist_data_entry { + int16 id; + int32 zeny; + int16 itemid; + int16 boxid; +}; +VECTOR_DECL(struct stylist_data_entry) stylist_data[MAX_STYLIST_TYPE]; + +/** +* Stylist Shop Responds +**/ +enum stylist_shop { + STYLIST_SHOP_SUCCESS, + STYLIST_SHOP_FAILURE +}; + /** * Clif.c Interface **/ @@ -1431,11 +1469,21 @@ struct clif_interface { bool (*attendance_timediff) (struct map_session_data *sd); time_t (*attendance_getendtime) (void); void (*pOpenUIRequest) (int fd, struct map_session_data *sd); - void (*open_ui) (struct map_session_data *sd, int8 UIType); + void (*open_ui) (struct map_session_data *sd, enum cz_ui_types uiType); void (*pAttendanceRewardRequest) (int fd, struct map_session_data *sd); void (*ui_action) (struct map_session_data *sd, int32 UIType, int32 data); void (*pPrivateAirshipRequest) (int fd, struct map_session_data *sd); void (*PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag); + + void (*stylist_vector_init) (void); + void (*stylist_vector_clear) (void); + bool (*stylist_read_db_libconfig) (void); + bool (*stylist_read_db_libconfig_sub) (struct config_setting_t *it, int idx, const char *source); + bool (*style_change_validate_requirements) (struct map_session_data *sd, int type, int16 idx); + void (*stylist_send_rodexitem) (struct map_session_data *sd, int16 itemid); + void (*pReqStyleChange) (int fd, struct map_session_data *sd); + void (*cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem); + void (*style_change_response) (struct map_session_data *sd, enum stylist_shop flag); }; #ifdef HERCULES_CORE |