summaryrefslogtreecommitdiff
path: root/src/map/clif.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.h')
-rw-r--r--src/map/clif.h126
1 files changed, 93 insertions, 33 deletions
diff --git a/src/map/clif.h b/src/map/clif.h
index 20ecf8e8d..3ed9b96ae 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -54,8 +54,12 @@ struct skill_cd;
struct skill_unit;
struct unit_data;
struct view_data;
+struct achievement_data; // map/achievement.h
enum clif_messages;
+enum rodex_add_item;
+enum rodex_get_zeny;
+enum rodex_get_items;
/**
* Defines
@@ -89,6 +93,7 @@ typedef enum send_target {
AREA_WOC, // area, without chatrooms
AREA_WOSC, // area, without own chatrooms
AREA_CHAT_WOC, // hearable area, without chatrooms
+ AREA_DEAD, // area, for clear unit (monster death)
CHAT, // current chatroom
CHAT_WOS, // current chatroom, without self
PARTY,
@@ -364,7 +369,8 @@ typedef enum useskill_fail_cause { // clif_skill_fail
USESKILL_FAIL_STYLE_CHANGE_GRAPPLER = 82,
USESKILL_FAIL_THERE_ARE_NPC_AROUND = 83,
USESKILL_FAIL_NEED_MORE_BULLET = 84,
-}useskill_fail_cause;
+ // max known value 96
+} useskill_fail_cause;
/**
* Used to answer CZ_PC_BUY_CASH_POINT_ITEM (clif_parse_cashshop_buy)
@@ -550,31 +556,59 @@ 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
**/
enum private_airship {
P_AIRSHIP_NONE,
P_AIRSHIP_RETRY,
- P_AIRSHIP_INVALID_START_MAP,
- P_AIRSHIP_INVALID_END_MAP,
P_AIRSHIP_ITEM_NOT_ENOUGH,
+ P_AIRSHIP_INVALID_END_MAP,
+ P_AIRSHIP_INVALID_START_MAP,
P_AIRSHIP_ITEM_INVALID
};
+/** Pet Evolution Results */
+enum pet_evolution_result {
+ PET_EVOL_UNKNOWN = 0x0,
+ PET_EVOL_NO_CALLPET = 0x1,
+ PET_EVOL_NO_PETEGG = 0x2,
+ PET_EVOL_NO_RECIPE = 0x3,
+ PET_EVOL_NO_MATERIAL = 0x4,
+ PET_EVOL_RG_FAMILIAR = 0x5,
+ PET_EVOL_SUCCESS = 0x6,
+};
+
/**
* Structures
**/
@@ -586,7 +620,7 @@ struct s_packet_db {
};
struct hCSData {
- unsigned short id;
+ int id;
unsigned int price;
};
@@ -597,7 +631,7 @@ struct cdelayed_damage {
struct merge_item {
int16 position;
- int16 nameid;
+ int nameid;
};
/* attendance data */
@@ -610,12 +644,21 @@ struct attendance_entry {
struct stylist_data_entry {
int16 id;
int32 zeny;
- int16 itemid;
- int16 boxid;
+ int itemid;
+ int boxid;
+ bool allow_doram;
};
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
**/
struct clif_interface {
@@ -662,6 +705,7 @@ struct clif_interface {
unsigned short (*decrypt_cmd) ( int cmd, struct map_session_data *sd );
/* auth */
void (*authok) (struct map_session_data *sd);
+ void (*auth_error) (int fd, int errorCode);
void (*authrefuse) (int fd, uint8 error_code);
void (*authfail_fd) (int fd, int type);
void (*charselectok) (int id, uint8 ok);
@@ -682,14 +726,14 @@ struct clif_interface {
void (*equipitemack) (struct map_session_data *sd,int n,int pos,enum e_EQUIP_ITEM_ACK result);
void (*unequipitemack) (struct map_session_data *sd,int n,int pos,enum e_UNEQUIP_ITEM_ACK result);
void (*useitemack) (struct map_session_data *sd,int index,int amount,bool ok);
- void (*addcards) (unsigned char* buf, struct item* item);
- void (*addcards2) (unsigned short *cards, struct item* item);
+ void (*addcards) (struct EQUIPSLOTINFO *buf, struct item* item);
void (*item_sub) (unsigned char *buf, int n, struct item *i, struct item_data *id, int equip);
void (*getareachar_item) (struct map_session_data* sd,struct flooritem_data* fitem);
void (*cart_additem_ack) (struct map_session_data *sd, int flag);
void (*cashshop_load) (void);
- void (*package_announce) (struct map_session_data *sd, unsigned short nameid, unsigned short containerid);
- void (*item_drop_announce) (struct map_session_data *sd, unsigned short nameid, char *monsterName);
+ void (*cashShopSchedule) (int fd, struct map_session_data *sd);
+ void (*package_announce) (struct map_session_data *sd, int nameid, int containerid);
+ void (*item_drop_announce) (struct map_session_data *sd, int nameid, char *monsterName);
/* unit-related */
void (*clearunit_single) (int id, clr_type type, int fd);
void (*clearunit_area) (struct block_list* bl, clr_type type);
@@ -723,6 +767,7 @@ struct clif_interface {
bool (*spawn) (struct block_list *bl);
/* map-related */
void (*changemap) (struct map_session_data *sd, short m, int x, int y);
+ void (*changemap_airship) (struct map_session_data *sd, short m, int x, int y);
void (*changemapcell) (int fd, int16 m, int x, int y, int type, enum send_target target);
void (*map_property) (struct map_session_data* sd, enum map_property property);
void (*pvpset) (struct map_session_data *sd, int pvprank, int pvpnum,int type);
@@ -731,7 +776,8 @@ struct clif_interface {
void (*map_type) (struct map_session_data* sd, enum map_type type);
void (*maptypeproperty2) (struct block_list *bl,enum send_target t);
/* multi-map-server */
- void (*changemapserver) (struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
+ void (*changemapserver) (struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost);
+ void (*changemapserver_airship) (struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);
/* npc-shop-related */
void (*npcbuysell) (struct map_session_data* sd, int id);
void (*buylist) (struct map_session_data *sd, struct npc_data *nd);
@@ -768,7 +814,7 @@ struct clif_interface {
int (*insight) (struct block_list *bl,va_list ap);
int (*outsight) (struct block_list *bl,va_list ap);
void (*skillcastcancel) (struct block_list* bl);
- void (*skill_fail) (struct map_session_data *sd,uint16 skill_id,enum useskill_fail_cause cause,int btype);
+ void (*skill_fail) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, int32 item_id);
void (*skill_cooldown) (struct map_session_data *sd, uint16 skill_id, unsigned int duration);
void (*skill_memomessage) (struct map_session_data* sd, int type);
void (*skill_mapinfomessage) (struct map_session_data *sd, int type);
@@ -800,7 +846,7 @@ struct clif_interface {
void (*hpmeter_single) (int fd, int id, unsigned int hp, unsigned int maxhp);
int (*hpmeter_sub) (struct block_list *bl, va_list ap);
void (*upgrademessage) (int fd, int result, int item_id);
- void (*get_weapon_view) (struct map_session_data* sd, unsigned short *rhand, unsigned short *lhand);
+ void (*get_weapon_view) (struct map_session_data* sd, int *rhand, int *lhand);
void (*gospel_info) (struct map_session_data *sd, int type);
void (*feel_req) (int fd, struct map_session_data *sd, uint16 skill_lv);
void (*starskill) (struct map_session_data* sd, const char* mapname, int monster_id, unsigned char star, unsigned char result);
@@ -809,7 +855,7 @@ struct clif_interface {
void (*mission_info) (struct map_session_data *sd, int mob_id, unsigned char progress);
void (*feel_hate_reset) (struct map_session_data *sd);
void (*partytickack) (struct map_session_data* sd, bool flag);
- void (*zc_config) (struct map_session_data *sd, int type, int flag);
+ void (*zc_config) (struct map_session_data *sd, enum CZ_CONFIG type, int flag);
void (*viewequip_ack) (struct map_session_data* sd, struct map_session_data* tsd);
void (*equpcheckbox) (struct map_session_data* sd);
void (*displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest);
@@ -900,7 +946,8 @@ struct clif_interface {
void (*broadcast2) (struct block_list *bl, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target);
void (*messagecolor_self) (int fd, uint32 color, const char *msg);
void (*messagecolor) (struct block_list* bl, uint32 color, const char* msg);
- void (*disp_overhead) (struct block_list *bl, const char* mes);
+ void (*disp_overhead) (struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl);
+ void (*notify_playerchat) (struct block_list *bl, const char *mes);
void (*msgtable) (struct map_session_data* sd, enum clif_messages msg_id);
void (*msgtable_num) (struct map_session_data *sd, enum clif_messages msg_id, int value);
void (*msgtable_skill) (struct map_session_data *sd, uint16 skill_id, enum clif_messages msg_id);
@@ -932,6 +979,7 @@ struct clif_interface {
void (*vendinglist) (struct map_session_data* sd, unsigned int id, struct s_vending* vending_list);
void (*buyvending) (struct map_session_data* sd, int index, int amount, int fail);
void (*openvending) (struct map_session_data* sd, int id, struct s_vending* vending_list);
+ void (*openvendingAck) (int fd, int result);
void (*vendingreport) (struct map_session_data* sd, int index, int amount, uint32 char_id, int zeny);
/* storage handling */
void (*storagelist) (struct map_session_data* sd, struct item* items, int items_length);
@@ -1096,9 +1144,9 @@ struct clif_interface {
void (*buyingstore_disappear_entry_single) (struct map_session_data* sd, struct map_session_data* pl_sd);
void (*buyingstore_itemlist) (struct map_session_data* sd, struct map_session_data* pl_sd);
void (*buyingstore_trade_failed_buyer) (struct map_session_data* sd, short result);
- void (*buyingstore_update_item) (struct map_session_data* sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny);
+ void (*buyingstore_update_item) (struct map_session_data* sd, int nameid, unsigned short amount, uint32 char_id, int zeny);
void (*buyingstore_delete_item) (struct map_session_data* sd, short index, unsigned short amount, int price);
- void (*buyingstore_trade_failed_seller) (struct map_session_data* sd, short result, unsigned short nameid);
+ void (*buyingstore_trade_failed_seller) (struct map_session_data* sd, short result, int nameid);
/* search store-related */
void (*search_store_info_ack) (struct map_session_data* sd);
void (*search_store_info_failed) (struct map_session_data* sd, unsigned char reason);
@@ -1141,7 +1189,7 @@ struct clif_interface {
void (*npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response);
/* */
bool (*parse_roulette_db) (void);
- void (*roulette_generate_ack) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID);
+ void (*roulette_generate_ack) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID);
/* Merge Items */
void (*openmergeitem) (int fd, struct map_session_data *sd);
void (*cancelmergeitem) (int fd, struct map_session_data *sd);
@@ -1151,6 +1199,13 @@ struct clif_interface {
bool (*isdisguised) (struct block_list* bl);
void (*navigate_to) (struct map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id);
unsigned char (*bl_type) (struct block_list *bl);
+ /* Achievement System */
+ void (*achievement_send_list) (int fd, struct map_session_data *sd);
+ void (*achievement_send_update) (int fd, struct map_session_data *sd, const struct achievement_data *ad);
+ void (*pAchievementGetReward) (int fd, struct map_session_data *sd);
+ void (*achievement_reward_ack) (int fd, struct map_session_data *sd, const struct achievement_data *ad);
+ void (*change_title_ack) (int fd, struct map_session_data *sd, int title_id);
+ void (*pChangeTitle) (int fd, struct map_session_data *sd);
/*------------------------
*- Parse Incoming Packet
*------------------------*/
@@ -1404,7 +1459,7 @@ struct clif_interface {
void (*pRodexOpenWriteMail) (int fd, struct map_session_data *sd);
void (*rodex_open_write_mail) (int fd, const char *receiver_name, int8 result);
void (*pRodexAddItem) (int fd, struct map_session_data *sd);
- void (*rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, int8 result);
+ void (*rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result);
void (*pRodexRemoveItem) (int fd, struct map_session_data *sd);
void (*rodex_remove_item_result) (struct map_session_data *sd, int16 idx, int16 amount);
void (*pRodexSendMail) (int fd, struct map_session_data *sd);
@@ -1424,9 +1479,9 @@ struct clif_interface {
void (*rodex_delete_mail) (struct map_session_data *sd, int8 opentype, int64 mail_id);
void (*pRodexRefreshMaillist) (int fd, struct map_session_data *sd);
void (*pRodexRequestZeny) (int fd, struct map_session_data *sd);
- void (*rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
+ void (*rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result);
void (*pRodexRequestItems) (int fd, struct map_session_data *sd);
- void (*rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
+ void (*rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result);
void (*rodex_icon) (int fd, bool show);
void (*skill_scale) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime);
/* Clan System */
@@ -1438,13 +1493,15 @@ struct clif_interface {
/* Hat Effect */
void (*hat_effect) (struct block_list *bl, struct block_list *tbl, enum send_target target);
void (*hat_effect_single) (struct block_list *bl, uint16 effectId, bool enable);
+ void (*overweight_percent) (struct map_session_data *sd);
+ void (*pChangeDress) (int fd, struct map_session_data *sd);
bool (*pAttendanceDB) (void);
bool (*attendancedb_libconfig_sub) (struct config_setting_t *it, int n, const char *source);
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);
@@ -1455,10 +1512,13 @@ struct clif_interface {
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 (*stylist_send_rodexitem) (struct map_session_data *sd, int 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, int8 flag);
+ void (*style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
+ void (*pPetEvolution) (int fd, struct map_session_data *sd);
+ void (*petEvolutionResult) (int fd, enum pet_evolution_result result);
+ void (*party_dead_notification) (struct map_session_data *sd);
};
#ifdef HERCULES_CORE