diff options
63 files changed, 1158 insertions, 170 deletions
diff --git a/.travis.yml b/.travis.yml index a3374503c..fc28a5aef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ matrix: - compiler: false include: - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-buildbot" HPM="1" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20180919 --enable-packetver-re --enable-buildbot" HPM="1" addons: apt: sources: @@ -50,7 +50,7 @@ matrix: - libxml-sax-perl - libxml-parser-perl - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20180919 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -68,7 +68,7 @@ matrix: packages: - clang-5.0 - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20180919 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -90,11 +90,11 @@ matrix: - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20180919 --enable-packetver-re --enable-buildbot" - compiler: gcc env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20180919 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -110,7 +110,7 @@ matrix: packages: - gcc-5 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20180919 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -7,6 +7,8 @@ Build Status: [](https://scan.coverity.com/projects/herculesws-hercules) [](https://gitlab.com/HerculesWS/Hercules/commits/master) [](https://gitlab.com/HerculesWS/Hercules/commits/master) +[](https://lgtm.com/projects/g/HerculesWS/Hercules/context:cpp) +[](https://lgtm.com/projects/g/HerculesWS/Hercules/alerts) Issues and pull requests: [](https://github.com/HerculesWS/Hercules/issues) diff --git a/conf/map/maps.conf b/conf/map/maps.conf index 2b1b134ff..1634ef3a8 100644 --- a/conf/map/maps.conf +++ b/conf/map/maps.conf @@ -1333,6 +1333,26 @@ map_list: ( "star_frst", "star_in", + // Episode 17.1 + "1@cor", + "1@os_a", + "1@os_b", + "1@rgsr", + "rgsr_in", + "pub_cat", + "sp_cor", + "sp_os", + "sp_rudus", + "sp_rudus2", + "sp_rudus3", + + // Level Expansion + "mag_dun03", + "gl_cas01_", + + // EDDA the downfall of GlastHeim + "1@gl_prq", + //------------------------- Clone Maps --------------------------- //------------------------- Extra Maps --------------------------- @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac 234189f34. +# From configure.ac 150dff284. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -7585,6 +7585,55 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wvla" >&5 +$as_echo_n "checking whether $CC supports -Wvla... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Wvla" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CFLAGS="$OLD_CFLAGS -Wvla" + # Optionally, run a test + if test "x" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wvla" >&5 +$as_echo_n "checking whether $CC can actually use -Wvla... " >&6; } + CFLAGS="$OLD_CFLAGS -Werror -Wvla" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CFLAGS="$OLD_CFLAGS -Wvla" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format-nonliteral" >&5 $as_echo_n "checking whether $CC supports -Wno-format-nonliteral... " >&6; } OLD_CFLAGS="$CFLAGS" diff --git a/configure.ac b/configure.ac index 4d5f4bcfd..2aad9d7e7 100644 --- a/configure.ac +++ b/configure.ac @@ -1085,6 +1085,7 @@ AC_CHECK_COMPILER_WFLAG(redundant-decls) AC_CHECK_COMPILER_WFLAG(cast-qual) AC_CHECK_COMPILER_WFLAG(misleading-indentation) AC_CHECK_COMPILER_WFLAG(null-dereference) +AC_CHECK_COMPILER_WFLAG(vla) AC_CHECK_COMPILER_WNOFLAG(format-nonliteral) AC_CHECK_COMPILER_WNOFLAG(switch) AC_CHECK_COMPILER_WNOFLAG(missing-field-initializers) diff --git a/db/constants.conf b/db/constants.conf index c3b1fdb57..08dc63b40 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -3554,6 +3554,40 @@ constants_db: { 4_M_AC_RUMIN: 10246 4_M_HIGH_WIZARD: 10247 4_SYSTEM_BOX: 10248 + 4_STEELBOX: 10249 + 4_WOODBOX: 10250 + 4_M_POPFESTA: 10251 + 4_BONFIRE: 10252 + 4_PCCOUNT: 10253 + 4_SCATLETON: 10271 + 4_JJAK: 10280 + 4_M_SNOWMAN_B: 10281 + 4_M_SNOWMAN_R: 10282 + 4_M_SNOWMAN_G: 10283 + 4_F_DANGDANG: 10286 + 4_M_DANGDANG: 10287 + 4_F_DANGDANG1: 10288 + 4_LEAFCAT: 10289 + 4_NASARIAN: 10290 + 4_NASARIAN_EM: 10291 + 4_TEDDY_BEAR_W: 10292 + 4_TEDDY_BEAR_B: 10293 + 4_TEDDY_BEAR_B_L: 10294 + 4_M_SOULREAPER: 10295 + 4_F_SE_SUN: 10296 + 4_M_SE_MOON: 10297 + 4_M_SE_STAR: 10298 + 4_EP17_KAYA: 10299 + 4_EP17_AS: 10300 + 4_EP17_ELYUMINA: 10301 + 4_EP17_MORNING: 10302 + 4_EP17_MIGUEL: 10303 + 4_EP17_NIHIL_K: 10304 + 4_EP17_MIGUEL_D: 10305 + 4_ED_SCHMIDT: 10306 + 4_ED_OSCAR: 10307 + 4_ED_ORB: 10308 + 4_ED_FENCE: 10309 comment__: "Mercenary IDs" MER_LIF: 6001 @@ -3931,6 +3965,38 @@ constants_db: { HAT_EF_QSCARABA: 54 HAT_EF_FSTONE: 55 HAT_EF_MAGICCIRCLE: 56 + HAT_EF_BRYSINGGAMEN: 57 + HAT_EF_MAGINGIORDE: 58 + HAT_EF_LEVEL99_RED: 59 + HAT_EF_LEVEL99_ULTRAMARINE: 60 + HAT_EF_LEVEL99_CYAN: 61 + HAT_EF_LEVEL99_LIME: 62 + HAT_EF_LEVEL99_VIOLET: 63 + HAT_EF_LEVEL99_LILAC: 64 + HAT_EF_LEVEL99_SUN_ORANGE: 65 + HAT_EF_LEVEL99_DEEP_PINK: 66 + HAT_EF_LEVEL99_BLACK: 67 + HAT_EF_LEVEL99_WHITE: 68 + HAT_EF_LEVEL160_RED: 69 + HAT_EF_LEVEL160_ULTRAMARINE: 70 + HAT_EF_LEVEL160_CYAN: 71 + HAT_EF_LEVEL160_LIME: 72 + HAT_EF_LEVEL160_VIOLET: 73 + HAT_EF_LEVEL160_LILAC: 74 + HAT_EF_LEVEL160_SUN_ORANGE: 75 + HAT_EF_LEVEL160_DEEP_PINK: 76 + HAT_EF_LEVEL160_BLACK: 77 + HAT_EF_LEVEL160_WHITE: 78 + HAT_EF_FULL_BLOOMCHERRY_TREE: 79 + HAT_EF_C_BLESSINGS_OF_SOUL: 80 + HAT_EF_MANYSTARS: 81 + HAT_EF_SUBJECT_AURA_GOLD: 82 + HAT_EF_SUBJECT_AURA_WHITE: 83 + HAT_EF_SUBJECT_AURA_RED: 84 + HAT_EF_C_SHINING_ANGEL_WING: 85 + HAT_EF_MAGIC_STAR_TW: 86 + HAT_DIGITAL_SPACE: 87 + HAT_EF_SLEIPNIR: 88 comment__: "Achievement Types" ACH_QUEST: 0 diff --git a/db/map_index.txt b/db/map_index.txt index 2efafb0b2..fbbf4d25a 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -1026,7 +1026,20 @@ com_d02_i 1@soul star_frst star_in - +1@cor +1@os_a +1@os_b +1@rgsr +rgsr_in +pub_cat +sp_cor +sp_os +sp_rudus +sp_rudus2 +sp_rudus3 +mag_dun03 +gl_cas01_ +1@gl_prq // Only add maps under this line if they are not standard maps! //====================================================================================== diff --git a/doc/constants.md b/doc/constants.md index ead85314d..451f2a5fe 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -3480,6 +3480,40 @@ - `4_M_AC_RUMIN`: 10246 - `4_M_HIGH_WIZARD`: 10247 - `4_SYSTEM_BOX`: 10248 +- `4_STEELBOX`: 10249 +- `4_WOODBOX`: 10250 +- `4_M_POPFESTA`: 10251 +- `4_BONFIRE`: 10252 +- `4_PCCOUNT`: 10253 +- `4_SCATLETON`: 10271 +- `4_JJAK`: 10280 +- `4_M_SNOWMAN_B`: 10281 +- `4_M_SNOWMAN_R`: 10282 +- `4_M_SNOWMAN_G`: 10283 +- `4_F_DANGDANG`: 10286 +- `4_M_DANGDANG`: 10287 +- `4_F_DANGDANG1`: 10288 +- `4_LEAFCAT`: 10289 +- `4_NASARIAN`: 10290 +- `4_NASARIAN_EM`: 10291 +- `4_TEDDY_BEAR_W`: 10292 +- `4_TEDDY_BEAR_B`: 10293 +- `4_TEDDY_BEAR_B_L`: 10294 +- `4_M_SOULREAPER`: 10295 +- `4_F_SE_SUN`: 10296 +- `4_M_SE_MOON`: 10297 +- `4_M_SE_STAR`: 10298 +- `4_EP17_KAYA`: 10299 +- `4_EP17_AS`: 10300 +- `4_EP17_ELYUMINA`: 10301 +- `4_EP17_MORNING`: 10302 +- `4_EP17_MIGUEL`: 10303 +- `4_EP17_NIHIL_K`: 10304 +- `4_EP17_MIGUEL_D`: 10305 +- `4_ED_SCHMIDT`: 10306 +- `4_ED_OSCAR`: 10307 +- `4_ED_ORB`: 10308 +- `4_ED_FENCE`: 10309 ### Mercenary IDs @@ -3853,6 +3887,38 @@ - `HAT_EF_QSCARABA`: 54 - `HAT_EF_FSTONE`: 55 - `HAT_EF_MAGICCIRCLE`: 56 +- `HAT_EF_BRYSINGGAMEN`: 57 +- `HAT_EF_MAGINGIORDE`: 58 +- `HAT_EF_LEVEL99_RED`: 59 +- `HAT_EF_LEVEL99_ULTRAMARINE`: 60 +- `HAT_EF_LEVEL99_CYAN`: 61 +- `HAT_EF_LEVEL99_LIME`: 62 +- `HAT_EF_LEVEL99_VIOLET`: 63 +- `HAT_EF_LEVEL99_LILAC`: 64 +- `HAT_EF_LEVEL99_SUN_ORANGE`: 65 +- `HAT_EF_LEVEL99_DEEP_PINK`: 66 +- `HAT_EF_LEVEL99_BLACK`: 67 +- `HAT_EF_LEVEL99_WHITE`: 68 +- `HAT_EF_LEVEL160_RED`: 69 +- `HAT_EF_LEVEL160_ULTRAMARINE`: 70 +- `HAT_EF_LEVEL160_CYAN`: 71 +- `HAT_EF_LEVEL160_LIME`: 72 +- `HAT_EF_LEVEL160_VIOLET`: 73 +- `HAT_EF_LEVEL160_LILAC`: 74 +- `HAT_EF_LEVEL160_SUN_ORANGE`: 75 +- `HAT_EF_LEVEL160_DEEP_PINK`: 76 +- `HAT_EF_LEVEL160_BLACK`: 77 +- `HAT_EF_LEVEL160_WHITE`: 78 +- `HAT_EF_FULL_BLOOMCHERRY_TREE`: 79 +- `HAT_EF_C_BLESSINGS_OF_SOUL`: 80 +- `HAT_EF_MANYSTARS`: 81 +- `HAT_EF_SUBJECT_AURA_GOLD`: 82 +- `HAT_EF_SUBJECT_AURA_WHITE`: 83 +- `HAT_EF_SUBJECT_AURA_RED`: 84 +- `HAT_EF_C_SHINING_ANGEL_WING`: 85 +- `HAT_EF_MAGIC_STAR_TW`: 86 +- `HAT_DIGITAL_SPACE`: 87 +- `HAT_EF_SLEIPNIR`: 88 ### Achievement Types diff --git a/maps/pre-re/1@cor.mcache b/maps/pre-re/1@cor.mcache Binary files differnew file mode 100644 index 000000000..eb75bcc4d --- /dev/null +++ b/maps/pre-re/1@cor.mcache diff --git a/maps/pre-re/1@gl_prq.mcache b/maps/pre-re/1@gl_prq.mcache Binary files differnew file mode 100644 index 000000000..10f035f98 --- /dev/null +++ b/maps/pre-re/1@gl_prq.mcache diff --git a/maps/pre-re/1@os_a.mcache b/maps/pre-re/1@os_a.mcache Binary files differnew file mode 100644 index 000000000..e87860ac1 --- /dev/null +++ b/maps/pre-re/1@os_a.mcache diff --git a/maps/pre-re/1@os_b.mcache b/maps/pre-re/1@os_b.mcache Binary files differnew file mode 100644 index 000000000..8f2277128 --- /dev/null +++ b/maps/pre-re/1@os_b.mcache diff --git a/maps/pre-re/1@rgsr.mcache b/maps/pre-re/1@rgsr.mcache Binary files differnew file mode 100644 index 000000000..cf2114dd8 --- /dev/null +++ b/maps/pre-re/1@rgsr.mcache diff --git a/maps/pre-re/gl_cas01_.mcache b/maps/pre-re/gl_cas01_.mcache Binary files differnew file mode 100644 index 000000000..457a8be74 --- /dev/null +++ b/maps/pre-re/gl_cas01_.mcache diff --git a/maps/pre-re/mag_dun03.mcache b/maps/pre-re/mag_dun03.mcache Binary files differnew file mode 100644 index 000000000..ad35c4be1 --- /dev/null +++ b/maps/pre-re/mag_dun03.mcache diff --git a/maps/pre-re/pub_cat.mcache b/maps/pre-re/pub_cat.mcache Binary files differnew file mode 100644 index 000000000..1e4d4a92a --- /dev/null +++ b/maps/pre-re/pub_cat.mcache diff --git a/maps/pre-re/rgsr_in.mcache b/maps/pre-re/rgsr_in.mcache Binary files differnew file mode 100644 index 000000000..fa37ec1ec --- /dev/null +++ b/maps/pre-re/rgsr_in.mcache diff --git a/maps/pre-re/sp_cor.mcache b/maps/pre-re/sp_cor.mcache Binary files differnew file mode 100644 index 000000000..59f0835f6 --- /dev/null +++ b/maps/pre-re/sp_cor.mcache diff --git a/maps/pre-re/sp_os.mcache b/maps/pre-re/sp_os.mcache Binary files differnew file mode 100644 index 000000000..029e11070 --- /dev/null +++ b/maps/pre-re/sp_os.mcache diff --git a/maps/pre-re/sp_rudus.mcache b/maps/pre-re/sp_rudus.mcache Binary files differnew file mode 100644 index 000000000..bc2435ecd --- /dev/null +++ b/maps/pre-re/sp_rudus.mcache diff --git a/maps/pre-re/sp_rudus2.mcache b/maps/pre-re/sp_rudus2.mcache Binary files differnew file mode 100644 index 000000000..0269518bc --- /dev/null +++ b/maps/pre-re/sp_rudus2.mcache diff --git a/maps/pre-re/sp_rudus3.mcache b/maps/pre-re/sp_rudus3.mcache Binary files differnew file mode 100644 index 000000000..f060c444f --- /dev/null +++ b/maps/pre-re/sp_rudus3.mcache diff --git a/maps/re/1@cor.mcache b/maps/re/1@cor.mcache Binary files differnew file mode 100644 index 000000000..eb75bcc4d --- /dev/null +++ b/maps/re/1@cor.mcache diff --git a/maps/re/1@gl_prq.mcache b/maps/re/1@gl_prq.mcache Binary files differnew file mode 100644 index 000000000..10f035f98 --- /dev/null +++ b/maps/re/1@gl_prq.mcache diff --git a/maps/re/1@os_a.mcache b/maps/re/1@os_a.mcache Binary files differnew file mode 100644 index 000000000..e87860ac1 --- /dev/null +++ b/maps/re/1@os_a.mcache diff --git a/maps/re/1@os_b.mcache b/maps/re/1@os_b.mcache Binary files differnew file mode 100644 index 000000000..8f2277128 --- /dev/null +++ b/maps/re/1@os_b.mcache diff --git a/maps/re/1@rgsr.mcache b/maps/re/1@rgsr.mcache Binary files differnew file mode 100644 index 000000000..cf2114dd8 --- /dev/null +++ b/maps/re/1@rgsr.mcache diff --git a/maps/re/gl_cas01_.mcache b/maps/re/gl_cas01_.mcache Binary files differnew file mode 100644 index 000000000..457a8be74 --- /dev/null +++ b/maps/re/gl_cas01_.mcache diff --git a/maps/re/mag_dun03.mcache b/maps/re/mag_dun03.mcache Binary files differnew file mode 100644 index 000000000..ad35c4be1 --- /dev/null +++ b/maps/re/mag_dun03.mcache diff --git a/maps/re/pub_cat.mcache b/maps/re/pub_cat.mcache Binary files differnew file mode 100644 index 000000000..1e4d4a92a --- /dev/null +++ b/maps/re/pub_cat.mcache diff --git a/maps/re/rgsr_in.mcache b/maps/re/rgsr_in.mcache Binary files differnew file mode 100644 index 000000000..fa37ec1ec --- /dev/null +++ b/maps/re/rgsr_in.mcache diff --git a/maps/re/sp_cor.mcache b/maps/re/sp_cor.mcache Binary files differnew file mode 100644 index 000000000..59f0835f6 --- /dev/null +++ b/maps/re/sp_cor.mcache diff --git a/maps/re/sp_os.mcache b/maps/re/sp_os.mcache Binary files differnew file mode 100644 index 000000000..029e11070 --- /dev/null +++ b/maps/re/sp_os.mcache diff --git a/maps/re/sp_rudus.mcache b/maps/re/sp_rudus.mcache Binary files differnew file mode 100644 index 000000000..bc2435ecd --- /dev/null +++ b/maps/re/sp_rudus.mcache diff --git a/maps/re/sp_rudus2.mcache b/maps/re/sp_rudus2.mcache Binary files differnew file mode 100644 index 000000000..0269518bc --- /dev/null +++ b/maps/re/sp_rudus2.mcache diff --git a/maps/re/sp_rudus3.mcache b/maps/re/sp_rudus3.mcache Binary files differnew file mode 100644 index 000000000..f060c444f --- /dev/null +++ b/maps/re/sp_rudus3.mcache diff --git a/sql-files/main.sql b/sql-files/main.sql index d29f05a2e..2fa6f1332 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -121,7 +121,7 @@ CREATE TABLE IF NOT EXISTS `autotrade_merchants` ( -- Table structure for table `char_achievements` -- -CREATE TABLE `char_achievements` ( +CREATE TABLE IF NOT EXISTS `char_achievements` ( `char_id` INT(11) UNSIGNED NOT NULL, `ach_id` INT(11) UNSIGNED NOT NULL, `completed_at` INT(10) UNSIGNED NOT NULL DEFAULT '0', diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index 31bce72b2..d2b4d2fd9 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -606,6 +606,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "NORMALITEM_INFO", sizeof(struct NORMALITEM_INFO), SERVER_TYPE_MAP }, { "PACKET_CZ_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_CZ_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP }, { "PACKET_CZ_CHECKNAME", sizeof(struct PACKET_CZ_CHECKNAME), SERVER_TYPE_MAP }, + { "PACKET_CZ_MEMORIALDUNGEON_COMMAND", sizeof(struct PACKET_CZ_MEMORIALDUNGEON_COMMAND), SERVER_TYPE_MAP }, { "PACKET_CZ_OPEN_UI", sizeof(struct PACKET_CZ_OPEN_UI), SERVER_TYPE_MAP }, { "PACKET_CZ_PC_BUY_CASH_POINT_ITEM", sizeof(struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM), SERVER_TYPE_MAP }, { "PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub", sizeof(struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub), SERVER_TYPE_MAP }, @@ -718,7 +719,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_WARPLIST", sizeof(struct PACKET_ZC_WARPLIST), SERVER_TYPE_MAP }, { "PACKET_ZC_WARPLIST_sub", sizeof(struct PACKET_ZC_WARPLIST_sub), SERVER_TYPE_MAP }, { "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP }, + { "ZC_INVENTORY_END", sizeof(struct ZC_INVENTORY_END), SERVER_TYPE_MAP }, + { "ZC_INVENTORY_START", sizeof(struct ZC_INVENTORY_START), SERVER_TYPE_MAP }, { "ZC_PROGRESS_ACTOR", sizeof(struct ZC_PROGRESS_ACTOR), SERVER_TYPE_MAP }, + { "ZC_STORE_ITEMLIST_EQUIP", sizeof(struct ZC_STORE_ITEMLIST_EQUIP), SERVER_TYPE_MAP }, + { "ZC_STORE_ITEMLIST_NORMAL", sizeof(struct ZC_STORE_ITEMLIST_NORMAL), SERVER_TYPE_MAP }, { "ach_list_info", sizeof(struct ach_list_info), SERVER_TYPE_MAP }, { "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP }, { "maillistinfo", sizeof(struct maillistinfo), SERVER_TYPE_MAP }, @@ -789,8 +794,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "packet_status_change", sizeof(struct packet_status_change), SERVER_TYPE_MAP }, { "packet_status_change2", sizeof(struct packet_status_change2), SERVER_TYPE_MAP }, { "packet_status_change_end", sizeof(struct packet_status_change_end), SERVER_TYPE_MAP }, - { "packet_storelist_equip", sizeof(struct packet_storelist_equip), SERVER_TYPE_MAP }, - { "packet_storelist_normal", sizeof(struct packet_storelist_normal), SERVER_TYPE_MAP }, { "packet_unequipitem_ack", sizeof(struct packet_unequipitem_ack), SERVER_TYPE_MAP }, { "packet_unit_walking", sizeof(struct packet_unit_walking), SERVER_TYPE_MAP }, { "packet_viewequip_ack", sizeof(struct packet_viewequip_ack), SERVER_TYPE_MAP }, diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 6522f3013..2538f797c 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4297,7 +4297,7 @@ ACMD(repairall) if (count > 0) { clif->misceffect(&sd->bl, 3); - clif->equiplist(sd); + clif->equipList(sd); clif->message(fd, msg_fd(fd,107)); // All items have been repaired. } else { clif->message(fd, msg_fd(fd,108)); // No item need to be repaired. diff --git a/src/map/clif.c b/src/map/clif.c index 4e48d7886..76625f0ba 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -86,8 +86,8 @@ static struct s_packet_db packet_db[MAX_PACKET_DB + 1]; /* re-usable */ static struct packet_itemlist_normal itemlist_normal; static struct packet_itemlist_equip itemlist_equip; -static struct packet_storelist_normal storelist_normal; -static struct packet_storelist_equip storelist_equip; +static struct ZC_STORE_ITEMLIST_NORMAL storelist_normal; +static struct ZC_STORE_ITEMLIST_EQUIP storelist_equip; static struct packet_viewequip_ack viewequip_list; #if PACKETVER >= 20131223 static struct packet_npc_market_result_ack npcmarket_result; @@ -2641,7 +2641,7 @@ static void clif_item_movefailed(struct map_session_data *sd, int n) WFIFOHEAD(fd, len); struct PACKET_ZC_INVENTORY_MOVE_FAILED *p = WFIFOP(fd, 0); p->packetType = 0xaa7; - p->index = n; + p->index = n + 2; p->unknown = 1; WFIFOSET(fd, len); #else @@ -2787,7 +2787,18 @@ static void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item * #endif } -static void clif_inventorylist(struct map_session_data *sd) +static void clif_inventoryList(struct map_session_data *sd) +{ +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + clif->inventoryStart(sd, INVTYPE_INVENTORY, ""); +#endif + clif->inventoryItems(sd, INVTYPE_INVENTORY); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + clif->inventoryEnd(sd, INVTYPE_INVENTORY); +#endif +} + +static void clif_inventoryItems(struct map_session_data *sd, enum inventory_type type) { int i, normal = 0, equip = 0; @@ -2802,9 +2813,12 @@ static void clif_inventorylist(struct map_session_data *sd) clif->item_normal(i+2,&itemlist_normal.list[normal++],&sd->status.inventory[i],sd->inventory_data[i]); } - if( normal ) { - itemlist_normal.PacketType = inventorylistnormalType; - itemlist_normal.PacketLength = 4 + (sizeof(struct NORMALITEM_INFO) * normal); + if (normal) { + itemlist_normal.PacketType = inventorylistnormalType; + itemlist_normal.PacketLength = (sizeof(itemlist_normal) - sizeof(itemlist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + itemlist_normal.invType = type; +#endif clif->send(&itemlist_normal, itemlist_normal.PacketLength, &sd->bl, SELF); } @@ -2814,7 +2828,10 @@ static void clif_inventorylist(struct map_session_data *sd) if( equip ) { itemlist_equip.PacketType = inventorylistequipType; - itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip); + itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + itemlist_equip.invType = type; +#endif clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF); } @@ -2830,8 +2847,20 @@ static void clif_inventorylist(struct map_session_data *sd) #endif } +static void clif_equipList(struct map_session_data *sd) +{ +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + clif->inventoryStart(sd, INVTYPE_INVENTORY, ""); + clif->inventoryItems(sd, INVTYPE_INVENTORY); + clif->inventoryEnd(sd, INVTYPE_INVENTORY); +#else + // [4144] for old packet version it send only equipment. this is bug? + clif->equipItems(sd, INVTYPE_INVENTORY); +#endif +} + //Required when items break/get-repaired. Only sends equippable item list. -static void clif_equiplist(struct map_session_data *sd) +static void clif_equipItems(struct map_session_data *sd, enum inventory_type type) { int i, equip = 0; @@ -2844,9 +2873,12 @@ static void clif_equiplist(struct map_session_data *sd) clif->item_equip(i+2,&itemlist_equip.list[equip++],&sd->status.inventory[i],sd->inventory_data[i],pc->equippoint(sd,i)); } - if( equip ) { - itemlist_equip.PacketType = inventorylistequipType; - itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip); + if (equip) { + itemlist_equip.PacketType = inventorylistequipType; + itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + itemlist_equip.invType = type; +#endif clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF); } @@ -2863,13 +2895,74 @@ static void clif_equiplist(struct map_session_data *sd) #endif } -static void clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) +static void clif_storageList(struct map_session_data *sd, struct item *items, int items_length) { - int i = 0; - struct item_data *id; + nullpo_retv(sd); + + clif->inventoryStart(sd, INVTYPE_STORAGE, "Storage"); + if (sd->storage.aggregate > 0) + clif->storageItems(sd, INVTYPE_STORAGE, items, items_length); + clif->inventoryEnd(sd, INVTYPE_STORAGE); +} + +static void clif_guildStorageList(struct map_session_data *sd, struct item *items, int items_length) +{ + clif->inventoryStart(sd, INVTYPE_GUILD_STORAGE, "Guild storage"); + clif->storageItems(sd, INVTYPE_GUILD_STORAGE, items, items_length); + clif->inventoryEnd(sd, INVTYPE_GUILD_STORAGE); +} + +static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type type, const char *name) +{ +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 + nullpo_retv(sd); + nullpo_retv(name); + + char buf[sizeof(struct ZC_INVENTORY_START) + 24]; + memset(buf, 0, sizeof(buf)); + struct ZC_INVENTORY_START *p = (struct ZC_INVENTORY_START *)buf; + p->packetType = 0xb08; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + p->invType = type; +#endif +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 + int strLen = (int)safestrnlen(name, 24); + if (strLen > 24) + strLen = 24; + const int len = sizeof(struct ZC_INVENTORY_START) + strLen; + p->packetLength = len; + safestrncpy(p->name, name, strLen); +#else + const int len = sizeof(struct ZC_INVENTORY_START); + safestrncpy(p->name, name, NAME_LENGTH); +#endif + clif->send(p, len, &sd->bl, SELF); +#endif +} +static void clif_inventoryEnd(struct map_session_data *sd, enum inventory_type type) +{ +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 + nullpo_retv(sd); + + struct ZC_INVENTORY_END p; + p.packetType = 0xb0b; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + p.invType = type; +#endif + p.flag = 0; + clif->send(&p, sizeof(p), &sd->bl, SELF); +#endif +} + +static void clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length) +{ nullpo_retv(sd); nullpo_retv(items); + + int i = 0; + struct item_data *id; + do { int normal = 0, equip = 0, k = 0; @@ -2887,10 +2980,13 @@ static void clif_storagelist(struct map_session_data *sd, struct item *items, in } if( normal ) { - storelist_normal.PacketType = storagelistnormalType; + storelist_normal.PacketType = storageListNormalType; storelist_normal.PacketLength = ( sizeof( storelist_normal ) - sizeof( storelist_normal.list ) ) + (sizeof(struct NORMALITEM_INFO) * normal); -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + storelist_normal.invType = type; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 safestrncpy(storelist_normal.name, "Storage", NAME_LENGTH); #endif @@ -2898,10 +2994,13 @@ static void clif_storagelist(struct map_session_data *sd, struct item *items, in } if( equip ) { - storelist_equip.PacketType = storagelistequipType; + storelist_equip.PacketType = storageListEquipType; storelist_equip.PacketLength = ( sizeof( storelist_equip ) - sizeof( storelist_equip.list ) ) + (sizeof(struct EQUIPITEM_INFO) * equip); -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + storelist_equip.invType = type; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 safestrncpy(storelist_equip.name, "Storage", NAME_LENGTH); #endif @@ -2912,7 +3011,18 @@ static void clif_storagelist(struct map_session_data *sd, struct item *items, in } -static void clif_cartlist(struct map_session_data *sd) +static void clif_cartList(struct map_session_data *sd) +{ +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + clif->inventoryStart(sd, INVTYPE_CART, ""); +#endif + clif->cartItems(sd, INVTYPE_CART); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + clif->inventoryEnd(sd, INVTYPE_CART); +#endif +} + +static void clif_cartItems(struct map_session_data *sd, enum inventory_type type) { int i, normal = 0, equip = 0; struct item_data *id; @@ -2930,16 +3040,22 @@ static void clif_cartlist(struct map_session_data *sd) clif->item_normal(i+2,&itemlist_normal.list[normal++],&sd->status.cart[i],id); } - if( normal ) { - itemlist_normal.PacketType = cartlistnormalType; - itemlist_normal.PacketLength = 4 + (sizeof(struct NORMALITEM_INFO) * normal); + if (normal) { + itemlist_normal.PacketType = cartlistnormalType; + itemlist_normal.PacketLength = (sizeof(itemlist_normal) - sizeof(itemlist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + itemlist_normal.invType = type; +#endif clif->send(&itemlist_normal, itemlist_normal.PacketLength, &sd->bl, SELF); } - if( equip ) { - itemlist_equip.PacketType = cartlistequipType; - itemlist_equip.PacketLength = 4 + (sizeof(struct EQUIPITEM_INFO) * equip); + if (equip) { + itemlist_equip.PacketType = cartlistequipType; + itemlist_equip.PacketLength = (sizeof(itemlist_equip) - sizeof(itemlist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip); +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + itemlist_equip.invType = type; +#endif clif->send(&itemlist_equip, itemlist_equip.PacketLength, &sd->bl, SELF); } @@ -7571,22 +7687,16 @@ static void clif_mvp_item(struct map_session_data *sd, int nameid) /// 010b <exp>.L static void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { -#if PACKETVER >= 20131223 // Kro removed this packet [Napster] - if (battle_config.mvp_exp_reward_message) { - char e_msg[CHAT_SIZE_MAX]; - sprintf(e_msg, msg_txt(855), exp); - clif->messagecolor_self(sd->fd, COLOR_CYAN, e_msg); // Congratulations! You are the MVP! Your reward EXP Points are %u !! - } -#else +#if PACKETVER_RE_NUM >= 20080827 || PACKETVER_MAIN_NUM >= 20090401 || defined(PACKETVER_ZERO) int fd; nullpo_retv(sd); - fd=sd->fd; - WFIFOHEAD(fd,packet_len(0x10b)); - WFIFOW(fd,0)=0x10b; - WFIFOL(fd,2)=cap_value(exp,0,INT32_MAX); - WFIFOSET(fd,packet_len(0x10b)); + fd = sd->fd; + WFIFOHEAD(fd, packet_len(0x10b)); + WFIFOW(fd, 0) = 0x10b; + WFIFOL(fd, 2) = cap_value(exp, 0, INT32_MAX); + WFIFOSET(fd, packet_len(0x10b)); #endif } @@ -8825,8 +8935,8 @@ static void clif_refresh_storagewindow(struct map_session_data *sd) if (sd->state.storage_flag == STORAGE_FLAG_NORMAL) { if (sd->storage.aggregate > 0) { storage->sortitem(VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); - clif->storagelist(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); } + clif->storageList(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); clif->updatestorageamount(sd, sd->storage.aggregate, MAX_STORAGE); } // Notify the client that the gstorage is open otherwise it will @@ -8838,7 +8948,7 @@ static void clif_refresh_storagewindow(struct map_session_data *sd) intif->request_guild_storage(sd->status.account_id,sd->status.guild_id); } else { storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items)); - clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items)); + clif->guildStorageList(sd, gstor->items, ARRAYLENGTH(gstor->items)); clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE); } } @@ -8850,9 +8960,9 @@ static void clif_refresh(struct map_session_data *sd) nullpo_retv(sd); clif->changemap(sd,sd->bl.m,sd->bl.x,sd->bl.y); - clif->inventorylist(sd); + clif->inventoryList(sd); if(pc_iscarton(sd)) { - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd,SP_CARTINFO); } clif->updatestatus(sd,SP_WEIGHT); @@ -9884,11 +9994,11 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) // Send character inventory to the client. // call this before pc->checkitem() so that the client isn't called to delete a non-existent item. - clif->inventorylist(sd); + clif->inventoryList(sd); // Send the cart inventory, counts & weight to the client. if(pc_iscarton(sd)) { - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd, SP_CARTINFO); } @@ -11088,7 +11198,7 @@ static void clif_parse_DropItem(int fd, struct map_session_data *sd) } //Because the client does not like being ignored. - clif->item_movefailed(sd, item_index); + clif->dropitem(sd, item_index, 0); } static void clif_parse_UseItem(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); @@ -21747,6 +21857,17 @@ static void clif_party_dead_notification(struct map_session_data *sd) #endif } +static void clif_parse_memorial_dungeon_command(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +static void clif_parse_memorial_dungeon_command(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_MEMORIALDUNGEON_COMMAND *p = RP2PTR(fd); + + switch (p->command) { + case COMMAND_MEMORIALDUNGEON_DESTROY_FORCE: + instance->force_destroy(sd); + } +} + /*========================================== * Main client packet processing function *------------------------------------------*/ @@ -22197,9 +22318,12 @@ void clif_defaults(void) clif->combo_delay = clif_combo_delay; clif->status_change = clif_status_change; clif->insert_card = clif_insert_card; - clif->inventorylist = clif_inventorylist; - clif->equiplist = clif_equiplist; - clif->cartlist = clif_cartlist; + clif->inventoryList = clif_inventoryList; + clif->inventoryItems = clif_inventoryItems; + clif->equipList = clif_equipList; + clif->equipItems = clif_equipItems; + clif->cartList = clif_cartList; + clif->cartItems = clif_cartItems; clif->favorite_item = clif_favorite_item; clif->clearcart = clif_clearcart; clif->item_identify_list = clif_item_identify_list; @@ -22355,7 +22479,11 @@ void clif_defaults(void) clif->openvendingAck = clif_openvendingAck; clif->vendingreport = clif_vendingreport; /* storage handling */ - clif->storagelist = clif_storagelist; + clif->storageList = clif_storageList; + clif->guildStorageList = clif_guildStorageList; + clif->storageItems = clif_storageItems; + clif->inventoryStart = clif_inventoryStart; + clif->inventoryEnd = clif_inventoryEnd; clif->updatestorageamount = clif_updatestorageamount; clif->storageitemadded = clif_storageitemadded; clif->storageitemremoved = clif_storageitemremoved; @@ -22902,4 +23030,5 @@ void clif_defaults(void) clif->pPetEvolution = clif_parse_pet_evolution; clif->petEvolutionResult = clif_pet_evolution_result; + clif->pMemorialDungeonCommand = clif_parse_memorial_dungeon_command; } diff --git a/src/map/clif.h b/src/map/clif.h index e3b2a90d3..86e53e1e9 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -612,6 +612,16 @@ enum pet_evolution_result { }; /** + * Inventory type for clients 2018-09-12 RE + + **/ +enum inventory_type { + INVTYPE_INVENTORY = 0, + INVTYPE_CART = 1, + INVTYPE_STORAGE = 2, + INVTYPE_GUILD_STORAGE = 3, +}; + +/** * Structures **/ typedef void (*pFunc)(int, struct map_session_data *); //cant help but put it first @@ -660,6 +670,10 @@ enum stylist_shop { STYLIST_SHOP_FAILURE }; +enum memorial_dungeon_command { + COMMAND_MEMORIALDUNGEON_DESTROY_FORCE = 0x3, +}; + /** * Clif.c Interface **/ @@ -827,9 +841,12 @@ struct clif_interface { void (*combo_delay) (struct block_list *bl,int wait); void (*status_change) (struct block_list *bl,int type,int flag,int tick,int val1, int val2, int val3); void (*insert_card) (struct map_session_data *sd,int idx_equip,int idx_card,int flag); - void (*inventorylist) (struct map_session_data *sd); - void (*equiplist) (struct map_session_data *sd); - void (*cartlist) (struct map_session_data *sd); + void (*inventoryList) (struct map_session_data *sd); + void (*inventoryItems) (struct map_session_data *sd, enum inventory_type type); + void (*equipList) (struct map_session_data *sd); + void (*equipItems) (struct map_session_data *sd, enum inventory_type type); + void (*cartList) (struct map_session_data *sd); + void (*cartItems) (struct map_session_data *sd, enum inventory_type type); void (*favorite_item) (struct map_session_data* sd, unsigned short index); void (*clearcart) (int fd); void (*item_identify_list) (struct map_session_data *sd); @@ -986,7 +1003,11 @@ struct clif_interface { 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); + void (*storageList) (struct map_session_data* sd, struct item* items, int items_length); + void (*guildStorageList) (struct map_session_data* sd, struct item* items, int items_length); + void (*storageItems) (struct map_session_data* sd, enum inventory_type type, struct item* items, int items_length); + void (*inventoryStart) (struct map_session_data* sd, enum inventory_type type, const char* name); + void (*inventoryEnd) (struct map_session_data* sd, enum inventory_type type); void (*updatestorageamount) (struct map_session_data* sd, int amount, int max_amount); void (*storageitemadded) (struct map_session_data* sd, struct item* i, int index, int amount); void (*storageitemremoved) (struct map_session_data* sd, int index, int amount); @@ -1527,6 +1548,7 @@ struct clif_interface { 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); + void (*pMemorialDungeonCommand) (int fd, struct map_session_data *sd); }; #ifdef HERCULES_CORE diff --git a/src/map/instance.c b/src/map/instance.c index 8bd45ba50..1e83b0b76 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -727,6 +727,66 @@ static void instance_check_kick(struct map_session_data *sd) } } +/** + * Look up existing memorial dungeon of the player and destroy it + * + * @param sd session data. + * + */ +static void instance_force_destroy(struct map_session_data *sd) +{ + nullpo_retv(sd); + + for (int i = 0; i < instance->instances; ++i) { + switch (instance->list[i].owner_type) { + case IOT_CHAR: + { + if (instance->list[i].owner_id != sd->status.char_id) + continue; + break; + } + case IOT_PARTY: + { + int party_id = sd->status.party_id; + if (instance->list[i].owner_id != party_id) + continue; + int j = 0; + struct party_data *pt = party->search(party_id); + nullpo_retv(pt); + + ARR_FIND(0, MAX_PARTY, j, pt->party.member[j].leader); + if (j == MAX_PARTY) { + ShowWarning("clif_parse_memorial_dungeon_command: trying to destroy a party instance, while the party has no leader."); + return; + } + if (pt->party.member[j].char_id != sd->status.char_id) { + ShowWarning("clif_parse_memorial_dungeon_command: trying to destroy a party instance, from a non party-leader player."); + return; + } + break; + } + case IOT_GUILD: + { + int guild_id = sd->status.guild_id; + if (instance->list[i].owner_id != guild_id) + continue; + struct guild *g = guild->search(guild_id); + nullpo_retv(g); + + if (g->member[0].char_id != sd->status.char_id) { + ShowWarning("clif_parse_memorial_dungeon_command: trying to destroy a guild instance, from a non guild-master player."); + return; + } + break; + } + default: + continue; + } + instance->destroy(instance->list[i].id); + return; + } +} + static void do_reload_instance(void) { struct s_mapiterator *iter; @@ -810,4 +870,5 @@ void instance_defaults(void) instance->set_timeout = instance_set_timeout; instance->valid = instance_is_valid; instance->destroy_timer = instance_destroy_timer; + instance->force_destroy = instance_force_destroy; } diff --git a/src/map/instance.h b/src/map/instance.h index ff7e49a7f..91928bf40 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -96,6 +96,7 @@ struct instance_interface { void (*set_timeout) (int instance_id, unsigned int progress_timeout, unsigned int idle_timeout); bool (*valid) (int instance_id); int (*destroy_timer) (int tid, int64 tick, int id, intptr_t data); + void (*force_destroy) (struct map_session_data *sd); }; #ifdef HERCULES_CORE diff --git a/src/map/messages_main.h b/src/map/messages_main.h index dd000d2f1..f26fdb50b 100644 --- a/src/map/messages_main.h +++ b/src/map/messages_main.h @@ -23,7 +23,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20180808 +Latest version: 20180829 */ enum clif_messages { @@ -21267,6 +21267,24 @@ DEATH : %.1f%% ( basic 100.0%% %s %.1f%%) */ MSG_ID_DD1 = 0xdd1, #endif +#if PACKETVER >= 20180829 +/*20180829 to latest +영문이나 러시아어 단독으로만 사용이 가능합니다. +*/ + MSG_ID_DD2 = 0xdd2, +/*20180829 to latest +you must have an AccessTicket to login +*/ + MSG_ID_DD3 = 0xdd3, +/*20180829 to latest +창고를 불러오는 중입니다. +*/ + MSG_ID_DD4 = 0xdd4, +/*20180829 to latest +NOW LOADING.. +*/ + MSG_ID_DD5 = 0xdd5, +#endif }; #endif /* MAP_MESSAGES_MAIN_H */ diff --git a/src/map/messages_re.h b/src/map/messages_re.h index bf2927d6b..c263150e3 100644 --- a/src/map/messages_re.h +++ b/src/map/messages_re.h @@ -23,7 +23,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20180808 +Latest version: 20180919 */ enum clif_messages { @@ -20746,6 +20746,62 @@ DEATH : %.1f%% ( basic 100.0%% %s %.1f%%) */ MSG_ID_DD1 = 0xdd1, #endif +#if PACKETVER >= 20180829 +/*20180829 to latest +영문이나 러시아어 단독으로만 사용이 가능합니다. +*/ + MSG_ID_DD2 = 0xdd2, +/*20180829 to latest +you must have an AccessTicket to login +*/ + MSG_ID_DD3 = 0xdd3, +/*20180829 to latest +창고를 불러오는 중입니다. +*/ + MSG_ID_DD4 = 0xdd4, +/*20180829 to latest +NOW LOADING.. +*/ + MSG_ID_DD5 = 0xdd5, +#endif +#if PACKETVER >= 20180919 +/*20180919 to latest +삭제 +*/ + MSG_ID_DD6 = 0xdd6, +/*20180919 to latest +답장 +*/ + MSG_ID_DD7 = 0xdd7, +/*20180919 to latest +전송 +*/ + MSG_ID_DD8 = 0xdd8, +/*20180919 to latest +이름확인 +*/ + MSG_ID_DD9 = 0xdd9, +/*20180919 to latest +공지 +Notice +*/ + MSG_ID_DDA = 0xdda, +/*20180919 to latest +일반 +General +*/ + MSG_ID_DDB = 0xddb, +/*20180919 to latest +반송 +Clear +*/ + MSG_ID_DDC = 0xddc, +/*20180919 to latest +검색 +Search +*/ + MSG_ID_DDD = 0xddd, +#endif }; #endif /* MAP_MESSAGES_RE_H */ diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h index 05e3f1479..c562bb07c 100644 --- a/src/map/messages_zero.h +++ b/src/map/messages_zero.h @@ -23,7 +23,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20180822 +Latest version: 20180919 */ enum clif_messages { @@ -17371,9 +17371,55 @@ you must have an AccessTicket to login MSG_ID_DD3 = 0xdd3, /*20180725 to 20180801 -- +20180905 to latest +창고를 불러오는 중입니다. */ MSG_ID_DD4 = 0xdd4, #endif +#if PACKETVER >= 20180905 +/*20180905 to latest +NOW LOADING.. +*/ + MSG_ID_DD5 = 0xdd5, +#endif +#if PACKETVER >= 20180919 +/*20180919 to latest +삭제 +*/ + MSG_ID_DD6 = 0xdd6, +/*20180919 to latest +답장 +*/ + MSG_ID_DD7 = 0xdd7, +/*20180919 to latest +전송 +*/ + MSG_ID_DD8 = 0xdd8, +/*20180919 to latest +이름확인 +*/ + MSG_ID_DD9 = 0xdd9, +/*20180919 to latest +공지 +Notice +*/ + MSG_ID_DDA = 0xdda, +/*20180919 to latest +일반 +General +*/ + MSG_ID_DDB = 0xddb, +/*20180919 to latest +반송 +Clear +*/ + MSG_ID_DDC = 0xddc, +/*20180919 to latest +검색 +Search +*/ + MSG_ID_DDD = 0xddd, +#endif }; #endif /* MAP_MESSAGES_ZERO_H */ diff --git a/src/map/npc.h b/src/map/npc.h index eff4ed4ec..ed5f4138d 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -144,7 +144,7 @@ enum actor_classes { #define MAX_NPC_CLASS 1000 // New NPC range #define MAX_NPC_CLASS2_START 10001 -#define MAX_NPC_CLASS2_END 10248 +#define MAX_NPC_CLASS2_END 10310 //Script NPC events. enum npce_event { diff --git a/src/map/packets.h b/src/map/packets.h index 1d1046e8a..a897601b3 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -1142,7 +1142,7 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x02cc,4); packet(0x02cd,26); packet(0x02ce,10); - packet(0x02cf,6); + packet(0x02cf,6,clif->pMemorialDungeonCommand); packet(0x02d0,-1); packet(0x02d1,-1); packet(0x02d2,-1); @@ -4270,4 +4270,71 @@ packet(0x96e,-1,clif->ackmergeitems); // changed packet sizes #endif +// 2018-08-29aRagexe +#if PACKETVER_MAIN_NUM >= 20180829 +// new packets + packet(0x0b05,59); + packet(0x0b06,53,clif->pDull/*,XXX*/); + packet(0x0b07,-1); + packet(0x0b08,26); // ZC_INVENTORY_START + packet(0x0b09,-1); // ZC_STORE_ITEMLIST_NORMAL_V6 + packet(0x0b0a,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 + packet(0x0b0b,3); // ZC_INVENTORY_END + packet(0x0b0c,155,clif->pDull/*,XXX*/); +// changed packet sizes +#endif + +// 2018-08-29aRagexeRE +#if PACKETVER_RE_NUM >= 20180829 +// new packets + packet(0x0b05,63); + packet(0x0b06,53,clif->pDull/*,XXX*/); + packet(0x0b07,-1); + packet(0x0b08,26); // ZC_INVENTORY_START + packet(0x0b09,-1); // ZC_STORE_ITEMLIST_NORMAL_V6 + packet(0x0b0a,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 + packet(0x0b0b,3); // ZC_INVENTORY_END + packet(0x0b0c,155,clif->pDull/*,XXX*/); +// changed packet sizes +#endif + +// 2018-09-05aRagexe_zero +#if PACKETVER_ZERO_NUM >= 20180905 +// new packets + packet(0x0b0d,6,clif->pDull/*,XXX*/); +// changed packet sizes + packet(0x0b08,27); // ZC_INVENTORY_START + packet(0x0b0b,4); // ZC_INVENTORY_END +#endif + +#ifndef PACKETVER_ZERO +// 2018-09-12dRagexe, 2018-09-12dRagexeRE +#if PACKETVER >= 20180912 +// new packets + packet(0x0b0d,10,clif->pDull/*,XXX*/); + packet(0x0b0e,-1,clif->pDull/*,XXX*/); + packet(0x0b0f,-1,clif->pDull/*,XXX*/); +// changed packet sizes + packet(0x0b08,27,clif->pDull/*,XXX*/); // ZC_INVENTORY_START + packet(0x0b0b,4,clif->pDull/*,XXX*/); // ZC_INVENTORY_END +#endif +#endif + +// 2018-09-19aRagexeRE +#if PACKETVER_RE_NUM >= 20180919 +// new packets +// changed packet sizes + packet(0x0b08,-1); // ZC_INVENTORY_START +#endif + +// 2018-09-19aRagexe_zero +#if PACKETVER_ZERO_NUM >= 20180919 +// new packets + packet(0x0b0e,-1,clif->pDull/*,XXX*/); + packet(0x0b0f,-1,clif->pDull/*,XXX*/); +// changed packet sizes + packet(0x0b08,-1); // ZC_INVENTORY_START + packet(0x0b0d,10,clif->pDull/*,XXX*/); +#endif + #endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h index 6e7f27166..a9d9a7020 100644 --- a/src/map/packets_keys_main.h +++ b/src/map/packets_keys_main.h @@ -874,7 +874,7 @@ packetKeys(0x6A596301,0x76866D0E,0x32294A45); #endif -// 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE +// 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE #if PACKETVER == 20131223 || \ PACKETVER == 20140508 || \ PACKETVER == 20140611 || \ @@ -899,7 +899,11 @@ PACKETVER == 20180718 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180831 || \ + PACKETVER == 20180912 || \ + PACKETVER >= 20180919 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h index 42a6aaf37..bbc1f7332 100644 --- a/src/map/packets_keys_zero.h +++ b/src/map/packets_keys_zero.h @@ -29,7 +29,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero +// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero #if PACKETVER == 20171018 || \ PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ @@ -54,7 +54,11 @@ PACKETVER == 20180725 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180905 || \ + PACKETVER == 20180912 || \ + PACKETVER >= 20180919 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h index 441415df2..8bc395da1 100644 --- a/src/map/packets_shuffle_main.h +++ b/src/map/packets_shuffle_main.h @@ -3344,7 +3344,7 @@ packet(0x0969,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE #endif -// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-28bRagexe, 2018-04-04bRagexe, 2018-04-18aRagexe, 2018-04-25cRagexe, 2018-05-02bRagexe, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-23aRagexe, 2018-05-30aRagexe, 2018-06-05bRagexe, 2018-06-20cRagexe, 2018-06-20eRagexe, 2018-06-21aRagexe, 2018-07-04aRagexe, 2018-07-18bRagexe, 2018-07-18cRagexe, 2018-08-01cRagexe, 2018-08-08bRagexe, 2018-08-22cRagexe +// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-28bRagexe, 2018-04-04bRagexe, 2018-04-18aRagexe, 2018-04-25cRagexe, 2018-05-02bRagexe, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-23aRagexe, 2018-05-30aRagexe, 2018-06-05bRagexe, 2018-06-20cRagexe, 2018-06-20eRagexe, 2018-06-21aRagexe, 2018-07-04aRagexe, 2018-07-18bRagexe, 2018-07-18cRagexe, 2018-08-01cRagexe, 2018-08-08bRagexe, 2018-08-22cRagexe, 2018-08-29aRagexe, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-19aRagexe #if PACKETVER == 20140611 || \ PACKETVER == 20150225 || \ PACKETVER == 20180315 || \ @@ -3365,7 +3365,11 @@ PACKETVER == 20180718 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180831 || \ + PACKETVER == 20180912 || \ + PACKETVER >= 20180919 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_shuffle_re.h b/src/map/packets_shuffle_re.h index ee268a8f5..157a8a431 100644 --- a/src/map/packets_shuffle_re.h +++ b/src/map/packets_shuffle_re.h @@ -9662,13 +9662,16 @@ packet(0x083c,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK #endif -// 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexeRE, 2018-08-01cRagexeRE, 2018-08-08bRagexeRE, 2018-08-22cRagexeRE +// 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexeRE, 2018-08-01cRagexeRE, 2018-08-08bRagexeRE, 2018-08-22cRagexeRE, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-09-12dRagexeRE, 2018-09-19aRagexeRE #if PACKETVER == 20180704 || \ PACKETVER == 20180711 || \ PACKETVER == 20180718 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180912 || \ + PACKETVER >= 20180919 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h index 479cf634a..b7253fdda 100644 --- a/src/map/packets_shuffle_zero.h +++ b/src/map/packets_shuffle_zero.h @@ -36,7 +36,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero +// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero #if PACKETVER == 20171018 || \ PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ @@ -61,7 +61,11 @@ PACKETVER == 20180725 || \ PACKETVER == 20180801 || \ PACKETVER == 20180808 || \ - PACKETVER >= 20180822 + PACKETVER == 20180822 || \ + PACKETVER == 20180829 || \ + PACKETVER == 20180905 || \ + PACKETVER == 20180912 || \ + PACKETVER >= 20180919 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 852a44cb8..af76a66d7 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -198,7 +198,9 @@ enum packet_headers { #else dropflooritemType = 0x9e, #endif -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + inventorylistnormalType = 0xb09, +#elif PACKETVER >= 20120925 inventorylistnormalType = 0x991, #elif PACKETVER >= 20080102 inventorylistnormalType = 0x2e8, @@ -207,7 +209,9 @@ enum packet_headers { #else inventorylistnormalType = 0xa3, #endif -#if PACKETVER >= 20150226 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + inventorylistequipType = 0xb0a, +#elif PACKETVER >= 20150226 inventorylistequipType = 0xa0d, #elif PACKETVER >= 20120925 inventorylistequipType = 0x992, @@ -218,27 +222,33 @@ enum packet_headers { #else inventorylistequipType = 0xa4, #endif -#if PACKETVER >= 20120925 - storagelistnormalType = 0x995, +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 + storageListNormalType = 0xb09, +#elif PACKETVER >= 20120925 + storageListNormalType = 0x995, #elif PACKETVER >= 20080102 - storagelistnormalType = 0x2ea, + storageListNormalType = 0x2ea, #elif PACKETVER >= 20071002 - storagelistnormalType = 0x295, + storageListNormalType = 0x295, #else - storagelistnormalType = 0xa5, + storageListNormalType = 0xa5, #endif -#if PACKETVER >= 20150226 - storagelistequipType = 0xa10, +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 + storageListEquipType = 0xb0a, +#elif PACKETVER >= 20150226 + storageListEquipType = 0xa10, #elif PACKETVER >= 20120925 - storagelistequipType = 0x996, + storageListEquipType = 0x996, #elif PACKETVER >= 20080102 - storagelistequipType = 0x2d1, + storageListEquipType = 0x2d1, #elif PACKETVER >= 20071002 - storagelistequipType = 0x296, + storageListEquipType = 0x296, #else - storagelistequipType = 0xa6, + storageListEquipType = 0xa6, #endif -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 + cartlistnormalType = 0xb09, +#elif PACKETVER >= 20120925 cartlistnormalType = 0x993, #elif PACKETVER >= 20080102 cartlistnormalType = 0x2e9, @@ -247,7 +257,9 @@ enum packet_headers { #else cartlistnormalType = 0x123, #endif -#if PACKETVER >= 20150226 +#if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 + cartlistequipType = 0xb0a, +#elif PACKETVER >= 20150226 cartlistequipType = 0xa0f, #elif PACKETVER >= 20120925 cartlistequipType = 0x994, @@ -1162,28 +1174,63 @@ struct packet_roulette_itemrecv_ack { struct packet_itemlist_normal { int16 PacketType; int16 PacketLength; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + uint8 invType; +#endif struct NORMALITEM_INFO list[MAX_ITEMLIST]; } __attribute__((packed)); struct packet_itemlist_equip { int16 PacketType; int16 PacketLength; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + uint8 invType; +#endif struct EQUIPITEM_INFO list[MAX_ITEMLIST]; } __attribute__((packed)); -struct packet_storelist_normal { +struct ZC_STORE_ITEMLIST_NORMAL { int16 PacketType; int16 PacketLength; -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + uint8 invType; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 char name[NAME_LENGTH]; #endif struct NORMALITEM_INFO list[MAX_ITEMLIST]; } __attribute__((packed)); -struct packet_storelist_equip { +struct ZC_INVENTORY_START { + int16 packetType; +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 + int16 packetLength; +#endif +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + uint8 invType; +#endif +#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 + char name[]; +#else + char name[NAME_LENGTH]; +#endif +} __attribute__((packed)); + +struct ZC_INVENTORY_END { + int16 packetType; +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + uint8 invType; +#endif + char flag; +} __attribute__((packed)); + +struct ZC_STORE_ITEMLIST_EQUIP { int16 PacketType; int16 PacketLength; -#if PACKETVER >= 20120925 +#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 + uint8 invType; +#endif +#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 char name[NAME_LENGTH]; #endif struct EQUIPITEM_INFO list[MAX_ITEMLIST]; @@ -2784,6 +2831,11 @@ struct PACKET_ZC_ACK_LEAVE_GUILD2 { char reason[40]; } __attribute__((packed)); +struct PACKET_CZ_MEMORIALDUNGEON_COMMAND { + int16 packetType; + int32 command; +} __attribute__((packed)); + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris diff --git a/src/map/pc.c b/src/map/pc.c index be28f8dad..961dda9f5 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2075,7 +2075,7 @@ static int pc_disguise(struct map_session_data *sd, int class) clif->spawn(&sd->bl); if (class == sd->status.class && pc_iscarton(sd)) { //It seems the cart info is lost on undisguise. - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd,SP_CARTINFO); } if (sd->chat_id != 0) { @@ -9198,7 +9198,7 @@ static int pc_setoption(struct map_session_data *sd, int type) #ifndef NEW_CARTS if( type&OPTION_CART && !( p_type&OPTION_CART ) ) { //Cart On - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd, SP_CARTINFO); if(pc->checkskill(sd, MC_PUSHCART) < 10) status_calc_pc(sd,SCO_NONE); //Apply speed penalty. @@ -9305,7 +9305,7 @@ static int pc_setcart(struct map_session_data *sd, int type) break; default:/* everything else is an allowed ID so we can move on */ if( !sd->sc.data[SC_PUSH_CART] ) /* first time, so fill cart data */ - clif->cartlist(sd); + clif->cartList(sd); clif->updatestatus(sd, SP_CARTINFO); sc_start(NULL,&sd->bl, SC_PUSH_CART, 100, type, 0); clif->sc_load(&sd->bl, sd->bl.id, AREA, SI_ON_PUSH_CART, type, 0, 0); diff --git a/src/map/pet.c b/src/map/pet.c index cfb3e8253..c32a92b78 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -350,7 +350,7 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd) sd->status.inventory[i].bound = IBT_NONE; } #if PACKETVER >= 20180704 - clif->inventorylist(sd); + clif->inventoryList(sd); clif->send_petdata(sd, pd, 6, 0); #endif pd->pet.incubate = 1; diff --git a/src/map/script.c b/src/map/script.c index 31930c2dc..f1bb63aa3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9361,7 +9361,7 @@ static BUILDIN(repair) if(num==repaircounter) { sd->status.inventory[i].attribute |= ATTR_BROKEN; sd->status.inventory[i].attribute ^= ATTR_BROKEN; - clif->equiplist(sd); + clif->equipList(sd); clif->produce_effect(sd, 0, sd->status.inventory[i].nameid); clif->misceffect(&sd->bl, 3); break; @@ -9398,7 +9398,7 @@ static BUILDIN(repairall) if(repaircounter) { clif->misceffect(&sd->bl, 3); - clif->equiplist(sd); + clif->equipList(sd); } return true; diff --git a/src/map/skill.c b/src/map/skill.c index c5579c2f6..4eaab5457 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2588,7 +2588,7 @@ static int skill_break_equip(struct block_list *bl, unsigned short where, int ra pc->unequipitem(sd, j, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE); } } - clif->equiplist(sd); + clif->equipList(sd); } return where; //Return list of pieces broken. @@ -16139,7 +16139,7 @@ static void skill_repairweapon(struct map_session_data *sd, int idx) item->attribute |= ATTR_BROKEN; item->attribute ^= ATTR_BROKEN; /* clear broken state */ - clif->equiplist(target_sd); + clif->equipList(target_sd); pc->delitem(sd, pc->search_inventory(sd, material), 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME); // FIXME: is this the correct reason flag? @@ -16222,7 +16222,7 @@ static void skill_weaponrefine(struct map_session_data *sd, int idx) } clif->delitem(sd, idx, 1, DELITEM_NORMAL); clif->upgrademessage(sd->fd, 0,item->nameid); - clif->inventorylist(sd); + clif->inventoryList(sd); clif->refine(sd->fd,0,idx,item->refine); if (ep) pc->equipitem(sd,idx,ep); diff --git a/src/map/storage.c b/src/map/storage.c index ba8dcee3a..a6f0715e7 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -122,8 +122,8 @@ static int storage_storageopen(struct map_session_data *sd) if (sd->storage.aggregate > 0) { storage->sortitem(VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); - clif->storagelist(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); } + clif->storageList(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); clif->updatestorageamount(sd, sd->storage.aggregate, MAX_STORAGE); return 0; @@ -512,7 +512,7 @@ static int storage_guild_storageopen(struct map_session_data *sd) gstor->storage_status = 1; sd->state.storage_flag = STORAGE_FLAG_GUILD; storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items)); - clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items)); + clif->guildStorageList(sd, gstor->items, ARRAYLENGTH(gstor->items)); clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE); return 0; } diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 52c7bb0f6..f80dc9003 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1320,12 +1320,18 @@ typedef void (*HPMHOOK_pre_clif_status_change) (struct block_list **bl, int *typ typedef void (*HPMHOOK_post_clif_status_change) (struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3); typedef void (*HPMHOOK_pre_clif_insert_card) (struct map_session_data **sd, int *idx_equip, int *idx_card, int *flag); typedef void (*HPMHOOK_post_clif_insert_card) (struct map_session_data *sd, int idx_equip, int idx_card, int flag); -typedef void (*HPMHOOK_pre_clif_inventorylist) (struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_inventorylist) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_equiplist) (struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_equiplist) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_cartlist) (struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_cartlist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_inventoryList) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_inventoryList) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_inventoryItems) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_inventoryItems) (struct map_session_data *sd, enum inventory_type type); +typedef void (*HPMHOOK_pre_clif_equipList) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_equipList) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_equipItems) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_equipItems) (struct map_session_data *sd, enum inventory_type type); +typedef void (*HPMHOOK_pre_clif_cartList) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_cartList) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cartItems) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_cartItems) (struct map_session_data *sd, enum inventory_type type); typedef void (*HPMHOOK_pre_clif_favorite_item) (struct map_session_data **sd, unsigned short *index); typedef void (*HPMHOOK_post_clif_favorite_item) (struct map_session_data *sd, unsigned short index); typedef void (*HPMHOOK_pre_clif_clearcart) (int *fd); @@ -1620,8 +1626,16 @@ typedef void (*HPMHOOK_pre_clif_openvendingAck) (int *fd, int *result); typedef void (*HPMHOOK_post_clif_openvendingAck) (int fd, int result); typedef void (*HPMHOOK_pre_clif_vendingreport) (struct map_session_data **sd, int *index, int *amount, uint32 *char_id, int *zeny); typedef void (*HPMHOOK_post_clif_vendingreport) (struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny); -typedef void (*HPMHOOK_pre_clif_storagelist) (struct map_session_data **sd, struct item **items, int *items_length); -typedef void (*HPMHOOK_post_clif_storagelist) (struct map_session_data *sd, struct item *items, int items_length); +typedef void (*HPMHOOK_pre_clif_storageList) (struct map_session_data **sd, struct item **items, int *items_length); +typedef void (*HPMHOOK_post_clif_storageList) (struct map_session_data *sd, struct item *items, int items_length); +typedef void (*HPMHOOK_pre_clif_guildStorageList) (struct map_session_data **sd, struct item **items, int *items_length); +typedef void (*HPMHOOK_post_clif_guildStorageList) (struct map_session_data *sd, struct item *items, int items_length); +typedef void (*HPMHOOK_pre_clif_storageItems) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length); +typedef void (*HPMHOOK_post_clif_storageItems) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length); +typedef void (*HPMHOOK_pre_clif_inventoryStart) (struct map_session_data **sd, enum inventory_type *type, const char **name); +typedef void (*HPMHOOK_post_clif_inventoryStart) (struct map_session_data *sd, enum inventory_type type, const char *name); +typedef void (*HPMHOOK_pre_clif_inventoryEnd) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_inventoryEnd) (struct map_session_data *sd, enum inventory_type type); typedef void (*HPMHOOK_pre_clif_updatestorageamount) (struct map_session_data **sd, int *amount, int *max_amount); typedef void (*HPMHOOK_post_clif_updatestorageamount) (struct map_session_data *sd, int amount, int max_amount); typedef void (*HPMHOOK_pre_clif_storageitemadded) (struct map_session_data **sd, struct item **i, int *index, int *amount); @@ -2600,6 +2614,8 @@ typedef void (*HPMHOOK_pre_clif_petEvolutionResult) (int *fd, enum pet_evolution typedef void (*HPMHOOK_post_clif_petEvolutionResult) (int fd, enum pet_evolution_result result); typedef void (*HPMHOOK_pre_clif_party_dead_notification) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_party_dead_notification) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMemorialDungeonCommand) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMemorialDungeonCommand) (int fd, struct map_session_data *sd); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); @@ -3126,6 +3142,8 @@ typedef bool (*HPMHOOK_pre_instance_valid) (int *instance_id); typedef bool (*HPMHOOK_post_instance_valid) (bool retVal___, int instance_id); typedef int (*HPMHOOK_pre_instance_destroy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_instance_destroy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_instance_force_destroy) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_instance_force_destroy) (struct map_session_data *sd); #endif // MAP_INSTANCE_H #ifdef CHAR_INT_ACHIEVEMENT_H /* inter_achievement */ typedef int (*HPMHOOK_pre_inter_achievement_sql_init) (void); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 457bf90fe..8762975e1 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -912,12 +912,18 @@ struct { struct HPMHookPoint *HP_clif_status_change_post; struct HPMHookPoint *HP_clif_insert_card_pre; struct HPMHookPoint *HP_clif_insert_card_post; - struct HPMHookPoint *HP_clif_inventorylist_pre; - struct HPMHookPoint *HP_clif_inventorylist_post; - struct HPMHookPoint *HP_clif_equiplist_pre; - struct HPMHookPoint *HP_clif_equiplist_post; - struct HPMHookPoint *HP_clif_cartlist_pre; - struct HPMHookPoint *HP_clif_cartlist_post; + struct HPMHookPoint *HP_clif_inventoryList_pre; + struct HPMHookPoint *HP_clif_inventoryList_post; + struct HPMHookPoint *HP_clif_inventoryItems_pre; + struct HPMHookPoint *HP_clif_inventoryItems_post; + struct HPMHookPoint *HP_clif_equipList_pre; + struct HPMHookPoint *HP_clif_equipList_post; + struct HPMHookPoint *HP_clif_equipItems_pre; + struct HPMHookPoint *HP_clif_equipItems_post; + struct HPMHookPoint *HP_clif_cartList_pre; + struct HPMHookPoint *HP_clif_cartList_post; + struct HPMHookPoint *HP_clif_cartItems_pre; + struct HPMHookPoint *HP_clif_cartItems_post; struct HPMHookPoint *HP_clif_favorite_item_pre; struct HPMHookPoint *HP_clif_favorite_item_post; struct HPMHookPoint *HP_clif_clearcart_pre; @@ -1212,8 +1218,16 @@ struct { struct HPMHookPoint *HP_clif_openvendingAck_post; struct HPMHookPoint *HP_clif_vendingreport_pre; struct HPMHookPoint *HP_clif_vendingreport_post; - struct HPMHookPoint *HP_clif_storagelist_pre; - struct HPMHookPoint *HP_clif_storagelist_post; + struct HPMHookPoint *HP_clif_storageList_pre; + struct HPMHookPoint *HP_clif_storageList_post; + struct HPMHookPoint *HP_clif_guildStorageList_pre; + struct HPMHookPoint *HP_clif_guildStorageList_post; + struct HPMHookPoint *HP_clif_storageItems_pre; + struct HPMHookPoint *HP_clif_storageItems_post; + struct HPMHookPoint *HP_clif_inventoryStart_pre; + struct HPMHookPoint *HP_clif_inventoryStart_post; + struct HPMHookPoint *HP_clif_inventoryEnd_pre; + struct HPMHookPoint *HP_clif_inventoryEnd_post; struct HPMHookPoint *HP_clif_updatestorageamount_pre; struct HPMHookPoint *HP_clif_updatestorageamount_post; struct HPMHookPoint *HP_clif_storageitemadded_pre; @@ -2192,6 +2206,8 @@ struct { struct HPMHookPoint *HP_clif_petEvolutionResult_post; struct HPMHookPoint *HP_clif_party_dead_notification_pre; struct HPMHookPoint *HP_clif_party_dead_notification_post; + struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_pre; + struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -2686,6 +2702,8 @@ struct { struct HPMHookPoint *HP_instance_valid_post; struct HPMHookPoint *HP_instance_destroy_timer_pre; struct HPMHookPoint *HP_instance_destroy_timer_post; + struct HPMHookPoint *HP_instance_force_destroy_pre; + struct HPMHookPoint *HP_instance_force_destroy_post; struct HPMHookPoint *HP_intif_parse_pre; struct HPMHookPoint *HP_intif_parse_post; struct HPMHookPoint *HP_intif_create_pet_pre; @@ -7477,12 +7495,18 @@ struct { int HP_clif_status_change_post; int HP_clif_insert_card_pre; int HP_clif_insert_card_post; - int HP_clif_inventorylist_pre; - int HP_clif_inventorylist_post; - int HP_clif_equiplist_pre; - int HP_clif_equiplist_post; - int HP_clif_cartlist_pre; - int HP_clif_cartlist_post; + int HP_clif_inventoryList_pre; + int HP_clif_inventoryList_post; + int HP_clif_inventoryItems_pre; + int HP_clif_inventoryItems_post; + int HP_clif_equipList_pre; + int HP_clif_equipList_post; + int HP_clif_equipItems_pre; + int HP_clif_equipItems_post; + int HP_clif_cartList_pre; + int HP_clif_cartList_post; + int HP_clif_cartItems_pre; + int HP_clif_cartItems_post; int HP_clif_favorite_item_pre; int HP_clif_favorite_item_post; int HP_clif_clearcart_pre; @@ -7777,8 +7801,16 @@ struct { int HP_clif_openvendingAck_post; int HP_clif_vendingreport_pre; int HP_clif_vendingreport_post; - int HP_clif_storagelist_pre; - int HP_clif_storagelist_post; + int HP_clif_storageList_pre; + int HP_clif_storageList_post; + int HP_clif_guildStorageList_pre; + int HP_clif_guildStorageList_post; + int HP_clif_storageItems_pre; + int HP_clif_storageItems_post; + int HP_clif_inventoryStart_pre; + int HP_clif_inventoryStart_post; + int HP_clif_inventoryEnd_pre; + int HP_clif_inventoryEnd_post; int HP_clif_updatestorageamount_pre; int HP_clif_updatestorageamount_post; int HP_clif_storageitemadded_pre; @@ -8757,6 +8789,8 @@ struct { int HP_clif_petEvolutionResult_post; int HP_clif_party_dead_notification_pre; int HP_clif_party_dead_notification_post; + int HP_clif_pMemorialDungeonCommand_pre; + int HP_clif_pMemorialDungeonCommand_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -9251,6 +9285,8 @@ struct { int HP_instance_valid_post; int HP_instance_destroy_timer_pre; int HP_instance_destroy_timer_post; + int HP_instance_force_destroy_pre; + int HP_instance_force_destroy_post; int HP_intif_parse_pre; int HP_intif_parse_post; int HP_intif_create_pet_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 41e6f9208..2f3f1840f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -480,9 +480,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->combo_delay, HP_clif_combo_delay) }, { HP_POP(clif->status_change, HP_clif_status_change) }, { HP_POP(clif->insert_card, HP_clif_insert_card) }, - { HP_POP(clif->inventorylist, HP_clif_inventorylist) }, - { HP_POP(clif->equiplist, HP_clif_equiplist) }, - { HP_POP(clif->cartlist, HP_clif_cartlist) }, + { HP_POP(clif->inventoryList, HP_clif_inventoryList) }, + { HP_POP(clif->inventoryItems, HP_clif_inventoryItems) }, + { HP_POP(clif->equipList, HP_clif_equipList) }, + { HP_POP(clif->equipItems, HP_clif_equipItems) }, + { HP_POP(clif->cartList, HP_clif_cartList) }, + { HP_POP(clif->cartItems, HP_clif_cartItems) }, { HP_POP(clif->favorite_item, HP_clif_favorite_item) }, { HP_POP(clif->clearcart, HP_clif_clearcart) }, { HP_POP(clif->item_identify_list, HP_clif_item_identify_list) }, @@ -630,7 +633,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->openvending, HP_clif_openvending) }, { HP_POP(clif->openvendingAck, HP_clif_openvendingAck) }, { HP_POP(clif->vendingreport, HP_clif_vendingreport) }, - { HP_POP(clif->storagelist, HP_clif_storagelist) }, + { HP_POP(clif->storageList, HP_clif_storageList) }, + { HP_POP(clif->guildStorageList, HP_clif_guildStorageList) }, + { HP_POP(clif->storageItems, HP_clif_storageItems) }, + { HP_POP(clif->inventoryStart, HP_clif_inventoryStart) }, + { HP_POP(clif->inventoryEnd, HP_clif_inventoryEnd) }, { HP_POP(clif->updatestorageamount, HP_clif_updatestorageamount) }, { HP_POP(clif->storageitemadded, HP_clif_storageitemadded) }, { HP_POP(clif->storageitemremoved, HP_clif_storageitemremoved) }, @@ -1120,6 +1127,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) }, { HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) }, { HP_POP(clif->party_dead_notification, HP_clif_party_dead_notification) }, + { HP_POP(clif->pMemorialDungeonCommand, HP_clif_pMemorialDungeonCommand) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, @@ -1379,6 +1387,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(instance->set_timeout, HP_instance_set_timeout) }, { HP_POP(instance->valid, HP_instance_valid) }, { HP_POP(instance->destroy_timer, HP_instance_destroy_timer) }, + { HP_POP(instance->force_destroy, HP_instance_force_destroy) }, /* intif_interface */ { HP_POP(intif->parse, HP_intif_parse) }, { HP_POP(intif->create_pet, HP_intif_create_pet) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 5690e0735..860e47f1b 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -11890,13 +11890,13 @@ void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_car } return; } -void HP_clif_inventorylist(struct map_session_data *sd) { +void HP_clif_inventoryList(struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_inventorylist_pre > 0) { + if (HPMHooks.count.HP_clif_inventoryList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_inventorylist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryList_pre[hIndex].func; preHookFunc(&sd); } if (*HPMforce_return) { @@ -11905,24 +11905,50 @@ void HP_clif_inventorylist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.inventorylist(sd); + HPMHooks.source.clif.inventoryList(sd); } - if (HPMHooks.count.HP_clif_inventorylist_post > 0) { + if (HPMHooks.count.HP_clif_inventoryList_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_inventorylist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryList_post[hIndex].func; postHookFunc(sd); } } return; } -void HP_clif_equiplist(struct map_session_data *sd) { +void HP_clif_inventoryItems(struct map_session_data *sd, enum inventory_type type) { int hIndex = 0; - if (HPMHooks.count.HP_clif_equiplist_pre > 0) { + if (HPMHooks.count.HP_clif_inventoryItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryItems_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryItems(sd, type); + } + if (HPMHooks.count.HP_clif_inventoryItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_equipList(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_equipList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_equiplist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_equipList_pre[hIndex].func; preHookFunc(&sd); } if (*HPMforce_return) { @@ -11931,24 +11957,50 @@ void HP_clif_equiplist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.equiplist(sd); + HPMHooks.source.clif.equipList(sd); } - if (HPMHooks.count.HP_clif_equiplist_post > 0) { + if (HPMHooks.count.HP_clif_equipList_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_equiplist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_equipList_post[hIndex].func; postHookFunc(sd); } } return; } -void HP_clif_cartlist(struct map_session_data *sd) { +void HP_clif_equipItems(struct map_session_data *sd, enum inventory_type type) { int hIndex = 0; - if (HPMHooks.count.HP_clif_cartlist_pre > 0) { + if (HPMHooks.count.HP_clif_equipItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_equipItems_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.equipItems(sd, type); + } + if (HPMHooks.count.HP_clif_equipItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_equipItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_cartList(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cartList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_cartlist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cartList_pre[hIndex].func; preHookFunc(&sd); } if (*HPMforce_return) { @@ -11957,17 +12009,43 @@ void HP_clif_cartlist(struct map_session_data *sd) { } } { - HPMHooks.source.clif.cartlist(sd); + HPMHooks.source.clif.cartList(sd); } - if (HPMHooks.count.HP_clif_cartlist_post > 0) { + if (HPMHooks.count.HP_clif_cartList_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_cartlist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cartList_post[hIndex].func; postHookFunc(sd); } } return; } +void HP_clif_cartItems(struct map_session_data *sd, enum inventory_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cartItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cartItems_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cartItems(sd, type); + } + if (HPMHooks.count.HP_clif_cartItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cartItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) { int hIndex = 0; if (HPMHooks.count.HP_clif_favorite_item_pre > 0) { @@ -15809,13 +15887,39 @@ void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, u } return; } -void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) { +void HP_clif_storageList(struct map_session_data *sd, struct item *items, int items_length) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_storageList_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_storageList_pre[hIndex].func; + preHookFunc(&sd, &items, &items_length); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageList(sd, items, items_length); + } + if (HPMHooks.count.HP_clif_storageList_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_storageList_post[hIndex].func; + postHookFunc(sd, items, items_length); + } + } + return; +} +void HP_clif_guildStorageList(struct map_session_data *sd, struct item *items, int items_length) { int hIndex = 0; - if (HPMHooks.count.HP_clif_storagelist_pre > 0) { + if (HPMHooks.count.HP_clif_guildStorageList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_storagelist_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guildStorageList_pre[hIndex].func; preHookFunc(&sd, &items, &items_length); } if (*HPMforce_return) { @@ -15824,17 +15928,95 @@ void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int it } } { - HPMHooks.source.clif.storagelist(sd, items, items_length); + HPMHooks.source.clif.guildStorageList(sd, items, items_length); } - if (HPMHooks.count.HP_clif_storagelist_post > 0) { + if (HPMHooks.count.HP_clif_guildStorageList_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_storagelist_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guildStorageList_post[hIndex].func; postHookFunc(sd, items, items_length); } } return; } +void HP_clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_storageItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_storageItems_pre[hIndex].func; + preHookFunc(&sd, &type, &items, &items_length); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageItems(sd, type, items, items_length); + } + if (HPMHooks.count.HP_clif_storageItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_storageItems_post[hIndex].func; + postHookFunc(sd, type, items, items_length); + } + } + return; +} +void HP_clif_inventoryStart(struct map_session_data *sd, enum inventory_type type, const char *name) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryStart_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryStart_pre[hIndex].func; + preHookFunc(&sd, &type, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryStart(sd, type, name); + } + if (HPMHooks.count.HP_clif_inventoryStart_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryStart_post[hIndex].func; + postHookFunc(sd, type, name); + } + } + return; +} +void HP_clif_inventoryEnd(struct map_session_data *sd, enum inventory_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryEnd_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryEnd_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryEnd(sd, type); + } + if (HPMHooks.count.HP_clif_inventoryEnd_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryEnd_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int max_amount) { int hIndex = 0; if (HPMHooks.count.HP_clif_updatestorageamount_pre > 0) { @@ -28574,6 +28756,32 @@ void HP_clif_party_dead_notification(struct map_session_data *sd) { } return; } +void HP_clif_pMemorialDungeonCommand(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMemorialDungeonCommand_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMemorialDungeonCommand(fd, sd); + } + if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMemorialDungeonCommand_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; @@ -35268,6 +35476,32 @@ int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } +void HP_instance_force_destroy(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_instance_force_destroy_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_force_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_instance_force_destroy_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.instance.force_destroy(sd); + } + if (HPMHooks.count.HP_instance_force_destroy_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_force_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_instance_force_destroy_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} /* intif_interface */ int HP_intif_parse(int fd) { int hIndex = 0; |