From 1443f47ca63972f737bd9cc0322f77dc416ff2a0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 12 Sep 2020 13:13:23 -0300 Subject: This is Hercules v2019.09.22 --- src/common/HPM.c | 5 +-- src/common/HPMDataCheck.h | 4 +++ src/common/mmo.h | 8 +++++ src/common/packets/packets2019_len_main.h | 52 ++++++++++++++++++++++++++++ src/common/packets/packets2019_len_re.h | 52 ++++++++++++++++++++++++++++ src/common/packets/packets2019_len_zero.h | 57 +++++++++++++++++++++++++++++++ 6 files changed, 176 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/HPM.c b/src/common/HPM.c index a579a0926..479135767 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -458,11 +458,12 @@ static bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, c static struct hplugin *hplugin_load(const char *filename) { + typedef void *(ImportSymbolFunc)(char *, unsigned int); struct hplugin *plugin; struct hplugin_info *info; struct HPMi_interface **HPMi; bool anyEvent = false; - void **import_symbol_ref; + ImportSymbolFunc **import_symbol_ref; int *HPMDataCheckVer; unsigned int *HPMDataCheckLen; struct s_HPMDataCheck *HPMDataCheck; @@ -499,7 +500,7 @@ static struct hplugin *hplugin_load(const char *filename) plugin->info = info; plugin->filename = aStrdup(filename); - if( !( import_symbol_ref = plugin_import(plugin->dll, "import_symbol",void **) ) ) { + if ((import_symbol_ref = plugin_import(plugin->dll, "import_symbol", ImportSymbolFunc **)) == NULL) { ShowFatalError("HPM:plugin_load: failed to retrieve 'import_symbol' for '"CL_WHITE"%s"CL_RESET"'!\n", filename); exit(EXIT_FAILURE); } diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index 96fea8fe0..9c015e1f5 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -525,6 +525,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "item_combo", sizeof(struct item_combo), SERVER_TYPE_MAP }, { "item_data", sizeof(struct item_data), SERVER_TYPE_MAP }, { "item_group", sizeof(struct item_group), SERVER_TYPE_MAP }, + { "item_lapineddukddak", sizeof(struct item_lapineddukddak), SERVER_TYPE_MAP }, { "item_package", sizeof(struct item_package), SERVER_TYPE_MAP }, { "item_package_must_entry", sizeof(struct item_package_must_entry), SERVER_TYPE_MAP }, { "item_package_rand_entry", sizeof(struct item_package_rand_entry), SERVER_TYPE_MAP }, @@ -665,6 +666,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_ACK_LEAVE_GUILD1", sizeof(struct PACKET_ZC_ACK_LEAVE_GUILD1), SERVER_TYPE_MAP }, { "PACKET_ZC_ACK_LEAVE_GUILD2", sizeof(struct PACKET_ZC_ACK_LEAVE_GUILD2), SERVER_TYPE_MAP }, { "PACKET_ZC_ACK_OPEN_WRITE_MAIL", sizeof(struct PACKET_ZC_ACK_OPEN_WRITE_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_ACK_RANKING_name", sizeof(struct PACKET_ZC_ACK_RANKING_name), SERVER_TYPE_MAP }, + { "PACKET_ZC_ACK_RANKING_points", sizeof(struct PACKET_ZC_ACK_RANKING_points), SERVER_TYPE_MAP }, { "PACKET_ZC_ACK_RANKING_sub", sizeof(struct PACKET_ZC_ACK_RANKING_sub), SERVER_TYPE_MAP }, { "PACKET_ZC_ACK_REMOVE_ITEM_MAIL", sizeof(struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP }, { "PACKET_ZC_ACK_REQMAKINGITEM", sizeof(struct PACKET_ZC_ACK_REQMAKINGITEM), SERVER_TYPE_MAP }, @@ -741,6 +744,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_SPRITE_CHANGE", sizeof(struct PACKET_ZC_SPRITE_CHANGE), SERVER_TYPE_MAP }, { "PACKET_ZC_STATUS_CHANGE_ACK", sizeof(struct PACKET_ZC_STATUS_CHANGE_ACK), SERVER_TYPE_MAP }, { "PACKET_ZC_STYLE_CHANGE_RES", sizeof(struct PACKET_ZC_STYLE_CHANGE_RES), SERVER_TYPE_MAP }, + { "PACKET_ZC_TALKBOX_CHATCONTENTS", sizeof(struct PACKET_ZC_TALKBOX_CHATCONTENTS), SERVER_TYPE_MAP }, { "PACKET_ZC_UI_ACTION", sizeof(struct PACKET_ZC_UI_ACTION), SERVER_TYPE_MAP }, { "PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE", sizeof(struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE), SERVER_TYPE_MAP }, { "PACKET_ZC_USE_ITEM_ACK", sizeof(struct PACKET_ZC_USE_ITEM_ACK), SERVER_TYPE_MAP }, diff --git a/src/common/mmo.h b/src/common/mmo.h index 1fa6fadc8..66736bff0 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -907,6 +907,14 @@ struct guild_castle { int mapindex; char castle_name[NAME_LENGTH]; char castle_event[NAME_LENGTH]; + int siege_type; + bool enable_client_warp; + struct { + int x; + int y; + int zeny; + int zeny_siege; + } client_warp; int guild_id; int economy; int defense; diff --git a/src/common/packets/packets2019_len_main.h b/src/common/packets/packets2019_len_main.h index 949aae804..424abe14f 100644 --- a/src/common/packets/packets2019_len_main.h +++ b/src/common/packets/packets2019_len_main.h @@ -103,7 +103,11 @@ packetLen(0x007c, 44) // ZC_NOTIFY_STANDENTRY_NPC packetLen(0x007d, 2) // CZ_NOTIFY_ACTORINIT // Packet: 0x007e +#if PACKETVER >= 20190904 +packetLen(0x007e, 46) // CZ_REQUEST_TIME +#elif PACKETVER >= 20190109 packetLen(0x007e, 105) // CZ_REQUEST_TIME +#endif // Packet: 0x007f packetLen(0x007f, 6) // ZC_NOTIFY_TIME @@ -916,7 +920,11 @@ packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX // Packet: 0x0191 +#if PACKETVER >= 20190904 +packetLen(0x0191, 27) // ZC_TALKBOX_CHATCONTENTS +#elif PACKETVER >= 20190109 packetLen(0x0191, 86) // ZC_TALKBOX_CHATCONTENTS +#endif // Packet: 0x0192 packetLen(0x0192, 24) // ZC_UPDATE_MAPINFO @@ -1966,7 +1974,11 @@ packetLen(0x0365, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY2 packetLen(0x0366, 10) // CZ_USE_SKILL_TOGROUND2 // Packet: 0x0367 +#if PACKETVER >= 20190904 +packetLen(0x0367, 31) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2 +#elif PACKETVER >= 20190109 packetLen(0x0367, 90) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2 +#endif // Packet: 0x0368 packetLen(0x0368, 6) // CZ_REQNAME2 @@ -4710,5 +4722,45 @@ packetLen(0x0b54, 8) packetLen(0x0b55, -1) #endif +// Packet: 0x0b56 +#if PACKETVER >= 20190904 +packetLen(0x0b56, -1) +#endif + +// Packet: 0x0b57 +#if PACKETVER >= 20190904 +packetLen(0x0b57, -1) +#endif + +// Packet: 0x0b58 +#if PACKETVER >= 20190904 +packetLen(0x0b58, 2) +#endif + +// Packet: 0x0b59 +#if PACKETVER >= 20190918 +packetLen(0x0b59, 2) +#endif + +// Packet: 0x0b5a +#if PACKETVER >= 20190918 +packetLen(0x0b5a, 4) +#endif + +// Packet: 0x0b5b +#if PACKETVER >= 20190918 +packetLen(0x0b5b, -1) +#endif + +// Packet: 0x0b5c +#if PACKETVER >= 20190918 +packetLen(0x0b5c, 10) +#endif + +// Packet: 0x0b5d +#if PACKETVER >= 20190918 +packetLen(0x0b5d, 2) +#endif + #endif /* COMMON_PACKETS2019_LEN_MAIN_H */ diff --git a/src/common/packets/packets2019_len_re.h b/src/common/packets/packets2019_len_re.h index c31a10191..32c14775d 100644 --- a/src/common/packets/packets2019_len_re.h +++ b/src/common/packets/packets2019_len_re.h @@ -103,7 +103,11 @@ packetLen(0x007c, 44) // ZC_NOTIFY_STANDENTRY_NPC packetLen(0x007d, 2) // CZ_NOTIFY_ACTORINIT // Packet: 0x007e +#if PACKETVER >= 20190904 +packetLen(0x007e, 46) // CZ_REQUEST_TIME +#elif PACKETVER >= 20190109 packetLen(0x007e, 105) // CZ_REQUEST_TIME +#endif // Packet: 0x007f packetLen(0x007f, 6) // ZC_NOTIFY_TIME @@ -916,7 +920,11 @@ packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX // Packet: 0x0191 +#if PACKETVER >= 20190904 +packetLen(0x0191, 27) // ZC_TALKBOX_CHATCONTENTS +#elif PACKETVER >= 20190109 packetLen(0x0191, 86) // ZC_TALKBOX_CHATCONTENTS +#endif // Packet: 0x0192 packetLen(0x0192, 24) // ZC_UPDATE_MAPINFO @@ -1972,7 +1980,11 @@ packetLen(0x0365, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY2 packetLen(0x0366, 10) // CZ_USE_SKILL_TOGROUND2 // Packet: 0x0367 +#if PACKETVER >= 20190904 +packetLen(0x0367, 31) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2 +#elif PACKETVER >= 20190109 packetLen(0x0367, 90) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2 +#endif // Packet: 0x0368 packetLen(0x0368, 6) // CZ_REQNAME2 @@ -4722,5 +4734,45 @@ packetLen(0x0b54, 8) packetLen(0x0b55, -1) #endif +// Packet: 0x0b56 +#if PACKETVER >= 20190904 +packetLen(0x0b56, -1) +#endif + +// Packet: 0x0b57 +#if PACKETVER >= 20190904 +packetLen(0x0b57, -1) +#endif + +// Packet: 0x0b58 +#if PACKETVER >= 20190904 +packetLen(0x0b58, 2) +#endif + +// Packet: 0x0b59 +#if PACKETVER >= 20190918 +packetLen(0x0b59, 2) +#endif + +// Packet: 0x0b5a +#if PACKETVER >= 20190918 +packetLen(0x0b5a, 4) +#endif + +// Packet: 0x0b5b +#if PACKETVER >= 20190918 +packetLen(0x0b5b, -1) +#endif + +// Packet: 0x0b5c +#if PACKETVER >= 20190918 +packetLen(0x0b5c, 10) +#endif + +// Packet: 0x0b5d +#if PACKETVER >= 20190918 +packetLen(0x0b5d, 2) +#endif + #endif /* COMMON_PACKETS2019_LEN_RE_H */ diff --git a/src/common/packets/packets2019_len_zero.h b/src/common/packets/packets2019_len_zero.h index abe81796c..9cdc9db05 100644 --- a/src/common/packets/packets2019_len_zero.h +++ b/src/common/packets/packets2019_len_zero.h @@ -103,7 +103,11 @@ packetLen(0x007c, 44) // ZC_NOTIFY_STANDENTRY_NPC packetLen(0x007d, 2) // CZ_NOTIFY_ACTORINIT // Packet: 0x007e +#if PACKETVER >= 20190828 +packetLen(0x007e, 46) // CZ_REQUEST_TIME +#elif PACKETVER >= 20190116 packetLen(0x007e, 105) // CZ_REQUEST_TIME +#endif // Packet: 0x007f packetLen(0x007f, 6) // ZC_NOTIFY_TIME @@ -916,7 +920,11 @@ packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX // Packet: 0x0191 +#if PACKETVER >= 20190828 +packetLen(0x0191, 27) // ZC_TALKBOX_CHATCONTENTS +#elif PACKETVER >= 20190116 packetLen(0x0191, 86) // ZC_TALKBOX_CHATCONTENTS +#endif // Packet: 0x0192 packetLen(0x0192, 24) // ZC_UPDATE_MAPINFO @@ -1966,7 +1974,11 @@ packetLen(0x0365, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY2 packetLen(0x0366, 10) // CZ_USE_SKILL_TOGROUND2 // Packet: 0x0367 +#if PACKETVER >= 20190828 +packetLen(0x0367, 31) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2 +#elif PACKETVER >= 20190116 packetLen(0x0367, 90) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2 +#endif // Packet: 0x0368 packetLen(0x0368, 6) // CZ_REQNAME2 @@ -4697,5 +4709,50 @@ packetLen(0x0b53, 52) packetLen(0x0b54, 8) #endif +// Packet: 0x0b55 +#if PACKETVER >= 20190828 +packetLen(0x0b55, -1) +#endif + +// Packet: 0x0b56 +#if PACKETVER >= 20190828 +packetLen(0x0b56, -1) +#endif + +// Packet: 0x0b57 +#if PACKETVER >= 20190828 +packetLen(0x0b57, -1) +#endif + +// Packet: 0x0b58 +#if PACKETVER >= 20190828 +packetLen(0x0b58, 2) +#endif + +// Packet: 0x0b59 +#if PACKETVER >= 20190918 +packetLen(0x0b59, 2) +#endif + +// Packet: 0x0b5a +#if PACKETVER >= 20190918 +packetLen(0x0b5a, 4) +#endif + +// Packet: 0x0b5b +#if PACKETVER >= 20190918 +packetLen(0x0b5b, -1) +#endif + +// Packet: 0x0b5c +#if PACKETVER >= 20190918 +packetLen(0x0b5c, 10) +#endif + +// Packet: 0x0b5d +#if PACKETVER >= 20190918 +packetLen(0x0b5d, 2) +#endif + #endif /* COMMON_PACKETS2019_LEN_ZERO_H */ -- cgit v1.2.3-70-g09d2