summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml135
-rw-r--r--.travis.yml68
-rw-r--r--CHANGELOG.md258
-rw-r--r--Hercules.xcodeproj/project.pbxproj22
-rw-r--r--README.md106
-rw-r--r--conf/atcommand.conf1
-rw-r--r--conf/char/char-server.conf5
-rw-r--r--conf/clans.conf2
-rw-r--r--conf/common/inter-server.conf3
-rw-r--r--conf/common/socket.conf2
-rw-r--r--conf/global/console.conf44
-rw-r--r--conf/global/sql_connection.conf2
-rw-r--r--conf/import-tmpl/battle.conf2
-rw-r--r--conf/import-tmpl/char-server.conf2
-rw-r--r--conf/import-tmpl/inter-server.conf2
-rw-r--r--conf/import-tmpl/login-server.conf2
-rw-r--r--conf/import-tmpl/logs.conf2
-rw-r--r--conf/import-tmpl/map-server.conf2
-rw-r--r--conf/import-tmpl/script.conf2
-rw-r--r--conf/import-tmpl/socket.conf2
-rw-r--r--conf/login/login-server.conf6
-rw-r--r--conf/map/battle.conf5
-rw-r--r--conf/map/battle/battle.conf2
-rw-r--r--conf/map/battle/battleground.conf2
-rw-r--r--conf/map/battle/client.conf15
-rw-r--r--conf/map/battle/drops.conf7
-rw-r--r--conf/map/battle/exp.conf2
-rw-r--r--conf/map/battle/feature.conf17
-rw-r--r--conf/map/battle/gm.conf2
-rw-r--r--conf/map/battle/guild.conf2
-rw-r--r--conf/map/battle/homunc.conf2
-rw-r--r--conf/map/battle/items.conf2
-rw-r--r--conf/map/battle/limits.conf57
-rw-r--r--conf/map/battle/misc.conf2
-rw-r--r--conf/map/battle/monster.conf4
-rw-r--r--conf/map/battle/party.conf2
-rw-r--r--conf/map/battle/pet.conf2
-rw-r--r--conf/map/battle/player.conf3
-rw-r--r--conf/map/battle/skill.conf39
-rw-r--r--conf/map/battle/status.conf2
-rw-r--r--conf/map/logs.conf2
-rw-r--r--conf/map/map-server.conf3
-rw-r--r--conf/map/maps.conf2
-rw-r--r--conf/map/script.conf4
-rw-r--r--conf/messages.conf8
-rwxr-xr-xconfigure42
-rw-r--r--configure.ac22
-rw-r--r--db/constants.conf94
-rw-r--r--db/item_db2.conf2
-rw-r--r--db/mob_db2.conf2
-rw-r--r--db/option_drop_groups.conf53
-rw-r--r--db/pre-re/item_db.conf5
-rw-r--r--db/pre-re/mob_db.conf2
-rw-r--r--db/pre-re/mob_skill_db.conf6
-rw-r--r--db/pre-re/refine_db.conf185
-rw-r--r--db/pre-re/skill_db.conf1
-rw-r--r--db/re/item_combo_db.txt1
-rw-r--r--db/re/item_db.conf53
-rw-r--r--db/re/mob_db.conf2
-rw-r--r--db/re/refine_db.conf624
-rw-r--r--db/re/skill_db.conf9
-rw-r--r--doc/atcommands.txt20
-rw-r--r--doc/constants.md224
-rw-r--r--doc/item_bonus.md6
-rw-r--r--doc/mob_db.txt68
-rw-r--r--doc/option_drop_group.md97
-rw-r--r--doc/sample/npc_trader_sample.txt8
-rw-r--r--doc/script_commands.txt590
-rw-r--r--mariadb.bat15
-rw-r--r--npc/custom/bartershop.txt21
-rw-r--r--npc/custom/etc/quest_warper.txt6
-rw-r--r--npc/custom/events/disguise.txt10
-rw-r--r--npc/custom/events/mushroom_event.txt11
-rw-r--r--npc/custom/quests/quest_shop.txt4
-rw-r--r--npc/custom/quests/thq/THQS_TTShop.txt4
-rw-r--r--npc/dev/test.txt10
-rw-r--r--npc/jobs/1-1e/ninja.txt78
-rw-r--r--npc/merchants/advanced_refiner.txt19
-rw-r--r--npc/merchants/hd_refine.txt15
-rw-r--r--npc/merchants/refine.txt17
-rw-r--r--npc/other/CashShop_Functions.txt27
-rw-r--r--npc/other/Global_Functions.txt49
-rw-r--r--npc/other/inventory_expansion.txt63
-rw-r--r--npc/quests/quests_nameless.txt23
-rw-r--r--npc/quests/quests_prontera.txt24
-rw-r--r--npc/quests/quests_rachel.txt2
-rw-r--r--npc/re/instances/OldGlastHeim.txt4
-rw-r--r--npc/re/instances/ghost_palace.txt2
-rw-r--r--npc/re/jobs/2e/kagerou_oboro.txt440
-rw-r--r--npc/re/jobs/3-1/archbishop.txt12
-rw-r--r--npc/re/jobs/3-1/ranger.txt4
-rw-r--r--npc/re/jobs/3-2/sura.txt6
-rw-r--r--npc/re/merchants/hd_refiner.txt11
-rw-r--r--npc/re/merchants/refine.txt11
-rw-r--r--npc/re/merchants/renters.txt111
-rw-r--r--npc/re/merchants/shadow_refiner.txt10
-rw-r--r--npc/re/quests/eden/eden_tutorial.txt2
-rw-r--r--npc/scripts.conf1
-rw-r--r--npc/scripts_custom.conf1
-rw-r--r--npc/woe-fe/agit_main.txt3
-rw-r--r--npc/woe-se/agit_main_se.txt1184
-rw-r--r--sql-files/item_db.sql3
-rw-r--r--sql-files/item_db2.sql2
-rw-r--r--sql-files/item_db_re.sql9
-rw-r--r--sql-files/main.sql17
-rw-r--r--sql-files/mob_db.sql2
-rw-r--r--sql-files/mob_db2.sql2
-rw-r--r--sql-files/mob_db_re.sql2
-rw-r--r--sql-files/mob_skill_db.sql108
-rw-r--r--sql-files/mob_skill_db2.sql2
-rw-r--r--sql-files/mob_skill_db_re.sql152
-rw-r--r--sql-files/upgrades/2018-12-14--01-02.sql24
-rw-r--r--sql-files/upgrades/2018-12-29--07-51.sql29
-rw-r--r--sql-files/upgrades/2019-04-08--21-52.sql29
-rw-r--r--sql-files/upgrades/2019-04-25--02-12.sql24
-rw-r--r--sql-files/upgrades/2019-05-09--18-07.sql22
-rw-r--r--sql-files/upgrades/index.txt5
-rw-r--r--src/char/Makefile.in2
-rw-r--r--src/char/char.c185
-rw-r--r--src/char/char.h7
-rw-r--r--src/char/int_guild.c24
-rw-r--r--src/char/int_guild.h2
-rw-r--r--src/char/int_pet.c2
-rw-r--r--src/char/int_pet.h2
-rw-r--r--src/char/int_rodex.c142
-rw-r--r--src/char/int_rodex.h6
-rw-r--r--src/char/inter.c6
-rw-r--r--src/char/mapif.c84
-rw-r--r--src/char/mapif.h7
-rw-r--r--src/char/packets_hc_struct.h45
-rw-r--r--src/common/HPMDataCheck.h89
-rw-r--r--src/common/HPMSymbols.inc.h16
-rw-r--r--src/common/mmo.h94
-rw-r--r--src/common/packets/packets2003_len_main.h4
-rw-r--r--src/common/packets/packets2003_len_sak.h4
-rw-r--r--src/common/packets/packets2004_len_ad.h4
-rw-r--r--src/common/packets/packets2004_len_main.h4
-rw-r--r--src/common/packets/packets2004_len_sak.h4
-rw-r--r--src/common/packets/packets2005_len_ad.h4
-rw-r--r--src/common/packets/packets2005_len_main.h4
-rw-r--r--src/common/packets/packets2005_len_sak.h4
-rw-r--r--src/common/packets/packets2006_len_ad.h4
-rw-r--r--src/common/packets/packets2006_len_main.h4
-rw-r--r--src/common/packets/packets2006_len_sak.h4
-rw-r--r--src/common/packets/packets2007_len_ad.h4
-rw-r--r--src/common/packets/packets2007_len_main.h4
-rw-r--r--src/common/packets/packets2007_len_sak.h4
-rw-r--r--src/common/packets/packets2008_len_ad.h4
-rw-r--r--src/common/packets/packets2008_len_main.h4
-rw-r--r--src/common/packets/packets2008_len_re.h4
-rw-r--r--src/common/packets/packets2008_len_sak.h4
-rw-r--r--src/common/packets/packets2009_len_main.h4
-rw-r--r--src/common/packets/packets2009_len_re.h4
-rw-r--r--src/common/packets/packets2009_len_sak.h4
-rw-r--r--src/common/packets/packets2010_len_main.h4
-rw-r--r--src/common/packets/packets2010_len_re.h4
-rw-r--r--src/common/packets/packets2011_len_main.h4
-rw-r--r--src/common/packets/packets2011_len_re.h4
-rw-r--r--src/common/packets/packets2012_len_main.h4
-rw-r--r--src/common/packets/packets2012_len_re.h4
-rw-r--r--src/common/packets/packets2013_len_main.h4
-rw-r--r--src/common/packets/packets2013_len_re.h4
-rw-r--r--src/common/packets/packets2014_len_main.h4
-rw-r--r--src/common/packets/packets2014_len_re.h4
-rw-r--r--src/common/packets/packets2015_len_main.h4
-rw-r--r--src/common/packets/packets2015_len_re.h4
-rw-r--r--src/common/packets/packets2016_len_main.h4
-rw-r--r--src/common/packets/packets2016_len_re.h4
-rw-r--r--src/common/packets/packets2017_len_main.h6
-rw-r--r--src/common/packets/packets2017_len_re.h6
-rw-r--r--src/common/packets/packets2017_len_zero.h6
-rw-r--r--src/common/packets/packets2018_len_main.h329
-rw-r--r--src/common/packets/packets2018_len_re.h33
-rw-r--r--src/common/packets/packets2018_len_zero.h15
-rw-r--r--src/common/packets/packets2019_len_main.h4511
-rw-r--r--src/common/packets/packets2019_len_re.h4517
-rw-r--r--src/common/packets/packets2019_len_zero.h4503
-rw-r--r--src/common/packets/packets_len_ad.h4
-rw-r--r--src/common/packets/packets_len_main.h8
-rw-r--r--src/common/packets/packets_len_re.h8
-rw-r--r--src/common/packets/packets_len_sak.h4
-rw-r--r--src/common/packets/packets_len_zero.h8
-rw-r--r--src/common/packetsstatic_len.h8
-rw-r--r--src/common/socket.c26
-rw-r--r--src/common/socket.h3
-rw-r--r--src/common/sysinfo.c8
-rw-r--r--src/login/HPMlogin.c2
-rw-r--r--src/login/lclif.c84
-rw-r--r--src/login/lclif.h4
-rw-r--r--src/login/lclif.p.h298
-rw-r--r--src/login/login.c73
-rw-r--r--src/login/login.h1
-rw-r--r--src/login/packets_ac_struct.h156
-rw-r--r--src/login/packets_ca_struct.h239
-rw-r--r--src/map/HPMmap.c3
-rw-r--r--src/map/Makefile.in10
-rw-r--r--src/map/achievement.c9
-rw-r--r--src/map/atcommand.c128
-rw-r--r--src/map/atcommand.h6
-rw-r--r--src/map/battle.c47
-rw-r--r--src/map/battle.h32
-rw-r--r--src/map/buyingstore.c6
-rw-r--r--src/map/chat.c12
-rw-r--r--src/map/chrif.c4
-rw-r--r--src/map/clif.c1996
-rw-r--r--src/map/clif.h171
-rw-r--r--src/map/guild.c6
-rw-r--r--src/map/guild.h2
-rw-r--r--src/map/homunculus.c4
-rw-r--r--src/map/homunculus.h2
-rw-r--r--src/map/instance.c9
-rw-r--r--src/map/intif.c98
-rw-r--r--src/map/intif.h8
-rw-r--r--src/map/itemdb.c36
-rw-r--r--src/map/itemdb.h8
-rw-r--r--src/map/log.c4
-rw-r--r--src/map/log.h2
-rw-r--r--src/map/mail.c6
-rw-r--r--src/map/map.c163
-rw-r--r--src/map/map.h123
-rw-r--r--src/map/mapdefines.h103
-rw-r--r--src/map/messages_ad.h3
-rw-r--r--src/map/messages_main.h329
-rw-r--r--src/map/messages_re.h329
-rw-r--r--src/map/messages_sak.h3
-rw-r--r--src/map/messages_zero.h317
-rw-r--r--src/map/mob.c374
-rw-r--r--src/map/mob.h57
-rw-r--r--src/map/npc.c303
-rw-r--r--src/map/npc.h31
-rw-r--r--src/map/packets.h89
-rw-r--r--src/map/packets_keys_main.h34
-rw-r--r--src/map/packets_keys_zero.h29
-rw-r--r--src/map/packets_shuffle_main.h65
-rw-r--r--src/map/packets_shuffle_re.h32
-rw-r--r--src/map/packets_shuffle_zero.h31
-rw-r--r--src/map/packets_struct.h799
-rw-r--r--src/map/party.c6
-rw-r--r--src/map/pc.c159
-rw-r--r--src/map/pc.h127
-rw-r--r--src/map/pet.c39
-rw-r--r--src/map/pet.h4
-rw-r--r--src/map/quest.c44
-rw-r--r--src/map/quest.h34
-rw-r--r--src/map/refine.c669
-rw-r--r--src/map/refine.h148
-rw-r--r--src/map/refine.p.h144
-rw-r--r--src/map/rodex.c100
-rw-r--r--src/map/rodex.h4
-rw-r--r--src/map/script.c1359
-rw-r--r--src/map/script.h39
-rw-r--r--src/map/searchstore.c4
-rw-r--r--src/map/searchstore.h2
-rw-r--r--src/map/skill.c78
-rw-r--r--src/map/skill.h2
-rw-r--r--src/map/status.c326
-rw-r--r--src/map/status.h82
-rw-r--r--src/map/storage.c4
-rw-r--r--src/map/stylist.c228
-rw-r--r--src/map/stylist.h69
-rw-r--r--src/map/trade.c32
-rw-r--r--src/map/unit.c11
-rw-r--r--src/map/unit.h10
-rw-r--r--src/plugins/HPMHooking.c5
-rw-r--r--src/plugins/HPMHooking.h10
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc462
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc34
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc10
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc237
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.sources.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc18
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc109
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.sources.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc449
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc116
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc3117
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc5
-rw-r--r--src/plugins/db2sql.c4
-rw-r--r--src/plugins/sample.c32
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl3
-rw-r--r--tools/HPMHookGen/doxygen.conf4
-rwxr-xr-xtools/ci/travis.sh8
-rw-r--r--tools/install_mariadb.bat7
-rwxr-xr-xtools/itemdbconverter.pl6
-rw-r--r--tools/setup_mariadb.ps190
-rw-r--r--vcproj-12/map-server.vcxproj5
-rw-r--r--vcproj-12/map-server.vcxproj.filters15
-rw-r--r--vcproj-14/map-server.vcxproj5
-rw-r--r--vcproj-14/map-server.vcxproj.filters15
-rw-r--r--vcproj-15/char-server.vcxproj2
-rw-r--r--vcproj-15/login-server.vcxproj2
-rw-r--r--vcproj-15/map-server.vcxproj7
-rw-r--r--vcproj-15/map-server.vcxproj.filters17
-rw-r--r--vcproj-15/plugin-HPMHooking_char.vcxproj2
-rw-r--r--vcproj-15/plugin-HPMHooking_login.vcxproj2
-rw-r--r--vcproj-15/plugin-HPMHooking_map.vcxproj2
-rw-r--r--vcproj-15/plugin-sample.vcxproj2
298 files changed, 30485 insertions, 5193 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ad4a20bf8..72dbcf1d2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -281,96 +281,6 @@ zero-2018:clang-7:
- ./tools/ci/travis.sh build CC=clang-7 --enable-debug --enable-Werror --enable-buildbot --enable-packetver-zero --enable-packetver=20180511
- ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-pre_re:gcc-4.6:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: secondary
- image: debian:wheezy
- services:
- - mysql:5.5
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-4.6 mysql-client libmysqlclient-dev
- SQLHOST: mysql
- script:
- - ./tools/ci/travis.sh build CC=gcc-4.6 --enable-debug --enable-Werror --enable-buildbot --disable-renewal
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
-re:gcc-4.6:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: secondary
- image: debian:wheezy
- services:
- - mysql:5.5
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-4.6 mysql-client libmysqlclient-dev
- SQLHOST: mysql
- script:
- - ./tools/ci/travis.sh build CC=gcc-4.6 --enable-debug --enable-Werror --enable-buildbot
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
-zero-2018:gcc-4.6:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: clients
- image: debian:wheezy
- services:
- - mysql:5.5
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-4.6 mysql-client libmysqlclient-dev
- SQLHOST: mysql
- script:
- - ./tools/ci/travis.sh build CC=gcc-4.6 --enable-debug --enable-Werror --enable-buildbot --enable-packetver-zero --enable-packetver=20180511
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
-pre_re:gcc-4.7:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: secondary
- image: debian:wheezy
- services:
- - mysql:5.5
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-4.7 mysql-client libmysqlclient-dev
- SQLHOST: mysql
- script:
- - ./tools/ci/travis.sh build CC=gcc-4.7 --enable-debug --enable-Werror --enable-buildbot --disable-renewal
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
-re:gcc-4.7:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: secondary
- image: debian:wheezy
- services:
- - mysql:5.5
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-4.7 mysql-client libmysqlclient-dev
- SQLHOST: mysql
- script:
- - ./tools/ci/travis.sh build CC=gcc-4.7 --enable-debug --enable-Werror --enable-buildbot
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
-zero-2018:gcc-4.7:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: clients
- image: debian:wheezy
- services:
- - mysql:5.5
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-4.7 mysql-client libmysqlclient-dev
- SQLHOST: mysql
- script:
- - ./tools/ci/travis.sh build CC=gcc-4.7 --enable-debug --enable-Werror --enable-buildbot --enable-packetver-zero --enable-packetver=20180511
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
pre_re:gcc-4.8:
<<: *branch_exceptions
<<: *prerequisites
@@ -461,51 +371,6 @@ zero-2018:gcc-4.9:
- ./tools/ci/travis.sh build CC=gcc-4.9 --enable-debug --enable-Werror --enable-buildbot --enable-packetver-zero --enable-packetver=20180511
- ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-pre_re:gcc-5:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: secondary
- image: debian:unstable
- services:
- - mariadb:10
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-5 mariadb-client libmariadbclient-dev-compat
- SQLHOST: mariadb
- script:
- - ./tools/ci/travis.sh build CC=gcc-5 --enable-debug --enable-Werror --enable-buildbot --disable-renewal
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
-re:gcc-5:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: secondary
- image: debian:unstable
- services:
- - mariadb:10
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-5 mariadb-client libmariadbclient-dev-compat
- SQLHOST: mariadb
- script:
- - ./tools/ci/travis.sh build CC=gcc-5 --enable-debug --enable-Werror --enable-buildbot
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
-zero-2018:gcc-5:
- <<: *branch_exceptions
- <<: *prerequisites
- stage: clients
- image: debian:unstable
- services:
- - mariadb:10
- variables:
- <<: *base_vars
- INSTALL_PACKAGES: gcc-5 mariadb-client libmariadbclient-dev-compat
- SQLHOST: mariadb
- script:
- - ./tools/ci/travis.sh build CC=gcc-5 --enable-debug --enable-Werror --enable-buildbot --enable-packetver-zero --enable-packetver=20180511
- - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST
-
pre_re:gcc-6:
<<: *branch_exceptions
<<: *prerequisites
diff --git a/.travis.yml b/.travis.yml
index 80cf67145..db794efe2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,7 @@ install:
before_script:
- uname -a
+ - ulimit -c unlimited -S
- ./tools/ci/travis.sh createdb ragnarok root
- ./tools/ci/travis.sh importdb ragnarok root
- ./tools/ci/travis.sh adduser ragnarok travis travis root
@@ -38,25 +39,27 @@ matrix:
- compiler: false
include:
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20181031 --enable-packetver-re --enable-buildbot" HPM="1"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20190530 --enable-packetver-re --enable-buildbot" HPM="1"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
+ - gdb
- gcc-6
- doxygen
- libxml-simple-perl
- libxml-sax-perl
- libxml-parser-perl
- compiler: clang
- env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20181031 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20190530 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
packages:
+ - gdb
- clang-5.0
- compiler: clang
env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --disable-renewal --enable-Werror --enable-buildbot"
@@ -66,15 +69,27 @@ matrix:
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
packages:
+ - gdb
- clang-5.0
- compiler: clang
- env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20181031 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20190530 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
- ubuntu-toolchain-r-test
packages:
+ - gdb
+ - clang-4.0
+ - compiler: clang
+ env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20130724 --enable-packetver-re --enable-buildbot"
+ addons:
+ apt:
+ sources:
+ - llvm-toolchain-trusty-4.0
+ - ubuntu-toolchain-r-test
+ packages:
+ - gdb
- clang-4.0
- compiler: clang
env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --disable-renewal --enable-Werror --enable-buildbot"
@@ -84,22 +99,24 @@ matrix:
- llvm-toolchain-trusty-4.0
- ubuntu-toolchain-r-test
packages:
+ - gdb
- clang-4.0
- compiler: clang
env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-buildbot"
- compiler: clang
env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot"
- compiler: gcc
- env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20181031 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20190530 --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-packetver=20181031 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20190530 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
+ - gdb
- gcc-5
- compiler: gcc
env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --disable-renewal --enable-Werror --enable-buildbot"
@@ -108,14 +125,16 @@ matrix:
sources:
- ubuntu-toolchain-r-test
packages:
+ - gdb
- gcc-5
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20181031 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20190530 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
+ - gdb
- gcc-6
- compiler: gcc
env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --disable-renewal --enable-Werror --enable-buildbot"
@@ -124,7 +143,44 @@ matrix:
sources:
- ubuntu-toolchain-r-test
packages:
+ - gdb
- gcc-6
+ - compiler: gcc
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20190530 --enable-packetver-re --enable-buildbot"
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gdb
+ - gcc-7
+ - compiler: gcc
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-7 --disable-manager --disable-renewal --enable-Werror --enable-buildbot"
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gdb
+ - gcc-7
+ - compiler: gcc
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20190530 --enable-packetver-re --enable-buildbot"
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gdb
+ - gcc-8
+ - compiler: gcc
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --disable-renewal --enable-Werror --enable-buildbot"
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gdb
+ - gcc-8
notifications:
email: false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index deaac9752..00251f987 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,251 @@ and this project does not adhere to [Semantic Versioning](http://semver.org/spec
If you are reading this in a text editor, simply ignore this section
-->
+## [v2019.05.05+4] `May 5 2019` `PATCH 4`
+
+### Fixed
+
+- Fixed a reading error in refine database caused refine chances to be incorrectly read. (#2481)
+
+## [v2019.05.05+3] `May 5 2019` `PATCH 3`
+
+### Fixed
+
+- Fixed a calculation error in the ASPD (and/or other substats) when the maximum stats have values higher than default. (#2419)
+- Fixed a parsing error in the HPM Hooks Generator. (#2467)
+
+## [v2019.05.05+2] `May 5 2019` `PATCH 2`
+
+### Fixed
+
+- Fixed a packet generation issue that caused the Guild Storage to appear empty. (#2464, issue #2463)
+- Fixed use of `ZC_SE_PC_BUY_CASHITEM_RESULT` on old packet versions that didn't support it. (#2465)
+
+## [v2019.05.05+1] `May 5 2019` `PATCH 1`
+
+### Fixed
+
+- Fixed an issue in the player name packet causing names not to be sent correctly. (#2460, issue #2459)
+- Fixed a null pointer error on MVP drops. (#2461)
+
+## [v2019.05.05] `May 5 2019`
+
+### Added
+
+- Added `consolemes()` script function which allow the script engine to print error, warning, status, debug and info messages to the console. (part of #2440)
+- Added the item combo effect for Geffenia Tomb of Water (2161) and La'cryma Stick (1646). (#2441, issue #1982)
+- Added support for mobs to drop items with Random Options. See the new database file `db/option_drop_group.conf` and the new optional syntax in the drop entries of `mob_db.conf`. (#2309)
+- Added a global function `F_MesItemInfo()`, to print an item name with description link, formatted for the current client version. (#2068)
+- Added/updated packets, encryption keys and message tables for clients up to 2019-05-02. (#2432)
+- Added a new function `clif_selforarea()` to send packets to self, falling back to area when no target is specified. (part of #2432)
+- Added script commands `getunittitle()` and `setunittitle()`, and the related information in the `unit_data` structure. (part of #2432)
+- Added support for players to automatically reject party invites through the party options. (part of #2432)
+- Added an option to automatically drop the connection on the server side when a character is kicked. See `drop_connection_on_quit` in `client.conf` (note: the previous behavior was equivalent to `true`). (part of #2432)
+- Added an option to force character save when the party options are changed. See `save_settings` in `map-server.conf`. (part of #2432)
+- Added the script command `closeroulette()` and the related packet `ZC_ACK_CLOSE_ROULETTE` to close the roulette window. (part of #2432)
+- Added a missing `CSBR_BUSY` value to `enum CASH_SHOP_BUY_RESULT`. (part of #2432)
+- Added support for the refinery UI. See the new `refine_db.conf` changes and the settings `enable_refinery_ui` and `replace_refine_npcs` in `features.conf` to toggle between the new UI and the previous scripted refiner. (#2446)
+- Added a new `SkillInfo` flag `HiddenTrap`, to make certain traps invisible, according to the `trap_options` configuration flag. The default settings have changed to match Renewal. Pre-renewal users might want to review `trap_options` and the now superseded `traps_setting`. (#2232, issues #1927 and #1928)
+
+### Changed
+
+- Extended `@dropall` to accept an optional argument for item type (#2439).
+- Updated copyright header in the configuration files for year 2019. (part of #2452)
+- Extended the `getinventorylist()` script command to return an array `@inventorylist_favorite`, set to true when the item is located in the favorite tab. (#2426)
+- Split the function `clif_blname_ack()` into bl type-specific functions. (part of #2432)
+- Extended `getunitdata()` and `setunitdata()` with support for the group ID (`UDT_GROUP`), and added the related information in the `unit_data` structure. (part of #2432)
+- Moved the `UDT_*` constants from `constants.conf` to `script.c`. (part of #2432)
+- Extended the guild expulsion information to include the character ID for supported client versions. This includes a database migration. (part of #2432)
+- Disabled packet validation in `socket_datasync()`. (part of #2432)
+- Moved the refine database and refine related functions to a new `refine.c` file. A public and private interface is provided, with public database accessors `refine->get_bonus()` and `refine->get_randombonus_max()`. (part of #2446)
+- Changed several battle calculation limits to be configurable through `battle/limits.conf` and no longer hardcoded. Several `status_data` fields and battle functions now use `int` instead of `short` to accommodate this change. (#2419)
+- Changed the `unitwarp()` script command to allow NPCs to be relocated to non-walkable cells (like `movenpc()`). (#2453)
+
+### Fixed
+
+- Corrected MSVC version naming in console (#2450).
+- Corrected an example using a sprite number instead of a constant in README.md. (#2449)
+- Fixed an issue in a monster death label callback in `npc/custom/events/mushroom_event.txt` when the monster is killed without an attached player. (#2442, issue #1955)
+- Fixed an issue where when a chat room handler leaves, the following leader won't be checked for `cell_chknochat` and will bypass it. (#2443, issue #1569)
+- Corrected the documentation for `pincode.enabled` in the char-server configuration. (part of #2452)
+- Fixed an incorrectly displayed ITEMLINK entry in the OldGlastHeim script. (part of #2068)
+- Fixed a packet size underflow in the storage packet for certain client versions. (#2424)
+- Fixed an issue that caused named/brewed/forged items to be saved to database with the wrong character ID. Database migrations are provided, to update the existing data. (#2425, issue #2409)
+- Fixed a truncated title in the inventory window. (part of #2432)
+- Fixed a possible overflow in the guild member login field (only supporting timestamps until 2036-12-31). (part of #2432)
+- Fixed a compile error with old packet versions. (part of #2432, issue #2438)
+- Fixed a potential exploit related to the vending skill, by adding stricter validation on the vending status flags. (part of #2432)
+- Fixed a regression, restoring the ability for HPM Hooks to hook into private interfaces, through the new macros `addHookPrePriv()` and `addHookPostPriv()`. (#2447)
+- Fixed a zeny loss caused by the inter-server deleting zeny from messages when the user only requests to take items. (#2455)
+- Fixed a compatibility issue with Perl 5.26 in the item converter script. (#2444)
+- Fixed various gitlab-ci build failures, by removing some no longer supported debian versions and packages. The gcc-4.6, gcc-4.7 and gcc-5 builds have been removed. (#2458)
+
+### Deprecated
+
+- Deprecated the script command `debugmes()`, superseded by `consolemes()`. (part of #2440)
+
+### Removed
+
+- Removed the superseded `traps_setting` configuration flag, replaced by `trap_options`. (part of #2232)
+
+## [v2019.04.07+1] `April 7 2019` `PATCH 1`
+
+### Fixed
+
+- Fixed some race conditions and missing validation in the item and zeny handling code for RODEX. (#2437)
+- Fixed pet eggs getting lost for pets that were hatched before the pet evolution system. Pets are now automatically migrated to the new system that keeps eggs in the user's inventory. (#2428)
+
+## [v2019.04.07] `April 7 2019`
+
+### Added
+
+- Added a configuration flag to disable the achievement system even then it's supported by the current client version. See `features/enable_achievement_system` in `battle/feature.conf`. (#2170)
+- Added the `PETINFO_*` constants, to be used with `getpetinfo()`. (part of #2398)
+- Added/updated packets, encryption keys and message tables for clients up to 2019-04-03. (#2406)
+- Added support for the `ZC_PING` and `CZ_PING` packets. (part of #2406)
+- Added support for the `CZ_COOLDOWN_RESET` packet and the related `/resetcooltime` client command. (part of #2406)
+- Added support for the "allow call" player configuration option. (part of #2406)
+- Added support to open the macro UI in the client. (part of #2406)
+- Added support for the `CZ_STYLE_CLOSE` packet. (part of #2406)
+- Exposed the `MAX_ITEM_ID` constant to the script engine. (#2367)
+
+### Changed
+
+- Extended `getinventorylist()` to return the item's inventory index in the `@inventorylist_idx[]` array. (#2401)
+- Extended `gettimestr()` to accept an optional argument providing a UNIX timestamp, as returned for example by `getcalendartime()`. (#2388)
+- Extended `getpetinfo()` to include information previously returned by `petstat()`. (#2398)
+- Renamed `clif_charnameack()` to the more accurate `clif_blname_ack()`. (part of #2406)
+- Extended `showscript()` to accept an optional argument to specify the send target. (#2415)
+- Updated `README.md` to include links to the sections. (#2354)
+
+### Fixed
+
+- Fixed a compilation error in the sample plugin, on systems where `rand()` is not available. (#2403)
+- Fixed a visual glitch caused by `setunitdata(UDT_LEVEL, ...)` not updating the monster level, when `show_mob_info` is configured to display it. (#2408)
+- Fixed the `features/enable_pet_autofeed` configuration value that was ignored and `features/enable_homunculus_autofeed` was used instead. (#2417)
+- Fixed an unescaped string in the db2sql generated data for the mob skill database. (#2416, related to #2407)
+- Fixed some possible null pointer warnings reported by gcc. (part of #2406)
+- Fixed a client crash with `@bodystyle` and `Job_Super_Novice_E`. (part of #2402, related to #2383)
+- Fixed a client crash when using `@jobchange` to a class that doesn't support alternate body styles while a body style is applied. (#2402)
+
+### Deprecated
+
+- Deprecated the command `petstat()`, superseded by `getpetinfo()`. (part of #2398)
+- Deprecated the `PET_*` constants, used by the `petstat()` command. (part of #2398)
+
+## [v2019.03.10] `March 10 2019`
+
+### Added
+
+- Added `MOB_CLONE_START` and `MOB_CLONE_END` to the constants available to the script engine. (#2390)
+- Added crash dumps to the Travis-CI output in case one of the servers crashes during the tests. (#2385)
+- Added gcc-7 and gcc-8 builds to Travis-CI. (part of #2385)
+- Added a configuration setting `magicrod_type` (`skill.conf`) to restore the old eAthena behavior for the Magic Rod skill. (#2034)
+- Added some missing information to the documentation for `bg_create_team()` and `waitingroom2bg()`, to remove the automatic respawn. (#2381)
+- Added the `MERCINFO_*` constants to the script engine, for `getmercinfo()`. (#2397)
+- Added support for `MERCINFO_GID` to `getmercinfo()`. (#2397)
+- Added the script commands `mobattached()` and `killmonstergid()`. (#2396)
+- Added/updated packets, encryption keys and message tables for clients up to 2019-03-06. (#2377)
+- Added a missing value into enum `BATTLEGROUNDS_QUEUE_ACK`. (part of #2377)
+
+### Changed
+
+- Changed the Windows SDK from version 10.0.15063.0 into 10.0.17763.0 for Visual Studio 2017. (#2368)
+- Changed the return value of `getunitdata()` from `0` to `-1` in case the requested value couldn't be retrieved, in order to differentiate between a zero and an invalid value. Note: this may break existing scripts. (#2392)
+- Updated the `getunitdata()` and `setunitdata()` documentation to clarify that the command only handles integer values. (#2391)
+- Added the function `connect_client()` into the socket interface. (#2378)
+- Moved the variable `SOCKET_CONF_FILENAME` to the socket interface. (#2378)
+- Moved local variables from `atcommand.c` to the interface. (#2378)
+- Moved defines from `map.h` to `mapdefines.h` to remove an inclusion loop. (#2378)
+- Moved the stylist-related functions to their own interface. (#2400)
+
+### Fixed
+
+- Fixed some typos in the item bonus documentation. (#2376)
+- Fixed a typo in the `setpcblock()` documentation. (c9bab97108)
+- Fixed a missing return value in `F_GetTradeRestriction()`. (#2360)
+- Fixed the return value of `bg_create_team()` to be -1 in case of failure, as described in the documentation. (part of #2381)
+- Fixed the date field in the member list packet. (part of #2377)
+- Fixed the documentation for `needed_status_point()`, not supporting the `char_id` argument. (#2399)
+
+### Deprecated
+
+- Deprecated the `UDT_MAPIDXY` constant. Its use in `setunitdata()` is replaced by `unitwarp()` and its use in `getunitdata()` is replaced by `getmapxy()`. (#2391)
+- Deprecated the `UDT_WALKTOXY` constant. Its use in `setunitdata()` is replaced by `unitwalk()`. (#2391)
+
+## [v2019.02.10+1] `February 10 2019` `PATCH 1`
+
+### Fixed
+
+- Fixed a buffer size issue in inter server packets (#2370, issue #2369)
+
+## [v2019.02.10] `February 10 2019`
+
+### Added
+
+- Added/updated packets, encryption keys and message tables for clients up to 2019-01-09. (#2339)
+- Added support for the barter type shops. See `sellitem()`, `NST_BARTER` and the demo scripts in `doc/sample/npc_trader_sample.txt` and `npc/custom/bartershop.txt`. (part of #2339)
+- Added the `countnameditem()` script command. (#2307)
+- Added/updated packets, encryption keys and message tables for clients up to 2019-01-30. (#2353)
+
+### Changed
+
+- Improved the response codes and error messages related to the login/char server authentication. (#2151, issue #737)
+- Changed the character creation to use `FIXED_INVENTORY_SIZE` as default inventory size instead of relying on the SQL table default value. (part of #2353)
+- Changed the type of several variables from `short` to `int`. (#2364)
+
+### Fixed
+
+- Fixed a bug that caused the custom disguise event to run indefinitely. (#2351)
+- Fixed issues (item db loading, item search by name) for item IDs higher than 65535. (#2337)
+- Fixed an issue while sending the last page of `HC_ACK_CHARINFO_PER_PAGE`. (part of #2339)
+- Fixed the minimum duration of Voice of Siren. (#1631)
+- Fixed the Sura Job Change Quest getting stuck after the first attempt. (#1656, issue #1655)
+- Added support for recent MySQL versions that don't define the `my_bool` type. (#2365, issue #2363)
+
+## [v2018.12.16+1] `December 16 2018` `PATCH 1`
+
+### Fixed
+
+- Added a missing check in `run_script_main()`. (#2362)
+
+## [v2018.12.16] `December 16 2018`
+
+### Added
+
+- Added/updated packets, encryption keys and message tables for clients up to 2018-12-12. (#2324)
+- Added support for the `AC_LOGIN_OTP` packets. (part of #2324)
+- Added script command `enchantitem()` and related packet `ZC_ENCHANT_EQUIPMENT`. (part of #2324)
+- Added script command `servicemessage()` and related packet `ZC_SERVICE_MESSAGE_COLOR`. (part of #2324)
+- Split packets struct definitions out from lclif into separate files for AC and CA packets. (part of #2324)
+- Added struct definitions header for HC packets. (part of #2324)
+- Added support for expandable inventory size, including database persistence, inventory expansion packets, the script commands `expandInventoryAck()`, `expandInventoryResult()`, `expandInventory()`, `getInventorySize()`, the item `Inventory_Extension_Coupon` and the script `npc/other/inventory_expansion.txt`. (part of #2324)
+- Added support for the client commands `/viewpointvalue` and `/setcamera` (like `@camerainfo`). The atcommand aliases `@setcamera` and `@viewpointvalue` are also provided. (part of #2324)
+- Added `needed_status_point()` script function and the global function `F_CashReduceStat()`, for permanent status point reduction. (#2246)
+- Added an option to include script interaction into the idle criteria, disabled by default. See `idletime_criteria` in `conf/map/battle/player.conf` and `BCIDLE_SCRIPT`. (#2244)
+
+### Changed
+
+- Extended support for 32 bit item IDs to the Zero and Main clients that support them. (part of #2324)
+- Renamed packet identifier macros from `PACKET_ID_*` to `HEADER_*`. (part of #2324)
+- Renamed packet struct definitions from `packet_*` to `PACKET_*`. (part of #2324)
+- Increased `MAX_PACKET_LOGIN_DB` to `0x0AD0` to match the existing packets. (part of #2324)
+- Added buffer size validation for `char_mmo_char_tobuf`. (part of #2324)
+- Updated `npc/woe-se` files to modern standards, including `mes()` and `mesf()`. (#2261)
+- Changed HPMDataCheck to exclude packetver-specific packet structs that would cause compile-time errors. (794ce3c89497a17bd64eacbc82bce22f07f00acb)
+
+### Fixed
+
+- Fixed `getunits()` returning the wrong value if no area size is passed. (41d370cd3308be48b4ce00a50ee46515742978b0, issue #2330)
+- Fixed support for old (2010 and older) clients in packet `ZC_PROPERTY_HOMUN`. (part of #2324)
+- Fixed Gaia Sword not granting any bonus drops. This reworks the way `s_add_drop` differentiates between items and groups and the parameters passed to `pc_bonus_item_drop()`. Custom code may need to be updated to match. (#2327)
+- Fixed a 'Gungslinger' typo in `item_db2`. (#2335)
+- Fixed delay-consumed items missing consumption after using Abracadabra/Improvised Song (#2298, issue #1169)
+
+### Removed
+
+- Removed unnecessary typedef from `clr_type`. The type is now only available as `enum clr_type`. (part of #2324)
+
## [v2018.11.18+1] `November 18 2018` `PATCH 1`
### Fixed
@@ -523,6 +768,19 @@ If you are reading this in a text editor, simply ignore this section
- New versioning scheme and project changelogs/release notes (#1853)
[Unreleased]: https://github.com/HerculesWS/Hercules/compare/stable...master
+[v2019.05.05+4]: https://github.com/HerculesWS/Hercules/compare/v2019.05.05+3...v2019.05.05+4
+[v2019.05.05+3]: https://github.com/HerculesWS/Hercules/compare/v2019.05.05+2...v2019.05.05+3
+[v2019.05.05+2]: https://github.com/HerculesWS/Hercules/compare/v2019.05.05+1...v2019.05.05+2
+[v2019.05.05+1]: https://github.com/HerculesWS/Hercules/compare/v2019.05.05...v2019.05.05+1
+[v2019.05.05]: https://github.com/HerculesWS/Hercules/compare/v2019.04.07+1...v2019.05.05
+[v2019.04.07+1]: https://github.com/HerculesWS/Hercules/compare/v2019.04.07...v2019.04.07+1
+[v2019.04.07]: https://github.com/HerculesWS/Hercules/compare/v2019.03.10...v2019.04.07
+[v2019.03.10]: https://github.com/HerculesWS/Hercules/compare/v2019.02.10+1...v2019.03.10
+[v2019.02.10+1]: https://github.com/HerculesWS/Hercules/compare/v2019.02.10...v2019.02.10+1
+[v2019.02.10]: https://github.com/HerculesWS/Hercules/compare/v2018.12.16+1...v2019.02.10
+[v2018.12.16+1]: https://github.com/HerculesWS/Hercules/compare/v2018.12.16...v2018.12.16+1
+[v2018.12.16]: https://github.com/HerculesWS/Hercules/compare/v2018.11.18+1...v2018.12.16
+[v2018.11.18+1]: https://github.com/HerculesWS/Hercules/compare/v2018.11.18...v2018.11.18+1
[v2018.11.18]: https://github.com/HerculesWS/Hercules/compare/v2018.10.21...v2018.11.18
[v2018.10.21]: https://github.com/HerculesWS/Hercules/compare/v2018.09.23...v2018.10.21
[v2018.09.23]: https://github.com/HerculesWS/Hercules/compare/v2018.08.26+1...v2018.09.23
diff --git a/Hercules.xcodeproj/project.pbxproj b/Hercules.xcodeproj/project.pbxproj
index 1126c3780..403e7357a 100644
--- a/Hercules.xcodeproj/project.pbxproj
+++ b/Hercules.xcodeproj/project.pbxproj
@@ -164,6 +164,8 @@
A5BBC249219D076900E26B8D /* packets.c in Sources */ = {isa = PBXBuildFile; fileRef = A5BBC218219D076900E26B8D /* packets.c */; };
A5BBC251219D081800E26B8D /* packets.c in Sources */ = {isa = PBXBuildFile; fileRef = A5BBC218219D076900E26B8D /* packets.c */; };
A5BBC252219D081900E26B8D /* packets.c in Sources */ = {isa = PBXBuildFile; fileRef = A5BBC218219D076900E26B8D /* packets.c */; };
+ A5C5CF5F227F959700485106 /* refine.c in Sources */ = {isa = PBXBuildFile; fileRef = A5C5CF59227F959600485106 /* refine.c */; };
+ A5C5CF60227F959700485106 /* stylist.c in Sources */ = {isa = PBXBuildFile; fileRef = A5C5CF5A227F959600485106 /* stylist.c */; };
A5F7946C191CA34E002293AB /* sysinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A5F79469191CA34E002293AB /* sysinfo.c */; };
A5F7946D191CA34E002293AB /* sysinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A5F79469191CA34E002293AB /* sysinfo.c */; };
A5F7946E191CA34E002293AB /* sysinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A5F79469191CA34E002293AB /* sysinfo.c */; };
@@ -494,6 +496,15 @@
A5BBC24E219D07A800E26B8D /* messages_ad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = messages_ad.h; path = src/map/messages_ad.h; sourceTree = SOURCE_ROOT; };
A5BBC24F219D07A800E26B8D /* messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = messages.h; path = src/map/messages.h; sourceTree = SOURCE_ROOT; };
A5BBC250219D07A800E26B8D /* messages_sak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = messages_sak.h; path = src/map/messages_sak.h; sourceTree = SOURCE_ROOT; };
+ A5C5CF56227F955100485106 /* packets_ac_struct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packets_ac_struct.h; path = src/login/packets_ac_struct.h; sourceTree = SOURCE_ROOT; };
+ A5C5CF57227F955100485106 /* packets_ca_struct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packets_ca_struct.h; path = src/login/packets_ca_struct.h; sourceTree = SOURCE_ROOT; };
+ A5C5CF58227F956900485106 /* packets_hc_struct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packets_hc_struct.h; path = src/char/packets_hc_struct.h; sourceTree = SOURCE_ROOT; };
+ A5C5CF59227F959600485106 /* refine.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = refine.c; path = src/map/refine.c; sourceTree = SOURCE_ROOT; };
+ A5C5CF5A227F959600485106 /* stylist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stylist.c; path = src/map/stylist.c; sourceTree = SOURCE_ROOT; };
+ A5C5CF5B227F959700485106 /* stylist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stylist.h; path = src/map/stylist.h; sourceTree = SOURCE_ROOT; };
+ A5C5CF5C227F959700485106 /* refine.p.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = refine.p.h; path = src/map/refine.p.h; sourceTree = SOURCE_ROOT; };
+ A5C5CF5D227F959700485106 /* mapdefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mapdefines.h; path = src/map/mapdefines.h; sourceTree = SOURCE_ROOT; };
+ A5C5CF5E227F959700485106 /* refine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = refine.h; path = src/map/refine.h; sourceTree = SOURCE_ROOT; };
A5F79468191CA34E002293AB /* HPMDataCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPMDataCheck.h; path = src/common/HPMDataCheck.h; sourceTree = "<group>"; };
A5F79469191CA34E002293AB /* sysinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysinfo.c; path = src/common/sysinfo.c; sourceTree = "<group>"; };
A5F7946A191CA34E002293AB /* sysinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sysinfo.h; path = src/common/sysinfo.h; sourceTree = "<group>"; };
@@ -607,6 +618,8 @@
A56CC68618564387009EB79C /* login.h */,
A56CC68718564387009EB79C /* loginlog.c */,
A56CC68818564387009EB79C /* loginlog.h */,
+ A5C5CF56227F955100485106 /* packets_ac_struct.h */,
+ A5C5CF57227F955100485106 /* packets_ca_struct.h */,
);
path = "login-server";
sourceTree = "<group>";
@@ -652,6 +665,7 @@
A5467AD21A16FCB4008AFAA6 /* loginif.h */,
A5467AD41A16FCDC008AFAA6 /* mapif.c */,
A5467AD51A16FCDC008AFAA6 /* mapif.h */,
+ A5C5CF58227F956900485106 /* packets_hc_struct.h */,
A56CC75B185657D9009EB79C /* pincode.c */,
A56CC75C185657D9009EB79C /* pincode.h */,
);
@@ -708,6 +722,7 @@
A56CC78F18565812009EB79C /* mail.h */,
A56CC79018565812009EB79C /* map.c */,
A56CC79118565812009EB79C /* map.h */,
+ A5C5CF5D227F959700485106 /* mapdefines.h */,
A56CC79218565812009EB79C /* mapreg_sql.c */,
A56CC79318565812009EB79C /* mapreg.h */,
A56CC79418565812009EB79C /* mercenary.c */,
@@ -742,6 +757,9 @@
A56CC7A618565812009EB79C /* pet.h */,
A56CC7A718565812009EB79C /* quest.c */,
A56CC7A818565812009EB79C /* quest.h */,
+ A5C5CF59227F959600485106 /* refine.c */,
+ A5C5CF5E227F959700485106 /* refine.h */,
+ A5C5CF5C227F959700485106 /* refine.p.h */,
755495851FEE5A1F00CE4B7D /* rodex.c */,
755495861FEE5A1F00CE4B7D /* rodex.h */,
A56CC7A918565812009EB79C /* script.c */,
@@ -754,6 +772,8 @@
A56CC7B018565812009EB79C /* status.h */,
A56CC7B118565812009EB79C /* storage.c */,
A56CC7B218565812009EB79C /* storage.h */,
+ A5C5CF5A227F959600485106 /* stylist.c */,
+ A5C5CF5B227F959700485106 /* stylist.h */,
A56CC7B318565812009EB79C /* trade.c */,
A56CC7B418565812009EB79C /* trade.h */,
A56CC7B518565812009EB79C /* unit.c */,
@@ -1385,11 +1405,13 @@
A56CC7BF18565812009EB79C /* clif.c in Sources */,
A5F7946E191CA34E002293AB /* sysinfo.c in Sources */,
A56CC7D018565812009EB79C /* npc_chat.c in Sources */,
+ A5C5CF5F227F959700485106 /* refine.c in Sources */,
A56CC6CE185643BB009EB79C /* console.c in Sources */,
A56CC73018564C05009EB79C /* grammar.c in Sources */,
A56CC7DA18565812009EB79C /* skill.c in Sources */,
A56CC6EC185643BB009EB79C /* md5calc.c in Sources */,
A56CC73918564C05009EB79C /* scanner.c in Sources */,
+ A5C5CF60227F959700485106 /* stylist.c in Sources */,
A56CC701185643BB009EB79C /* random.c in Sources */,
A56CC7CD18565812009EB79C /* mapreg_sql.c in Sources */,
A56CC7D318565812009EB79C /* path.c in Sources */,
diff --git a/README.md b/README.md
index 1798bf394..0b4257b3b 100644
--- a/README.md
+++ b/README.md
@@ -29,14 +29,15 @@ Project Info:
Table of Contents
---------
-1. What is Hercules?
-2. Prerequisites
-3. Installation
-4. Troubleshooting
-5. Helpful Links
-6. More Documentation
-
-What is Hercules?
+1. [What is Hercules?](#what-is-hercules)
+2. [Prerequisites](#prerequisites)
+3. [Installation](#installation)
+4. [Troubleshooting](#troubleshooting)
+5. [Helpful Links](#helpful-links)
+6. [More Documentation](#more-documentation)
+
+
+## What is Hercules?
-----------------
Hercules is a collaborative software development project revolving around the
creation of a robust Massively Multiplayer Online Role-Playing Game (MMORPG)
@@ -45,20 +46,17 @@ warps and modifications. The project is jointly managed by a group of
volunteers located around the world as well as a tremendous community providing
QA and support. Hercules is a continuation of the original Athena project.
-Prerequisites
+## Prerequisites
-------------
Before installing Hercules, you will need to install certain tools and applications.
This differs between the varying Operating Systems available, so the
following list is broken down into Windows and Unix (incl. Linux) prerequisites.
-For a list of supported platforms, please refer to the [Supported
-Platforms](https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms) wiki page.
+For a list of supported platforms, please refer to the [Supported Platforms](https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms) wiki page.
#### Windows
- - Git client
- - MySQL-compatible server ([MySQL Community Edition](https://www.mysql.com/products/community/) or
- [MariaDB](https://mariadb.org/))
- - Microsoft Visual Studio ([Version 2012 through 2015](https://www.visualstudio.com/))
+ - [Git client](https://git-scm.com/)
+ - [Microsoft Visual Studio Community](https://visualstudio.microsoft.com/vs/community/)
#### Unix/Linux/BSD (names of packages may require specific version numbers on certain distributions)
- git
@@ -84,13 +82,23 @@ Platforms](https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms) wiki
- MySQL GUI clients
- [MySQL Workbench](http://www.mysql.com/downloads/workbench/) (cross-platform)
- [HeidiSQL](http://www.heidisql.com/) (Windows)
+ - [DBeaver](http://dbeaver.jkiss.org/) (cross-platform)
- [Sequel Pro](http://www.sequelpro.com/) (Mac OS X)
+ - *More options available at [mariadb.com](https://mariadb.com/kb/en/library/graphical-and-enhanced-clients/)*
- GUI Git clients
+ - [GitHub Desktop](https://desktop.github.com/) (cross-platform)
+ - [GitKraken](https://www.gitkraken.com/git-client) (cross-platform)
+ - [SmartGit](https://www.syntevo.com/smartgit/) (cross-platform)
- [Atlassian SourceTree](https://www.sourcetreeapp.com/) (Windows, Mac OS X)
- - [TortoiseGit](https://tortoisegit.org/) (Windows)
+ - *More options available at [git-scm.com](https://git-scm.com/downloads/guis)*
+ - Text editors with syntax highlighting
+ - [Visual Studio Code](https://code.visualstudio.com) (cross-platform)
+ - [Atom](https://atom.io) (cross-platform)
+ - [Notepad++](https://notepad-plus-plus.org) (Windows)
+ - *More options available at [wikipedia.org](https://en.wikipedia.org/wiki/Comparison_of_text_editors#Overview)*
-Installation
+## Installation
------------
This section is a very brief set of installation instructions. For more concise
@@ -98,42 +106,52 @@ guides relevant to your Operation System, please refer to the Wiki (links at
the end of this file).
#### Windows
+##### Easy installation
+ 1. Install the prerequisites.
+ 2. Clone the [Hercules repository](https://github.com/HerculesWS/Hercules) using a git client, into a new
+ folder.
+ - If you do not want to use the command line, you can instead clone with [GitHub Desktop](https://desktop.github.com/).
+ 3. Run `mariadb.bat` to automatically install and configure MariaDB.
+ 4. Start Visual Studio and load the provided solution:
+ - Compile and run the three projects, login-server, char-server, map-server.
+##### Manual installation
1. Install the prerequisites.
- 2. Clone the Hercules repository (see [GitHub](https://github.com/HerculesWS/Hercules)) using a git client, into a new
+ 2. Install a MySQL-compatible server, such as [MariaDB](https://mariadb.org/) (recommended) or [MySQL Community Edition](https://www.mysql.com/products/community/)
+ 3. Clone the Hercules repository [Hercules repository](https://github.com/HerculesWS/Hercules) using a git client, into a new
folder.
- 3. Connect to the MySQL server as root:
- - Create a database (hercules): `CREATE DATABASE hercules;`
- - Create a user (hercules): `CREATE USER 'hercules'@'localhost' IDENTIFIED BY 'password';`.
- - Give permissions (GRANT SELECT,INSERT,UPDATE,DELETE) to the user: `GRANT SELECT,INSERT,UPDATE,DELETE ON hercules.* TO 'hercules'@'localhost';`
- 4. Connect to the MySQL server as the new user:
- - Import the .sql files in /sql-files/ into the new database.
- 5. Start Visual Studio and load the provided solution:
- - Compile and run the three projects, login-server, char-server, map-server.
+ 4. Connect to the MySQL server as root:
+ - Create a database (hercules): `CREATE DATABASE hercules;`
+ - Create a user (hercules): `CREATE USER 'hercules'@'localhost' IDENTIFIED BY 'password';`.
+ - Give permissions (GRANT SELECT,INSERT,UPDATE,DELETE) to the user: `GRANT SELECT,INSERT,UPDATE,DELETE ON hercules.* TO 'hercules'@'localhost';`
+ 5. Connect to the MySQL server as the new user:
+ - Import the .sql files in /sql-files/ into the new database.
+ 6. Start Visual Studio and load the provided solution:
+ - Compile and run the three projects, login-server, char-server, map-server.
#### Unix
1. Install the prerequisites through your distribution's package manager
- - (Red Hat compatible / CentOS) `yum install gcc make mysql mysql-devel mysql-server pcre-devel zlib-devel git`
- - (Debian compatible) `apt-get install gcc make libmysqlclient-dev zlib1g-dev libpcre3-dev mysql-server git`
- - (FreeBSD) `pkg install clang35 gmake mysql56-server mysql-connector-c pcre git`
- - (Mac OS X):
- - Install Xcode through the Mac App Store
- - Initialize the build tools through the Terminal `xcode-select --help`
- - Install Homebrew as described on the project page
- - Install the other prerequisites: `brew install mysql pcre`
+ - (Red Hat compatible / CentOS) `yum install gcc make mysql mysql-devel mysql-server pcre-devel zlib-devel git`
+ - (Debian compatible) `apt-get install gcc make libmysqlclient-dev zlib1g-dev libpcre3-dev mysql-server git`
+ - (FreeBSD) `pkg install clang35 gmake mysql56-server mysql-connector-c pcre git`
+ - (Mac OS X):
+ - Install Xcode through the Mac App Store
+ - Initialize the build tools through the Terminal `xcode-select --help`
+ - Install Homebrew as described on the project page
+ - Install the other prerequisites: `brew install mysql pcre`
2. Clone the Hercules repository `git clone https://github.com/HerculesWS/Hercules.git ~/Hercules`
3. Configure the MySQL server and start it.
4. Connect to the MySQL server as root:
- - Create a database (hercules): `CREATE DATABASE hercules;`
- - Create a user (hercules): `CREATE USER 'hercules'@'localhost' IDENTIFIED BY 'password';`.
- - Give permissions (GRANT SELECT,INSERT,UPDATE,DELETE) to the user: `GRANT SELECT,INSERT,UPDATE,DELETE ON hercules.* TO 'hercules'@'localhost';`
+ - Create a database (hercules): `CREATE DATABASE hercules;`
+ - Create a user (hercules): `CREATE USER 'hercules'@'localhost' IDENTIFIED BY 'password';`.
+ - Give permissions (GRANT SELECT,INSERT,UPDATE,DELETE) to the user: `GRANT SELECT,INSERT,UPDATE,DELETE ON hercules.* TO 'hercules'@'localhost';`
5. Connect to the MySQL server as the new user:
- - Import the .sql files in /sql-files/ into the new database.
+ - Import the .sql files in /sql-files/ into the new database.
6. Enter the Hercules directory and configure/build Hercules
- - `./configure`
- - `make clean && make sql` (on FreeBSD, replace `make` with `gmake`)
+ - `./configure`
+ - `make clean && make sql` (on FreeBSD, replace `make` with `gmake`)
7. Start the three servers login-server, char-server, map-server.
-Troubleshooting
+## Troubleshooting
---------------
If you're having problems with starting your server, the first thing you should
@@ -148,7 +166,7 @@ Examples:
[Error]: npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file 'npc/custom/jobmaster.txt', line '17'. Skipping line...
* w1=prontera,153,193,6 script
* w2=Job Master
- * w3=123,{
+ * w3=2_F_MAGICMASTER,{
* w4=
```
@@ -179,7 +197,7 @@ Examples:
If this shows up on the map server, it generally means that there is no Char
Server available to accept the connection.
-Helpful Links
+## Helpful Links
-------------
The following list of links point to various help files within the repository,
@@ -198,7 +216,7 @@ articles or pages on the Wiki or topics within the Hercules forum.
Network: `irc.rizon.net`
Channel: `#Hercules`
-More Documentation
+## More Documentation
------------------
Hercules has a large collection of help files and sample NPC scripts located in
diff --git a/conf/atcommand.conf b/conf/atcommand.conf
index 175286eb0..871322a05 100644
--- a/conf/atcommand.conf
+++ b/conf/atcommand.conf
@@ -57,6 +57,7 @@ aliases: {
itemreset: ["clearinventory"]
channel: ["main"]
autoloottype: ["aloottype"]
+ camerainfo: ["setcamera", "viewpointvalue"]
}
/* List of commands that should not be logged at all */
diff --git a/conf/char/char-server.conf b/conf/char/char-server.conf
index 0f07731fb..e3d0fd8c0 100644
--- a/conf/char/char-server.conf
+++ b/conf/char/char-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -214,8 +214,7 @@ char_configuration: {
pincode: {
// A window is opened before you can select your character and you will have to enter a pincode by using only your mouse
// NOTE: Requires client 2011-03-09aragexeRE or newer.
- // 0: disabled
- // 1: enabled
+ // Default: true
enabled: true
// Request Pincode only on login or on everytime char select is accessed?
diff --git a/conf/clans.conf b/conf/clans.conf
index 85ef280fe..82211fce0 100644
--- a/conf/clans.conf
+++ b/conf/clans.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2017 Hercules Dev Team
+//= Copyright (C) 2017-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/common/inter-server.conf b/conf/common/inter-server.conf
index 1e738c587..d45657dca 100644
--- a/conf/common/inter-server.conf
+++ b/conf/common/inter-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -117,6 +117,7 @@ inter_configuration: {
autotrade_merchants_db: "autotrade_merchants"
autotrade_data_db: "autotrade_data"
npc_market_data_db: "npc_market_data"
+ npc_barter_data_db: "npc_barter_data"
}
}
diff --git a/conf/common/socket.conf b/conf/common/socket.conf
index 8b8b21865..eb7d494b4 100644
--- a/conf/common/socket.conf
+++ b/conf/common/socket.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/global/console.conf b/conf/global/console.conf
index 84a16a7c8..266b301b2 100644
--- a/conf/global/console.conf
+++ b/conf/global/console.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -32,36 +32,36 @@
//=========================================================================
console: {
- //Time-stamp format which will be printed before all messages.
- //Can at most be 20 characters long.
- //Common formats:
- // %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
- // %H:%M:%S (hour:minute:second, 24 hour format)
- // %d/%b/%Y (day/Month/year)
- //For full format information, consult the strftime() manual.
+ // Time-stamp format which will be printed before all messages.
+ // Can at most be 20 characters long.
+ // Common formats:
+ // %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
+ // %H:%M:%S (hour:minute:second, 24 hour format)
+ // %d/%b/%Y (day/Month/year)
+ // For full format information, consult the strftime() manual.
//timestamp_format: "[%d/%b %H:%M]"
- //If redirected output contains escape sequences (color codes)
+ // If redirected output contains escape sequences (color codes)
stdout_with_ansisequence: false
- //Makes server output more silent by omitting certain types of messages:
- //1: Hide Information messages
- //2: Hide Status messages
- //4: Hide Notice Messages
- //8: Hide Warning Messages
- //16: Hide Error and SQL Error messages.
- //32: Hide Debug Messages
- //Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
+ // Makes server output more silent by omitting certain types of messages:
+ // 1: Hide Information messages
+ // 2: Hide Status messages
+ // 4: Hide Notice Messages
+ // 8: Hide Warning Messages
+ // 16: Hide Error and SQL Error messages.
+ // 32: Hide Debug Messages
+ // Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
console_silent: 0
// [CHAR] Display information on the console whenever characters/guilds/parties/pets are loaded/saved?
save_log: true
// [MAP] Makes server log selected message types to a file in the /log/ folder
- //1: Log Warning Messages
- //2: Log Error and SQL Error messages.
- //4: Log Debug Messages
- //Example: "console_msg_log: 7" logs all 3 kinds
- //Messages logged by this overrides console_silent setting
+ // 1: Log Warning Messages
+ // 2: Log Error and SQL Error messages.
+ // 4: Log Debug Messages
+ // Example: "console_msg_log: 7" logs all 3 kinds
+ // Messages logged by this overrides console_silent setting
console_msg_log: 0
}
diff --git a/conf/global/sql_connection.conf b/conf/global/sql_connection.conf
index 3a465afea..7b1a2b97b 100644
--- a/conf/global/sql_connection.conf
+++ b/conf/global/sql_connection.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/battle.conf b/conf/import-tmpl/battle.conf
index 7d1d03578..ff05022c2 100644
--- a/conf/import-tmpl/battle.conf
+++ b/conf/import-tmpl/battle.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/char-server.conf b/conf/import-tmpl/char-server.conf
index 4c9462bc7..3162a31ad 100644
--- a/conf/import-tmpl/char-server.conf
+++ b/conf/import-tmpl/char-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/inter-server.conf b/conf/import-tmpl/inter-server.conf
index c23143b35..9cd3932f5 100644
--- a/conf/import-tmpl/inter-server.conf
+++ b/conf/import-tmpl/inter-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/login-server.conf b/conf/import-tmpl/login-server.conf
index 1c45f94f9..c8f1f8546 100644
--- a/conf/import-tmpl/login-server.conf
+++ b/conf/import-tmpl/login-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/logs.conf b/conf/import-tmpl/logs.conf
index 8f8c2ea68..47e5a665a 100644
--- a/conf/import-tmpl/logs.conf
+++ b/conf/import-tmpl/logs.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/map-server.conf b/conf/import-tmpl/map-server.conf
index 4d907025e..11e4356ba 100644
--- a/conf/import-tmpl/map-server.conf
+++ b/conf/import-tmpl/map-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/script.conf b/conf/import-tmpl/script.conf
index 040245285..042644ff1 100644
--- a/conf/import-tmpl/script.conf
+++ b/conf/import-tmpl/script.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/socket.conf b/conf/import-tmpl/socket.conf
index 7ce178140..57806f21e 100644
--- a/conf/import-tmpl/socket.conf
+++ b/conf/import-tmpl/socket.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/login/login-server.conf b/conf/login/login-server.conf
index a3d0b6955..22e927c5e 100644
--- a/conf/login/login-server.conf
+++ b/conf/login/login-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -75,8 +75,8 @@ login_configuration: {
// Can you use _M/_F to make new accounts on the server?
new_account: true
- //If new_account is enabled, minimum length to userid and passwords should be 4?
- //Must be 'true' unless your client uses both 'Disable 4 LetterUserID/Password' Diffs
+ // If new_account is enabled, minimum length to userid and passwords should be 4?
+ // Must be 'true' unless your client uses both 'Disable 4 LetterUserID/Password' Diffs
new_acc_length_limit: true
// Account registration flood protection system
diff --git a/conf/map/battle.conf b/conf/map/battle.conf
index 75cf0fb49..dd47db755 100644
--- a/conf/map/battle.conf
+++ b/conf/map/battle.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -76,6 +76,9 @@ battle_configuration: {
// Feature control (on/off) settings
@include "conf/map/battle/feature.conf"
+ // Different calculation limits
+ @include "conf/map/battle/limits.conf"
+
// Anything else that didn't fit anywhere else.
// Includes duel, day/night, mute/manner, log settings.
@include "conf/map/battle/misc.conf"
diff --git a/conf/map/battle/battle.conf b/conf/map/battle/battle.conf
index 4b1632e31..eafb5ec9b 100644
--- a/conf/map/battle/battle.conf
+++ b/conf/map/battle/battle.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/battleground.conf b/conf/map/battle/battleground.conf
index b2a482f3d..08c7fcd8a 100644
--- a/conf/map/battle/battleground.conf
+++ b/conf/map/battle/battleground.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/client.conf b/conf/map/battle/client.conf
index b7d4ac781..355df2baa 100644
--- a/conf/map/battle/client.conf
+++ b/conf/map/battle/client.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -189,3 +189,16 @@ mvp_exp_reward_message: false
// character has 0 HP when dead.
// Default: true (Official behavior)
display_fake_hp_when_dead: true
+
+// Send ping timer
+// For clients 20190320 Re+
+// Interval in seconds for each timer invoke.
+ping_timer_inverval: 30
+
+// Send packets timeout in seconds before ping packet can be sent.
+// For clients 20190320 Re+
+ping_time: 20
+
+// Drop or not connection after client send disconnect request packet
+// Official is false
+drop_connection_on_quit: false
diff --git a/conf/map/battle/drops.conf b/conf/map/battle/drops.conf
index eb7d94f13..cf09d14d9 100644
--- a/conf/map/battle/drops.conf
+++ b/conf/map/battle/drops.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -146,3 +146,8 @@ drops_by_luk2: 0
// 1: Only marine spheres drop items.
// 2: All alchemist summons drop items.
alchemist_summon_reward: 1
+
+// The maximum number of full iterations that server can do when dropping an item with options.
+// When picking random options for a dropped item, it does lots of iterations to choose the option to be set,
+// this value limits the number of iterations to avoid making the server hang in a long loop.
+option_drop_max_loop: 10
diff --git a/conf/map/battle/exp.conf b/conf/map/battle/exp.conf
index 8ca3de933..54b2ec4e0 100644
--- a/conf/map/battle/exp.conf
+++ b/conf/map/battle/exp.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/feature.conf b/conf/map/battle/feature.conf
index 1ed94b2a4..0cb293d60 100644
--- a/conf/map/battle/feature.conf
+++ b/conf/map/battle/feature.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -83,4 +83,19 @@ features: {
// Attendance End time in the format YearMonthDay
feature_attendance_endtime: 20180331
+
+ // Enable Achievement System
+ // true: enable (Default)
+ // false: disable
+ enable_achievement_system: true
+
+ // Enable Refinery UI (requires 2016-10-05Ragexe/RE)
+ // true: enable (Default)
+ // false: disable
+ enable_refinery_ui: false
+
+ // Replace Refine NPCs with Refinery UI
+ // true: enable
+ // false: disable (default)
+ replace_refine_npcs: false
}
diff --git a/conf/map/battle/gm.conf b/conf/map/battle/gm.conf
index 872aaea6d..32e407866 100644
--- a/conf/map/battle/gm.conf
+++ b/conf/map/battle/gm.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/guild.conf b/conf/map/battle/guild.conf
index e92760796..101349a85 100644
--- a/conf/map/battle/guild.conf
+++ b/conf/map/battle/guild.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/homunc.conf b/conf/map/battle/homunc.conf
index 0042df016..7ccaf8f8a 100644
--- a/conf/map/battle/homunc.conf
+++ b/conf/map/battle/homunc.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/items.conf b/conf/map/battle/items.conf
index e834b80f6..0dd990e0a 100644
--- a/conf/map/battle/items.conf
+++ b/conf/map/battle/items.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/limits.conf b/conf/map/battle/limits.conf
new file mode 100644
index 000000000..78498219e
--- /dev/null
+++ b/conf/map/battle/limits.conf
@@ -0,0 +1,57 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+// Battle (Limits) Configuration File
+//=========================================================================
+
+// basic attack limits
+batk_min_limit: 0
+batk_max_limit: 65535
+
+// magic attack limits
+
+matk_min_limit: 0
+matk_max_limit: 65535
+
+// weapon attack limits
+watk_min_limit: 0
+watk_max_limit: 65535
+
+// flee limits
+flee_min_limit: 1
+flee_max_limit: 32767
+
+// flee2 limits
+flee2_min_limit: 10
+flee2_max_limit: 32767
+
+// critical attack limits
+critical_min_limit: 10
+critical_max_limit: 32767
+
+// hit limits
+hit_min_limit: 1
+hit_max_limit: 32767
diff --git a/conf/map/battle/misc.conf b/conf/map/battle/misc.conf
index 5a8f916aa..f2bd00429 100644
--- a/conf/map/battle/misc.conf
+++ b/conf/map/battle/misc.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/monster.conf b/conf/map/battle/monster.conf
index 192e54615..8f969dc48 100644
--- a/conf/map/battle/monster.conf
+++ b/conf/map/battle/monster.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -137,7 +137,7 @@ mob_skill_delay: 100
mob_count_rate: 100
// Respawn rate of monsters on a map. 50 would make mobs respawn twice as fast (half delay time) (Note 2)
-//Note: This does not affects mobs with immediate respawn (most normal mobs)
+// Note: This does not affects mobs with immediate respawn (most normal mobs)
mob_spawn_delay: 100
plant_spawn_delay: 100
boss_spawn_delay: 100
diff --git a/conf/map/battle/party.conf b/conf/map/battle/party.conf
index 621ec50f4..79230eac4 100644
--- a/conf/map/battle/party.conf
+++ b/conf/map/battle/party.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/pet.conf b/conf/map/battle/pet.conf
index 02324ac52..f3c6fc12f 100644
--- a/conf/map/battle/pet.conf
+++ b/conf/map/battle/pet.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/player.conf b/conf/map/battle/player.conf
index 25ac24d6b..0762b1f54 100644
--- a/conf/map/battle/player.conf
+++ b/conf/map/battle/player.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -211,6 +211,7 @@ snovice_call_type: 0
// 0x080 - Emotion Request
// 0x100 - DropItem Request
// 0x200 - @/#Command Request
+// 0x400 - NPC Script Interaction
// Please note that at least 1 option has to be enabled.
// Be mindful that the more options used, the easier it becomes to cheat features that rely on idletime (e.g. checkidle()).
// Default: walk ( 0x1 ) + useskilltoid ( 0x2 ) + useskilltopos ( 0x4 ) + useitem ( 0x8 ) + attack ( 0x10 ) = 0x1F
diff --git a/conf/map/battle/skill.conf b/conf/map/battle/skill.conf
index 64bba68b5..0cc63662c 100644
--- a/conf/map/battle/skill.conf
+++ b/conf/map/battle/skill.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -53,8 +53,8 @@ min_skill_delay_limit: 100
// appear to "teleport" afterwards.
default_walk_delay: 300
-//Completely disable skill delay of the following types (Note 3)
-//NOTE: By default mobs don't have the skill delay as specified in the skill
+// Completely disable skill delay of the following types (Note 3)
+// NOTE: By default mobs don't have the skill delay as specified in the skill
// database, but follow their own 'reuse' skill delay which is specified on
// the mob skill db. When set, the delay for all skills become
// min_skill_delay_limit.
@@ -107,9 +107,9 @@ clear_skills_on_death: 0
// Should ground placed skills be removed when the caster changes maps? (Note 3)
clear_skills_on_warp: 15
-//Setting this to true will override the target mode of ground-based skills with the flag 0x01 to "No Enemies"
-//The two skills affected by default are Pneuma and Safety Wall (if set to true, those two skills will not protect everyone, but only allies)
-//See db/skill_unit_db.txt for more info.
+// Setting this to true will override the target mode of ground-based skills with the flag 0x01 to "No Enemies"
+// The two skills affected by default are Pneuma and Safety Wall (if set to true, those two skills will not protect everyone, but only allies)
+// See db/skill_unit_db.txt for more info.
defunit_not_enemy: false
// Do skills do at least 'hits' damage when they don't miss/are blocked?
@@ -138,10 +138,22 @@ skill_nofootset: 1
// Default on official servers: true for player-traps
gvg_traps_target_all: 1
-// Some traps settings (add as necessary):
-// 1: Traps are invisible to those who come into view of it. When unset, all traps are visible at all times.
-// (Invisible traps can be revealed through Hunter's Detecting skill)
-traps_setting: 0
+// Hunter's traps visibility setting (with HiddenTrap: true on skill_db.conf)
+// Here we have 2 configs:
+// visibility stands to how traps are displayed by default:
+// 0: Traps are always visible to everyone (Hercules/Pre-renewal)
+// 1: Traps with HiddenTrap: true are hidden in versus maps (PvP/GvG/BG)
+// 2: Traps with HiddenTrap: true are always invisible (Renewal) (Default)
+// Notes: - Invisibility applies to players that are not in caster's party.
+// - Invisible traps can be made visible to everyone with Hunter's Detecting skill.
+//
+// display_on_trigger tells if HiddenTraps should become visible once triggered
+// 0: Do not make traps visible once triggered (except for Ankle Snare) (Aegis)
+// 1: Always make traps visible once triggered (Hercules)
+trap_options: {
+ visibility: 2
+ display_on_trigger: 1
+}
// Restrictions applied to the Alchemist's Summon Flora skill (add as necessary)
// 1: Enable players to damage the floras outside of versus grounds.
@@ -175,7 +187,7 @@ monster_cloak_check_type: 4
// Can't place unlimited land skills at the same time (Note 3)
land_skill_limit: 9
-//Determines which kind of skill-failed messages should be sent:
+// Determines which kind of skill-failed messages should be sent:
// 0 - Enable by default
// 1 - Disable all skill-failed messages.
// 2 - Disable skill-failed messages due to can-act delays.
@@ -330,3 +342,8 @@ bowling_bash_area: 0
// punch a hole into SG it will for example create a "suck in" effect.
// If you disable this setting, the knockback direction will be completely random (eAthena style).
stormgust_knockback: true
+
+// Magic Rod's animation behavior (Note 1)
+// 0 : (official) Magic Rod's animation occurs every time it is used.
+// 1 : Magic Rod's animation would not occur unless a spell was absorbed. (old behavior)
+magicrod_type: 0
diff --git a/conf/map/battle/status.conf b/conf/map/battle/status.conf
index 94459e113..8ba761992 100644
--- a/conf/map/battle/status.conf
+++ b/conf/map/battle/status.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/logs.conf b/conf/map/logs.conf
index f56db9eee..db584049a 100644
--- a/conf/map/logs.conf
+++ b/conf/map/logs.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/map-server.conf b/conf/map/map-server.conf
index 943b7b5a6..dbb343748 100644
--- a/conf/map/map-server.conf
+++ b/conf/map/map-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -106,6 +106,7 @@ map_configuration: {
// 0x040: After successfully get/delete/complete a quest
// 0x080: After every buying store transaction
// 0x100: After every bank transaction (deposit/withdraw)
+ // 0x200: After every allow party flag change
// NOTE: These settings decrease the chance of dupes/lost items
// when there's a server crash at the expense of increasing the
// map/char server lag. If your server rarely crashes, but
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 1634ef3a8..644ced6bb 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/script.conf b/conf/map/script.conf
index f18e9d6e2..802ce2538 100644
--- a/conf/map/script.conf
+++ b/conf/map/script.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ script_configuration: {
// Default value of the 'min' argument of the script command 'input'.
// When the 'min' argument isn't provided, this value is used instead.
// Defaults to 0.
- //input_min_value: 0
+ input_min_value: 0
// Default value of the 'max' argument of the script command 'input'.
// When the 'max' argument isn't provided, this value is used instead.
diff --git a/conf/messages.conf b/conf/messages.conf
index 2f790b13f..2788f264d 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -449,7 +449,8 @@
// Return pet to egg message
451: You can't return your pet because your inventory is full.
452: usage @camerainfo range rotation latitude
-//453-497 FREE
+453: Refinery UI is not available
+//454-497 FREE
// Messages of others (not for GM commands)
// ----------------------------------------
@@ -1569,5 +1570,10 @@
1498: You can't add a party bound item to a character without party!
1499: You can't add a guild bound item to a character without guild!
+// @dropall
+1500: Usage: @dropall {<type>}
+1501: Type List: (default) all = -1, healing = 0, usable = 2, etc = 3, weapon = 4, armor = 5, card = 6, petegg = 7, petarmor = 8, ammo = 10, delayed-consumable = 11, cash = 18
+1502: %d items are dropped!
+
//Custom translations
import: conf/import/msg_conf.txt
diff --git a/configure b/configure
index 41b308828..4ab9057e8 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac e207bf99b.
+# From configure.ac 5b2340b4d.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -9452,6 +9452,46 @@ else
fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether my_bool is supported (MySQL)" >&5
+$as_echo_n "checking whether my_bool is supported (MySQL)... " >&6; }
+if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef WIN32
+ #include "common/winapi.h" // Needed before mysql.h
+ #endif
+ #include <mysql.h>
+ int main(int argc, char **argv){
+ my_bool val = (my_bool)0;
+ return (int)val;
+ }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (converting my_bool to bool)" >&5
+$as_echo "no (converting my_bool to bool)" >&6; }
+ MYSQL_CFLAGS="$MYSQL_CFLAGS -Dmy_bool=bool"
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
CPPFLAGS="$MYSQL_OLD_CPPFLAGS"
LIBS="$MYSQL_OLD_LIBS"
diff --git a/configure.ac b/configure.ac
index 9e88b618b..ec9e35cfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1597,6 +1597,28 @@ MYSQL_OLD_LIBS="$LIBS" ; LIBS="$LIBS $MYSQL_LIBS"
MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
AC_CHECK_FUNC([mysql_init], [HAVE_MYSQL="yes"])
AC_CHECK_HEADER([mysql.h], [], [HAVE_MYSQL=""])
+
+AC_MSG_CHECKING([whether my_bool is supported (MySQL)])
+AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([
+ #ifdef WIN32
+ #include "common/winapi.h" // Needed before mysql.h
+ #endif
+ #include <mysql.h>
+ int main(int argc, char **argv){
+ my_bool val = (my_bool)0;
+ return (int)val;
+ }
+ ])],
+ [
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no (converting my_bool to bool)])
+ MYSQL_CFLAGS="$MYSQL_CFLAGS -Dmy_bool=bool"
+ ]
+)
+
CPPFLAGS="$MYSQL_OLD_CPPFLAGS"
LIBS="$MYSQL_OLD_LIBS"
diff --git a/db/constants.conf b/db/constants.conf
index a6c74d56d..f1283b26e 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -1485,12 +1485,27 @@ constants_db: {
e_panic: 79
e_whisp: 80
- comment__: "petstat"
- PET_CLASS: 1
- PET_NAME: 2
- PET_LEVEL: 3
- PET_HUNGRY: 4
- PET_INTIMATE: 5
+ comment__: "petstat - deprecated, use *getpetinfo"
+ PET_CLASS: {
+ Value: 1
+ Deprecated: true
+ }
+ PET_NAME: {
+ Value: 2
+ Deprecated: true
+ }
+ PET_LEVEL: {
+ Value: 3
+ Deprecated: true
+ }
+ PET_HUNGRY: {
+ Value: 4
+ Deprecated: true
+ }
+ PET_INTIMATE: {
+ Value: 5
+ Deprecated: true
+ }
comment__: "getmonsterinfo"
MOB_NAME: 0
@@ -3744,12 +3759,6 @@ constants_db: {
IOT_PARTY: 2
IOT_GUILD: 3
- comment__: "tradertype"
- NST_ZENY: 0
- NST_CASH: 1
- NST_MARKET: 2
- NST_CUSTOM: 3
-
comment__: "strcharinfo"
PC_NAME: 0
PC_PARTY: 1
@@ -3851,64 +3860,6 @@ constants_db: {
SEX_MALE: 1
SEX_ANY: 2
- comment__: "Script Unit Data Types"
- UDT_TYPE: 0
- UDT_SIZE: 1
- UDT_LEVEL: 2
- UDT_HP: 3
- UDT_MAXHP: 4
- UDT_SP: 5
- UDT_MAXSP: 6
- UDT_MASTERAID: 7
- UDT_MASTERCID: 8
- UDT_MAPIDXY: 9
- UDT_WALKTOXY: 10
- UDT_SPEED: 11
- UDT_MODE: 12
- UDT_AI: 13
- UDT_SCOPTION: 14
- UDT_SEX: 15
- UDT_CLASS: 16
- UDT_HAIRSTYLE: 17
- UDT_HAIRCOLOR: 18
- UDT_HEADBOTTOM: 19
- UDT_HEADMIDDLE: 20
- UDT_HEADTOP: 21
- UDT_CLOTHCOLOR: 22
- UDT_SHIELD: 23
- UDT_WEAPON: 24
- UDT_LOOKDIR: 25
- UDT_CANMOVETICK: 26
- UDT_STR: 27
- UDT_AGI: 28
- UDT_VIT: 29
- UDT_INT: 30
- UDT_DEX: 31
- UDT_LUK: 32
- UDT_ATKRANGE: 33
- UDT_ATKMIN: 34
- UDT_ATKMAX: 35
- UDT_MATKMIN: 36
- UDT_MATKMAX: 37
- UDT_DEF: 38
- UDT_MDEF: 39
- UDT_HIT: 40
- UDT_FLEE: 41
- UDT_PDODGE: 42
- UDT_CRIT: 43
- UDT_RACE: 44
- UDT_ELETYPE: 45
- UDT_ELELEVEL: 46
- UDT_AMOTION: 47
- UDT_ADELAY: 48
- UDT_DMOTION: 49
- UDT_HUNGER: 50
- UDT_INTIMACY: 51
- UDT_LIFETIME: 52
- UDT_MERC_KILLCOUNT: 53
- UDT_STATADD: 54
- UDT_ROBE: 55
- UDT_BODY2: 56
comment__: "HatEffect Constants"
HAT_EF_BLOSSOM_FLUTTERING: 1
@@ -4047,4 +3998,7 @@ constants_db: {
ACH_PET_CREATE: 43
ACH_ACHIEVE: 44
ACH_ACHIEVEMENT_RANK: 45
+
+ comment__: "inventory expansion"
+ INVENTORY_INCREASE_STEP: 10
}
diff --git a/db/item_db2.conf b/db/item_db2.conf
index 199bd798e..8a2d8e429 100644
--- a/db/item_db2.conf
+++ b/db/item_db2.conf
@@ -70,7 +70,7 @@ item_db: (
Taekwon: true/false (boolean, defaults to false)
Star_Gladiator: true/false (boolean, defaults to false)
Soul_Linker: true/false (boolean, defaults to false)
- Gungslinger: true/false (boolean, defaults to false)
+ Gunslinger: true/false (boolean, defaults to false)
Ninja: true/false (boolean, defaults to false)
Gangsi: true/false (boolean, defaults to false)
Death_Knight: true/false (boolean, defaults to false)
diff --git a/db/mob_db2.conf b/db/mob_db2.conf
index 8d3e67904..e2894a719 100644
--- a/db/mob_db2.conf
+++ b/db/mob_db2.conf
@@ -89,6 +89,8 @@ mob_db: (
}
Drops: {
AegisName: chance (string: int)
+ // or
+ AegisName: (chance, "Option Drop Group")
// ...
}
},
diff --git a/db/option_drop_groups.conf b/db/option_drop_groups.conf
new file mode 100644
index 000000000..b293be19a
--- /dev/null
+++ b/db/option_drop_groups.conf
@@ -0,0 +1,53 @@
+//================= Hercules Database =====================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2018 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Random Option Drop Group Database
+//=========================================================================
+
+option_drop_group_db: (
+{
+/**************************************************************************
+ ************* Entry structure ********************************************
+ **************************************************************************
+ <Group Name Constant>: (
+ { // Option Slot 1
+ Rate: (int) chance of filling option slot 1 (100 = 1%)
+
+ // Possible options for slot 1
+ // min/max value : int, defaults to 0
+ // chance : int, 100 = 1% if not set, will be 100%/number of possibiltiies
+ OptionName: value
+ // or
+ OptionName: [min value, max value]
+ // or
+ OptionName: [min value, max value, chance]
+ // ... (as many as you want)
+ },
+ // ... (up to MAX_ITEM_OPTION)
+ ),
+**************************************************************************/
+}
+)
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index a929a596d..c860e0239 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -96534,6 +96534,11 @@ item_db: (
Name: "GH_Cursed_Gemstone"
},
{
+ Id: 25793
+ AegisName: "Inventory_Extension_Coupon"
+ Name: "Inventory_Extension_Coupon"
+},
+{
Id: 26007
AegisName: "Spectral_Spear_IL"
Name: "Spectral_Spear_IL"
diff --git a/db/pre-re/mob_db.conf b/db/pre-re/mob_db.conf
index 40635cd68..553593cea 100644
--- a/db/pre-re/mob_db.conf
+++ b/db/pre-re/mob_db.conf
@@ -89,6 +89,8 @@ mob_db: (
}
Drops: {
AegisName: chance (string: int)
+ // or
+ AegisName: (chance, "Option Drop Group")
// ...
}
},
diff --git a/db/pre-re/mob_skill_db.conf b/db/pre-re/mob_skill_db.conf
index 8f752cb68..e375754d9 100644
--- a/db/pre-re/mob_skill_db.conf
+++ b/db/pre-re/mob_skill_db.conf
@@ -43540,7 +43540,7 @@ mob_skill_db:(
SkillLevel: 2
Rate: 10000
CastTime: 1000
- Delay: 60000
+ Delay: 60000000
SkillTarget: "MST_SELF"
CastCondition: "MSC_SLAVELE"
ConditionData: 1
@@ -43552,7 +43552,7 @@ mob_skill_db:(
SkillLevel: 2
Rate: 10000
CastTime: 1000
- Delay: 60000
+ Delay: 60000000
SkillTarget: "MST_SELF"
CastCondition: "MSC_SLAVELE"
ConditionData: 1
@@ -43564,7 +43564,7 @@ mob_skill_db:(
SkillLevel: 2
Rate: 10000
CastTime: 1000
- Delay: 60000
+ Delay: 60000000
SkillTarget: "MST_SELF"
CastCondition: "MSC_SLAVELE"
ConditionData: 1
diff --git a/db/pre-re/refine_db.conf b/db/pre-re/refine_db.conf
index dd3bcdb41..725b8c225 100644
--- a/db/pre-re/refine_db.conf
+++ b/db/pre-re/refine_db.conf
@@ -37,6 +37,30 @@ Armors/WeaponLevel1~4: { // Specifies weap
RandomBonusStartLevel: (int) // This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
// - RandomBonusStartLevel is only applied for weapons, and not displayed client-side.
RandomBonusValue: (int) // A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past.
+ RefineryUISettings: (
+ {
+ Level: (int or array of int) // Holds either the individule refine level meant for this setting or an array defining a range
+ of Low to Max level
+ BlacksmithBlessing: (int) (optional) // How many Blacksmith Blessing required for this range to be safe from breaking
+ Announce: "(string)" (optional) // Sends an announcement server wide when a player reach this refine level using
+ Refinery UI, this feature is only available starting from 2017-08-30 RagexeRE or
+ 2017-09-06 Ragexe the field accepts the following values and it defaults to not announce
+ Success to set the announcement on item refine successful
+ Failure to set the announcement on item refine failure
+ Always to always announce it
+ Items: {
+ AegisName: {
+ Type: "(string)" // The type to determine the chances used for this item, REFINE_CHANCE_TYPE_*
+ constants are used in here
+ Cost: (int) (optional) // Amount of zeny required
+ FailureBehavior: "(string)" (optional) // The expected behvaior on failure for this item, the following strings are used in here
+ Destroy (default) sets the item to be destroyed on failure
+ Keep keeps the item after failure
+ Downgrade downgrades the item by one level on failure
+ }
+ }
+ }
+ )
Rates: { // Per level configuration of the refine rates.
Lv1~10: { // Lv1 ~ Lv10.
NormalChance: (int) // (optional, defaults to 100) Chance of successful refine using normal ores (100 = 100%).
@@ -54,6 +78,39 @@ Armors: {
StatsPerLevel: 66
RandomBonusStartLevel: 0
RandomBonusValue: 0
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Elunium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 2000
+ }
+ Enriched_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 2000
+ }
+ }
+ },
+ {
+ Level: [8, 10]
+ Items: {
+ Elunium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 2000
+ }
+ Enriched_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 2000
+ }
+ HD_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ )
Rates: {
Lv5: {
NormalChance: 60
@@ -97,6 +154,38 @@ WeaponLevel1: {
StatsPerLevel: 200
RandomBonusStartLevel: 8
RandomBonusValue: 300
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Phracon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 50
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 50
+ }
+ }
+ },
+ {
+ Level: [8, 10]
+ Items: {
+ Phracon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 50
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 50
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ }
+ },
+ )
Rates: {
Lv8: {
NormalChance: 60
@@ -122,6 +211,38 @@ WeaponLevel2: {
StatsPerLevel: 300
RandomBonusStartLevel: 7
RandomBonusValue: 500
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Emveretarcon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 200
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 200
+ }
+ }
+ },
+ {
+ Level: [8, 10]
+ Items: {
+ Emveretarcon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 200
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 200
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ }
+ },
+ )
Rates: {
Lv7: {
NormalChance: 60
@@ -153,6 +274,38 @@ WeaponLevel3: {
StatsPerLevel: 500
RandomBonusStartLevel: 6
RandomBonusValue: 800
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ }
+ },
+ {
+ Level: [8, 10]
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ }
+ },
+ )
Rates: {
Lv6: {
NormalChance: 60
@@ -190,6 +343,38 @@ WeaponLevel4: {
StatsPerLevel: 700
RandomBonusStartLevel: 5
RandomBonusValue: 1300
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ }
+ },
+ {
+ Level: [8, 10]
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ }
+ },
+ )
Rates: {
Lv5: {
NormalChance: 60
diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf
index 21a0f0e78..351a63bda 100644
--- a/db/pre-re/skill_db.conf
+++ b/db/pre-re/skill_db.conf
@@ -75,6 +75,7 @@
Works like FreeCastReduced, but not reduce speed.
ShowSkillScale: true/false (boolean, defaults to false)
AllowReproduce: true/false (boolean, defaults to false)
+ HiddenTrap: true/false (boolean, defaults to false)
}
AttackType: "Attack Type" (string, defaults to "None")
Types: "None", "Weapon", "Magic" or "Misc"
diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt
index 739be9a65..3cbaef807 100644
--- a/db/re/item_combo_db.txt
+++ b/db/re/item_combo_db.txt
@@ -436,3 +436,4 @@
24238:24239,{ bonus bAtk,5; if(getequiprefinerycnt(EQI_SHADOW_ACC_R) + getequiprefinerycnt(EQI_SHADOW_ACC_L) >=15) { bonus2 bAddSize,Size_Small,1; } }
24240:24241:24242,{ bonus bUseSPrate,-1; .@refine = getequiprefinerycnt(EQI_SHADOW_SHIELD)+getequiprefinerycnt(EQI_SHADOW_ARMOR)+getequiprefinerycnt(EQI_SHADOW_SHOES); bonus bVariableCastrate,(.@refine)/5; if(.@refine)>=25 { bonus bUseSPrate,-1; } }
24243:24244:24245,{ bonus bDelayrate,-1; if (getequiprefinerycnt(EQI_SHADOW_SHIELD)+getequiprefinerycnt(EQI_SHADOW_ARMOR)+getequiprefinerycnt(EQI_SHADOW_SHOES) >= 25) bonus bDelayrate,-5; }
+2161:1646,{ .@r = (getequiprefinerycnt(EQI_HAND_L)*4); bonus2 bVariableCastrate,"WZ_STORMGUST",-.@r; bonus2 bVariableCastrate,"WL_FROSTMISTY",-.@r; bonus2 bVariableCastrate,"WL_JACKFROST",-.@r; }
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index e5a05e8bc..6c0bea7f0 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -148002,6 +148002,54 @@ item_db: (
Script: <" percentheal 5,5; ">
},
{
+ Id: 22702
+ AegisName: "STR_Soul_Potion"
+ Name: "STR Reduction Potion"
+ Type: "IT_DELAYCONSUME"
+ Buy: 10
+ Script: <" callfunc("F_CashReduceStat", bStr, -1, STR_Soul_Potion); ">
+},
+{
+ Id: 22703
+ AegisName: "AGI_Soul_Potion"
+ Name: "AGI Reduction Potion"
+ Type: "IT_DELAYCONSUME"
+ Buy: 10
+ Script: <" callfunc("F_CashReduceStat", bAgi, -1, AGI_Soul_Potion); ">
+},
+{
+ Id: 22704
+ AegisName: "VIT_Soul_Potion"
+ Name: "VIT Reduction Potion"
+ Type: "IT_DELAYCONSUME"
+ Buy: 10
+ Script: <" callfunc("F_CashReduceStat", bVit, -1, VIT_Soul_Potion); ">
+},
+{
+ Id: 22705
+ AegisName: "INT_Soul_Potion"
+ Name: "INT Reduction Potion"
+ Type: "IT_DELAYCONSUME"
+ Buy: 10
+ Script: <" callfunc("F_CashReduceStat", bInt, -1, INT_Soul_Potion); ">
+},
+{
+ Id: 22706
+ AegisName: "DEX_Soul_Potion"
+ Name: "DEX Reduction Potion"
+ Type: "IT_DELAYCONSUME"
+ Buy: 10
+ Script: <" callfunc("F_CashReduceStat", bDex, -1, DEX_Soul_Potion); ">
+},
+{
+ Id: 22707
+ AegisName: "LUK_Soul_Potion"
+ Name: "LUK Reduction Potion"
+ Type: "IT_DELAYCONSUME"
+ Buy: 10
+ Script: <" callfunc("F_CashReduceStat", bLuk, -1, LUK_Soul_Potion); ">
+},
+{
Id: 22737
AegisName: "Bullet_Case_Blood_"
Name: "Bloody Bullet Case"
@@ -152333,6 +152381,11 @@ item_db: (
Name: "GH_Cursed_Gemstone"
},
{
+ Id: 25793
+ AegisName: "Inventory_Extension_Coupon"
+ Name: "Inventory_Extension_Coupon"
+},
+{
Id: 26007
AegisName: "Spectral_Spear_IL"
Name: "Spectral_Spear_IL"
diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf
index e90b478e7..f787d5478 100644
--- a/db/re/mob_db.conf
+++ b/db/re/mob_db.conf
@@ -89,6 +89,8 @@ mob_db: (
}
Drops: {
AegisName: chance (string: int)
+ // or
+ AegisName: (chance, "Option Drop Group")
// ...
}
},
diff --git a/db/re/refine_db.conf b/db/re/refine_db.conf
index 4974e0033..c83f71334 100644
--- a/db/re/refine_db.conf
+++ b/db/re/refine_db.conf
@@ -37,6 +37,30 @@ Armors/WeaponLevel1~4: { // Specifies weap
RandomBonusStartLevel: (int) // This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
// - RandomBonusStartLevel is only applied for weapons, and not displayed client-side.
RandomBonusValue: (int) // A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past.
+ RefineryUISettings: (
+ {
+ Level: (int or array of int) // Holds either the individule refine level meant for this setting or an array defining a range
+ of Low to Max level
+ BlacksmithBlessing: (int) (optional) // How many Blacksmith Blessing required for this range to be safe from breaking
+ Announce: "(string)" (optional) // Sends an announcement server wide when a player reach this refine level using
+ Refinery UI, this feature is only available starting from 2017-08-30 RagexeRE or
+ 2017-09-06 Ragexe the field accepts the following values and it defaults to not announce
+ Success to set the announcement on item refine successful
+ Failure to set the announcement on item refine failure
+ Always to always announce it
+ Items: {
+ AegisName: {
+ Type: "(string)" // The type to determine the chances used for this item, REFINE_CHANCE_TYPE_*
+ constants are used in here
+ Cost: (int) (optional) // Amount of zeny required
+ FailureBehavior: "(string)" (optional) // The expected behvaior on failure for this item, the following strings are used in here
+ Destroy (default) sets the item to be destroyed on failure
+ Keep keeps the item after failure
+ Downgrade downgrades the item by one level on failure
+ }
+ }
+ }
+ )
Rates: { // Per level configuration of the refine rates.
Lv1~20: { // Lv1 ~ Lv20.
NormalChance: (int) // (optional, defaults to 100) Chance of successful refine using normal ores (100 = 100%).
@@ -54,6 +78,126 @@ Armors: {
StatsPerLevel: 0
RandomBonusStartLevel: 0
RandomBonusValue: 0
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Elunium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 2000
+ }
+ Enriched_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 2000
+ }
+ }
+ },
+ {
+ Level: 8
+ BlacksmithBlessing: 1
+ Items: {
+ Elunium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 2000
+ }
+ Enriched_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 2000
+ }
+ HD_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 9
+ BlacksmithBlessing: 2
+ Items: {
+ Elunium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 2000
+ }
+ Enriched_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 2000
+ }
+ HD_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 10
+ BlacksmithBlessing: 4
+ Announce: "Success"
+ Items: {
+ Elunium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 2000
+ }
+ Enriched_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 2000
+ }
+ HD_Elunium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 11
+ BlacksmithBlessing: 7
+ Announce: "Always"
+ Items: {
+ Carnium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Carnium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 12
+ BlacksmithBlessing: 11
+ Announce: "Always"
+ Items: {
+ Carnium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Carnium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: [13, 20]
+ Announce: "Always"
+ Items: {
+ Carnium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Carnium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ )
Rates: {
Lv1: {
Bonus: 100
@@ -175,6 +319,126 @@ WeaponLevel1: {
StatsPerLevel: 200
RandomBonusStartLevel: 8
RandomBonusValue: 300
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Phracon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 50
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 50
+ }
+ }
+ },
+ {
+ Level: 8
+ BlacksmithBlessing: 1
+ Items: {
+ Phracon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 50
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 50
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 9
+ BlacksmithBlessing: 2
+ Items: {
+ Phracon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 50
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 50
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 10
+ BlacksmithBlessing: 4
+ Announce: "Success"
+ Items: {
+ Phracon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 50
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 50
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 11
+ BlacksmithBlessing: 7
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 12
+ BlacksmithBlessing: 11
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: [13, 20]
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ )
Rates: {
Lv8: {
NormalChance: 60
@@ -255,6 +519,126 @@ WeaponLevel2: {
StatsPerLevel: 300
RandomBonusStartLevel: 7
RandomBonusValue: 500
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Emveretarcon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 200
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 200
+ }
+ }
+ },
+ {
+ Level: 8
+ BlacksmithBlessing: 1
+ Items: {
+ Emveretarcon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 200
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 200
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 9
+ BlacksmithBlessing: 2
+ Items: {
+ Emveretarcon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 200
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 200
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 10
+ BlacksmithBlessing: 4
+ Announce: "Success"
+ Items: {
+ Emveretarcon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 200
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 200
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 11
+ BlacksmithBlessing: 7
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 12
+ BlacksmithBlessing: 11
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: [13, 20]
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ )
Rates: {
Lv7: {
NormalChance: 60
@@ -341,6 +725,126 @@ WeaponLevel3: {
StatsPerLevel: 500
RandomBonusStartLevel: 6
RandomBonusValue: 800
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ }
+ },
+ {
+ Level: 8
+ BlacksmithBlessing: 1
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 9
+ BlacksmithBlessing: 2
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 10
+ BlacksmithBlessing: 4
+ Announce: "Success"
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 5000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 5000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 11
+ BlacksmithBlessing: 7
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 12
+ BlacksmithBlessing: 11
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: [13, 20]
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ )
Rates: {
Lv6: {
NormalChance: 60
@@ -433,6 +937,126 @@ WeaponLevel4: {
StatsPerLevel: 700
RandomBonusStartLevel: 5
RandomBonusValue: 1400
+ RefineryUISettings: (
+ {
+ Level: [1, 7]
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 20000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ }
+ },
+ {
+ Level: 8
+ BlacksmithBlessing: 1
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 20000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 9
+ BlacksmithBlessing: 2
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 20000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 10
+ BlacksmithBlessing: 4
+ Announce: "Success"
+ Items: {
+ Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 20000
+ }
+ Enriched_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ }
+ HD_Oridecon: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 11
+ BlacksmithBlessing: 7
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: 12
+ BlacksmithBlessing: 11
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ {
+ Level: [13, 20]
+ Announce: "Always"
+ Items: {
+ Bradium: {
+ Type: "REFINE_CHANCE_TYPE_NORMAL"
+ Cost: 100000
+ }
+ HD_Bradium: {
+ Type: "REFINE_CHANCE_TYPE_ENRICHED"
+ Cost: 20000
+ FailureBehavior: "Downgrade"
+ }
+ }
+ },
+ )
Rates: {
Lv5: {
NormalChance: 60
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index ec8548ab2..9f5ce6439 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -75,6 +75,7 @@
Works like FreeCastReduced, but not reduce speed.
ShowSkillScale: true/false (boolean, defaults to false)
AllowReproduce: true/false (boolean, defaults to false)
+ HiddenTrap: true/false (boolean, defaults to false)
}
AttackType: "Attack Type" (string, defaults to "None")
Types: "None", "Weapon", "Magic" or "Misc"
@@ -4110,6 +4111,7 @@ skill_db: (
}
SkillInfo: {
Trap: true
+ HiddenTrap: true
}
AttackType: "Misc"
DamageType: {
@@ -4170,6 +4172,7 @@ skill_db: (
SkillInfo: {
Trap: true
AllowReproduce: true
+ HiddenTrap: true
}
AttackType: "Misc"
Element: "Ele_Earth"
@@ -4222,6 +4225,7 @@ skill_db: (
}
SkillInfo: {
Trap: true
+ HiddenTrap: true
}
AttackType: "Misc"
DamageType: {
@@ -4281,6 +4285,7 @@ skill_db: (
}
SkillInfo: {
Trap: true
+ HiddenTrap: true
}
AttackType: "Misc"
DamageType: {
@@ -4329,6 +4334,7 @@ skill_db: (
}
SkillInfo: {
Trap: true
+ HiddenTrap: true
}
AttackType: "Misc"
DamageType: {
@@ -4390,6 +4396,7 @@ skill_db: (
}
SkillInfo: {
Trap: true
+ HiddenTrap: true
}
AttackType: "Misc"
DamageType: {
@@ -4452,6 +4459,7 @@ skill_db: (
SkillInfo: {
Trap: true
AllowReproduce: true
+ HiddenTrap: true
}
AttackType: "Weapon"
Element: "Ele_Water"
@@ -4638,6 +4646,7 @@ skill_db: (
}
SkillInfo: {
Trap: true
+ HiddenTrap: true
}
AttackType: "Misc"
DamageType: {
diff --git a/doc/atcommands.txt b/doc/atcommands.txt
index b455d9151..dd8ad0969 100644
--- a/doc/atcommands.txt
+++ b/doc/atcommands.txt
@@ -692,9 +692,23 @@ Repairs all broken items in your inventory.
---------------------------------------
-@dropall
-
-Drops all inventory and equipped items onto the floor.
+@dropall {<item type>}
+
+Drops all items based on the item type.
+
+Valid item types:
+ -1 = All Items (default)
+ 0 = Healing Items
+ 2 = Useable Items
+ 3 = Etc Items
+ 4 = Weapons
+ 5 = Armors
+ 6 = Cards
+ 7 = Pet Eggs
+ 8 = Pet Armors
+ 10 = Ammunition Items
+ 11 = Delayed-Consumable Items
+ 18 = Cash Items
---------------------------------------
diff --git a/doc/constants.md b/doc/constants.md
index cca12c59a..70bed4de6 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -1409,13 +1409,13 @@
- `e_panic`: 79
- `e_whisp`: 80
-### petstat
+### petstat - deprecated, use *getpetinfo
-- `PET_CLASS`: 1
-- `PET_NAME`: 2
-- `PET_LEVEL`: 3
-- `PET_HUNGRY`: 4
-- `PET_INTIMATE`: 5
+- `PET_CLASS`: 1 **(DEPRECATED)**
+- `PET_NAME`: 2 **(DEPRECATED)**
+- `PET_LEVEL`: 3 **(DEPRECATED)**
+- `PET_HUNGRY`: 4 **(DEPRECATED)**
+- `PET_INTIMATE`: 5 **(DEPRECATED)**
### getmonsterinfo
@@ -3652,13 +3652,6 @@
- `IOT_PARTY`: 2
- `IOT_GUILD`: 3
-### tradertype
-
-- `NST_ZENY`: 0
-- `NST_CASH`: 1
-- `NST_MARKET`: 2
-- `NST_CUSTOM`: 3
-
### strcharinfo
- `PC_NAME`: 0
@@ -3771,66 +3764,6 @@
- `SEX_MALE`: 1
- `SEX_ANY`: 2
-### Script Unit Data Types
-
-- `UDT_TYPE`: 0
-- `UDT_SIZE`: 1
-- `UDT_LEVEL`: 2
-- `UDT_HP`: 3
-- `UDT_MAXHP`: 4
-- `UDT_SP`: 5
-- `UDT_MAXSP`: 6
-- `UDT_MASTERAID`: 7
-- `UDT_MASTERCID`: 8
-- `UDT_MAPIDXY`: 9
-- `UDT_WALKTOXY`: 10
-- `UDT_SPEED`: 11
-- `UDT_MODE`: 12
-- `UDT_AI`: 13
-- `UDT_SCOPTION`: 14
-- `UDT_SEX`: 15
-- `UDT_CLASS`: 16
-- `UDT_HAIRSTYLE`: 17
-- `UDT_HAIRCOLOR`: 18
-- `UDT_HEADBOTTOM`: 19
-- `UDT_HEADMIDDLE`: 20
-- `UDT_HEADTOP`: 21
-- `UDT_CLOTHCOLOR`: 22
-- `UDT_SHIELD`: 23
-- `UDT_WEAPON`: 24
-- `UDT_LOOKDIR`: 25
-- `UDT_CANMOVETICK`: 26
-- `UDT_STR`: 27
-- `UDT_AGI`: 28
-- `UDT_VIT`: 29
-- `UDT_INT`: 30
-- `UDT_DEX`: 31
-- `UDT_LUK`: 32
-- `UDT_ATKRANGE`: 33
-- `UDT_ATKMIN`: 34
-- `UDT_ATKMAX`: 35
-- `UDT_MATKMIN`: 36
-- `UDT_MATKMAX`: 37
-- `UDT_DEF`: 38
-- `UDT_MDEF`: 39
-- `UDT_HIT`: 40
-- `UDT_FLEE`: 41
-- `UDT_PDODGE`: 42
-- `UDT_CRIT`: 43
-- `UDT_RACE`: 44
-- `UDT_ELETYPE`: 45
-- `UDT_ELELEVEL`: 46
-- `UDT_AMOTION`: 47
-- `UDT_ADELAY`: 48
-- `UDT_DMOTION`: 49
-- `UDT_HUNGER`: 50
-- `UDT_INTIMACY`: 51
-- `UDT_LIFETIME`: 52
-- `UDT_MERC_KILLCOUNT`: 53
-- `UDT_STATADD`: 54
-- `UDT_ROBE`: 55
-- `UDT_BODY2`: 56
-
### HatEffect Constants
- `HAT_EF_BLOSSOM_FLUTTERING`: 1
@@ -3971,6 +3904,10 @@
- `ACH_ACHIEVE`: 44
- `ACH_ACHIEVEMENT_RANK`: 45
+### inventory expansion
+
+- `INVENTORY_INCREASE_STEP`: 10
+
## Hardcoded Constants (source)
@@ -3988,13 +3925,18 @@
- `MAX_GUILD_STORAGE`: 600
- `MAX_CART`: 100
- `MAX_INVENTORY`: 100
+- `FIXED_INVENTORY_SIZE`: 100
- `MAX_ZENY`: 2147483647
- `MAX_BANK_ZENY`: 2147483647
- `MAX_BG_MEMBERS`: 30
- `MAX_CHAT_USERS`: 20
- `MAX_REFINE`: 20
+- `MAX_ITEM_ID`: 65535
- `MAX_MENU_OPTIONS`: 255
- `MAX_MENU_LENGTH`: 2048
+- `MOB_CLONE_START`: 4001
+- `MOB_CLONE_END`: 5000
+- `MAX_NPC_PER_MAP`: 512
### status options
@@ -4262,6 +4204,16 @@
- `MAPINFO_SIZE_X`: 2
- `MAPINFO_SIZE_Y`: 3
- `MAPINFO_ZONE`: 4
+- `MAPINFO_NPC_COUNT`: 5
+
+### consolemes options
+
+- `CONSOLEMES_DEBUG`: 0
+- `CONSOLEMES_ERROR`: 1
+- `CONSOLEMES_WARNING`: 2
+- `CONSOLEMES_INFO`: 3
+- `CONSOLEMES_STATUS`: 4
+- `CONSOLEMES_NOTICE`: 5
### set/getiteminfo options
@@ -4284,6 +4236,34 @@
- `ITEMINFO_VIEWSPRITE`: 16
- `ITEMINFO_TRADE`: 17
+### getmercinfo options
+
+- `MERCINFO_ID,`: 0
+- `MERCINFO_CLASS`: 1
+- `MERCINFO_NAME`: 2
+- `MERCINFO_FAITH`: 3
+- `MERCINFO_CALLS`: 4
+- `MERCINFO_KILLCOUNT`: 5
+- `MERCINFO_LIFETIME`: 6
+- `MERCINFO_LEVEL`: 7
+- `MERCINFO_GID`: 8
+
+### getpetinfo options
+
+- `PETINFO_ID`: 0
+- `PETINFO_CLASS`: 1
+- `PETINFO_NAME`: 2
+- `PETINFO_INTIMACY`: 3
+- `PETINFO_HUNGRY`: 4
+- `PETINFO_RENAME`: 5
+- `PETINFO_GID`: 6
+- `PETINFO_EGGITEM`: 7
+- `PETINFO_FOODITEM`: 8
+- `PETINFO_ACCESSORYITEM`: 9
+- `PETINFO_ACCESSORYFLAG`: 10
+- `PETINFO_EVO_EGGID`: 11
+- `PETINFO_AUTOFEED`: 12
+
### monster skill states
- `MSS_ANY`: -1
@@ -4395,6 +4375,97 @@
- `ITR_NOAUCTION`: 256
- `ITR_ALL`: 511
+### inventory expand ack responds
+
+- `EXPAND_INV_ASK_CONFIRMATION`: 0
+- `EXPAND_INV_FAILED`: 1
+- `EXPAND_INV_OTHER_WORK`: 2
+- `EXPAND_INV_MISSING_ITEM`: 3
+- `EXPAND_INV_MAX_SIZE`: 4
+
+### inventory expand final responds
+
+- `EXPAND_INV_RESULT_SUCCESS`: 0
+- `EXPAND_INV_RESULT_FAILED`: 1
+- `EXPAND_INV_RESULT_OTHER_WORK`: 2
+- `EXPAND_INV_RESULT_MISSING_ITEM`: 3
+- `EXPAND_INV_RESULT_MAX_SIZE`: 4
+
+### trader type
+
+- `NST_ZENY`: 0
+- `NST_CASH`: 1
+- `NST_MARKET`: 2
+- `NST_CUSTOM`: 3
+- `NST_BARTER`: 4
+
+### script unit data types
+
+- `UDT_TYPE`: 0
+- `UDT_SIZE`: 1
+- `UDT_LEVEL`: 2
+- `UDT_HP`: 3
+- `UDT_MAXHP`: 4
+- `UDT_SP`: 5
+- `UDT_MAXSP`: 6
+- `UDT_MASTERAID`: 7
+- `UDT_MASTERCID`: 8
+- `UDT_MAPIDXY`: 9 **(DEPRECATED)**
+- `UDT_WALKTOXY`: 10 **(DEPRECATED)**
+- `UDT_SPEED`: 11
+- `UDT_MODE`: 12
+- `UDT_AI`: 13
+- `UDT_SCOPTION`: 14
+- `UDT_SEX`: 15
+- `UDT_CLASS`: 16
+- `UDT_HAIRSTYLE`: 17
+- `UDT_HAIRCOLOR`: 18
+- `UDT_HEADBOTTOM`: 19
+- `UDT_HEADMIDDLE`: 20
+- `UDT_HEADTOP`: 21
+- `UDT_CLOTHCOLOR`: 22
+- `UDT_SHIELD`: 23
+- `UDT_WEAPON`: 24
+- `UDT_LOOKDIR`: 25
+- `UDT_CANMOVETICK`: 26
+- `UDT_STR`: 27
+- `UDT_AGI`: 28
+- `UDT_VIT`: 29
+- `UDT_INT`: 30
+- `UDT_DEX`: 31
+- `UDT_LUK`: 32
+- `UDT_ATKRANGE`: 33
+- `UDT_ATKMIN`: 34
+- `UDT_ATKMAX`: 35
+- `UDT_MATKMIN`: 36
+- `UDT_MATKMAX`: 37
+- `UDT_DEF`: 38
+- `UDT_MDEF`: 39
+- `UDT_HIT`: 40
+- `UDT_FLEE`: 41
+- `UDT_PDODGE`: 42
+- `UDT_CRIT`: 43
+- `UDT_RACE`: 44
+- `UDT_ELETYPE`: 45
+- `UDT_ELELEVEL`: 46
+- `UDT_AMOTION`: 47
+- `UDT_ADELAY`: 48
+- `UDT_DMOTION`: 49
+- `UDT_HUNGER`: 50
+- `UDT_INTIMACY`: 51
+- `UDT_LIFETIME`: 52
+- `UDT_MERC_KILLCOUNT`: 53
+- `UDT_STATPOINT`: 54
+- `UDT_ROBE`: 55
+- `UDT_BODY2`: 56
+- `UDT_GROUP`: 57
+
+### getguildonline types
+
+- `GUILD_ONLINE_ALL`: 0
+- `GUILD_ONLINE_VENDOR`: 1
+- `GUILD_ONLINE_NO_VENDOR`: 2
+
### Renewal
- `RENEWAL`: 1
@@ -17834,6 +17905,12 @@
- `Chest_Of_Death`: 22679
- `Solo_Christmas_Gift`: 22685
- `Solo_Cookie`: 22686
+- `STR_Soul_Potion`: 22702
+- `AGI_Soul_Potion`: 22703
+- `VIT_Soul_Potion`: 22704
+- `INT_Soul_Potion`: 22705
+- `DEX_Soul_Potion`: 22706
+- `LUK_Soul_Potion`: 22707
- `Bullet_Case_Blood_`: 22737
- `Bullet_Case_Silver_`: 22738
- `Sphere_Case_Wind_`: 22739
@@ -18346,6 +18423,7 @@
- `Unsealing_Token`: 25735
- `GH_Cursed_Crystal`: 25739
- `GH_Cursed_Gemstone`: 25740
+- `Inventory_Extension_Coupon`: 25793
- `Spectral_Spear_IL`: 26007
- `Rebeginer_LG_Lance`: 26015
- `Paradise_Foxtail_Staff_III`: 26101
diff --git a/doc/item_bonus.md b/doc/item_bonus.md
index b9fc17ee4..7c8547456 100644
--- a/doc/item_bonus.md
+++ b/doc/item_bonus.md
@@ -277,7 +277,7 @@ bonus3 bSubEle,`e`,`n`,`bf`; | +n% Damage reduction against element `e`.
bonus2 bAddDamageClass,`c`,`x`; | +n% extra physical damage against monsters of class `c`
bonus2 bAddMagicDamageClass,`c`,`x`; | +n% extra magical damage against monsters of class `c`
bonus2 bAddDefClass,`c`,`x`; | +n% physical damage reduction against monsters of class `c`
-bonus2 bAddMDefClass,`c`,`x`; | +n% magical damage reduction against monsters of class `c`
+bonus2 bAddMdefClass,`c`,`x`; | +n% magical damage reduction against monsters of class `c`
bonus2 bCriticalAddRace,`r`,`n`; | +`n` Critical Against race `r`
Attack/Def | Description
@@ -292,9 +292,9 @@ bonus4 bSetMDefRace,`r`,`n`,`t`,`y`; | Set MDEF to `y` of an enemy of race `r`
Ignore Def | Description
:-------------------------------- | :-------------------------
bonus bIgnoreDefRace,`r`; | Disregard DEF against enemies of race `r`
-bonus bIgnoreMDefRace,`r`; | Disregard MDEF against enemies of race `r`
+bonus bIgnoreMdefRace,`r`; | Disregard MDEF against enemies of race `r`
bonus bIgnoreDefEle,`e`; | Disregard DEF against enemies of element `e`
-bonus bIgnoreMDefEle,`e`; | Disregard MDEF against enemies of element `e`
+bonus bIgnoreMdefEle,`e`; | Disregard MDEF against enemies of element `e`
bonus2 bIgnoreDefRate,`r`,`n`; | Disregard `n`% of the target's DEF if the target belongs to race `r`
bonus2 bIgnoreMdefRate,`r`,`n`; | Disregard `n`% of the target's MDEF if the target belongs to race `r`
bonus bIgnoreMdefRate,`n`; | Disregard `n`% of the target's MDEF
diff --git a/doc/mob_db.txt b/doc/mob_db.txt
index 29d2ab465..d62181048 100644
--- a/doc/mob_db.txt
+++ b/doc/mob_db.txt
@@ -63,10 +63,14 @@ mob_db: (
MvpExp: mvp experience (int, defaults to 0)
MvpDrops: {
AegisName: chance (string: int)
+ // or
+ AegisName: (chance, "Option Drop Group")
// ...
}
Drops: {
- AegisName: chance (string: int)
+ AegisName: chance (string: int)
+ // or
+ AegisName: (chance, "Option Drop Group")
// ...
}
},
@@ -199,21 +203,55 @@ MvpExp: Base Experience given by the monster to the player who inflict more atta
MvpDrops: Sets monster mvp drops list. Requires to have MvpExp to trigger.
- Accepted values are AegisName as defined on item_db.conf and a chance.
+ There are two ways to define a drop:
+ 1) The first one is used for simple drops and uses the item AegisName
+ as defined on item_db.conf and a chance.
+ Format:
+ AegisName: chance
Chance is an integer from 1 to 10000 (10000 = 100%).
- Required format:
- MvpDrops: {
- AegisName: chance
- // ...
- }
- When not specified, becomes false.
+
+ 2) The second way to define a drop allows setting a random option drop
+ group to be used by this drop.
+ Format:
+ AegisName: (chance, "Option Drop Group")
+
+ The item drop chance refers to the chance of dropping this item, same as chance in the first option.
+ the "Option Drop Group" parameter refers to an entry on option_drop_group database file. The specified
+ entry will be used when this item is dropped in order to add random options to the dropped equipment.
+
+ A monster drop list may use both format for different items.
+ Required Format:
+ Drops: {
+ AegisName: chance
+ // or
+ AegisName: (chance, "Option Drop Group")
+ }
+
+ When not specified, becomes false (no drops).
Drops: Sets monster drops list.
- Accepted values are AegisName as defined on item_db.conf and a chance.
+ There are two ways to define a drop:
+ 1) The first one is used for simple drops and uses the item AegisName
+ as defined on item_db.conf and a chance.
+ Format:
+ AegisName: chance
Chance is an integer from 1 to 10000 (10000 = 100%).
- Required format:
- Drops: {
- AegisName: chance
- // ...
- }
- When not specified, becomes false.
+
+ 2) The second way to define a drop allows setting a random option drop
+ group to be used by this drop.
+ Format:
+ AegisName: (chance, "Option Drop Group")
+
+ The item drop chance refers to the chance of dropping this item, same as chance in the first option.
+ the "Option Drop Group" parameter refers to an entry on option_drop_group database file. The specified
+ entry will be used when this item is dropped in order to add random options to the dropped equipment.
+
+ A monster drop list may use both format for different items.
+ Required Format:
+ Drops: {
+ AegisName: chance
+ // or
+ AegisName: (chance, "Option Drop Group")
+ }
+
+ When not specified, becomes false (no drops).
diff --git a/doc/option_drop_group.md b/doc/option_drop_group.md
new file mode 100644
index 000000000..325cf9fe2
--- /dev/null
+++ b/doc/option_drop_group.md
@@ -0,0 +1,97 @@
+# Option Drop Group Database
+
+## Description
+Explanation of the `db/option_drop_groups.conf` file and structure.
+
+This database file allows the creation of groups of random options
+that will be added to certain equipments when dropped. After creating
+a group in this database file, you may set up drops in `mob_db` to use
+it in order to get items with these options. For more information on
+adding option drop groups to `mob_db`, check `doc/mob_db.txt` documentation file.
+
+Each item may have up to `MAX_ITEM_OPTION` options at the same time,
+in this document, each of these independent options will be called
+`option slot`. One drop group will define the possibilities of random
+options for each of these slots.
+
+## Entries Format
+
+```
+<Group Name Constant>: (
+ { // Option Slot 1
+ Rate: (int) chance of filling option slot 1 (100 = 1%)
+
+ // Possible options for slot 1
+ // min/max value : int, defaults to 0
+ // chance : int, 100 = 1% if not set, will be 100%/number of possibiltiies
+ OptionName: value
+ // or
+ OptionName: [min value, max value]
+ // or
+ OptionName: [min value, max value, chance]
+ // ... (as many as you want)
+ },
+ // ... (up to MAX_ITEM_OPTION)
+),
+```
+
+### `Group Name Constant`
+This is the group name, it is how this group is referenced in other files
+(e.g. mob_db). It must be globally unique, as it is a server constant, and
+must contain only letters, numbers and " _ ".
+
+### `Rate`
+This is the chance of this option slot to drop. In other words, this is the
+chance of getting this slot filled with something, where something is given
+by the list of `OptionName` that follows.
+
+Rate is an integer value where 100 means 1%.
+
+### `OptionName`
+Adds `OptionName` as one option that may fill this slot when it drops.
+
+The details of this option may be specified in one of 3 ways:
+
+#### `OptionName: value`
+The chance of this option being picked is auto calculated (see below),
+and if this option is chosen, its value will be `value`.
+
+#### `OptionName: [min, max]`
+The chance of this option being picked is auto calculated (see below),
+and if this option is chosen, its value will be a random integer between
+`min` and `max` (both included).
+
+#### `OptionName: [min, max, chance]`
+The chance of this option being picked is `chance`, and if this option is chosen,
+its value will be a random integer between `min` and `max` (both included).
+
+#### Auto calculated chances
+When chance is not specified in an option, it will be auto calculated by
+the server as being `100%/num`, when `num` is the number of possibilities
+in this option slot.
+
+For example, if you specify 3 possible options, all of them without
+a `chance` defined, all of them will have 33.33% chance of being
+picked (100%/3). If you set the chance of one of them to 50%, you
+will have one option with 50% chance, and each of the others with
+33.33% chance.
+
+## Example
+```
+MYITEM: (
+ { // Option Slot 1
+ Rate: 10000 // It has 100% of chance of being filled
+
+ // This slot may have one of the following options:
+ WEAPON_ATTR_WIND: 5, // WEAPON_ATTR_WIND Lv5 (33.33%)
+ WEAPON_ATTR_GROUND: [2, 4] // WEAPON_ATTR_GROUND Lv 2~4 (33.33%)
+ WEAPON_ATTR_POISON: [1, 4, 8000] // WEAPON_ATTR_POISON Lv 1~4 (80%)
+ },
+ { // Option Slot 2
+ Rate: 5000 // It has 50% of chance of being filled
+
+ // If filled, may have one of the following options:
+ WEAPON_ATTR_WATER: 4 // WEAPON_ATTR_WATER Lv4 (100%)
+ }
+)
+```
diff --git a/doc/sample/npc_trader_sample.txt b/doc/sample/npc_trader_sample.txt
index 0d50af8c5..24c53330b 100644
--- a/doc/sample/npc_trader_sample.txt
+++ b/doc/sample/npc_trader_sample.txt
@@ -56,3 +56,11 @@ OnMyResupply:
sellitem Red_Potion,-1,49;
end;
}
+/* demonstrate barter shop */
+prontera,159,284,4 trader Barter Shop#prt 4_M_KID1,{
+OnInit:
+ tradertype(NST_BARTER);
+ sellitem White_Herb, 100, Red_Potion, 2;
+ sellitem Blue_Herb, 200, Orange_Potion, 3;
+ end;
+}
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 4d2517efa..a08d8a71c 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -266,8 +266,8 @@ direction across Y. Walking into that area will trigger the NPC. If no
'OnTouch:' special label is present in the NPC code, the execution will
start from the beginning of the script, otherwise, it will start from the
'OnTouch:' label. Monsters can also trigger the NPC, though the label
-'OnTouchNPC:' is used in this case. If player left area npc will called
-if present label 'OnUnTouch'.
+'OnTouchNPC:' is used in this case, and using mobattached() will return
+monster GID. If player left the area will trigger the label 'OnUnTouch'.
The code part is the script code that will execute whenever the NPC is
triggered. It may contain commands and function calls, descriptions of
@@ -323,10 +323,12 @@ The types that a trader object can have are the following:
- NST_MARKET (2) Normal NPC Market Shop (where items have limited availability
and need to be refurbished)
- NST_CUSTOM (3) Custom Shop (any currency, item/var/etca, check sample)
+- NST_BARTER (4) Barter Shop (each item with own item currency)
Unless otherwise specified via *tradertype an trader object will be defined as
NST_ZENY.
Note: NST_MARKET is only available with PACKETVER 20131223 or newer.
+Note: NST_BARTER is only available with PACKETVER 20181226 zero or newer.
See '12 - NPC Trader-Related Commands' and /doc/sample/npc_trader_sample.txt for
more information regarding how to use this NPC type.
@@ -714,8 +716,11 @@ MAX_BANK_ZENY - Maximum Zeny in the bank
MAX_BG_MEMBERS - Maximum BattleGround members
MAX_CHAT_USERS - Maximum Chat users
MAX_REFINE - Maximum Refine level
+MAX_ITEM_ID - Maximum Item ID
MAX_MENU_OPTIONS - Maximum NPC menu options
MAX_MENU_LENGTH - Maximum NPC menu string length
+MOB_CLONE_START - Clone ID start from this range
+MOB_CLONE_END - Clone ID end with this range
Send targets and status options are also hard-coded and can be found
in 'doc/constants.md'.
@@ -1226,7 +1231,7 @@ you have to set it back to black unless you want all the rest of the text be in
that color:
mes("This is ^FF0000 red ^000000 and this is ^00FF00 green, ^000000 so.");
- mes(callfunc("F_MesColor", C_BLUE) +"This message is now in BLUE");
+ mesf("%sThis message is now in BLUE.", F_MesColor(C_BLUE));
Notice that the text coloring is handled purely by the client. If you use
non-English characters, the color codes might get screwed if they stick to
@@ -1250,6 +1255,14 @@ This will allow you to visit 'Google' with the in-game browser using default dim
Clicking 'Bing!' will open the in-game browser using the specified dimensions. (800x600)
+If you're using client from 2013-01-30 onwards, you can also use <ITEMLINK> to show
+the item's description. Gravity changed this into <ITEM> since 2015-07-29 onwards.
+
+ mes("Bring me an <ITEM>Apple<INFO>512</INFO></ITEM>.");
+ mesf("Bring me an %s.", F_MesItemInfo(Apple));
+
+This will show the item name and a clickable link for the item description.
+
---------------------------------------
*mesf("<format>"{, <param>{, <param>{, ...}}})
@@ -1288,6 +1301,21 @@ and the script will terminate.
---------------------------------------
+*mesclear();
+
+This command will clear the dialog text and continue the script without player interaction.
+
+Example:
+ mes("This is how the 'mesclear' script command works.");
+ sleep2 3000;
+ mesclear(); // This will clear the dialog and continue to the next one.
+ mes("I will show you again.");
+ sleep2 3000;
+ mesclear(); // This will clear the dialog and continue to the next one.
+ mes("Bye!");
+
+---------------------------------------
+
*close()
This command will create a 'close' button in the message window for the
@@ -3111,6 +3139,7 @@ invoking character has in its inventory, including all the data needed to
recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_id[] - array of item ids.
+@inventorylist_idx[] - array of item inventory index.
@inventorylist_amount[] - their corresponding item amounts.
@inventorylist_equip[] - will return the slot the item is equipped on, if at all.
@inventorylist_refine[] - for how much it is refined.
@@ -3123,7 +3152,8 @@ recreate these items perfectly if they are destroyed. Here's what you get:
made by a specific craftsman.
@inventorylist_expire[] - expire time (Unix time stamp). 0 means never
expires.
-@inventorylist_bound - whether it is an account bounded item or not.
+@inventorylist_bound[] - whether it is an account bounded item or not.
+@inventorylist_favorite[] - whether it is favorite (inside favorite tab) or not.
@inventorylist_count - the number of items in these lists.
This could be handy to save/restore a character's inventory, since no
@@ -3381,11 +3411,12 @@ argument is omitted, it will try to use the map of the attached NPC, or the
map of the attached player if the NPC can't be found.
Valid <info> are:
- MAPINFO_NAME name of the map
- MAPINFO_ID numeric ID of the map
- MAPINFO_ZONE name of the zone used by the map
- MAPINFO_SIZE_X width of the map (cells on the x axis)
- MAPINFO_SIZE_Y height of the map (cells on the y axis)
+ MAPINFO_NAME name of the map
+ MAPINFO_ID numeric ID of the map
+ MAPINFO_ZONE name of the zone used by the map
+ MAPINFO_SIZE_X width of the map (cells on the x axis)
+ MAPINFO_SIZE_Y height of the map (cells on the y axis)
+ MAPINFO_NPC_COUNT total number of NPC in the map
Examples:
getmapinfo(MAPINFO_ID, "map name"); // ID from name
@@ -3527,20 +3558,21 @@ Examples :
---------------------------------------
-*gettimestr(<format string>, <max length>)
+*gettimestr(<format string>, <max length>{, <timestamp>})
This function will return a string containing time data as specified by
the format string.
-This uses the C function 'strfmtime', which obeys special format
+This uses the C function 'strftime', which obeys special format
characters. For a full description see, for example, the description of
-'strfmtime' at http://www.delorie.com/gnu/docs/glibc/libc_437.html
+'strftime' at http://www.delorie.com/gnu/docs/glibc/libc_437.html
All the format characters given in there should properly work.
Max length is the maximum length of a time string to generate.
The example given in Hercules sample scripts works like this:
mes(gettimestr("%Y-%m/%d %H:%M:%S", 21));
+ mes(gettimestr("%Y-%m/%d %H:%M:%S", 21, getcalendartime(0, 0)));
This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'.
@@ -3769,6 +3801,18 @@ getarraysize(), because it is not cleared between runs of getguildmember().
For usage examples, see getpartymember().
---------------------------------------
+
+*getguildonline(<guild id>{, <type>});
+
+Returns the amount of players online in the specified guild id.
+Returns -1 if the guild was not found.
+
+Valid <type> are:
+ GUILD_ONLINE_ALL Returns the total amount of players online in the guild.
+ GUILD_ONLINE_VENDOR Returns the total amount of vendors online in the guild.
+ GUILD_ONLINE_NO_VENDOR Returns the total amount of non-vendors online in the guild.
+
+---------------------------------------
//=====================================
2.2 - End of Guild-Related Commands
//=====================================
@@ -3829,26 +3873,34 @@ how many skills a character has.
*getpetinfo(<type>)
-This function will return pet information for the pet the invoking
-character currently has active. Valid types are:
-
- 0 - Unique pet ID number as stored by the char server and distinguishing
- it from all other pets the characters actually have. This value is
- currently useless, at most you can use it to tell pets apart reliably.
- 1 - Pet class number as per 'db/pet_db.txt' - will tell you what kind of
- a pet it is.
- 2 - Pet name. Will return "null" if there's no pet.
- 3 - Pet friendly level (intimacy score). 1000 is full loyalty.
- 4 - Pet hungry level. 100 is completely full.
- 5 - Pet rename flag. 0 means this pet has not been named yet.
+This command will return the currently active pet information of the invoking character.
+These fields are associate in 'db/(pre-)re/pet_db.conf'. Valid types are:
-If the invoking player doesn't own a pet, this command will return
-"null" for type 2, and return 0 for other types.
+ PETINFO_ID - Pet Database ID, stored in `pet` table to distinguish from other pets.
+ PETINFO_CLASS - Pet class ID. (Id field)
+ PETINFO_NAME - Pet Name, return "null" if there's no active pet.
+ PETINFO_INTIMACY - Pet Intimacy level. 1000 is full loyalty.
+ PETINFO_HUNGRY - Pet hungry level. 100 is completely full.
+ PETINFO_RENAME - Pet rename flag. 0 means this pet has not been named yet.
+ PETINFO_GID - Pet Game ID
+ PETINFO_EGGITEM - Pet EggItem
+ PETINFO_FOODITEM - Pet FoodItem
+ PETINFO_ACCESSORYITEM - Pet AccessoryItem
+ PETINFO_ACCESSORYFLAG - return 1 if the pet currently equipping accessory, return 0 otherwise.
+ PETINFO_EVO_EGGID - Pet Evolve EggID
+ PETINFO_AUTOFEED - Pet AutoFeed flag.
+
+If the invoking player doesn't own a pet, this command will
+return "null" for type PETINFO_NAME, and return 0 for other types.
---------------------------------------
*petstat(<flag>)
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
Returns current pet status, all are integers except name.
Returns 0 or "" if the player doesn't have pets.
@@ -3862,6 +3914,9 @@ PET_INTIMATE
Example:
.@i = petstat(PET_CLASS);
+This command is deprecated and it should not be used in new scripts, as it is
+likely to be removed at a later time. Please use 'getpetinfo' instead.
+
---------------------------------------
*getmonsterinfo(<mob ID>, <type>)
@@ -4439,11 +4494,14 @@ if <color> field is left out.
---------------------------------------
-*showscript("<message>"{, <GID>})
+*showscript("<message>"{, <GID>{, <send_target>}})
Makes the attached player or GID, display a message similiar to a chat,
this will be seen by everyone near the invoking character but will not
be displayed in the chat window.
+send_target: (optional)
+ AREA: show the message to everyone within the view range (default)
+ SELF: show the message to the given unit GID only
---------------------------------------
@@ -5315,6 +5373,34 @@ Check getitem2() to understand its expanded parameters.
---------------------------------------
+*delitemidx(<index>{, <amount>{, <account id>}})
+
+This command will remove an item at the given inventory index. Unlike the
+'delitem()' counterpart, this doesn't check invalid Item ID, making it useful to remove
+invalid item IDs in player's inventory.
+
+If <amount> is not specified, this will remove all of the items at the specified index.
+Note that items with the 'ForceSerial' flag, not yet merged through 'mergeitem()', will only
+be removed at the given index.
+
+The only way to get the inventory index is by using 'getinventorylist()'. After deleting
+an item at the given index, that index can remain empty until the player relogs, so you
+should recall 'getinventorylist()' again. If you try to delete an item at an invalid index, the
+script will terminate with an error.
+
+This command is also useful to remove rental/bound items because 'delitem()'
+does not discriminate at choosing which item to remove.
+
+Example:
+
+ // This will remove all invalid Item ID in player's inventory
+ getinventorylist();
+ for (.@i = 0; .@i < @inventorylist_count; ++.@i)
+ if (getiteminfo(@inventorylist_id[.@i], ITEMINFO_TYPE) == -1)
+ delitemidx(@inventorylist_idx[.@i]);
+
+---------------------------------------
+
*countitem(<item id>)
*countitem("<item name>")
@@ -5342,6 +5428,30 @@ Check getitem2() to understand the arguments of the function.
---------------------------------------
+*countnameditem(<item id>, "<character name>")
+*countnameditem(<item id>, <character ID>)
+*countnameditem("<item name>", "<character name>")
+*countnameditem("<item name>", <character ID>)
+
+This function will return the number of signed items for the specified item ID
+that the invoking character has in their inventory.
+
+ mes("[Item Checker]");
+ if (countnameditem(Apple) > 0) {
+ mes("You have an apple with your name on it!");
+ } else {
+ mes("You do not have an apple with your name on it.");
+ }
+ next();
+ mes("[Item Checker]");
+ mesf("You have %d apples with John's name on it!", countnameditem(Apple, "John"));
+ close();
+
+Like getnameditem(), this function will also accept an 'english name' from the
+database as an argument.
+
+---------------------------------------
+
*groupranditem(<item id>)
Returns the item_id of a random item picked from the item container specified. There
@@ -6056,6 +6166,22 @@ Amount can be negative. See statusup().
---------------------------------------
+*needed_status_point(<type>, <val>);
+
+Returns the number of stat points needed to change the specified stat <type> by <val>.
+If <val> is negative, returns the number of stat points that would be needed to
+raise the specified stat from (current value - <val>) to current value.
+
+List of <type>:
+bStr - Strength
+bVit - Vitality
+bInt - Intelligence
+bAgi - Agility
+bDex - Dexterity
+bLuk - Luck
+
+---------------------------------------
+
*bonus(<bonus type>, <val1>)
*bonus2(<bonus type>, <val1>, <val2>)
*bonus3(<bonus type>, <val1>, <val2>, <val3>)
@@ -6298,7 +6424,7 @@ Examples:
setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL, true);
// Re-enables attack, skills and item use
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM, false);
// checkpcblock related checks
if ((checkpcblock() & PCBLOCK_IMMUNE) != 0)
@@ -6449,7 +6575,7 @@ This command will kill all monsters that were spawned with monster() or
areamonster() and have a specified event label attached to them. Commonly
used to get rid of remaining quest monsters once the quest is complete.
-If the label is given as "All", all monsters which have their respawn
+If the label is given as "all", all monsters which have their respawn
times set to -1 (like all the monsters summoned with 'monster' or
'areamonster' script command, and all monsters summoned with GM commands,
but no other ones - that is, all non-permanent monsters) on the specified
@@ -6471,6 +6597,14 @@ other number for this parameter won't be recognized.
---------------------------------------
+*killmonstergid(<GID>);
+
+This command will kill the specific monster GID. The difference between
+this command and 'unitkill', is this command does not trigger monster's
+event label.
+
+---------------------------------------
+
*strmobinfo(<type>, <monster id>)
This function will return information about a monster record in the
@@ -6559,6 +6693,17 @@ will run as if by donpcevent().
---------------------------------------
+*mobattached()
+
+This command will return RID of the monster running from 'OnTouchNPC:' label.
+
+
+// Kill any monster entering npc's trigger area
+OnTouchNPC:
+ killmonstergid mobattached();
+
+---------------------------------------
+
*homevolution()
This command will try to evolve the current player's homunculus.
@@ -7703,6 +7848,10 @@ solution rather than sending the map and the monster_id.
*debugmes("<format string>"{, <param>{, ...}})
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
This command will print a message in the server console (map-server window),
after applying the same format-string replacements as sprintf(). It will not be
displayed anywhere else. Returns true on success.
@@ -7716,6 +7865,29 @@ Example:
---------------------------------------
+*consolemes("<type>", "<format string>"{,<param>{, ...}})
+
+This command will print a message in the server console (map-server window),
+after applying the same format-string replacements as sprintf(). It will not be
+displayed anywhere else. Returns true on success.
+
+List of available <type> are:
+ CONSOLEMES_DEBUG = 0
+ CONSOLEMES_ERROR = 1
+ CONSOLEMES_WARNING = 2
+ CONSOLEMES_INFO = 3
+ CONSOLEMES_STATUS = 4
+ CONSOLEMES_NOTICE = 5
+
+Example:
+
+ // Displays "NAME has clicked me!" in the map-server window.
+ consolemes(CONSOLEMES_DEBUG, "%s has clicked me!", strcharinfo(PC_NAME));
+
+ consolemes(CONSOLEMES_DEBUG, "\033[0;32mHello World"); // supports ANSI escape sequences
+
+---------------------------------------
+
*logmes("<message>"{, <log type>})
This command will write the message given to the map server log files, as
@@ -8429,6 +8601,18 @@ Example:
---------------------------------------
+*cap_value(<number>, <min>, <max>)
+
+Returns the number but capped between <min> and <max>.
+
+Example:
+ // capped between 0 ~ 100
+ .@value = cap_value(10, 0, 100); // .@value will be equal to 10
+ .@value = cap_value(1000, 0, 100); // .@value will be equal to 100
+ .@value = cap_value(-10, 3, 100); // .@value will be equal to 3
+
+---------------------------------------
+
*md5("<string>")
Returns the md5 checksum of a number or string.
@@ -9583,6 +9767,11 @@ is run when they relog.
<On Death Event> refers to an NPC label that attaches to the character and
is run when they die. Can be "" for empty.
+If "-" is supplied for <mapname>, this will remove the 1 second automatic
+respawn on the battleground map. This allows for better manipulation of
+<On Death Event>. The player will have to be warped to desired location
+at the end of <On Death Event>.
+
Unlike the prior command, the latter will attach a GROUP in a waiting room
to the battleground, and sets the array $@arenamembers[0] where 0 holds
the IDs of the first group, and 1 holds the IDs of the second.
@@ -9714,6 +9903,8 @@ mapflag%TAB%<map_name>%TAB%battleground%TAB%2
This command will create a new BG Team.
When player dies, they will be respawned map_name,X,Y as mentioned.
+If "-" is supplied for the map name, this will remove the 1 second automatic
+respawn on the battleground map.
Command will return -1 if BG Creation is failed,
else it will return the BG ID(Also known as TeamID).
@@ -9803,17 +9994,18 @@ If char id is given, the information of that character is retrieved
instead. Type specifies what information to retrieve and can be one of the
following:
- 0 - Database ID
- 1 - Class
- 2 - Name
- 3 - Faith value for this mercenary's guild, if any
- 4 - Calls value for this mercenary's guild, if any
- 5 - Kill count
- 6 - Remaining life time in msec
- 7 - Level
+ MERCINFO_ID - Mercenary Database ID
+ MERCINFO_CLASS - Mercenary Class
+ MERCINFO_NAME - Mercenary Name
+ MERCINFO_FAITH - Mercenary faith value for this mercenary's guild, if any
+ MERCINFO_CALLS - Mercenary calls value for this mercenary's guild, if any
+ MERCINFO_KILLCOUNT - Mercenary kill count
+ MERCINFO_LIFETIME - Mercenary remaining life time in mili-second
+ MERCINFO_LEVEL - Mercenary Level
+ MERCINFO_GID - Mercenary Game ID
-If the character does not have a mercenary, the command returns ""
-for name and 0 for all other types.
+If the character does not have a mercenary, the command returns "" for MERCINFO_NAME
+and 0 for all other types.
---------------------------------------
//=====================================
@@ -9944,6 +10136,7 @@ when the optional NPC_Name param is used.
---------------------------------------
*sellitem(<Item_ID>{, <price>{, <qty>}})
+*sellitem(<Item_ID>, <qty>, <currency_id>, <currency_amount>)
adds (or modifies) <Item_ID> data to the shop,
when <price> is not provided (or when it is -1) itemdb default is used.
@@ -9952,11 +10145,15 @@ qty is only necessary for NST_MARKET trader types.
when <Item_ID> is already in the shop,
the previous data (price/qty), is overwritten with the new.
+currency_id and currency_amount can be used only with shop type NST_BARTER
+
---------------------------------------
*stopselling(<Item_ID>)
+*stopselling(<Item_ID>{, <currency_id>, <currency_amount>})
attempts to remove <Item_ID> from the current shop list.
+currency_id and currency_amount can be used only with shop type NST_BARTER
---------------------------------------
@@ -9995,133 +10192,131 @@ Returns the amount of still-available <Item_ID> in the shop (on a NST_MARKET tra
---------------------------------------
-*setunitdata(<GUID>, <DataType>, <Val1> {,<Val2>,<Val3>})
+*setunitdata(<GID>, <DataType>, <Val>)
Sets or alters the data in real-time for game objects of the following types -
NPCs, Pets, Monsters, Homunuculus', Mercenaries, Elementals.
Applicable Data Types (available as constants) -
Data Types Description (parameter type)
- UDT_SIZE: Unit Size (int)
- UDT_LEVEL: Level (int)
- UDT_HP: Current HP (int)
- UDT_MAXHP: Max HP (int)
- UDT_SP: SP (int)
- UDT_MAXSP: MAX SP (int)
- UDT_MASTERAID: Master Account ID (for Summons) (int)
- UDT_MASTERCID: Master Char ID (for Summons) (int)
- UDT_MAPIDXY: Warp a Unit to a map. (Val1 = (string) MapName, Val2 = (int) x, Val3 = (int) y)
- UDT_WALKTOXY: Make a unit walk to certain co-ordinates. (Val1 = (int) x, Val2 = (int) y)
- UDT_SPEED: Unit Speed. (int)
- UDT_MODE: Mode (Mobs only) (int)
+ UDT_SIZE: Unit Size
+ UDT_LEVEL: Level
+ UDT_HP: Current HP
+ UDT_MAXHP: Max HP
+ UDT_SP: SP
+ UDT_MAXSP: MAX SP
+ UDT_MASTERAID: Master Account ID (for Summons)
+ UDT_MASTERCID: Master Char ID (for Summons)
+ UDT_SPEED: Unit Speed.
+ UDT_MODE: Mode (Mobs only)
UDT_AI: Unit AI Type (see doc/constants.md for Unit AI Types)
UDT_SCOPTION: Status Options. (see doc/constants.md for Unit Option Types)
UDT_SEX: Gender of the unit. (see doc/constants.md for Genders)
- UDT_CLASS: Class of the unit. (Monster ID) (int)
- UDT_HAIRSTYLE: Hair Style ID. (int)
- UDT_HAIRCOLOR: Hair Color ID. (int)
- UDT_HEADBOTTOM: Headgear Bottom Sprite ID. (int)
- UDT_HEADMIDDLE: Headgear Middle Sprite ID. (int)
- UDT_HEADTOP: Headgear Top Sprite ID. (int)
- UDT_CLOTHCOLOR: Cloth Color ID. (int)
- UDT_SHIELD: Shield Sprite ID. (int)
- UDT_WEAPON: Weapon Sprite ID. (int)
- UDT_LOOKDIR: Face direction. (int)
- UDT_CANMOVETICK: Stop a unit from move for n seconds. (int)
- UDT_STR: Unit STR. (int)
- UDT_AGI: Unit AGI. (int)
- UDT_VIT: Unit VIT. (int)
- UDT_INT: Unit INT. (int)
- UDT_DEX: Unit DEX. (int)
- UDT_LUK: Unit LUK. (int)
- UDT_ATKRANGE: Attack range of a unit. (int)
- UDT_ATKMIN: Min Atk of a unit. (int)
- UDT_ATKMAX: Max Atk of a unit. (int)
- UDT_MATKMIN: Min MATK of a unit. (int)
- UDT_MATKMAX: Max MATK of a unit. (int)
- UDT_DEF: DEF. (int)
- UDT_MDEF: MDEF. (int)
- UDT_HIT: HIT. (int)
- UDT_FLEE: FLEE. (int)
- UDT_PDODGE: Perfect Dodge. (int)
- UDT_CRIT: Critical Rate. (int)
- UDT_RACE: Race. (Eg. string constants RC_DemiHuman or Integer 7).
- UDT_ELETYPE: Element. (Eg. string constants Ele_Neutral or Integer 0).
- UDT_ELELEVEL: Element Level (int).
- UDT_AMOTION: AMotion Rate (int).
- UDT_ADELAY: ADelay Rate (int).
- UDT_DMOTION: DMotion Rate (int).
- UDT_HUNGER: Hunger Rate (int) - for summons.
- UDT_INTIMACY: Intimacy Rate (int) - for summons.
- UDT_LIFETIME: LifeTime (int) - for summons.
- UDT_MERC_KILLCOUNT: Kill count for mercenaries (int).
- UDT_STATADD: Status Points (int) - for NPCs.
+ UDT_CLASS: Class of the unit. (Monster ID)
+ UDT_HAIRSTYLE: Hair Style ID.
+ UDT_HAIRCOLOR: Hair Color ID.
+ UDT_HEADBOTTOM: Headgear Bottom Sprite ID.
+ UDT_HEADMIDDLE: Headgear Middle Sprite ID.
+ UDT_HEADTOP: Headgear Top Sprite ID.
+ UDT_CLOTHCOLOR: Cloth Color ID.
+ UDT_SHIELD: Shield Sprite ID.
+ UDT_WEAPON: Weapon Sprite ID.
+ UDT_LOOKDIR: Face direction.
+ UDT_CANMOVETICK: Stop a unit from move for n seconds.
+ UDT_STR: Unit STR.
+ UDT_AGI: Unit AGI.
+ UDT_VIT: Unit VIT.
+ UDT_INT: Unit INT.
+ UDT_DEX: Unit DEX.
+ UDT_LUK: Unit LUK.
+ UDT_ATKRANGE: Attack range of a unit.
+ UDT_ATKMIN: Min Atk of a unit.
+ UDT_ATKMAX: Max Atk of a unit.
+ UDT_MATKMIN: Min MATK of a unit.
+ UDT_MATKMAX: Max MATK of a unit.
+ UDT_DEF: DEF.
+ UDT_MDEF: MDEF.
+ UDT_HIT: HIT.
+ UDT_FLEE: FLEE.
+ UDT_PDODGE: Perfect Dodge.
+ UDT_CRIT: Critical Rate.
+ UDT_RACE: Race. (Eg. constants RC_DemiHuman or Integer 7).
+ UDT_ELETYPE: Element. (Eg. constants Ele_Neutral or Integer 0).
+ UDT_ELELEVEL: Element Level.
+ UDT_AMOTION: AMotion Rate.
+ UDT_ADELAY: ADelay Rate.
+ UDT_DMOTION: DMotion Rate.
+ UDT_HUNGER: Hunger Rate - for summons.
+ UDT_INTIMACY: Intimacy Rate - for summons.
+ UDT_LIFETIME: LifeTime - for summons.
+ UDT_MERC_KILLCOUNT: Kill count for mercenaries
+ UDT_STATADD: Status Points - for NPCs.
+ UDT_GROUP: group id
returns 0 if value could not be set, 1 if successful.
---------------------------------------
-*getunitdata (<GUID>,<DataType>{,<Variable>})
+*getunitdata (<GID>,<DataType>)
-Retrieves real-time data of a game object. For data with multiple return values,
-an array variable may be passed to store the data in.
+Retrieves real-time data of a game object.
Applicable Data types (available as constants) -
Data Types Description (return type)
- UDT_SIZE: Unit Size (int)
- UDT_LEVEL: Level (int)
- UDT_HP: Current HP (int)
- UDT_MAXHP: Max HP (int)
- UDT_SP: SP (int)
- UDT_MAXSP: MAX SP (int)
- UDT_MASTERAID: Master Account ID (for Summons) (int)
- UDT_MASTERCID: Master Char ID (for Summons) (int)
- UDT_MAPIDXY: Warp a Unit to a map. (Val1 = (string) MapName, Val2 = (int) x, Val3 = (int) y)
- UDT_SPEED: Unit Speed. (int)
- UDT_MODE: Mode (Mobs only) (int)
+ UDT_SIZE: Unit Size
+ UDT_LEVEL: Level
+ UDT_HP: Current HP
+ UDT_MAXHP: Max HP
+ UDT_SP: SP
+ UDT_MAXSP: MAX SP
+ UDT_MASTERAID: Master Account ID (for Summons)
+ UDT_MASTERCID: Master Char ID (for Summons)
+ UDT_SPEED: Unit Speed.
+ UDT_MODE: Mode (Mobs only)
UDT_AI: Unit AI Type (see doc/constants.md for Unit AI Types)
UDT_SCOPTION: Status Options. (see doc/constants.md for Unit Option Types)
UDT_SEX: Gender of the unit. (see doc/constants.md for Genders)
- UDT_CLASS: Class of the unit. (Monster ID) (int)
- UDT_HAIRSTYLE: Hair Style ID. (int)
- UDT_HAIRCOLOR: Hair Color ID. (int)
- UDT_HEADBOTTOM: Headgear Bottom Sprite ID. (int)
- UDT_HEADMIDDLE: Headgear Middle Sprite ID. (int)
- UDT_HEADTOP: Headgear Top Sprite ID. (int)
- UDT_CLOTHCOLOR: Cloth Color ID. (int)
- UDT_SHIELD: Shield Sprite ID. (int)
- UDT_WEAPON: Weapon Sprite ID. (int)
- UDT_LOOKDIR: Face direction. (int)
- UDT_CANMOVETICK: Stop a unit from move for n seconds. (int)
- UDT_STR: Unit STR. (int)
- UDT_AGI: Unit AGI. (int)
- UDT_VIT: Unit VIT. (int)
- UDT_INT: Unit INT. (int)
- UDT_DEX: Unit DEX. (int)
- UDT_LUK: Unit LUK. (int)
- UDT_ATKRANGE: Attack range of a unit. (int)
- UDT_ATKMIN: Min Atk of a unit. (int)
- UDT_ATKMAX: Max Atk of a unit. (int)
- UDT_MATKMIN: Min MATK of a unit. (int)
- UDT_MATKMAX: Max MATK of a unit. (int)
- UDT_DEF: DEF. (int)
- UDT_MDEF: MDEF. (int)
- UDT_HIT: HIT. (int)
- UDT_FLEE: FLEE. (int)
- UDT_PDODGE: Perfect Dodge. (int)
- UDT_CRIT: Critical Rate. (int)
- UDT_RACE: Race. (Eg. string constants RC_DemiHuman or Integer 7).
- UDT_ELETYPE: Element. (Eg. string constants Ele_Neutral or Integer 0).
- UDT_ELELEVEL: Element Level (int).
- UDT_AMOTION: AMotion Rate (int).
- UDT_ADELAY: ADelay Rate (int).
- UDT_DMOTION: DMotion Rate (int).
- UDT_HUNGER: Hunger Rate (int) - for summons.
- UDT_INTIMACY: Intimacy Rate (int) - for summons.
- UDT_LIFETIME: LifeTime (int) - for summons.
- UDT_MERC_KILLCOUNT: Kill count for mercenaries (int).
-
-returns 0 if value could not be retrieved.
+ UDT_CLASS: Class of the unit. (Monster ID)
+ UDT_HAIRSTYLE: Hair Style ID.
+ UDT_HAIRCOLOR: Hair Color ID.
+ UDT_HEADBOTTOM: Headgear Bottom Sprite ID.
+ UDT_HEADMIDDLE: Headgear Middle Sprite ID.
+ UDT_HEADTOP: Headgear Top Sprite ID.
+ UDT_CLOTHCOLOR: Cloth Color ID.
+ UDT_SHIELD: Shield Sprite ID.
+ UDT_WEAPON: Weapon Sprite ID.
+ UDT_LOOKDIR: Face direction.
+ UDT_CANMOVETICK: Stop a unit from move for n seconds.
+ UDT_STR: Unit STR.
+ UDT_AGI: Unit AGI.
+ UDT_VIT: Unit VIT.
+ UDT_INT: Unit INT.
+ UDT_DEX: Unit DEX.
+ UDT_LUK: Unit LUK.
+ UDT_ATKRANGE: Attack range of a unit.
+ UDT_ATKMIN: Min Atk of a unit.
+ UDT_ATKMAX: Max Atk of a unit.
+ UDT_MATKMIN: Min MATK of a unit.
+ UDT_MATKMAX: Max MATK of a unit.
+ UDT_DEF: DEF.
+ UDT_MDEF: MDEF.
+ UDT_HIT: HIT.
+ UDT_FLEE: FLEE.
+ UDT_PDODGE: Perfect Dodge.
+ UDT_CRIT: Critical Rate.
+ UDT_RACE: Race. (Eg. constants RC_DemiHuman or Integer 7).
+ UDT_ELETYPE: Element. (Eg. constants Ele_Neutral or Integer 0).
+ UDT_ELELEVEL: Element Level.
+ UDT_AMOTION: AMotion Rate.
+ UDT_ADELAY: ADelay Rate.
+ UDT_DMOTION: DMotion Rate.
+ UDT_HUNGER: Hunger Rate - for summons.
+ UDT_INTIMACY: Intimacy Rate - for summons.
+ UDT_LIFETIME: LifeTime - for summons.
+ UDT_MERC_KILLCOUNT: Kill count for mercenaries.
+ UDT_GROUP: group id
+
+returns -1 if value could not be retrieved.
---------------------------------------
@@ -10246,3 +10441,108 @@ Update already opened preview window with item from
Works for 20181017 RE and main clients or newer.
---------------------------------------
+
+*enchantitem(<equip_pos>, <card_slot>, <card_id>);
+
+Insert card into equipped item in EQI_* slot.
+card_slot - can be 0 to 3.
+card_id - any card item id.
+
+returns true if all parameters correct
+false in other case.
+Works for 20160831 main, 20151118 RE, any zero version
+
+---------------------------------------
+
+*servicemessage("<message>", <color>{, <account_id>})
+*servicemessage("<message>", <color>{, <player_name>})
+
+That command will send a service message to the chat window of the character
+specified by account ID or name, or to connected to npc player.
+It will not be seen by anyone else.
+
+Works for 20170830 RE and main and for any zero clients
+
+---------------------------------------
+
+*expandinventoryack(<result>{, <itemId>})
+
+Send initial inventory expansion result.
+Normally this function should be called from script label
+inventory_expansion::OnInventoryExpandRequest.
+
+Valid result statuses:
+ EXPAND_INVENTORY_ASK_CONFIRMATION - force client to ask player about inventory expansion
+ EXPAND_INVENTORY_FAILED - other failed reason
+ EXPAND_INVENTORY_OTHER_WORK - failed because player busy with other work
+ EXPAND_INVENTORY_MISSING_ITEM - failed because missing item
+ EXPAND_INVENTORY_MAX_SIZE - failed because inventory size already maximum
+
+ItemId make sense only if result is EXPAND_INVENTORY_ASK_CONFIRMATION
+Works for 20181212 zero clients
+
+---------------------------------------
+
+*expandinventoryresult(<result>)
+
+Send final inventory expansion result.
+Normally this function should be called from script label
+inventory_expansion::OnInventoryExpandConfirmed.
+
+Valid result values:
+ EXPAND_INVENTORY_RESULT_SUCCESS - success message
+ EXPAND_INVENTORY_RESULT_FAILED - other failed reason
+ EXPAND_INVENTORY_RESULT_OTHER_WORK - failed because player busy with other work
+ EXPAND_INVENTORY_RESULT_MISSING_ITEM - failed because missing item
+ EXPAND_INVENTORY_RESULT_MAX_SIZE - failed because inventory size already maximum
+
+Works for 20181212 zero clients
+
+---------------------------------------
+
+*expandinventory(<value>)
+
+Adjust player inventory to given value.
+Maximum inventory size is MAX_INVENTORY.
+Minimum inventory size is FIXED_INVENTORY_SIZE.
+For supported clients it send inventory change packet. For old clients,
+this change is silent.
+Current max inventory size can be read by function getInventorySize().
+
+---------------------------------------
+
+*getinventorysize()
+
+Return current player max inventory size.
+This value always smaller or equal to MAX_INVENTORY.
+Size can be changed by group of functions expandInventory*
+
+---------------------------------------
+
+*getunittitle(<GID>)
+
+Return unit title string.
+Works for 20180207 main clients, 20171129 re clients, 20171130 zero clients
+
+---------------------------------------
+
+*setunittitle(<GID>, <title>)
+
+Set unit title string.
+Invisible for players, because current implimentation using title id only.
+Works for 20180207 main clients, 20171129 re clients, 20171130 zero clients
+
+---------------------------------------
+
+*closeroulette()
+
+Force close roulette window.
+Works for 20141008 main clients, 20140903 re, any zero.
+
+---------------------------------------
+*openrefineryui()
+
+Opens refinery user interface for the player
+returns true on success and false on failure
+
+---------------------------------------
diff --git a/mariadb.bat b/mariadb.bat
new file mode 100644
index 000000000..67d7c39a3
--- /dev/null
+++ b/mariadb.bat
@@ -0,0 +1,15 @@
+@echo off
+
+WHERE powershell.exe >nul 2>nul
+IF %ERRORLEVEL% NEQ 0 (
+ ECHO ERROR: PowerShell is not installed on this computer!
+ ECHO Please download it here:
+ ECHO https://github.com/PowerShell/PowerShell#get-powershell
+ ECHO.
+ ECHO Once it is installed, please re-launch mariadb.bat
+ pause >nul
+ exit
+)
+
+powershell -NoLogo -ExecutionPolicy Bypass -File "%~dp0\tools\setup_mariadb.ps1"
+pause >nul
diff --git a/npc/custom/bartershop.txt b/npc/custom/bartershop.txt
new file mode 100644
index 000000000..bcb61795e
--- /dev/null
+++ b/npc/custom/bartershop.txt
@@ -0,0 +1,21 @@
+//===== Hercules Script ======================================
+//= Barter shop demo
+//===== By: ==================================================
+//= 4144
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= Barter shop demo in prontera.
+//============================================================
+
+prontera,159,284,4 trader Barter Shop#prt 4_M_KID1,{
+OnInit:
+ tradertype(NST_BARTER);
+ sellitem White_Herb, 100, Red_Potion, 2;
+ sellitem Blue_Herb, 200, Orange_Potion, 3;
+ sellitem Green_Herb, 100, Red_Potion, 4;
+ sellitem White_Herb, 100, Orange_Potion, 1;
+ sellitem Apple, -1, Orange_Potion, 1;
+ sellitem Praetorian_Shield, 100, Berserk_Potion, 10;
+ end;
+}
diff --git a/npc/custom/etc/quest_warper.txt b/npc/custom/etc/quest_warper.txt
index 35b863e9d..2ae2e7f7f 100644
--- a/npc/custom/etc/quest_warper.txt
+++ b/npc/custom/etc/quest_warper.txt
@@ -82,7 +82,7 @@ function script Q_Warpra {
case 2:
warp $QW_SP_WarpMap$, $QW_SP_WarpX, $QW_SP_WarpY;
close2;
- debugmes "Please check your special warp menu settings on the Warpra.";
+ consolemes(CONSOLEMES_WARNING, "Please check your special warp menu settings on the Warpra.");
end;
case 3: goto L_town;
case 4: goto L_dungeon;
@@ -1533,7 +1533,7 @@ function script QWS_Dungeon_Warpra {
mes "[Warpra]";
mes "Sorry, I can only unlock this location.";
} else
- debugmes "QWS_Dungeon_Warpra error, improper syntax?";
+ consolemes(CONSOLEMES_ERROR, "QWS_Dungeon_Warpra error, improper syntax?");
return;
function QWS_D_setbin {
@@ -1577,7 +1577,7 @@ function script QWS_Town_Warpra {
} else if (QWS_T_getbin(getarg(0)) == 1) {
callfunc "Q_Warpra",0;
} else
- debugmes "QWS_Town_Warpra error, improper syntax ?";
+ consolemes(CONSOLEMES_ERROR, "QWS_Town_Warpra error, improper syntax ?");
return;
function QWS_T_setbin {
diff --git a/npc/custom/events/disguise.txt b/npc/custom/events/disguise.txt
index b9071d162..fde5e544a 100644
--- a/npc/custom/events/disguise.txt
+++ b/npc/custom/events/disguise.txt
@@ -8,6 +8,7 @@
//= Note: This script requires PCRE to run properly.
//= 5.0 Last update by GmOcean.
//= 5.1 Cleaned and standardized, mostly. [Euphy]
+//= 5.2 Fix a bug that causes this event run indefinitely [AnnieRuru]
//============================================================
prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{
@@ -183,6 +184,15 @@ OnTimer30000:
deletepset 1;
stopnpctimer;
setnpctimer 0;
+ ++.RoundCount;
+ if (.RoundCount >= .Rounds) {
+ setnpcdisplay "Disguise Event", 4_M_NFDEADMAN;
+ .RoundCount = 0;
+ .Change = 0;
+ .EventON = 0;
+ npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later.";
+ end;
+ }
initnpctimer;
end;
OnTimer60000:
diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt
index b9c54c09e..fc7446814 100644
--- a/npc/custom/events/mushroom_event.txt
+++ b/npc/custom/events/mushroom_event.txt
@@ -41,7 +41,7 @@ OnMinute10: // Start time (every hour)
set .status,1;
set .Spawn,rand(1,10); // How many Mushrooms should spawn?
set .Map$,.maps$[rand(getarraysize(.maps$))];
- killmonster .Map$,"All";
+ killmonster(.Map$, "all");
monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(NPC_NAME)+"::OnMobKilled";
announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0;
sleep 2500;
@@ -50,9 +50,12 @@ OnMinute10: // Start time (every hour)
OnMobKilled:
set .Spawn, .Spawn - 1;
- getitem .Prize, .Amount;
- if (.Spawn) announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
- else {
+ if (playerattached() != 0) {
+ getitem .Prize, .Amount;
+ if (.Spawn)
+ announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
+ }
+ if (!.Spawn) {
announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
set .status,0;
}
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt
index 739b53c02..c2481e991 100644
--- a/npc/custom/quests/quest_shop.txt
+++ b/npc/custom/quests/quest_shop.txt
@@ -170,13 +170,13 @@ OnEnd:
function Add {
if (getitemname(getarg(1)) == "null") {
- debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
+ consolemes(CONSOLEMES_WARNING, "Quest reward #"+getarg(1)+" invalid (skipped).");
return;
}
setarray .@j[0],getarg(2),getarg(3),getarg(4);
for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
if (getitemname(getarg(.@i)) == "null") {
- debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
+ consolemes(CONSOLEMES_WARNING, "Quest requirement #"+getarg(.@i)+" invalid (skipped).");
return;
} else
setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
diff --git a/npc/custom/quests/thq/THQS_TTShop.txt b/npc/custom/quests/thq/THQS_TTShop.txt
index 96e7346d3..4c12f9938 100644
--- a/npc/custom/quests/thq/THQS_TTShop.txt
+++ b/npc/custom/quests/thq/THQS_TTShop.txt
@@ -93,7 +93,7 @@ function script thqs_trade_token {
// getarg(1) - .@mp$ -> PRICE
function script thqs_menu_buy {
if( getargcount() != 2 ) {
- debugmes "thqs_menu_buy: Wrong number of arguments!!";
+ consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Wrong number of arguments!!");
close;
}
@@ -101,7 +101,7 @@ function script thqs_menu_buy {
.@mp$ = getarg(1);
if( getarraysize( getd(.@mw$) ) != getarraysize( getd(.@mp$) ) ) {
- debugmes "thqs_menu_buy: Missing entries in data!";
+ consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Missing entries in data!");
close;
}
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index 2822ee65c..a867a09b2 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -786,10 +786,10 @@ function script HerculesSelfTestHelper {
callsub(OnCheck, "data_to_string (integer variable)", data_to_string(.@x), ".@x");
if (.errors) {
- debugmes "Script engine self-test [ \033[0;31mFAILED\033[0m ]";
- debugmes "**** The test was completed with " + .errors + " errors. ****";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;31mFAILED\033[0m ]");
+ consolemes(CONSOLEMES_DEBUG, "**** The test was completed with " + .errors + " errors. ****");
} else {
- debugmes "Script engine self-test [ \033[0;32mPASSED\033[0m ]";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;32mPASSED\033[0m ]");
}
return .errors;
end;
@@ -840,8 +840,8 @@ OnReportError:
.@val$ = getarg(1,"");
.@ref$ = getarg(2,"");
if (.errors == 1)
- debugmes "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****";
- debugmes "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)";
+ consolemes(CONSOLEMES_DEBUG, "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****");
+ consolemes(CONSOLEMES_DEBUG, "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)");
++.errors;
//end;
return;
diff --git a/npc/jobs/1-1e/ninja.txt b/npc/jobs/1-1e/ninja.txt
index 762f94b4b..8911b5795 100644
--- a/npc/jobs/1-1e/ninja.txt
+++ b/npc/jobs/1-1e/ninja.txt
@@ -93,9 +93,9 @@ alberta,30,65,3 script Akagi 4_M_JOB_ASSASSIN,{
}
}
-que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
+que_ng,30,65,3 script Kuuga Gai#nq 4_M_JOB_ASSASSIN,{
if (Upper == 2) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "I... I've never";
mes "seen a baby as";
mes "powerful as you!";
@@ -105,7 +105,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
}
if (Class == Job_Novice) {
if (JobLevel < 10) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Hm? Have you come to";
mes "learn how to be a Ninja?";
mes "You're not quite experienced";
@@ -119,7 +119,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "Excuse me.";
mes "H-hello?";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "...............................";
mes "How did you do that?";
next;
@@ -127,7 +127,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "Do what? I didn't";
mes "do anything, I don't think...";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "H-How are you able to";
mes "see me? I'm supposed to";
mes "be invisible to the naked eye.";
@@ -140,7 +140,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "Calm down, there's no";
mes "need to get violent!";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "What...?";
mes "How did you dodge";
mes "all of my attacks?";
@@ -153,7 +153,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "to change my job";
mes "to a Ninja.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "...Oh. Is that all?";
mes "Hmm, you've got great";
mes "potential, but I can't help";
@@ -161,14 +161,14 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "enemies, and I can't let my";
mes "guard down for even a second.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "That Wildcat Joe is";
mes "completely ruthless...!";
mes "He could strike at any time!";
mes "He'll do anything to achieve";
mes "victory over his enemies!";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Wait, wait, I just";
mes "thought of something.";
mes "Maybe you can help me out.";
@@ -177,7 +177,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "really want to be a Ninja.";
next;
if(select("Sure.", "No, thanks.") == 2) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Hm? Well, alright.";
mes "Still, I don't see";
mes "why we can't help";
@@ -185,7 +185,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "little predicament...";
close;
}
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Great! Now, I wanted to";
mes "ask Wildcat Joe if he'd";
mes "agree to a temporary truce.";
@@ -193,7 +193,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "are out of weapons, so we";
mes "should get well equipped first.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Please take this letter,";
mes "and deliver it to Wildcat";
mes "Joe in Einbroch. He's a master";
@@ -201,7 +201,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "eye out for him. Ah, and look";
mes "for him in a high place.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Yeah, Wildcat Joe";
mes "always did have a thing";
mes "for hiding in high places.";
@@ -213,7 +213,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
close;
}
else if (NINJ_Q == 1) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Even if this task";
mes "isn't that urgent,";
mes "please hurry over to";
@@ -222,7 +222,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
close;
}
else if (NINJ_Q == 2) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Did you deliver that";
mes "letter to Wildcat Joe?";
mes "I still need to know his";
@@ -232,14 +232,14 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
close;
}
else if (NINJ_Q == 3) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Ah, you've returned.";
mes "So did Wildcat Joe send";
mes "you back here with his";
mes "response? Great, great,";
mes "please let me read it.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "What...?! How could he";
mes "reject my proposal for";
mes "a truce?! This can only";
@@ -247,14 +247,14 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "Kunai. Nuts! I have to catch";
mes "up to him, or I'm a goner!";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Listen, you've got to help";
mes "me out again! I need you to";
mes "gather some materials so that";
mes "I can craft my own Kunai to fight Wildcat Joe. Then, I'll go ahead";
mes "and change your job to a Ninja.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "All you need";
mes "to bring me is";
mes "^3355FF5 Cyfars^000000 and";
@@ -268,7 +268,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "asked me to gather";
mes "those same materials.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Curses! Then that means...";
mes "You actually helped Joe";
mes "in crafting his Kunai! No!";
@@ -281,7 +281,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
}
else if (NINJ_Q == 4) {
if (countitem(Cyfar) < 5 || countitem(Phracon) < 1) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Hurry and bring";
mes "^3355FF5 Cyfars^000000 and";
mes "^3355FF1 Phracon^000000 to me,";
@@ -291,7 +291,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
close;
}
if (SkillPoint != 0) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Whoa, whoa...";
mes "You still have some";
mes "leftover Skill Points.";
@@ -300,7 +300,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "change jobs, right?";
close;
}
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Ah, you're back with";
mes "everything that I need.";
mes "You've come earlier than";
@@ -308,14 +308,14 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "as promised, I'll turn";
mes "you into a Ninja.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Let me formally introduce";
- mes "myself. I am High Ninja Cougar";
+ mes "myself. I am High Ninja Kuuga Gai";
mes "in the Touga Ninja Corps, and";
mes "I'm in charge of the search";
mes "party to find Sir Kazma.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Sir Kazma is the chief";
mes "of my village, but he's";
mes "run away. This has resulted";
@@ -323,7 +323,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "the Ninja Corps. Things are";
mes "pretty unstable right now...";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "I initially didn't want to";
mes "accept you as a Ninja because";
mes "of this complicated situation.";
@@ -331,14 +331,14 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "you're truly worthy of joining";
mes "the Ninja ranks.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "According to his letter, even";
mes "Joe thinks highly of you. Just";
mes "remember that, as a Ninja, your";
mes "mission is your highest priority. But don't let mission objectives";
mes "supercede your conscience.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "''Secrecy above all else.''";
mes "To keep our secrets in the";
mes "shadows, you can only buy";
@@ -346,7 +346,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "authorized dealers. Please";
mes "keep that in mind.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "As of today, you are";
mes "now a proud member of the";
mes "Touga Ninja Corps. Be as";
@@ -361,7 +361,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
close;
}
else {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "How have you been?";
mes "Train hard: you want";
mes "to be able to vanish";
@@ -372,7 +372,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
}
} else {
if (BaseClass == Job_Ninja) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "How have you been?";
mes "Train hard: you want";
mes "to be able to vanish";
@@ -381,7 +381,7 @@ que_ng,30,65,3 script Cougar#nq 4_M_JOB_ASSASSIN,{
mes "the respect of any Ninja~";
close;
} else {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "What...?";
mes "How were you able";
mes "to find me hidden";
@@ -478,7 +478,7 @@ einbroch,184,194,3 script Suspicious Man#nq 4_M_SITDOWN,{
mes "?????!!";
next;
mes "[Suspicious Man]";
- mes "Why? Didn't you bring Cougar's letter for me?";
+ mes "Why? Didn't you bring Kuuga Gai's letter for me?";
next;
mes "["+strcharinfo(PC_NAME)+"]";
mes "Are you...";
@@ -487,7 +487,7 @@ einbroch,184,194,3 script Suspicious Man#nq 4_M_SITDOWN,{
mes "[Suspicious Man]";
mes "...Yes, but I prefer to";
mes "be called Red Leopard Joe.";
- mes "Cougar sent you to me, right?";
+ mes "Kuuga Gai sent you to me, right?";
mes "He's the only one who calls";
mes "me that. So you want to be";
mes "a Ninja, eh? Hmm, alright.";
@@ -513,7 +513,7 @@ einbroch,184,194,3 script Suspicious Man#nq 4_M_SITDOWN,{
mes "[Red Leopard Joe]";
mes "For now, let me read";
mes "this letter. Let's see...";
- mes "Hm. I thought that Cougar";
+ mes "Hm. I thought that Kuuga Gai";
mes "would want to challenge me";
mes "again, but he actually wants";
mes "a temporary truce? Hah!";
@@ -540,7 +540,7 @@ einbroch,184,194,3 script Suspicious Man#nq 4_M_SITDOWN,{
mes "[Red Leopard Joe]";
mes "Here you go.";
mes "Please bring this";
- mes "letter to Cougar.";
+ mes "letter to Kuuga Gai.";
mes "It'll take a while to";
mes "return to Amatsu, so let";
mes "me send you there directly...";
@@ -557,7 +557,7 @@ einbroch,184,194,3 script Suspicious Man#nq 4_M_SITDOWN,{
mes "Eh? I'm not sure what";
mes "happened, but it seems";
mes "that you haven't delivered";
- mes "my response to Cougar yet.";
+ mes "my response to Kuuga Gai yet.";
mes "Shall I directly send you";
mes "to Amatsu right now?";
next;
@@ -577,7 +577,7 @@ einbroch,184,194,3 script Suspicious Man#nq 4_M_SITDOWN,{
}
else if (NINJ_Q == 4) {
mes "[Red Leopard Joe]";
- mes "Cougar asked you to";
+ mes "Kuuga Gai asked you to";
mes "gather some materials";
mes "too? Oh well, I suppose";
mes "that I can't blame him.";
diff --git a/npc/merchants/advanced_refiner.txt b/npc/merchants/advanced_refiner.txt
index 9632f95f7..ec263e192 100644
--- a/npc/merchants/advanced_refiner.txt
+++ b/npc/merchants/advanced_refiner.txt
@@ -44,14 +44,19 @@
//=========================================================================
payon,157,146,6 script Suhnbi#cash 4_M_03,{
- disable_items;
- mes "[Suhnbi]";
- mes "I am the Armsmith";
- mes "I can refine all kinds of weapons,";
- mes "armor and equipment, so let me";
- mes "know what you want to refine.";
- next;
+ mes("[Suhnbi]");
+ mes("I am the Armsmith");
+ mes("I can refine all kinds of weapons,");
+ mes("armor and equipment, so let me");
+ mes("know what you want to refine.");
+ if (getbattleflag("features/replace_refine_npcs") == 1) {
+ if (openrefineryui())
+ close();
+ }
+ next();
+
+ disable_items;
setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
.@menu$ = "";
for(.@i = 1; .@i<=10; ++.@i) {
diff --git a/npc/merchants/hd_refine.txt b/npc/merchants/hd_refine.txt
index a7fc5e922..1a5a43621 100644
--- a/npc/merchants/hd_refine.txt
+++ b/npc/merchants/hd_refine.txt
@@ -39,6 +39,17 @@
//== Blacksmith Mighty Hammer (+7~9) =======================
- script ::MightyHammer FAKE_NPC,{
+ mes("[Blacksmith Mighty Hammer]");
+ mes("I'm a blacksmith skilled in refining weapons and armors.");
+ mes("I can refine an item of your choice among the items you are equipped with.");
+ mes("Which item do you want to refine?");
+
+ if (getbattleflag("features/replace_refine_npcs") == 1) {
+ if (openrefineryui())
+ close();
+ }
+ next();
+
disable_items;
mes "[Blacksmith Mighty Hammer]";
mes "Unlike others, I am a blacksmith who refines a very limited number of items.";
@@ -179,6 +190,10 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 4_M_DWARF
//== Basta (+10 and up) ====================================
- script ::Basta FAKE_NPC,{
+ if (getbattleflag("features/replace_refine_npcs") == 1) {
+ if (openrefineryui())
+ end();
+ }
disable_items;
mes "[Basta]";
mes "I'm the best Blacksmith in the whole world, Basta.";
diff --git a/npc/merchants/refine.txt b/npc/merchants/refine.txt
index 7f1b4d9a3..19ebf4a8e 100644
--- a/npc/merchants/refine.txt
+++ b/npc/merchants/refine.txt
@@ -589,14 +589,19 @@ lhz_in02,282,20,7 script Fulerr 4_M_LGTMAN,{
// If you enable this function, be sure to edit the value of .@safe to the max
// safe refine in refine_db.txt as well.
function script refinemain {
+ mesf("[%s]", getarg(0));
+ mes("I'm the Armsmith.");
+ mes("I can refine all kinds of weapons, armor and equipment, so let me");
+ mes("know what you want me to refine.");
+
+ if (getbattleflag("features/replace_refine_npcs") == 1) {
+ if (openrefineryui())
+ close();
+ }
+ next();
+
disable_items;
.@features = getarg(1);
- mes "[" + getarg(0) + "]";
- mes "I'm the Armsmith.";
- mes "I can refine all kinds of weapons, armor and equipment, so let me";
- mes "know what you want me to refine.";
- next;
-
setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
.@menu$ = "";
for(.@i = 1; .@i <= 10; ++.@i) {
diff --git a/npc/other/CashShop_Functions.txt b/npc/other/CashShop_Functions.txt
index 92fe841e1..5b957f9f2 100644
--- a/npc/other/CashShop_Functions.txt
+++ b/npc/other/CashShop_Functions.txt
@@ -310,3 +310,30 @@ function script F_Snowball {
}
end;
}
+
+// Status reduction potion
+//============================================================
+// - Permanently reduces base stat <type> by <val>.
+// - Returns status points equals to points needed to raise
+// that stat to original value.
+// - Doesn't work if base status <type> would become lower than 1 after reduction.
+// * callfunc("F_CashReduceStat", <type>{, <val>, <itemid>});
+function script F_CashReduceStat {
+ .@type = getarg(0);
+ .@amount = getarg(1, -1);
+ .@itemid = getarg(2, 0);
+
+ if ((readparam(.@type) + .@amount) < 1) return;
+
+ if (.@itemid) {
+ if (countitem(.@itemid))
+ delitem .@itemid, 1;
+ else
+ return;
+ }
+
+ StatusPoint += needed_status_point(.@type, .@amount);
+ statusup2 .@type, .@amount;
+
+ return;
+} \ No newline at end of file
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index 904ed7165..e3741b495 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -434,7 +434,7 @@ function script F_ShuffleNumbers {
//== Function F_MesColor ===================================
// Function to colorize npc dialog without having to memorize the color code
// Examples:
-// mes callfunc("F_MesColor", C_BLUE) +"This message is now in BLUE";
+// mesf("%sThis message is now in BLUE.", F_MesColor(C_BLUE));
function script F_MesColor {
return sprintf("^%06X", min(getarg(0), 0xFFFFFF));
}
@@ -446,32 +446,45 @@ function script F_MesColor {
function script F_GetTradeRestriction {
.@trade = getiteminfo(getarg(0), ITEMINFO_TRADE);
- if (.@trade == 0) {
+ if (.@trade == 0)
return "None";
- }
.@trade$ = "";
- if (.@trade & ITR_NODROP) {
+ if (.@trade & ITR_NODROP)
.@trade$ += "NoDrop|";
- }
- if (.@trade & ITR_NOTRADE) {
+ if (.@trade & ITR_NOTRADE)
.@trade$ += "NoTrade|";
- }
- if (.@trade & ITR_PARTNEROVERRIDE) {
+ if (.@trade & ITR_PARTNEROVERRIDE)
.@trade$ += "PartnerOverride|";
- }
- if (.@trade & ITR_NOSELLTONPC) {
+ if (.@trade & ITR_NOSELLTONPC)
.@trade$ += "NoSellToNpc|";
- }
- if (.@trade & ITR_NOSTORAGE) {
+ if (.@trade & ITR_NOSTORAGE)
.@trade$ += "NoStorage|";
- }
- if (.@trade & ITR_NOGSTORAGE) {
+ if (.@trade & ITR_NOGSTORAGE)
.@trade$ += "NoGuildStorage|";
- }
- if (.@trade & ITR_NOMAIL) {
+ if (.@trade & ITR_NOMAIL)
.@trade$ += "NoMail|";
- }
- if (.@trade & ITR_NOAUCTION) {
+ if (.@trade & ITR_NOAUCTION)
.@trade$ += "NoAuction|";
+ return .@trade$;
+}
+
+//== Function F_MesItemInfo ===================================
+// Show the item name and a clickable link for the item description
+// Only works with mes and mesf, does not work in menu/select
+function script F_MesItemInfo {
+ .@item = getarg(0);
+ .@itemname$ = getitemname(.@item);
+ if (.@itemname$ != "null") {
+ .@itemslot = getitemslots(.@item);
+ if (.@itemslot)
+ .@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot);
}
+ else
+ .@itemname$ = "Unknown Item";
+ if (PACKETVER >= 20150729)
+ return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item);
+ else if (PACKETVER >= 20130130)
+ return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item);
+ else
+ return .@itemname$;
}
diff --git a/npc/other/inventory_expansion.txt b/npc/other/inventory_expansion.txt
new file mode 100644
index 000000000..8a5ac5e6c
--- /dev/null
+++ b/npc/other/inventory_expansion.txt
@@ -0,0 +1,63 @@
+//================= Hercules Script =======================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2018 Hercules Dev Team
+//= Copyright (C) 4144
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Inventory expansion
+//=========================================================================
+
+- script inventory_expansion FAKE_NPC,{
+ end;
+
+OnInvExpandRequest:
+ if (countitem(Inventory_Extension_Coupon) < 1) {
+ expandinventoryack(EXPAND_INV_MISSING_ITEM);
+ end;
+ }
+ if (getinventorysize() + INVENTORY_INCREASE_STEP > MAX_INVENTORY) {
+ expandinventoryack(EXPAND_INV_MAX_SIZE);
+ end;
+ }
+ expandinventoryack(EXPAND_INV_ASK_CONFIRMATION, Inventory_Extension_Coupon);
+ end;
+
+OnInvExpandConfirmed:
+ if (countitem(Inventory_Extension_Coupon) < 1) {
+ expandinventoryresult(EXPAND_INV_RESULT_MISSING_ITEM);
+ end;
+ }
+ if (getinventorysize() + INVENTORY_INCREASE_STEP > MAX_INVENTORY) {
+ expandinventoryresult(EXPAND_INV_RESULT_MAX_SIZE);
+ end;
+ }
+ delitem(Inventory_Extension_Coupon, 1);
+ if (expandinventory(INVENTORY_INCREASE_STEP) == true) {
+ expandinventoryresult(EXPAND_INV_RESULT_SUCCESS);
+ }
+ end;
+
+OnInvExpandRejected:
+ end;
+}
diff --git a/npc/quests/quests_nameless.txt b/npc/quests/quests_nameless.txt
index 9461461a5..55f5c319c 100644
--- a/npc/quests/quests_nameless.txt
+++ b/npc/quests/quests_nameless.txt
@@ -61,7 +61,8 @@
//= 2.4
//=========================================================================
-//== Nameless Island and Cursed Monestary Access Quest :: aru_monas =
+// Nameless Island and Cursed Monestary Access Quest :: aru_monas
+//=========================================================================
airplane_01,90,63,0 script Event Switch#pc FAKE_NPC,3,3,{
end;
@@ -998,7 +999,7 @@ nameless_i,127,207,0 script Dead Crow#Aru HIDDEN_NPC,{
mes "^3355FFThis grass must be the";
mes "main ingredient of the";
mes "poison used to kill the";
- mes "Gaebolg family princes.^000000";
+ mes "Geoborg family princes.^000000";
next;
mes "["+strcharinfo(PC_NAME)+"]";
mes "Looks like I just hit";
@@ -4406,7 +4407,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -4432,7 +4433,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -4458,7 +4459,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -4484,7 +4485,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -4509,7 +4510,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -4535,7 +4536,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -4561,7 +4562,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -4587,7 +4588,7 @@ izlude_in,113,66,0 script Strange Machine HIDDEN_NPC,{
mes "and vibrated violently";
mes "before coming to a sudden";
mes "stop. That was the wrong";
- mes "switch. You'd better ask Dorian... ";
+ mes "switch. You'd better ask Dorian...";
changequest 3105,3106;
diamond_edq = 11;
close;
@@ -10318,7 +10319,7 @@ comodo,139,184,3 script Scholar#zgang 2_M_SAGE_B,{
mes "jewel came into a rich man's";
mes "possession. However, he lost";
mes "his fortune and was completely";
- mes "ruined after obtaining it. Hence the moniker, ''Unlucky Emerald.''";
+ mes "ruined after obtaining it. Hence the moniker, ''Unlucky Emerald.''";
next;
mes "[Scholar]";
mes "Then the emerald came into";
diff --git a/npc/quests/quests_prontera.txt b/npc/quests/quests_prontera.txt
index e0bd9156e..b2fefb3cf 100644
--- a/npc/quests/quests_prontera.txt
+++ b/npc/quests/quests_prontera.txt
@@ -37,7 +37,7 @@
//= Collection of Prontera-based quests.
//= - Culvert Access
//= - Ph.D Hat Quest
-//= - Gaebolg Family Curse
+//= - Geoborg Family Curse
//================= Current Version =======================================
//= 2.9
//================= Variables Used ========================================
@@ -45,7 +45,7 @@
//= - MISC_QUEST (bit 8)
//= Ph.D Hat Quest:
//= - n/a
-//= Gaebolg Family Curse:
+//= Geoborg Family Curse:
//= - prt_curse (max 61)
//=========================================================================
@@ -799,7 +799,7 @@ yuno,311,195,3 script Historian#prt01 4_M_SAGE_A,{
mes "With the return of peace,";
mes "the 7 warriors established";
mes "the Rune-Midgarts Kingdom,";
- mes "choosing Tristram Gaebolg III";
+ mes "choosing Tristram Geoborg III";
mes "as the kingdom's first ruler. ";
next;
mes "[Historian]";
@@ -1228,7 +1228,7 @@ morocc_in,45,126,3 script Historian#prt02 4_F_GON,{
next;
mes "[Historian Rodafrian]";
mes "Anyway, your report about";
- mes "the Gaebolg family will be";
+ mes "the Geoborg family will be";
mes "greatly appreciated by the";
mes "Rekenber Historical Research";
mes "Group. But first, I need to";
@@ -1237,7 +1237,7 @@ morocc_in,45,126,3 script Historian#prt02 4_F_GON,{
mes "[Historian Rodafrian]";
mes "Anyway, keep this information";
mes "a secret between me and you";
- mes "for now. Then, when I reveal the secret curse of the Gaebolg royal";
+ mes "for now. Then, when I reveal the secret curse of the Geoborg royal";
mes "family, I'll finally outshine that Karlomoff! Bwahahahahaha!";
next;
mes "["+strcharinfo(PC_NAME)+"]";
@@ -2291,7 +2291,7 @@ prt_church,185,106,3 script Father Bamph 1_M_PASTOR,{
next;
mes "[Father Bamph]";
mes "Finally, the first Tristram of";
- mes "the Gaebolg family defeated";
+ mes "the Geoborg family defeated";
mes "Jormungand together with 6";
mes "other warriors, but only after";
mes "it killed his beloved father.";
@@ -2306,7 +2306,7 @@ prt_church,185,106,3 script Father Bamph 1_M_PASTOR,{
mes "[Father Bamph]";
mes "To this day...";
mes "^FF0000Every first prince of";
- mes "the Gaebolg family dies";
+ mes "the Geoborg family dies";
mes "at a young age^000000. That is";
mes "Jormungand's curse and";
mes "the royal family's secret.";
@@ -2429,7 +2429,7 @@ prt_church,185,106,3 script Father Bamph 1_M_PASTOR,{
mes "Oh, my. I learned the song";
mes "when I was a young boy from";
mes "my father. However, your version seems to reveal the secret curse";
- mes "of the Gaebolgs. Please tell me, where did you hear that song?";
+ mes "of the Geoborgs. Please tell me, where did you hear that song?";
next;
mes "["+strcharinfo(PC_NAME)+"]";
mes "Well, I first heard this";
@@ -3069,7 +3069,7 @@ prt_church,16,114,4 script Father Bamph#tomb 1_M_PASTOR,{
if (prt_curse == 18) {
mes "[Father Bamph]";
mes "There are the bodies";
- mes "of the Gaebolg princes";
+ mes "of the Geoborg princes";
mes "that were killed during";
mes "the exorcism. Please take";
mes "a look at the body to the left.";
@@ -3547,13 +3547,13 @@ OnTouch:
mes "["+strcharinfo(PC_NAME)+"]";
mes "Long ago, the giant serpent";
mes "Jormungand threatened mankind.";
- mes "7 warriors defeated Jormungand, led by Tristram III of the Gaebolg";
- mes "family, but Jormungand cursed the Gaebolg bloodline in its defeat.";
+ mes "7 warriors defeated Jormungand, led by Tristram III of the Geoborg";
+ mes "family, but Jormungand cursed the Geoborg bloodline in its defeat.";
next;
mes "["+strcharinfo(PC_NAME)+"]";
mes "Ever since, the curse kills";
mes "the first born prince of the";
- mes "Gaebolg family at an early age.";
+ mes "Geoborg family at an early age.";
mes "However, all of the princes of";
mes "this generation were killed.";
next;
diff --git a/npc/quests/quests_rachel.txt b/npc/quests/quests_rachel.txt
index 43e4beadb..1cc002d80 100644
--- a/npc/quests/quests_rachel.txt
+++ b/npc/quests/quests_rachel.txt
@@ -3210,7 +3210,7 @@ OnTouch:
OnTouchNPC:
emotion e_an;
- //emotion e_gg,1; //Emote on monster - unsupported
+ unitemote mobattached(), e_gg;
end;
OnMyMobDead:
diff --git a/npc/re/instances/OldGlastHeim.txt b/npc/re/instances/OldGlastHeim.txt
index 44b5f1e61..ec0efeb53 100644
--- a/npc/re/instances/OldGlastHeim.txt
+++ b/npc/re/instances/OldGlastHeim.txt
@@ -2744,7 +2744,7 @@ glast_01,188,273,5 script White Knight#1a 4_WHITEKNIGHT,{
close();
}
mes("I exchange you a White Knight Card for ^0000FF3000 Coagulated Spell^000000 or ^FF000070 Contaminated Magic^000000.");
- mes("<ITEMLINK>White Knight Card<INFO>4608</INFO></ITEMLINK>");
+ mes(F_MesItemInfo(White_Knightage_Card));
next();
setarray(.@item[0], Coagulated_Spell, Corrupted_Charm);
setarray(.@cost[0], 3000, 70);
@@ -2777,7 +2777,7 @@ glast_01,192,273,3 script Khalitzburg Knight#1a 4_F_KHALITZBURG,{
close();
}
mes("I exchange you a Khalitzburg Knight Card for ^0000FF5000 Coagulated Spell^000000 or ^FF0000100 Contaminated Magic^000000.");
- mes("<ITEMLINK>Khalitzburg Knight Card<INFO>4609</INFO></ITEMLINK>");
+ mes(F_MesItemInfo(Khali_Knightage_Card));
next();
setarray(.@item[0], Coagulated_Spell, Corrupted_Charm);
setarray(.@cost[0], 5000, 100);
diff --git a/npc/re/instances/ghost_palace.txt b/npc/re/instances/ghost_palace.txt
index 3e708dc57..a291984db 100644
--- a/npc/re/instances/ghost_palace.txt
+++ b/npc/re/instances/ghost_palace.txt
@@ -601,7 +601,7 @@ OnInstanceInit:
OnStart:
stopnpctimer instance_npcname("#gp3control");
disablenpc(instance_npcname("#gp3control"));
- killmonster(instance_mapname("1@spa"), "All");
+ killmonster(instance_mapname("1@spa"), "all");
disablenpc(instance_npcname("#gp3warp"));
enablenpc(instance_npcname("Lurid Royal Guard#gp5"));
enablenpc(instance_npcname("Tiara Princess#gp5"));
diff --git a/npc/re/jobs/2e/kagerou_oboro.txt b/npc/re/jobs/2e/kagerou_oboro.txt
index 5c54a0114..5818bb4fd 100644
--- a/npc/re/jobs/2e/kagerou_oboro.txt
+++ b/npc/re/jobs/2e/kagerou_oboro.txt
@@ -120,7 +120,7 @@ que_ng,21,76,0 script Wall with a Drawing#ko CLEAR_NPC,{
job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
if (MaxWeight - Weight < 1000 || checkweight("Knife",1) == 0) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "You don't need to carry so many things.";
close;
}
@@ -128,8 +128,8 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
for (set .@i,5131; .@i<=5146; set .@i,.@i+1)
if (questprogress(.@i)) erasequest .@i;
set job_kagero,0;
- mes "[Cougar]";
- mes "You are not in the Family of the Ninja.";
+ mes "[Kuuga Gai]";
+ mes "You are not in the clan of the Ninja.";
close2;
warp "amatsu",147,136;
end;
@@ -156,28 +156,28 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
mes "^1A95E6He keeps talking and doesn't stop to answer your question.^1A95E6";
next;
mes "[Old Man]";
- mes "There once was a quiet family living in ancient Amatsu times that is never mentioned in history books or stories.";
+ mes "There once was a quiet clan living in ancient Amatsu times that is never mentioned in history books or stories.";
next;
mes "[Old Man]";
mes "They lived beneath shadows but always yearned for the bright sun, like a sunflower.";
next;
mes "[Old Man]";
- mes "A family that was loyal to their lord who they served as their bright sun.";
+ mes "A clan that was loyal to their lord who they served as their bright sun.";
next;
mes "[Old Man]";
- mes "...a very trustworthy family...";
+ mes "...a very trustworthy clan...";
next;
mes "[Old Man]";
mes "....loyal to their core...";
next;
mes "[Old Man]";
- mes "...a family of integrity...";
+ mes "...a clan of integrity...";
next;
select("What happened to them?");
mes "^1A95E6The old man looks at you with a melancholy face.^1A95E6";
next;
mes "[Old Man]";
- mes "Why are you interested in a family that was abandoned by their lord and disappeared from history itself?";
+ mes "Why are you interested in a clan that was abandoned by their lord and disappeared from history itself?";
next;
if(select("I'm a Ninja.", "I'm bored.") == 2) {
mes "[Old Man]";
@@ -188,13 +188,13 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
}
cutin "job_ko02",2;
mes "[Old Man]";
- mes "Ninja! There was a time when the family was called ninjas, too.";
+ mes "Ninja! There was a time when the clan was called ninjas, too.";
next;
erasequest 5131;
setquest 5132;
set job_kagero,2;
mes "[Old Man]";
- mes "You'll have to lend me your ear for I have so much to tell you about the family story.";
+ mes "You'll have to lend me your ear for I have so much to tell you about the clan story.";
close2;
cutin "",255;
end;
@@ -206,13 +206,13 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
mes "This goes way back to ancient times and nobody in Amatsu remembers about it.";
next;
mes "[Old Man]";
- mes "The family worked behind the scenes and basically lived their lives for their lord.";
+ mes "The clan worked behind the scenes and basically lived their lives for their lord.";
next;
mes "[Old Man]";
mes "They were very loyal doing whatever deed their lord asked for.";
next;
mes "[Old Man]";
- mes "Ninja, the family was known as the dark family but that doesn't mean they wanted to be hidden in the darkness.";
+ mes "Ninja, the clan was known as the dark clan but that doesn't mean they wanted to be hidden in the darkness.";
next;
mes "[Old Man]";
mes "They were loyal enough to be satisfied as the lord's servants but their loyalty became the problem.";
@@ -222,13 +222,13 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
mes "They are a secret organization that even the lord didn't know much about.";
next;
mes "[Old Man]";
- mes "The few that knew about the family's existence, tried to investigate them but nobody was able to reveal their true identity.";
+ mes "The few that knew about the clan's existence, tried to investigate them but nobody was able to reveal their true identity.";
next;
mes "[Old Man]";
- mes "That is why this family has grown from loyal servants to a group feared for its secrets.";
+ mes "That is why this clan has grown from loyal servants to a group feared for its secrets.";
next;
mes "[Old Man]";
- mes "The lord shunned the family and didn't call them for their service any more but they never betrayed him.";
+ mes "The lord shunned the clan and didn't call them for their service any more but they never betrayed him.";
next;
select("They were really loyal people.");
cutin "job_ko03",2;
@@ -245,20 +245,20 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
} else if (job_kagero == 3) {
cutin "job_ko03",2;
mes "[Old Man]";
- mes "The family has been living in hiding for so long since the old days. The current lord didn't even know of their existence.";
+ mes "The clan has been living in hiding for so long since the old days. The current lord didn't even know of their existence.";
next;
select(".........");
cutin "job_ko01",2;
mes "[Old Man]";
- mes "I'm Guide Gion, the last of the dark ninja family.";
+ mes "I'm Leader Gion, the last of the dark ninja clan.";
next;
if(select("I think your time has ended.", "I need your teaching.") == 1) {
cutin "job_ko04",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Are you an assassin to end this old man's life?";
next;
- mes "[Guide Gion]";
- mes "So that is why you've shown interest in my family. I won't give up easily.";
+ mes "[Leader Gion]";
+ mes "So that is why you've shown interest in my clan. I won't give up easily.";
next;
percentheal -99,0;
mes "Pow!!";
@@ -268,50 +268,50 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
end;
}
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Teaching...";
mes "Been a long time since I last heard that word.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I guess this little visit was not by coincidence but a start of a connection.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Sorry I am not a teacher. But!";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I can help you on the path you've chosen, the ^33CC71"+ (Sex == SEX_MALE ? "Kagerou" : "Oboro") +"^000000 path.";
next;
- mes "^1A95E6You hear Guide Gion's voice faintly as you slip away.^1A95E6";
+ mes "^1A95E6You hear Leader Gion's voice faintly as you slip away.^1A95E6";
next;
erasequest 5133;
setquest 5134;
set job_kagero,4;
- mes "[Guide Gion]";
- mes "If you are prepared to follow me, Guide Gion, on the "+ (Sex == SEX_MALE ? "Kagerou" : "Oboro") +" path, we will meet again.";
+ mes "[Leader Gion]";
+ mes "If you are prepared to follow me, Leader Gion, on the "+ (Sex == SEX_MALE ? "Kagerou" : "Oboro") +" path, we will meet again.";
close2;
warp "amatsu",147,136;
end;
} else if (job_kagero == 4) {
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I thought you were afraid of the ^33CC71path of the "+ (Sex == SEX_MALE ? "Kagerou" : "Oboro") +"^33CC71 and wouldn't come back.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "But from the look of your eyes, I guess I misjudged you.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You will have to train your mind and body to walk steadily in the unknown world and never fall into temptation to stay on the path.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Our ancestors had 4 tests to train our people.";
next;
select("4 tests?");
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Yes, there are 4 tests.";
mes "My ancestors trained my people with 4 tests that involve ^087FF8knowledge^000000, ^087FF8survival^000000, ^087FF8weapons^000000, and ^087FF8battle^000000.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I know you are curious what these tests are. Let me explain one by one.";
next;
while(1) {
@@ -319,75 +319,75 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
set .@test, .@test | (1<<(.@i-1));
switch (.@i) {
case 1:
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "We need to be knowledgeable in order to assist the lord. This test is for this purpose.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You can pass the test if you successfully solve more than 9 out of 10 questions.";
next;
if (.@test != 15) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The test will be easy to pass if you've been steady in your studies. Now what other test are you curious about?";
next;
}
break;
case 2:
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Missions aren't always easy and safe. That is why survival instincts are vital to us.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "My ancestors call this test the dice test. It is a test to advance forward depending on the dice results.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Think of it as the simple dice games people play.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "But never let your guard down during the test because it isn't called the survival test for nothing.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "There will be blocks that help you while there are blocks that will interrupt you.";
next;
if (.@test != 15) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "If you deal with various situations wisely, you will be able to pass the test. Now what other test are you curious about?";
next;
}
break;
case 3:
- mes "[Guide Gion]";
- mes "My family was famous for using unique weapons that we created.";
+ mes "[Leader Gion]";
+ mes "My clan was famous for using unique weapons that we created.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You would be considered blessed if you created your own unique weapon.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Creating a weapon for yourself and refining it is the purpose of this test.";
next;
if (.@test != 15) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I hope you will be blessed and find the best weapon for yourself. Now what other test are you curious about?";
next;
}
break;
case 4:
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Missions are not always done alone. You will often work in teams of 2 or 3 for a common goal.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The battle test is only for those that pass that knowledge, survival and weapon tests. So! It is the very last test.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Unlike the other three tests that are done alone, you will have to compete with others in this final test.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "There is only one target!!";
mes "And only the first to get to the target passes the test.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You'll be lucky if you have no competitors during your test.";
next;
if (.@test != 15) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "A challenge is better than explaining it a hundred times. It's the actual experience that makes you better.";
next;
}
@@ -396,13 +396,13 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
if (.@test == 15) break;
}
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Seeing is believing, so go on and take the challenge.";
next;
erasequest 5134;
setquest 5135;
set job_kagero,5;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Let's start right away after you are done with preparations.";
close2;
cutin "",255;
@@ -414,110 +414,110 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
set .@ko_test, .@ko_test_01 + .@ko_test_02 + .@ko_test_03;
if (.@ko_test == 0) {
cutin "job_ko03",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "It's been a while.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Since I felt happy like this. I feel young and energetic seeing young people like you challenge themselves with a new path.";
next;
- mes "[Guide Gion]";
- mes "We're done with explaining about the tests, now should I tell you my family story?";
+ mes "[Leader Gion]";
+ mes "We're done with explaining about the tests, now should I tell you my clan story?";
next;
cutin "job_ko01",2;
- mes "[Guide Gion]";
- mes "My family started from two warriors.";
+ mes "[Leader Gion]";
+ mes "My clan started from two warriors.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Kagerou, a warrior like the dancing flames of the sun.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Oboro, a warrior like the misty moonlight.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The Sun and the Moon.";
mes "The sunlight that lights up the world and the moonlight that lights up the night. Both were very similar but different warriors.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "There was a time there was an enmity between both warriors.";
next;
- mes "[Guide Gion]";
- mes "But it didn't take long for them to become one as a family.";
+ mes "[Leader Gion]";
+ mes "But it didn't take long for them to become one as a clan.";
next;
select("How did it go afterwards?");
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Ha ha ha. It is never fun to listen to the whole story all at once, no? Come back after passing a test and I'll continue my story.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Which test will you select as your first test?";
next;
callsub L_StartTest,select("Test of Knowledge", "Test of Survival", "Test of Weaponry"),1;
end;
} else if (.@ko_test == 2) {
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
if (.@ko_test_01 == 2) {
set .@menu$,":Test of Survival:Test of Weaponry";
mes "You've passed the Test of Knowledge.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "My friend doesn't approve of others that easily but I guess he liked you.";
next;
} else if (.@ko_test_02 == 2) {
set .@menu$,"Test of Knowledge::Test of Weaponry";
mes "You've passed the Test of Survival.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Looks like you went through hell with this test.";
next;
} else if (.@ko_test_03 == 2) {
set .@menu$,"Test of Knowledge:Test of Survival:";
mes "You've passed the Test of Weaponry.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I wonder if Joe is satisfied with your performance.";
next;
}
- select("Please continue with the family story.");
+ select("Please continue with the clan story.");
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Looks like you are pretty eager to hear more. Where did I leave off... Ah! I remember.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Kagerou, a warrior like the dancing flames of the sun.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Oboro, a warrior like the misty moonlight.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Both warriors weren't close at first, because personality and everything else was completely opposite of each other.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The first place they met was the battlefield. And you know how enemies greet each other on a battlefield.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "They ended up injuring each other badly.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "But what can you do? War is a war.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The friend you've laughed with yesterday is a foe that you have to fight with in a war today.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "So nobody can get along with anyone during a war.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I'll continue the story after you pass another test.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Which test will you choose for the second test?";
next;
callsub L_StartTest,select(.@menu$),2;
end;
} else if (.@ko_test == 4) {
cutin "job_ko04",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
if (.@ko_test_01 == 2 && .@ko_test_02 == 2) {
set .@last_test,3;
mes "You've passed the ^339CCCTests of Knowledge and Survival^000000!";
@@ -529,96 +529,96 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
mes "You've passed the ^339CCCTests of Survival and Weaponry^000000!";
}
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You are already done with two tests. Hope you've learned a lot from them.";
next;
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Shall we continue with the story?";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Kagerou, a warrior like the dancing flames of the sun.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Oboro, a warrior like the misty moonlight.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I think I left off when the two warriors met at the battlefield as enemies.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The long war ended eventually but the wounds and pain of those that survived had just started.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "So these two warriors started to embrace and heal the war wounds together and became one.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "There is a backstory of a man appearing in front of them and winning the loyalty from both warriors.";
next;
select("Who is this man?");
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "There isn't much known about this man. Only a short mentioning of the two warriors pledging their allegiance.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Maybe current generations like me are the ancestors of the current Amatsu lord? But this is only an assumption.";
next;
- mes "[Guide Gion]";
- mes "I'm almost at the end of my family story. Come back after you've passed the third test and I will tell you the rest.";
+ mes "[Leader Gion]";
+ mes "I'm almost at the end of my clan story. Come back after you've passed the third test and I will tell you the rest.";
next;
callsub L_StartTest,.@last_test,3;
end;
} else if (.@ko_test == 6) {
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You've gone through three tests leaving only one to pass.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "As I've told you before, the last test is different because you have to compete against others.";
next;
select("Will you continue the story?");
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Ha ha ha. I will finish the story.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Kagerou, a warrior like the dancing flames of the sun.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Oboro, a warrior like the misty moonlight.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "It is told that the man that earned the loyalty of the two warriors was a humorous person.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "He like the jokes and conversations better than quarrels and he liked women over men.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Hmm... I don't know why this part of the story was kept alive all these years but this man wanted to bring these two warriors together.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Both warriors did travel together after the war but kept an awkward distance from each other.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "They must have had their reasons but their lord would send them out to a difficult mission together, put them in a secret room together and all sorts of situations together.";
next;
select("Sounds like an odd person.");
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Yes, he was. And his efforts didn't go in vain since the two warriors eventually got acquainted and married.";
next;
- mes "[Guide Gion]";
- mes "This is how the family started.";
+ mes "[Leader Gion]";
+ mes "This is how the clan started.";
next;
select("What happened after?");
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Sadly, the next part of story was purposely discontinued.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I think it's because someone wanted us to let go of the past and move forward.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "That's that. Now shouldn't you be preparing for the last test?";
next;
set job_kagero,6;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "But you must be tired from all the tests so far. Take a rest.";
close2;
cutin "",255;
@@ -631,12 +631,12 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
set .@test_ko$, "Survival";
else if (.@ko_test_03 == 1)
set .@test_ko$, "Weaponry";
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Weren't you taking the Test of " + .@test_ko$ + " just now?";
next;
switch(select("I want to go back to test site.", "Ah... no.")) {
case 1:
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The Test of " + .@test_ko$ + " site is over here.";
close2;
if (.@ko_test_01 == 1)
@@ -647,7 +647,7 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
warp "job_ko",121,129;
end;
case 2:
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The village is over here.";
close2;
warp "amatsu",147,136;
@@ -656,39 +656,39 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
}
} else if (job_kagero == 6) {
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You've come back already? You could have rested more. Is there a reason to hurry?";
next;
input .@inputstr$;
cutin "job_ko03",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Because of ^B24E59" + .@inputstr$ + "^000000?";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I have to admit, I don't understand you now.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "But since you've gone through much, I'm sure you will do good with the final test.";
next;
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Now! No more small talk. I'll let you know what the target is for the Test of Battle.";
next;
- mes "[Guide Gion]";
- mes "The target is a monster called the ^FF0000Family Secret^000000.";
+ mes "[Leader Gion]";
+ mes "The target is a monster called the ^FF0000Clan Secret^000000.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You will have to be careful because there are many similiar shaped and named monsters in test site.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "And if you are lucky, there will be others targeting the monster.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "May the blessings of '" + (Sex == SEX_MALE ? "Kagerou, dancing sun" : "Oboro, misty moonlight") + "' be with you.";
next;
setquest 5146;
set job_kagero,7;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Then let's go to the battle test field.";
close2;
switch(rand(3)) {
@@ -699,12 +699,12 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
end;
} else if (job_kagero == 7 || job_kagero == 8) {
cutin "job_ko03",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I see you are in the middle of the ^339CCCTest of Battle^000000. Will you go back to the test site?";
next;
switch(select("Go back to the test site.", "Visit the village.")) {
case 1:
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The test site is over here.";
close2;
switch(rand(3)) {
@@ -714,7 +714,7 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
}
end;
case 2:
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The village is over here.";
close2;
cutin "",255;
@@ -722,7 +722,7 @@ job_ko,25,115,4 script Old Man#ko 4_M_KAGE_OLD,{
}
} else {
cutin "job_ko03",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You should not be here. Leave!";
close2;
warp "amatsu",147,136;
@@ -737,14 +737,14 @@ L_StartTest:
case 2: set .@str$,"You are taking the ^339CCCTest of %s^000000 as the second test? "; break;
case 3: set .@str$,"Your third test is the ^339CCCTest of %s^000000! "; break;
}
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
switch (getarg(0)) {
case 1:
mes sprintf(.@str$ + "Then I will get to see a familiar face after so long...","Knowledge");
next;
select("Familiar face?");
setquest 5136;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Ha ha ha. You'll know when we get there. The Test of Knowledge is taken over here.";
close2;
warp "job_ko",72,128;
@@ -753,7 +753,7 @@ L_StartTest:
mes sprintf(.@str$ + "It's a lonesome test that you have to face alone.","Survival");
next;
setquest 5137;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "But I believe you can handle it. The Test of Survival is taken over here.";
close2;
warp "job_ko",62,16;
@@ -766,7 +766,7 @@ L_StartTest:
getitem "Phracon", 1;
mes "You receive 5 Iron Ore and 1 Phracon.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You will find these useful. The Test of Weaponry is taken over here.";
close2;
warp "job_ko",121,129;
@@ -775,74 +775,74 @@ L_StartTest:
}
//== Test of Knowledge =====================================
-job_ko,81,124,4 script Cougar#ko 4_M_JOB_ASSASSIN,{
+job_ko,81,124,4 script Kuuga Gai#ko 4_M_JOB_ASSASSIN,{
if (BaseJob != Job_Ninja) {
for (set .@i,5131; .@i<=5146; set .@i,.@i+1)
if (questprogress(.@i)) erasequest .@i;
set job_kagero,0;
- mes "[Cougar]";
- mes "Sorry, your family is not same as ours, is there something wrong?";
+ mes "[Kuuga Gai]";
+ mes "Sorry, your clan is not same as ours, is there something wrong?";
close2;
warp "amatsu",147,136;
end;
}
if (job_kagero == 5) {
if (MaxWeight - Weight < 1000 || checkweight("Knife",1) == 0) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "This is a test of knowledge, so why did you bring so many things?";
close;
}
set .@ko_test_01, questprogress(5136);
set .@ko_test_01_1, questprogress(5139);
if (.@ko_test_01 == 1 && .@ko_test_01_1 == 0) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "It's been a while.";
next;
select("Aren't you...");
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "I remember you from before looking for the way of the ninja.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "You've grown this strong already?";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Ha ha ha-";
mes "A truly determined youth! I like that.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Good! The test you are about to take is the ^339CCCTest of Knowledge^000000.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "I hope you haven't been lazy with your studies while focusing on getting stronger?";
next;
switch(select("Yes", "No")) {
case 1:
setquest 5139;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "That's a relief. Let me know when you are ready to start the test.";
close;
case 2:
setquest 5139;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "So you were all talk? Well, let me know when you are ready then.";
close;
}
} else if (.@ko_test_01 == 1 && .@ko_test_01_1 == 1) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "I'm ready at my end. Are you ready for the test?";
next;
if(select("Yes", "No") == 2) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Well, what can I do but wait for you.";
close;
}
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "This isn't your first test, is it?";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "You only need to choose the correct answer to my questions.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Let's start.";
next;
@@ -862,9 +862,9 @@ job_ko,81,124,4 script Cougar#ko 4_M_JOB_ASSASSIN,{
deletearray .@n[10],getarraysize(.@n) - .@questions;
freeloop(0);
- set @job_ko_cougar,0;
+ set @job_ko_kuuga,0;
for (set .@i,1; .@i<=.@questions; set .@i,.@i+1) {
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes (.@i < .@questions)?"Question number "+.@i+":":"Last question:";
switch (.@n[.@i-1]) {
case 1: callsub L_Question,"What is the DEX + LUK total for a Job Master?",2,"8:10:12:14"; break;
@@ -918,67 +918,67 @@ job_ko,81,124,4 script Cougar#ko 4_M_JOB_ASSASSIN,{
case 49: callsub L_Question,"Which of the following blacksmiths do not create ninja items?",2,"Khaibara:Aiku:Tetsu:Toshu"; break;
case 50: callsub L_Question,"What is the name of the suspicious man you can meet during the Ninja job change quest?",3,"Red Leopard Jack:Black Leopard Jack:Red Leopard Joe:Black Leopard Joe"; break;
default:
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "An unknown error has occurred.";
mes "Please contact customer service.";
close;
}
}
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "You're through all 10 questions. Wasn't so bad! The important part starts now.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "... ... ...";
next;
- if (@job_ko_cougar < 90) {
- mes "[Cougar]";
+ if (@job_ko_kuuga < 90) {
+ mes "[Kuuga Gai]";
mes "You fool!!";
mes "You couldn't even solve these?";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Can't believe someone who is taking a new path can be so pathetic.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "I'll give you another chance.";
mes "You will take the test again with new questions. Better pass it this time.";
} else {
- mes "[Cougar]";
- mes "Hmm. " + (@job_ko_cougar) + "?";
+ mes "[Kuuga Gai]";
+ mes "Hmm. " + (@job_ko_kuuga) + "?";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Well, looks like you weren't lazy with your studies.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "What? Proud of yourself for solving these questions?";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "You still have a long way to go and this is only a small fraction of it.";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Well... I'm curious how far your strong will can take you through other tests.";
next;
completequest 5136;
erasequest 5139;
- mes "[Cougar]";
- mes "I'll let you go now so go report back to Guide Gion with your results.";
+ mes "[Kuuga Gai]";
+ mes "I'll let you go now so go report back to Leader Gion with your results.";
close2;
warp "job_ko",16,113;
end;
}
- set @job_ko_cougar,0;
+ set @job_ko_kuuga,0;
close;
} else if (.@ko_test_01 == 2 && .@ko_test_01_1 == 0) {
- mes "[Cougar]";
- mes "I'll let you go now so go report back to Guide Gion with your results.";
+ mes "[Kuuga Gai]";
+ mes "I'll let you go now so go report back to Leader Gion with your results.";
close2;
warp "job_ko",16,113;
end;
}
}
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "How did you get here?";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "It's my duty to get rid of you.";
mes "^000099(He's a short, silent man.)^000000";
mes "This will push you back!";
@@ -991,7 +991,7 @@ L_Question:
mes getarg(0);
next;
if(select(getarg(2)) == getarg(1))
- set @job_ko_cougar, @job_ko_cougar + 10;
+ set @job_ko_kuuga, @job_ko_kuuga + 10;
return;
}
@@ -1934,7 +1934,7 @@ job_ko,127,125,4 script Red Leopard Joe#ko 4_M_JOB_ASSASSIN,{
if (questprogress(.@i)) erasequest .@i;
set job_kagero,0;
mes "[Red Leopard Joe]";
- mes "Sorry, your family is not the same as ours, is there something wrong?";
+ mes "Sorry, your clan is not the same as ours, is there something wrong?";
close2;
warp "amatsu",147,136;
end;
@@ -1959,17 +1959,17 @@ job_ko,127,125,4 script Red Leopard Joe#ko 4_M_JOB_ASSASSIN,{
next;
select("Long time indeed, Joe.");
mes "[Red Leopard Joe]";
- mes "You aren't surprised I'm here. Did you meet ^0237FDCougar^000000 before coming here?";
+ mes "You aren't surprised I'm here. Did you meet ^0237FDKuuga Gai^000000 before coming here?";
next;
mes "[Red Leopard Joe]";
mes "Don't like it that I'm not the first one you visited but that is not important.";
next;
mes "[Red Leopard Joe]";
mes "Alright, " + strcharinfo(PC_NAME) + "!";
- mes "Welcome to the workshop where weapons are created for the family.";
+ mes "Welcome to the workshop where weapons are created for the clan.";
next;
mes "[Red Leopard Joe]";
- mes "Our family has been creating and using unique weapons to serve our secret missions since ancient times.";
+ mes "Our clan has been creating and using unique weapons to serve our secret missions since ancient times.";
next;
select("Really? At Einbroch?");
mes "[Red Leopard Joe]";
@@ -1979,7 +1979,7 @@ job_ko,127,125,4 script Red Leopard Joe#ko 4_M_JOB_ASSASSIN,{
mes "Yes. Einbroch is known as an industrial city, the city of great blacksmiths create new technology.";
next;
mes "[Red Leopard Joe]";
- mes "My mission is to analyze their technology and report back to the family.";
+ mes "My mission is to analyze their technology and report back to the clan.";
next;
mes "[Red Leopard Joe]";
mes "I spoke more than I intended to.";
@@ -2503,44 +2503,44 @@ job_ko,127,121,0 duplicate(Refinement Tools#ko_01) Refinement Tools#ko_02 CLEAR_
//== Test of Battle ========================================
job_ko,148,46,4 script Guide Gion#ko2 4_M_KAGE_OLD,{
if (MaxWeight - Weight < 2000 || checkweight("Knife",1) == 0) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You don't need so many things now!";
close;
}
if (job_kagero == 7) {
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Looks like you haven't taken care of the target yet.";
next;
- mes "[Guide Gion]";
- mes "I'll tell you once more. The target is the ^FF0000Family Secret^000000.";
+ mes "[Leader Gion]";
+ mes "I'll tell you once more. The target is the ^FF0000Clan Secret^000000.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Of course the path will be difficult, so continue searching!";
close2;
cutin "",255;
end;
} else if (job_kagero == 8) {
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Looks like you've taken care of the target. Hmm.";
next;
if (checkmount()) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "But please get down from your frog. Otherwise I can't continue!";
close2;
cutin "",255;
end;
}
if (BaseLevel < 99 || JobLevel < 70) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "How did you get weaker? Come back once you've regained your previous levels.";
close2;
cutin "",255;
end;
}
if (SkillPoint != 0) {
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "Please come back after using all your Skill Points.";
close2;
cutin "",255;
@@ -2548,38 +2548,38 @@ job_ko,148,46,4 script Guide Gion#ko2 4_M_KAGE_OLD,{
}
mapannounce "job_ko","[Gion] Interrupting the Test of Battle.",bc_map;
cutin "job_ko04",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "The Test of Battle will be put off for a while. Don't worry because this does not have affect to other tests.";
next;
mapannounce "job_ko","[Gion] My Friend " + strcharinfo(PC_NAME) + " made it to " + (Sex == SEX_MALE ? "Kagerou" : "Oboro") + " Path. Congratulations!!",bc_map;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "My friend " + strcharinfo(PC_NAME) + " made it to " + (Sex == SEX_MALE ? "Kagerou" : "Oboro") + " Path. Congratulations!!";
next;
cutin "job_ko02",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "It is pleasant to meet a youth that is walking through a new path.";
next;
mes "[Someone's Voice]";
mes "Wait for a while, Gion.";
next;
- donpcevent "Cougar#ko2::OnEnable";
+ donpcevent "Kuuga Gai#ko2::OnEnable";
donpcevent "Red Leopard Joe#ko2::OnEnable";
cutin "job_ko04",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I'm sorry I almost forgot about you two. Do you have anything to share with " + strcharinfo(PC_NAME) + "?";
next;
cutin "",255;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "Hmm... Embarrassing... to speak so suddenly...";
next;
- mes "[Cougar]";
- mes strcharinfo(PC_NAME) + ", you are now a proud member of our family. Always hold your head high and...";
+ mes "[Kuuga Gai]";
+ mes strcharinfo(PC_NAME) + ", you are now a proud member of our clan. Always hold your head high and...";
next;
- mes "[Cougar]";
+ mes "[Kuuga Gai]";
mes "^777777(Gai's voice fades out.)^000000.";
mes "I'm sorry I strangled you when we first met.";
next;
- donpcevent "Cougar#ko2::OnDisable";
+ donpcevent "Kuuga Gai#ko2::OnDisable";
mes "[Red Leopard Joe]";
mes "Puhahaha! Gai is all talk. I know I was know valuable to you than that Gai.";
next;
@@ -2600,17 +2600,17 @@ job_ko,148,46,4 script Guide Gion#ko2 4_M_KAGE_OLD,{
mes "I named your weapons on my own but I know you'll like the name.";
next;
mes "[Red Leopard Joe]";
- mes "Guide Gion, please continue.";
+ mes "Leader Gion, please continue.";
next;
cutin "job_ko01",2;
donpcevent "Red Leopard Joe#ko2::OnDisable";
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I don't have much to add because Gai and Joe said it all.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I'm just sorry that the environment of all these tests could have been better for our later generation.";
next;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You only need to look forward and never turn back.";
next;
for (set .@i,5131; .@i<=5146; set .@i,.@i+1)
@@ -2619,21 +2619,21 @@ job_ko,148,46,4 script Guide Gion#ko2 4_M_KAGE_OLD,{
getnameditem .@item,strcharinfo(PC_NAME);
jobchange(Sex == SEX_MALE ? Job_Kagerou : Job_Oboro);
donpcevent "Summon Target#ko::OnEnable";
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I hope the blessings of Kagerou, dancing sun and Oboro, misty moonlight will be with you on your journey ahead.";
close2;
warp "que_ng",21,71;
end;
} else if (job_kagero == 9) {
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "I hope the blessings of Kagerou, dancing sun and Oboro, misty moonlight will be with you on your journey ahead.";
close2;
warp "que_ng",21,71;
end;
} else {
cutin "job_ko01",2;
- mes "[Guide Gion]";
+ mes "[Leader Gion]";
mes "You should not be here. Please leave!";
close2;
warp "amatsu",147,136;
@@ -2641,16 +2641,16 @@ job_ko,148,46,4 script Guide Gion#ko2 4_M_KAGE_OLD,{
}
}
-job_ko,151,47,4 script Cougar#ko2 4_M_JOB_ASSASSIN,{
- mes "[Cougar]";
+job_ko,151,47,4 script Kuuga Gai#ko2 4_M_JOB_ASSASSIN,{
+ mes "[Kuuga Gai]";
mes "Congratulation for choosing the road of development!";
close;
OnInit:
OnDisable:
- disablenpc "Cougar#ko2";
+ disablenpc "Kuuga Gai#ko2";
end;
OnEnable:
- enablenpc "Cougar#ko2";
+ enablenpc "Kuuga Gai#ko2";
end;
}
@@ -2684,7 +2684,7 @@ OnEnable:
case 6: set .@mob,1049; break;
case 7: set .@mob,1050; break;
}
- areamonster "job_ko",120,30,160,70,"Family Secret",.@mob,1,"Summon Target#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan Secret",.@mob,1,"Summon Target#ko::OnMyMobDead";
end;
OnDisable:
initnpctimer;
@@ -2706,25 +2706,25 @@ OnInit:
donpcevent "Summon Fake#ko::OnEnable";
end;
OnEnable:
- areamonster "job_ko",120,30,160,70,"Family's Legacy",1002,5,"Summon Fake#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan's Legacy",1002,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Kagerou's Memory",1002,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Oboro's Memory",1002,5,"Summon Fake#ko::OnMyMobDead";
- areamonster "job_ko",120,30,160,70,"Family's Mistake",1031,5,"Summon Fake#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan's Mistake",1031,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Oboro's Mistake",1031,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Kagerou's Mistake",1031,5,"Summon Fake#ko::OnMyMobDead";
- areamonster "job_ko",120,30,160,70,"Family's Memory",1113,5,"Summon Fake#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan's Memory",1113,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Oboro's Past",1113,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Kagerou's Past",1113,5,"Summon Fake#ko::OnMyMobDead";
- areamonster "job_ko",120,30,160,70,"Family's Legacy",1063,5,"Summon Fake#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan's Legacy",1063,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Oboro's Legacy",1063,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Kagerou's Legacy",1063,5,"Summon Fake#ko::OnMyMobDead";
- areamonster "job_ko",120,30,160,70,"Family's Mistake",1010,5,"Summon Fake#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan's Mistake",1010,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Oboro's Memory",1010,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Kagerou's Memory",1010,5,"Summon Fake#ko::OnMyMobDead";
- areamonster "job_ko",120,30,160,70,"Family's Past",1049,5,"Summon Fake#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan's Past",1049,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Oboro's Mistake",1049,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Kagerou's Mistake",1049,5,"Summon Fake#ko::OnMyMobDead";
- areamonster "job_ko",120,30,160,70,"Family's Memory",1050,5,"Summon Fake#ko::OnMyMobDead";
+ areamonster "job_ko",120,30,160,70,"Clan's Memory",1050,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Oboro's Past",1050,5,"Summon Fake#ko::OnMyMobDead";
areamonster "job_ko",120,30,160,70,"Kagerou's Past",1050,5,"Summon Fake#ko::OnMyMobDead";
end;
diff --git a/npc/re/jobs/3-1/archbishop.txt b/npc/re/jobs/3-1/archbishop.txt
index e59492ce5..e37087857 100644
--- a/npc/re/jobs/3-1/archbishop.txt
+++ b/npc/re/jobs/3-1/archbishop.txt
@@ -779,7 +779,7 @@ job3_arch01,29,34,3 script Valkyrie#arch 4_F_VALKYRIE2,{
warp "odin_tem02",282,263;
end;
}
- if (getmercinfo(1)) {
+ if (getmercinfo(MERCINFO_CLASS)) {
mes "[Valkyrie]";
mes "If you want to talk with me, you have to ^3131FFcancel all contracts^000000 with any mercenaries you have.";
close;
@@ -1006,7 +1006,7 @@ OnTouch:
if (countitem(ValkyrieA_Scroll)) {
delitem ValkyrieA_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2037) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_A) {
if (strnpcinfo(NPC_NAME) == "#arch_1_10")
viewpoint 1,113,327,1,0xFF9900;
.@randht = rand(1,10);
@@ -1038,7 +1038,7 @@ OnTouch:
if (countitem(ValkyrieA_Scroll)) {
delitem ValkyrieA_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2037) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_A) {
mapannounce "job3_arch02","Valkyrie's Nightmare: An incompetent illusion of Valkyrie came here with the assistance of humans. You wanna have that nightmare?",bc_map,"0xFF0000";
donpcevent "mob#arch_1::OnKill";
end;
@@ -1113,7 +1113,7 @@ OnKill:
}
job3_arch02,113,327,5 script Valkyrie#arch_01 4_F_VALKYRIE2,{
- if (getmercinfo(1)) {
+ if (getmercinfo(MERCINFO_CLASS)) {
mes "[Valkyrie]";
mes "If you want to talk with me, you have to ^3131FFcancel all contracts^000000 with any mercenaries you have.";
close;
@@ -1355,7 +1355,7 @@ OnTouch:
if (countitem(ValkyrieB_Scroll)) {
delitem ValkyrieB_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2038) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_B) {
.@randht = rand(1,10);
if (.@randht < 8)
mapannounce "job3_arch02","Whispering of an impersonation: I can feel the devil's spirits. Can you hear? The sound of gathering in crowds.",bc_map,"0xFFCE00";
@@ -1400,7 +1400,7 @@ OnTouch:
if (countitem(ValkyrieB_Scroll)) {
delitem ValkyrieB_Scroll,1;
// fall through
- } else if (getmercinfo(1) == 2038) {
+ } else if (getmercinfo(MERCINFO_CLASS) == VALKYRIE_B) {
mapannounce "job3_arch02","A shout of devil: You are so childish. I invite you a party of devil. I'll make you have a fun!",bc_map,"0xFF0000";
end;
}
diff --git a/npc/re/jobs/3-1/ranger.txt b/npc/re/jobs/3-1/ranger.txt
index 41e5b476f..166a1d42e 100644
--- a/npc/re/jobs/3-1/ranger.txt
+++ b/npc/re/jobs/3-1/ranger.txt
@@ -613,7 +613,7 @@ tur_dun01,91,169,3 script Test Instructor#jr02 4_M_JOB_HUNTER,{
mes "Don't hang around here doing nothing. This is my area!";
close;
L_Start:
- if (getmercinfo(1)) {
+ if (getmercinfo(MERCINFO_CLASS)) {
mes "[Test Instructor, Teardrop]";
mes "Stop!";
next;
@@ -1491,7 +1491,7 @@ job3_rang02,251,49,3 script Test Supervisor#jr_13 4_M_JOB_HUNTER,{
setquest 8261;
close;
}
- if (getmercinfo(1) == 2034) {
+ if (getmercinfo(MERCINFO_CLASS) == M_DESERT_WOLF_B) {
erasequest 8261;
mes "Good! Then I'll start the test right now!";
next;
diff --git a/npc/re/jobs/3-2/sura.txt b/npc/re/jobs/3-2/sura.txt
index 63e689acc..4e0108fd8 100644
--- a/npc/re/jobs/3-2/sura.txt
+++ b/npc/re/jobs/3-2/sura.txt
@@ -654,14 +654,14 @@ OnTimer305000:
OnTimer315000:
mapannounce "sword_2-1","Come on here.",bc_map;
donpcevent "Buddy#job_shuaneh::OnDisable";
- donpcevent "#Sura_garajjom::OnEnable";
+ // donpcevent "#Sura_garajjom::OnEnable"; // Commented to prevent #Sura_garajjom allowing player to success the test at any case (even when failing it).
end;
OnTimer320000:
mapannounce "sword_2-1","I guess you're not ready to meet the master yet...",bc_map;
mapwarp "sword_2-1","yuno_fild07",255,178;
- donpcevent "#Sura_garajjom::OnDisable";
- donpcevent "Drawing Room::OnEnable";
+ // donpcevent "#Sura_garajjom::OnDisable";
donpcevent "Buddy#Sura_Salon::OnDisable";
+ donpcevent "Drawing Room::OnEnable";
end;
}
diff --git a/npc/re/merchants/hd_refiner.txt b/npc/re/merchants/hd_refiner.txt
index 17979642e..2dcc74bae 100644
--- a/npc/re/merchants/hd_refiner.txt
+++ b/npc/re/merchants/hd_refiner.txt
@@ -39,6 +39,17 @@
//== Blacksmith Mighty Hammer (+7~9) =======================
- script ::MightyHammer FAKE_NPC,{
+ mes("[Blacksmith Mighty Hammer]");
+ mes("I'm a blacksmith skilled in refining weapons and armors.");
+ mes("I can refine an item of your choice among the items you are equipped with.");
+ mes("Which item do you want to refine?");
+
+ if (getbattleflag("features/replace_refine_npcs") == 1) {
+ if (openrefineryui())
+ close();
+ }
+ next();
+
disable_items;
mes "[Blacksmith Mighty Hammer]";
mes "Unlike others, I am a blacksmith who refines a very limited number of items.";
diff --git a/npc/re/merchants/refine.txt b/npc/re/merchants/refine.txt
index 6356acfca..879e9a5f1 100644
--- a/npc/re/merchants/refine.txt
+++ b/npc/re/merchants/refine.txt
@@ -56,6 +56,17 @@ payon_in01,18,132,3 script Vestri#pay 4_M_DWARF,{
// On official servers, if an item is unsuccessfully refined it will break at a
// 20% rate and downgrade at an 80% rate.
function script refinenew {
+ mesf("[%s]", getarg(0));
+ mes("I'm a blacksmith skilled in refining weapons and armors.");
+ mes("I can refine an item of your choice among the items you are equipped with.");
+ mes("Which item do you want to refine?");
+
+ if (getbattleflag("features/replace_refine_npcs") == 1) {
+ if (openrefineryui())
+ close();
+ }
+ next();
+
disable_items;
mes "["+ getarg(0) +"]";
mes "I am the best Armsmith ever!";
diff --git a/npc/re/merchants/renters.txt b/npc/re/merchants/renters.txt
index ab6b3f9ac..30d9679b0 100644
--- a/npc/re/merchants/renters.txt
+++ b/npc/re/merchants/renters.txt
@@ -166,60 +166,125 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{
close;
}
-//== Magic Gear Renter =====================================
+//== Mado Gear Renter :: madogear =====================================
- script ::mgm FAKE_NPC,{
- mes "[Magic Gear Master]";
+ mes "[Mado Gear Armorer]";
if (Class == Job_Mechanic || Class == Job_Mechanic_T || Class == Job_Baby_Mechanic) {
mes "Welcome, Mechanic.";
mes "Would you like to rent a Pushcart or";
- mes "ride a Magic Gear?";
+ mes "ride a Mado Gear?";
next;
- switch(select("Rent a Pushcart", "Ride a Magic Gear", "Cancel")) {
+ switch(select("Rent a Pushcart", "Ride a Mado Gear", "Buy Emergency Mado Gear", "Upgrade Cooling Device", "Cancel")) {
case 1:
if (checkcart()) {
- mes "[Magic Gear Master]";
+ mes "[Mado Gear Armorer]";
mes "I'm sorry, but you already";
mes "have a Pushcart.";
close;
}
setcart;
- mes "[Magic Gear Master]";
+ mes "[Mado Gear Armorer]";
mes "There you go!";
close;
case 2:
if (checkmount() == MOUNT_MADO) {
- mes "[Magic Gear Master]";
+ mes "[Mado Gear Armorer]";
mes "I'm sorry, but you're already";
- mes "riding a Magic Gear.";
+ mes "riding a Mado Gear.";
close;
} else if (!getskilllv(NC_MADOLICENCE)) {
- mes "[Magic Gear Master]";
- mes "Please learn the skill to get the Magic Gear License first.";
+ mes "[Mado Gear Armorer]";
+ mes "Please learn the skill to get the Mado Gear License first.";
close;
} else if(hascashmount()) {
- mes "[Magic Gear Master]";
+ mes "[Mado Gear Armorer]";
mes "Please remove your cash mount.";
close;
}
setmount(MOUNT_MADO);
- mes "[Magic Gear Master]";
+ mes "[Mado Gear Armorer]";
mes "Have fun, and please come again!";
close;
case 3:
+ mes "[Mado Gear Armorer]";
+ mes "Emergency Mado Gear is really useful for emergency situations and it is sold at 1,000,000 Zeny.";
+ next;
+ if (select("Purchase", "Cancel") == 2) {
+ mes "[Mado Gear Armorer]";
+ mes "I see. Please feel free to ask me";
+ mes "if you change your mind.";
+ close;
+ }
+ if (countitem(Mado_Box) > 0) {
+ mes "[Mado Gear Armorer]";
+ mes "I'm sorry, but you already have an Emergency Mado Gear.";
+ close;
+ }
+ if (Zeny < 1000000) {
+ mes "[Mado Gear Armorer]";
+ mes "I'm sorry, but you don't have enough Zeny to purchase the Emergency Mado Gear.";
+ close;
+ }
+ Zeny -= 1000000;
+ getitem Mado_Box, 1;
+ mes "[Mado Gear Armorer]";
+ mes "There you go!";
+ close;
+ case 4:
+ mes "[Mado Gear Armorer]";
+ mes "Which device do you want to upgrade?";
+ next;
+ if (select("Cooling Device", "High Quality Cooler") == 1) {
+ mes "[Mado Gear Armorer]";
+ mes "Upgrading Cooling Device to High Quality Cooler needs 1 Cooling Device and 2,000,000 Zeny.";
+ next;
+ .@itemid = Cooling_Device;
+ .@cost = 2000000;
+ } else {
+ mes "[Mado Gear Armorer]";
+ mes "Upgrading High Quality Cooler to Special Cooler needs 1 High Quality Cooler and 4,000,000 Zeny.";
+ next;
+ .@itemid = High_Quality_Cooler;
+ .@cost = 4000000;
+ }
+ if (select("Upgrade", "Cancel") == 2) {
+ mes "[Mado Gear Armorer]";
+ mes "I see. Please feel free to ask me";
+ mes "if you change your mind.";
+ close;
+ }
+ if (!countitem(.@itemid)) {
+ mes "[Mado Gear Armorer]";
+ mes "I'm sorry, but you don't have the " + getitemname(.@itemid) + ".";
+ close;
+ }
+ if (Zeny < .@cost) {
+ mes "[Mado Gear Armorer]";
+ mes "I'm sorry, but you don't have enough Zeny to upgrade the device.";
+ close;
+ }
+ Zeny -= .@cost;
+ delitem .@itemid, 1;
+ getitem (.@itemid == Cooling_Device ? High_Quality_Cooler : Special_Cooler), 1;
+ mes "[Mado Gear Armorer]";
+ mes "Here you are! Your very own " + getitemname(.@itemid) + ".";
+ close;
+ case 5:
close;
}
}
mes "How may I help you?";
- mes "Magic Gears are only available for Mechanics.";
+ mes "Mado Gears are only available for Mechanics.";
close;
}
-prontera,163,178,3 duplicate(mgm) Magic Gear Master#prt 8W_SOLDIER
-geffen,103,55,5 duplicate(mgm) Magic Gear Master#gef 8W_SOLDIER
-payon,166,106,5 duplicate(mgm) Magic Gear Master#pay 8W_SOLDIER
-aldebaran,133,112,5 duplicate(mgm) Magic Gear Master#alde 8W_SOLDIER
-yuno,167,187,3 duplicate(mgm) Magic Gear Master#yuno 8W_SOLDIER
-rachel,106,134,5 duplicate(mgm) Magic Gear Master#ra 8W_SOLDIER
-dicastes01,187,207,3 duplicate(mgm) Magic Gear Master#dic 8W_SOLDIER
-manuk,273,212,5 duplicate(mgm) Magic Gear Master#man 8W_SOLDIER
-splendide,180,174,5 duplicate(mgm) Magic Gear Master#spl 8W_SOLDIER
-mid_camp,242,243,3 duplicate(mgm) Magic Gear Master#mid 8W_SOLDIER
+
+prontera,163,178,3 duplicate(mgm) Mado Gear Armorer#prt 8W_SOLDIER
+geffen,103,55,5 duplicate(mgm) Mado Gear Armorer#gef 8W_SOLDIER
+payon,166,106,5 duplicate(mgm) Mado Gear Armorer#pay 8W_SOLDIER
+aldebaran,133,112,5 duplicate(mgm) Mado Gear Armorer#alde 8W_SOLDIER
+yuno,167,187,3 duplicate(mgm) Mado Gear Armorer#yuno 8W_SOLDIER
+rachel,106,134,5 duplicate(mgm) Mado Gear Armorer#ra 8W_SOLDIER
+dicastes01,187,207,3 duplicate(mgm) Mado Gear Armorer#dic 8W_SOLDIER
+manuk,273,212,5 duplicate(mgm) Mado Gear Armorer#man 8W_SOLDIER
+splendide,180,174,5 duplicate(mgm) Mado Gear Armorer#spl 8W_SOLDIER
+mid_camp,242,243,3 duplicate(mgm) Mado Gear Armorer#mid 8W_SOLDIER
diff --git a/npc/re/merchants/shadow_refiner.txt b/npc/re/merchants/shadow_refiner.txt
index f03d348b2..db9668b6d 100644
--- a/npc/re/merchants/shadow_refiner.txt
+++ b/npc/re/merchants/shadow_refiner.txt
@@ -39,11 +39,17 @@ itemmall,31,76,3 script Shadow Blacksmith#nomal 4_F_JOB_BLACKSMITH,{
.@npc_name$ = "[Shadow Blacksmith]";
.@zeny_cost = 20000; // Amount of zeny to be charged for refining.
- disable_items;
mesf("%s", .@npc_name$);
mes("Do you want to refine a Shadow item?");
mes("Please choose the part you want to refine.");
- next;
+
+ if (getbattleflag("features/replace_refine_npcs") == 1) {
+ if (openrefineryui())
+ close();
+ }
+ next();
+
+ disable_items;
setarray(.@position$[0],"Armor","Weapon","Shield","Shoes","Earring","Pendant");
for (.@i=EQI_SHADOW_ARMOR; .@i <= EQI_SHADOW_ACC_L; .@i++){
.@menu$ = .@menu$ + (getequipisequiped(.@i) ? getequipname(.@i) : ("^8C8C8C" + .@position$[.@i-EQI_SHADOW_ARMOR] + " [Not Equipped]^000000" + ":"));
diff --git a/npc/re/quests/eden/eden_tutorial.txt b/npc/re/quests/eden/eden_tutorial.txt
index 902db7945..188bc514a 100644
--- a/npc/re/quests/eden/eden_tutorial.txt
+++ b/npc/re/quests/eden/eden_tutorial.txt
@@ -228,7 +228,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
close;
}
} else if (questprogress(9167) == 1) {
- if (!getmercinfo(1)) {
+ if (!getmercinfo(MERCINFO_CLASS)) {
mes "[Tutorial Instructor]";
mes "You haven't gotten a mercenary yet.";
next;
diff --git a/npc/scripts.conf b/npc/scripts.conf
index f03ac50f0..aa3cb23e8 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -226,6 +226,7 @@
"npc/other/turbo_track.txt",
"npc/other/item_merge.txt",
"npc/other/private_airship.txt",
+"npc/other/inventory_expansion.txt",
//================= Quests ================================================
// - Quests-Tutorials for basic classes (1st class quests) ------
diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf
index 14384fd17..a5aad9767 100644
--- a/npc/scripts_custom.conf
+++ b/npc/scripts_custom.conf
@@ -50,6 +50,7 @@
//"npc/custom/card_remover.txt",
//"npc/custom/item_signer.txt",
//"npc/custom/woe_controller.txt",
+//"npc/custom/bartershop.txt",
//================= Other Scripts =========================================
// -- MVP Arena
diff --git a/npc/woe-fe/agit_main.txt b/npc/woe-fe/agit_main.txt
index 5ac5b8e9a..a0db6402b 100644
--- a/npc/woe-fe/agit_main.txt
+++ b/npc/woe-fe/agit_main.txt
@@ -105,7 +105,8 @@ OnAgitBreak:
// Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen)
if (.@GID <= 0) {
.@notice$ = "Character "+strcharinfo(PC_NAME)+" ("+getcharid(CHAR_ID_CHAR)+") broke the Emperium in Castle: "+strnpcinfo(NPC_NAME_HIDDEN)+" while guildless. No data will be saved and Emperium respawned.";
- logmes .@notice$; debugmes .@notice$;
+ logmes .@notice$;
+ consolemes(CONSOLEMES_NOTICE, .@notice$);
donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena";
end;
}
diff --git a/npc/woe-se/agit_main_se.txt b/npc/woe-se/agit_main_se.txt
index 6fc319377..41430f6a1 100644
--- a/npc/woe-se/agit_main_se.txt
+++ b/npc/woe-se/agit_main_se.txt
@@ -222,50 +222,50 @@ OnTreasureDied:
- script Steward#template FAKE_NPC,{
.@GID = getcastledata(strnpcinfo(NPC_MAP),1);
if (!.@GID) {
- mes "[ Steward ]";
- mes "I await for the master";
- mes "whom destiny will choose";
- mes "for me. Do you think you";
- mes "have to courage and strength";
- mes "to conquer this stronghold?";
+ mes("[ Steward ]");
+ mes("I await for the master");
+ mes("whom destiny will choose");
+ mes("for me. Do you think you");
+ mes("have to courage and strength");
+ mes("to conquer this stronghold?");
close;
}
if (getcharid(CHAR_ID_GUILD) != .@GID || strcharinfo(PC_NAME) != getguildmaster(.@GID)) {
- mes "[ Steward ]";
- mes "Hmpf. Your threats don't";
- mes "scare me! Guardians, drive";
- mes "this infidel away from here!";
- mes "I will always be loyal to the";
- mes "master of this stronghold,";
- mes "the one and only ^FF0000"+getguildmaster(.@GID)+"^000000.";
+ mes("[ Steward ]");
+ mes("Hmpf. Your threats don't");
+ mes("scare me! Guardians, drive");
+ mes("this infidel away from here!");
+ mes("I will always be loyal to the");
+ mes("master of this stronghold,");
+ mesf("the one and only ^FF0000%s^000000.", getguildmaster(.@GID));
close;
}
- mes "[ Steward ]";
- mes "Ah, Master ^FF0000"+getguildmaster(.@GID)+"^000000...";
- mes "How shall I serve you today?";
- mes "Was there an aspect of this";
- mes "stronghold's maintenance";
- mes "you wanted to discuss?";
+ mes("[ Steward ]");
+ mesf("Ah, Master ^FF0000%s^000000...", getguildmaster(.@GID));
+ mes("How shall I serve you today?");
+ mes("Was there an aspect of this");
+ mes("stronghold's maintenance");
+ mes("you wanted to discuss?");
next;
switch(select("Stronghold Briefing", "Invest in Commercial Growth", "Invest in Defense growth", "Hire/Fire Storage Staff", "Go to Master's room")) {
case 1:
- mes "[ Steward ]";
- mes "The Commercial Growth";
- mes "Level of the stronghold is ^0000ff"+getcastledata(strnpcinfo(NPC_MAP),2)+".";
+ mes("[ Steward ]");
+ mes("The Commercial Growth");
+ mesf("Level of the stronghold is ^0000ff%d^000000.", getcastledata(strnpcinfo(NPC_MAP),2));
if (getcastledata(strnpcinfo(NPC_MAP),4) > 0) {
- mes "Last time, you invested in";
- mes "Commercial Growth "+getcastledata(strnpcinfo(NPC_MAP),4)+".";
+ mes("Last time, you invested in");
+ mesf("Commercial Growth ^0000ff%d^000000.", getcastledata(strnpcinfo(NPC_MAP),4));
}
next;
- mes "[ Steward ]";
- mes "Our stronghold's";
- mes "safeguard level is "+getcastledata(strnpcinfo(NPC_MAP),3)+".";
+ mes("[ Steward ]");
+ mes("Our stronghold's");
+ mesf("safeguard level is %d.", getcastledata(strnpcinfo(NPC_MAP),3));
if (getcastledata(strnpcinfo(NPC_MAP),5) > 0) {
- mes "Last time, you invested";
- mes "in defense "+getcastledata(strnpcinfo(NPC_MAP),5)+" times.";
+ mes("Last time, you invested");
+ mesf("in defense %d times.", getcastledata(strnpcinfo(NPC_MAP),5));
}
- mes " ";
- mes "That is all, master.";
+ mes(" ");
+ mes("That is all, master.");
close;
case 2:
.@Economy = getcastledata(strnpcinfo(NPC_MAP),2);
@@ -281,84 +281,84 @@ OnTreasureDied:
// Quadruple the cost of investing if you've already invested once.
if (getcastledata(strnpcinfo(NPC_MAP),4))
.@eco_invest *= 4;
- mes "[ Steward ]";
- mes "Raising the stronghold's";
- mes "commercial growth will";
- mes "increase the quantity of";
- mes "goods produced for the guild.";
- mes "Investing in commercial growth";
- mes "will help the guild's future.";
+ mes("[ Steward ]");
+ mes("Raising the stronghold's");
+ mes("commercial growth will");
+ mes("increase the quantity of");
+ mes("goods produced for the guild.");
+ mes("Investing in commercial growth");
+ mes("will help the guild's future.");
next;
- mes "[ Steward ]";
- mes "You can make one investment";
- mes "each day, but if you can make";
- mes "two investments if you pay";
- mes "more Zeny: this will speed";
- mes "up commercial development,";
- mes "but can be quite expensive.";
+ mes("[ Steward ]");
+ mes("You can make one investment");
+ mes("each day, but if you can make");
+ mes("two investments if you pay");
+ mes("more Zeny: this will speed");
+ mes("up commercial development,");
+ mes("but can be quite expensive.");
next;
if (.@Economy == 100) {
- mes "[ Steward ]";
- mes "However, our stronghold's";
- mes "commerical growth level is";
- mes "at 100%. It's not possible to";
- mes "develop commercial growth";
- mes "any further than that.";
+ mes("[ Steward ]");
+ mes("However, our stronghold's");
+ mes("commerical growth level is");
+ mes("at 100%. It's not possible to");
+ mes("develop commercial growth");
+ mes("any further than that.");
close;
}
if (getcastledata(strnpcinfo(NPC_MAP),4) >= 2) {
- mes "[ Steward ]";
- mes "You've already made two";
- mes "investments today, so you'll";
- mes "have to wait until tomorrow";
- mes "to make another investment.";
+ mes("[ Steward ]");
+ mes("You've already made two");
+ mes("investments today, so you'll");
+ mes("have to wait until tomorrow");
+ mes("to make another investment.");
close;
}
if (getcastledata(strnpcinfo(NPC_MAP),4) == 0) {
- mes "[ Steward ]";
- mes "You must pay ^FF0000"+.@eco_invest+"^000000 Zeny";
- mes "to make an investment";
- mes "Will you invest in this";
- mes "stronghold's commerical";
- mes "development now?";
+ mes("[ Steward ]");
+ mesf("You must pay ^FF0000%d^000000 Zeny", .@eco_invest);
+ mes("to make an investment");
+ mes("Will you invest in this");
+ mes("stronghold's commerical");
+ mes("development now?");
}
else {
- mes "[ Steward ]";
- mes "You must pay ^FF0000"+.@eco_invest+"^000000";
- mes "more Zeny to make a second";
- mes "investment today. Will you";
- mes "invest one more time?";
+ mes("[ Steward ]");
+ mesf("You must pay ^FF0000%d^000000", .@eco_invest);
+ mes("more Zeny to make a second");
+ mes("investment today. Will you");
+ mes("invest one more time?");
}
next;
switch(select("Invest in Commercial Growth", "Cancel")) {
case 1:
if (getcastledata(strnpcinfo(NPC_MAP),4) >= 2) {
- mes "[ Steward ]";
- mes "You've already made two";
- mes "investments today, so you'll";
- mes "have to wait until tomorrow";
- mes "to make another investment.";
+ mes("[ Steward ]");
+ mes("You've already made two");
+ mes("investments today, so you'll");
+ mes("have to wait until tomorrow");
+ mes("to make another investment.");
close;
}
if (Zeny < .@eco_invest) {
- mes "[ Steward ]";
- mes "I'm sorry, Master, but";
- mes "you do not have enough";
- mes "Zeny to make an investment";
- mes "for the guild today.";
+ mes("[ Steward ]");
+ mes("I'm sorry, Master, but");
+ mes("you do not have enough");
+ mes("Zeny to make an investment");
+ mes("for the guild today.");
close;
}
Zeny -= .@eco_invest;
setcastledata strnpcinfo(NPC_MAP),4,getcastledata(strnpcinfo(NPC_MAP),4)+1;
- mes "[ Steward ]";
- mes "A wise use of the guild's";
- mes "funds, Master. We can expect";
- mes "to see the results of this";
- mes "investment by tomorrow.";
+ mes("[ Steward ]");
+ mes("A wise use of the guild's");
+ mes("funds, Master. We can expect");
+ mes("to see the results of this");
+ mes("investment by tomorrow.");
close;
case 2:
- mes "[ Steward ]";
- mes "As you command, Master.";
+ mes("[ Steward ]");
+ mes("As you command, Master.");
close;
}
case 3:
@@ -375,220 +375,220 @@ OnTreasureDied:
// Quadruple the cost of investing if you've already invested once.
if (getcastledata(strnpcinfo(NPC_MAP),5))
.@def_invest *= 4;
- mes "[ Steward ]";
- mes "Investing in our stronghold's";
- mes "defense will enhance the";
- mes "durability of our Guardians";
- mes "and the Emperium. We'll need";
- mes "every advantage to protect";
- mes "ourselves from our enemies.";
+ mes("[ Steward ]");
+ mes("Investing in our stronghold's");
+ mes("defense will enhance the");
+ mes("durability of our Guardians");
+ mes("and the Emperium. We'll need");
+ mes("every advantage to protect");
+ mes("ourselves from our enemies.");
next;
- mes "[ Steward ]";
- mes "You can invest in defense";
- mes "once per day, but if you pay";
- mes "more Zeny, you can invest";
- mes "a maximum of two times daily.";
+ mes("[ Steward ]");
+ mes("You can invest in defense");
+ mes("once per day, but if you pay");
+ mes("more Zeny, you can invest");
+ mes("a maximum of two times daily.");
next;
- mes "[ Steward ]";
+ mes("[ Steward ]");
if (getcastledata(strnpcinfo(NPC_MAP),3) == 100) {
- mes "The Defense Level of this";
- mes "stronghold is 100%, and";
- mes "cannot be increased further.";
+ mes("The Defense Level of this");
+ mes("stronghold is 100%, and");
+ mes("cannot be increased further.");
close;
}
if (getcastledata(strnpcinfo(NPC_MAP),5) >= 2) {
- mes "Master, you've already";
- mes "invested in Defense twice";
- mes "today. You'll need to wait";
- mes "until tomorrow if you really";
- mes "want to increase our defenses.";
+ mes("Master, you've already");
+ mes("invested in Defense twice");
+ mes("today. You'll need to wait");
+ mes("until tomorrow if you really");
+ mes("want to increase our defenses.");
close;
}
if (getcastledata(strnpcinfo(NPC_MAP),5) == 0) {
- mes "We need ^FF0000"+.@def_invest+"^000000";
- mes "Zeny to invest in our";
- mes "stronghold's defenses.";
- mes "Will you invest now?";
+ mesf("We need ^FF0000%d^000000", .@def_invest);
+ mes("Zeny to invest in our");
+ mes("stronghold's defenses.");
+ mes("Will you invest now?");
}
else {
- mes "We need ^FF0000"+.@def_invest+"^000000";
- mes "Zeny to invest in our";
- mes "stronghold's defenses";
- mes "a second time today.";
- mes "Will you invest now?";
+ mesf("We need ^FF0000%d^000000", .@def_invest);
+ mes("Zeny to invest in our");
+ mes("stronghold's defenses");
+ mes("a second time today.");
+ mes("Will you invest now?");
}
next;
switch(select("Invest in Defense", "Cancel")) {
case 1:
if (getcastledata(strnpcinfo(NPC_MAP),5) >= 2) {
- mes "[ Steward ]";
- mes "Master, you've already";
- mes "invested in Defense twice";
- mes "today. You'll need to wait";
- mes "until tomorrow if you really";
- mes "want to increase our defenses.";
+ mes("[ Steward ]");
+ mes("Master, you've already");
+ mes("invested in Defense twice");
+ mes("today. You'll need to wait");
+ mes("until tomorrow if you really");
+ mes("want to increase our defenses.");
close;
}
if (Zeny < .@def_invest) {
- mes "[ Steward ]";
- mes "I'm sorry, Master, but";
- mes "you do not have enough";
- mes "Zeny to make an investment";
- mes "for the guild today.";
+ mes("[ Steward ]");
+ mes("I'm sorry, Master, but");
+ mes("you do not have enough");
+ mes("Zeny to make an investment");
+ mes("for the guild today.");
close;
}
Zeny -= .@def_invest;
setcastledata strnpcinfo(NPC_MAP),5,getcastledata(strnpcinfo(NPC_MAP),5)+1;
- mes "[ Steward ]";
- mes "A wise use of the guild's";
- mes "funds, Master. Increasing";
- mes "the frequency of treasure";
- mes "procured by the guild will";
- mes "definitely help us all.";
+ mes("[ Steward ]");
+ mes("A wise use of the guild's");
+ mes("funds, Master. Increasing");
+ mes("the frequency of treasure");
+ mes("procured by the guild will");
+ mes("definitely help us all.");
close;
case 2:
- mes "[ Steward ]";
- mes "As you command, Master.";
+ mes("[ Steward ]");
+ mes("As you command, Master.");
close;
}
case 4:
if (getcastledata(strnpcinfo(NPC_MAP),9) == 1) {
- mes "[ Steward ]";
- mes "Do you wish to dismiss";
- mes "the Kafra Employee that";
- mes "we've hired for the guild?";
+ mes("[ Steward ]");
+ mes("Do you wish to dismiss");
+ mes("the Kafra Employee that");
+ mes("we've hired for the guild?");
next;
switch(select("Dismiss", "Cancel")) {
case 1:
cutin "kafra_01",2;
- mes "[ Hired Kafra Employee ]";
- mes "Master, please reconsider!";
- mes "I've been working very hard";
- mes "for the success of the guild!";
- mes "I'll try harder to serve the";
- mes "guild members of this";
- mes "stronghold, I promise!";
+ mes("[ Hired Kafra Employee ]");
+ mes("Master, please reconsider!");
+ mes("I've been working very hard");
+ mes("for the success of the guild!");
+ mes("I'll try harder to serve the");
+ mes("guild members of this");
+ mes("stronghold, I promise!");
next;
switch(select("Dismiss", "Cancel")) {
case 1:
- mes "[ Hired Kafra Employee ]";
- mes "Why?! What have I done";
- mes "to deserve this? Waaah~!";
+ mes("[ Hired Kafra Employee ]");
+ mes("Why?! What have I done");
+ mes("to deserve this? Waaah~!");
next;
cutin "kafra_01",255;
break;
case 2:
- mes "[ Hired Kafra Employee ]";
- mes "Thank you, Master!";
- mes "I'll obey your every";
- mes "command as best I can!";
- mes "You won't regret this!";
+ mes("[ Hired Kafra Employee ]");
+ mes("Thank you, Master!");
+ mes("I'll obey your every");
+ mes("command as best I can!");
+ mes("You won't regret this!");
close;
}
break;
case 2:
- mes "[ Steward ]";
- mes "She works very hard,";
- mes "in my opinion. It was in";
- mes "all of our best interests to";
- mes "allow her to stay with us.";
+ mes("[ Steward ]");
+ mes("She works very hard,");
+ mes("in my opinion. It was in");
+ mes("all of our best interests to");
+ mes("allow her to stay with us.");
close;
}
disablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN);
setcastledata strnpcinfo(NPC_MAP),9,0;
- mes "[ Steward ]";
- mes "That Kafra Employee";
- mes "has been dismissed.";
- mes "Were really dissatisfied";
- mes "by the quality of her service?";
+ mes("[ Steward ]");
+ mes("That Kafra Employee");
+ mes("has been dismissed.");
+ mes("Were really dissatisfied");
+ mes("by the quality of her service?");
close;
}
else {
- mes "[ Steward ]";
- mes "Will you hire a";
- mes "Kafra Employee to serve";
- mes "our stronghold? You must";
- mes "pay ^FF000010,000 Zeny^000000 to hire one.";
+ mes("[ Steward ]");
+ mes("Will you hire a");
+ mes("Kafra Employee to serve");
+ mes("our stronghold? You must");
+ mes("pay ^FF000010,000 Zeny^000000 to hire one.");
next;
switch(select("Hire", "Cancel")) {
case 1:
if (getgdskilllv(.@GID,10001) == 0) {
- mes "[ Steward ]";
- mes "Master, we cannot hire a";
- mes "Kafra Employee because";
- mes "you have not yet attained";
- mes "the ^FF0000Contract with Kafra^000000";
- mes "guild skill.";
+ mes("[ Steward ]");
+ mes("Master, we cannot hire a");
+ mes("Kafra Employee because");
+ mes("you have not yet attained");
+ mes("the ^FF0000Contract with Kafra^000000");
+ mes("guild skill.");
close;
}
if (Zeny < 10000) {
- mes "[ Steward ]";
- mes "Master, we cannot hire a";
- mes "Kafra Employee because";
- mes "we do not have enough";
- mes "funds to pay the contract fee.";
+ mes("[ Steward ]");
+ mes("Master, we cannot hire a");
+ mes("Kafra Employee because");
+ mes("we do not have enough");
+ mes("funds to pay the contract fee.");
close;
}
Zeny -= 10000;
enablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN);
setcastledata strnpcinfo(NPC_MAP),9,1;
- mes "[ Steward ]";
- mes "Very well. We have formed";
- mes "a contract with the Kafra";
- mes "Head Office, and hired a";
- mes "Kafra Employee for our";
- mes "stronghold. Here she is~";
+ mes("[ Steward ]");
+ mes("Very well. We have formed");
+ mes("a contract with the Kafra");
+ mes("Head Office, and hired a");
+ mes("Kafra Employee for our");
+ mes("stronghold. Here she is~");
next;
cutin "kafra_01",2;
- mes "[ Hired Kafra Employee ]";
- mes "How do you do? I've";
- mes "been dispatched by the";
- mes "Kafra Head Office to";
- mes "serve your guild's needs.";
- mes "I'll do my best to follow";
- mes "your every command, Master.";
+ mes("[ Hired Kafra Employee ]");
+ mes("How do you do? I've");
+ mes("been dispatched by the");
+ mes("Kafra Head Office to");
+ mes("serve your guild's needs.");
+ mes("I'll do my best to follow");
+ mes("your every command, Master.");
next;
cutin "kafra_01",255;
- mes "[ Steward ]";
- mes "Our contract will expire";
- mes "after one month, so we must";
- mes "pay additional fees to keep";
- mes "this Kafra Employee in";
- mes "the service of our guild.";
+ mes("[ Steward ]");
+ mes("Our contract will expire");
+ mes("after one month, so we must");
+ mes("pay additional fees to keep");
+ mes("this Kafra Employee in");
+ mes("the service of our guild.");
close;
case 2:
- mes "[ Steward ]";
- mes "As you command, Master.";
- mes "However, I suggest hiring";
- mes "a Kafra Employee as soon";
- mes "as possible since our guild";
- mes "would greatly benefit from";
- mes "the convenient Kafra services.";
+ mes("[ Steward ]");
+ mes("As you command, Master.");
+ mes("However, I suggest hiring");
+ mes("a Kafra Employee as soon");
+ mes("as possible since our guild");
+ mes("would greatly benefit from");
+ mes("the convenient Kafra services.");
close;
}
}
case 5:
- mes "[ Steward ]";
- mes "Do you wish to enter the";
- mes "Guild Treasure Room?";
- mes "Only you, the Guild Master,";
- mes "are permitted to enter.";
+ mes("[ Steward ]");
+ mes("Do you wish to enter the");
+ mes("Guild Treasure Room?");
+ mes("Only you, the Guild Master,");
+ mes("are permitted to enter.");
next;
- mes "[ Steward ]";
- mes "Please remember to open";
- mes "the Treasure Boxes at the";
- mes "proper time. Otherwise, the";
- mes "treasure may disappear if";
- mes "something unexpected happens.";
+ mes("[ Steward ]");
+ mes("Please remember to open");
+ mes("the Treasure Boxes at the");
+ mes("proper time. Otherwise, the");
+ mes("treasure may disappear if");
+ mes("something unexpected happens.");
next;
switch(select("Go to Treasure Room", "Cancel")) {
case 1:
- mes "[ Steward ]";
- mes "Allow me to guide you";
- mes "on the secret path to";
- mes "the Treasure Room.";
- mes "Press the secret switch";
- mes "when you wish to return here.";
+ mes("[ Steward ]");
+ mes("Allow me to guide you");
+ mes("on the secret path to");
+ mes("the Treasure Room.");
+ mes("Press the secret switch");
+ mes("when you wish to return here.");
close2;
if (compare(strnpcinfo(NPC_MAP),"arug")) {
if (strnpcinfo(NPC_MAP) == "arug_cas01") setarray .@i[0],250,363;
@@ -603,13 +603,13 @@ OnTreasureDied:
warp strnpcinfo(NPC_MAP),.@i[0],.@i[1];
end;
case 2:
- mes "[ Steward ]";
- mes "Items in the Treasure Room";
- mes "are produced once each day.";
- mes "Therefore, you must obtain";
- mes "the treasure items everyday.";
- mes "For the sake of the guild,";
- mes "prioritize treasure harvesting!";
+ mes("[ Steward ]");
+ mes("Items in the Treasure Room");
+ mes("are produced once each day.");
+ mes("Therefore, you must obtain");
+ mes("the treasure items everyday.");
+ mes("For the sake of the guild,");
+ mes("prioritize treasure harvesting!");
close;
}
}
@@ -656,154 +656,154 @@ OnStartArena:
.@GID = getcastledata(strnpcinfo(NPC_MAP),1);
.@n$ = "["+strnpcinfo(NPC_NAME_VISIBLE)+"]";
if (!.@GID) {
- mes .@n$;
- mes "Great job. Now, all you";
- mes "need to do is destroy this";
- mes "Emperium to gain ownership";
- mes "over this stronghold.";
+ mes(.@n$);
+ mes("Great job. Now, all you");
+ mes("need to do is destroy this");
+ mes("Emperium to gain ownership");
+ mes("over this stronghold.");
close;
}
if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) != getguildmaster(.@GID)) {
- mes .@n$;
- mes "As guardian of this";
- mes "stronghold, I answer only";
- mes "to the master of the guild";
- mes "that controls this place.";
+ mes(.@n$);
+ mes("As guardian of this");
+ mes("stronghold, I answer only");
+ mes("to the master of the guild");
+ mes("that controls this place.");
close;
}
else {
if (!agitcheck2()) {
- mes .@n$;
- mes "I am "+strnpcinfo(NPC_NAME_VISIBLE)+", guardian of";
- mes "this stronghold. For now,";
- mes "all is quiet in this place.";
+ mes(.@n$);
+ mesf("I am %s, guardian of", strnpcinfo(NPC_NAME_VISIBLE));
+ mes("this stronghold. For now,");
+ mes("all is quiet in this place.");
next;
switch(select("Converse", "Cancel")) {
case 1:
- mes .@n$;
- mes "Do you have any questions";
- mes "about this stronghold?";
+ mes(.@n$);
+ mes("Do you have any questions");
+ mes("about this stronghold?");
next;
switch(select("Guardian Stones", "Fortress Gates", "Link Flags", "Battle Strategy", "Cancel")) {
case 1:
- mes .@n$;
- mes "There is one Emperium";
- mes "and two Guardian Stones in";
- mes "each fortress. These stones";
- mes "are the first line of defense,";
- mes "and must be destroyed before";
- mes "enemies can even enter.";
+ mes(.@n$);
+ mes("There is one Emperium");
+ mes("and two Guardian Stones in");
+ mes("each fortress. These stones");
+ mes("are the first line of defense,");
+ mes("and must be destroyed before");
+ mes("enemies can even enter.");
next;
- mes .@n$;
- mes "The stones are located in";
- mes "^4D4DFFGate Houses^000000 which must be";
- mes "protected to prevent enemies";
- mes "from reaching the Emperium.";
- mes "Guardian Stones can ^4D4DFFrecall";
- mes "your Guardians^000000 for protection.";
+ mes(.@n$);
+ mes("The stones are located in");
+ mes("^4D4DFFGate Houses^000000 which must be");
+ mes("protected to prevent enemies");
+ mes("from reaching the Emperium.");
+ mes("Guardian Stones can ^4D4DFFrecall");
+ mes("your Guardians^000000 for protection.");
next;
- mes .@n$;
- mes "Fortresses with higher levels";
- mes "of defense can summon more";
- mes "Guardians: this is why it is";
- mes "so important for guilds to";
- mes "invest in Defense Growth.";
+ mes(.@n$);
+ mes("Fortresses with higher levels");
+ mes("of defense can summon more");
+ mes("Guardians: this is why it is");
+ mes("so important for guilds to");
+ mes("invest in Defense Growth.");
next;
- mes .@n$;
- mes "Guardian Stones that have";
- mes "been destroyed can be revived";
- mes "after a certain time, but one of the guild members must give";
- mes "me the order. I can also report the status of the Guardian Stones.";
+ mes(.@n$);
+ mes("Guardian Stones that have");
+ mes("been destroyed can be revived");
+ mes("after a certain time, but one of the guild members must give");
+ mes("me the order. I can also report the status of the Guardian Stones.");
close;
case 2:
- mes .@n$;
- mes "^4D4DFFFortress Gates^000000 are the second line of guild stronghold defense,";
- mes "and are protected by extra barricades activated by the Guardian Stones.";
- mes "These gates are located in three different parts of the fortress.";
+ mes(.@n$);
+ mes("^4D4DFFFortress Gates^000000 are the second line of guild stronghold defense,");
+ mes("and are protected by extra barricades activated by the Guardian Stones.");
+ mes("These gates are located in three different parts of the fortress.");
next;
- mes .@n$;
- mes "Barricades are protected by";
- mes "Guardian Stones, and are";
- mes "restored when the Guardian";
- mes "Stones are retrieved. However,";
- mes "it is not as easy to restore";
- mes "destroyed Fortress Gates.";
+ mes(.@n$);
+ mes("Barricades are protected by");
+ mes("Guardian Stones, and are");
+ mes("restored when the Guardian");
+ mes("Stones are retrieved. However,");
+ mes("it is not as easy to restore");
+ mes("destroyed Fortress Gates.");
next;
- mes .@n$;
- mes "Fortress Gates can only be";
- mes "restored when the ^4D4DFFguild";
- mes "master of a stronghold";
- mes "changes^000000, or if ^4D4DFFrestoration";
- mes "is requested by the guild";
- mes "master of the stronghold^000000.";
+ mes(.@n$);
+ mes("Fortress Gates can only be");
+ mes("restored when the ^4D4DFFguild");
+ mes("master of a stronghold");
+ mes("changes^000000, or if ^4D4DFFrestoration");
+ mes("is requested by the guild");
+ mes("master of the stronghold^000000.");
close;
case 3:
- mes .@n$;
- mes "Strongholds have many";
- mes "Link Flags that allow you";
- mes "to access vital areas within";
- mes "restrictions placed by the";
- mes "Barricades. Usually, ^4D4DFFFlag 1";
- mes "links to the Gate House^000000.";
+ mes(.@n$);
+ mes("Strongholds have many");
+ mes("Link Flags that allow you");
+ mes("to access vital areas within");
+ mes("restrictions placed by the");
+ mes("Barricades. Usually, ^4D4DFFFlag 1");
+ mes("links to the Gate House^000000.");
next;
- mes .@n$;
- mes "Many flags link directly to";
- mes "the flag near the Emperium.";
- mes "The final numbered flag is";
- mes "linked to the Convenience";
- mes "Facility of the stronghold's";
- mes "owner. Keep this in mind.";
+ mes(.@n$);
+ mes("Many flags link directly to");
+ mes("the flag near the Emperium.");
+ mes("The final numbered flag is");
+ mes("linked to the Convenience");
+ mes("Facility of the stronghold's");
+ mes("owner. Keep this in mind.");
close;
case 4:
- mes .@n$;
- mes "Strategy? It would be better";
- mes "to develop your battle plan to";
- mes "exploit your guild's advantages";
- mes "and your enemies' weaknesses.";
- mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!";
+ mes(.@n$);
+ mes("Strategy? It would be better");
+ mes("to develop your battle plan to");
+ mes("exploit your guild's advantages");
+ mes("and your enemies' weaknesses.");
+ mes("Use the Gate Houses and Barricades, and rebuild as quickly as you can!");
close;
case 5:
- mes .@n$;
- mes "You have no questions";
- mes "to ask of me? Well, I'm";
- mes "here to serve your needs.";
+ mes(.@n$);
+ mes("You have no questions");
+ mes("to ask of me? Well, I'm");
+ mes("here to serve your needs.");
close;
}
case 2:
- mes .@n$;
- mes "I'm always here, so";
- mes "feel free to request my";
- mes "assistance whenever";
- mes "the need arises.";
+ mes(.@n$);
+ mes("I'm always here, so");
+ mes("feel free to request my");
+ mes("assistance whenever");
+ mes("the need arises.");
close;
}
}
else {
- mes .@n$;
- mes "Greetings, "+strcharinfo(PC_NAME)+".";
- mes "What are your orders?";
+ mes(.@n$);
+ mesf("Greetings, %s.", strcharinfo(PC_NAME));
+ mes("What are your orders?");
next;
switch(select("Increase Stronghold Defense", "Situational Briefing", "Cancel")) {
case 1:
if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[5]")) {
if (getgdskilllv(.@GID,10002) == 0) {
- mes .@n$;
- mes "I'm sorry, but the Guardian";
- mes "Stones aren't powerful enough";
- mes "to summon Guardians yet. We";
- mes "need to accumulate more";
- mes "knowledge before they can";
- mes "summon any Guardians.";
+ mes(.@n$);
+ mes("I'm sorry, but the Guardian");
+ mes("Stones aren't powerful enough");
+ mes("to summon Guardians yet. We");
+ mes("need to accumulate more");
+ mes("knowledge before they can");
+ mes("summon any Guardians.");
close;
}
else {
- mes .@n$;
- mes "I shall endeavor to summon";
- mes "a Guardian through a Guardian";
- mes "Stone. However, keep in mind";
- mes "that this will not work if the";
- mes "Guardian Stone is destroyed.";
+ mes(.@n$);
+ mes("I shall endeavor to summon");
+ mes("a Guardian through a Guardian");
+ mes("Stone. However, keep in mind");
+ mes("that this will not work if the");
+ mes("Guardian Stone is destroyed.");
setd "$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[5]",1;
if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"))
donpcevent "gard1#"+strnpcinfo(NPC_MAP)+"::OnEnable";
@@ -813,35 +813,35 @@ OnStartArena:
}
}
else {
- mes .@n$;
- mes "You've already commanded";
- mes "me to summon a Guardian";
- mes "to defend the stronghold.";
+ mes(.@n$);
+ mes("You've already commanded");
+ mes("me to summon a Guardian");
+ mes("to defend the stronghold.");
close;
}
case 2:
- mes .@n$;
- mes "Our defense status is...";
+ mes(.@n$);
+ mes("Our defense status is...");
setarray .@status$[0],"^4D4DFFOperational","^FF0000Destroyed","^008000Repairing";
- mes "1st Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]")]+"^000000";
- mes "2nd Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[1]")]+"^000000";
- mes "1st Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[2]")]+"^000000";
- mes "2nd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[3]")]+"^000000";
- mes "3rd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[4]")]+"^000000";
+ mesf("1st Guardian Stone: %s^000000", .@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]")]);
+ mesf("2nd Guardian Stone: %s^000000", .@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[1]")]);
+ mesf("1st Fortress Gate: %s^000000", .@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[2]")]);
+ mesf("2nd Fortress Gate: %s^000000", .@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[3]")]);
+ mesf("3rd Fortress Gate: %s^000000", .@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[4]")]);
close;
case 3:
- mes .@n$;
- mes "I'll be standing by,";
- mes "awaiting your orders.";
+ mes(.@n$);
+ mes("I'll be standing by,");
+ mes("awaiting your orders.");
close;
}
}
}
}
else {
- mes .@n$;
- mes "Who are you? Scoundrel!";
- mes "Leave this stronghold now!";
+ mes(.@n$);
+ mes("Who are you? Scoundrel!");
+ mes("Leave this stronghold now!");
close;
}
@@ -855,35 +855,35 @@ OnInit:
cutin "kafra_01",2;
.@GID = getcastledata(strnpcinfo(NPC_MAP),1);
if (getcharid(CHAR_ID_GUILD) == .@GID && getgdskilllv(.@GID,10001)) {
- mes "[Kafra Employee]";
- mes "Welcome, proud member";
- mes "of the ^FF0000"+getguildname(.@GID)+"^000000 Guild!";
- mes "The Kafra Corporation is ready";
- mes "to assist you wherever you go!";
+ mes("[Kafra Employee]");
+ mes("Welcome, proud member");
+ mesf("of the ^FF0000%s^000000 Guild!", getguildname(.@GID));
+ mes("The Kafra Corporation is ready");
+ mes("to assist you wherever you go!");
next;
switch(select("Use Storage", "Use Warp Service", "Rent Pushcart", "Cancel")) {
case 1:
if (basicskillcheck() && getskilllv("NV_BASIC") < 6) {
- mes "[Kafra Employee]";
- mes "I'm so sorry, but you must";
- mes "have at least Novice Skill";
- mes "Lv.6 to use the Storage.";
+ mes("[Kafra Employee]");
+ mes("I'm so sorry, but you must");
+ mes("have at least Novice Skill");
+ mes("Lv.6 to use the Storage.");
}
else openstorage;
break;
case 2:
- mes "[Kafra Employee]";
- mes "Please tell me your";
- mes "Warp destination.";
+ mes("[Kafra Employee]");
+ mes("Please tell me your");
+ mes("Warp destination.");
next;
switch(select("Rachel -> 200 z", "Cancel")) {
case 1:
if (Zeny < 200) {
- mes "[Kafra Employee]";
- mes "I'm sorry, but you don't";
- mes "have enough Zeny to pay";
- mes "the warp fee. Would you";
- mes "please check your funds again?";
+ mes("[Kafra Employee]");
+ mes("I'm sorry, but you don't");
+ mes("have enough Zeny to pay");
+ mes("the warp fee. Would you");
+ mes("please check your funds again?");
close2;
cutin "kafra_01",255;
end;
@@ -898,30 +898,30 @@ OnInit:
break;
case 3:
if (BaseClass != Job_Merchant) {
- mes "[Kafra Employee]";
- mes "I'm sorry, but the Pushcart";
- mes "rental service can only be";
- mes "used by Merchant, Blacksmith,";
- mes "and Alchemist class characters.";
+ mes("[Kafra Employee]");
+ mes("I'm sorry, but the Pushcart");
+ mes("rental service can only be");
+ mes("used by Merchant, Blacksmith,");
+ mes("and Alchemist class characters.");
}
else if (checkcart() == 1) {
- mes "[Kafra Employee]";
- mes "Hm? You've already";
- mes "rented a Pushcart.";
+ mes("[Kafra Employee]");
+ mes("Hm? You've already");
+ mes("rented a Pushcart.");
}
else {
- mes "[Kafra Employee]";
- mes "The Pushcart rental fee";
- mes "is 800 Zeny. Would you";
- mes "like to rent a Pushcart?";
+ mes("[Kafra Employee]");
+ mes("The Pushcart rental fee");
+ mes("is 800 Zeny. Would you");
+ mes("like to rent a Pushcart?");
next;
switch(select("Rent Pushcart", "Cancel")) {
case 1:
if (Zeny < 800) {
- mes "[Kafra Employee]";
- mes "I'm sorry, but you don't";
- mes "have enough Zeny to rent";
- mes "one of our Pushcarts.";
+ mes("[Kafra Employee]");
+ mes("I'm sorry, but you don't");
+ mes("have enough Zeny to rent");
+ mes("one of our Pushcarts.");
close2;
cutin "kafra_01",255;
end;
@@ -935,11 +935,11 @@ OnInit:
}
break;
case 4:
- mes "[Kafra Employee]";
- mes "Thank you for using the";
- mes "Kafra Service. Wherever";
- mes "you go, Kafra will be";
- mes "there to support you!";
+ mes("[Kafra Employee]");
+ mes("Thank you for using the");
+ mes("Kafra Service. Wherever");
+ mes("you go, Kafra will be");
+ mes("there to support you!");
close2;
cutin "kafra_01",255;
end;
@@ -949,13 +949,13 @@ OnInit:
end;
}
else {
- mes "[Kafra Employee]";
- mes "I'm sorry, but I've been";
- mes "exclusively contracted";
- mes "to the members of the";
- mes "^FF0000"+getguildname(.@GID)+"^000000 Guild.";
- mes "You'll have to ask another";
- mes "Kafra Employee to help you...";
+ mes("[Kafra Employee]");
+ mes("I'm sorry, but I've been");
+ mes("exclusively contracted");
+ mes("to the members of the");
+ mesf("^FF0000%s^000000 Guild.", getguildname(.@GID));
+ mes("You'll have to ask another");
+ mes("Kafra Employee to help you...");
close2;
cutin "kafra_01",255;
end;
@@ -968,54 +968,54 @@ OnInit:
.@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),0));
.@var$ = "$agit_"+strnpcinfo(NPC_NAME_HIDDEN);
if (getcharid(CHAR_ID_GUILD) == .@GID) {
- mes "^3355FFYou will need the";
- mes "following materials to";
- mes "rebuild a destroyed";
- mes "Guardian Stone.^000000";
+ mes("^3355FFYou will need the");
+ mes("following materials to");
+ mes("rebuild a destroyed");
+ mes("Guardian Stone.^000000");
next;
- mes "1 Oridecon";
- mes "1 Elunium";
- mes "30 Stones";
- mes "5 Blue Gemstones";
- mes "5 Yellow Gemstones";
- mes "5 Red Gemstones";
+ mes("1 Oridecon");
+ mes("1 Elunium");
+ mes("30 Stones");
+ mes("5 Blue Gemstones");
+ mes("5 Yellow Gemstones");
+ mes("5 Red Gemstones");
next;
- mes "^3355FFDo you want to continue?^000000";
+ mes("^3355FFDo you want to continue?^000000");
next;
if(select("No", "Continue") == 1) {
- mes "^3355FFWork canceled.^000000";
+ mes("^3355FFWork canceled.^000000");
close;
}
if ((countitem(Oridecon) > 0) && (countitem(Elunium) > 0) && (countitem(Stone) > 29) && (countitem(Blue_Gemstone) > 4) && (countitem(Yellow_Gemstone) > 4) && (countitem(Red_Gemstone) > 4)) {
- mes "^3355FFArrange Stones, Elunium, and";
- mes "Oridecon, in that order, in the";
- mes "center. Then you must arrange";
- mes "the enchanted Gemstones to";
- mes "rebuild the Guardian Stone.^000000";
+ mes("^3355FFArrange Stones, Elunium, and");
+ mes("Oridecon, in that order, in the");
+ mes("center. Then you must arrange");
+ mes("the enchanted Gemstones to");
+ mes("rebuild the Guardian Stone.^000000");
next;
setarray .@stone$[0],"Elunium","Oridecon","Stones";
.@i = select("Elunium", "Oridecon", "Stone")-1;
if (.@i == 2) .@nice += 10;
- mes "^3355FF"+.@stone$[.@i]+" has been";
- mes "placed in the center.^000000";
+ mesf("^3355FF%s has been", .@stone$[.@i]);
+ mes("placed in the center.^000000");
next;
.@i = select("Elunium", "Oridecon", "Stone")-1;
if (.@i == 0) .@nice += 10;
- mes "^3355FFYou have lined the";
- mes "outside of the center";
- mes "with some "+.@stone$[.@i]+".^000000";
+ mes("^3355FFYou have lined the");
+ mes("outside of the center");
+ mesf("with some %s.^000000", .@stone$[.@i]);
next;
.@i = select("Elunium", "Oridecon", "Stone")-1;
if (.@i == 1) .@nice += 10;
- mes "^3355FFYou covered the";
- mes "rest of the materials";
- mes "with some "+.@stone$[.@i]+".^000000";
+ mes("^3355FFYou covered the");
+ mes("rest of the materials");
+ mesf("with some %s.^000000", .@stone$[.@i]);
next;
- mes "^3355FFNow you need to arrange";
- mes "the enchanted Gemstones";
- mes "accordingly. You can identify";
- mes "their Magic properties by";
- mes "their casting effect.^000000";
+ mes("^3355FFNow you need to arrange");
+ mes("the enchanted Gemstones");
+ mes("accordingly. You can identify");
+ mes("their Magic properties by");
+ mes("their casting effect.^000000");
next;
setarray .@effect[0],56,54,225;
setarray .@color$[0],"Red","Yellow","Blue";
@@ -1023,17 +1023,17 @@ OnInit:
if (.@roof0 > 7) break;
.@i = rand(3);
specialeffect .@effect[.@i];
- mes "^3355FFThe Gemstones must";
- mes "be arranged in the correct";
- mes "order according to their";
- mes "magic properties and power.^000000";
+ mes("^3355FFThe Gemstones must");
+ mes("be arranged in the correct");
+ mes("order according to their");
+ mes("magic properties and power.^000000");
next;
.@j = select("Red Gemstone", "Yellow Gemstone", "Blue Gemstone")-1;
- mes "^3355FFYou placed the "+.@color$[.@j]+" Gemstone.^000000";
+ mesf("^3355FFYou placed the %s Gemstone.^000000", .@color$[.@j]);
if (.@i == .@j) {
- mes "^3355FFHowever, the Guardian Stone";
- mes "Repair System failed because";
- mes "of a magic power conflict.^000000";
+ mes("^3355FFHowever, the Guardian Stone");
+ mes("Repair System failed because");
+ mes("of a magic power conflict.^000000");
close;
}
.@nice += 10;
@@ -1043,23 +1043,23 @@ OnInit:
}
if (.@nice > 90) {
if (!getd(.@var$+"["+(.@num-1)+"]")) {
- mes "^3355FFThe Guardian Stone";
- mes "Repair System has";
- mes "already completed.^000000";
+ mes("^3355FFThe Guardian Stone");
+ mes("Repair System has");
+ mes("already completed.^000000");
close;
}
else {
if (!agitcheck2()) {
- mes "^3355FFIt is impossible to";
- mes "rebuild the Guardian";
- mes "Stone because the";
- mes "Emperium is not present.^000000";
+ mes("^3355FFIt is impossible to");
+ mes("rebuild the Guardian");
+ mes("Stone because the");
+ mes("Emperium is not present.^000000");
close;
}
else {
- mes "^3355FFThe Gemstones have been";
- mes "arranged, and the Guardian";
- mes "Stone is successfully repaired.^000000";
+ mes("^3355FFThe Gemstones have been");
+ mes("arranged, and the Guardian");
+ mes("Stone is successfully repaired.^000000");
delitem Oridecon,1;
delitem Elunium,1;
delitem Stone,30;
@@ -1084,10 +1084,10 @@ OnInit:
}
}
else {
- mes "^3355FFAfter all of that work...";
- mes "It looks like you failed";
- mes "to fix the Guardian Stone,";
- mes "and lost some materials.^000000";
+ mes("^3355FFAfter all of that work...");
+ mes("It looks like you failed");
+ mes("to fix the Guardian Stone,");
+ mes("and lost some materials.^000000");
delitem Stone,10;
delitem Blue_Gemstone,2;
delitem Yellow_Gemstone,2;
@@ -1096,9 +1096,9 @@ OnInit:
}
}
else {
- mes "^3355FFYou don't have enough";
- mes "materials to repair";
- mes "the Guardian Stone.^000000";
+ mes("^3355FFYou don't have enough");
+ mes("materials to repair");
+ mes("the Guardian Stone.^000000");
close;
}
}
@@ -1123,24 +1123,24 @@ OnEnable:
if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) == getguildmaster(.@GID)) {
if (getd(.@var$+"["+(.@num+1)+"]") == 2) {
- mes "^3355FFDemolished Fortress";
- mes "Gates can be repaired,";
- mes "but you will need to gather";
- mes "the following materials.^000000";
+ mes("^3355FFDemolished Fortress");
+ mes("Gates can be repaired,");
+ mes("but you will need to gather");
+ mes("the following materials.^000000");
next;
- mes "^4D4DFF10 Steel^000000,";
- mes "^4D4DFF30 Trunks^000000,";
- mes "^4D4DFF5 Oridecon^000000, and";
- mes "^4D4DFF10 Emveretarcon^000000.";
+ mes("^4D4DFF10 Steel^000000,");
+ mes("^4D4DFF30 Trunks^000000,");
+ mes("^4D4DFF5 Oridecon^000000, and");
+ mes("^4D4DFF10 Emveretarcon^000000.");
next;
select("Continue");
if ((countitem(Wooden_Block) > 29) && (countitem(Steel) > 9) && (countitem(Emveretarcon) > 9) && (countitem(Oridecon) > 4)) {
- mes "^3355FFYou will need Trunks to";
- mes "repair the support frame,";
- mes "Oridecon to enhance the";
- mes "gate's endurance, and";
- mes "Emveretarcon to basically";
- mes "hold everything together.^000000";
+ mes("^3355FFYou will need Trunks to");
+ mes("repair the support frame,");
+ mes("Oridecon to enhance the");
+ mes("gate's endurance, and");
+ mes("Emveretarcon to basically");
+ mes("hold everything together.^000000");
next;
.@ro_of01 = rand(10,15);
while(1) {
@@ -1148,68 +1148,68 @@ OnEnable:
else {
switch(rand(1,4)) {
case 1:
- mes "^3355FFThe support frame";
- mes "is badly damaged:";
- mes "fixing this part";
- mes "is a top priority.^000000";
+ mes("^3355FFThe support frame");
+ mes("is badly damaged:");
+ mes("fixing this part");
+ mes("is a top priority.^000000");
next;
switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) {
case 1:
- mes "^3355FFThe frame has been";
- mes "reinforced with wood.^000000";
+ mes("^3355FFThe frame has been");
+ mes("reinforced with wood.^000000");
++.@rp_temp;
++.@ro_of02;
specialeffect(EF_REPAIRWEAPON, AREA, playerattached());
next;
break;
case 2:
- mes "^3355FFYou tried using steel,";
- mes "but it's not working very";
- mes "well. You'll have to try";
- mes "something else.^000000";
+ mes("^3355FFYou tried using steel,");
+ mes("but it's not working very");
+ mes("well. You'll have to try");
+ mes("something else.^000000");
close;
case 3:
- mes "^3355FFYou tried using emveretarcon";
- mes "to reinforce the gate, but it's";
- mes "not working well at all.";
- mes "You'll have to start over.^000000";
+ mes("^3355FFYou tried using emveretarcon");
+ mes("to reinforce the gate, but it's");
+ mes("not working well at all.");
+ mes("You'll have to start over.^000000");
close;
case 4:
- mes "^3355FFYou tried using oridecon,";
- mes "but it's not working very";
- mes "well. You'll have to try";
- mes "something else.^000000";
+ mes("^3355FFYou tried using oridecon,");
+ mes("but it's not working very");
+ mes("well. You'll have to try");
+ mes("something else.^000000");
close;
}
break;
case 2:
- mes "^3355FFIt looks like the gate's";
- mes "overall endurance needs to";
- mes "be reinforced with something.^000000";
+ mes("^3355FFIt looks like the gate's");
+ mes("overall endurance needs to");
+ mes("be reinforced with something.^000000");
next;
switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) {
case 1:
- mes "^3355FFYou tried using wood";
- mes "to reinforce the gate.^000000";
+ mes("^3355FFYou tried using wood");
+ mes("to reinforce the gate.^000000");
++.@ro_of02;
next;
break;
case 2:
- mes "^3355FFYou tried using steel";
- mes "to reinforce the gate, but";
- mes "it's not working well at all.";
- mes "You'll have to start over.^000000";
+ mes("^3355FFYou tried using steel");
+ mes("to reinforce the gate, but");
+ mes("it's not working well at all.");
+ mes("You'll have to start over.^000000");
close;
case 3:
- mes "^3355FFYou tried using emveretarcon";
- mes "to reinforce the gate, but it's";
- mes "not working well at all.";
- mes "You'll have to start over.^000000";
+ mes("^3355FFYou tried using emveretarcon");
+ mes("to reinforce the gate, but it's");
+ mes("not working well at all.");
+ mes("You'll have to start over.^000000");
close;
case 4:
- mes "^3355FFYou hammered the";
- mes "oridecon: it looks";
- mes "like this will work.^000000";
+ mes("^3355FFYou hammered the");
+ mes("oridecon: it looks");
+ mes("like this will work.^000000");
++.@rp_temp;
++.@ro_of02;
specialeffect(EF_REPAIRWEAPON, AREA, playerattached());
@@ -1218,92 +1218,92 @@ OnEnable:
}
break;
case 3:
- mes "^3355FFThe damage to the gate";
- mes "has caused all these";
- mes "cracks. You'll have to";
- mes "weld them solid somehow.^000000";
+ mes("^3355FFThe damage to the gate");
+ mes("has caused all these");
+ mes("cracks. You'll have to");
+ mes("weld them solid somehow.^000000");
next;
switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) {
case 1:
- mes "^3355FFYou tried using wood to fix";
- mes "this problem, but it seems";
- mes "to have made it worse.";
- mes "You'll have to start all over.^000000";
+ mes("^3355FFYou tried using wood to fix");
+ mes("this problem, but it seems");
+ mes("to have made it worse.");
+ mes("You'll have to start all over.^000000");
close;
case 2:
- mes "^3355FFYou used steel to weld";
- mes "all the cracks: the gate is";
- mes "is starting to look more solid.^000000";
+ mes("^3355FFYou used steel to weld");
+ mes("all the cracks: the gate is");
+ mes("is starting to look more solid.^000000");
++.@rp_temp;
++.@ro_of02;
specialeffect(EF_REPAIRWEAPON, AREA, playerattached());
next;
break;
case 3:
- mes "^3355FFYou tried using emveretarcon";
- mes "to reinforce the gate, but it's";
- mes "not working well at all.";
- mes "You'll have to start over.^000000";
+ mes("^3355FFYou tried using emveretarcon");
+ mes("to reinforce the gate, but it's");
+ mes("not working well at all.");
+ mes("You'll have to start over.^000000");
close;
case 4:
- mes "^3355FFYou tried using oridecon,";
- mes "but it's not working very";
- mes "well. You'll have to try";
- mes "something else.^000000";
+ mes("^3355FFYou tried using oridecon,");
+ mes("but it's not working very");
+ mes("well. You'll have to try");
+ mes("something else.^000000");
close;
}
break;
case 4:
- mes "^3355FFNow you need to make";
- mes "sure that the gate is held";
- mes "together pretty solidly.^000000";
+ mes("^3355FFNow you need to make");
+ mes("sure that the gate is held");
+ mes("together pretty solidly.^000000");
next;
switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) {
case 1:
- mes "^3355FFYou tried using wood to fix";
- mes "this problem, but it seems";
- mes "to have made it worse.";
- mes "You'll have to start all over.^000000";
+ mes("^3355FFYou tried using wood to fix");
+ mes("this problem, but it seems");
+ mes("to have made it worse.");
+ mes("You'll have to start all over.^000000");
close;
case 2:
- mes "^3355FFYou tried using steel,";
- mes "but it's not working very";
- mes "well. You'll have to try";
- mes "something else.^000000";
+ mes("^3355FFYou tried using steel,");
+ mes("but it's not working very");
+ mes("well. You'll have to try");
+ mes("something else.^000000");
close;
case 3:
- mes "^3355FFYou successfully used";
- mes "the emveretarcon to repair";
- mes "much of the gate's damage.^000000";
+ mes("^3355FFYou successfully used");
+ mes("the emveretarcon to repair");
+ mes("much of the gate's damage.^000000");
++.@rp_temp;
++.@ro_of02;
specialeffect(EF_REPAIRWEAPON, AREA, playerattached());
next;
break;
case 4:
- mes "^3355FFYou tried using oridecon,";
- mes "but it's not working very";
- mes "well. You'll have to try";
- mes "something else.^000000";
+ mes("^3355FFYou tried using oridecon,");
+ mes("but it's not working very");
+ mes("well. You'll have to try");
+ mes("something else.^000000");
close;
}
}
}
}
- mes "^3355FFWell, it looks like";
- mes "you're just about done";
- mes "with repairing the gate.^000000";
+ mes("^3355FFWell, it looks like");
+ mes("you're just about done");
+ mes("with repairing the gate.^000000");
next;
if (!agitcheck2()) {
- mes "^3355FFUnfortunately, the Fortress";
- mes "Gate can't be reconstructed:";
- mes "the Emperium is no longer here.^000000";
+ mes("^3355FFUnfortunately, the Fortress");
+ mes("Gate can't be reconstructed:");
+ mes("the Emperium is no longer here.^000000");
close;
}
else {
if (.@rp_temp == .@ro_of01) {
- mes "^3355FFThe Fortress Gate has";
- mes "been successfully repaired!^000000";
+ mes("^3355FFThe Fortress Gate has");
+ mes("been successfully repaired!^000000");
delitem Wooden_Block,30;
delitem Steel,10;
delitem Emveretarcon,10;
@@ -1323,11 +1323,11 @@ OnEnable:
end;
}
else {
- mes "^3355FFThe wall has been breached,";
- mes "and the attempt to repair the";
- mes "Fortress Gate has failed.";
- mes "You lost some of your";
- mes "repair resources...^000000";
+ mes("^3355FFThe wall has been breached,");
+ mes("and the attempt to repair the");
+ mes("Fortress Gate has failed.");
+ mes("You lost some of your");
+ mes("repair resources...^000000");
delitem Oridecon,2;
delitem Steel,4;
delitem Wooden_Block,14;
@@ -1337,9 +1337,9 @@ OnEnable:
}
}
else {
- mes "^3355FFYou can't attempt to repair";
- mes "the Fortress Gate if you don't";
- mes "have all the needed materials.^000000";
+ mes("^3355FFYou can't attempt to repair");
+ mes("the Fortress Gate if you don't");
+ mes("have all the needed materials.^000000");
close;
}
}
@@ -1738,28 +1738,28 @@ OnDisable:
function script LinkFlag {
if (!getcharid(CHAR_ID_GUILD) || getcharid(CHAR_ID_GUILD) != getcastledata(strnpcinfo(NPC_MAP),1)) end;
if (getarg(0) == "Convenience Facility") {
- mes "^3355FFThis is the Stronghold";
- mes "Teleport Service. Would";
- mes "you like to teleport to the";
- mes "Convenience Facility for";
- mes "guild members?^000000";
+ mes("^3355FFThis is the Stronghold");
+ mes("Teleport Service. Would");
+ mes("you like to teleport to the");
+ mes("Convenience Facility for");
+ mes("guild members?^000000");
if(select("Go to Convenience Facility", "Cancel") == 1)
warp strnpcinfo(NPC_MAP),getarg(1),getarg(2);
close;
}
if (getarg(0) == "Emperium Center") {
- mes "^3355FFThis is the Stronghold";
- mes "Teleport Service. Would";
- mes "you like to teleport to";
- mes "the Emperium Center?^000000";
+ mes("^3355FFThis is the Stronghold");
+ mes("Teleport Service. Would");
+ mes("you like to teleport to");
+ mes("the Emperium Center?^000000");
if(select("Teleport", "Cancel") == 1)
warp strnpcinfo(NPC_MAP),getarg(1),getarg(2);
close;
}
- mes "^3355FFThis is the Stronghold";
- mes "Teleport Service. Please";
- mes "choose a destination";
- mes "within the stronghold.^000000";
+ mes("^3355FFThis is the Stronghold");
+ mes("Teleport Service. Please");
+ mes("choose a destination");
+ mes("within the stronghold.^000000");
for (.@i = 0; .@i<getargcount(); .@i += 3)
.@menu$ += getarg(.@i)+":";
.@menu$ += "Cancel";
@@ -1774,20 +1774,20 @@ function script ReturnFlag {
.@str$ = (compare(strnpcinfo(NPC_MAP),"aru"))?"Arunafeltz":"Schwaltzvalt";
.@GID = getcastledata(getarg(0),1);
if (!.@GID) {
- mes "[ "+.@str$+" Royal Edict ]";
- mes "The Holy Kingdom of";
- mes .@str$+" declares that";
- mes "one has yet to claim lordship";
- mes "over this stronghold. The one";
- mes "that breaks the Emperium will";
- mes "be recognized as its new owner.";
+ mesf("[ %s Royal Edict ]", .@str$);
+ mes("The Holy Kingdom of");
+ mesf("%s declares that", .@str$);
+ mes("one has yet to claim lordship");
+ mes("over this stronghold. The one");
+ mes("that breaks the Emperium will");
+ mes("be recognized as its new owner.");
close;
}
if (getcharid(CHAR_ID_GUILD) == .@GID && getarg(1,0)) {
- mes "[ Ringing Voice ]";
- mes "Courageous one,";
- mes "do you wish to return";
- mes "to your stronghold?";
+ mes("[ Ringing Voice ]");
+ mes("Courageous one,");
+ mes("do you wish to return");
+ mes("to your stronghold?");
next;
if(select("Return to the Stronghold", "Cancel") == 1 && getcharid(CHAR_ID_GUILD) == getcastledata(getarg(0),1)) {
if (compare(getarg(0),"arug")) {
@@ -1804,27 +1804,27 @@ function script ReturnFlag {
}
close;
}
- mes "[ "+.@str$+" Royal Edict ]";
- mes "The Holy Kingdom of";
- mes .@str$+" decrees that";
- mes "this stronghold is owned";
- mes "by the ^FF0000"+getguildname(.@GID)+"^000000 Guild.";
+ mesf("[ %s Royal Edict ]", .@str$);
+ mes("The Holy Kingdom of");
+ mesf("%s decrees that", .@str$);
+ mes("this stronghold is owned");
+ mesf("by the ^FF0000%s^000000 Guild.", getguildname(.@GID));
next;
- mes "[ "+.@str$+" Royal Edict ]";
- mes "^FF0000"+getguildmaster(.@GID)+"^000000 is";
- mes "Guild Master of ^FF0000"+getguildname(.@GID)+"^000000.";
- mes "Any that object must claim this";
- mes "stronghold through strength of";
- mes "steel and magic during the";
- mes "appointed Guild Siege times.";
+ mesf("[ %s Royal Edict ]", .@str$);
+ mesf("^FF0000%s^000000 is", getguildmaster(.@GID));
+ mesf("Guild Master of ^FF0000%s^000000.", getguildname(.@GID));
+ mes("Any that object must claim this");
+ mes("stronghold through strength of");
+ mes("steel and magic during the");
+ mes("appointed Guild Siege times.");
close;
}
//== Treasure Room Switches ================================
- script Switch#template FAKE_NPC,{
- mes " ";
- mes "^3355FFWill you pull";
- mes "this small lever?^000000";
+ mes(" ");
+ mes("^3355FFWill you pull");
+ mes("this small lever?^000000");
next;
if(select("Pull Lever", "Cancel") == 2) close;
if (compare(strnpcinfo(NPC_MAP),"arug")) {
@@ -1844,7 +1844,7 @@ function script ReturnFlag {
//== Guild Dungeon Warps ===================================
- script Sunflower#template FAKE_NPC,{
if (getcharid(CHAR_ID_GUILD) == getcastledata(strnpcinfo(NPC_MAP),1)) {
- mes "- It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower. -";
+ mes("- It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower. -");
next;
switch(select("Hold the stem.", "Do nothing.")) {
case 1:
@@ -1862,7 +1862,7 @@ function script ReturnFlag {
warp .@map$,.@mapx[.@i],.@mapy[.@i];
close;
case 2:
- mes "It's too scary to touch unknown things.";
+ mes("It's too scary to touch unknown things.");
close;
}
}
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index 49fb9d24a..3ebd77ed3 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -6620,6 +6620,7 @@ REPLACE INTO `item_db` VALUES ('25734','Sealed_Weapon_Ticket','Sealed_Weapon_Tic
REPLACE INTO `item_db` VALUES ('25735','Unsealing_Token','Unsealing_Token','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('25739','GH_Cursed_Crystal','GH_Cursed_Crystal','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('25740','GH_Cursed_Gemstone','GH_Cursed_Gemstone','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
+REPLACE INTO `item_db` VALUES ('25793','Inventory_Extension_Coupon','Inventory_Extension_Coupon','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('26007','Spectral_Spear_IL','Spectral_Spear_IL','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('26015','Rebeginer_LG_Lance','Rebeginer_LG_Lance','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('26109','Staff_Of_Bordeaux_IL','Staff_Of_Bordeaux_IL','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
diff --git a/sql-files/item_db2.sql b/sql-files/item_db2.sql
index 4df23a4d0..3b4f58219 100644
--- a/sql-files/item_db2.sql
+++ b/sql-files/item_db2.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index 855bd9154..933ef3815 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -9956,6 +9956,12 @@ REPLACE INTO `item_db` VALUES ('22676','Hangul_Day_Event_Box','Hangul Day Event
REPLACE INTO `item_db` VALUES ('22679','Chest_Of_Death','Death Bin','18','0','10','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','170',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('22685','Solo_Christmas_Gift','Single Union Christmas Gift','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('22686','Solo_Cookie','Single Cookie','0','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 5,5;','','');
+REPLACE INTO `item_db` VALUES ('22702','STR_Soul_Potion','STR Reduction Potion','11','0','10','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc(\"F_CashReduceStat\", bStr, -1, STR_Soul_Potion);','','');
+REPLACE INTO `item_db` VALUES ('22703','AGI_Soul_Potion','AGI Reduction Potion','11','0','10','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc(\"F_CashReduceStat\", bAgi, -1, AGI_Soul_Potion);','','');
+REPLACE INTO `item_db` VALUES ('22704','VIT_Soul_Potion','VIT Reduction Potion','11','0','10','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc(\"F_CashReduceStat\", bVit, -1, VIT_Soul_Potion);','','');
+REPLACE INTO `item_db` VALUES ('22705','INT_Soul_Potion','INT Reduction Potion','11','0','10','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc(\"F_CashReduceStat\", bInt, -1, INT_Soul_Potion);','','');
+REPLACE INTO `item_db` VALUES ('22706','DEX_Soul_Potion','DEX Reduction Potion','11','0','10','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc(\"F_CashReduceStat\", bDex, -1, DEX_Soul_Potion);','','');
+REPLACE INTO `item_db` VALUES ('22707','LUK_Soul_Potion','LUK Reduction Potion','11','0','10','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc(\"F_CashReduceStat\", bLuk, -1, LUK_Soul_Potion);','','');
REPLACE INTO `item_db` VALUES ('22737','Bullet_Case_Blood_','Bloody Bullet Case','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Shell_Of_Blood_, 500;','','');
REPLACE INTO `item_db` VALUES ('22738','Bullet_Case_Silver_','Silver Bullet Case','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Silver_Bullet_, 500;','','');
REPLACE INTO `item_db` VALUES ('22739','Sphere_Case_Wind_','Lightning Sphere Pack','2','0','2','1','350','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Lighting_Sphere_, 500;','','');
@@ -10468,6 +10474,7 @@ REPLACE INTO `item_db` VALUES ('25734','Sealed_Weapon_Ticket','Sealed_Weapon_Tic
REPLACE INTO `item_db` VALUES ('25735','Unsealing_Token','Unsealing_Token','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('25739','GH_Cursed_Crystal','GH_Cursed_Crystal','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('25740','GH_Cursed_Gemstone','GH_Cursed_Gemstone','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
+REPLACE INTO `item_db` VALUES ('25793','Inventory_Extension_Coupon','Inventory_Extension_Coupon','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('26007','Spectral_Spear_IL','Spectral_Spear_IL','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('26015','Rebeginer_LG_Lance','Rebeginer_LG_Lance','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('26101','Paradise_Foxtail_Staff_III','Eden Group Foxtail Staff III','4','10','20','10','0','150','195','0','1','0','0','7','2','2','3','60',NULL,'0','0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bDex,5; bonus bInt,5; bonus bLongAtkRate,7;','','');
diff --git a/sql-files/main.sql b/sql-files/main.sql
index 37bfaf0ec..e364ec778 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -241,9 +241,11 @@ CREATE TABLE IF NOT EXISTS `char` (
`uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
`sex` ENUM('M','F','U') NOT NULL DEFAULT 'U',
`hotkey_rowshift` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
+ `hotkey_rowshift2` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`attendance_count` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`attendance_timer` BIGINT(20) NULL DEFAULT '0',
`title_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `inventory_size` INT(11) UNSIGNED NOT NULL DEFAULT '100',
PRIMARY KEY (`char_id`),
UNIQUE KEY `name_key` (`name`),
KEY `account_id` (`account_id`),
@@ -448,6 +450,7 @@ CREATE TABLE IF NOT EXISTS `guild_castle` (
CREATE TABLE IF NOT EXISTS `guild_expulsion` (
`guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`name` VARCHAR(24) NOT NULL DEFAULT '',
`mes` VARCHAR(40) NOT NULL DEFAULT '',
PRIMARY KEY (`guild_id`,`name`)
@@ -922,6 +925,11 @@ INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1528026381); -- 2018-06-0
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1528180320); -- 2018-06-05--12-02.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1532403228); -- 2018-07-24--03-23.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1535865732); -- 2018-09-01--05-22.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1544738447); -- 2018-12-14--01-02.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1546059075); -- 2018-12-29--07-51.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1554760320); -- 2019-04-08--21-52.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1556147483); -- 2019-04-25--02-12.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1557414445); -- 2019-05-09--18-07.sql
--
-- Table structure for table `storage`
@@ -1010,3 +1018,12 @@ CREATE TABLE IF NOT EXISTS `rodex_mail` (
KEY `send_date` (`send_date`),
KEY `expire_date` (`expire_date`)
) ENGINE=MyISAM;
+
+CREATE TABLE IF NOT EXISTS `npc_barter_data` (
+ `name` VARCHAR(24) NOT NULL DEFAULT '',
+ `itemId` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `priceId` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `priceAmount` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (`name`, `itemid`, `priceId`, `priceAmount`)
+) ENGINE=MyISAM;
diff --git a/sql-files/mob_db.sql b/sql-files/mob_db.sql
index d62f804a9..349a84272 100644
--- a/sql-files/mob_db.sql
+++ b/sql-files/mob_db.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
diff --git a/sql-files/mob_db2.sql b/sql-files/mob_db2.sql
index ac3d63985..e602db599 100644
--- a/sql-files/mob_db2.sql
+++ b/sql-files/mob_db2.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql
index c6ec23d1e..66b161f4c 100644
--- a/sql-files/mob_db_re.sql
+++ b/sql-files/mob_db_re.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
diff --git a/sql-files/mob_skill_db.sql b/sql-files/mob_skill_db.sql
index fb286310b..1e3ab9b90 100644
--- a/sql-files/mob_skill_db.sql
+++ b/sql-files/mob_skill_db.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -1413,11 +1413,11 @@ REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@NPC_STUNATTACK','attack',17
REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@NPC_SUMMONSLAVE','idle',196,3,10000,2000,60000,'no','self','slavele',NULL,1243,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@SM_ENDURE','chase',8,1,5000,0,10000,'yes','self','longrangeattacked',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@SM_MAGNUM','attack',7,9,500,500,5000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@NPC_EMOTION','idle',197,1,2000,0,5000,'yes','self','always',NULL,22,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@AL_TELEPORT','idle',26,1,10000,0,0,'yes','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@MC_MAMMONITE','attack',42,9,500,800,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'8',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@NPC_GUIDEDATTACK','attack',172,2,500,1000,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@NPC_SUMMONSLAVE','idle',196,2,10000,2000,60000,'no','self','slavele',NULL,1180,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@NPC_EMOTION','idle',197,1,2000,0,5000,'yes','self','always',NULL,22,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@AL_TELEPORT','idle',26,1,10000,0,0,'yes','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@MC_MAMMONITE','attack',42,9,500,800,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'8',NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@NPC_GUIDEDATTACK','attack',172,2,500,1000,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@NPC_SUMMONSLAVE','idle',196,2,10000,2000,60000,'no','self','slavele',NULL,1180,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1308,'Panzer Goblin@NPC_SELFDESTRUCTION','attack',173,1,500,2000,5000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,'23',NULL);
REPLACE INTO `mob_skill_db` VALUES (1308,'Panzer Goblin@NPC_WINDATTACK','attack',187,1,2000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1308,'Panzer Goblin@SM_MAGNUM','attack',7,9,500,500,5000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
@@ -4402,9 +4402,9 @@ REPLACE INTO `mob_skill_db` VALUES (1838,'Knocker@NPC_GROUNDATTACK','attack',185
REPLACE INTO `mob_skill_db` VALUES (1838,'Knocker@TF_SPRINKLESAND','attack',149,1,1000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1838,'Knocker@TF_THROWSTONE','chase',152,1,2000,0,10000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'29',NULL);
REPLACE INTO `mob_skill_db` VALUES (1838,'Knocker@TF_THROWSTONE','attack',152,1,1000,0,10000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'29',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@NPC_SUMMONSLAVE','idle',196,2,10000,1000,60000,'no','self','slavele','1',1829,1830,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@NPC_SUMMONSLAVE','chase',196,2,10000,1000,60000,'no','self','slavele','1',1829,1830,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@NPC_SUMMONSLAVE','attack',196,2,10000,1000,60000,'no','self','slavele','1',1829,1830,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@NPC_SUMMONSLAVE','idle',196,2,10000,1000,60000000,'no','self','slavele','1',1829,1830,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@NPC_SUMMONSLAVE','chase',196,2,10000,1000,60000000,'no','self','slavele','1',1829,1830,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@NPC_SUMMONSLAVE','attack',196,2,10000,1000,60000000,'no','self','slavele','1',1829,1830,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@NPC_CALLSLAVE','idle',352,1,10000,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@SM_BASH','attack',5,5,500,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1839,'Byorgue@AL_TELEPORT','idle',26,1,10000,0,0,'yes','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -4645,9 +4645,9 @@ REPLACE INTO `mob_skill_db` VALUES (1887,'Freezer@NPC_EMOTION','walk',197,1,2000
REPLACE INTO `mob_skill_db` VALUES (1887,'Freezer@NPC_WATERATTACK','attack',184,3,500,500,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1888,'Garm Baby@MG_FROSTDIVER','chase',15,10,2000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1888,'Garm Baby@NPC_WATERATTACK','attack',184,3,500,500,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka's Guard@NPC_GUIDEDATTACK','attack',172,5,500,0,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka's Guard@NPC_WATERATTACK','attack',184,5,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka's Guard@NPC_WATERATTACK','chase',184,5,2000,0,5000,'no','target','skillused','18',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka\'s Guard@NPC_GUIDEDATTACK','attack',172,5,500,0,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka\'s Guard@NPC_WATERATTACK','attack',184,5,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka\'s Guard@NPC_WATERATTACK','chase',184,5,2000,0,5000,'no','target','skillused','18',NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1890,'The Immortal Koshei@AL_TELEPORT','idle',26,1,10000,0,0,'yes','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1890,'The Immortal Koshei@WZ_QUAGMIRE','chase',92,1,5000,200,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1890,'The Immortal Koshei@MG_FIREBALL','chase',17,9,10000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -5408,48 +5408,48 @@ REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@PR_LEXDIVINA','chase',76,3,500,
REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@MG_COLDBOLT','attack',14,3,3000,1500,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@NPC_WATERATTACK','attack',184,1,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@WZ_WATERBALL','attack',86,3,2000,100,10000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_ALLHEAL','idle',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_ALLHEAL','walk',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CALLSLAVE','attack',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CALLSLAVE','idle',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SUMMONSLAVE','attack',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','onspawn',NULL,2027,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_MAGICMIRROR','idle',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_MAGICMIRROR','chase',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_MAGICMIRROR','attack',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_STONESKIN','chase',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_STONESKIN','attack',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_POWERUP','attack',349,5,6000,0,60000,'yes','self','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EVILLAND','attack',670,4,500,0,25000,'yes','target','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@WZ_QUAGMIRE','chase',92,5,10000,700,5000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@WZ_QUAGMIRE','attack',92,5,10000,700,120000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EARTHQUAKE','chase',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EARTHQUAKE','attack',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_INVISIBLE','idle',353,1,2000,200,5000,'no','target','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_INVISIBLE','chase',353,1,2000,200,5000,'no','target','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESTONE','chase',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESTONE','attack',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EVILLAND','idle',670,10,500,0,120000,'yes','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EVILLAND','chase',670,10,500,0,120000,'yes','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_HELLJUDGEMENT','chase',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_HELLJUDGEMENT','attack',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_DARKNESSBREATH','attack',658,10,10000,800,35000,'no','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SLOWCAST','attack',672,5,10000,0,60000,'yes','self','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CRITICALWOUND','attack',673,3,2000,0,30000,'yes','target','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDECURSE','chase',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDECURSE','attack',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_FIREBREATH','attack',654,5,10000,800,15000,'no','target','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESLEEP','chase',668,5,10000,3000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESLEEP','attack',668,5,30000,1000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CRITICALSLASH','attack',170,1,1000,0,5000,'yes','target','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@MG_FIREBALL','chase',17,5,10000,0,30000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_DRAGONFEAR','chase',659,5,10000,0,30000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_DRAGONFEAR','attack',659,5,2000,1000,20000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@WZ_METEOR','attack',83,10,2000,1000,10000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'29',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@SA_DISPELL','attack',289,5,10000,0,30000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_PULSESTRIKE','attack',661,5,2000,10000,40000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'31');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_ALLHEAL','idle',687,1,10000,120000,30000,'yes','self','myhpltmaxrate','60',NULL,NULL,NULL,NULL,NULL,'20',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_ALLHEAL','idle',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_ALLHEAL','walk',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CALLSLAVE','attack',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CALLSLAVE','idle',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SUMMONSLAVE','attack',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','onspawn',NULL,2027,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_MAGICMIRROR','idle',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_MAGICMIRROR','chase',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_MAGICMIRROR','attack',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_STONESKIN','chase',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_STONESKIN','attack',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_POWERUP','attack',349,5,6000,0,60000,'yes','self','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EVILLAND','attack',670,4,500,0,25000,'yes','target','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@WZ_QUAGMIRE','chase',92,5,10000,700,5000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@WZ_QUAGMIRE','attack',92,5,10000,700,120000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EARTHQUAKE','chase',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EARTHQUAKE','attack',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_INVISIBLE','idle',353,1,2000,200,5000,'no','target','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_INVISIBLE','chase',353,1,2000,200,5000,'no','target','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESTONE','chase',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESTONE','attack',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EVILLAND','idle',670,10,500,0,120000,'yes','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EVILLAND','chase',670,10,500,0,120000,'yes','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_HELLJUDGEMENT','chase',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_HELLJUDGEMENT','attack',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_DARKNESSBREATH','attack',658,10,10000,800,35000,'no','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SLOWCAST','attack',672,5,10000,0,60000,'yes','self','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CRITICALWOUND','attack',673,3,2000,0,30000,'yes','target','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDECURSE','chase',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDECURSE','attack',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_FIREBREATH','attack',654,5,10000,800,15000,'no','target','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESLEEP','chase',668,5,10000,3000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESLEEP','attack',668,5,30000,1000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CRITICALSLASH','attack',170,1,1000,0,5000,'yes','target','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@MG_FIREBALL','chase',17,5,10000,0,30000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_DRAGONFEAR','chase',659,5,10000,0,30000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_DRAGONFEAR','attack',659,5,2000,1000,20000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@WZ_METEOR','attack',83,10,2000,1000,10000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'29',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@SA_DISPELL','attack',289,5,10000,0,30000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_PULSESTRIKE','attack',661,5,2000,10000,40000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'31');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_ALLHEAL','idle',687,1,10000,120000,30000,'yes','self','myhpltmaxrate','60',NULL,NULL,NULL,NULL,NULL,'20',NULL);
REPLACE INTO `mob_skill_db` VALUES (2023,'Dark Shadow@NPC_DARKSTRIKE','chase',340,2,2000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2023,'Dark Shadow@NPC_EMOTION','idle',197,1,2000,0,5000,'yes','self','always',NULL,9,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2023,'Dark Shadow@NPC_FIREATTACK','attack',186,3,500,500,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
diff --git a/sql-files/mob_skill_db2.sql b/sql-files/mob_skill_db2.sql
index 45a92ebfb..e55be9d6d 100644
--- a/sql-files/mob_skill_db2.sql
+++ b/sql-files/mob_skill_db2.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
diff --git a/sql-files/mob_skill_db_re.sql b/sql-files/mob_skill_db_re.sql
index 3aea9b650..b44ee4979 100644
--- a/sql-files/mob_skill_db_re.sql
+++ b/sql-files/mob_skill_db_re.sql
@@ -1,7 +1,7 @@
-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
--- Copyright (C) 2013-2018 Hercules Dev Team
+-- Copyright (C) 2013-2019 Hercules Dev Team
--
-- Hercules is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -1463,11 +1463,11 @@ REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@NPC_STUNATTACK','attack',17
REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@NPC_SUMMONSLAVE','idle',196,3,10000,2000,60000,'no','self','slavele',NULL,1243,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@SM_ENDURE','chase',8,1,5000,0,10000,'yes','self','longrangeattacked',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1306,'Leib Olmai@SM_MAGNUM','attack',7,9,500,500,5000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@AL_TELEPORT','idle',26,1,10000,0,0,'yes','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@MC_MAMMONITE','attack',42,9,500,800,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'8',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@NPC_EMOTION','idle',197,1,2000,0,5000,'yes','self','always',NULL,22,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@NPC_GUIDEDATTACK','attack',172,2,500,1000,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o' Nine Tails@NPC_SUMMONSLAVE','idle',196,2,10000,2000,60000,'no','self','slavele',NULL,1180,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@AL_TELEPORT','idle',26,1,10000,0,0,'yes','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@MC_MAMMONITE','attack',42,9,500,800,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'8',NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@NPC_EMOTION','idle',197,1,2000,0,5000,'yes','self','always',NULL,22,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@NPC_GUIDEDATTACK','attack',172,2,500,1000,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1307,'Cat o\' Nine Tails@NPC_SUMMONSLAVE','idle',196,2,10000,2000,60000,'no','self','slavele',NULL,1180,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1308,'Panzer Goblin@AC_DOUBLE','attack',46,5,2000,1000,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1308,'Panzer Goblin@NPC_SELFDESTRUCTION','attack',173,1,500,2000,5000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,'23',NULL);
REPLACE INTO `mob_skill_db` VALUES (1308,'Panzer Goblin@NPC_WINDATTACK','attack',187,1,2000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -4680,9 +4680,9 @@ REPLACE INTO `mob_skill_db` VALUES (1887,'Freezer@NPC_EMOTION','walk',197,1,2000
REPLACE INTO `mob_skill_db` VALUES (1887,'Freezer@NPC_WATERATTACK','attack',184,3,500,500,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1888,'Hatii Baby@MG_FROSTDIVER','chase',15,10,2000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1888,'Hatii Baby@NPC_WATERATTACK','attack',184,3,500,500,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka's Guard@NPC_GUIDEDATTACK','attack',172,5,500,0,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka's Guard@NPC_WATERATTACK','attack',184,5,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka's Guard@NPC_WATERATTACK','chase',184,5,2000,0,5000,'no','target','skillused','18',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka\'s Guard@NPC_GUIDEDATTACK','attack',172,5,500,0,20000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka\'s Guard@NPC_WATERATTACK','attack',184,5,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (1889,'Marozka\'s Guard@NPC_WATERATTACK','chase',184,5,2000,0,5000,'no','target','skillused','18',NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (1890,'Koschei the Immortal@AL_TELEPORT','idle',26,1,10000,0,0,'yes','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1890,'Koschei the Immortal@MG_FIREBALL','attack',17,10,5000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (1890,'Koschei the Immortal@MG_FIREBALL','chase',17,9,10000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -5370,50 +5370,50 @@ REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@MG_COLDBOLT','attack',14,3,3000
REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@NPC_WATERATTACK','attack',184,1,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@PR_LEXDIVINA','chase',76,3,500,1000,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL);
REPLACE INTO `mob_skill_db` VALUES (2021,'Phylla@WZ_WATERBALL','attack',86,3,2000,100,10000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@MG_FIREBALL','chase',17,5,10000,0,30000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_ALLHEAL','idle',687,1,10000,120000,30000,'yes','self','myhpltmaxrate','60',NULL,NULL,NULL,NULL,NULL,'20',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_ALLHEAL','idle',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_ALLHEAL','walk',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CALLSLAVE','attack',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CALLSLAVE','idle',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CRITICALSLASH','attack',170,1,1000,0,5000,'yes','target','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_CRITICALWOUND','attack',673,3,2000,0,30000,'yes','target','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_DARKNESSBREATH','attack',658,10,10000,800,35000,'no','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_DRAGONFEAR','attack',659,5,2000,1000,20000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_DRAGONFEAR','chase',659,5,10000,0,30000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EARTHQUAKE','attack',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,'33');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EARTHQUAKE','chase',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EVILLAND','attack',670,4,500,0,25000,'yes','self','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EVILLAND','idle',670,10,500,0,120000,'yes','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_EVILLAND','chase',670,10,500,0,120000,'yes','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_FIREBREATH','attack',654,5,10000,800,15000,'no','target','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_HELLJUDGEMENT','attack',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_HELLJUDGEMENT','chase',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_INVISIBLE','idle',353,1,2000,200,5000,'no','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_INVISIBLE','chase',353,1,2000,200,5000,'no','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_MAGICMIRROR','attack',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_MAGICMIRROR','idle',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_MAGICMIRROR','chase',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_POWERUP','attack',349,5,6000,0,60000,'yes','self','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_PULSESTRIKE','attack',661,5,2000,10000,40000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'31');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SLOWCAST','attack',672,5,10000,0,60000,'yes','self','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_STONESKIN','attack',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_STONESKIN','chase',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SUMMONSLAVE','attack',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','onspawn',NULL,2027,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDEBLEEDING','attack',665,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDEBLEEDING','chase',665,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDECURSE','attack',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDECURSE','chase',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESLEEP','attack',668,5,10000,1000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESLEEP','chase',668,5,10000,3000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESTONE','attack',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@NPC_WIDESTONE','chase',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@SA_DISPELL','attack',289,5,10000,0,30000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@WZ_METEOR','attack',83,10,2000,1000,10000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'29',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@WZ_QUAGMIRE','attack',92,5,10000,700,120000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr's Shadow@WZ_QUAGMIRE','chase',92,5,10000,700,5000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@MG_FIREBALL','chase',17,5,10000,0,30000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_ALLHEAL','idle',687,1,10000,120000,30000,'yes','self','myhpltmaxrate','60',NULL,NULL,NULL,NULL,NULL,'20',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_ALLHEAL','idle',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_ALLHEAL','walk',687,1,3000,10000,10000,'no','self','rudeattacked',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CALLSLAVE','attack',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CALLSLAVE','idle',352,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CRITICALSLASH','attack',170,1,1000,0,5000,'yes','target','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_CRITICALWOUND','attack',673,3,2000,0,30000,'yes','target','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_DARKNESSBREATH','attack',658,10,10000,800,35000,'no','target','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_DRAGONFEAR','attack',659,5,2000,1000,20000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_DRAGONFEAR','chase',659,5,10000,0,30000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EARTHQUAKE','attack',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,'33');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EARTHQUAKE','chase',653,2,10000,10000,180000,'no','self','myhpltmaxrate','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EVILLAND','attack',670,4,500,0,25000,'yes','self','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EVILLAND','idle',670,10,500,0,120000,'yes','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_EVILLAND','chase',670,10,500,0,120000,'yes','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_FIREBREATH','attack',654,5,10000,800,15000,'no','target','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_HELLJUDGEMENT','attack',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_HELLJUDGEMENT','chase',662,2,10000,7000,25000,'no','self','myhpltmaxrate','50',NULL,NULL,NULL,NULL,NULL,NULL,'32');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_INVISIBLE','idle',353,1,2000,200,5000,'no','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_INVISIBLE','chase',353,1,2000,200,5000,'no','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_MAGICMIRROR','attack',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_MAGICMIRROR','idle',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_MAGICMIRROR','chase',671,3,10000,0,120000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_POWERUP','attack',349,5,6000,0,60000,'yes','self','myhpltmaxrate','15',NULL,NULL,NULL,NULL,NULL,'6',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_PULSESTRIKE','attack',661,5,2000,10000,40000,'no','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'31');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SLOWCAST','attack',672,5,10000,0,60000,'yes','self','myhpltmaxrate','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_STONESKIN','attack',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_STONESKIN','chase',675,3,10000,2500,300000,'no','self','myhpltmaxrate','3',NULL,NULL,NULL,NULL,NULL,NULL,'34');
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SUMMONSLAVE','attack',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','slavele','3',2027,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_SUMMONSLAVE','idle',196,5,10000,700,10000,'no','self','onspawn',NULL,2027,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDEBLEEDING','attack',665,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDEBLEEDING','chase',665,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDECURSE','attack',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDECURSE','chase',677,5,10000,1000,25000,'no','self','myhpltmaxrate','75',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESLEEP','attack',668,5,10000,1000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESLEEP','chase',668,5,10000,3000,20000,'no','self','myhpltmaxrate','95',NULL,NULL,NULL,NULL,NULL,'32',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESTONE','attack',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@NPC_WIDESTONE','chase',666,5,10000,0,60000,'yes','self','myhpltmaxrate','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@SA_DISPELL','attack',289,5,10000,0,30000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@WZ_METEOR','attack',83,10,2000,1000,10000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'29',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@WZ_QUAGMIRE','attack',92,5,10000,700,120000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2022,'Nidhoggr\'s Shadow@WZ_QUAGMIRE','chase',92,5,10000,700,5000,'no','target','myhpltmaxrate','28',NULL,NULL,NULL,NULL,NULL,'12',NULL);
REPLACE INTO `mob_skill_db` VALUES (2023,'Dark Shadow@NPC_DARKNESSBREATH','attack',658,1,500,1000,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2023,'Dark Shadow@NPC_DARKSTRIKE','chase',340,2,2000,0,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2023,'Dark Shadow@NPC_EMOTION','idle',197,1,2000,0,5000,'yes','self','always',NULL,9,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -6138,21 +6138,21 @@ REPLACE INTO `mob_skill_db` VALUES (2137,'Miming@NPC_STUNATTACK','attack',179,2,
REPLACE INTO `mob_skill_db` VALUES (2137,'Miming@SA_REVERSEORCISH','attack',294,1,500,0,30000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'18',NULL);
REPLACE INTO `mob_skill_db` VALUES (2137,'Miming@SA_REVERSEORCISH','chase',294,1,500,0,30000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'18',NULL);
REPLACE INTO `mob_skill_db` VALUES (2137,'Miming@WZ_WATERBALL','attack',86,3,500,1000,5000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2138,'Nydhogg's Memory@NPC_SUMMONSLAVE','idle',196,1,10000,0,0,'no','self','onspawn',NULL,2139,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2138,'Nydhogg's Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'35');
-REPLACE INTO `mob_skill_db` VALUES (2138,'Nydhogg's Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'35');
-REPLACE INTO `mob_skill_db` VALUES (2139,'Nydhogg's Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'36');
-REPLACE INTO `mob_skill_db` VALUES (2139,'Nydhogg's Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'36');
-REPLACE INTO `mob_skill_db` VALUES (2140,'Nydhogg's Memory@NPC_SUMMONSLAVE','idle',196,1,10000,0,0,'no','self','onspawn',NULL,2141,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2140,'Nydhogg's Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'37');
-REPLACE INTO `mob_skill_db` VALUES (2140,'Nydhogg's Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'37');
-REPLACE INTO `mob_skill_db` VALUES (2141,'Nydhogg's Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'40');
-REPLACE INTO `mob_skill_db` VALUES (2141,'Nydhogg's Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'38');
-REPLACE INTO `mob_skill_db` VALUES (2141,'Nydhogg's Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'38');
-REPLACE INTO `mob_skill_db` VALUES (2142,'Nydhogg's Memory@NPC_SUMMONSLAVE','idle',196,1,10000,0,0,'no','self','onspawn',NULL,2143,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2142,'Nydhogg's Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'39');
-REPLACE INTO `mob_skill_db` VALUES (2142,'Nydhogg's Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'39');
-REPLACE INTO `mob_skill_db` VALUES (2143,'Nydhogg's Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'40');
+REPLACE INTO `mob_skill_db` VALUES (2138,'Nydhogg\'s Memory@NPC_SUMMONSLAVE','idle',196,1,10000,0,0,'no','self','onspawn',NULL,2139,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2138,'Nydhogg\'s Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'35');
+REPLACE INTO `mob_skill_db` VALUES (2138,'Nydhogg\'s Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'35');
+REPLACE INTO `mob_skill_db` VALUES (2139,'Nydhogg\'s Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'36');
+REPLACE INTO `mob_skill_db` VALUES (2139,'Nydhogg\'s Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'36');
+REPLACE INTO `mob_skill_db` VALUES (2140,'Nydhogg\'s Memory@NPC_SUMMONSLAVE','idle',196,1,10000,0,0,'no','self','onspawn',NULL,2141,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2140,'Nydhogg\'s Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'37');
+REPLACE INTO `mob_skill_db` VALUES (2140,'Nydhogg\'s Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'37');
+REPLACE INTO `mob_skill_db` VALUES (2141,'Nydhogg\'s Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'40');
+REPLACE INTO `mob_skill_db` VALUES (2141,'Nydhogg\'s Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'38');
+REPLACE INTO `mob_skill_db` VALUES (2141,'Nydhogg\'s Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'38');
+REPLACE INTO `mob_skill_db` VALUES (2142,'Nydhogg\'s Memory@NPC_SUMMONSLAVE','idle',196,1,10000,0,0,'no','self','onspawn',NULL,2143,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2142,'Nydhogg\'s Memory@NPC_TALK','attack',682,10,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'39');
+REPLACE INTO `mob_skill_db` VALUES (2142,'Nydhogg\'s Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'39');
+REPLACE INTO `mob_skill_db` VALUES (2143,'Nydhogg\'s Memory@NPC_TALK','idle',682,10,2500,0,10000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'40');
REPLACE INTO `mob_skill_db` VALUES (2144,'Antler Scaraba@BS_ADRENALINE','attack',111,10,500,1500,300000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (2144,'Antler Scaraba@BS_ADRENALINE','chase',111,10,500,1500,300000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,'6',NULL);
REPLACE INTO `mob_skill_db` VALUES (2144,'Antler Scaraba@NPC_BLEEDING','attack',660,3,2000,0,3000,'yes','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL);
@@ -7738,14 +7738,14 @@ REPLACE INTO `mob_skill_db` VALUES (2322,'Bakonawa@WZ_VERMILION','attack',85,10,
REPLACE INTO `mob_skill_db` VALUES (2322,'Bakonawa@WZ_VERMILION','chase',85,10,2000,500,2000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2322,'Bakonawa@WZ_WATERBALL','chase',86,10,5000,500,1000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2322,'Bakonawa@WZ_WATERBALL','chase',86,10,5000,500,1000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2329,'Buwaya's Egg@NPC_METAMORPHOSIS','idle',193,1,2000,2000,5000,'no','self','always',NULL,2330,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya's Slave@NPC_COMBOATTACK','attack',171,2,500,700,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya's Slave@NPC_EMOTION','chase',197,1,2000,0,5000,'yes','self','always',NULL,32,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya's Slave@NPC_FIREBREATH','attack',654,3,500,1000,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya's Slave@NPC_GROUNDATTACK','attack',185,5,500,500,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya's Slave@NPC_PIERCINGATT','attack',158,5,500,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya's Slave@SM_PROVOKE','chase',6,10,2000,600,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'44',NULL);
-REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya's Slave@TF_THROWSTONE','chase',152,1,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2329,'Buwaya\'s Egg@NPC_METAMORPHOSIS','idle',193,1,2000,2000,5000,'no','self','always',NULL,2330,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya\'s Slave@NPC_COMBOATTACK','attack',171,2,500,700,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya\'s Slave@NPC_EMOTION','chase',197,1,2000,0,5000,'yes','self','always',NULL,32,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya\'s Slave@NPC_FIREBREATH','attack',654,3,500,1000,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya\'s Slave@NPC_GROUNDATTACK','attack',185,5,500,500,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya\'s Slave@NPC_PIERCINGATT','attack',158,5,500,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya\'s Slave@SM_PROVOKE','chase',6,10,2000,600,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'44',NULL);
+REPLACE INTO `mob_skill_db` VALUES (2330,'Buwaya\'s Slave@TF_THROWSTONE','chase',152,1,2000,0,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `mob_skill_db` VALUES (2331,'Seaweed@AL_DECAGI','idle',30,1,10000,1000,5000,'no','target','always',NULL,NULL,NULL,NULL,NULL,NULL,'29',NULL);
REPLACE INTO `mob_skill_db` VALUES (2331,'Seaweed@AL_HEAL','idle',28,9,10000,500,5000,'yes','friend','friendhpltmaxrate','100',NULL,NULL,NULL,NULL,NULL,'3',NULL);
REPLACE INTO `mob_skill_db` VALUES (2337,'Hidden Mob@NPC_INVISIBLE','attack',353,1,10000,0,30000,'yes','self','always',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
diff --git a/sql-files/upgrades/2018-12-14--01-02.sql b/sql-files/upgrades/2018-12-14--01-02.sql
new file mode 100644
index 000000000..7bcd583c2
--- /dev/null
+++ b/sql-files/upgrades/2018-12-14--01-02.sql
@@ -0,0 +1,24 @@
+#1544738447
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2018 Hercules Dev Team
+-- Copyright (C) 4144
+--
+-- Hercules is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ALTER TABLE `char` ADD `inventory_size` INT(11) UNSIGNED NOT NULL DEFAULT '100';
+
+INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1544738447, 'No');
diff --git a/sql-files/upgrades/2018-12-29--07-51.sql b/sql-files/upgrades/2018-12-29--07-51.sql
new file mode 100644
index 000000000..641179399
--- /dev/null
+++ b/sql-files/upgrades/2018-12-29--07-51.sql
@@ -0,0 +1,29 @@
+#1546059075
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2013-2015 Hercules Dev Team
+--
+-- Hercules is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+CREATE TABLE IF NOT EXISTS `npc_barter_data` (
+ `name` VARCHAR(24) NOT NULL DEFAULT '',
+ `itemId` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `priceId` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `priceAmount` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (`name`, `itemid`, `priceId`, `priceAmount`)
+) ENGINE=MyISAM;
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1546059075);
diff --git a/sql-files/upgrades/2019-04-08--21-52.sql b/sql-files/upgrades/2019-04-08--21-52.sql
new file mode 100644
index 000000000..bd015acf8
--- /dev/null
+++ b/sql-files/upgrades/2019-04-08--21-52.sql
@@ -0,0 +1,29 @@
+#1554760320
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2013-2019 Hercules Dev Team
+--
+-- Hercules is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+UPDATE `auction` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254);
+UPDATE `cart_inventory` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254);
+UPDATE `inventory` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254);
+UPDATE `guild_storage` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254);
+UPDATE `mail` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254);
+UPDATE `rodex_items` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254);
+UPDATE `storage` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254);
+
+INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1554760320, 'No');
diff --git a/sql-files/upgrades/2019-04-25--02-12.sql b/sql-files/upgrades/2019-04-25--02-12.sql
new file mode 100644
index 000000000..64abe45b6
--- /dev/null
+++ b/sql-files/upgrades/2019-04-25--02-12.sql
@@ -0,0 +1,24 @@
+#1556147483
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2013-2019 Hercules Dev Team
+--
+-- Hercules is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+TRUNCATE TABLE `guild_expulsion`;
+ALTER TABLE `guild_expulsion` ADD `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `account_id`;
+
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1556147483);
diff --git a/sql-files/upgrades/2019-05-09--18-07.sql b/sql-files/upgrades/2019-05-09--18-07.sql
new file mode 100644
index 000000000..96d80c29c
--- /dev/null
+++ b/sql-files/upgrades/2019-05-09--18-07.sql
@@ -0,0 +1,22 @@
+#1557414445
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2015 Hercules Dev Team
+--
+-- Hercules is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ALTER TABLE `char` ADD COLUMN `hotkey_rowshift2` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `hotkey_rowshift`;
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1557414445);
diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt
index 2c88535cc..3025a728c 100644
--- a/sql-files/upgrades/index.txt
+++ b/sql-files/upgrades/index.txt
@@ -50,3 +50,8 @@
2018-06-05--12-02.sql
2018-07-24--03-23.sql
2018-09-01--05-22.sql
+2018-12-14--01-02.sql
+2018-12-29--07-51.sql
+2019-04-08--21-52.sql
+2019-04-25--02-12.sql
+2019-05-09--18-07.sql
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index 95c8df813..f159a443f 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -46,7 +46,7 @@ CHAR_C = char.c HPMchar.c loginif.c mapif.c geoip.c inter.c int_achievement.c in
CHAR_OBJ = $(addprefix obj_sql/, $(patsubst %.c,%.o,$(CHAR_C)))
CHAR_H = char.h HPMchar.h loginif.h mapif.h geoip.h inter.h int_achievement.h int_auction.h int_clan.h int_elemental.h \
int_guild.h int_homun.h int_mail.h int_mercenary.h int_party.h int_pet.h \
- int_quest.h int_rodex.h int_storage.h pincode.h
+ int_quest.h int_rodex.h int_storage.h pincode.h packets_hc_struct.h
CHAR_PH =
HAVE_MYSQL=@HAVE_MYSQL@
diff --git a/src/char/char.c b/src/char/char.c
index a09eccd8a..cad28b373 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -21,7 +21,7 @@
#define HERCULES_CORE
#include "config/core.h" // CONSOLE_INPUT
-#include "char.h"
+#include "char/char.h"
#include "char/HPMchar.h"
#include "char/geoip.h"
@@ -41,6 +41,7 @@
#include "char/inter.h"
#include "char/loginif.h"
#include "char/mapif.h"
+#include "char/packets_hc_struct.h"
#include "char/pincode.h"
#include "common/HPM.h"
@@ -53,6 +54,7 @@
#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/nullpo.h"
+#include "common/packetsstatic_len.h"
#include "common/showmsg.h"
#include "common/socket.h"
#include "common/strlib.h"
@@ -475,17 +477,27 @@ static int char_mmo_char_tosql(int char_id, struct mmo_charstatus *p)
(p->look.head_mid != cp->look.head_mid) || (p->look.head_bottom != cp->look.head_bottom) || (p->delete_date != cp->delete_date) ||
(p->rename != cp->rename) || (p->slotchange != cp->slotchange) || (p->look.robe != cp->look.robe) ||
(p->show_equip != cp->show_equip) || (p->allow_party != cp->allow_party) || (p->font != cp->font) ||
- (p->uniqueitem_counter != cp->uniqueitem_counter) || (p->hotkey_rowshift != cp->hotkey_rowshift) ||
+ (p->uniqueitem_counter != cp->uniqueitem_counter) || (p->hotkey_rowshift != cp->hotkey_rowshift) || (p->hotkey_rowshift2 != cp->hotkey_rowshift2) ||
(p->clan_id != cp->clan_id) || (p->last_login != cp->last_login) || (p->attendance_count != cp->attendance_count) ||
- (p->attendance_timer != cp->attendance_timer) || (p->title_id != cp->title_id)
+ (p->attendance_timer != cp->attendance_timer) || (p->title_id != cp->title_id) || (p->inventorySize != cp->inventorySize) ||
+ (p->allow_call != cp->allow_call)
) {
//Save status
unsigned int opt = 0;
- if( p->allow_party )
+ if (p->inventorySize <= 0 || p->inventorySize > MAX_INVENTORY) {
+ ShowError("Wrong inventorySize field: %d. Must be in range 1 to %d. Character %s (CID: %d, AID: %d)\n",
+ p->inventorySize, MAX_INVENTORY, p->name, p->char_id, p->account_id);
+ Assert_report(0);
+ p->inventorySize = FIXED_INVENTORY_SIZE;
+ }
+
+ if (p->allow_party)
opt |= OPT_ALLOW_PARTY;
- if( p->show_equip )
+ if (p->show_equip)
opt |= OPT_SHOW_EQUIP;
+ if (p->allow_call)
+ opt |= OPT_ALLOW_CALL;
if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d',"
"`base_exp`='%"PRIu64"', `job_exp`='%"PRIu64"', `zeny`='%d',"
@@ -495,8 +507,8 @@ static int char_mmo_char_tosql(int char_id, struct mmo_charstatus *p)
"`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d',"
"`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d', `rename`='%d',"
"`delete_date`='%lu',`robe`='%d',`slotchange`='%d', `char_opt`='%u', `font`='%u', `uniqueitem_counter` ='%u',"
- "`hotkey_rowshift`='%d',`clan_id`='%d',`last_login`='%"PRId64"',`attendance_count`='%d',`attendance_timer`='%"PRId64"',"
- "`title_id`='%d'"
+ "`hotkey_rowshift`='%d',`hotkey_rowshift2`='%d',`clan_id`='%d',`last_login`='%"PRId64"',`attendance_count`='%d',`attendance_timer`='%"PRId64"',"
+ "`title_id`='%d', `inventory_size`='%d'"
" WHERE `account_id`='%d' AND `char_id` = '%d'",
char_db, p->base_level, p->job_level,
p->base_exp, p->job_exp, p->zeny,
@@ -508,8 +520,8 @@ static int char_mmo_char_tosql(int char_id, struct mmo_charstatus *p)
mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y, p->rename,
(unsigned long)p->delete_date, // FIXME: platform-dependent size
p->look.robe,p->slotchange,opt,p->font,p->uniqueitem_counter,
- p->hotkey_rowshift,p->clan_id,p->last_login, p->attendance_count, p->attendance_timer,
- p->title_id,
+ p->hotkey_rowshift,p->hotkey_rowshift2,p->clan_id,p->last_login, p->attendance_count, p->attendance_timer,
+ p->title_id, p->inventorySize,
p->account_id, p->char_id) )
{
Sql_ShowDebug(inter->sql_handle);
@@ -1050,7 +1062,7 @@ static int char_mmo_gender(const struct char_session_data *sd, const struct mmo_
//=====================================================================================================
// Loads the basic character rooster for the given account. Returns total buffer used.
-static int char_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf)
+static int char_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf, int *count)
{
struct SqlStmt *stmt;
struct mmo_charstatus p;
@@ -1059,6 +1071,9 @@ static int char_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf)
time_t unban_time = 0;
char sex[2];
+ if (count)
+ *count = 0;
+
nullpo_ret(sd);
nullpo_ret(buf);
@@ -1080,13 +1095,13 @@ static int char_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf)
"`str`,`agi`,`vit`,`int`,`dex`,`luk`,`max_hp`,`hp`,`max_sp`,`sp`,"
"`status_point`,`skill_point`,`option`,`karma`,`manner`,`hair`,`hair_color`,"
"`clothes_color`,`body`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`rename`,`delete_date`,"
- "`robe`,`slotchange`,`unban_time`,`sex`,`title_id`"
+ "`robe`,`slotchange`,`unban_time`,`sex`,`title_id`,`inventory_size`"
" FROM `%s` WHERE `account_id`='%d' AND `char_num` < '%d'", char_db, sd->account_id, MAX_CHARS)
|| SQL_ERROR == SQL->StmtExecute(stmt)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p.char_id, sizeof p.char_id, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &p.slot, sizeof p.slot, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &p.name, sizeof p.name, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT16, &p.class, sizeof p.class, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT, &p.class, sizeof p.class, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p.base_level, sizeof p.base_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p.job_level, sizeof p.job_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT64, &p.base_exp, sizeof p.base_exp, NULL, NULL)
@@ -1124,25 +1139,36 @@ static int char_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_TIME, &unban_time, sizeof unban_time, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_ENUM, &sex, sizeof sex, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 40, SQLDT_INT, &p.title_id, sizeof p.title_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 41, SQLDT_INT, &p.inventorySize, sizeof p.inventorySize, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
return 0;
}
- for( i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); i++ ) {
+ int tmpCount = 0;
+ for (i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); i++) {
if (p.slot >= MAX_CHARS)
continue;
+ if (p.inventorySize <= 0 || p.inventorySize > MAX_INVENTORY) {
+ ShowError("Wrong inventorySize field: %d. Must be in range 1 to %d. Character %s (CID: %d, AID: %d)\n",
+ p.inventorySize, MAX_INVENTORY, p.name, p.char_id, p.account_id);
+ Assert_report(0);
+ p.inventorySize = FIXED_INVENTORY_SIZE;
+ }
p.last_point.map = mapindex->name2id(last_map);
sd->found_char[p.slot] = p.char_id;
sd->unban_time[p.slot] = unban_time;
p.sex = chr->mmo_gender(sd, &p, sex[0]);
j += chr->mmo_char_tobuf(WBUFP(buf, j), &p);
+ tmpCount ++;
}
- memset(sd->new_name,0,sizeof(sd->new_name));
+ memset(sd->new_name, 0, sizeof(sd->new_name));
SQL->StmtFree(stmt);
+ if (count)
+ *count = tmpCount;
return j;
}
@@ -1170,6 +1196,7 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
nullpo_ret(p);
memset(p, 0, sizeof(struct mmo_charstatus));
+ p->inventorySize = FIXED_INVENTORY_SIZE;
if (chr->show_save_log)
ShowInfo("Char load request (%d)\n", char_id);
@@ -1188,8 +1215,8 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
"`status_point`,`skill_point`,`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`homun_id`,`elemental_id`,`hair`,"
"`hair_color`,`clothes_color`,`body`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`last_x`,`last_y`,"
"`save_map`,`save_x`,`save_y`,`partner_id`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`robe`,`slotchange`,"
- "`char_opt`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`clan_id`,`last_login`, `attendance_count`, `attendance_timer`,"
- "`title_id`"
+ "`char_opt`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`,`hotkey_rowshift2`,`clan_id`,`last_login`, `attendance_count`, `attendance_timer`,"
+ "`title_id`, `inventory_size`"
" FROM `%s` WHERE `char_id`=? LIMIT 1", char_db)
|| SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
@@ -1197,7 +1224,7 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &p->account_id, sizeof p->account_id, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &p->slot, sizeof p->slot, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &p->name, sizeof p->name, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT16, &p->class, sizeof p->class, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p->class, sizeof p->class, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p->base_level, sizeof p->base_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &p->job_level, sizeof p->job_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p->base_exp, sizeof p->base_exp, NULL, NULL)
@@ -1252,11 +1279,13 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 56, SQLDT_UINT32, &p->uniqueitem_counter, sizeof p->uniqueitem_counter, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 57, SQLDT_ENUM, &sex, sizeof sex, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 58, SQLDT_UCHAR, &p->hotkey_rowshift, sizeof p->hotkey_rowshift, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 59, SQLDT_INT, &p->clan_id, sizeof p->clan_id, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 60, SQLDT_INT64, &p->last_login, sizeof p->last_login, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 61, SQLDT_SHORT, &p->attendance_count, sizeof p->attendance_count, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 62, SQLDT_INT64, &p->attendance_timer, sizeof p->attendance_timer, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 63, SQLDT_INT, &p->title_id, sizeof p->title_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 59, SQLDT_UCHAR, &p->hotkey_rowshift2, sizeof p->hotkey_rowshift2, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 60, SQLDT_INT, &p->clan_id, sizeof p->clan_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 61, SQLDT_INT64, &p->last_login, sizeof p->last_login, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 62, SQLDT_SHORT, &p->attendance_count, sizeof p->attendance_count, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 63, SQLDT_INT64, &p->attendance_timer, sizeof p->attendance_timer, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 64, SQLDT_INT, &p->title_id, sizeof p->title_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 65, SQLDT_INT, &p->inventorySize, sizeof p->inventorySize, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
@@ -1288,6 +1317,13 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
p->save_point.y = mapindex->default_y;
}
+ if (p->inventorySize <= 0 || p->inventorySize > MAX_INVENTORY) {
+ ShowError("Wrong inventorySize field: %d. Must be in range 1 to %d. Character %s (CID: %d, AID: %d)\n",
+ p->inventorySize, MAX_INVENTORY, p->name, p->char_id, p->account_id);
+ Assert_report(0);
+ p->inventorySize = FIXED_INVENTORY_SIZE;
+ }
+
strcat(t_msg, " status");
if (!load_everything) // For quick selection of data when displaying the char menu
@@ -1380,7 +1416,7 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
while( SQL_SUCCESS == SQL->StmtNextRow(stmt) )
{
- if( hotkey_num >= 0 && hotkey_num < MAX_HOTKEYS )
+ if( hotkey_num >= 0 && hotkey_num < MAX_HOTKEYS_DB )
memcpy(&p->hotkeys[hotkey_num], &tmp_hotkey, sizeof(tmp_hotkey));
else
ShowWarning("chr->mmo_char_fromsql: ignoring invalid hotkey (hotkey=%d,type=%u,id=%u,lv=%u) of character %s (AID=%d,CID=%d)\n", hotkey_num, tmp_hotkey.type, tmp_hotkey.id, tmp_hotkey.lv, p->name, p->account_id, p->char_id);
@@ -1415,10 +1451,12 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
SQL->StmtFree(stmt);
/* load options into proper vars */
- if( opt & OPT_ALLOW_PARTY )
+ if (opt & OPT_ALLOW_PARTY)
p->allow_party = true;
- if( opt & OPT_SHOW_EQUIP )
+ if (opt & OPT_SHOW_EQUIP)
p->show_equip = true;
+ if (opt & OPT_ALLOW_CALL)
+ p->allow_call = true;
cp = idb_ensure(chr->char_db_, char_id, chr->create_charstatus);
memcpy(cp, p, sizeof(struct mmo_charstatus));
@@ -1673,7 +1711,7 @@ static int char_check_char_name(const char *name, const char *esc_name)
* -5: 'Symbols in Character Names are forbidden'
* char_id: Success
**/
-static int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int16 starting_class, uint8 sex)
+static int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_class, uint8 sex)
{
char name[NAME_LENGTH];
char esc_name[NAME_LENGTH*2+1];
@@ -1720,22 +1758,22 @@ static int char_make_new_char_sql(struct char_session_data *sd, const char *name
#if PACKETVER >= 20120307
// Insert the new char entry to the database
if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `status_point`,`str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
- "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `sex`) VALUES ("
- "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%c')",
+ "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `sex`, `inventory_size`) VALUES ("
+ "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%c', '%d')",
char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, 48, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
- mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y, sex)) {
+ mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y, sex, FIXED_INVENTORY_SIZE)) {
Sql_ShowDebug(inter->sql_handle);
return -2; //No, stop the procedure!
}
#else
//Insert the new char entry to the database
if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
- "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
- "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+ "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `inventory_size`) VALUES ("
+ "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d')",
char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
- mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) )
+ mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y, FIXED_INVENTORY_SIZE) )
{
Sql_ShowDebug(inter->sql_handle);
return -2; //No, stop the procedure!
@@ -1987,7 +2025,7 @@ static int char_count_users(void)
// Writes char data to the buffer in the format used by the client.
// Used in packets 0x6b (chars info) and 0x6d (new char info)
// Returns the size
-#define MAX_CHAR_BUF 150 //Max size (for WFIFOHEAD calls)
+#define MAX_CHAR_BUF (PACKET_LEN_0x006d - 2)
static int char_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p)
{
unsigned short offset = 0;
@@ -2092,18 +2130,36 @@ static int char_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p)
#endif
#endif
- return 106+offset;
+ if (106 + offset != MAX_CHAR_BUF)
+ Assert_report("Wrong buffer size in char_mmo_char_tobuf");
+ return 106 + offset;
}
/* Made Possible by Yommy~! <3 */
-static void char_mmo_char_send099d(int fd, struct char_session_data *sd)
-{
-// support added for client between 20121010 and 20130320
-#if PACKETVER > 20120418
- WFIFOHEAD(fd,4 + (MAX_CHARS*MAX_CHAR_BUF));
- WFIFOW(fd,0) = 0x99d;
- WFIFOW(fd,2) = chr->mmo_chars_fromsql(sd, WFIFOP(fd,4)) + 4;
- WFIFOSET(fd,WFIFOW(fd,2));
+static void char_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20130522 || PACKETVER_RE_NUM >= 20130327 || defined(PACKETVER_ZERO)
+ WFIFOHEAD(fd, sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE) + (MAX_CHARS * MAX_CHAR_BUF));
+ struct PACKET_HC_ACK_CHARINFO_PER_PAGE *p = WFIFOP(fd, 0);
+ int count = 0;
+ p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
+ p->packetLen = chr->mmo_chars_fromsql(sd, WFIFOP(fd, 4), &count) + sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE);
+ WFIFOSET(fd, p->packetLen);
+ // send empty packet if chars count is 3, for trigger final code in client
+ if (count == 3) {
+ chr->send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd);
+ }
+#endif
+}
+
+static void char_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20130522 || PACKETVER_RE_NUM >= 20130327 || defined(PACKETVER_ZERO)
+ WFIFOHEAD(fd, sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE));
+ struct PACKET_HC_ACK_CHARINFO_PER_PAGE *p = WFIFOP(fd, 0);
+ p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
+ p->packetLen = sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE);
+ WFIFOSET(fd, p->packetLen);
#endif
}
@@ -2189,7 +2245,7 @@ static int char_mmo_char_send_characters(int fd, struct char_session_data *sd)
WFIFOB(fd,6) = MAX_CHARS; // Premium slots. AKA any existent chars past sd->char_slots but within MAX_CHARS will show a 'Premium Service' in red
#endif
memset(WFIFOP(fd,4 + offset), 0, 20); // unknown bytes
- j+=chr->mmo_chars_fromsql(sd, WFIFOP(fd,j));
+ j += chr->mmo_chars_fromsql(sd, WFIFOP(fd, j), NULL);
WFIFOW(fd,2) = j; // packet len
WFIFOSET(fd,j);
@@ -2338,19 +2394,29 @@ static void char_ping_login_server(int fd)
static int char_parse_fromlogin_connection_state(int fd)
{
- if (RFIFOB(fd,2)) {
- //printf("connect login server error : %d\n", RFIFOB(fd,2));
+ switch (RFIFOB(fd,2)) {
+ case 0:
+ ShowStatus("Connected to login-server (connection #%d).\n", fd);
+ loginif->on_ready();
+ break;
+ case 1: // Invalid username/password
ShowError("Can not connect to login-server.\n");
ShowError("The server communication passwords (default s1/p1) are probably invalid.\n");
ShowError("Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.\n");
ShowError("The communication passwords are set in /conf/map/map-server.conf and /conf/char/char-server.conf\n");
sockt->eof(fd);
return 1;
- } else {
- ShowStatus("Connected to login-server (connection #%d).\n", fd);
- loginif->on_ready();
+ case 2: // IP not allowed
+ ShowError("Can not connect to login-server.\n");
+ ShowError("Please make sure your IP is allowed in conf/network.conf\n");
+ sockt->eof(fd);
+ return 1;
+ default:
+ ShowError("Invalid response from the login-server. Error code: %d\n", (int)RFIFOB(fd,2));
+ sockt->eof(fd);
+ return 1;
}
- RFIFOSKIP(fd,3);
+ RFIFOSKIP(fd, 3);
return 0;
}
@@ -4170,10 +4236,10 @@ static void char_delete2_accept_actual_ack(int fd, int char_id, uint32 result)
/// Any (0x718): An unknown error has occurred.
static void char_delete2_accept_ack(int fd, int char_id, uint32 result)
{// HC: <082a>.W <char id>.L <Msg:0-5>.L
-#if PACKETVER >= 20130000 /* not sure the exact date -- must refresh or client gets stuck */
+#if PACKETVER_MAIN_NUM >= 20130522 || PACKETVER_RE_NUM >= 20130327 || defined(PACKETVER_ZERO)
if( result == 1 ) {
struct char_session_data* sd = (struct char_session_data*)sockt->session[fd]->session_data;
- chr->mmo_char_send099d(fd, sd);
+ chr->send_HC_ACK_CHARINFO_PER_PAGE(fd, sd);
}
#endif
chr->delete2_accept_actual_ack(fd, char_id, result);
@@ -4401,6 +4467,7 @@ static void char_parse_char_connect(int fd, struct char_session_data *sd, uint32
if( core->runflag != CHARSERVER_ST_RUNNING ) {
chr->auth_error(fd, 0);
+ sockt->eof(fd);
return;
}
@@ -4415,11 +4482,13 @@ static void char_parse_char_connect(int fd, struct char_session_data *sd, uint32
/* restrictions apply */
if( chr->server_type == CST_MAINTENANCE && node->group_id < char_maintenance_min_group_id ) {
chr->auth_error(fd, 0);
+ sockt->eof(fd);
return;
}
/* the client will already deny this request, this check is to avoid someone bypassing. */
if( chr->server_type == CST_PAYING && (time_t)node->expiration_time < time(NULL) ) {
chr->auth_error(fd, 0);
+ sockt->eof(fd);
return;
}
idb_remove(auth_db, account_id);
@@ -4431,6 +4500,7 @@ static void char_parse_char_connect(int fd, struct char_session_data *sd, uint32
loginif->auth(fd, sd, ipl);
} else { // if no login-server, we must refuse connection
chr->auth_error(fd, 0);
+ sockt->eof(fd);
}
}
}
@@ -4651,7 +4721,8 @@ static void char_creation_failed(int fd, int result)
/* Others I found [Ind] */
/* 0x02 = Symbols in Character Names are forbidden */
/* 0x03 = You are not eligible to open the Character Slot. */
- /* 0x0B = This service is only available for premium users. */
+ /* 0x0B = This service is only available for premium users. */
+ /* 0x0C = Character name is invalid. */
switch (result) {
case -1: WFIFOB(fd,2) = 0x00; break; // 'Charname already exists'
case -2: WFIFOB(fd,2) = 0xFF; break; // 'Char creation denied'
@@ -4951,6 +5022,7 @@ static void char_parse_char_login_map_server(int fd, uint32 ipl)
!sockt->allowed_ip_check(ipl))
{
chr->login_map_server_ack(fd, 3); // Failure
+ sockt->eof(fd);
} else {
chr->login_map_server_ack(fd, 0); // Success
@@ -5006,7 +5078,7 @@ static void char_parse_char_pincode_first_pin(int fd, struct char_session_data *
static void char_parse_char_request_chars(int fd, struct char_session_data *sd)
{
- chr->mmo_char_send099d(fd, sd);
+ chr->send_HC_ACK_CHARINFO_PER_PAGE(fd, sd);
RFIFOSKIP(fd,2);
}
@@ -5026,8 +5098,8 @@ static void char_parse_char_move_character(int fd, struct char_session_data *sd)
chr->change_character_slot_ack(fd, ret);
/* for some stupid reason it requires the char data again (gravity -_-) */
if( ret )
-#if PACKETVER >= 20130000
- chr->mmo_char_send099d(fd, sd);
+#if PACKETVER_MAIN_NUM >= 20130522 || PACKETVER_RE_NUM >= 20130327 || defined(PACKETVER_ZERO)
+ chr->send_HC_ACK_CHARINFO_PER_PAGE(fd, sd);
#else
chr->mmo_char_send_characters(fd, sd);
#endif
@@ -6424,7 +6496,8 @@ void char_defaults(void)
chr->divorce_char_sql = char_divorce_char_sql;
chr->count_users = char_count_users;
chr->mmo_char_tobuf = char_mmo_char_tobuf;
- chr->mmo_char_send099d = char_mmo_char_send099d;
+ chr->send_HC_ACK_CHARINFO_PER_PAGE = char_send_HC_ACK_CHARINFO_PER_PAGE;
+ chr->send_HC_ACK_CHARINFO_PER_PAGE_tail = char_send_HC_ACK_CHARINFO_PER_PAGE_tail;
chr->mmo_char_send_ban_list = char_mmo_char_send_ban_list;
chr->mmo_char_send_slots_info = char_mmo_char_send_slots_info;
chr->mmo_char_send_characters = char_mmo_char_send_characters;
diff --git a/src/char/char.h b/src/char/char.h
index 81cab1eaf..5de3e2a80 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -142,18 +142,19 @@ struct char_interface {
int (*getitemdata_from_sql) (struct item *items, int max, int guid, enum inventory_table_type table);
int (*memitemdata_to_sql) (const struct item items[], int id, enum inventory_table_type table);
int (*mmo_gender) (const struct char_session_data *sd, const struct mmo_charstatus *p, char sex);
- int (*mmo_chars_fromsql) (struct char_session_data* sd, uint8* buf);
+ int (*mmo_chars_fromsql) (struct char_session_data* sd, uint8* buf, int *count);
int (*mmo_char_fromsql) (int char_id, struct mmo_charstatus* p, bool load_everything);
int (*mmo_char_sql_init) (void);
bool (*char_slotchange) (struct char_session_data *sd, int fd, unsigned short from, unsigned short to);
int (*rename_char_sql) (struct char_session_data *sd, int char_id);
bool (*name_exists) (const char *name, const char *esc_name);
int (*check_char_name) (const char *name, const char *esc_name);
- int (*make_new_char_sql) (struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex);
+ int (*make_new_char_sql) (struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex);
int (*divorce_char_sql) (int partner_id1, int partner_id2);
int (*count_users) (void);
int (*mmo_char_tobuf) (uint8* buffer, struct mmo_charstatus* p);
- void (*mmo_char_send099d) (int fd, struct char_session_data *sd);
+ void (*send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd);
+ void (*send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd);
void (*mmo_char_send_ban_list) (int fd, struct char_session_data *sd);
void (*mmo_char_send_slots_info) (int fd, struct char_session_data* sd);
int (*mmo_char_send_characters) (int fd, struct char_session_data* sd);
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 56e1c1ba3..8e05c76e2 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -319,8 +319,8 @@ static int inter_guild_tosql(struct guild *g, int flag)
SQL->EscapeStringLen(inter->sql_handle, esc_name, e->name, strnlen(e->name, NAME_LENGTH));
SQL->EscapeStringLen(inter->sql_handle, esc_mes, e->mes, strnlen(e->mes, sizeof(e->mes)));
- if( SQL_ERROR == SQL->Query(inter->sql_handle, "REPLACE INTO `%s` (`guild_id`,`account_id`,`name`,`mes`) "
- "VALUES ('%d','%d','%s','%s')", guild_expulsion_db, g->guild_id, e->account_id, esc_name, esc_mes) )
+ if( SQL_ERROR == SQL->Query(inter->sql_handle, "REPLACE INTO `%s` (`guild_id`,`account_id`, `char_id`, `name`,`mes`) "
+ "VALUES ('%d','%d','%d','%s','%s')", guild_expulsion_db, g->guild_id, e->account_id, e->char_id, esc_name, esc_mes) )
Sql_ShowDebug(inter->sql_handle);
}
}
@@ -444,8 +444,14 @@ static struct guild *inter_guild_fromsql(int guild_id)
m->position = MAX_GUILDPOSITION - 1;
SQL->GetData(inter->sql_handle, 11, &data, &len); memcpy(m->name, data, min(len, NAME_LENGTH));
SQL->GetData(inter->sql_handle, 12, &data, NULL);
- if (data != NULL)
+ if (data != NULL) {
m->last_login = atoi(data);
+ // 2036-12-31
+ if (m->last_login > 2114283600) {
+ ShowError("Last login time bigger than allowd value in %d:%s: %u\n", guild_id, g->name, m->last_login);
+ m->last_login = 0;
+ }
+ }
m->modified = GS_MEMBER_UNMODIFIED;
}
@@ -488,7 +494,7 @@ static struct guild *inter_guild_fromsql(int guild_id)
}
//printf("- Read guild_expulsion %d from sql \n",guild_id);
- if( SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `account_id`,`name`,`mes` FROM `%s` WHERE `guild_id`='%d'", guild_expulsion_db, guild_id) )
+ if( SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `account_id`,`char_id`,`name`,`mes` FROM `%s` WHERE `guild_id`='%d'", guild_expulsion_db, guild_id) )
{
Sql_ShowDebug(inter->sql_handle);
aFree(g);
@@ -499,8 +505,9 @@ static struct guild *inter_guild_fromsql(int guild_id)
struct guild_expulsion *e = &g->expulsion[i];
SQL->GetData(inter->sql_handle, 0, &data, NULL); e->account_id = atoi(data);
- SQL->GetData(inter->sql_handle, 1, &data, &len); memcpy(e->name, data, min(len, NAME_LENGTH));
- SQL->GetData(inter->sql_handle, 2, &data, &len); memcpy(e->mes, data, min(len, sizeof(e->mes)));
+ SQL->GetData(inter->sql_handle, 1, &data, NULL); e->char_id = atoi(data);
+ SQL->GetData(inter->sql_handle, 2, &data, &len); memcpy(e->name, data, min(len, NAME_LENGTH));
+ SQL->GetData(inter->sql_handle, 3, &data, &len); memcpy(e->mes, data, min(len, sizeof(e->mes)));
}
//printf("- Read guild_skill %d from sql \n",guild_id);
@@ -1038,6 +1045,7 @@ static bool inter_guild_leave(int guild_id, int account_id, int char_id, int fla
}
// Save the expulsion entry
g->expulsion[j].account_id = account_id;
+ g->expulsion[j].char_id = char_id;
safestrncpy(g->expulsion[j].name, g->member[i].name, NAME_LENGTH);
safestrncpy(g->expulsion[j].mes, mes, 40);
}
@@ -1060,7 +1068,7 @@ static bool inter_guild_leave(int guild_id, int account_id, int char_id, int fla
}
// Change member info
-static bool inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int16 class)
+static bool inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class)
{
// Could speed up by manipulating only guild_member
struct guild *g;
@@ -1602,7 +1610,7 @@ static int inter_guild_parse_frommap(int fd)
case 0x3032: mapif->parse_GuildAddMember(fd, RFIFOL(fd,4), RFIFOP(fd,8)); break;
case 0x3033: mapif->parse_GuildMasterChange(fd, RFIFOL(fd,4), RFIFOP(fd,8), RFIFOW(fd,2)-8); break;
case 0x3034: mapif->parse_GuildLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOB(fd,14), RFIFOP(fd,15)); break;
- case 0x3035: mapif->parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17)); break;
+ case 0x3035: mapif->parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOL(fd,15),RFIFOL(fd,19)); break;
case 0x3036: mapif->parse_BreakGuild(fd,RFIFOL(fd,2)); break;
case 0x3037: mapif->parse_GuildMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
case 0x3039: mapif->parse_GuildBasicInfoChange(fd, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOP(fd,10), RFIFOW(fd,2)-10); break;
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index 33873edcd..4ed0f526e 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -72,7 +72,7 @@ struct inter_guild_interface {
struct guild *(*create) (const char *name, const struct guild_member *master);
bool (*add_member) (int guild_id, const struct guild_member *member, int map_fd);
bool (*leave) (int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd);
- bool (*update_member_info_short) (int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ bool (*update_member_info_short) (int guild_id, int account_id, int char_id, int online, int lv, int class);
bool (*update_member_info) (int guild_id, int account_id, int char_id, int type, const char *data, int len);
bool (*disband) (int guild_id);
bool (*update_basic_info) (int guild_id, int type, const void *data, int len);
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 8f87becff..d31e7545c 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -160,7 +160,7 @@ static int inter_pet_delete(int pet_id)
return 0;
}
//------------------------------------------------------
-static struct s_pet *inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id,
+static struct s_pet *inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name)
{
nullpo_ret(pet_name);
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index 104771735..b5852d441 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -37,7 +37,7 @@ struct inter_pet_interface {
int (*delete_) (int pet_id);
int (*parse_frommap) (int fd);
- struct s_pet *(*create) (int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id,
+ struct s_pet *(*create) (int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
struct s_pet *(*load) (int account_id, int char_id, int pet_id);
};
diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c
index 18c277574..fbf628f32 100644
--- a/src/char/int_rodex.c
+++ b/src/char/int_rodex.c
@@ -268,7 +268,7 @@ static bool inter_rodex_hasnew(int char_id, int account_id)
}
/// Checks player name and retrieves some data
-static bool inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level)
+static bool inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level)
{
char esc_name[NAME_LENGTH * 2 + 1];
bool found = false;
@@ -286,7 +286,7 @@ static bool inter_rodex_checkname(const char *name, int *target_char_id, short *
if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) {
char *data;
SQL->GetData(inter->sql_handle, 0, &data, NULL); *target_char_id = atoi(data);
- SQL->GetData(inter->sql_handle, 1, &data, NULL); *target_class = (short)atoi(data);
+ SQL->GetData(inter->sql_handle, 1, &data, NULL); *target_class = atoi(data);
SQL->GetData(inter->sql_handle, 2, &data, NULL); *target_level = atoi(data);
found = true;
}
@@ -346,11 +346,128 @@ static int64 inter_rodex_savemessage(struct rodex_message *msg)
return msg->id;
}
+static int64 inter_rodex_getzeny(int64 mail_id)
+{
+ Assert_retr(-1, mail_id > 0);
+
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `zeny`, `type` FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) {
+ Sql_ShowDebug(inter->sql_handle);
+ } else {
+ if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) {
+ char *data;
+ SQL->GetData(inter->sql_handle, 0, &data, NULL);
+ int64 zeny = atoi(data);
+ SQL->GetData(inter->sql_handle, 1, &data, NULL);
+ uint8 type = atoi(data);
+ SQL->FreeResult(inter->sql_handle);
+ if ((type & MAIL_TYPE_ZENY) == 0)
+ return -1;
+ return zeny;
+ }
+ }
+ SQL->FreeResult(inter->sql_handle);
+
+ return -1;
+}
+
+static int inter_rodex_getitems(int64 mail_id, struct rodex_item *items)
+{
+ Assert_retr(-1, mail_id > 0);
+ nullpo_retr(-1, items);
+
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `type` FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) {
+ Sql_ShowDebug(inter->sql_handle);
+ return -1;
+ } else {
+ if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) {
+ char *data;
+ SQL->GetData(inter->sql_handle, 0, &data, NULL);
+ uint8 type = atoi(data);
+ SQL->FreeResult(inter->sql_handle);
+ if ((type & MAIL_TYPE_ITEM) == 0)
+ return -1;
+ } else {
+ SQL->FreeResult(inter->sql_handle);
+ return -1;
+ }
+ }
+
+
+ int itemsCount = 0;
+
+ struct SqlStmt *stmt_items = SQL->StmtMalloc(inter->sql_handle);
+
+ if (stmt_items == NULL) {
+ return -1;
+ }
+
+ StringBuf buf;
+ StrBuf->Init(&buf);
+
+ StrBuf->AppendStr(&buf, "SELECT `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`");
+ for (int i = 0; i < MAX_SLOTS; i++) {
+ StrBuf->Printf(&buf, ", `card%d`", i);
+ }
+ for (int i = 0; i < MAX_ITEM_OPTIONS; i++) {
+ StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", i, i);
+ }
+ StrBuf->Printf(&buf, "FROM `%s` WHERE mail_id = ? ORDER BY `mail_id` ASC", rodex_item_db);
+
+ struct item it = { 0 };
+
+ if (SQL_ERROR == SQL->StmtPrepareStr(stmt_items, StrBuf->Value(&buf))
+ || SQL_ERROR == SQL->StmtBindParam(stmt_items, 0, SQLDT_INT64, &mail_id, sizeof mail_id)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+
+ if (SQL_ERROR == SQL->StmtExecute(stmt_items)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 0, SQLDT_INT, &it.nameid, sizeof it.nameid, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 1, SQLDT_SHORT, &it.amount, sizeof it.amount, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 2, SQLDT_UINT, &it.equip, sizeof it.equip, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 3, SQLDT_CHAR, &it.identify, sizeof it.identify, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 4, SQLDT_CHAR, &it.refine, sizeof it.refine, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 5, SQLDT_CHAR, &it.attribute, sizeof it.attribute, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 6, SQLDT_UINT, &it.expire_time, sizeof it.expire_time, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 7, SQLDT_UCHAR, &it.bound, sizeof it.bound, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 8, SQLDT_UINT64, &it.unique_id, sizeof it.unique_id, NULL, NULL)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ for (int i = 0; i < MAX_SLOTS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9 + i, SQLDT_INT, &it.card[i], sizeof it.card[i], NULL, NULL))
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ for (int i = 0; i < MAX_ITEM_OPTIONS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9 + MAX_SLOTS + i * 2, SQLDT_INT16, &it.option[i].index, sizeof it.option[i].index, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 10 + MAX_SLOTS + i * 2, SQLDT_INT16, &it.option[i].value, sizeof it.option[i].value, NULL, NULL)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ }
+
+ for (int i = 0; i < RODEX_MAX_ITEM && SQL_SUCCESS == SQL->StmtNextRow(stmt_items); ++i) {
+ items[i].item = it;
+ items[i].idx = itemsCount;
+ itemsCount++;
+ }
+
+ SQL->StmtFreeResult(stmt_items);
+
+ StrBuf->Destroy(&buf);
+ SQL->StmtFree(stmt_items);
+
+ return itemsCount;
+}
+
/*==========================================
* Update/Delete mail
*------------------------------------------*/
-static bool inter_rodex_updatemail(int64 mail_id, int8 flag)
+static bool inter_rodex_updatemail(int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag)
{
+ Assert_retr(false, fd >= 0);
+ Assert_retr(false, account_id > 0);
+ Assert_retr(false, char_id > 0);
Assert_retr(false, mail_id > 0);
Assert_retr(false, flag >= 0 && flag <= 4);
@@ -361,17 +478,24 @@ static bool inter_rodex_updatemail(int64 mail_id, int8 flag)
break;
case 1: // Get Zeny
- if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~2) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
+ {
+ const int64 zeny = inter_rodex->getzeny(mail_id);
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~2) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) {
Sql_ShowDebug(inter->sql_handle);
+ break;
+ }
+ mapif->rodex_getzenyack(fd, char_id, mail_id, opentype, zeny);
break;
-
+ }
case 2: // Get Items
+ {
+ struct rodex_item items[RODEX_MAX_ITEM];
+ const int count = inter_rodex->getitems(mail_id, &items[0]);
if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_item_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
- if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~4) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
- Sql_ShowDebug(inter->sql_handle);
+ mapif->rodex_getitemsack(fd, char_id, mail_id, opentype, count, &items[0]);
break;
-
+ }
case 3: // Delete Mail
if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
@@ -429,4 +553,6 @@ void inter_rodex_defaults(void)
inter_rodex->hasnew = inter_rodex_hasnew;
inter_rodex->checkname = inter_rodex_checkname;
inter_rodex->updatemail = inter_rodex_updatemail;
+ inter_rodex->getzeny = inter_rodex_getzeny;
+ inter_rodex->getitems = inter_rodex_getitems;
}
diff --git a/src/char/int_rodex.h b/src/char/int_rodex.h
index 43e2d891c..a6a172ceb 100644
--- a/src/char/int_rodex.h
+++ b/src/char/int_rodex.h
@@ -34,9 +34,11 @@ struct inter_rodex_interface {
int (*parse_frommap) (int fd);
int (*fromsql) (int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails);
bool (*hasnew) (int char_id, int account_id);
- bool (*checkname) (const char *name, int *target_char_id, short *target_class, int *target_level);
+ bool (*checkname) (const char *name, int *target_char_id, int *target_class, int *target_level);
int64 (*savemessage) (struct rodex_message* msg);
- bool (*updatemail) (int64 mail_id, int8 flag);
+ bool (*updatemail) (int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag);
+ int64 (*getzeny) (int64 mail_id);
+ int (*getitems) (int64 mail_id, struct rodex_item *items);
};
#ifdef HERCULES_CORE
diff --git a/src/char/inter.c b/src/char/inter.c
index 418c9b0a1..64c840c16 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -73,13 +73,13 @@ static int inter_recv_packet_length[] = {
-1,-1, 7,-1, -1,13,36, (2 + 4 + 4 + 4 + NAME_LENGTH), 0, 0, 0, 0, 0, 0, 0, 0, // 3000-
6,-1, 6,-1, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- Account Storage, Achievements [Smokexyz]
-1,10,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party
- -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030-
+ -1, 6,-1,-1, 55,23, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030-
-1, 9, 0, 0, 10,10, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- Clan System(3044-3045)
-1,-1,10,10, 0,-1,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus], Item Bound [Mhalicot]
6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish]
-1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil]
- 52,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080-
- -1,10,-1, 6, 0, 20,10,11, -1,6 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator], RoDEX packets
+ 56,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080-
+ -1,10,-1, 6, 0, 20,10,20, -1,6 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator], RoDEX packets
};
static struct DBMap *wis_db = NULL; // int wis_id -> struct WisData*
diff --git a/src/char/mapif.c b/src/char/mapif.c
index dc5735550..8f213ecb5 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -569,7 +569,7 @@ static int mapif_guild_withdraw(int guild_id, int account_id, int char_id, int f
// Send short member's info
static int mapif_guild_memberinfoshort(struct guild *g, int idx)
{
- unsigned char buf[23];
+ unsigned char buf[25];
nullpo_ret(g);
Assert_ret(idx >= 0 && idx < MAX_GUILD);
WBUFW(buf, 0) = 0x3835;
@@ -578,9 +578,9 @@ static int mapif_guild_memberinfoshort(struct guild *g, int idx)
WBUFL(buf, 10) = g->member[idx].char_id;
WBUFB(buf, 14) = (unsigned char)g->member[idx].online;
WBUFW(buf, 15) = g->member[idx].lv;
- WBUFW(buf, 17) = g->member[idx].class;
- WBUFL(buf, 19) = g->member[idx].last_login;
- mapif->sendall(buf, 23);
+ WBUFL(buf, 17) = g->member[idx].class;
+ WBUFL(buf, 21) = g->member[idx].last_login;
+ mapif->sendall(buf, 25);
return 0;
}
@@ -797,7 +797,7 @@ static int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char
}
// Change member info
-static int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class)
+static int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class)
{
inter_guild->update_member_info_short(guild_id, account_id, char_id, online, lv, class);
return 0;
@@ -1423,18 +1423,18 @@ static int mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, i
static int mapif_pet_created(int fd, int account_id, struct s_pet *p)
{
- WFIFOHEAD(fd, 12);
+ WFIFOHEAD(fd, 14);
WFIFOW(fd, 0) = 0x3880;
WFIFOL(fd, 2) = account_id;
if (p != NULL){
- WFIFOW(fd, 6) = p->class_;
- WFIFOL(fd, 8) = p->pet_id;
+ WFIFOL(fd, 6) = p->class_;
+ WFIFOL(fd, 10) = p->pet_id;
ShowInfo("int_pet: created pet %d - %s\n", p->pet_id, p->name);
} else {
- WFIFOB(fd, 6) = 0;
- WFIFOL(fd, 8) = 0;
+ WFIFOL(fd, 6) = 0;
+ WFIFOL(fd, 10) = 0;
}
- WFIFOSET(fd, 12);
+ WFIFOSET(fd, 14);
return 0;
}
@@ -1521,15 +1521,15 @@ static int mapif_parse_CreatePet(int fd)
account_id = RFIFOL(fd, 2);
pet = inter_pet->create(account_id,
RFIFOL(fd, 6),
- RFIFOW(fd, 10),
- RFIFOW(fd, 12),
+ RFIFOL(fd, 10),
RFIFOL(fd, 14),
RFIFOL(fd, 18),
- RFIFOW(fd, 22),
- RFIFOW(fd, 24),
- RFIFOB(fd, 26),
- RFIFOB(fd, 27),
- RFIFOP(fd, 28));
+ RFIFOL(fd, 22),
+ RFIFOW(fd, 26),
+ RFIFOW(fd, 28),
+ RFIFOB(fd, 30),
+ RFIFOB(fd, 31),
+ RFIFOP(fd, 32));
if (pet != NULL)
mapif->pet_created(fd, account_id, pet);
@@ -1744,10 +1744,13 @@ static void mapif_rodex_sendhasnew(int fd, int char_id, bool has_new)
*------------------------------------------*/
static void mapif_parse_rodex_updatemail(int fd)
{
- int64 mail_id = RFIFOL(fd, 2);
- int8 flag = RFIFOB(fd, 10);
+ int account_id = RFIFOL(fd, 2);
+ int char_id = RFIFOL(fd, 6);
+ int64 mail_id = RFIFOQ(fd, 10);
+ uint8 opentype = RFIFOB(fd, 18);
+ int8 flag = RFIFOB(fd, 19);
- inter_rodex->updatemail(mail_id, flag);
+ inter_rodex->updatemail(fd, account_id, char_id, mail_id, opentype, flag);
}
/*==========================================
@@ -1789,7 +1792,7 @@ static void mapif_parse_rodex_checkname(int fd)
int reqchar_id = RFIFOL(fd, 2);
char name[NAME_LENGTH];
int target_char_id, target_level;
- short target_class;
+ int target_class;
safestrncpy(name, RFIFOP(fd, 6), NAME_LENGTH);
@@ -1799,20 +1802,20 @@ static void mapif_parse_rodex_checkname(int fd)
mapif->rodex_checkname(fd, reqchar_id, 0, 0, 0, name);
}
-static void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name)
+static void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name)
{
nullpo_retv(name);
Assert_retv(reqchar_id > 0);
Assert_retv(target_char_id >= 0);
- WFIFOHEAD(fd, 16 + NAME_LENGTH);
+ WFIFOHEAD(fd, 18 + NAME_LENGTH);
WFIFOW(fd, 0) = 0x3898;
WFIFOL(fd, 2) = reqchar_id;
WFIFOL(fd, 6) = target_char_id;
- WFIFOW(fd, 10) = target_class;
- WFIFOL(fd, 12) = target_level;
- safestrncpy(WFIFOP(fd, 16), name, NAME_LENGTH);
- WFIFOSET(fd, 16 + NAME_LENGTH);
+ WFIFOL(fd, 10) = target_class;
+ WFIFOL(fd, 14) = target_level;
+ safestrncpy(WFIFOP(fd, 18), name, NAME_LENGTH);
+ WFIFOSET(fd, 18 + NAME_LENGTH);
}
static int mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag)
@@ -2461,6 +2464,29 @@ static void mapif_achievement_save(int char_id, struct char_achievements *p)
inter_achievement->tosql(char_id, cp, p);
}
+static void mapif_rodex_getzenyack(int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny)
+{
+ WFIFOHEAD(fd, 23);
+ WFIFOW(fd, 0) = 0x3899;
+ WFIFOL(fd, 2) = char_id;
+ WFIFOQ(fd, 6) = zeny;
+ WFIFOQ(fd, 14) = mail_id;
+ WFIFOB(fd, 22) = opentype;
+ WFIFOSET(fd, 23);
+}
+
+static void mapif_rodex_getitemsack(int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items)
+{
+ WFIFOHEAD(fd, 15 + sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+ WFIFOW(fd, 0) = 0x389a;
+ WFIFOL(fd, 2) = char_id;
+ WFIFOQ(fd, 6) = mail_id;
+ WFIFOB(fd, 14) = opentype;
+ WFIFOB(fd, 15) = count;
+ memcpy(WFIFOP(fd, 16), items, sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+ WFIFOSET(fd, 16 + sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+}
+
void mapif_defaults(void)
{
mapif = &mapif_s;
@@ -2605,6 +2631,8 @@ void mapif_defaults(void)
mapif->rodex_send = mapif_rodex_send;
mapif->parse_rodex_checkname = mapif_parse_rodex_checkname;
mapif->rodex_checkname = mapif_rodex_checkname;
+ mapif->rodex_getzenyack = mapif_rodex_getzenyack;
+ mapif->rodex_getitemsack = mapif_rodex_getitemsack;
mapif->load_guild_storage = mapif_load_guild_storage;
mapif->save_guild_storage_ack = mapif_save_guild_storage_ack;
mapif->parse_LoadGuildStorage = mapif_parse_LoadGuildStorage;
diff --git a/src/char/mapif.h b/src/char/mapif.h
index bfdefe4ea..71a41f94c 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -24,6 +24,7 @@
#include "common/mmo.h"
struct WisData;
+struct rodex_item;
/**
* mapif interface
@@ -84,7 +85,7 @@ struct mapif_interface {
int (*parse_GuildInfo) (int fd, int guild_id);
int (*parse_GuildAddMember) (int fd, int guild_id, const struct guild_member *m);
int (*parse_GuildLeave) (int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
- int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
int (*parse_BreakGuild) (int fd, int guild_id);
int (*parse_GuildMessage) (int fd, int guild_id, int account_id, const char *mes, int len);
int (*parse_GuildBasicInfoChange) (int fd, int guild_id, int type, const void *data, int len);
@@ -167,7 +168,9 @@ struct mapif_interface {
void (*parse_rodex_send) (int fd);
void (*rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result);
void (*parse_rodex_checkname) (int fd);
- void (*rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name);
+ void (*rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name);
+ void (*rodex_getzenyack) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny);
+ void (*rodex_getitemsack) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items);
int (*load_guild_storage) (int fd, int account_id, int guild_id, char flag);
int (*save_guild_storage_ack) (int fd, int account_id, int guild_id, int fail);
int (*parse_LoadGuildStorage) (int fd);
diff --git a/src/char/packets_hc_struct.h b/src/char/packets_hc_struct.h
new file mode 100644
index 000000000..196493cac
--- /dev/null
+++ b/src/char/packets_hc_struct.h
@@ -0,0 +1,45 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2016-2018 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef CHAR_PACKETS_HC_STRUCT_H
+#define CHAR_PACKETS_HC_STRUCT_H
+
+#include "common/hercules.h"
+#include "common/mmo.h"
+#include "common/packetsstatic_len.h"
+
+/* Packets Structs */
+#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
+#pragma pack(push, 1)
+#endif // not NetBSD < 6 / Solaris
+
+#if PACKETVER_MAIN_NUM >= 20130522 || PACKETVER_RE_NUM >= 20130327 || defined(PACKETVER_ZERO)
+struct PACKET_HC_ACK_CHARINFO_PER_PAGE {
+ int16 packetId;
+ int16 packetLen;
+ // chars list[]
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(HC_ACK_CHARINFO_PER_PAGE, 0x099d);
+#endif
+
+#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
+
+#endif // CHAR_PACKETS_HC_STRUCT_H
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index d92591501..1e1d8068f 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2014-2018 Hercules Dev Team
+ * Copyright (C) 2014-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -230,6 +230,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "party_member", sizeof(struct party_member), SERVER_TYPE_ALL },
{ "point", sizeof(struct point), SERVER_TYPE_ALL },
{ "quest", sizeof(struct quest), SERVER_TYPE_ALL },
+ { "rodex_item", sizeof(struct rodex_item), SERVER_TYPE_ALL },
{ "rodex_maillist", sizeof(struct rodex_maillist), SERVER_TYPE_ALL },
{ "rodex_message", sizeof(struct rodex_message), SERVER_TYPE_ALL },
{ "s_elemental", sizeof(struct s_elemental), SERVER_TYPE_ALL },
@@ -346,21 +347,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef LOGIN_LCLIF_P_H
{ "lclif_interface_dbs", sizeof(struct lclif_interface_dbs), SERVER_TYPE_LOGIN },
{ "lclif_interface_private", sizeof(struct lclif_interface_private), SERVER_TYPE_LOGIN },
- { "packet_AC_ACCEPT_LOGIN", sizeof(struct packet_AC_ACCEPT_LOGIN), SERVER_TYPE_LOGIN },
- { "packet_AC_REFUSE_LOGIN", sizeof(struct packet_AC_REFUSE_LOGIN), SERVER_TYPE_LOGIN },
- { "packet_AC_REFUSE_LOGIN_R2", sizeof(struct packet_AC_REFUSE_LOGIN_R2), SERVER_TYPE_LOGIN },
- { "packet_CA_CHARSERVERCONNECT", sizeof(struct packet_CA_CHARSERVERCONNECT), SERVER_TYPE_LOGIN },
- { "packet_CA_CONNECT_INFO_CHANGED", sizeof(struct packet_CA_CONNECT_INFO_CHANGED), SERVER_TYPE_LOGIN },
- { "packet_CA_EXE_HASHCHECK", sizeof(struct packet_CA_EXE_HASHCHECK), SERVER_TYPE_LOGIN },
- { "packet_CA_LOGIN", sizeof(struct packet_CA_LOGIN), SERVER_TYPE_LOGIN },
- { "packet_CA_LOGIN2", sizeof(struct packet_CA_LOGIN2), SERVER_TYPE_LOGIN },
- { "packet_CA_LOGIN3", sizeof(struct packet_CA_LOGIN3), SERVER_TYPE_LOGIN },
- { "packet_CA_LOGIN4", sizeof(struct packet_CA_LOGIN4), SERVER_TYPE_LOGIN },
- { "packet_CA_LOGIN_HAN", sizeof(struct packet_CA_LOGIN_HAN), SERVER_TYPE_LOGIN },
- { "packet_CA_LOGIN_OTP", sizeof(struct packet_CA_LOGIN_OTP), SERVER_TYPE_LOGIN },
- { "packet_CA_LOGIN_PCBANG", sizeof(struct packet_CA_LOGIN_PCBANG), SERVER_TYPE_LOGIN },
- { "packet_CA_SSO_LOGIN_REQ", sizeof(struct packet_CA_SSO_LOGIN_REQ), SERVER_TYPE_LOGIN },
- { "packet_SC_NOTIFY_BAN", sizeof(struct packet_SC_NOTIFY_BAN), SERVER_TYPE_LOGIN },
#else
#define LOGIN_LCLIF_P_H
#endif // LOGIN_LCLIF_P_H
@@ -383,6 +369,29 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define LOGIN_LOGIN_H
#endif // LOGIN_LOGIN_H
+ #ifdef LOGIN_PACKETS_AC_STRUCT_H
+ { "PACKET_AC_ACCEPT_LOGIN", sizeof(struct PACKET_AC_ACCEPT_LOGIN), SERVER_TYPE_LOGIN },
+ { "PACKET_AC_REFUSE_LOGIN", sizeof(struct PACKET_AC_REFUSE_LOGIN), SERVER_TYPE_LOGIN },
+ { "PACKET_AC_REFUSE_LOGIN_R2", sizeof(struct PACKET_AC_REFUSE_LOGIN_R2), SERVER_TYPE_LOGIN },
+ { "PACKET_SC_NOTIFY_BAN", sizeof(struct PACKET_SC_NOTIFY_BAN), SERVER_TYPE_LOGIN },
+ #else
+ #define LOGIN_PACKETS_AC_STRUCT_H
+ #endif // LOGIN_PACKETS_AC_STRUCT_H
+ #ifdef LOGIN_PACKETS_CA_STRUCT_H
+ { "PACKET_CA_CHARSERVERCONNECT", sizeof(struct PACKET_CA_CHARSERVERCONNECT), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_CONNECT_INFO_CHANGED", sizeof(struct PACKET_CA_CONNECT_INFO_CHANGED), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_EXE_HASHCHECK", sizeof(struct PACKET_CA_EXE_HASHCHECK), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_LOGIN", sizeof(struct PACKET_CA_LOGIN), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_LOGIN2", sizeof(struct PACKET_CA_LOGIN2), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_LOGIN3", sizeof(struct PACKET_CA_LOGIN3), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_LOGIN4", sizeof(struct PACKET_CA_LOGIN4), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_LOGIN_HAN", sizeof(struct PACKET_CA_LOGIN_HAN), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_LOGIN_OTP", sizeof(struct PACKET_CA_LOGIN_OTP), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_LOGIN_PCBANG", sizeof(struct PACKET_CA_LOGIN_PCBANG), SERVER_TYPE_LOGIN },
+ { "PACKET_CA_SSO_LOGIN_REQ", sizeof(struct PACKET_CA_SSO_LOGIN_REQ), SERVER_TYPE_LOGIN },
+ #else
+ #define LOGIN_PACKETS_CA_STRUCT_H
+ #endif // LOGIN_PACKETS_CA_STRUCT_H
#ifdef MAP_ACHIEVEMENT_H
{ "achievement_data", sizeof(struct achievement_data), SERVER_TYPE_MAP },
{ "achievement_interface", sizeof(struct achievement_interface), SERVER_TYPE_MAP },
@@ -450,12 +459,13 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#endif // MAP_CLAN_H
#ifdef MAP_CLIF_H
{ "attendance_entry", sizeof(struct attendance_entry), SERVER_TYPE_MAP },
+ { "barter_itemlist_entry", sizeof(struct barter_itemlist_entry), SERVER_TYPE_MAP },
+ { "barteritemlist", sizeof(struct barteritemlist), SERVER_TYPE_MAP },
{ "cdelayed_damage", sizeof(struct cdelayed_damage), SERVER_TYPE_MAP },
{ "clif_interface", sizeof(struct clif_interface), SERVER_TYPE_MAP },
{ "hCSData", sizeof(struct hCSData), SERVER_TYPE_MAP },
{ "merge_item", sizeof(struct merge_item), SERVER_TYPE_MAP },
{ "s_packet_db", sizeof(struct s_packet_db), SERVER_TYPE_MAP },
- { "stylist_data_entry", sizeof(struct stylist_data_entry), SERVER_TYPE_MAP },
#else
#define MAP_CLIF_H
#endif // MAP_CLIF_H
@@ -561,9 +571,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "mapcell", sizeof(struct mapcell), SERVER_TYPE_MAP },
{ "mapflag_skill_adjust", sizeof(struct mapflag_skill_adjust), SERVER_TYPE_MAP },
{ "mapit_interface", sizeof(struct mapit_interface), SERVER_TYPE_MAP },
- { "questinfo", sizeof(struct questinfo), SERVER_TYPE_MAP },
- { "questinfo_itemreq", sizeof(struct questinfo_itemreq), SERVER_TYPE_MAP },
- { "questinfo_qreq", sizeof(struct questinfo_qreq), SERVER_TYPE_MAP },
{ "spawn_data", sizeof(struct spawn_data), SERVER_TYPE_MAP },
#else
#define MAP_MAP_H
@@ -581,8 +588,12 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "mob_chat", sizeof(struct mob_chat), SERVER_TYPE_MAP },
{ "mob_data", sizeof(struct mob_data), SERVER_TYPE_MAP },
{ "mob_db", sizeof(struct mob_db), SERVER_TYPE_MAP },
+ { "mob_drop", sizeof(struct mob_drop), SERVER_TYPE_MAP },
{ "mob_interface", sizeof(struct mob_interface), SERVER_TYPE_MAP },
{ "mob_skill", sizeof(struct mob_skill), SERVER_TYPE_MAP },
+ { "optdrop_group", sizeof(struct optdrop_group), SERVER_TYPE_MAP },
+ { "optdrop_group_option", sizeof(struct optdrop_group_option), SERVER_TYPE_MAP },
+ { "optdrop_group_optslot", sizeof(struct optdrop_group_optslot), SERVER_TYPE_MAP },
{ "spawn_info", sizeof(struct spawn_info), SERVER_TYPE_MAP },
#else
#define MAP_MOB_H
@@ -614,6 +625,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "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_PARTY_CONFIG", sizeof(struct PACKET_CZ_PARTY_CONFIG), 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 },
{ "PACKET_CZ_PC_PURCHASE_ITEMLIST", sizeof(struct PACKET_CZ_PC_PURCHASE_ITEMLIST), SERVER_TYPE_MAP },
@@ -631,6 +643,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_CZ_REQ_OPEN_WRITE_MAIL", sizeof(struct PACKET_CZ_REQ_OPEN_WRITE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_READ_MAIL", sizeof(struct PACKET_CZ_REQ_READ_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_REFRESH_MAIL_LIST", sizeof(struct PACKET_CZ_REQ_REFRESH_MAIL_LIST), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQ_REMAINTIME", sizeof(struct PACKET_CZ_REQ_REMAINTIME), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_REMOVE_ITEM_MAIL", sizeof(struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_STYLE_CHANGE", sizeof(struct PACKET_CZ_REQ_STYLE_CHANGE), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_STYLE_CHANGE2", sizeof(struct PACKET_CZ_REQ_STYLE_CHANGE2), SERVER_TYPE_MAP },
@@ -655,6 +668,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_ACK_OPEN_WRITE_MAIL", sizeof(struct PACKET_ZC_ACK_OPEN_WRITE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REMOVE_ITEM_MAIL", sizeof(struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REQMAKINGITEM", sizeof(struct PACKET_ZC_ACK_REQMAKINGITEM), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_REQNAME_TITLE", sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_REQNAMEALL", sizeof(struct PACKET_ZC_ACK_REQNAMEALL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_SCHEDULER_CASHITEM", sizeof(struct PACKET_ZC_ACK_SCHEDULER_CASHITEM), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub", sizeof(struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_TOUSESKILL", sizeof(struct PACKET_ZC_ACK_TOUSESKILL), SERVER_TYPE_MAP },
@@ -665,13 +680,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_ZC_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ADD_ITEM_TO_STORE", sizeof(struct PACKET_ZC_ADD_ITEM_TO_STORE), SERVER_TYPE_MAP },
{ "PACKET_ZC_ADD_MEMBER_TO_GROUP", sizeof(struct PACKET_ZC_ADD_MEMBER_TO_GROUP), SERVER_TYPE_MAP },
- { "PACKET_ZC_AUTOSPELLLIST1", sizeof(struct PACKET_ZC_AUTOSPELLLIST1), SERVER_TYPE_MAP },
- { "PACKET_ZC_AUTOSPELLLIST2", sizeof(struct PACKET_ZC_AUTOSPELLLIST2), SERVER_TYPE_MAP },
- { "PACKET_ZC_CAMERA_INFO", sizeof(struct PACKET_ZC_CAMERA_INFO), SERVER_TYPE_MAP },
+ { "PACKET_ZC_BAN_LIST", sizeof(struct PACKET_ZC_BAN_LIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_BAN_LIST_sub", sizeof(struct PACKET_ZC_BAN_LIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_CASH_ITEM_DELETE", sizeof(struct PACKET_ZC_CASH_ITEM_DELETE), SERVER_TYPE_MAP },
{ "PACKET_ZC_CASH_TIME_COUNTER", sizeof(struct PACKET_ZC_CASH_TIME_COUNTER), SERVER_TYPE_MAP },
{ "PACKET_ZC_CHECKNAME", sizeof(struct PACKET_ZC_CHECKNAME), SERVER_TYPE_MAP },
- { "PACKET_ZC_CLANINFO", sizeof(struct PACKET_ZC_CLANINFO), SERVER_TYPE_MAP },
{ "PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER", sizeof(struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER), SERVER_TYPE_MAP },
{ "PACKET_ZC_FEED_MER", sizeof(struct PACKET_ZC_FEED_MER), SERVER_TYPE_MAP },
{ "PACKET_ZC_FEED_PET", sizeof(struct PACKET_ZC_FEED_PET), SERVER_TYPE_MAP },
@@ -713,11 +726,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_PC_PURCHASE_MYITEMLIST", sizeof(struct PACKET_ZC_PC_PURCHASE_MYITEMLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub", sizeof(struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE", sizeof(struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE), SERVER_TYPE_MAP },
- { "PACKET_ZC_PROPERTY_HOMUN", sizeof(struct PACKET_ZC_PROPERTY_HOMUN), SERVER_TYPE_MAP },
{ "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_REMOVE_EFFECT", sizeof(struct PACKET_ZC_REMOVE_EFFECT), SERVER_TYPE_MAP },
{ "PACKET_ZC_REPAIRITEMLIST", sizeof(struct PACKET_ZC_REPAIRITEMLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_REPAIRITEMLIST_sub", sizeof(struct PACKET_ZC_REPAIRITEMLIST_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ROLE_CHANGE", sizeof(struct PACKET_ZC_ROLE_CHANGE), SERVER_TYPE_MAP },
{ "PACKET_ZC_SEARCH_STORE_INFO_ACK", sizeof(struct PACKET_ZC_SEARCH_STORE_INFO_ACK), SERVER_TYPE_MAP },
{ "PACKET_ZC_SEARCH_STORE_INFO_ACK_sub", sizeof(struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_SKILL_SCALE", sizeof(struct PACKET_ZC_SKILL_SCALE), SERVER_TYPE_MAP },
@@ -765,7 +778,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "packet_equipitem_ack", sizeof(struct packet_equipitem_ack), SERVER_TYPE_MAP },
{ "packet_gm_monster_item", sizeof(struct packet_gm_monster_item), SERVER_TYPE_MAP },
{ "packet_graffiti_entry", sizeof(struct packet_graffiti_entry), SERVER_TYPE_MAP },
- { "packet_hotkey", sizeof(struct packet_hotkey), SERVER_TYPE_MAP },
{ "packet_idle_unit", sizeof(struct packet_idle_unit), SERVER_TYPE_MAP },
{ "packet_idle_unit2", sizeof(struct packet_idle_unit2), SERVER_TYPE_MAP },
{ "packet_item_drop_announce", sizeof(struct packet_item_drop_announce), SERVER_TYPE_MAP },
@@ -775,7 +787,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "packet_mission_info_sub", sizeof(struct packet_mission_info_sub), SERVER_TYPE_MAP },
{ "packet_monster_hp", sizeof(struct packet_monster_hp), SERVER_TYPE_MAP },
{ "packet_notify_bounditem", sizeof(struct packet_notify_bounditem), SERVER_TYPE_MAP },
- { "packet_npc_market_open", sizeof(struct packet_npc_market_open), SERVER_TYPE_MAP },
{ "packet_npc_market_purchase", sizeof(struct packet_npc_market_purchase), SERVER_TYPE_MAP },
{ "packet_npc_market_result_ack", sizeof(struct packet_npc_market_result_ack), SERVER_TYPE_MAP },
{ "packet_package_item_announce", sizeof(struct packet_package_item_announce), SERVER_TYPE_MAP },
@@ -789,7 +800,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "packet_quest_update_header", sizeof(struct packet_quest_update_header), SERVER_TYPE_MAP },
{ "packet_quest_update_hunt", sizeof(struct packet_quest_update_hunt), SERVER_TYPE_MAP },
{ "packet_reqname_ack", sizeof(struct packet_reqname_ack), SERVER_TYPE_MAP },
- { "packet_reqnameall_ack", sizeof(struct packet_reqnameall_ack), SERVER_TYPE_MAP },
{ "packet_roulette_close_ack", sizeof(struct packet_roulette_close_ack), SERVER_TYPE_MAP },
{ "packet_roulette_generate_ack", sizeof(struct packet_roulette_generate_ack), SERVER_TYPE_MAP },
{ "packet_roulette_info_ack", sizeof(struct packet_roulette_info_ack), SERVER_TYPE_MAP },
@@ -875,9 +885,25 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "quest_dropitem", sizeof(struct quest_dropitem), SERVER_TYPE_MAP },
{ "quest_interface", sizeof(struct quest_interface), SERVER_TYPE_MAP },
{ "quest_objective", sizeof(struct quest_objective), SERVER_TYPE_MAP },
+ { "questinfo", sizeof(struct questinfo), SERVER_TYPE_MAP },
+ { "questinfo_itemreq", sizeof(struct questinfo_itemreq), SERVER_TYPE_MAP },
+ { "questinfo_qreq", sizeof(struct questinfo_qreq), SERVER_TYPE_MAP },
#else
#define MAP_QUEST_H
#endif // MAP_QUEST_H
+ #ifdef MAP_REFINE_H
+ { "refine_interface", sizeof(struct refine_interface), SERVER_TYPE_MAP },
+ { "s_refine_requirement", sizeof(struct s_refine_requirement), SERVER_TYPE_MAP },
+ #else
+ #define MAP_REFINE_H
+ #endif // MAP_REFINE_H
+ #ifdef MAP_REFINE_P_H
+ { "refine_interface_dbs", sizeof(struct refine_interface_dbs), SERVER_TYPE_MAP },
+ { "refine_interface_private", sizeof(struct refine_interface_private), SERVER_TYPE_MAP },
+ { "s_refine_info", sizeof(struct s_refine_info), SERVER_TYPE_MAP },
+ #else
+ #define MAP_REFINE_P_H
+ #endif // MAP_REFINE_P_H
#ifdef MAP_RODEX_H
{ "rodex_interface", sizeof(struct rodex_interface), SERVER_TYPE_MAP },
#else
@@ -940,7 +966,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef MAP_STATUS_H
{ "regen_data", sizeof(struct regen_data), SERVER_TYPE_MAP },
{ "regen_data_sub", sizeof(struct regen_data_sub), SERVER_TYPE_MAP },
- { "s_refine_info", sizeof(struct s_refine_info), SERVER_TYPE_MAP },
{ "s_status_dbs", sizeof(struct s_status_dbs), SERVER_TYPE_MAP },
{ "sc_display_entry", sizeof(struct sc_display_entry), SERVER_TYPE_MAP },
{ "status_change", sizeof(struct status_change), SERVER_TYPE_MAP },
@@ -957,6 +982,12 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define MAP_STORAGE_H
#endif // MAP_STORAGE_H
+ #ifdef MAP_STYLIST_H
+ { "stylist_data_entry", sizeof(struct stylist_data_entry), SERVER_TYPE_MAP },
+ { "stylist_interface", sizeof(struct stylist_interface), SERVER_TYPE_MAP },
+ #else
+ #define MAP_STYLIST_H
+ #endif // MAP_STYLIST_H
#ifdef MAP_TRADE_H
{ "trade_interface", sizeof(struct trade_interface), SERVER_TYPE_MAP },
#else
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
index 146379508..f92899114 100644
--- a/src/common/HPMSymbols.inc.h
+++ b/src/common/HPMSymbols.inc.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -245,6 +245,9 @@ struct pincode_interface *pincode;
#ifdef MAP_QUEST_H /* quest */
struct quest_interface *quest;
#endif // MAP_QUEST_H
+#ifdef MAP_REFINE_H /* refine */
+struct refine_interface *refine;
+#endif // MAP_REFINE_H
#ifdef COMMON_RANDOM_H /* rnd */
struct rnd_interface *rnd;
#endif // COMMON_RANDOM_H
@@ -281,6 +284,9 @@ struct stringbuf_interface *StrBuf;
#ifdef COMMON_STRLIB_H /* strlib */
struct strlib_interface *strlib;
#endif // COMMON_STRLIB_H
+#ifdef MAP_STYLIST_H /* stylist */
+struct stylist_interface *stylist;
+#endif // MAP_STYLIST_H
#ifdef COMMON_STRLIB_H /* sv */
struct sv_interface *sv;
#endif // COMMON_STRLIB_H
@@ -598,6 +604,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("quest", quest))
return "quest";
#endif // MAP_QUEST_H
+#ifdef MAP_REFINE_H /* refine */
+ if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("refine", refine))
+ return "refine";
+#endif // MAP_REFINE_H
#ifdef COMMON_RANDOM_H /* rnd */
if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("rnd", rnd))
return "rnd";
@@ -646,6 +656,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("strlib", strlib))
return "strlib";
#endif // COMMON_STRLIB_H
+#ifdef MAP_STYLIST_H /* stylist */
+ if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("stylist", stylist))
+ return "stylist";
+#endif // MAP_STYLIST_H
#ifdef COMMON_STRLIB_H /* sv */
if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("sv", sv))
return "sv";
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 9bcf82cc7..b58a70ae9 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -134,22 +134,33 @@
// Comment the following line to disable sc_data saving. [Skotlex]
#define ENABLE_SC_SAVING
-#if PACKETVER >= 20070227
+#if PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628 || defined(PACKETVER_ZERO)
// Comment the following like to disable server-side hot-key saving support. [Skotlex]
// Note that newer clients no longer save hotkeys in the registry!
#define HOTKEY_SAVING
-#if PACKETVER < 20090603
- // (27 = 9 skills x 3 bars) (0x02b9,191)
- #define MAX_HOTKEYS 27
-#elif PACKETVER < 20090617
- // (36 = 9 skills x 4 bars) (0x07d9,254)
- #define MAX_HOTKEYS 36
-#else // >= 20090617
- // (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268)
- #define MAX_HOTKEYS 38
-#endif // 20090603
-#endif // 20070227
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#define MAX_HOTKEYS 38
+#elif PACKETVER_MAIN_NUM >= 20141022 || PACKETVER_RE_NUM >= 20141015 || defined(PACKETVER_ZERO)
+// (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268)
+#define MAX_HOTKEYS 38
+#elif PACKETVER_MAIN_NUM >= 20090617 || PACKETVER_RE_NUM >= 20090617 || PACKETVER_SAK_NUM >= 20090617
+// (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268)
+#define MAX_HOTKEYS 38
+#elif PACKETVER_MAIN_NUM >= 20090603 || PACKETVER_RE_NUM >= 20090603 || PACKETVER_SAK_NUM >= 20090603
+// (36 = 9 skills x 4 bars) (0x07d9,254)
+#define MAX_HOTKEYS 36
+#elif PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628
+// (27 = 9 skills x 3 bars) (0x02b9,191)
+#define MAX_HOTKEYS 27
+#endif
+#endif // PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628 || defined(PACKETVER_ZERO)
+
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#define MAX_HOTKEYS_DB ((MAX_HOTKEYS) * 2)
+#else
+#define MAX_HOTKEYS_DB MAX_HOTKEYS
+#endif
#if PACKETVER >= 20150805 /* Cart Decoration */
#define CART_DECORATION
@@ -165,7 +176,22 @@
#endif
#define MAX_CARTS (MAX_BASE_CARTS + MAX_CARTDECORATION_CARTS)
+#ifndef MAX_INVENTORY
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+#define MAX_INVENTORY 200
+#else
#define MAX_INVENTORY 100
+#endif // PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+#endif // MAX_INVENTORY
+
+#ifndef FIXED_INVENTORY_SIZE
+#define FIXED_INVENTORY_SIZE 100
+#endif
+
+#if FIXED_INVENTORY_SIZE > MAX_INVENTORY
+#error FIXED_INVENTORY_SIZE must be same or smaller than MAX_INVENTORY
+#endif
+
//Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well.
#if PACKETVER >= 20100413
#ifndef MAX_CHARS
@@ -472,6 +498,7 @@ enum e_mmo_charstatus_opt {
OPT_NONE = 0x0,
OPT_SHOW_EQUIP = 0x1,
OPT_ALLOW_PARTY = 0x2,
+ OPT_ALLOW_CALL = 0x4,
};
enum e_item_bound_type {
@@ -575,7 +602,7 @@ struct s_pet {
int account_id;
int char_id;
int pet_id;
- short class_;
+ int class_;
short level;
int egg_id;//pet egg id
int equip;//pet equip name_id
@@ -591,8 +618,8 @@ struct s_homunculus { //[orn]
char name[NAME_LENGTH];
int hom_id;
int char_id;
- short class_;
- short prev_class;
+ int class_;
+ int prev_class;
int hp,max_hp,sp,max_sp;
unsigned int intimacy;
short hunger;
@@ -623,7 +650,7 @@ struct s_homunculus { //[orn]
struct s_mercenary {
int mercenary_id;
int char_id;
- short class_;
+ int class_;
int hp, sp;
unsigned int kill_count;
unsigned int life_time;
@@ -632,7 +659,7 @@ struct s_mercenary {
struct s_elemental {
int elemental_id;
int char_id;
- short class_;
+ int class_;
uint32 mode;
int hp, sp, max_hp, max_sp, matk, atk, atk2;
short hit, flee, amotion, def, mdef;
@@ -675,7 +702,7 @@ struct mmo_charstatus {
int zeny;
int bank_vault;
- int16 class;
+ int class;
int status_point, skill_point;
int hp,max_hp,sp,max_sp;
unsigned int option;
@@ -710,14 +737,17 @@ struct mmo_charstatus {
int64 last_login;
struct point last_point,save_point,memo_point[MAX_MEMOPOINTS];
+ int inventorySize;
struct item inventory[MAX_INVENTORY],cart[MAX_CART];
struct s_skill skill[MAX_SKILL_DB];
struct s_friend friends[MAX_FRIENDS]; //New friend system [Skotlex]
#ifdef HOTKEY_SAVING
- struct hotkey hotkeys[MAX_HOTKEYS];
+ struct hotkey hotkeys[MAX_HOTKEYS_DB];
#endif
- bool show_equip, allow_party;
+ bool show_equip;
+ bool allow_party;
+ bool allow_call;
unsigned short rename;
unsigned short slotchange;
@@ -734,6 +764,7 @@ struct mmo_charstatus {
short attendance_count;
unsigned char hotkey_rowshift;
+ unsigned char hotkey_rowshift2;
int32 title_id; // Achievement Title[Dastgir/Hercules]
};
@@ -789,7 +820,7 @@ struct party_member {
int account_id;
int char_id;
char name[NAME_LENGTH];
- int16 class;
+ int class;
unsigned short map;
unsigned short lv;
unsigned leader : 1,
@@ -809,7 +840,7 @@ struct map_session_data;
struct guild_member {
int account_id, char_id;
short hair,hair_color,gender;
- int16 class;
+ int class;
short lv;
uint64 exp;
int exp_payper;
@@ -837,6 +868,7 @@ struct guild_expulsion {
char name[NAME_LENGTH];
char mes[40];
int account_id;
+ int char_id;
};
struct guild_skill {
@@ -959,6 +991,11 @@ enum fame_list_type {
RANKTYPE_PK = 3, //Not supported yet
};
+struct rodex_item {
+ struct item item;
+ int idx;
+};
+
struct rodex_message {
int64 id;
int sender_id;
@@ -968,10 +1005,7 @@ struct rodex_message {
char receiver_name[NAME_LENGTH];
char title[RODEX_TITLE_LENGTH];
char body[RODEX_BODY_LENGTH];
- struct {
- struct item item;
- int idx;
- } items[RODEX_MAX_ITEM];
+ struct rodex_item items[RODEX_MAX_ITEM];
int64 zeny;
uint8 type;
int8 opentype;
@@ -1344,6 +1378,10 @@ enum questinfo_type {
#define MAX_ITEMLIST MAX_STORAGE
#endif
+#ifndef MAX_REFINE_REQUIREMENTS
+ #define MAX_REFINE_REQUIREMENTS 4
+#endif
+
// sanity checks...
#if MAX_ZENY > INT_MAX
#error MAX_ZENY is too big
@@ -1357,4 +1395,8 @@ enum questinfo_type {
#error MAX_SKILL has been replaced by MAX_SKILL_DB. Please update your custom definitions.
#endif
+#if MAX_REFINE_REQUIREMENTS > 4
+#error MAX_REFINE_REQUIREMENTS is bigger than allowed, this is a hardcoded limit in the client
+#endif
+
#endif /* COMMON_MMO_H */
diff --git a/src/common/packets/packets2003_len_main.h b/src/common/packets/packets2003_len_main.h
index b7cc202ab..a4ff38e18 100644
--- a/src/common/packets/packets2003_len_main.h
+++ b/src/common/packets/packets2003_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2003_len_sak.h b/src/common/packets/packets2003_len_sak.h
index 90139e98c..9f393b8cf 100644
--- a/src/common/packets/packets2003_len_sak.h
+++ b/src/common/packets/packets2003_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2004_len_ad.h b/src/common/packets/packets2004_len_ad.h
index 40a5e83de..18ab6d9ee 100644
--- a/src/common/packets/packets2004_len_ad.h
+++ b/src/common/packets/packets2004_len_ad.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2004_len_main.h b/src/common/packets/packets2004_len_main.h
index 27ae05058..3963dd0a2 100644
--- a/src/common/packets/packets2004_len_main.h
+++ b/src/common/packets/packets2004_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2004_len_sak.h b/src/common/packets/packets2004_len_sak.h
index cbf87487e..71573c376 100644
--- a/src/common/packets/packets2004_len_sak.h
+++ b/src/common/packets/packets2004_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2005_len_ad.h b/src/common/packets/packets2005_len_ad.h
index e741928ec..fd428cef4 100644
--- a/src/common/packets/packets2005_len_ad.h
+++ b/src/common/packets/packets2005_len_ad.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2005_len_main.h b/src/common/packets/packets2005_len_main.h
index e7a06e509..bad35d459 100644
--- a/src/common/packets/packets2005_len_main.h
+++ b/src/common/packets/packets2005_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2005_len_sak.h b/src/common/packets/packets2005_len_sak.h
index 9e029766b..7684be048 100644
--- a/src/common/packets/packets2005_len_sak.h
+++ b/src/common/packets/packets2005_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2006_len_ad.h b/src/common/packets/packets2006_len_ad.h
index a7997e885..a8eef10d5 100644
--- a/src/common/packets/packets2006_len_ad.h
+++ b/src/common/packets/packets2006_len_ad.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2006_len_main.h b/src/common/packets/packets2006_len_main.h
index 4185bbe16..1b6debfd0 100644
--- a/src/common/packets/packets2006_len_main.h
+++ b/src/common/packets/packets2006_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2006_len_sak.h b/src/common/packets/packets2006_len_sak.h
index c158acf5b..8b48e1d1d 100644
--- a/src/common/packets/packets2006_len_sak.h
+++ b/src/common/packets/packets2006_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2007_len_ad.h b/src/common/packets/packets2007_len_ad.h
index f7c2a7e87..1d952b2da 100644
--- a/src/common/packets/packets2007_len_ad.h
+++ b/src/common/packets/packets2007_len_ad.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2007_len_main.h b/src/common/packets/packets2007_len_main.h
index 750ce6610..f7c5faaf0 100644
--- a/src/common/packets/packets2007_len_main.h
+++ b/src/common/packets/packets2007_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2007_len_sak.h b/src/common/packets/packets2007_len_sak.h
index 443613ef7..61bb5cd6d 100644
--- a/src/common/packets/packets2007_len_sak.h
+++ b/src/common/packets/packets2007_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2008_len_ad.h b/src/common/packets/packets2008_len_ad.h
index 0d0aaf186..82679ec63 100644
--- a/src/common/packets/packets2008_len_ad.h
+++ b/src/common/packets/packets2008_len_ad.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2008_len_main.h b/src/common/packets/packets2008_len_main.h
index 1d6f253b3..4eafe5e89 100644
--- a/src/common/packets/packets2008_len_main.h
+++ b/src/common/packets/packets2008_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2008_len_re.h b/src/common/packets/packets2008_len_re.h
index 1068cd5f7..37ee848eb 100644
--- a/src/common/packets/packets2008_len_re.h
+++ b/src/common/packets/packets2008_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2008_len_sak.h b/src/common/packets/packets2008_len_sak.h
index 431f68506..cf20cf753 100644
--- a/src/common/packets/packets2008_len_sak.h
+++ b/src/common/packets/packets2008_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2009_len_main.h b/src/common/packets/packets2009_len_main.h
index 82909b874..de9919468 100644
--- a/src/common/packets/packets2009_len_main.h
+++ b/src/common/packets/packets2009_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2009_len_re.h b/src/common/packets/packets2009_len_re.h
index 2b864d38d..4cd76c5ca 100644
--- a/src/common/packets/packets2009_len_re.h
+++ b/src/common/packets/packets2009_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2009_len_sak.h b/src/common/packets/packets2009_len_sak.h
index f65433c1a..f732fddea 100644
--- a/src/common/packets/packets2009_len_sak.h
+++ b/src/common/packets/packets2009_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2010_len_main.h b/src/common/packets/packets2010_len_main.h
index 017c4d98b..32424bac8 100644
--- a/src/common/packets/packets2010_len_main.h
+++ b/src/common/packets/packets2010_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2010_len_re.h b/src/common/packets/packets2010_len_re.h
index 1788a9479..ef683fc04 100644
--- a/src/common/packets/packets2010_len_re.h
+++ b/src/common/packets/packets2010_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2011_len_main.h b/src/common/packets/packets2011_len_main.h
index f586ba54a..2728aeb61 100644
--- a/src/common/packets/packets2011_len_main.h
+++ b/src/common/packets/packets2011_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2011_len_re.h b/src/common/packets/packets2011_len_re.h
index c01af0123..58e647cac 100644
--- a/src/common/packets/packets2011_len_re.h
+++ b/src/common/packets/packets2011_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2012_len_main.h b/src/common/packets/packets2012_len_main.h
index 248eb77ec..7784ee39a 100644
--- a/src/common/packets/packets2012_len_main.h
+++ b/src/common/packets/packets2012_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2012_len_re.h b/src/common/packets/packets2012_len_re.h
index 3273a85f9..58a8eadf8 100644
--- a/src/common/packets/packets2012_len_re.h
+++ b/src/common/packets/packets2012_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2013_len_main.h b/src/common/packets/packets2013_len_main.h
index c2c7711e9..f7a60ade9 100644
--- a/src/common/packets/packets2013_len_main.h
+++ b/src/common/packets/packets2013_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2013_len_re.h b/src/common/packets/packets2013_len_re.h
index 6f3714e0f..2c7951f7b 100644
--- a/src/common/packets/packets2013_len_re.h
+++ b/src/common/packets/packets2013_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2014_len_main.h b/src/common/packets/packets2014_len_main.h
index 3faede09f..b58979cb7 100644
--- a/src/common/packets/packets2014_len_main.h
+++ b/src/common/packets/packets2014_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2014_len_re.h b/src/common/packets/packets2014_len_re.h
index 016aae42d..e71f4e975 100644
--- a/src/common/packets/packets2014_len_re.h
+++ b/src/common/packets/packets2014_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2015_len_main.h b/src/common/packets/packets2015_len_main.h
index dfc2caeb2..3144d5250 100644
--- a/src/common/packets/packets2015_len_main.h
+++ b/src/common/packets/packets2015_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2015_len_re.h b/src/common/packets/packets2015_len_re.h
index 16db2c94e..bd65d3eea 100644
--- a/src/common/packets/packets2015_len_re.h
+++ b/src/common/packets/packets2015_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2016_len_main.h b/src/common/packets/packets2016_len_main.h
index 09b8e153f..7625e55e9 100644
--- a/src/common/packets/packets2016_len_main.h
+++ b/src/common/packets/packets2016_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2016_len_re.h b/src/common/packets/packets2016_len_re.h
index 76c752edc..2a665f3f5 100644
--- a/src/common/packets/packets2016_len_re.h
+++ b/src/common/packets/packets2016_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets2017_len_main.h b/src/common/packets/packets2017_len_main.h
index 80fd4539e..ceca3d781 100644
--- a/src/common/packets/packets2017_len_main.h
+++ b/src/common/packets/packets2017_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8954,7 +8954,7 @@ packetLen(0x0acf, 52) // CA_LOGIN_OTP
// Packet: 0x0ad0
#if PACKETVER >= 20170614
-packetLen(0x0ad0, 11)
+packetLen(0x0ad0, 11) // CA_OTP_CODE
#endif
// Packet: 0x0ad1
diff --git a/src/common/packets/packets2017_len_re.h b/src/common/packets/packets2017_len_re.h
index 33c7d5354..17751f090 100644
--- a/src/common/packets/packets2017_len_re.h
+++ b/src/common/packets/packets2017_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -8960,7 +8960,7 @@ packetLen(0x0acf, 52) // CA_LOGIN_OTP
// Packet: 0x0ad0
#if PACKETVER >= 20170614
-packetLen(0x0ad0, 11)
+packetLen(0x0ad0, 11) // CA_OTP_CODE
#endif
// Packet: 0x0ad1
diff --git a/src/common/packets/packets2017_len_zero.h b/src/common/packets/packets2017_len_zero.h
index 18427b766..910de7ca9 100644
--- a/src/common/packets/packets2017_len_zero.h
+++ b/src/common/packets/packets2017_len_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -5259,7 +5259,7 @@ packetLen(0x0acf, 64) // CA_LOGIN_OTP
#endif
// Packet: 0x0ad0
-packetLen(0x0ad0, 11)
+packetLen(0x0ad0, 11) // CA_OTP_CODE
// Packet: 0x0ad1
packetLen(0x0ad1, -1)
diff --git a/src/common/packets/packets2018_len_main.h b/src/common/packets/packets2018_len_main.h
index 095f1a5ab..c7f4c0972 100644
--- a/src/common/packets/packets2018_len_main.h
+++ b/src/common/packets/packets2018_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -193,16 +193,28 @@ packetLen(0x009b, 34) // CZ_CHANGE_DIRECTION
packetLen(0x009c, 9) // ZC_CHANGE_DIRECTION
// Packet: 0x009d
+#if PACKETVER >= 20181121
+packetLen(0x009d, 19) // ZC_ITEM_ENTRY
+#elif PACKETVER >= 20180103
packetLen(0x009d, 17) // ZC_ITEM_ENTRY
+#endif
// Packet: 0x009e
+#if PACKETVER >= 20181121
+packetLen(0x009e, 19) // ZC_ITEM_FALL_ENTRY
+#elif PACKETVER >= 20180103
packetLen(0x009e, 17) // ZC_ITEM_FALL_ENTRY
+#endif
// Packet: 0x009f
packetLen(0x009f, 20) // CZ_ITEM_PICKUP
// Packet: 0x00a0
+#if PACKETVER >= 20181121
+packetLen(0x00a0, 33) // ZC_ITEM_PICKUP_ACK
+#elif PACKETVER >= 20180103
packetLen(0x00a0, 23) // ZC_ITEM_PICKUP_ACK
+#endif
// Packet: 0x00a1
packetLen(0x00a1, 6) // ZC_ITEM_DISAPPEAR
@@ -418,7 +430,11 @@ packetLen(0x00e7, 3) // ZC_ACK_EXCHANGE_ITEM
packetLen(0x00e8, 8) // CZ_ADD_EXCHANGE_ITEM
// Packet: 0x00e9
+#if PACKETVER >= 20181121
+packetLen(0x00e9, 29) // ZC_ADD_EXCHANGE_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x00e9, 19) // ZC_ADD_EXCHANGE_ITEM
+#endif
// Packet: 0x00ea
packetLen(0x00ea, 5) // ZC_ACK_ADD_EXCHANGE_ITEM
@@ -451,7 +467,11 @@ packetLen(0x00f2, 6) // ZC_NOTIFY_STOREITEM_COUNTINFO
packetLen(0x00f3, -1) // CZ_REQUEST_CHAT
// Packet: 0x00f4
+#if PACKETVER >= 20181121
+packetLen(0x00f4, 31) // ZC_ADD_ITEM_TO_STORE
+#elif PACKETVER >= 20180103
packetLen(0x00f4, 21) // ZC_ADD_ITEM_TO_STORE
+#endif
// Packet: 0x00f5
packetLen(0x00f5, 11) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY
@@ -517,7 +537,11 @@ packetLen(0x0108, -1) // CZ_REQUEST_CHAT_PARTY
packetLen(0x0109, -1) // ZC_NOTIFY_CHAT_PARTY
// Packet: 0x010a
+#if PACKETVER >= 20181121
+packetLen(0x010a, 6) // ZC_MVP_GETTING_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x010a, 4) // ZC_MVP_GETTING_ITEM
+#endif
// Packet: 0x010b
packetLen(0x010b, 6) // ZC_MVP_GETTING_SPECIAL_EXP
@@ -535,7 +559,11 @@ packetLen(0x010e, 11) // ZC_SKILLINFO_UPDATE
packetLen(0x010f, -1) // ZC_SKILLINFO_LIST
// Packet: 0x0110
+#if PACKETVER >= 20181121
+packetLen(0x0110, 14) // ZC_ACK_TOUSESKILL
+#elif PACKETVER >= 20180103
packetLen(0x0110, 10) // ZC_ACK_TOUSESKILL
+#endif
// Packet: 0x0111
packetLen(0x0111, 39) // ZC_ADD_SKILL
@@ -595,7 +623,11 @@ packetLen(0x0122, -1) // ZC_CART_EQUIPMENT_ITEMLIST
packetLen(0x0123, -1) // ZC_CART_NORMAL_ITEMLIST
// Packet: 0x0124
+#if PACKETVER >= 20181121
+packetLen(0x0124, 31) // ZC_ADD_ITEM_TO_CART
+#elif PACKETVER >= 20180103
packetLen(0x0124, 21) // ZC_ADD_ITEM_TO_CART
+#endif
// Packet: 0x0125
packetLen(0x0125, 8) // ZC_DELETE_ITEM_FROM_CART
@@ -907,10 +939,18 @@ packetLen(0x018c, 29) // ZC_MONSTER_INFO
packetLen(0x018d, -1) // ZC_MAKABLEITEMLIST
// Packet: 0x018e
+#if PACKETVER >= 20181121
+packetLen(0x018e, 18) // CZ_REQMAKINGITEM
+#elif PACKETVER >= 20180103
packetLen(0x018e, 10) // CZ_REQMAKINGITEM
+#endif
// Packet: 0x018f
+#if PACKETVER >= 20181121
+packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM
+#elif PACKETVER >= 20180103
packetLen(0x018f, 6) // ZC_ACK_REQMAKINGITEM
+#endif
// Packet: 0x0190
packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX
@@ -970,7 +1010,11 @@ packetLen(0x01a1, 3) // CZ_COMMAND_PET
packetLen(0x01a2, 37) // ZC_PROPERTY_PET
// Packet: 0x01a3
+#if PACKETVER >= 20181121
+packetLen(0x01a3, 7) // ZC_FEED_PET
+#elif PACKETVER >= 20180103
packetLen(0x01a3, 5) // ZC_FEED_PET
+#endif
// Packet: 0x01a4
packetLen(0x01a4, 11) // ZC_CHANGESTATE_PET
@@ -1003,7 +1047,11 @@ packetLen(0x01ac, 6) // ZC_SKILL_UPDATE
packetLen(0x01ad, -1) // ZC_MAKINGARROW_LIST
// Packet: 0x01ae
+#if PACKETVER >= 20181121
+packetLen(0x01ae, 6) // CZ_REQ_MAKINGARROW
+#elif PACKETVER >= 20180103
packetLen(0x01ae, 4) // CZ_REQ_MAKINGARROW
+#endif
// Packet: 0x01af
packetLen(0x01af, 4) // CZ_REQ_CHANGECART
@@ -1069,10 +1117,18 @@ packetLen(0x01c2, 10) // ZC_INFO_REMAINTIME
packetLen(0x01c3, -1) // ZC_BROADCAST2
// Packet: 0x01c4
+#if PACKETVER >= 20181121
+packetLen(0x01c4, 32) // ZC_ADD_ITEM_TO_STORE2
+#elif PACKETVER >= 20180103
packetLen(0x01c4, 22) // ZC_ADD_ITEM_TO_STORE2
+#endif
// Packet: 0x01c5
+#if PACKETVER >= 20181121
+packetLen(0x01c5, 32) // ZC_ADD_ITEM_TO_CART2
+#elif PACKETVER >= 20180103
packetLen(0x01c5, 22) // ZC_ADD_ITEM_TO_CART2
+#endif
// Packet: 0x01c6
packetLen(0x01c6, 4) // CS_REQ_ENCRYPTION
@@ -1081,7 +1137,11 @@ packetLen(0x01c6, 4) // CS_REQ_ENCRYPTION
packetLen(0x01c7, 2) // SC_ACK_ENCRYPTION
// Packet: 0x01c8
+#if PACKETVER >= 20181121
+packetLen(0x01c8, 15) // ZC_USE_ITEM_ACK2
+#elif PACKETVER >= 20180103
packetLen(0x01c8, 13) // ZC_USE_ITEM_ACK2
+#endif
// Packet: 0x01c9
packetLen(0x01c9, 97) // ZC_SKILL_ENTRY2
@@ -1126,16 +1186,32 @@ packetLen(0x01d5, -1) // CZ_INPUT_EDITDLGSTR
packetLen(0x01d6, 4) // ZC_NOTIFY_MAPPROPERTY2
// Packet: 0x01d7
+#if PACKETVER >= 20181121
+packetLen(0x01d7, 15) // ZC_SPRITE_CHANGE2
+#elif PACKETVER >= 20180103
packetLen(0x01d7, 11) // ZC_SPRITE_CHANGE2
+#endif
// Packet: 0x01d8
+#if PACKETVER >= 20181121
+packetLen(0x01d8, 58) // ZC_NOTIFY_STANDENTRY2
+#elif PACKETVER >= 20180103
packetLen(0x01d8, 54) // ZC_NOTIFY_STANDENTRY2
+#endif
// Packet: 0x01d9
+#if PACKETVER >= 20181121
+packetLen(0x01d9, 57) // ZC_NOTIFY_NEWENTRY2
+#elif PACKETVER >= 20180103
packetLen(0x01d9, 53) // ZC_NOTIFY_NEWENTRY2
+#endif
// Packet: 0x01da
+#if PACKETVER >= 20181121
+packetLen(0x01da, 64) // ZC_NOTIFY_MOVEENTRY2
+#elif PACKETVER >= 20180103
packetLen(0x01da, 60) // ZC_NOTIFY_MOVEENTRY2
+#endif
// Packet: 0x01db
packetLen(0x01db, 2) // CA_REQ_HASH
@@ -1240,7 +1316,11 @@ packetLen(0x01fb, 56) // CH_DELETE_CHAR2
packetLen(0x01fc, -1) // ZC_REPAIRITEMLIST
// Packet: 0x01fd
+#if PACKETVER >= 20181121
+packetLen(0x01fd, 25) // CZ_REQ_ITEMREPAIR
+#elif PACKETVER >= 20180103
packetLen(0x01fd, 15) // CZ_REQ_ITEMREPAIR
+#endif
// Packet: 0x01fe
packetLen(0x01fe, 5) // ZC_ACK_ITEMREPAIR
@@ -1355,7 +1435,11 @@ packetLen(0x0221, -1) // ZC_NOTIFY_WEAPONITEMLIST
packetLen(0x0222, 6) // CZ_REQ_WEAPONREFINE
// Packet: 0x0223
+#if PACKETVER >= 20181121
+packetLen(0x0223, 10) // ZC_ACK_WEAPONREFINE
+#elif PACKETVER >= 20180103
packetLen(0x0223, 8) // ZC_ACK_WEAPONREFINE
+#endif
// Packet: 0x0224
packetLen(0x0224, 10) // ZC_TAEKWON_POINT
@@ -1376,13 +1460,25 @@ packetLen(0x0228, 18) // CZ_ACK_GAME_GUARD
packetLen(0x0229, 15) // ZC_STATE_CHANGE3
// Packet: 0x022a
+#if PACKETVER >= 20181121
+packetLen(0x022a, 62) // ZC_NOTIFY_STANDENTRY3
+#elif PACKETVER >= 20180103
packetLen(0x022a, 58) // ZC_NOTIFY_STANDENTRY3
+#endif
// Packet: 0x022b
+#if PACKETVER >= 20181121
+packetLen(0x022b, 61) // ZC_NOTIFY_NEWENTRY3
+#elif PACKETVER >= 20180103
packetLen(0x022b, 57) // ZC_NOTIFY_NEWENTRY3
+#endif
// Packet: 0x022c
+#if PACKETVER >= 20181121
+packetLen(0x022c, 69) // ZC_NOTIFY_MOVEENTRY3
+#elif PACKETVER >= 20180103
packetLen(0x022c, 65) // ZC_NOTIFY_MOVEENTRY3
+#endif
// Packet: 0x022d
#if PACKETVER >= 20180315
@@ -1396,10 +1492,18 @@ packetLen(0x022d, 2) // CZ_COMMAND_MER
#endif
// Packet: 0x022e
+#if PACKETVER >= 20181121
+packetLen(0x022e, 73) // ZC_PROPERTY_HOMUN
+#elif PACKETVER >= 20180103
packetLen(0x022e, 71) // ZC_PROPERTY_HOMUN
+#endif
// Packet: 0x022f
+#if PACKETVER >= 20181121
+packetLen(0x022f, 7) // ZC_FEED_MER
+#elif PACKETVER >= 20180103
packetLen(0x022f, 5) // ZC_FEED_MER
+#endif
// Packet: 0x0230
packetLen(0x0230, 12) // ZC_CHANGESTATE_MER
@@ -1539,7 +1643,11 @@ packetLen(0x0259, 3) // AC_ACK_GAME_GUARD
packetLen(0x025a, -1) // ZC_MAKINGITEM_LIST
// Packet: 0x025b
+#if PACKETVER >= 20181121
+packetLen(0x025b, 8) // CZ_REQ_MAKINGITEM
+#elif PACKETVER >= 20180103
packetLen(0x025b, 6) // CZ_REQ_MAKINGITEM
+#endif
// Packet: 0x025c
packetLen(0x025c, 4) // CZ_AUCTION_REQ_MY_INFO
@@ -1735,13 +1843,25 @@ packetLen(0x0296, -1) // ZC_STORE_EQUIPMENT_ITEMLIST2
packetLen(0x0297, -1) // ZC_CART_EQUIPMENT_ITEMLIST2
// Packet: 0x0298
+#if PACKETVER >= 20181121
+packetLen(0x0298, 10) // ZC_CASH_TIME_COUNTER
+#elif PACKETVER >= 20180103
packetLen(0x0298, 8) // ZC_CASH_TIME_COUNTER
+#endif
// Packet: 0x0299
+#if PACKETVER >= 20181121
+packetLen(0x0299, 8) // ZC_CASH_ITEM_DELETE
+#elif PACKETVER >= 20180103
packetLen(0x0299, 6) // ZC_CASH_ITEM_DELETE
+#endif
// Packet: 0x029a
+#if PACKETVER >= 20181121
+packetLen(0x029a, 37) // ZC_ITEM_PICKUP_ACK2
+#elif PACKETVER >= 20180103
packetLen(0x029a, 27) // ZC_ITEM_PICKUP_ACK2
+#endif
// Packet: 0x029b
packetLen(0x029b, 80) // ZC_MER_INIT
@@ -1807,7 +1927,11 @@ packetLen(0x02b6, 7) // CZ_ACTIVE_QUEST
packetLen(0x02b7, 7) // ZC_ACTIVE_QUEST
// Packet: 0x02b8
+#if PACKETVER >= 20181121
+packetLen(0x02b8, 32) // ZC_ITEM_PICKUP_PARTY
+#elif PACKETVER >= 20180103
packetLen(0x02b8, 22) // ZC_ITEM_PICKUP_PARTY
+#endif
// Packet: 0x02b9
packetLen(0x02b9, 191) // ZC_SHORTCUT_KEY_LIST
@@ -1882,7 +2006,11 @@ packetLen(0x02d2, -1) // ZC_CART_EQUIPMENT_ITEMLIST3
packetLen(0x02d3, 4) // ZC_NOTIFY_BIND_ON_EQUIP
// Packet: 0x02d4
+#if PACKETVER >= 20181121
+packetLen(0x02d4, 39) // ZC_ITEM_PICKUP_ACK3
+#elif PACKETVER >= 20180103
packetLen(0x02d4, 29) // ZC_ITEM_PICKUP_ACK3
+#endif
// Packet: 0x02d5
packetLen(0x02d5, 2) // ZC_ISVR_DISCONNECT
@@ -1954,13 +2082,25 @@ packetLen(0x02ea, -1) // ZC_STORE_NORMAL_ITEMLIST3
packetLen(0x02eb, 13) // ZC_ACCEPT_ENTER2
// Packet: 0x02ec
+#if PACKETVER >= 20181121
+packetLen(0x02ec, 71) // ZC_NOTIFY_MOVEENTRY4
+#elif PACKETVER >= 20180103
packetLen(0x02ec, 67) // ZC_NOTIFY_MOVEENTRY4
+#endif
// Packet: 0x02ed
+#if PACKETVER >= 20181121
+packetLen(0x02ed, 63) // ZC_NOTIFY_NEWENTRY4
+#elif PACKETVER >= 20180103
packetLen(0x02ed, 59) // ZC_NOTIFY_NEWENTRY4
+#endif
// Packet: 0x02ee
+#if PACKETVER >= 20181121
+packetLen(0x02ee, 64) // ZC_NOTIFY_STANDENTRY4
+#elif PACKETVER >= 20180103
packetLen(0x02ee, 60) // ZC_NOTIFY_STANDENTRY4
+#endif
// Packet: 0x02ef
packetLen(0x02ef, 8) // ZC_NOTIFY_FONT
@@ -2223,7 +2363,11 @@ packetLen(0x0443, 8) // CZ_SKILL_SELECT_RESPONSE
packetLen(0x0444, -1) // ZC_SIMPLE_CASH_POINT_ITEMLIST
// Packet: 0x0445
+#if PACKETVER >= 20181121
+packetLen(0x0445, 12) // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x0445, 10) // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+#endif
// Packet: 0x0446
packetLen(0x0446, 14) // ZC_QUEST_NOTIFY_EFFECT
@@ -2451,7 +2595,11 @@ packetLen(0x080d, 3) // ZC_SIMPLE_CASH_BTNSHOW
packetLen(0x080e, 14) // ZC_NOTIFY_HP_TO_GROUPM_R2
// Packet: 0x080f
+#if PACKETVER >= 20181121
+packetLen(0x080f, 30) // ZC_ADD_EXCHANGE_ITEM2
+#elif PACKETVER >= 20180103
packetLen(0x080f, 20) // ZC_ADD_EXCHANGE_ITEM2
+#endif
// Packet: 0x0810
packetLen(0x0810, 3) // ZC_OPEN_BUYING_STORE
@@ -2521,7 +2669,11 @@ packetLen(0x0819, 2) // CZ_REQ_TRADE_BUYING_STORE
packetLen(0x081a, 4) // ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER
// Packet: 0x081b
+#if PACKETVER >= 20181121
+packetLen(0x081b, 12) // ZC_UPDATE_ITEM_FROM_BUYING_STORE
+#elif PACKETVER >= 20180103
packetLen(0x081b, 10) // ZC_UPDATE_ITEM_FROM_BUYING_STORE
+#endif
// Packet: 0x081c
packetLen(0x081c, 10) // ZC_ITEM_DELETE_BUYING_STORE
@@ -2548,7 +2700,11 @@ packetLen(0x0822, 9) // CA_OTP_AUTH_REQ
packetLen(0x0823, -1) // AC_OTP_AUTH_ACK
// Packet: 0x0824
+#if PACKETVER >= 20181121
+packetLen(0x0824, 8) // ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER
+#elif PACKETVER >= 20180103
packetLen(0x0824, 6) // ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER
+#endif
// Packet: 0x0825
packetLen(0x0825, -1) // CA_SSO_LOGIN_REQ
@@ -2610,7 +2766,9 @@ packetLen(0x083a, 5) // ZC_OPEN_SEARCH_STORE_INFO
packetLen(0x083b, 2) // CZ_CLOSE_SEARCH_STORE_INFO
// Packet: 0x083c
-#if PACKETVER >= 20180315
+#if PACKETVER >= 20181121
+packetLen(0x083c, 14) // CZ_SSILIST_ITEM_CLICK
+#elif PACKETVER >= 20180315
packetLen(0x083c, 12) // CZ_SSILIST_ITEM_CLICK
#elif PACKETVER >= 20180213
packetLen(0x083c, 2) // CZ_SSILIST_ITEM_CLICK
@@ -2660,7 +2818,11 @@ packetLen(0x0849, 16) // ZC_SE_PC_BUY_CASHITEM_RESULT
packetLen(0x084a, 2) // CZ_SE_CASHSHOP_CLOSE
// Packet: 0x084b
+#if PACKETVER >= 20181121
+packetLen(0x084b, 21) // ZC_ITEM_FALL_ENTRY4
+#elif PACKETVER >= 20180103
packetLen(0x084b, 19) // ZC_ITEM_FALL_ENTRY4
+#endif
// Packet: 0x084c
packetLen(0x084c, 10) // CZ_MACRO_USE_SKILL
@@ -4235,7 +4397,11 @@ packetLen(0x098e, -1) // ZC_NOTIFY_CLAN_CHAT
packetLen(0x098f, -1) // CH_DELETE_CHAR3_EXT
// Packet: 0x0990
+#if PACKETVER >= 20181121
+packetLen(0x0990, 41) // ZC_ITEM_PICKUP_ACK_V5
+#elif PACKETVER >= 20180103
packetLen(0x0990, 31) // ZC_ITEM_PICKUP_ACK_V5
+#endif
// Packet: 0x0991
packetLen(0x0991, -1) // ZC_INVENTORY_ITEMLIST_NORMAL_V5
@@ -4322,25 +4488,45 @@ packetLen(0x09ab, 6) // CZ_REQ_BANKING_CHECK
packetLen(0x09ac, -1) // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO
// Packet: 0x09ad
+#if PACKETVER >= 20181121
+packetLen(0x09ad, 12) // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO
+#elif PACKETVER >= 20180103
packetLen(0x09ad, 10) // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO
+#endif
// Packet: 0x09ae
+#if PACKETVER >= 20181121
+packetLen(0x09ae, 19) // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x09ae, 17) // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+#endif
// Packet: 0x09af
packetLen(0x09af, 4) // ZC_ACK_APPLY_BARGAIN_SALE_ITEM
// Packet: 0x09b0
+#if PACKETVER >= 20181121
+packetLen(0x09b0, 10) // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x09b0, 8) // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+#endif
// Packet: 0x09b1
packetLen(0x09b1, 4) // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM
// Packet: 0x09b2
+#if PACKETVER >= 20181121
+packetLen(0x09b2, 10) // ZC_NOTIFY_BARGAIN_SALE_SELLING
+#elif PACKETVER >= 20180103
packetLen(0x09b2, 8) // ZC_NOTIFY_BARGAIN_SALE_SELLING
+#endif
// Packet: 0x09b3
+#if PACKETVER >= 20181121
+packetLen(0x09b3, 6) // ZC_NOTIFY_BARGAIN_SALE_CLOSE
+#elif PACKETVER >= 20180103
packetLen(0x09b3, 4) // ZC_NOTIFY_BARGAIN_SALE_CLOSE
+#endif
// Packet: 0x09b4
packetLen(0x09b4, 6) // CZ_OPEN_BARGAIN_SALE_TOOL
@@ -4385,10 +4571,18 @@ packetLen(0x09c1, 10) // ZC_C_MARKERINFO
packetLen(0x09c2, -1) // HC_SECRETSCAN_DATA
// Packet: 0x09c3
+#if PACKETVER >= 20181121
+packetLen(0x09c3, 10) // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x09c3, 8) // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+#endif
// Packet: 0x09c4
+#if PACKETVER >= 20181121
+packetLen(0x09c4, 10) // ZC_ACK_COUNT_BARGAIN_SALE_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x09c4, 8) // ZC_ACK_COUNT_BARGAIN_SALE_ITEM
+#endif
// Packet: 0x09c5
packetLen(0x09c5, 1042) // CS_LOGIN_QUERY
@@ -4490,7 +4684,11 @@ packetLen(0x09e4, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_CART
packetLen(0x09e5, 18) // ZC_DELETEITEM_FROM_MCSTORE2
// Packet: 0x09e6
+#if PACKETVER >= 20181121
+packetLen(0x09e6, 24) // ZC_UPDATE_ITEM_FROM_BUYING_STORE2
+#elif PACKETVER >= 20180103
packetLen(0x09e6, 22) // ZC_UPDATE_ITEM_FROM_BUYING_STORE2
+#endif
// Packet: 0x09e7
packetLen(0x09e7, 3) // ZC_NOTIFY_UNREAD_RODEX
@@ -4541,7 +4739,11 @@ packetLen(0x09f5, 11) // CZ_REQ_DELETE_RODEX
packetLen(0x09f6, 11) // ZC_ACK_DELETE_RODEX
// Packet: 0x09f7
+#if PACKETVER >= 20181121
+packetLen(0x09f7, 77) // ZC_PROPERTY_HOMUN_2
+#elif PACKETVER >= 20180103
packetLen(0x09f7, 75) // ZC_PROPERTY_HOMUN_2
+#endif
// Packet: 0x09f8
packetLen(0x09f8, -1) // ZC_ALL_QUEST_LIST3
@@ -4583,7 +4785,11 @@ packetLen(0x0a03, 2) // CZ_REQ_CANCEL_WRITE_RODEX
packetLen(0x0a04, 6) // CZ_REQ_ADD_ITEM_RODEX
// Packet: 0x0a05
+#if PACKETVER >= 20181121
+packetLen(0x0a05, 63) // ZC_ACK_ADD_ITEM_RODEX
+#elif PACKETVER >= 20180103
packetLen(0x0a05, 53) // ZC_ACK_ADD_ITEM_RODEX
+#endif
// Packet: 0x0a06
packetLen(0x0a06, 6) // CZ_REQ_REMOVE_RODEX_ITEM
@@ -4595,16 +4801,32 @@ packetLen(0x0a07, 9) // ZC_ACK_REMOVE_RODEX_ITEM
packetLen(0x0a08, 26) // CZ_REQ_OPEN_WRITE_RODEX
// Packet: 0x0a09
+#if PACKETVER >= 20181121
+packetLen(0x0a09, 55) // ZC_ADD_EXCHANGE_ITEM3
+#elif PACKETVER >= 20180103
packetLen(0x0a09, 45) // ZC_ADD_EXCHANGE_ITEM3
+#endif
// Packet: 0x0a0a
+#if PACKETVER >= 20181121
+packetLen(0x0a0a, 57) // ZC_ADD_ITEM_TO_STORE3
+#elif PACKETVER >= 20180103
packetLen(0x0a0a, 47) // ZC_ADD_ITEM_TO_STORE3
+#endif
// Packet: 0x0a0b
+#if PACKETVER >= 20181121
+packetLen(0x0a0b, 57) // ZC_ADD_ITEM_TO_CART3
+#elif PACKETVER >= 20180103
packetLen(0x0a0b, 47) // ZC_ADD_ITEM_TO_CART3
+#endif
// Packet: 0x0a0c
+#if PACKETVER >= 20181121
+packetLen(0x0a0c, 66) // ZC_ITEM_PICKUP_ACK_V6
+#elif PACKETVER >= 20180103
packetLen(0x0a0c, 56) // ZC_ITEM_PICKUP_ACK_V6
+#endif
// Packet: 0x0a0d
packetLen(0x0a0d, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V6
@@ -4646,7 +4868,11 @@ packetLen(0x0a18, 14) // ZC_ACCEPT_ENTER3
packetLen(0x0a19, 2) // CZ_REQ_OPEN_ROULETTE
// Packet: 0x0a1a
+#if PACKETVER >= 20181121
+packetLen(0x0a1a, 25) // ZC_ACK_OPEN_ROULETTE
+#elif PACKETVER >= 20180103
packetLen(0x0a1a, 23) // ZC_ACK_OPEN_ROULETTE
+#endif
// Packet: 0x0a1b
packetLen(0x0a1b, 2) // CZ_REQ_ROULETTE_INFO
@@ -4664,13 +4890,21 @@ packetLen(0x0a1e, 3) // ZC_ACK_CLOSE_ROULETTE
packetLen(0x0a1f, 2) // CZ_REQ_GENERATE_ROULETTE
// Packet: 0x0a20
+#if PACKETVER >= 20181121
+packetLen(0x0a20, 23) // ZC_ACK_GENERATE_ROULETTE
+#elif PACKETVER >= 20180103
packetLen(0x0a20, 21) // ZC_ACK_GENERATE_ROULETTE
+#endif
// Packet: 0x0a21
packetLen(0x0a21, 3) // CZ_RECV_ROULETTE_ITEM
// Packet: 0x0a22
+#if PACKETVER >= 20181121
+packetLen(0x0a22, 7) // ZC_RECV_ROULETTE_ITEM
+#elif PACKETVER >= 20180103
packetLen(0x0a22, 5) // ZC_RECV_ROULETTE_ITEM
+#endif
// Packet: 0x0a23
packetLen(0x0a23, -1) // ZC_ALL_ACH_LIST
@@ -4733,7 +4967,11 @@ packetLen(0x0a35, 4) // CZ_REQ_ONECLICK_ITEMIDENTIFY
packetLen(0x0a36, 7) // ZC_HP_INFO_TINY
// Packet: 0x0a37
+#if PACKETVER >= 20181121
+packetLen(0x0a37, 69) // ZC_ITEM_PICKUP_ACK_V7
+#elif PACKETVER >= 20180103
packetLen(0x0a37, 59) // ZC_ITEM_PICKUP_ACK_V7
+#endif
// Packet: 0x0a38
packetLen(0x0a38, 3) // ZC_OPEN_UI
@@ -4751,13 +4989,21 @@ packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
packetLen(0x0a3c, -1)
// Packet: 0x0a3d
+#if PACKETVER >= 20181121
+packetLen(0x0a3d, 20)
+#elif PACKETVER >= 20180103
packetLen(0x0a3d, 18)
+#endif
// Packet: 0x0a3e
packetLen(0x0a3e, -1)
// Packet: 0x0a3f
+#if PACKETVER >= 20181121
+packetLen(0x0a3f, 11)
+#elif PACKETVER >= 20180103
packetLen(0x0a3f, 9)
+#endif
// Packet: 0x0a40
packetLen(0x0a40, 11)
@@ -4784,7 +5030,11 @@ packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
packetLen(0x0a48, 2)
// Packet: 0x0a49
+#if PACKETVER >= 20181121
+packetLen(0x0a49, 22) // CZ_PRIVATE_AIRSHIP_REQUEST
+#elif PACKETVER >= 20180103
packetLen(0x0a49, 20) // CZ_PRIVATE_AIRSHIP_REQUEST
+#endif
// Packet: 0x0a4a
packetLen(0x0a4a, 6) // ZC_PRIVATE_AIRSHIP_RESPONSE
@@ -4799,7 +5049,11 @@ packetLen(0x0a4c, 28) // ZC_AIRSHIP_SERVERMOVE
packetLen(0x0a4d, -1)
// Packet: 0x0a4e
+#if PACKETVER >= 20181121
+packetLen(0x0a4e, 6)
+#elif PACKETVER >= 20180103
packetLen(0x0a4e, 4)
+#endif
// Packet: 0x0a4f
packetLen(0x0a4f, -1)
@@ -4940,7 +5194,11 @@ packetLen(0x0a87, -1)
packetLen(0x0a88, 2)
// Packet: 0x0a89
+#if PACKETVER >= 20181121
+packetLen(0x0a89, 61) // ZC_NOTIFY_OFFLINE_STORE
+#elif PACKETVER >= 20180103
packetLen(0x0a89, 57) // ZC_NOTIFY_OFFLINE_STORE
+#endif
// Packet: 0x0a8a
packetLen(0x0a8a, 6) // ZC_OFFLINE_STORE_VANISH
@@ -4979,7 +5237,11 @@ packetLen(0x0a94, 2)
packetLen(0x0a95, 4)
// Packet: 0x0a96
+#if PACKETVER >= 20181121
+packetLen(0x0a96, 61) // ZC_ADD_EXCHANGE_ITEM4
+#elif PACKETVER >= 20180103
packetLen(0x0a96, 51) // ZC_ADD_EXCHANGE_ITEM4
+#endif
// Packet: 0x0a97
packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_EQUIP
@@ -5018,7 +5280,11 @@ packetLen(0x0aa1, 4) // CZ_REFINE_ADD_ITEM
packetLen(0x0aa2, -1) // ZC_REFINE_ADD_ITEM
// Packet: 0x0aa3
+#if PACKETVER >= 20181121
+packetLen(0x0aa3, 9) // CZ_REFINE_ITEM_REQUEST
+#elif PACKETVER >= 20180103
packetLen(0x0aa3, 7) // CZ_REFINE_ITEM_REQUEST
+#endif
// Packet: 0x0aa4
packetLen(0x0aa4, 2) // CZ_REFINE_WINDOW_CLOSE
@@ -5069,13 +5335,21 @@ packetLen(0x0ab2, 7) // ZC_GROUP_ISALIVE
packetLen(0x0ab3, 19)
// Packet: 0x0ab4
+#if PACKETVER >= 20181121
+packetLen(0x0ab4, 6)
+#elif PACKETVER >= 20180103
packetLen(0x0ab4, 4)
+#endif
// Packet: 0x0ab5
packetLen(0x0ab5, 2)
// Packet: 0x0ab6
+#if PACKETVER >= 20181121
+packetLen(0x0ab6, 8)
+#elif PACKETVER >= 20180103
packetLen(0x0ab6, 6)
+#endif
// Packet: 0x0ab7
packetLen(0x0ab7, 4)
@@ -5084,7 +5358,11 @@ packetLen(0x0ab7, 4)
packetLen(0x0ab8, 2)
// Packet: 0x0ab9
+#if PACKETVER >= 20181121
+packetLen(0x0ab9, 47) // ZC_ITEM_PREVIEW
+#elif PACKETVER >= 20180103
packetLen(0x0ab9, 39) // ZC_ITEM_PREVIEW
+#endif
// Packet: 0x0aba
packetLen(0x0aba, 2)
@@ -5153,7 +5431,7 @@ packetLen(0x0ace, 4)
packetLen(0x0acf, 68) // CA_LOGIN_OTP
// Packet: 0x0ad0
-packetLen(0x0ad0, 11)
+packetLen(0x0ad0, 11) // CA_OTP_CODE
// Packet: 0x0ad1
packetLen(0x0ad1, -1)
@@ -5183,7 +5461,11 @@ packetLen(0x0ad8, 8)
packetLen(0x0ad9, -1)
// Packet: 0x0ada
+#if PACKETVER >= 20181121
+packetLen(0x0ada, 32) // ZC_REFINE_STATUS
+#elif PACKETVER >= 20180103
packetLen(0x0ada, 30) // ZC_REFINE_STATUS
+#endif
// Packet: 0x0adb
packetLen(0x0adb, -1)
@@ -5192,7 +5474,11 @@ packetLen(0x0adb, -1)
packetLen(0x0adc, 6) // ZC_EQUIPWIN_OTHER
// Packet: 0x0add
+#if PACKETVER >= 20181121
+packetLen(0x0add, 24) // ZC_ITEM_FALL_ENTRY
+#elif PACKETVER >= 20180103
packetLen(0x0add, 22) // ZC_ITEM_FALL_ENTRY
+#endif
// Packet: 0x0ade
packetLen(0x0ade, 6) // ZC_OVERWEIGHT_PERCENT
@@ -5375,7 +5661,9 @@ packetLen(0x0b04, 80)
#endif
// Packet: 0x0b05
-#if PACKETVER >= 20180829
+#if PACKETVER >= 20181121
+packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
+#elif PACKETVER >= 20180829
packetLen(0x0b05, 59) // ZC_OFFLINE_STORE_VISIBLE
#endif
@@ -5429,62 +5717,69 @@ packetLen(0x0b0d, 10) // ZC_REMOVE_EFFECT
// Packet: 0x0b0e
#if PACKETVER >= 20180912
-packetLen(0x0b0e, -1)
+packetLen(0x0b0e, -1) // ZC_NPC_BARTER_OPEN
#endif
// Packet: 0x0b0f
#if PACKETVER >= 20180912
-packetLen(0x0b0f, -1)
+packetLen(0x0b0f, -1) // CZ_NPC_BARTER_PURCHASE
#endif
// Packet: 0x0b10
#if PACKETVER >= 20181002
-packetLen(0x0b10, 10)
+packetLen(0x0b10, 10) // CZ_START_USE_SKILL
#endif
// Packet: 0x0b11
#if PACKETVER >= 20181002
-packetLen(0x0b11, 4)
+packetLen(0x0b11, 4) // CZ_STOP_USE_SKILL
#endif
// Packet: 0x0b12
#if PACKETVER >= 20181017
-packetLen(0x0b12, 2)
+packetLen(0x0b12, 2) // CZ_NPC_BARTER_CLOSE
#endif
// Packet: 0x0b13
-#if PACKETVER >= 20181017
+#if PACKETVER >= 20181121
+packetLen(0x0b13, 48) // ZC_ITEM_PREVIEW
+#elif PACKETVER >= 20181017
packetLen(0x0b13, 40) // ZC_ITEM_PREVIEW
#endif
// Packet: 0x0b14
#if PACKETVER >= 20181031
-packetLen(0x0b14, 2)
+packetLen(0x0b14, 2) // CZ_INVENTORY_EXPAND
#endif
// Packet: 0x0b15
#if PACKETVER >= 20181031
-packetLen(0x0b15, 7)
+packetLen(0x0b15, 7) // ZC_ACK_INVENTORY_EXPAND
#endif
// Packet: 0x0b16
#if PACKETVER >= 20181031
-packetLen(0x0b16, 2)
+packetLen(0x0b16, 2) // CZ_INVENTORY_EXPAND_CONFIRMED
#endif
// Packet: 0x0b17
#if PACKETVER >= 20181031
-packetLen(0x0b17, 3)
+packetLen(0x0b17, 3) // ZC_ACK_INVENTORY_EXPAND_RESULT
#endif
// Packet: 0x0b18
#if PACKETVER >= 20181031
-packetLen(0x0b18, 4)
+packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
#endif
// Packet: 0x0b19
#if PACKETVER >= 20181031
-packetLen(0x0b19, 2)
+packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
+#endif
+
+// Packet: 0x0b1a
+#if PACKETVER >= 20181212
+packetLen(0x0b1a, 29)
#endif
diff --git a/src/common/packets/packets2018_len_re.h b/src/common/packets/packets2018_len_re.h
index d0db982ae..42a417fea 100644
--- a/src/common/packets/packets2018_len_re.h
+++ b/src/common/packets/packets2018_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -5319,7 +5319,7 @@ packetLen(0x0ace, 4)
packetLen(0x0acf, 68) // CA_LOGIN_OTP
// Packet: 0x0ad0
-packetLen(0x0ad0, 11)
+packetLen(0x0ad0, 11) // CA_OTP_CODE
// Packet: 0x0ad1
packetLen(0x0ad1, -1)
@@ -5603,27 +5603,27 @@ packetLen(0x0b0d, 10) // ZC_REMOVE_EFFECT
// Packet: 0x0b0e
#if PACKETVER >= 20180912
-packetLen(0x0b0e, -1)
+packetLen(0x0b0e, -1) // ZC_NPC_BARTER_OPEN
#endif
// Packet: 0x0b0f
#if PACKETVER >= 20180912
-packetLen(0x0b0f, -1)
+packetLen(0x0b0f, -1) // CZ_NPC_BARTER_PURCHASE
#endif
// Packet: 0x0b10
#if PACKETVER >= 20181002
-packetLen(0x0b10, 10)
+packetLen(0x0b10, 10) // CZ_START_USE_SKILL
#endif
// Packet: 0x0b11
#if PACKETVER >= 20181002
-packetLen(0x0b11, 4)
+packetLen(0x0b11, 4) // CZ_STOP_USE_SKILL
#endif
// Packet: 0x0b12
#if PACKETVER >= 20181017
-packetLen(0x0b12, 2)
+packetLen(0x0b12, 2) // CZ_NPC_BARTER_CLOSE
#endif
// Packet: 0x0b13
@@ -5633,32 +5633,37 @@ packetLen(0x0b13, 48) // ZC_ITEM_PREVIEW
// Packet: 0x0b14
#if PACKETVER >= 20181031
-packetLen(0x0b14, 2)
+packetLen(0x0b14, 2) // CZ_INVENTORY_EXPAND
#endif
// Packet: 0x0b15
#if PACKETVER >= 20181031
-packetLen(0x0b15, 7)
+packetLen(0x0b15, 7) // ZC_ACK_INVENTORY_EXPAND
#endif
// Packet: 0x0b16
#if PACKETVER >= 20181031
-packetLen(0x0b16, 2)
+packetLen(0x0b16, 2) // CZ_INVENTORY_EXPAND_CONFIRMED
#endif
// Packet: 0x0b17
#if PACKETVER >= 20181031
-packetLen(0x0b17, 3)
+packetLen(0x0b17, 3) // ZC_ACK_INVENTORY_EXPAND_RESULT
#endif
// Packet: 0x0b18
#if PACKETVER >= 20181031
-packetLen(0x0b18, 4)
+packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
#endif
// Packet: 0x0b19
#if PACKETVER >= 20181031
-packetLen(0x0b19, 2)
+packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
+#endif
+
+// Packet: 0x0b1a
+#if PACKETVER >= 20181212
+packetLen(0x0b1a, 29)
#endif
diff --git a/src/common/packets/packets2018_len_zero.h b/src/common/packets/packets2018_len_zero.h
index 71a1ee51b..39448930e 100644
--- a/src/common/packets/packets2018_len_zero.h
+++ b/src/common/packets/packets2018_len_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -5605,7 +5605,7 @@ packetLen(0x0ace, 4)
packetLen(0x0acf, 68) // CA_LOGIN_OTP
// Packet: 0x0ad0
-packetLen(0x0ad0, 11)
+packetLen(0x0ad0, 11) // CA_OTP_CODE
// Packet: 0x0ad1
packetLen(0x0ad1, -1)
@@ -5899,12 +5899,12 @@ packetLen(0x0b0f, -1)
// Packet: 0x0b10
#if PACKETVER >= 20181010
-packetLen(0x0b10, 10)
+packetLen(0x0b10, 10) // CZ_START_USE_SKILL
#endif
// Packet: 0x0b11
#if PACKETVER >= 20181010
-packetLen(0x0b11, 4)
+packetLen(0x0b11, 4) // CZ_STOP_USE_SKILL
#endif
// Packet: 0x0b12
@@ -5949,5 +5949,10 @@ packetLen(0x0b18, 4)
packetLen(0x0b19, 2)
#endif
+// Packet: 0x0b1a
+#if PACKETVER >= 20181212
+packetLen(0x0b1a, 29)
+#endif
+
#endif /* COMMON_PACKETS2018_LEN_ZERO_H */
diff --git a/src/common/packets/packets2019_len_main.h b/src/common/packets/packets2019_len_main.h
new file mode 100644
index 000000000..0382a72d3
--- /dev/null
+++ b/src/common/packets/packets2019_len_main.h
@@ -0,0 +1,4511 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef COMMON_PACKETS2019_LEN_MAIN_H
+#define COMMON_PACKETS2019_LEN_MAIN_H
+
+/* This file is autogenerated, please do not commit manual changes */
+
+// Packet: 0x0064
+packetLen(0x0064, 55) // CA_LOGIN
+
+// Packet: 0x0065
+packetLen(0x0065, 17) // CH_ENTER
+
+// Packet: 0x0066
+packetLen(0x0066, 3) // CH_SELECT_CHAR
+
+// Packet: 0x0067
+packetLen(0x0067, 37) // CH_MAKE_CHAR
+
+// Packet: 0x0068
+packetLen(0x0068, 46) // CH_DELETE_CHAR
+
+// Packet: 0x0069
+packetLen(0x0069, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x006a
+packetLen(0x006a, 23) // AC_REFUSE_LOGIN
+
+// Packet: 0x006b
+packetLen(0x006b, -1) // HC_ACCEPT_ENTER
+
+// Packet: 0x006c
+packetLen(0x006c, 3) // HC_REFUSE_ENTER
+
+// Packet: 0x006d
+packetLen(0x006d, 157) // HC_ACCEPT_MAKECHAR
+
+// Packet: 0x006e
+packetLen(0x006e, 3) // HC_REFUSE_MAKECHAR
+
+// Packet: 0x006f
+packetLen(0x006f, 2) // HC_ACCEPT_DELETECHAR
+
+// Packet: 0x0070
+packetLen(0x0070, 3) // HC_REFUSE_DELETECHAR
+
+// Packet: 0x0071
+packetLen(0x0071, 28) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0072
+packetLen(0x0072, 22) // CZ_ENTER
+
+// Packet: 0x0073
+packetLen(0x0073, 11) // ZC_ACCEPT_ENTER
+
+// Packet: 0x0074
+packetLen(0x0074, 3) // ZC_REFUSE_ENTER
+
+// Packet: 0x0075
+packetLen(0x0075, -1) // ZC_NOTIFY_INITCHAR
+
+// Packet: 0x0076
+packetLen(0x0076, 9) // ZC_NOTIFY_UPDATECHAR
+
+// Packet: 0x0077
+packetLen(0x0077, 5) // ZC_NOTIFY_UPDATEPLAYER
+
+// Packet: 0x0078
+packetLen(0x0078, 55) // ZC_NOTIFY_STANDENTRY
+
+// Packet: 0x0079
+packetLen(0x0079, 53) // ZC_NOTIFY_NEWENTRY
+
+// Packet: 0x007a
+packetLen(0x007a, 58) // ZC_NOTIFY_ACTENTRY
+
+// Packet: 0x007b
+packetLen(0x007b, 60) // ZC_NOTIFY_MOVEENTRY
+
+// Packet: 0x007c
+packetLen(0x007c, 44) // ZC_NOTIFY_STANDENTRY_NPC
+
+// Packet: 0x007d
+packetLen(0x007d, 2) // CZ_NOTIFY_ACTORINIT
+
+// Packet: 0x007e
+packetLen(0x007e, 105) // CZ_REQUEST_TIME
+
+// Packet: 0x007f
+packetLen(0x007f, 6) // ZC_NOTIFY_TIME
+
+// Packet: 0x0080
+packetLen(0x0080, 7) // ZC_NOTIFY_VANISH
+
+// Packet: 0x0081
+packetLen(0x0081, 3) // SC_NOTIFY_BAN
+
+// Packet: 0x0082
+packetLen(0x0082, 2) // CZ_REQUEST_QUIT
+
+// Packet: 0x0083
+packetLen(0x0083, 2) // ZC_ACCEPT_QUIT
+
+// Packet: 0x0084
+packetLen(0x0084, 2) // ZC_REFUSE_QUIT
+
+// Packet: 0x0085
+packetLen(0x0085, 10) // CZ_REQUEST_MOVE
+
+// Packet: 0x0086
+packetLen(0x0086, 16) // ZC_NOTIFY_MOVE
+
+// Packet: 0x0087
+packetLen(0x0087, 12) // ZC_NOTIFY_PLAYERMOVE
+
+// Packet: 0x0088
+packetLen(0x0088, 10) // ZC_STOPMOVE
+
+// Packet: 0x0089
+packetLen(0x0089, 11) // CZ_REQUEST_ACT
+
+// Packet: 0x008a
+packetLen(0x008a, 29) // ZC_NOTIFY_ACT
+
+// Packet: 0x008b
+packetLen(0x008b, 23) // ZC_NOTIFY_ACT_POSITION
+
+// Packet: 0x008c
+packetLen(0x008c, 14)
+
+// Packet: 0x008d
+packetLen(0x008d, -1) // ZC_NOTIFY_CHAT
+
+// Packet: 0x008e
+packetLen(0x008e, -1) // ZC_NOTIFY_PLAYERCHAT
+
+// Packet: 0x0090
+packetLen(0x0090, 7) // CZ_CONTACTNPC
+
+// Packet: 0x0091
+packetLen(0x0091, 22) // ZC_NPCACK_MAPMOVE
+
+// Packet: 0x0092
+packetLen(0x0092, 28) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0093
+packetLen(0x0093, 2) // ZC_NPCACK_ENABLE
+
+// Packet: 0x0094
+packetLen(0x0094, 19) // CZ_REQNAME
+
+// Packet: 0x0095
+packetLen(0x0095, 30) // ZC_ACK_REQNAME
+
+// Packet: 0x0096
+packetLen(0x0096, -1) // CZ_WHISPER
+
+// Packet: 0x0097
+packetLen(0x0097, -1) // ZC_WHISPER
+
+// Packet: 0x0098
+packetLen(0x0098, 3) // ZC_ACK_WHISPER
+
+// Packet: 0x0099
+packetLen(0x0099, -1) // CZ_BROADCAST
+
+// Packet: 0x009a
+packetLen(0x009a, -1) // ZC_BROADCAST
+
+// Packet: 0x009b
+packetLen(0x009b, 34) // CZ_CHANGE_DIRECTION
+
+// Packet: 0x009c
+packetLen(0x009c, 9) // ZC_CHANGE_DIRECTION
+
+// Packet: 0x009d
+packetLen(0x009d, 19) // ZC_ITEM_ENTRY
+
+// Packet: 0x009e
+packetLen(0x009e, 19) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x009f
+packetLen(0x009f, 20) // CZ_ITEM_PICKUP
+
+// Packet: 0x00a0
+packetLen(0x00a0, 33) // ZC_ITEM_PICKUP_ACK
+
+// Packet: 0x00a1
+packetLen(0x00a1, 6) // ZC_ITEM_DISAPPEAR
+
+// Packet: 0x00a2
+packetLen(0x00a2, 14) // CZ_ITEM_THROW
+
+// Packet: 0x00a3
+packetLen(0x00a3, -1) // ZC_NORMAL_ITEMLIST
+
+// Packet: 0x00a4
+packetLen(0x00a4, -1) // ZC_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a5
+packetLen(0x00a5, -1) // ZC_STORE_NORMAL_ITEMLIST
+
+// Packet: 0x00a6
+packetLen(0x00a6, -1) // ZC_STORE_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a7
+packetLen(0x00a7, 9)
+
+// Packet: 0x00a8
+packetLen(0x00a8, 7) // ZC_USE_ITEM_ACK
+
+// Packet: 0x00a9
+packetLen(0x00a9, 6) // CZ_REQ_WEAR_EQUIP
+
+// Packet: 0x00aa
+packetLen(0x00aa, 9) // ZC_REQ_WEAR_EQUIP_ACK
+
+// Packet: 0x00ab
+packetLen(0x00ab, 4) // CZ_REQ_TAKEOFF_EQUIP
+
+// Packet: 0x00ac
+packetLen(0x00ac, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK
+
+// Packet: 0x00ae
+packetLen(0x00ae, -1) // ZC_REQ_ITEM_EXPLANATION_ACK
+
+// Packet: 0x00af
+packetLen(0x00af, 6) // ZC_ITEM_THROW_ACK
+
+// Packet: 0x00b0
+packetLen(0x00b0, 8) // ZC_PAR_CHANGE
+
+// Packet: 0x00b1
+packetLen(0x00b1, 8) // ZC_LONGPAR_CHANGE
+
+// Packet: 0x00b2
+packetLen(0x00b2, 3) // CZ_RESTART
+
+// Packet: 0x00b3
+packetLen(0x00b3, 3) // ZC_RESTART_ACK
+
+// Packet: 0x00b4
+packetLen(0x00b4, -1) // ZC_SAY_DIALOG
+
+// Packet: 0x00b5
+packetLen(0x00b5, 6) // ZC_WAIT_DIALOG
+
+// Packet: 0x00b6
+packetLen(0x00b6, 6) // ZC_CLOSE_DIALOG
+
+// Packet: 0x00b7
+packetLen(0x00b7, -1) // ZC_MENU_LIST
+
+// Packet: 0x00b8
+packetLen(0x00b8, 7) // CZ_CHOOSE_MENU
+
+// Packet: 0x00b9
+packetLen(0x00b9, 6) // CZ_REQ_NEXT_SCRIPT
+
+// Packet: 0x00ba
+packetLen(0x00ba, 2) // CZ_REQ_STATUS
+
+// Packet: 0x00bb
+packetLen(0x00bb, 5) // CZ_STATUS_CHANGE
+
+// Packet: 0x00bc
+packetLen(0x00bc, 6) // ZC_STATUS_CHANGE_ACK
+
+// Packet: 0x00bd
+packetLen(0x00bd, 44) // ZC_STATUS
+
+// Packet: 0x00be
+packetLen(0x00be, 5) // ZC_STATUS_CHANGE
+
+// Packet: 0x00bf
+packetLen(0x00bf, 3) // CZ_REQ_EMOTION
+
+// Packet: 0x00c0
+packetLen(0x00c0, 7) // ZC_EMOTION
+
+// Packet: 0x00c1
+packetLen(0x00c1, 2) // CZ_REQ_USER_COUNT
+
+// Packet: 0x00c2
+packetLen(0x00c2, 6) // ZC_USER_COUNT
+
+// Packet: 0x00c3
+packetLen(0x00c3, 8) // ZC_SPRITE_CHANGE
+
+// Packet: 0x00c4
+packetLen(0x00c4, 6) // ZC_SELECT_DEALTYPE
+
+// Packet: 0x00c5
+packetLen(0x00c5, 7) // CZ_ACK_SELECT_DEALTYPE
+
+// Packet: 0x00c6
+packetLen(0x00c6, -1) // ZC_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c7
+packetLen(0x00c7, -1) // ZC_PC_SELL_ITEMLIST
+
+// Packet: 0x00c8
+packetLen(0x00c8, -1) // CZ_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c9
+packetLen(0x00c9, -1) // CZ_PC_SELL_ITEMLIST
+
+// Packet: 0x00ca
+packetLen(0x00ca, 3) // ZC_PC_PURCHASE_RESULT
+
+// Packet: 0x00cb
+packetLen(0x00cb, 3) // ZC_PC_SELL_RESULT
+
+// Packet: 0x00cc
+packetLen(0x00cc, 6) // CZ_DISCONNECT_CHARACTER
+
+// Packet: 0x00cd
+packetLen(0x00cd, 3) // ZC_ACK_DISCONNECT_CHARACTER
+
+// Packet: 0x00ce
+packetLen(0x00ce, 2) // CZ_DISCONNECT_ALL_CHARACTER
+
+// Packet: 0x00cf
+packetLen(0x00cf, 27) // CZ_SETTING_WHISPER_PC
+
+// Packet: 0x00d0
+packetLen(0x00d0, 3) // CZ_SETTING_WHISPER_STATE
+
+// Packet: 0x00d1
+packetLen(0x00d1, 4) // ZC_SETTING_WHISPER_PC
+
+// Packet: 0x00d2
+packetLen(0x00d2, 4) // ZC_SETTING_WHISPER_STATE
+
+// Packet: 0x00d3
+packetLen(0x00d3, 2) // CZ_REQ_WHISPER_LIST
+
+// Packet: 0x00d4
+packetLen(0x00d4, -1) // ZC_WHISPER_LIST
+
+// Packet: 0x00d5
+packetLen(0x00d5, -1) // CZ_CREATE_CHATROOM
+
+// Packet: 0x00d6
+packetLen(0x00d6, 3) // ZC_ACK_CREATE_CHATROOM
+
+// Packet: 0x00d7
+packetLen(0x00d7, -1) // ZC_ROOM_NEWENTRY
+
+// Packet: 0x00d8
+packetLen(0x00d8, 6) // ZC_DESTROY_ROOM
+
+// Packet: 0x00d9
+packetLen(0x00d9, 14) // CZ_REQ_ENTER_ROOM
+
+// Packet: 0x00da
+packetLen(0x00da, 3) // ZC_REFUSE_ENTER_ROOM
+
+// Packet: 0x00db
+packetLen(0x00db, -1) // ZC_ENTER_ROOM
+
+// Packet: 0x00dc
+packetLen(0x00dc, 28) // ZC_MEMBER_NEWENTRY
+
+// Packet: 0x00dd
+packetLen(0x00dd, 29) // ZC_MEMBER_EXIT
+
+// Packet: 0x00de
+packetLen(0x00de, -1) // CZ_CHANGE_CHATROOM
+
+// Packet: 0x00df
+packetLen(0x00df, -1) // ZC_CHANGE_CHATROOM
+
+// Packet: 0x00e0
+packetLen(0x00e0, 30) // CZ_REQ_ROLE_CHANGE
+
+// Packet: 0x00e1
+packetLen(0x00e1, 30) // ZC_ROLE_CHANGE
+
+// Packet: 0x00e2
+packetLen(0x00e2, 26) // CZ_REQ_EXPEL_MEMBER
+
+// Packet: 0x00e3
+packetLen(0x00e3, 2) // CZ_EXIT_ROOM
+
+// Packet: 0x00e4
+packetLen(0x00e4, 6) // CZ_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e5
+packetLen(0x00e5, 26) // ZC_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e6
+packetLen(0x00e6, 3) // CZ_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e7
+packetLen(0x00e7, 3) // ZC_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e8
+packetLen(0x00e8, 8) // CZ_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00e9
+packetLen(0x00e9, 29) // ZC_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00ea
+packetLen(0x00ea, 5) // ZC_ACK_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00eb
+packetLen(0x00eb, 2) // CZ_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ec
+packetLen(0x00ec, 3) // ZC_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ed
+packetLen(0x00ed, 2) // CZ_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ee
+packetLen(0x00ee, 2) // ZC_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ef
+packetLen(0x00ef, 2) // CZ_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f0
+packetLen(0x00f0, 3) // ZC_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f1
+packetLen(0x00f1, 2) // ZC_EXCHANGEITEM_UNDO
+
+// Packet: 0x00f2
+packetLen(0x00f2, 6) // ZC_NOTIFY_STOREITEM_COUNTINFO
+
+// Packet: 0x00f3
+packetLen(0x00f3, -1) // CZ_REQUEST_CHAT
+
+// Packet: 0x00f4
+packetLen(0x00f4, 31) // ZC_ADD_ITEM_TO_STORE
+
+// Packet: 0x00f5
+packetLen(0x00f5, 11) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY
+
+// Packet: 0x00f6
+packetLen(0x00f6, 8) // ZC_DELETE_ITEM_FROM_STORE
+
+// Packet: 0x00f7
+packetLen(0x00f7, 17) // CZ_REQUEST_TIME
+
+// Packet: 0x00f8
+packetLen(0x00f8, 2) // ZC_CLOSE_STORE
+
+// Packet: 0x00f9
+packetLen(0x00f9, 26) // CZ_MAKE_GROUP
+
+// Packet: 0x00fa
+packetLen(0x00fa, 3) // ZC_ACK_MAKE_GROUP
+
+// Packet: 0x00fb
+packetLen(0x00fb, -1) // ZC_GROUP_LIST
+
+// Packet: 0x00fc
+packetLen(0x00fc, 6) // CZ_REQ_JOIN_GROUP
+
+// Packet: 0x00fd
+packetLen(0x00fd, 27) // ZC_ACK_REQ_JOIN_GROUP
+
+// Packet: 0x00fe
+packetLen(0x00fe, 30) // ZC_REQ_JOIN_GROUP
+
+// Packet: 0x00ff
+packetLen(0x00ff, 10) // CZ_JOIN_GROUP
+
+// Packet: 0x0100
+packetLen(0x0100, 2) // CZ_REQ_LEAVE_GROUP
+
+// Packet: 0x0101
+packetLen(0x0101, 6) // ZC_GROUPINFO_CHANGE
+
+// Packet: 0x0102
+packetLen(0x0102, 6) // CZ_CHANGE_GROUPEXPOPTION
+
+// Packet: 0x0103
+packetLen(0x0103, 30) // CZ_REQ_EXPEL_GROUP_MEMBER
+
+// Packet: 0x0104
+packetLen(0x0104, 79) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0105
+packetLen(0x0105, 31) // ZC_DELETE_MEMBER_FROM_GROUP
+
+// Packet: 0x0106
+packetLen(0x0106, 10) // ZC_NOTIFY_HP_TO_GROUPM
+
+// Packet: 0x0107
+packetLen(0x0107, 10) // ZC_NOTIFY_POSITION_TO_GROUPM
+
+// Packet: 0x0108
+packetLen(0x0108, -1) // CZ_REQUEST_CHAT_PARTY
+
+// Packet: 0x0109
+packetLen(0x0109, -1) // ZC_NOTIFY_CHAT_PARTY
+
+// Packet: 0x010a
+packetLen(0x010a, 6) // ZC_MVP_GETTING_ITEM
+
+// Packet: 0x010b
+packetLen(0x010b, 6) // ZC_MVP_GETTING_SPECIAL_EXP
+
+// Packet: 0x010c
+packetLen(0x010c, 6) // ZC_MVP
+
+// Packet: 0x010d
+packetLen(0x010d, 2) // ZC_THROW_MVPITEM
+
+// Packet: 0x010e
+packetLen(0x010e, 11) // ZC_SKILLINFO_UPDATE
+
+// Packet: 0x010f
+packetLen(0x010f, -1) // ZC_SKILLINFO_LIST
+
+// Packet: 0x0110
+packetLen(0x0110, 14) // ZC_ACK_TOUSESKILL
+
+// Packet: 0x0111
+packetLen(0x0111, 39) // ZC_ADD_SKILL
+
+// Packet: 0x0112
+packetLen(0x0112, 4) // CZ_UPGRADE_SKILLLEVEL
+
+// Packet: 0x0113
+packetLen(0x0113, 25) // CZ_USE_SKILL
+
+// Packet: 0x0114
+packetLen(0x0114, 31) // ZC_NOTIFY_SKILL
+
+// Packet: 0x0115
+packetLen(0x0115, 35) // ZC_NOTIFY_SKILL_POSITION
+
+// Packet: 0x0116
+packetLen(0x0116, 17) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0117
+packetLen(0x0117, 18) // ZC_NOTIFY_GROUNDSKILL
+
+// Packet: 0x0118
+packetLen(0x0118, 2) // CZ_CANCEL_LOCKON
+
+// Packet: 0x0119
+packetLen(0x0119, 13) // ZC_STATE_CHANGE
+
+// Packet: 0x011a
+packetLen(0x011a, 15) // ZC_USE_SKILL
+
+// Packet: 0x011b
+packetLen(0x011b, 20) // CZ_SELECT_WARPPOINT
+
+// Packet: 0x011c
+packetLen(0x011c, 68) // ZC_WARPLIST
+
+// Packet: 0x011d
+packetLen(0x011d, 2) // CZ_REMEMBER_WARPPOINT
+
+// Packet: 0x011e
+packetLen(0x011e, 3) // ZC_ACK_REMEMBER_WARPPOINT
+
+// Packet: 0x011f
+packetLen(0x011f, 16) // ZC_SKILL_ENTRY
+
+// Packet: 0x0120
+packetLen(0x0120, 6) // ZC_SKILL_DISAPPEAR
+
+// Packet: 0x0121
+packetLen(0x0121, 14) // ZC_NOTIFY_CARTITEM_COUNTINFO
+
+// Packet: 0x0122
+packetLen(0x0122, -1) // ZC_CART_EQUIPMENT_ITEMLIST
+
+// Packet: 0x0123
+packetLen(0x0123, -1) // ZC_CART_NORMAL_ITEMLIST
+
+// Packet: 0x0124
+packetLen(0x0124, 31) // ZC_ADD_ITEM_TO_CART
+
+// Packet: 0x0125
+packetLen(0x0125, 8) // ZC_DELETE_ITEM_FROM_CART
+
+// Packet: 0x0126
+packetLen(0x0126, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_CART
+
+// Packet: 0x0127
+packetLen(0x0127, 8) // CZ_MOVE_ITEM_FROM_CART_TO_BODY
+
+// Packet: 0x0128
+packetLen(0x0128, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_CART
+
+// Packet: 0x0129
+packetLen(0x0129, 8) // CZ_MOVE_ITEM_FROM_CART_TO_STORE
+
+// Packet: 0x012a
+packetLen(0x012a, 2) // CZ_REQ_CARTOFF
+
+// Packet: 0x012b
+packetLen(0x012b, 2) // ZC_CARTOFF
+
+// Packet: 0x012c
+packetLen(0x012c, 3) // ZC_ACK_ADDITEM_TO_CART
+
+// Packet: 0x012d
+packetLen(0x012d, 4) // ZC_OPENSTORE
+
+// Packet: 0x012e
+packetLen(0x012e, 2) // CZ_REQ_CLOSESTORE
+
+// Packet: 0x012f
+packetLen(0x012f, -1) // CZ_REQ_OPENSTORE
+
+// Packet: 0x0130
+packetLen(0x0130, 6) // CZ_REQ_BUY_FROMMC
+
+// Packet: 0x0131
+packetLen(0x0131, 86) // ZC_STORE_ENTRY
+
+// Packet: 0x0132
+packetLen(0x0132, 6) // ZC_DISAPPEAR_ENTRY
+
+// Packet: 0x0133
+packetLen(0x0133, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0134
+packetLen(0x0134, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0135
+packetLen(0x0135, 7) // ZC_PC_PURCHASE_RESULT_FROMMC
+
+// Packet: 0x0136
+packetLen(0x0136, -1) // ZC_PC_PURCHASE_MYITEMLIST
+
+// Packet: 0x0137
+packetLen(0x0137, 6) // ZC_DELETEITEM_FROM_MCSTORE
+
+// Packet: 0x0138
+packetLen(0x0138, 3) // CZ_PKMODE_CHANGE
+
+// Packet: 0x0139
+packetLen(0x0139, 16) // ZC_ATTACK_FAILURE_FOR_DISTANCE
+
+// Packet: 0x013a
+packetLen(0x013a, 4) // ZC_ATTACK_RANGE
+
+// Packet: 0x013b
+packetLen(0x013b, 4) // ZC_ACTION_FAILURE
+
+// Packet: 0x013c
+packetLen(0x013c, 4) // ZC_EQUIP_ARROW
+
+// Packet: 0x013d
+packetLen(0x013d, 6) // ZC_RECOVERY
+
+// Packet: 0x013e
+packetLen(0x013e, 24) // ZC_USESKILL_ACK
+
+// Packet: 0x013f
+packetLen(0x013f, 26) // CZ_ITEM_CREATE
+
+// Packet: 0x0140
+packetLen(0x0140, 22) // CZ_MOVETO_MAP
+
+// Packet: 0x0141
+packetLen(0x0141, 14) // ZC_COUPLESTATUS
+
+// Packet: 0x0142
+packetLen(0x0142, 6) // ZC_OPEN_EDITDLG
+
+// Packet: 0x0143
+packetLen(0x0143, 10) // CZ_INPUT_EDITDLG
+
+// Packet: 0x0144
+packetLen(0x0144, 23) // ZC_COMPASS
+
+// Packet: 0x0145
+packetLen(0x0145, 19) // ZC_SHOW_IMAGE
+
+// Packet: 0x0146
+packetLen(0x0146, 6) // CZ_CLOSE_DIALOG
+
+// Packet: 0x0147
+packetLen(0x0147, 39) // ZC_AUTORUN_SKILL
+
+// Packet: 0x0148
+packetLen(0x0148, 8) // ZC_RESURRECTION
+
+// Packet: 0x0149
+packetLen(0x0149, 9) // CZ_REQ_GIVE_MANNER_POINT
+
+// Packet: 0x014a
+packetLen(0x014a, 6) // ZC_ACK_GIVE_MANNER_POINT
+
+// Packet: 0x014b
+packetLen(0x014b, 27) // ZC_NOTIFY_MANNER_POINT_GIVEN
+
+// Packet: 0x014c
+packetLen(0x014c, -1) // ZC_MYGUILD_BASIC_INFO
+
+// Packet: 0x014d
+packetLen(0x014d, 2) // CZ_REQ_GUILD_MENUINTERFACE
+
+// Packet: 0x014e
+packetLen(0x014e, 6) // ZC_ACK_GUILD_MENUINTERFACE
+
+// Packet: 0x014f
+packetLen(0x014f, 6) // CZ_REQ_GUILD_MENU
+
+// Packet: 0x0150
+packetLen(0x0150, 110) // ZC_GUILD_INFO
+
+// Packet: 0x0151
+packetLen(0x0151, 6) // CZ_REQ_GUILD_EMBLEM_IMG
+
+// Packet: 0x0152
+packetLen(0x0152, -1) // ZC_GUILD_EMBLEM_IMG
+
+// Packet: 0x0153
+packetLen(0x0153, -1) // CZ_REGISTER_GUILD_EMBLEM_IMG
+
+// Packet: 0x0154
+packetLen(0x0154, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0155
+packetLen(0x0155, -1) // CZ_REQ_CHANGE_MEMBERPOS
+
+// Packet: 0x0156
+packetLen(0x0156, -1) // ZC_ACK_REQ_CHANGE_MEMBERS
+
+// Packet: 0x0157
+packetLen(0x0157, 6) // CZ_REQ_OPEN_MEMBER_INFO
+
+// Packet: 0x0159
+packetLen(0x0159, 54) // CZ_REQ_LEAVE_GUILD
+
+// Packet: 0x015a
+packetLen(0x015a, 66) // ZC_ACK_LEAVE_GUILD
+
+// Packet: 0x015b
+packetLen(0x015b, 54) // CZ_REQ_BAN_GUILD
+
+// Packet: 0x015c
+packetLen(0x015c, 90) // ZC_ACK_BAN_GUILD
+
+// Packet: 0x015d
+packetLen(0x015d, 42) // CZ_REQ_DISORGANIZE_GUILD
+
+// Packet: 0x015e
+packetLen(0x015e, 6) // ZC_ACK_DISORGANIZE_GUILD_RESULT
+
+// Packet: 0x015f
+packetLen(0x015f, 42) // ZC_ACK_DISORGANIZE_GUILD
+
+// Packet: 0x0160
+packetLen(0x0160, -1) // ZC_POSITION_INFO
+
+// Packet: 0x0161
+packetLen(0x0161, -1) // CZ_REG_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0162
+packetLen(0x0162, -1) // ZC_GUILD_SKILLINFO
+
+// Packet: 0x0163
+packetLen(0x0163, -1) // ZC_BAN_LIST
+
+// Packet: 0x0164
+packetLen(0x0164, -1) // ZC_OTHER_GUILD_LIST
+
+// Packet: 0x0165
+packetLen(0x0165, 30) // CZ_REQ_MAKE_GUILD
+
+// Packet: 0x0166
+packetLen(0x0166, -1) // ZC_POSITION_ID_NAME_INFO
+
+// Packet: 0x0167
+packetLen(0x0167, 3) // ZC_RESULT_MAKE_GUILD
+
+// Packet: 0x0168
+packetLen(0x0168, 14) // CZ_REQ_JOIN_GUILD
+
+// Packet: 0x0169
+packetLen(0x0169, 3) // ZC_ACK_REQ_JOIN_GUILD
+
+// Packet: 0x016a
+packetLen(0x016a, 30) // ZC_REQ_JOIN_GUILD
+
+// Packet: 0x016b
+packetLen(0x016b, 10) // CZ_JOIN_GUILD
+
+// Packet: 0x016c
+packetLen(0x016c, 43) // ZC_UPDATE_GDID
+
+// Packet: 0x016d
+packetLen(0x016d, 14) // ZC_UPDATE_CHARSTAT
+
+// Packet: 0x016e
+packetLen(0x016e, 186) // CZ_GUILD_NOTICE
+
+// Packet: 0x016f
+packetLen(0x016f, 182) // ZC_GUILD_NOTICE
+
+// Packet: 0x0170
+packetLen(0x0170, 14) // CZ_REQ_ALLY_GUILD
+
+// Packet: 0x0171
+packetLen(0x0171, 30) // ZC_REQ_ALLY_GUILD
+
+// Packet: 0x0172
+packetLen(0x0172, 10) // CZ_ALLY_GUILD
+
+// Packet: 0x0173
+packetLen(0x0173, 3) // ZC_ACK_REQ_ALLY_GUILD
+
+// Packet: 0x0174
+packetLen(0x0174, -1) // ZC_ACK_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0175
+packetLen(0x0175, 6) // CZ_REQ_GUILD_MEMBER_INFO
+
+// Packet: 0x0176
+packetLen(0x0176, 106) // ZC_ACK_GUILD_MEMBER_INFO
+
+// Packet: 0x0177
+packetLen(0x0177, -1) // ZC_ITEMIDENTIFY_LIST
+
+// Packet: 0x0178
+packetLen(0x0178, 4) // CZ_REQ_ITEMIDENTIFY
+
+// Packet: 0x0179
+packetLen(0x0179, 5) // ZC_ACK_ITEMIDENTIFY
+
+// Packet: 0x017a
+packetLen(0x017a, 4) // CZ_REQ_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017b
+packetLen(0x017b, -1) // ZC_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017c
+packetLen(0x017c, 6) // CZ_REQ_ITEMCOMPOSITION
+
+// Packet: 0x017d
+packetLen(0x017d, 7) // ZC_ACK_ITEMCOMPOSITION
+
+// Packet: 0x017e
+packetLen(0x017e, -1) // CZ_GUILD_CHAT
+
+// Packet: 0x017f
+packetLen(0x017f, -1) // ZC_GUILD_CHAT
+
+// Packet: 0x0180
+packetLen(0x0180, 6) // CZ_REQ_HOSTILE_GUILD
+
+// Packet: 0x0181
+packetLen(0x0181, 3) // ZC_ACK_REQ_HOSTILE_GUILD
+
+// Packet: 0x0182
+packetLen(0x0182, 106) // ZC_MEMBER_ADD
+
+// Packet: 0x0183
+packetLen(0x0183, 10) // CZ_REQ_DELETE_RELATED_GUILD
+
+// Packet: 0x0184
+packetLen(0x0184, 10) // ZC_DELETE_RELATED_GUILD
+
+// Packet: 0x0185
+packetLen(0x0185, 34) // ZC_ADD_RELATED_GUILD
+
+// Packet: 0x0187
+packetLen(0x0187, 6) // CH_UNKNOWN_PING
+
+// Packet: 0x0188
+packetLen(0x0188, 8) // ZC_ACK_ITEMREFINING
+
+// Packet: 0x0189
+packetLen(0x0189, 4) // ZC_NOTIFY_MAPINFO
+
+// Packet: 0x018a
+packetLen(0x018a, 4) // CZ_REQ_DISCONNECT
+
+// Packet: 0x018b
+packetLen(0x018b, 4) // ZC_ACK_REQ_DISCONNECT
+
+// Packet: 0x018c
+packetLen(0x018c, 29) // ZC_MONSTER_INFO
+
+// Packet: 0x018d
+packetLen(0x018d, -1) // ZC_MAKABLEITEMLIST
+
+// Packet: 0x018e
+packetLen(0x018e, 18) // CZ_REQMAKINGITEM
+
+// Packet: 0x018f
+packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM
+
+// Packet: 0x0190
+packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX
+
+// Packet: 0x0191
+packetLen(0x0191, 86) // ZC_TALKBOX_CHATCONTENTS
+
+// Packet: 0x0192
+packetLen(0x0192, 24) // ZC_UPDATE_MAPINFO
+
+// Packet: 0x0193
+packetLen(0x0193, 2) // CZ_REQNAME_BYGID
+
+// Packet: 0x0194
+packetLen(0x0194, 30) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0195
+packetLen(0x0195, 102) // ZC_ACK_REQNAMEALL
+
+// Packet: 0x0196
+packetLen(0x0196, 9) // ZC_MSG_STATE_CHANGE
+
+// Packet: 0x0197
+packetLen(0x0197, 4) // CZ_RESET
+
+// Packet: 0x0198
+packetLen(0x0198, 8) // CZ_CHANGE_MAPTYPE
+
+// Packet: 0x0199
+packetLen(0x0199, 4) // ZC_NOTIFY_MAPPROPERTY
+
+// Packet: 0x019a
+packetLen(0x019a, 14) // ZC_NOTIFY_RANKING
+
+// Packet: 0x019b
+packetLen(0x019b, 10) // ZC_NOTIFY_EFFECT
+
+// Packet: 0x019c
+packetLen(0x019c, -1) // CZ_LOCALBROADCAST
+
+// Packet: 0x019d
+packetLen(0x019d, 6) // CZ_CHANGE_EFFECTSTATE
+
+// Packet: 0x019e
+packetLen(0x019e, 2) // ZC_START_CAPTURE
+
+// Packet: 0x019f
+packetLen(0x019f, 6) // CZ_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a0
+packetLen(0x01a0, 3) // ZC_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a1
+packetLen(0x01a1, 3) // CZ_COMMAND_PET
+
+// Packet: 0x01a2
+packetLen(0x01a2, 37) // ZC_PROPERTY_PET
+
+// Packet: 0x01a3
+packetLen(0x01a3, 7) // ZC_FEED_PET
+
+// Packet: 0x01a4
+packetLen(0x01a4, 11) // ZC_CHANGESTATE_PET
+
+// Packet: 0x01a5
+packetLen(0x01a5, 26) // CZ_RENAME_PET
+
+// Packet: 0x01a6
+packetLen(0x01a6, -1) // ZC_PETEGG_LIST
+
+// Packet: 0x01a7
+packetLen(0x01a7, 4) // CZ_SELECT_PETEGG
+
+// Packet: 0x01a8
+packetLen(0x01a8, 4) // CZ_PETEGG_INFO
+
+// Packet: 0x01a9
+packetLen(0x01a9, 6) // CZ_PET_ACT
+
+// Packet: 0x01aa
+packetLen(0x01aa, 10) // ZC_PET_ACT
+
+// Packet: 0x01ab
+packetLen(0x01ab, 12) // ZC_PAR_CHANGE_USER
+
+// Packet: 0x01ac
+packetLen(0x01ac, 6) // ZC_SKILL_UPDATE
+
+// Packet: 0x01ad
+packetLen(0x01ad, -1) // ZC_MAKINGARROW_LIST
+
+// Packet: 0x01ae
+packetLen(0x01ae, 6) // CZ_REQ_MAKINGARROW
+
+// Packet: 0x01af
+packetLen(0x01af, 4) // CZ_REQ_CHANGECART
+
+// Packet: 0x01b0
+packetLen(0x01b0, 11) // ZC_NPCSPRITE_CHANGE
+
+// Packet: 0x01b1
+packetLen(0x01b1, 7) // ZC_SHOWDIGIT
+
+// Packet: 0x01b2
+packetLen(0x01b2, -1) // CZ_REQ_OPENSTORE2
+
+// Packet: 0x01b3
+packetLen(0x01b3, 67) // ZC_SHOW_IMAGE2
+
+// Packet: 0x01b4
+packetLen(0x01b4, 12) // ZC_CHANGE_GUILD
+
+// Packet: 0x01b5
+packetLen(0x01b5, 18) // SC_BILLING_INFO
+
+// Packet: 0x01b6
+packetLen(0x01b6, 114) // ZC_GUILD_INFO2
+
+// Packet: 0x01b7
+packetLen(0x01b7, 6) // CZ_GUILD_ZENY
+
+// Packet: 0x01b8
+packetLen(0x01b8, 3) // ZC_GUILD_ZENY_ACK
+
+// Packet: 0x01b9
+packetLen(0x01b9, 6) // ZC_DISPEL
+
+// Packet: 0x01ba
+packetLen(0x01ba, 26) // CZ_REMOVE_AID
+
+// Packet: 0x01bb
+packetLen(0x01bb, 26) // CZ_SHIFT
+
+// Packet: 0x01bc
+packetLen(0x01bc, 26) // CZ_RECALL
+
+// Packet: 0x01bd
+packetLen(0x01bd, 26) // CZ_RECALL_GID
+
+// Packet: 0x01be
+packetLen(0x01be, 2) // AC_ASK_PNGAMEROOM
+
+// Packet: 0x01bf
+packetLen(0x01bf, 3) // CA_REPLY_PNGAMEROOM
+
+// Packet: 0x01c0
+packetLen(0x01c0, 2) // CZ_REQ_REMAINTIME
+
+// Packet: 0x01c1
+packetLen(0x01c1, 14) // ZC_REPLY_REMAINTIME
+
+// Packet: 0x01c2
+packetLen(0x01c2, 10) // ZC_INFO_REMAINTIME
+
+// Packet: 0x01c3
+packetLen(0x01c3, -1) // ZC_BROADCAST2
+
+// Packet: 0x01c4
+packetLen(0x01c4, 32) // ZC_ADD_ITEM_TO_STORE2
+
+// Packet: 0x01c5
+packetLen(0x01c5, 32) // ZC_ADD_ITEM_TO_CART2
+
+// Packet: 0x01c6
+packetLen(0x01c6, 4) // CS_REQ_ENCRYPTION
+
+// Packet: 0x01c7
+packetLen(0x01c7, 2) // SC_ACK_ENCRYPTION
+
+// Packet: 0x01c8
+packetLen(0x01c8, 15) // ZC_USE_ITEM_ACK2
+
+// Packet: 0x01c9
+packetLen(0x01c9, 97) // ZC_SKILL_ENTRY2
+
+// Packet: 0x01ca
+packetLen(0x01ca, 3) // CZ_REQMAKINGHOMUN
+
+// Packet: 0x01cb
+packetLen(0x01cb, 9) // CZ_MONSTER_TALK
+
+// Packet: 0x01cc
+packetLen(0x01cc, 9) // ZC_MONSTER_TALK
+
+// Packet: 0x01cd
+packetLen(0x01cd, 30) // ZC_AUTOSPELLLIST
+
+// Packet: 0x01ce
+packetLen(0x01ce, 6) // CZ_SELECTAUTOSPELL
+
+// Packet: 0x01cf
+packetLen(0x01cf, 28) // ZC_DEVOTIONLIST
+
+// Packet: 0x01d0
+packetLen(0x01d0, 8) // ZC_SPIRITS
+
+// Packet: 0x01d1
+packetLen(0x01d1, 14) // ZC_BLADESTOP
+
+// Packet: 0x01d2
+packetLen(0x01d2, 10) // ZC_COMBODELAY
+
+// Packet: 0x01d3
+packetLen(0x01d3, 35) // ZC_SOUND
+
+// Packet: 0x01d4
+packetLen(0x01d4, 6) // ZC_OPEN_EDITDLGSTR
+
+// Packet: 0x01d5
+packetLen(0x01d5, -1) // CZ_INPUT_EDITDLGSTR
+
+// Packet: 0x01d6
+packetLen(0x01d6, 4) // ZC_NOTIFY_MAPPROPERTY2
+
+// Packet: 0x01d7
+packetLen(0x01d7, 15) // ZC_SPRITE_CHANGE2
+
+// Packet: 0x01d8
+packetLen(0x01d8, 58) // ZC_NOTIFY_STANDENTRY2
+
+// Packet: 0x01d9
+packetLen(0x01d9, 57) // ZC_NOTIFY_NEWENTRY2
+
+// Packet: 0x01da
+packetLen(0x01da, 64) // ZC_NOTIFY_MOVEENTRY2
+
+// Packet: 0x01db
+packetLen(0x01db, 2) // CA_REQ_HASH
+
+// Packet: 0x01dc
+packetLen(0x01dc, -1) // AC_ACK_HASH
+
+// Packet: 0x01dd
+packetLen(0x01dd, 47) // CA_LOGIN2
+
+// Packet: 0x01de
+packetLen(0x01de, 33) // ZC_NOTIFY_SKILL2
+
+// Packet: 0x01df
+packetLen(0x01df, 6) // CZ_REQ_ACCOUNTNAME
+
+// Packet: 0x01e0
+packetLen(0x01e0, 30) // ZC_ACK_ACCOUNTNAME
+
+// Packet: 0x01e1
+packetLen(0x01e1, 8) // ZC_SPIRITS2
+
+// Packet: 0x01e2
+packetLen(0x01e2, 34) // ZC_REQ_COUPLE
+
+// Packet: 0x01e3
+packetLen(0x01e3, 14) // CZ_JOIN_COUPLE
+
+// Packet: 0x01e4
+packetLen(0x01e4, 2) // ZC_START_COUPLE
+
+// Packet: 0x01e5
+packetLen(0x01e5, 6) // CZ_REQ_JOIN_COUPLE
+
+// Packet: 0x01e6
+packetLen(0x01e6, 26) // ZC_COUPLENAME
+
+// Packet: 0x01e7
+packetLen(0x01e7, 2) // CZ_DORIDORI
+
+// Packet: 0x01e8
+packetLen(0x01e8, 28) // CZ_MAKE_GROUP2
+
+// Packet: 0x01e9
+packetLen(0x01e9, 81) // ZC_ADD_MEMBER_TO_GROUP2
+
+// Packet: 0x01ea
+packetLen(0x01ea, 6) // ZC_CONGRATULATION
+
+// Packet: 0x01eb
+packetLen(0x01eb, 10) // ZC_NOTIFY_POSITION_TO_GUILDM
+
+// Packet: 0x01ec
+packetLen(0x01ec, 26) // ZC_GUILD_MEMBER_MAP_CHANGE
+
+// Packet: 0x01ed
+packetLen(0x01ed, 2) // CZ_CHOPOKGI
+
+// Packet: 0x01ee
+packetLen(0x01ee, -1) // ZC_NORMAL_ITEMLIST2
+
+// Packet: 0x01ef
+packetLen(0x01ef, -1) // ZC_CART_NORMAL_ITEMLIST2
+
+// Packet: 0x01f0
+packetLen(0x01f0, -1) // ZC_STORE_NORMAL_ITEMLIST2
+
+// Packet: 0x01f1
+packetLen(0x01f1, -1) // AC_NOTIFY_ERROR
+
+// Packet: 0x01f2
+packetLen(0x01f2, 20) // ZC_UPDATE_CHARSTAT2
+
+// Packet: 0x01f3
+packetLen(0x01f3, 10) // ZC_NOTIFY_EFFECT2
+
+// Packet: 0x01f4
+packetLen(0x01f4, 32) // ZC_REQ_EXCHANGE_ITEM2
+
+// Packet: 0x01f5
+packetLen(0x01f5, 9) // ZC_ACK_EXCHANGE_ITEM2
+
+// Packet: 0x01f6
+packetLen(0x01f6, 34) // ZC_REQ_BABY
+
+// Packet: 0x01f7
+packetLen(0x01f7, 14) // CZ_JOIN_BABY
+
+// Packet: 0x01f8
+packetLen(0x01f8, 2) // ZC_START_BABY
+
+// Packet: 0x01f9
+packetLen(0x01f9, 6) // CZ_REQ_JOIN_BABY
+
+// Packet: 0x01fa
+packetLen(0x01fa, 48) // CA_LOGIN3
+
+// Packet: 0x01fb
+packetLen(0x01fb, 56) // CH_DELETE_CHAR2
+
+// Packet: 0x01fc
+packetLen(0x01fc, -1) // ZC_REPAIRITEMLIST
+
+// Packet: 0x01fd
+packetLen(0x01fd, 25) // CZ_REQ_ITEMREPAIR
+
+// Packet: 0x01fe
+packetLen(0x01fe, 5) // ZC_ACK_ITEMREPAIR
+
+// Packet: 0x01ff
+packetLen(0x01ff, 10) // ZC_HIGHJUMP
+
+// Packet: 0x0200
+packetLen(0x0200, 26) // CA_CONNECT_INFO_CHANGED
+
+// Packet: 0x0201
+packetLen(0x0201, -1) // ZC_FRIENDS_LIST
+
+// Packet: 0x0202
+packetLen(0x0202, 26) // CZ_ADD_FRIENDS
+
+// Packet: 0x0203
+packetLen(0x0203, 10) // CZ_DELETE_FRIENDS
+
+// Packet: 0x0204
+packetLen(0x0204, 18) // CA_EXE_HASHCHECK
+
+// Packet: 0x0205
+packetLen(0x0205, 26) // ZC_DIVORCE
+
+// Packet: 0x0206
+packetLen(0x0206, 35) // ZC_FRIENDS_STATE
+
+// Packet: 0x0207
+packetLen(0x0207, 34) // ZC_REQ_ADD_FRIENDS
+
+// Packet: 0x0208
+packetLen(0x0208, 14) // CZ_ACK_REQ_ADD_FRIENDS
+
+// Packet: 0x0209
+packetLen(0x0209, 36) // ZC_ADD_FRIENDS_LIST
+
+// Packet: 0x020a
+packetLen(0x020a, 10) // ZC_DELETE_FRIENDS
+
+// Packet: 0x020d
+packetLen(0x020d, -1) // HC_BLOCK_CHARACTER
+
+// Packet: 0x020e
+packetLen(0x020e, 32) // ZC_STARSKILL
+
+// Packet: 0x0212
+packetLen(0x0212, 26) // CZ_REQ_GIVE_MANNER_BYNAME
+
+// Packet: 0x0213
+packetLen(0x0213, 26) // CZ_REQ_STATUS_GM
+
+// Packet: 0x0214
+packetLen(0x0214, 42) // ZC_ACK_STATUS_GM
+
+// Packet: 0x0215
+packetLen(0x0215, 6) // ZC_SKILLMSG
+
+// Packet: 0x0216
+packetLen(0x0216, 6) // ZC_BABYMSG
+
+// Packet: 0x0217
+packetLen(0x0217, 2) // CZ_BLACKSMITH_RANK
+
+// Packet: 0x0218
+packetLen(0x0218, 2) // CZ_ALCHEMIST_RANK
+
+// Packet: 0x0219
+packetLen(0x0219, 282) // ZC_BLACKSMITH_RANK
+
+// Packet: 0x021a
+packetLen(0x021a, 282) // ZC_ALCHEMIST_RANK
+
+// Packet: 0x021b
+packetLen(0x021b, 10) // ZC_BLACKSMITH_POINT
+
+// Packet: 0x021c
+packetLen(0x021c, 10) // ZC_ALCHEMIST_POINT
+
+// Packet: 0x021d
+packetLen(0x021d, 6) // CZ_LESSEFFECT
+
+// Packet: 0x021e
+packetLen(0x021e, 6) // ZC_LESSEFFECT
+
+// Packet: 0x021f
+packetLen(0x021f, 66) // ZC_NOTIFY_PKINFO
+
+// Packet: 0x0220
+packetLen(0x0220, 10) // ZC_NOTIFY_CRAZYKILLER
+
+// Packet: 0x0221
+packetLen(0x0221, -1) // ZC_NOTIFY_WEAPONITEMLIST
+
+// Packet: 0x0222
+packetLen(0x0222, 6) // CZ_REQ_WEAPONREFINE
+
+// Packet: 0x0223
+packetLen(0x0223, 10) // ZC_ACK_WEAPONREFINE
+
+// Packet: 0x0224
+packetLen(0x0224, 10) // ZC_TAEKWON_POINT
+
+// Packet: 0x0225
+packetLen(0x0225, 2) // CZ_TAEKWON_RANK
+
+// Packet: 0x0226
+packetLen(0x0226, 282) // ZC_TAEKWON_RANK
+
+// Packet: 0x0227
+packetLen(0x0227, 18) // ZC_GAME_GUARD
+
+// Packet: 0x0228
+packetLen(0x0228, 18) // CZ_ACK_GAME_GUARD
+
+// Packet: 0x0229
+packetLen(0x0229, 15) // ZC_STATE_CHANGE3
+
+// Packet: 0x022a
+packetLen(0x022a, 62) // ZC_NOTIFY_STANDENTRY3
+
+// Packet: 0x022b
+packetLen(0x022b, 61) // ZC_NOTIFY_NEWENTRY3
+
+// Packet: 0x022c
+packetLen(0x022c, 69) // ZC_NOTIFY_MOVEENTRY3
+
+// Packet: 0x022d
+packetLen(0x022d, 5) // CZ_COMMAND_MER
+
+// Packet: 0x022e
+packetLen(0x022e, 73) // ZC_PROPERTY_HOMUN
+
+// Packet: 0x022f
+packetLen(0x022f, 7) // ZC_FEED_MER
+
+// Packet: 0x0230
+packetLen(0x0230, 12) // ZC_CHANGESTATE_MER
+
+// Packet: 0x0231
+packetLen(0x0231, 26) // CZ_RENAME_MER
+
+// Packet: 0x0232
+packetLen(0x0232, 9) // CZ_REQUEST_MOVENPC
+
+// Packet: 0x0233
+packetLen(0x0233, 11) // CZ_REQUEST_ACTNPC
+
+// Packet: 0x0234
+packetLen(0x0234, 6) // CZ_REQUEST_MOVETOOWNER
+
+// Packet: 0x0235
+packetLen(0x0235, -1) // ZC_HOSKILLINFO_LIST
+
+// Packet: 0x0236
+packetLen(0x0236, 10) // ZC_KILLER_POINT
+
+// Packet: 0x0237
+packetLen(0x0237, 2) // CZ_KILLER_RANK
+
+// Packet: 0x0238
+packetLen(0x0238, 282) // ZC_KILLER_RANK
+
+// Packet: 0x0239
+packetLen(0x0239, 11) // ZC_HOSKILLINFO_UPDATE
+
+// Packet: 0x023a
+packetLen(0x023a, 4) // ZC_REQ_STORE_PASSWORD
+
+// Packet: 0x023b
+packetLen(0x023b, 36) // CZ_ACK_STORE_PASSWORD
+
+// Packet: 0x023c
+packetLen(0x023c, 6) // ZC_RESULT_STORE_PASSWORD
+
+// Packet: 0x023d
+packetLen(0x023d, 6) // AC_EVENT_RESULT
+
+// Packet: 0x023e
+packetLen(0x023e, 8) // HC_REQUEST_CHARACTER_PASSWORD
+
+// Packet: 0x023f
+packetLen(0x023f, 2) // CZ_MAIL_GET_LIST
+
+// Packet: 0x0240
+packetLen(0x0240, -1) // ZC_MAIL_REQ_GET_LIST
+
+// Packet: 0x0241
+packetLen(0x0241, 6) // CZ_MAIL_OPEN
+
+// Packet: 0x0242
+packetLen(0x0242, -1) // ZC_MAIL_REQ_OPEN
+
+// Packet: 0x0243
+packetLen(0x0243, 6) // CZ_MAIL_DELETE
+
+// Packet: 0x0244
+packetLen(0x0244, 6) // CZ_MAIL_GET_ITEM
+
+// Packet: 0x0245
+packetLen(0x0245, 3) // ZC_MAIL_REQ_GET_ITEM
+
+// Packet: 0x0246
+packetLen(0x0246, 4) // CZ_MAIL_RESET_ITEM
+
+// Packet: 0x0247
+packetLen(0x0247, 8) // CZ_MAIL_ADD_ITEM
+
+// Packet: 0x0248
+packetLen(0x0248, -1) // CZ_MAIL_SEND
+
+// Packet: 0x0249
+packetLen(0x0249, 3) // ZC_MAIL_REQ_SEND
+
+// Packet: 0x024a
+packetLen(0x024a, 70) // ZC_MAIL_RECEIVE
+
+// Packet: 0x024b
+packetLen(0x024b, 4) // CZ_AUCTION_CREATE
+
+// Packet: 0x024c
+packetLen(0x024c, 8) // CZ_AUCTION_ADD_ITEM
+
+// Packet: 0x024d
+packetLen(0x024d, 12) // CZ_AUCTION_ADD
+
+// Packet: 0x024e
+packetLen(0x024e, 6) // CZ_AUCTION_ADD_CANCEL
+
+// Packet: 0x024f
+packetLen(0x024f, 10) // CZ_AUCTION_BUY
+
+// Packet: 0x0250
+packetLen(0x0250, 3) // ZC_AUCTION_RESULT
+
+// Packet: 0x0251
+packetLen(0x0251, 34) // CZ_AUCTION_ITEM_SEARCH
+
+// Packet: 0x0252
+packetLen(0x0252, -1) // ZC_AUCTION_ITEM_REQ_SEARCH
+
+// Packet: 0x0253
+packetLen(0x0253, 3) // ZC_STARPLACE
+
+// Packet: 0x0254
+packetLen(0x0254, 3) // CZ_AGREE_STARPLACE
+
+// Packet: 0x0255
+packetLen(0x0255, 5) // ZC_ACK_MAIL_ADD_ITEM
+
+// Packet: 0x0256
+packetLen(0x0256, 5) // ZC_ACK_AUCTION_ADD_ITEM
+
+// Packet: 0x0257
+packetLen(0x0257, 8) // ZC_ACK_MAIL_DELETE
+
+// Packet: 0x0258
+packetLen(0x0258, 2) // CA_REQ_GAME_GUARD_CHECK
+
+// Packet: 0x0259
+packetLen(0x0259, 3) // AC_ACK_GAME_GUARD
+
+// Packet: 0x025a
+packetLen(0x025a, -1) // ZC_MAKINGITEM_LIST
+
+// Packet: 0x025b
+packetLen(0x025b, 8) // CZ_REQ_MAKINGITEM
+
+// Packet: 0x025c
+packetLen(0x025c, 4) // CZ_AUCTION_REQ_MY_INFO
+
+// Packet: 0x025d
+packetLen(0x025d, 6) // CZ_AUCTION_REQ_MY_SELL_STOP
+
+// Packet: 0x025e
+packetLen(0x025e, 4) // ZC_AUCTION_ACK_MY_SELL_STOP
+
+// Packet: 0x025f
+packetLen(0x025f, 6) // ZC_AUCTION_WINDOWS
+
+// Packet: 0x0260
+packetLen(0x0260, 6) // ZC_MAIL_WINDOWS
+
+// Packet: 0x0261
+packetLen(0x0261, 11) // AC_REQ_LOGIN_OLDEKEY
+
+// Packet: 0x0262
+packetLen(0x0262, 11) // AC_REQ_LOGIN_NEWEKEY
+
+// Packet: 0x0263
+packetLen(0x0263, 11) // AC_REQ_LOGIN_CARDPASS
+
+// Packet: 0x0264
+packetLen(0x0264, 20) // CA_ACK_LOGIN_OLDEKEY
+
+// Packet: 0x0265
+packetLen(0x0265, 20) // CA_ACK_LOGIN_NEWEKEY
+
+// Packet: 0x0266
+packetLen(0x0266, 30) // CA_ACK_LOGIN_CARDPASS
+
+// Packet: 0x0267
+packetLen(0x0267, 4) // AC_ACK_EKEY_FAIL_NOTEXIST
+
+// Packet: 0x0268
+packetLen(0x0268, 4) // AC_ACK_EKEY_FAIL_NOTUSESEKEY
+
+// Packet: 0x0269
+packetLen(0x0269, 4) // AC_ACK_EKEY_FAIL_NOTUSEDEKEY
+
+// Packet: 0x026a
+packetLen(0x026a, 4) // AC_ACK_EKEY_FAIL_AUTHREFUSE
+
+// Packet: 0x026b
+packetLen(0x026b, 4) // AC_ACK_EKEY_FAIL_INPUTEKEY
+
+// Packet: 0x026c
+packetLen(0x026c, 4) // AC_ACK_EKEY_FAIL_NOTICE
+
+// Packet: 0x026d
+packetLen(0x026d, 4) // AC_ACK_EKEY_FAIL_NEEDCARDPASS
+
+// Packet: 0x026f
+packetLen(0x026f, 2) // AC_ACK_FIRST_LOGIN
+
+// Packet: 0x0270
+packetLen(0x0270, 2) // AC_REQ_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0271
+packetLen(0x0271, 40) // CA_ACK_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0272
+packetLen(0x0272, 44) // AC_ACK_PT_ID_INFO
+
+// Packet: 0x0273
+packetLen(0x0273, 30) // CZ_REQ_MAIL_RETURN
+
+// Packet: 0x0274
+packetLen(0x0274, 8) // ZC_ACK_MAIL_RETURN
+
+// Packet: 0x0275
+packetLen(0x0275, 37) // CH_ENTER2
+
+// Packet: 0x0276
+packetLen(0x0276, -1) // AC_ACCEPT_LOGIN2
+
+// Packet: 0x0277
+packetLen(0x0277, 84) // CA_LOGIN_PCBANG
+
+// Packet: 0x0278
+packetLen(0x0278, 2) // ZC_NOTIFY_PCBANG
+
+// Packet: 0x0279
+packetLen(0x0279, 2) // CZ_HUNTINGLIST
+
+// Packet: 0x027a
+packetLen(0x027a, -1) // ZC_HUNTINGLIST
+
+// Packet: 0x027b
+packetLen(0x027b, 14) // ZC_PCBANG_EFFECT
+
+// Packet: 0x027c
+packetLen(0x027c, 60) // CA_LOGIN4
+
+// Packet: 0x027d
+packetLen(0x027d, 62) // ZC_PROPERTY_MERCE
+
+// Packet: 0x027e
+packetLen(0x027e, -1) // ZC_SHANDA_PROTECT
+
+// Packet: 0x027f
+packetLen(0x027f, 8) // CA_CLIENT_TYPE
+
+// Packet: 0x0280
+packetLen(0x0280, 12) // ZC_GANGSI_POINT
+
+// Packet: 0x0281
+packetLen(0x0281, 4) // CZ_GANGSI_RANK
+
+// Packet: 0x0282
+packetLen(0x0282, 284) // ZC_GANGSI_RANK
+
+// Packet: 0x0283
+packetLen(0x0283, 6) // ZC_AID
+
+// Packet: 0x0284
+packetLen(0x0284, 14) // ZC_NOTIFY_EFFECT3
+
+// Packet: 0x0285
+packetLen(0x0285, 6) // ZC_DEATH_QUESTION
+
+// Packet: 0x0286
+packetLen(0x0286, 4) // CZ_DEATH_QUESTION
+
+// Packet: 0x0287
+packetLen(0x0287, -1) // ZC_PC_CASH_POINT_ITEMLIST
+
+// Packet: 0x0288
+packetLen(0x0288, -1) // CZ_PC_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0289
+packetLen(0x0289, 12) // ZC_PC_CASH_POINT_UPDATE
+
+// Packet: 0x028a
+packetLen(0x028a, 18) // ZC_NPC_SHOWEFST_UPDATE
+
+// Packet: 0x028b
+packetLen(0x028b, -1) // HC_CHARNOTBEENSELECTED
+
+// Packet: 0x028c
+packetLen(0x028c, 46) // CH_SELECT_CHAR_GOINGTOBEUSED
+
+// Packet: 0x028d
+packetLen(0x028d, 34) // CH_REQ_IS_VALID_CHARNAME
+
+// Packet: 0x028e
+packetLen(0x028e, 4) // HC_ACK_IS_VALID_CHARNAME
+
+// Packet: 0x028f
+packetLen(0x028f, 6) // CH_REQ_CHANGE_CHARNAME
+
+// Packet: 0x0290
+packetLen(0x0290, 4) // HC_ACK_CHANGE_CHARNAME
+
+// Packet: 0x0291
+packetLen(0x0291, 4) // ZC_MSG
+
+// Packet: 0x0292
+packetLen(0x0292, 2) // CZ_STANDING_RESURRECTION
+
+// Packet: 0x0293
+packetLen(0x0293, 70) // ZC_BOSS_INFO
+
+// Packet: 0x0294
+packetLen(0x0294, 10) // ZC_READ_BOOK
+
+// Packet: 0x0295
+packetLen(0x0295, -1) // ZC_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0296
+packetLen(0x0296, -1) // ZC_STORE_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0297
+packetLen(0x0297, -1) // ZC_CART_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0298
+packetLen(0x0298, 10) // ZC_CASH_TIME_COUNTER
+
+// Packet: 0x0299
+packetLen(0x0299, 8) // ZC_CASH_ITEM_DELETE
+
+// Packet: 0x029a
+packetLen(0x029a, 37) // ZC_ITEM_PICKUP_ACK2
+
+// Packet: 0x029b
+packetLen(0x029b, 80) // ZC_MER_INIT
+
+// Packet: 0x029c
+packetLen(0x029c, 66) // ZC_MER_PROPERTY
+
+// Packet: 0x029d
+packetLen(0x029d, -1) // ZC_MER_SKILLINFO_LIST
+
+// Packet: 0x029e
+packetLen(0x029e, 11) // ZC_MER_SKILLINFO_UPDATE
+
+// Packet: 0x029f
+packetLen(0x029f, 3) // CZ_MER_COMMAND
+
+// Packet: 0x02a2
+packetLen(0x02a2, 8) // ZC_MER_PAR_CHANGE
+
+// Packet: 0x02a5
+packetLen(0x02a5, 8) // CZ_KSY_EVENT
+
+// Packet: 0x02a6
+packetLen(0x02a6, -1) // ZC_HACKSH_CPX_MSG
+
+// Packet: 0x02a7
+packetLen(0x02a7, -1) // CZ_HACKSH_CPX_MSG
+
+// Packet: 0x02aa
+packetLen(0x02aa, 4) // ZC_REQ_CASH_PASSWORD
+
+// Packet: 0x02ab
+packetLen(0x02ab, 36) // CZ_ACK_CASH_PASSWORD
+
+// Packet: 0x02ac
+packetLen(0x02ac, 6) // ZC_RESULT_CASH_PASSWORD
+
+// Packet: 0x02ad
+packetLen(0x02ad, 8) // AC_REQUEST_SECOND_PASSWORD
+
+// Packet: 0x02b0
+packetLen(0x02b0, 85) // CA_LOGIN_HAN
+
+// Packet: 0x02b1
+packetLen(0x02b1, -1) // ZC_ALL_QUEST_LIST
+
+// Packet: 0x02b2
+packetLen(0x02b2, -1) // ZC_ALL_QUEST_MISSION
+
+// Packet: 0x02b3
+packetLen(0x02b3, 107) // ZC_ADD_QUEST
+
+// Packet: 0x02b4
+packetLen(0x02b4, 6) // ZC_DEL_QUEST
+
+// Packet: 0x02b5
+packetLen(0x02b5, -1) // ZC_UPDATE_MISSION_HUNT
+
+// Packet: 0x02b6
+packetLen(0x02b6, 7) // CZ_ACTIVE_QUEST
+
+// Packet: 0x02b7
+packetLen(0x02b7, 7) // ZC_ACTIVE_QUEST
+
+// Packet: 0x02b8
+packetLen(0x02b8, 32) // ZC_ITEM_PICKUP_PARTY
+
+// Packet: 0x02b9
+packetLen(0x02b9, 191) // ZC_SHORTCUT_KEY_LIST
+
+// Packet: 0x02ba
+packetLen(0x02ba, 11) // CZ_SHORTCUT_KEY_CHANGE
+
+// Packet: 0x02bb
+packetLen(0x02bb, 8) // ZC_EQUIPITEM_DAMAGED
+
+// Packet: 0x02bc
+packetLen(0x02bc, 6) // ZC_NOTIFY_PCBANG_PLAYING_TIME
+
+// Packet: 0x02c1
+packetLen(0x02c1, -1) // ZC_NPC_CHAT
+
+// Packet: 0x02c2
+packetLen(0x02c2, -1) // ZC_FORMATSTRING_MSG
+
+// Packet: 0x02c4
+packetLen(0x02c4, 26) // CZ_PARTY_JOIN_REQ
+
+// Packet: 0x02c5
+packetLen(0x02c5, 30) // ZC_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c6
+packetLen(0x02c6, 30) // ZC_PARTY_JOIN_REQ
+
+// Packet: 0x02c7
+packetLen(0x02c7, 7) // CZ_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c8
+packetLen(0x02c8, 3) // CZ_PARTY_CONFIG
+
+// Packet: 0x02c9
+packetLen(0x02c9, 3) // ZC_PARTY_CONFIG
+
+// Packet: 0x02ca
+packetLen(0x02ca, 3) // HC_REFUSE_SELECTCHAR
+
+// Packet: 0x02cb
+packetLen(0x02cb, 65) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_INFO
+
+// Packet: 0x02cc
+packetLen(0x02cc, 4) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_NOTIFY
+
+// Packet: 0x02cd
+packetLen(0x02cd, 71) // ZC_MEMORIALDUNGEON_INFO
+
+// Packet: 0x02ce
+packetLen(0x02ce, 10) // ZC_MEMORIALDUNGEON_NOTIFY
+
+// Packet: 0x02cf
+packetLen(0x02cf, 6) // CZ_MEMORIALDUNGEON_COMMAND
+
+// Packet: 0x02d0
+packetLen(0x02d0, -1) // ZC_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d1
+packetLen(0x02d1, -1) // ZC_STORE_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d2
+packetLen(0x02d2, -1) // ZC_CART_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d3
+packetLen(0x02d3, 4) // ZC_NOTIFY_BIND_ON_EQUIP
+
+// Packet: 0x02d4
+packetLen(0x02d4, 39) // ZC_ITEM_PICKUP_ACK3
+
+// Packet: 0x02d5
+packetLen(0x02d5, 2) // ZC_ISVR_DISCONNECT
+
+// Packet: 0x02d6
+packetLen(0x02d6, 6) // CZ_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d7
+packetLen(0x02d7, -1) // ZC_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d8
+packetLen(0x02d8, 10) // CZ_CONFIG
+
+// Packet: 0x02d9
+packetLen(0x02d9, 10) // ZC_CONFIG
+
+// Packet: 0x02da
+packetLen(0x02da, 3) // ZC_CONFIG_NOTIFY
+
+// Packet: 0x02db
+packetLen(0x02db, -1) // CZ_BATTLEFIELD_CHAT
+
+// Packet: 0x02dc
+packetLen(0x02dc, -1) // ZC_BATTLEFIELD_CHAT
+
+// Packet: 0x02dd
+packetLen(0x02dd, 32) // ZC_BATTLEFIELD_NOTIFY_CAMPINFO
+
+// Packet: 0x02de
+packetLen(0x02de, 6) // ZC_BATTLEFIELD_NOTIFY_POINT
+
+// Packet: 0x02df
+packetLen(0x02df, 36) // ZC_BATTLEFIELD_NOTIFY_POSITION
+
+// Packet: 0x02e0
+packetLen(0x02e0, 34) // ZC_BATTLEFIELD_NOTIFY_HP
+
+// Packet: 0x02e1
+packetLen(0x02e1, 33) // ZC_NOTIFY_ACT2
+
+// Packet: 0x02e2
+packetLen(0x02e2, 20) // CZ_USE_ITEM_NEW_JAPEN
+
+// Packet: 0x02e3
+packetLen(0x02e3, 22) // CZ_USE_SKILL_NEW_JAPEN
+
+// Packet: 0x02e4
+packetLen(0x02e4, 11) // CZ_ITEM_PICKUP_NEW_JAPEN
+
+// Packet: 0x02e5
+packetLen(0x02e5, 9) // CZ_REQUEST_MOVE_NEW_JAPEN
+
+// Packet: 0x02e6
+packetLen(0x02e6, 6) // CZ_BOT_CHECK
+
+// Packet: 0x02e7
+packetLen(0x02e7, -1) // ZC_MAPPROPERTY
+
+// Packet: 0x02e8
+packetLen(0x02e8, -1) // ZC_NORMAL_ITEMLIST3
+
+// Packet: 0x02e9
+packetLen(0x02e9, -1) // ZC_CART_NORMAL_ITEMLIST3
+
+// Packet: 0x02ea
+packetLen(0x02ea, -1) // ZC_STORE_NORMAL_ITEMLIST3
+
+// Packet: 0x02eb
+packetLen(0x02eb, 13) // ZC_ACCEPT_ENTER2
+
+// Packet: 0x02ec
+packetLen(0x02ec, 71) // ZC_NOTIFY_MOVEENTRY4
+
+// Packet: 0x02ed
+packetLen(0x02ed, 63) // ZC_NOTIFY_NEWENTRY4
+
+// Packet: 0x02ee
+packetLen(0x02ee, 64) // ZC_NOTIFY_STANDENTRY4
+
+// Packet: 0x02ef
+packetLen(0x02ef, 8) // ZC_NOTIFY_FONT
+
+// Packet: 0x02f0
+packetLen(0x02f0, 10) // ZC_PROGRESS
+
+// Packet: 0x02f1
+packetLen(0x02f1, 2) // CZ_PROGRESS
+
+// Packet: 0x02f2
+packetLen(0x02f2, 2) // ZC_PROGRESS_CANCEL
+
+// Packet: 0x02f3
+packetLen(0x02f3, -1) // CZ_IRMAIL_SEND
+
+// Packet: 0x02f4
+packetLen(0x02f4, 3) // ZC_IRMAIL_SEND_RES
+
+// Packet: 0x02f5
+packetLen(0x02f5, 7) // ZC_IRMAIL_NOTIFY
+
+// Packet: 0x02f6
+packetLen(0x02f6, 7) // CZ_IRMAIL_LIST
+
+// Packet: 0x035c
+packetLen(0x035c, 2) // CZ_OPEN_SIMPLE_CASHSHOP_ITEMLIST
+
+// Packet: 0x035d
+packetLen(0x035d, -1) // ZC_SIMPLE_CASHSHOP_POINT_ITEMLIST
+
+// Packet: 0x035e
+packetLen(0x035e, 2) // CZ_CLOSE_WINDOW
+
+// Packet: 0x035f
+packetLen(0x035f, 5) // CZ_REQUEST_MOVE2
+
+// Packet: 0x0360
+packetLen(0x0360, 6) // CZ_REQUEST_TIME2
+
+// Packet: 0x0361
+packetLen(0x0361, 5) // CZ_CHANGE_DIRECTION2
+
+// Packet: 0x0362
+packetLen(0x0362, 6) // CZ_ITEM_PICKUP2
+
+// Packet: 0x0363
+packetLen(0x0363, 6) // CZ_ITEM_THROW2
+
+// Packet: 0x0364
+packetLen(0x0364, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_STORE2
+
+// Packet: 0x0365
+packetLen(0x0365, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY2
+
+// Packet: 0x0366
+packetLen(0x0366, 10) // CZ_USE_SKILL_TOGROUND2
+
+// Packet: 0x0367
+packetLen(0x0367, 90) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2
+
+// Packet: 0x0368
+packetLen(0x0368, 6) // CZ_REQNAME2
+
+// Packet: 0x0369
+packetLen(0x0369, 6) // CZ_REQNAME_BYGID2
+
+// Packet: 0x03dd
+packetLen(0x03dd, 18) // AHC_GAME_GUARD
+
+// Packet: 0x03de
+packetLen(0x03de, 18) // CAH_ACK_GAME_GUARD
+
+// Packet: 0x0436
+packetLen(0x0436, 19) // CZ_ENTER2
+
+// Packet: 0x0437
+packetLen(0x0437, 7) // CZ_REQUEST_ACT2
+
+// Packet: 0x0438
+packetLen(0x0438, 10) // CZ_USE_SKILL2
+
+// Packet: 0x0439
+packetLen(0x0439, 8) // CZ_USE_ITEM2
+
+// Packet: 0x043d
+packetLen(0x043d, 8) // ZC_SKILL_POSTDELAY
+
+// Packet: 0x043e
+packetLen(0x043e, -1) // ZC_SKILL_POSTDELAY_LIST
+
+// Packet: 0x043f
+packetLen(0x043f, 25) // ZC_MSG_STATE_CHANGE2
+
+// Packet: 0x0440
+packetLen(0x0440, 10) // ZC_MILLENNIUMSHIELD
+
+// Packet: 0x0441
+packetLen(0x0441, 4) // ZC_SKILLINFO_DELETE
+
+// Packet: 0x0442
+packetLen(0x0442, -1) // ZC_SKILL_SELECT_REQUEST
+
+// Packet: 0x0443
+packetLen(0x0443, 8) // CZ_SKILL_SELECT_RESPONSE
+
+// Packet: 0x0444
+packetLen(0x0444, -1) // ZC_SIMPLE_CASH_POINT_ITEMLIST
+
+// Packet: 0x0445
+packetLen(0x0445, 12) // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0446
+packetLen(0x0446, 14) // ZC_QUEST_NOTIFY_EFFECT
+
+// Packet: 0x0447
+packetLen(0x0447, 2) // CZ_BLOCKING_PLAY_CANCEL
+
+// Packet: 0x0448
+packetLen(0x0448, -1) // HC_CHARACTER_LIST
+
+// Packet: 0x0449
+packetLen(0x0449, 4) // ZC_HACKSH_ERROR_MSG
+
+// Packet: 0x044a
+packetLen(0x044a, 6) // CZ_CLIENT_VERSION
+
+// Packet: 0x044b
+packetLen(0x044b, 2) // CZ_CLOSE_SIMPLECASH_SHOP
+
+// Packet: 0x07d7
+packetLen(0x07d7, 8) // CZ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d8
+packetLen(0x07d8, 8) // ZC_REQ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d9
+packetLen(0x07d9, 268) // ZC_SHORTCUT_KEY_LIST_V2
+
+// Packet: 0x07da
+packetLen(0x07da, 6) // CZ_CHANGE_GROUP_MASTER
+
+// Packet: 0x07db
+packetLen(0x07db, 8) // ZC_HO_PAR_CHANGE
+
+// Packet: 0x07dc
+packetLen(0x07dc, 6) // CZ_SEEK_PARTY
+
+// Packet: 0x07dd
+packetLen(0x07dd, 54) // ZC_SEEK_PARTY
+
+// Packet: 0x07de
+packetLen(0x07de, 30) // CZ_SEEK_PARTY_MEMBER
+
+// Packet: 0x07df
+packetLen(0x07df, 54) // ZC_SEEK_PARTY_MEMBER
+
+// Packet: 0x07e0
+packetLen(0x07e0, 58) // ZC_ES_NOTI_MYINFO
+
+// Packet: 0x07e1
+packetLen(0x07e1, 15) // ZC_SKILLINFO_UPDATE2
+
+// Packet: 0x07e2
+packetLen(0x07e2, 8) // ZC_MSG_VALUE
+
+// Packet: 0x07e3
+packetLen(0x07e3, 6) // ZC_ITEMLISTWIN_OPEN
+
+// Packet: 0x07e4
+packetLen(0x07e4, -1) // CZ_ITEMLISTWIN_RES
+
+// Packet: 0x07e5
+packetLen(0x07e5, 4) // CH_ENTER_CHECKBOT
+
+// Packet: 0x07e6
+packetLen(0x07e6, 8) // ZC_MSG_SKILL
+
+// Packet: 0x07e7
+packetLen(0x07e7, 32) // CH_CHECKBOT
+
+// Packet: 0x07e8
+packetLen(0x07e8, -1) // HC_CHECKBOT
+
+// Packet: 0x07e9
+packetLen(0x07e9, 5) // HC_CHECKBOT_RESULT
+
+// Packet: 0x07ea
+packetLen(0x07ea, 2) // CZ_BATTLE_FIELD_LIST
+
+// Packet: 0x07eb
+packetLen(0x07eb, -1) // ZC_BATTLE_FIELD_LIST
+
+// Packet: 0x07ec
+packetLen(0x07ec, 8) // CZ_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ed
+packetLen(0x07ed, 10) // ZC_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ee
+packetLen(0x07ee, 6) // CZ_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07ef
+packetLen(0x07ef, 8) // ZC_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07f0
+packetLen(0x07f0, 6) // CZ_REQ_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f1
+packetLen(0x07f1, 18) // ZC_ACK_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f2
+packetLen(0x07f2, 8) // ZC_BATTLE_NOTI_START_STEP
+
+// Packet: 0x07f3
+packetLen(0x07f3, 6) // ZC_BATTLE_JOIN_NOTI_DEFER
+
+// Packet: 0x07f4
+packetLen(0x07f4, 3) // ZC_BATTLE_JOIN_DISABLE_STATE
+
+// Packet: 0x07f5
+packetLen(0x07f5, 6) // CZ_GM_FULLSTRIP
+
+// Packet: 0x07f6
+packetLen(0x07f6, 14) // ZC_NOTIFY_EXP
+
+// Packet: 0x07f7
+packetLen(0x07f7, -1) // ZC_NOTIFY_MOVEENTRY7
+
+// Packet: 0x07f8
+packetLen(0x07f8, -1) // ZC_NOTIFY_NEWENTRY5
+
+// Packet: 0x07f9
+packetLen(0x07f9, -1) // ZC_NOTIFY_STANDENTRY5
+
+// Packet: 0x07fa
+packetLen(0x07fa, 8) // ZC_DELETE_ITEM_FROM_BODY
+
+// Packet: 0x07fb
+packetLen(0x07fb, 25) // ZC_USESKILL_ACK2
+
+// Packet: 0x07fc
+packetLen(0x07fc, 10) // ZC_CHANGE_GROUP_MASTER
+
+// Packet: 0x07fd
+packetLen(0x07fd, -1) // ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN
+
+// Packet: 0x07fe
+packetLen(0x07fe, 26) // ZC_PLAY_NPC_BGM
+
+// Packet: 0x0800
+packetLen(0x0800, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0801
+packetLen(0x0801, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0802
+packetLen(0x0802, 18) // CZ_PARTY_BOOKING_REQ_REGISTER
+
+// Packet: 0x0803
+packetLen(0x0803, 4) // ZC_PARTY_BOOKING_ACK_REGISTER
+
+// Packet: 0x0804
+packetLen(0x0804, 14) // CZ_PARTY_BOOKING_REQ_SEARCH
+
+// Packet: 0x0805
+packetLen(0x0805, -1) // ZC_PARTY_BOOKING_ACK_SEARCH
+
+// Packet: 0x0806
+packetLen(0x0806, 2) // CZ_PARTY_BOOKING_REQ_DELETE
+
+// Packet: 0x0807
+packetLen(0x0807, 4) // ZC_PARTY_BOOKING_ACK_DELETE
+
+// Packet: 0x0808
+packetLen(0x0808, 14) // CZ_PARTY_BOOKING_REQ_UPDATE
+
+// Packet: 0x0809
+packetLen(0x0809, 50) // ZC_PARTY_BOOKING_NOTIFY_INSERT
+
+// Packet: 0x080a
+packetLen(0x080a, 18) // ZC_PARTY_BOOKING_NOTIFY_UPDATE
+
+// Packet: 0x080b
+packetLen(0x080b, 6) // ZC_PARTY_BOOKING_NOTIFY_DELETE
+
+// Packet: 0x080c
+packetLen(0x080c, 2) // CZ_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080d
+packetLen(0x080d, 3) // ZC_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080e
+packetLen(0x080e, 14) // ZC_NOTIFY_HP_TO_GROUPM_R2
+
+// Packet: 0x080f
+packetLen(0x080f, 30) // ZC_ADD_EXCHANGE_ITEM2
+
+// Packet: 0x0810
+packetLen(0x0810, 3) // ZC_OPEN_BUYING_STORE
+
+// Packet: 0x0811
+packetLen(0x0811, -1) // CZ_REQ_OPEN_BUYING_STORE
+
+// Packet: 0x0812
+packetLen(0x0812, 8) // ZC_FAILED_OPEN_BUYING_STORE_TO_BUYER
+
+// Packet: 0x0813
+packetLen(0x0813, -1) // ZC_MYITEMLIST_BUYING_STORE
+
+// Packet: 0x0814
+packetLen(0x0814, 86) // ZC_BUYING_STORE_ENTRY
+
+// Packet: 0x0815
+packetLen(0x0815, 2) // CZ_REQ_CLOSE_BUYING_STORE
+
+// Packet: 0x0816
+packetLen(0x0816, 6) // ZC_DISAPPEAR_BUYING_STORE_ENTRY
+
+// Packet: 0x0817
+packetLen(0x0817, 6) // CZ_REQ_CLICK_TO_BUYING_STORE
+
+// Packet: 0x0818
+packetLen(0x0818, -1) // ZC_ACK_ITEMLIST_BUYING_STORE
+
+// Packet: 0x0819
+packetLen(0x0819, -1) // CZ_REQ_TRADE_BUYING_STORE
+
+// Packet: 0x081a
+packetLen(0x081a, 4) // ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER
+
+// Packet: 0x081b
+packetLen(0x081b, 12) // ZC_UPDATE_ITEM_FROM_BUYING_STORE
+
+// Packet: 0x081c
+packetLen(0x081c, 10) // ZC_ITEM_DELETE_BUYING_STORE
+
+// Packet: 0x081d
+packetLen(0x081d, 22) // ZC_EL_INIT
+
+// Packet: 0x081e
+packetLen(0x081e, 8) // ZC_EL_PAR_CHANGE
+
+// Packet: 0x081f
+packetLen(0x081f, -1) // ZC_BROADCAST4
+
+// Packet: 0x0820
+packetLen(0x0820, 11) // ZC_COSTUME_SPRITE_CHANGE
+
+// Packet: 0x0821
+packetLen(0x0821, 2) // AC_OTP_USER
+
+// Packet: 0x0822
+packetLen(0x0822, 9) // CA_OTP_AUTH_REQ
+
+// Packet: 0x0823
+packetLen(0x0823, -1) // AC_OTP_AUTH_ACK
+
+// Packet: 0x0824
+packetLen(0x0824, 8) // ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER
+
+// Packet: 0x0825
+packetLen(0x0825, -1) // CA_SSO_LOGIN_REQ
+
+// Packet: 0x0827
+packetLen(0x0827, 6) // CH_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0828
+packetLen(0x0828, 14) // HC_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0829
+packetLen(0x0829, 12) // CH_DELETE_CHAR3
+
+// Packet: 0x082a
+packetLen(0x082a, 10) // HC_DELETE_CHAR3
+
+// Packet: 0x082b
+packetLen(0x082b, 6) // CH_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082c
+packetLen(0x082c, 10) // HC_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082d
+packetLen(0x082d, -1) // HC_ACCEPT_ENTER2
+
+// Packet: 0x0835
+packetLen(0x0835, -1) // CZ_SEARCH_STORE_INFO
+
+// Packet: 0x0836
+packetLen(0x0836, -1) // ZC_SEARCH_STORE_INFO_ACK
+
+// Packet: 0x0837
+packetLen(0x0837, 3) // ZC_SEARCH_STORE_INFO_FAILED
+
+// Packet: 0x0838
+packetLen(0x0838, 2) // CZ_SEARCH_STORE_INFO_NEXT_PAGE
+
+// Packet: 0x0839
+packetLen(0x0839, 66) // ZC_ACK_BAN_GUILD_SSO
+
+// Packet: 0x083a
+packetLen(0x083a, 5) // ZC_OPEN_SEARCH_STORE_INFO
+
+// Packet: 0x083b
+packetLen(0x083b, 2) // CZ_CLOSE_SEARCH_STORE_INFO
+
+// Packet: 0x083c
+packetLen(0x083c, 14) // CZ_SSILIST_ITEM_CLICK
+
+// Packet: 0x083d
+packetLen(0x083d, 6) // ZC_SSILIST_ITEM_CLICK_ACK
+
+// Packet: 0x083e
+packetLen(0x083e, 26) // AC_REFUSE_LOGIN2
+
+// Packet: 0x0840
+packetLen(0x0840, -1) // HC_NOTIFY_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0841
+packetLen(0x0841, 4) // CH_SELECT_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0842
+packetLen(0x0842, 6) // CZ_RECALL_SSO
+
+// Packet: 0x0843
+packetLen(0x0843, 6) // CZ_REMOVE_AID_SSO
+
+// Packet: 0x0844
+packetLen(0x0844, 2) // CZ_SE_CASHSHOP_OPEN
+
+// Packet: 0x0845
+packetLen(0x0845, 10) // ZC_SE_CASHSHOP_OPEN
+
+// Packet: 0x0846
+packetLen(0x0846, 4) // CZ_REQ_SE_CASH_TAB_CODE
+
+// Packet: 0x0847
+packetLen(0x0847, -1) // ZC_ACK_SE_CASH_ITEM_LIST
+
+// Packet: 0x0848
+packetLen(0x0848, -1) // CZ_SE_PC_BUY_CASHITEM_LIST
+
+// Packet: 0x0849
+packetLen(0x0849, 16) // ZC_SE_PC_BUY_CASHITEM_RESULT
+
+// Packet: 0x084a
+packetLen(0x084a, 2) // CZ_SE_CASHSHOP_CLOSE
+
+// Packet: 0x084b
+packetLen(0x084b, 21) // ZC_ITEM_FALL_ENTRY4
+
+// Packet: 0x084c
+packetLen(0x084c, 10) // CZ_MACRO_USE_SKILL
+
+// Packet: 0x084d
+packetLen(0x084d, 10) // CZ_MACRO_USE_SKILL_TOGROUND
+
+// Packet: 0x084e
+packetLen(0x084e, 5) // CZ_MACRO_REQUEST_MOVE
+
+// Packet: 0x084f
+packetLen(0x084f, 6) // CZ_MACRO_ITEM_PICKUP
+
+// Packet: 0x0850
+packetLen(0x0850, 7) // CZ_MACRO_REQUEST_ACT
+
+// Packet: 0x0851
+packetLen(0x0851, -1) // ZC_GPK_DYNCODE
+
+// Packet: 0x0852
+packetLen(0x0852, 2) // CZ_GPK_DYNCODE_RELOAD
+
+// Packet: 0x0853
+packetLen(0x0853, -1) // ZC_GPK_AUTH
+
+// Packet: 0x0854
+packetLen(0x0854, -1) // CZ_GPK_AUTH
+
+// Packet: 0x0855
+packetLen(0x0855, 6) // ZC_MACRO_ITEMPICKUP_FAIL
+
+// Packet: 0x0856
+packetLen(0x0856, -1) // ZC_NOTIFY_MOVEENTRY8
+
+// Packet: 0x0857
+packetLen(0x0857, -1) // ZC_NOTIFY_STANDENTRY7
+
+// Packet: 0x0858
+packetLen(0x0858, -1) // ZC_NOTIFY_NEWENTRY6
+
+// Packet: 0x0859
+packetLen(0x0859, -1) // ZC_EQUIPWIN_MICROSCOPE2
+
+// Packet: 0x085a
+packetLen(0x085a, 2) // ZC_REASSEMBLY_AUTH01
+
+// Packet: 0x085b
+packetLen(0x085b, 2) // ZC_REASSEMBLY_AUTH02
+
+// Packet: 0x085c
+packetLen(0x085c, 2) // ZC_REASSEMBLY_AUTH03
+
+// Packet: 0x085d
+packetLen(0x085d, 2) // ZC_REASSEMBLY_AUTH04
+
+// Packet: 0x085e
+packetLen(0x085e, 2) // ZC_REASSEMBLY_AUTH05
+
+// Packet: 0x085f
+packetLen(0x085f, 2) // ZC_REASSEMBLY_AUTH06
+
+// Packet: 0x0860
+packetLen(0x0860, 2) // ZC_REASSEMBLY_AUTH07
+
+// Packet: 0x0861
+packetLen(0x0861, 2) // ZC_REASSEMBLY_AUTH08
+
+// Packet: 0x0862
+packetLen(0x0862, 2) // ZC_REASSEMBLY_AUTH09
+
+// Packet: 0x0863
+packetLen(0x0863, 2) // ZC_REASSEMBLY_AUTH10
+
+// Packet: 0x0864
+packetLen(0x0864, 2) // ZC_REASSEMBLY_AUTH11
+
+// Packet: 0x0865
+packetLen(0x0865, 2) // ZC_REASSEMBLY_AUTH12
+
+// Packet: 0x0866
+packetLen(0x0866, 2) // ZC_REASSEMBLY_AUTH13
+
+// Packet: 0x0867
+packetLen(0x0867, 2) // ZC_REASSEMBLY_AUTH14
+
+// Packet: 0x0868
+packetLen(0x0868, 2) // ZC_REASSEMBLY_AUTH15
+
+// Packet: 0x0869
+packetLen(0x0869, 2) // ZC_REASSEMBLY_AUTH16
+
+// Packet: 0x086a
+packetLen(0x086a, 2) // ZC_REASSEMBLY_AUTH17
+
+// Packet: 0x086b
+packetLen(0x086b, 2) // ZC_REASSEMBLY_AUTH18
+
+// Packet: 0x086c
+packetLen(0x086c, 2) // ZC_REASSEMBLY_AUTH19
+
+// Packet: 0x086d
+packetLen(0x086d, 2) // ZC_REASSEMBLY_AUTH20
+
+// Packet: 0x086e
+packetLen(0x086e, 2) // ZC_REASSEMBLY_AUTH21
+
+// Packet: 0x086f
+packetLen(0x086f, 2) // ZC_REASSEMBLY_AUTH22
+
+// Packet: 0x0870
+packetLen(0x0870, 2) // ZC_REASSEMBLY_AUTH23
+
+// Packet: 0x0871
+packetLen(0x0871, 2) // ZC_REASSEMBLY_AUTH24
+
+// Packet: 0x0872
+packetLen(0x0872, 2)
+
+// Packet: 0x0873
+packetLen(0x0873, 2) // ZC_REASSEMBLY_AUTH26
+
+// Packet: 0x0874
+packetLen(0x0874, 2) // ZC_REASSEMBLY_AUTH27
+
+// Packet: 0x0875
+packetLen(0x0875, 2) // ZC_REASSEMBLY_AUTH28
+
+// Packet: 0x0876
+packetLen(0x0876, 2) // ZC_REASSEMBLY_AUTH29
+
+// Packet: 0x0877
+packetLen(0x0877, 2) // ZC_REASSEMBLY_AUTH30
+
+// Packet: 0x0878
+packetLen(0x0878, 2) // ZC_REASSEMBLY_AUTH31
+
+// Packet: 0x0879
+packetLen(0x0879, 2) // ZC_REASSEMBLY_AUTH32
+
+// Packet: 0x087a
+packetLen(0x087a, 2) // ZC_REASSEMBLY_AUTH33
+
+// Packet: 0x087b
+packetLen(0x087b, 2) // ZC_REASSEMBLY_AUTH34
+
+// Packet: 0x087c
+packetLen(0x087c, 2) // ZC_REASSEMBLY_AUTH35
+
+// Packet: 0x087d
+packetLen(0x087d, 2) // ZC_REASSEMBLY_AUTH36
+
+// Packet: 0x087e
+packetLen(0x087e, 2) // ZC_REASSEMBLY_AUTH37
+
+// Packet: 0x087f
+packetLen(0x087f, 2) // ZC_REASSEMBLY_AUTH38
+
+// Packet: 0x0880
+packetLen(0x0880, 2) // ZC_REASSEMBLY_AUTH39
+
+// Packet: 0x0881
+packetLen(0x0881, 2) // ZC_REASSEMBLY_AUTH40
+
+// Packet: 0x0882
+packetLen(0x0882, 2) // ZC_REASSEMBLY_AUTH41
+
+// Packet: 0x0883
+packetLen(0x0883, 2) // ZC_REASSEMBLY_AUTH42
+
+// Packet: 0x0884
+packetLen(0x0884, 2) // CZ_REASSEMBLY_AUTH01
+
+// Packet: 0x0885
+packetLen(0x0885, 2) // CZ_REASSEMBLY_AUTH02
+
+// Packet: 0x0886
+packetLen(0x0886, 2) // CZ_REASSEMBLY_AUTH03
+
+// Packet: 0x0887
+packetLen(0x0887, 2) // CZ_REASSEMBLY_AUTH04
+
+// Packet: 0x0888
+packetLen(0x0888, 2) // CZ_REASSEMBLY_AUTH05
+
+// Packet: 0x0889
+packetLen(0x0889, 2) // CZ_REASSEMBLY_AUTH06
+
+// Packet: 0x088a
+packetLen(0x088a, 2) // CZ_REASSEMBLY_AUTH07
+
+// Packet: 0x088b
+packetLen(0x088b, 2) // CZ_REASSEMBLY_AUTH08
+
+// Packet: 0x088c
+packetLen(0x088c, 2) // CZ_REASSEMBLY_AUTH09
+
+// Packet: 0x088d
+packetLen(0x088d, 2) // CZ_REASSEMBLY_AUTH10
+
+// Packet: 0x088e
+packetLen(0x088e, 2) // CZ_REASSEMBLY_AUTH11
+
+// Packet: 0x088f
+packetLen(0x088f, 2) // CZ_REASSEMBLY_AUTH12
+
+// Packet: 0x0890
+packetLen(0x0890, 2) // CZ_REASSEMBLY_AUTH13
+
+// Packet: 0x0891
+packetLen(0x0891, 2) // CZ_REASSEMBLY_AUTH14
+
+// Packet: 0x0892
+packetLen(0x0892, 2) // CZ_REASSEMBLY_AUTH15
+
+// Packet: 0x0893
+packetLen(0x0893, 2) // CZ_REASSEMBLY_AUTH16
+
+// Packet: 0x0894
+packetLen(0x0894, 2) // CZ_REASSEMBLY_AUTH17
+
+// Packet: 0x0895
+packetLen(0x0895, 2) // CZ_REASSEMBLY_AUTH18
+
+// Packet: 0x0896
+packetLen(0x0896, 2) // CZ_REASSEMBLY_AUTH19
+
+// Packet: 0x0897
+packetLen(0x0897, 2) // CZ_REASSEMBLY_AUTH20
+
+// Packet: 0x0898
+packetLen(0x0898, 2) // CZ_REASSEMBLY_AUTH21
+
+// Packet: 0x0899
+packetLen(0x0899, 2) // CZ_REASSEMBLY_AUTH22
+
+// Packet: 0x089a
+packetLen(0x089a, 2) // CZ_REASSEMBLY_AUTH23
+
+// Packet: 0x089b
+packetLen(0x089b, 2) // CZ_REASSEMBLY_AUTH24
+
+// Packet: 0x089c
+packetLen(0x089c, 2) // CZ_REASSEMBLY_AUTH25
+
+// Packet: 0x089d
+packetLen(0x089d, 2) // CZ_REASSEMBLY_AUTH26
+
+// Packet: 0x089e
+packetLen(0x089e, 2) // CZ_REASSEMBLY_AUTH27
+
+// Packet: 0x089f
+packetLen(0x089f, 2) // CZ_REASSEMBLY_AUTH28
+
+// Packet: 0x08a0
+packetLen(0x08a0, 2) // CZ_REASSEMBLY_AUTH29
+
+// Packet: 0x08a1
+packetLen(0x08a1, 2) // CZ_REASSEMBLY_AUTH30
+
+// Packet: 0x08a2
+packetLen(0x08a2, 2) // CZ_REASSEMBLY_AUTH31
+
+// Packet: 0x08a3
+packetLen(0x08a3, 2) // CZ_REASSEMBLY_AUTH32
+
+// Packet: 0x08a4
+packetLen(0x08a4, 2) // CZ_REASSEMBLY_AUTH33
+
+// Packet: 0x08a5
+packetLen(0x08a5, 2) // CZ_REASSEMBLY_AUTH34
+
+// Packet: 0x08a6
+packetLen(0x08a6, 2) // CZ_REASSEMBLY_AUTH35
+
+// Packet: 0x08a7
+packetLen(0x08a7, 2) // CZ_REASSEMBLY_AUTH36
+
+// Packet: 0x08a8
+packetLen(0x08a8, 2) // CZ_REASSEMBLY_AUTH37
+
+// Packet: 0x08a9
+packetLen(0x08a9, 2) // CZ_REASSEMBLY_AUTH38
+
+// Packet: 0x08aa
+packetLen(0x08aa, 2) // CZ_REASSEMBLY_AUTH39
+
+// Packet: 0x08ab
+packetLen(0x08ab, 2) // CZ_REASSEMBLY_AUTH40
+
+// Packet: 0x08ac
+packetLen(0x08ac, 2) // CZ_REASSEMBLY_AUTH41
+
+// Packet: 0x08ad
+packetLen(0x08ad, 2) // CZ_REASSEMBLY_AUTH42
+
+// Packet: 0x08af
+packetLen(0x08af, 10) // HC_WAITING_LOGIN
+
+// Packet: 0x08b0
+packetLen(0x08b0, 17) // CH_WAITING_LOGIN
+
+// Packet: 0x08b1
+packetLen(0x08b1, -1) // ZC_MCSTORE_NOTMOVEITEM_LIST
+
+// Packet: 0x08b2
+packetLen(0x08b2, -1) // AC_REALNAME_AUTH
+
+// Packet: 0x08b3
+packetLen(0x08b3, -1) // ZC_SHOWSCRIPT
+
+// Packet: 0x08b4
+packetLen(0x08b4, 2) // ZC_START_COLLECTION
+
+// Packet: 0x08b5
+packetLen(0x08b5, 6) // CZ_TRYCOLLECTION
+
+// Packet: 0x08b6
+packetLen(0x08b6, 3) // ZC_TRYCOLLECTION
+
+// Packet: 0x08b8
+packetLen(0x08b8, 10) // CH_SECOND_PASSWD_ACK
+
+// Packet: 0x08b9
+packetLen(0x08b9, 12) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x08ba
+packetLen(0x08ba, 10) // CH_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bb
+packetLen(0x08bb, 8) // HC_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bc
+packetLen(0x08bc, 10) // CH_DELETE_SECOND_PASSWD
+
+// Packet: 0x08bd
+packetLen(0x08bd, 8) // HC_DELETE_SECOND_PASSWD
+
+// Packet: 0x08be
+packetLen(0x08be, 14) // CH_EDIT_SECOND_PASSWD
+
+// Packet: 0x08bf
+packetLen(0x08bf, 8) // HC_EDIT_SECOND_PASSWD
+
+// Packet: 0x08c0
+packetLen(0x08c0, -1) // ZC_ACK_SE_CASH_ITEM_LIST2
+
+// Packet: 0x08c1
+packetLen(0x08c1, 2) // CZ_MACRO_START
+
+// Packet: 0x08c2
+packetLen(0x08c2, 2) // CZ_MACRO_STOP
+
+// Packet: 0x08c3
+packetLen(0x08c3, 10) // CH_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c4
+packetLen(0x08c4, 8) // HC_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c5
+packetLen(0x08c5, 6) // CH_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c6
+packetLen(0x08c6, 4) // HC_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c7
+packetLen(0x08c7, -1) // ZC_SKILL_ENTRY3
+
+// Packet: 0x08c8
+packetLen(0x08c8, 34) // ZC_NOTIFY_ACT3
+
+// Packet: 0x08c9
+packetLen(0x08c9, 2) // CZ_REQ_SCHEDULER_CASHITEM
+
+// Packet: 0x08ca
+packetLen(0x08ca, -1) // ZC_ACK_SCHEDULER_CASHITEM
+
+// Packet: 0x08cb
+packetLen(0x08cb, -1) // ZC_PERSONAL_INFOMATION
+
+// Packet: 0x08cc
+packetLen(0x08cc, 109) // CA_LOGIN5
+
+// Packet: 0x08cd
+packetLen(0x08cd, 10) // ZC_STOPMOVE_FORCE
+
+// Packet: 0x08ce
+packetLen(0x08ce, 2) // ZC_FAILED_GET_ITEM_FROM_ZONEDA
+
+// Packet: 0x08cf
+packetLen(0x08cf, 10) // ZC_SPIRITS_ATTRIBUTE
+
+// Packet: 0x08d0
+packetLen(0x08d0, 9) // ZC_REQ_WEAR_EQUIP_ACK2
+
+// Packet: 0x08d1
+packetLen(0x08d1, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK2
+
+// Packet: 0x08d2
+packetLen(0x08d2, 10) // ZC_FASTMOVE
+
+// Packet: 0x08d3
+packetLen(0x08d3, 10) // ZC_SE_CASHSHOP_UPDATE
+
+// Packet: 0x08d4
+packetLen(0x08d4, 8) // CH_REQ_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d5
+packetLen(0x08d5, -1) // HC_ACK_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d6
+packetLen(0x08d6, 6) // ZC_CLEAR_DIALOG
+
+// Packet: 0x08d7
+packetLen(0x08d7, 28) // CZ_REQ_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d8
+packetLen(0x08d8, 27) // ZC_ACK_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d9
+packetLen(0x08d9, 30) // ZC_NOTIFY_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08da
+packetLen(0x08da, 26) // CZ_REQ_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08db
+packetLen(0x08db, 27) // ZC_ACK_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08dc
+packetLen(0x08dc, 26) // ZC_NOTIFY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08dd
+packetLen(0x08dd, 27) // CZ_REPLY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08de
+packetLen(0x08de, 27) // ZC_REPLY_ACK_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08df
+packetLen(0x08df, 50) // ZC_NOTIFY_LOBBY_ADMISSION
+
+// Packet: 0x08e0
+packetLen(0x08e0, 51) // CZ_REPLY_LOBBY_ADMISSION
+
+// Packet: 0x08e1
+packetLen(0x08e1, 51) // ZC_REPLY_ACK_LOBBY_ADMISSION
+
+// Packet: 0x08e2
+packetLen(0x08e2, 27) // ZC_NAVIGATION_ACTIVE
+
+// Packet: 0x08e3
+packetLen(0x08e3, 157) // HC_UPDATE_CHARINFO
+
+// Packet: 0x08e4
+packetLen(0x08e4, 6) // AC_SHUTDOWN_INFO
+
+// Packet: 0x08fc
+packetLen(0x08fc, 30) // CH_REQ_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fd
+packetLen(0x08fd, 6) // CH_ACK_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fe
+packetLen(0x08fe, -1) // ZC_HUNTING_QUEST_INFO
+
+// Packet: 0x08ff
+packetLen(0x08ff, 24) // ZC_EFST_SET_ENTER
+
+// Packet: 0x0900
+packetLen(0x0900, -1) // ZC_INVENTORY_ITEMLIST_NORMAL
+
+// Packet: 0x0901
+packetLen(0x0901, -1) // ZC_INVENTORY_ITEMLIST_EQUIP
+
+// Packet: 0x0902
+packetLen(0x0902, -1) // ZC_CART_ITEMLIST_NORMAL
+
+// Packet: 0x0903
+packetLen(0x0903, -1) // ZC_CART_ITEMLIST_EQUIP
+
+// Packet: 0x0904
+packetLen(0x0904, -1) // ZC_STORE_ITEMLIST_NORMAL
+
+// Packet: 0x0905
+packetLen(0x0905, -1) // ZC_STORE_ITEMLIST_EQUIP
+
+// Packet: 0x0906
+packetLen(0x0906, -1) // ZC_MICROSCOPE
+
+// Packet: 0x0907
+packetLen(0x0907, 5) // CZ_INVENTORY_TAB
+
+// Packet: 0x0908
+packetLen(0x0908, 5) // ZC_INVENTORY_TAB
+
+// Packet: 0x090a
+packetLen(0x090a, 26) // CZ_REQ_ENTRY_QUEUE_RANKING
+
+// Packet: 0x090d
+packetLen(0x090d, -1) // ZC_PREMIUM_CAMPAIGN_INFO
+
+// Packet: 0x090e
+packetLen(0x090e, 2) // ZC_ENTRY_QUEUE_INIT
+
+// Packet: 0x090f
+packetLen(0x090f, -1) // ZC_NOTIFY_NEWENTRY7
+
+// Packet: 0x0910
+packetLen(0x0910, 10) // CZ_REQ_PARTY_NAME
+
+// Packet: 0x0911
+packetLen(0x0911, 30) // ZC_ACK_PARTY_NAME
+
+// Packet: 0x0912
+packetLen(0x0912, 10) // CZ_REQ_GUILD_NAME
+
+// Packet: 0x0913
+packetLen(0x0913, 30) // ZC_ACK_GUILD_NAME
+
+// Packet: 0x0914
+packetLen(0x0914, -1) // ZC_NOTIFY_MOVEENTRY9
+
+// Packet: 0x0915
+packetLen(0x0915, -1) // ZC_NOTIFY_STANDENTRY8
+
+// Packet: 0x0916
+packetLen(0x0916, 26) // CZ_REQ_JOIN_GUILD2
+
+// Packet: 0x0917
+packetLen(0x0917, 2) // ZC_REASSEMBLY_AUTH43
+
+// Packet: 0x0918
+packetLen(0x0918, 2) // ZC_REASSEMBLY_AUTH44
+
+// Packet: 0x0919
+packetLen(0x0919, 2) // ZC_REASSEMBLY_AUTH45
+
+// Packet: 0x091a
+packetLen(0x091a, 2) // ZC_REASSEMBLY_AUTH46
+
+// Packet: 0x091b
+packetLen(0x091b, 2) // ZC_PRNPC_STATE
+
+// Packet: 0x091c
+packetLen(0x091c, 2) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x091d
+packetLen(0x091d, 2) // ZC_REASSEMBLY_AUTH49
+
+// Packet: 0x091e
+packetLen(0x091e, 2) // ZC_REASSEMBLY_AUTH50
+
+// Packet: 0x091f
+packetLen(0x091f, 2) // ZC_REASSEMBLY_AUTH51
+
+// Packet: 0x0920
+packetLen(0x0920, 2) // ZC_REASSEMBLY_AUTH52
+
+// Packet: 0x0921
+packetLen(0x0921, 2) // ZC_REASSEMBLY_AUTH53
+
+// Packet: 0x0922
+packetLen(0x0922, 2) // ZC_REASSEMBLY_AUTH54
+
+// Packet: 0x0923
+packetLen(0x0923, 2) // ZC_REASSEMBLY_AUTH55
+
+// Packet: 0x0924
+packetLen(0x0924, 2) // ZC_REASSEMBLY_AUTH56
+
+// Packet: 0x0925
+packetLen(0x0925, 2) // ZC_REASSEMBLY_AUTH57
+
+// Packet: 0x0926
+packetLen(0x0926, 2) // ZC_REASSEMBLY_AUTH58
+
+// Packet: 0x0927
+packetLen(0x0927, 2) // ZC_REASSEMBLY_AUTH59
+
+// Packet: 0x0928
+packetLen(0x0928, 2) // ZC_REASSEMBLY_AUTH60
+
+// Packet: 0x0929
+packetLen(0x0929, 2) // ZC_REASSEMBLY_AUTH61
+
+// Packet: 0x092a
+packetLen(0x092a, 2) // ZC_REASSEMBLY_AUTH62
+
+// Packet: 0x092b
+packetLen(0x092b, 2) // ZC_REASSEMBLY_AUTH63
+
+// Packet: 0x092c
+packetLen(0x092c, 2) // ZC_REASSEMBLY_AUTH64
+
+// Packet: 0x092d
+packetLen(0x092d, 2) // ZC_REASSEMBLY_AUTH65
+
+// Packet: 0x092e
+packetLen(0x092e, 2) // ZC_REASSEMBLY_AUTH66
+
+// Packet: 0x092f
+packetLen(0x092f, 2) // ZC_REASSEMBLY_AUTH67
+
+// Packet: 0x0930
+packetLen(0x0930, 2) // ZC_REASSEMBLY_AUTH68
+
+// Packet: 0x0931
+packetLen(0x0931, 2) // ZC_REASSEMBLY_AUTH69
+
+// Packet: 0x0932
+packetLen(0x0932, 2) // ZC_REASSEMBLY_AUTH70
+
+// Packet: 0x0933
+packetLen(0x0933, 2) // ZC_REASSEMBLY_AUTH71
+
+// Packet: 0x0934
+packetLen(0x0934, 2) // ZC_REASSEMBLY_AUTH72
+
+// Packet: 0x0935
+packetLen(0x0935, 2) // ZC_REASSEMBLY_AUTH73
+
+// Packet: 0x0936
+packetLen(0x0936, 2) // ZC_REASSEMBLY_AUTH74
+
+// Packet: 0x0937
+packetLen(0x0937, 2) // ZC_REASSEMBLY_AUTH75
+
+// Packet: 0x0938
+packetLen(0x0938, 2) // ZC_REASSEMBLY_AUTH76
+
+// Packet: 0x0939
+packetLen(0x0939, 2) // ZC_REASSEMBLY_AUTH77
+
+// Packet: 0x093a
+packetLen(0x093a, 2) // ZC_REASSEMBLY_AUTH78
+
+// Packet: 0x093b
+packetLen(0x093b, 2) // ZC_REASSEMBLY_AUTH79
+
+// Packet: 0x093c
+packetLen(0x093c, 2) // ZC_REASSEMBLY_AUTH80
+
+// Packet: 0x093d
+packetLen(0x093d, 2) // ZC_REASSEMBLY_AUTH81
+
+// Packet: 0x093e
+packetLen(0x093e, 2) // ZC_REASSEMBLY_AUTH82
+
+// Packet: 0x093f
+packetLen(0x093f, 2) // ZC_REASSEMBLY_AUTH83
+
+// Packet: 0x0940
+packetLen(0x0940, 2) // ZC_REASSEMBLY_AUTH84
+
+// Packet: 0x0941
+packetLen(0x0941, 2) // CZ_REASSEMBLY_AUTH43
+
+// Packet: 0x0942
+packetLen(0x0942, 2) // CZ_REASSEMBLY_AUTH44
+
+// Packet: 0x0943
+packetLen(0x0943, 2) // CZ_REASSEMBLY_AUTH45
+
+// Packet: 0x0944
+packetLen(0x0944, 2) // CZ_REASSEMBLY_AUTH46
+
+// Packet: 0x0945
+packetLen(0x0945, 2) // CZ_REASSEMBLY_AUTH47
+
+// Packet: 0x0946
+packetLen(0x0946, 2) // CZ_REASSEMBLY_AUTH48
+
+// Packet: 0x0947
+packetLen(0x0947, 2) // CZ_REASSEMBLY_AUTH49
+
+// Packet: 0x0948
+packetLen(0x0948, 2) // CZ_REASSEMBLY_AUTH50
+
+// Packet: 0x0949
+packetLen(0x0949, 2) // CZ_REASSEMBLY_AUTH51
+
+// Packet: 0x094a
+packetLen(0x094a, 2) // CZ_REASSEMBLY_AUTH52
+
+// Packet: 0x094b
+packetLen(0x094b, 2) // CZ_REASSEMBLY_AUTH53
+
+// Packet: 0x094c
+packetLen(0x094c, 2) // CZ_REASSEMBLY_AUTH54
+
+// Packet: 0x094d
+packetLen(0x094d, 2) // CZ_REASSEMBLY_AUTH55
+
+// Packet: 0x094e
+packetLen(0x094e, 2) // CZ_REASSEMBLY_AUTH56
+
+// Packet: 0x094f
+packetLen(0x094f, 2) // CZ_REASSEMBLY_AUTH57
+
+// Packet: 0x0950
+packetLen(0x0950, 2) // CZ_REASSEMBLY_AUTH58
+
+// Packet: 0x0951
+packetLen(0x0951, 2) // CZ_REASSEMBLY_AUTH59
+
+// Packet: 0x0952
+packetLen(0x0952, 2) // CZ_REASSEMBLY_AUTH60
+
+// Packet: 0x0953
+packetLen(0x0953, 2) // CZ_REASSEMBLY_AUTH61
+
+// Packet: 0x0954
+packetLen(0x0954, 2) // CZ_REASSEMBLY_AUTH62
+
+// Packet: 0x0955
+packetLen(0x0955, 2) // CZ_REASSEMBLY_AUTH63
+
+// Packet: 0x0956
+packetLen(0x0956, 2) // CZ_REASSEMBLY_AUTH64
+
+// Packet: 0x0957
+packetLen(0x0957, 2) // CZ_REASSEMBLY_AUTH65
+
+// Packet: 0x0958
+packetLen(0x0958, 2) // CZ_REASSEMBLY_AUTH66
+
+// Packet: 0x0959
+packetLen(0x0959, 2) // CZ_REASSEMBLY_AUTH67
+
+// Packet: 0x095a
+packetLen(0x095a, 2) // CZ_REASSEMBLY_AUTH68
+
+// Packet: 0x095b
+packetLen(0x095b, 2) // CZ_REASSEMBLY_AUTH69
+
+// Packet: 0x095c
+packetLen(0x095c, 2) // CZ_REASSEMBLY_AUTH70
+
+// Packet: 0x095d
+packetLen(0x095d, 2) // CZ_REASSEMBLY_AUTH71
+
+// Packet: 0x095e
+packetLen(0x095e, 2) // CZ_REASSEMBLY_AUTH72
+
+// Packet: 0x095f
+packetLen(0x095f, 2) // CZ_REASSEMBLY_AUTH73
+
+// Packet: 0x0960
+packetLen(0x0960, 2) // CZ_REASSEMBLY_AUTH74
+
+// Packet: 0x0961
+packetLen(0x0961, 2) // CZ_REASSEMBLY_AUTH75
+
+// Packet: 0x0962
+packetLen(0x0962, 2) // CZ_REASSEMBLY_AUTH76
+
+// Packet: 0x0963
+packetLen(0x0963, 2) // CZ_REASSEMBLY_AUTH77
+
+// Packet: 0x0964
+packetLen(0x0964, 2) // CZ_REASSEMBLY_AUTH78
+
+// Packet: 0x0965
+packetLen(0x0965, 2) // CZ_REASSEMBLY_AUTH79
+
+// Packet: 0x0966
+packetLen(0x0966, 2) // CZ_REASSEMBLY_AUTH80
+
+// Packet: 0x0967
+packetLen(0x0967, 2) // CZ_REASSEMBLY_AUTH81
+
+// Packet: 0x0968
+packetLen(0x0968, 2) // CZ_REASSEMBLY_AUTH82
+
+// Packet: 0x0969
+packetLen(0x0969, 2) // CZ_REASSEMBLY_AUTH83
+
+// Packet: 0x096a
+packetLen(0x096a, 2) // CZ_REASSEMBLY_AUTH84
+
+// Packet: 0x096b
+packetLen(0x096b, 4) // ZC_PRNPC_STATE
+
+// Packet: 0x096c
+packetLen(0x096c, 6) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x096d
+packetLen(0x096d, -1) // ZC_MERGE_ITEM_OPEN
+
+// Packet: 0x096e
+packetLen(0x096e, -1) // CZ_REQ_MERGE_ITEM
+
+// Packet: 0x096f
+packetLen(0x096f, 7) // ZC_ACK_MERGE_ITEM
+
+// Packet: 0x0970
+packetLen(0x0970, 31) // CH_MAKE_CHAR_NOT_STATS
+
+// Packet: 0x0971
+packetLen(0x0971, 6) // ZC_PARTY_RECRUIT_REFUSE_VOLUNTEER_TO_PM
+
+// Packet: 0x0972
+packetLen(0x0972, -1) // ZC_SAY_DIALOG2
+
+// Packet: 0x0973
+packetLen(0x0973, 7) // ZC_WAIT_DIALOG2
+
+// Packet: 0x0974
+packetLen(0x0974, 2) // CZ_CANCEL_MERGE_ITEM
+
+// Packet: 0x0975
+packetLen(0x0975, -1) // ZC_STORE_ITEMLIST_NORMAL_V2
+
+// Packet: 0x0976
+packetLen(0x0976, -1) // ZC_STORE_ITEMLIST_EQUIP_V2
+
+// Packet: 0x0977
+packetLen(0x0977, 14) // ZC_HP_INFO
+
+// Packet: 0x0978
+packetLen(0x0978, 6) // CZ_REQ_BEFORE_WORLD_INFO
+
+// Packet: 0x0979
+packetLen(0x0979, 50) // ZC_ACK_BEFORE_WORLD_INFO
+
+// Packet: 0x097a
+packetLen(0x097a, -1) // ZC_ALL_QUEST_LIST2
+
+// Packet: 0x097b
+packetLen(0x097b, -1) // ZC_PERSONAL_INFOMATION2
+
+// Packet: 0x097c
+packetLen(0x097c, 4) // CZ_REQ_RANKING
+
+// Packet: 0x097d
+packetLen(0x097d, 288) // ZC_ACK_RANKING
+
+// Packet: 0x097e
+packetLen(0x097e, 12) // ZC_UPDATE_RANKING_POINT
+
+// Packet: 0x097f
+packetLen(0x097f, -1) // ZC_SELECTCART
+
+// Packet: 0x0980
+packetLen(0x0980, 7) // CZ_SELECTCART
+
+// Packet: 0x0981
+packetLen(0x0981, -1) // ZC_PERSONAL_INFOMATION_CHN
+
+// Packet: 0x0982
+packetLen(0x0982, 7) // ZC_FATIGUE_CHN
+
+// Packet: 0x0983
+packetLen(0x0983, 29) // ZC_MSG_STATE_CHANGE3
+
+// Packet: 0x0984
+packetLen(0x0984, 28) // ZC_EFST_SET_ENTER2
+
+// Packet: 0x0985
+packetLen(0x0985, -1) // ZC_SKILL_POSTDELAY_LIST2
+
+// Packet: 0x0986
+packetLen(0x0986, 10) // AC_SHUTDOWN_NOTIFY
+
+// Packet: 0x0987
+packetLen(0x0987, -1) // CA_LOGIN6
+
+// Packet: 0x0988
+packetLen(0x0988, 6) // ZC_NOTIFY_CLAN_CONNECTINFO
+
+// Packet: 0x0989
+packetLen(0x0989, 2) // ZC_ACK_CLAN_LEAVE
+
+// Packet: 0x098a
+packetLen(0x098a, -1) // ZC_CLANINFO
+
+// Packet: 0x098b
+packetLen(0x098b, 2) // AC_REQ_NEW_USER
+
+// Packet: 0x098c
+packetLen(0x098c, 4) // CA_ACK_NEW_USER
+
+// Packet: 0x098d
+packetLen(0x098d, -1) // CZ_CLAN_CHAT
+
+// Packet: 0x098e
+packetLen(0x098e, -1) // ZC_NOTIFY_CLAN_CHAT
+
+// Packet: 0x098f
+packetLen(0x098f, -1) // CH_DELETE_CHAR3_EXT
+
+// Packet: 0x0990
+packetLen(0x0990, 41) // ZC_ITEM_PICKUP_ACK_V5
+
+// Packet: 0x0991
+packetLen(0x0991, -1) // ZC_INVENTORY_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0992
+packetLen(0x0992, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0993
+packetLen(0x0993, -1) // ZC_CART_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0994
+packetLen(0x0994, -1) // ZC_CART_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0995
+packetLen(0x0995, -1) // ZC_STORE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0996
+packetLen(0x0996, -1) // ZC_STORE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0997
+packetLen(0x0997, -1) // ZC_EQUIPWIN_MICROSCOPE_V5
+
+// Packet: 0x0998
+packetLen(0x0998, 8) // CZ_REQ_WEAR_EQUIP_V5
+
+// Packet: 0x0999
+packetLen(0x0999, 11) // ZC_ACK_WEAR_EQUIP_V5
+
+// Packet: 0x099a
+packetLen(0x099a, 9) // ZC_ACK_TAKEOFF_EQUIP_V5
+
+// Packet: 0x099b
+packetLen(0x099b, 8) // ZC_MAPPROPERTY_R2
+
+// Packet: 0x099c
+packetLen(0x099c, 6) // CH_REQ_CHARINFO_PER_PAGE
+
+// Packet: 0x099d
+packetLen(0x099d, -1) // HC_ACK_CHARINFO_PER_PAGE
+
+// Packet: 0x099e
+packetLen(0x099e, 12) // HC_QUEUE_ORDER
+
+// Packet: 0x099f
+packetLen(0x099f, -1) // ZC_SKILL_ENTRY4
+
+// Packet: 0x09a0
+packetLen(0x09a0, 6) // HC_CHARLIST_NOTIFY
+
+// Packet: 0x09a1
+packetLen(0x09a1, 2) // CH_CHARLIST_REQ
+
+// Packet: 0x09a2
+packetLen(0x09a2, 6) // AC_REQ_MOBILE_OTP
+
+// Packet: 0x09a3
+packetLen(0x09a3, -1) // CA_ACK_MOBILE_OTP
+
+// Packet: 0x09a4
+packetLen(0x09a4, 18) // ZC_DISPATCH_TIMING_INFO_CHN
+
+// Packet: 0x09a5
+packetLen(0x09a5, 7) // AC_REFUSE_LOGIN3
+
+// Packet: 0x09a6
+packetLen(0x09a6, 12) // ZC_BANKING_CHECK
+
+// Packet: 0x09a7
+packetLen(0x09a7, 10) // CZ_REQ_BANKING_DEPOSIT
+
+// Packet: 0x09a8
+packetLen(0x09a8, 16) // ZC_ACK_BANKING_DEPOSIT
+
+// Packet: 0x09a9
+packetLen(0x09a9, 10) // CZ_REQ_BANKING_WITHDRAW
+
+// Packet: 0x09aa
+packetLen(0x09aa, 16) // ZC_ACK_BANKING_WITHDRAW
+
+// Packet: 0x09ab
+packetLen(0x09ab, 6) // CZ_REQ_BANKING_CHECK
+
+// Packet: 0x09ac
+packetLen(0x09ac, -1) // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ad
+packetLen(0x09ad, 12) // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ae
+packetLen(0x09ae, 19) // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09af
+packetLen(0x09af, 4) // ZC_ACK_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b0
+packetLen(0x09b0, 10) // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b1
+packetLen(0x09b1, 4) // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b2
+packetLen(0x09b2, 10) // ZC_NOTIFY_BARGAIN_SALE_SELLING
+
+// Packet: 0x09b3
+packetLen(0x09b3, 6) // ZC_NOTIFY_BARGAIN_SALE_CLOSE
+
+// Packet: 0x09b4
+packetLen(0x09b4, 6) // CZ_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b5
+packetLen(0x09b5, 2) // ZC_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b6
+packetLen(0x09b6, 6) // CZ_REQ_OPEN_BANKING
+
+// Packet: 0x09b7
+packetLen(0x09b7, 4) // ZC_ACK_OPEN_BANKING
+
+// Packet: 0x09b8
+packetLen(0x09b8, 6) // CZ_REQ_CLOSE_BANKING
+
+// Packet: 0x09b9
+packetLen(0x09b9, 4) // ZC_ACK_CLOSE_BANKING
+
+// Packet: 0x09ba
+packetLen(0x09ba, 2) // CZ_REQ_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bb
+packetLen(0x09bb, 6) // ZC_ACK_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bc
+packetLen(0x09bc, 6) // CZ_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09bd
+packetLen(0x09bd, 2) // ZC_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09be
+packetLen(0x09be, 2) // CZ_REQ_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09bf
+packetLen(0x09bf, 4) // ZC_ACK_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09c1
+packetLen(0x09c1, 10) // ZC_C_MARKERINFO
+
+// Packet: 0x09c2
+packetLen(0x09c2, -1) // HC_SECRETSCAN_DATA
+
+// Packet: 0x09c3
+packetLen(0x09c3, 10) // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c4
+packetLen(0x09c4, 10) // ZC_ACK_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c5
+packetLen(0x09c5, 1042) // CS_LOGIN_QUERY
+
+// Packet: 0x09c6
+packetLen(0x09c6, -1) // SC_LOGIN_ANSWER
+
+// Packet: 0x09c7
+packetLen(0x09c7, 18) // SC_LOGIN_ERROR
+
+// Packet: 0x09c8
+packetLen(0x09c8, -1) // CA_LOGIN_OTP
+
+// Packet: 0x09c9
+packetLen(0x09c9, -1) // SC_SOCT
+
+// Packet: 0x09ca
+packetLen(0x09ca, -1) // ZC_SKILL_ENTRY5
+
+// Packet: 0x09cb
+packetLen(0x09cb, 17) // ZC_USE_SKILL2
+
+// Packet: 0x09cc
+packetLen(0x09cc, -1) // ZC_SECRETSCAN_DATA
+
+// Packet: 0x09cd
+packetLen(0x09cd, 8) // ZC_MSG_COLOR
+
+// Packet: 0x09ce
+packetLen(0x09ce, 102) // CZ_ITEM_CREATE_EX
+
+// Packet: 0x09cf
+packetLen(0x09cf, -1) // ZC_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d0
+packetLen(0x09d0, -1) // CZ_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d1
+packetLen(0x09d1, 14) // ZC_PROGRESS_ACTOR
+
+// Packet: 0x09d2
+packetLen(0x09d2, -1) // ZC_GUILDSTORAGE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x09d3
+packetLen(0x09d3, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x09d4
+packetLen(0x09d4, 2) // CZ_NPC_TRADE_QUIT
+
+// Packet: 0x09d5
+packetLen(0x09d5, -1) // ZC_NPC_MARKET_OPEN
+
+// Packet: 0x09d6
+packetLen(0x09d6, -1) // CZ_NPC_MARKET_PURCHASE
+
+// Packet: 0x09d7
+packetLen(0x09d7, -1) // ZC_NPC_MARKET_PURCHASE_RESULT
+
+// Packet: 0x09d8
+packetLen(0x09d8, 2) // CZ_NPC_MARKET_CLOSE
+
+// Packet: 0x09d9
+packetLen(0x09d9, 4) // CZ_REQ_GUILDSTORAGE_LOG
+
+// Packet: 0x09da
+packetLen(0x09da, -1) // ZC_ACK_GUILDSTORAGE_LOG
+
+// Packet: 0x09db
+packetLen(0x09db, -1) // ZC_NOTIFY_MOVEENTRY10
+
+// Packet: 0x09dc
+packetLen(0x09dc, -1) // ZC_NOTIFY_NEWENTRY10
+
+// Packet: 0x09dd
+packetLen(0x09dd, -1) // ZC_NOTIFY_STANDENTRY10
+
+// Packet: 0x09de
+packetLen(0x09de, -1) // ZC_WHISPER02
+
+// Packet: 0x09df
+packetLen(0x09df, 7) // ZC_ACK_WHISPER02
+
+// Packet: 0x09e0
+packetLen(0x09e0, -1) // SC_LOGIN_ANSWER_WITH_ID
+
+// Packet: 0x09e1
+packetLen(0x09e1, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_GUILDSTORAGE
+
+// Packet: 0x09e2
+packetLen(0x09e2, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_BODY
+
+// Packet: 0x09e3
+packetLen(0x09e3, 8) // CZ_MOVE_ITEM_FROM_CART_TO_GUILDSTORAGE
+
+// Packet: 0x09e4
+packetLen(0x09e4, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_CART
+
+// Packet: 0x09e5
+packetLen(0x09e5, 18) // ZC_DELETEITEM_FROM_MCSTORE2
+
+// Packet: 0x09e6
+packetLen(0x09e6, 24) // ZC_UPDATE_ITEM_FROM_BUYING_STORE2
+
+// Packet: 0x09e7
+packetLen(0x09e7, 3) // ZC_NOTIFY_UNREAD_RODEX
+
+// Packet: 0x09e8
+packetLen(0x09e8, 11) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x09e9
+packetLen(0x09e9, 2) // CZ_CLOSE_RODEXBOX
+
+// Packet: 0x09ea
+packetLen(0x09ea, 11) // CZ_REQ_READ_RODEX
+
+// Packet: 0x09eb
+packetLen(0x09eb, -1) // ZC_ACK_READ_RODEX
+
+// Packet: 0x09ec
+packetLen(0x09ec, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x09ed
+packetLen(0x09ed, 3) // ZC_ACK_SEND_RODEX
+
+// Packet: 0x09ee
+packetLen(0x09ee, 11) // CZ_REQ_NEXT_RODEX
+
+// Packet: 0x09ef
+packetLen(0x09ef, 11) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x09f0
+packetLen(0x09f0, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x09f1
+packetLen(0x09f1, 11) // CZ_REQ_ZENY_FROM_RODEX
+
+// Packet: 0x09f2
+packetLen(0x09f2, 12) // ZC_ACK_ZENY_FROM_RODEX
+
+// Packet: 0x09f3
+packetLen(0x09f3, 11) // CZ_REQ_ITEM_FROM_RODEX
+
+// Packet: 0x09f4
+packetLen(0x09f4, 12) // ZC_ACK_ITEM_FROM_RODEX
+
+// Packet: 0x09f5
+packetLen(0x09f5, 11) // CZ_REQ_DELETE_RODEX
+
+// Packet: 0x09f6
+packetLen(0x09f6, 11) // ZC_ACK_DELETE_RODEX
+
+// Packet: 0x09f7
+packetLen(0x09f7, 77) // ZC_PROPERTY_HOMUN_2
+
+// Packet: 0x09f8
+packetLen(0x09f8, -1) // ZC_ALL_QUEST_LIST3
+
+// Packet: 0x09f9
+packetLen(0x09f9, 143) // ZC_ADD_QUEST_EX
+
+// Packet: 0x09fa
+packetLen(0x09fa, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x09fb
+packetLen(0x09fb, -1) // CZ_PET_EVOLUTION
+
+// Packet: 0x09fc
+packetLen(0x09fc, 6) // ZC_PET_EVOLUTION_RESULT
+
+// Packet: 0x09fd
+packetLen(0x09fd, -1) // ZC_NOTIFY_MOVEENTRY11
+
+// Packet: 0x09fe
+packetLen(0x09fe, -1) // ZC_NOTIFY_NEWENTRY11
+
+// Packet: 0x09ff
+packetLen(0x09ff, -1) // ZC_NOTIFY_STANDENTRY11
+
+// Packet: 0x0a00
+packetLen(0x0a00, 269) // ZC_SHORTCUT_KEY_LIST_V3
+
+// Packet: 0x0a01
+packetLen(0x0a01, 3) // CZ_SHORTCUTKEYBAR_ROTATE
+
+// Packet: 0x0a02
+packetLen(0x0a02, 4) // ZC_DRESSROOM_OPEN
+
+// Packet: 0x0a03
+packetLen(0x0a03, 2) // CZ_REQ_CANCEL_WRITE_RODEX
+
+// Packet: 0x0a04
+packetLen(0x0a04, 6) // CZ_REQ_ADD_ITEM_RODEX
+
+// Packet: 0x0a05
+packetLen(0x0a05, 63) // ZC_ACK_ADD_ITEM_RODEX
+
+// Packet: 0x0a06
+packetLen(0x0a06, 6) // CZ_REQ_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a07
+packetLen(0x0a07, 9) // ZC_ACK_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a08
+packetLen(0x0a08, 26) // CZ_REQ_OPEN_WRITE_RODEX
+
+// Packet: 0x0a09
+packetLen(0x0a09, 55) // ZC_ADD_EXCHANGE_ITEM3
+
+// Packet: 0x0a0a
+packetLen(0x0a0a, 57) // ZC_ADD_ITEM_TO_STORE3
+
+// Packet: 0x0a0b
+packetLen(0x0a0b, 57) // ZC_ADD_ITEM_TO_CART3
+
+// Packet: 0x0a0c
+packetLen(0x0a0c, 66) // ZC_ITEM_PICKUP_ACK_V6
+
+// Packet: 0x0a0d
+packetLen(0x0a0d, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a0e
+packetLen(0x0a0e, 14) // ZC_BATTLEFIELD_NOTIFY_HP2
+
+// Packet: 0x0a0f
+packetLen(0x0a0f, -1) // ZC_CART_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a10
+packetLen(0x0a10, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a11
+packetLen(0x0a11, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a12
+packetLen(0x0a12, 27) // ZC_ACK_OPEN_WRITE_RODEX
+
+// Packet: 0x0a13
+packetLen(0x0a13, 26) // CZ_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a14
+packetLen(0x0a14, 10) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a15
+packetLen(0x0a15, 12) // ZC_GOLDPCCAFE_POINT
+
+// Packet: 0x0a16
+packetLen(0x0a16, 26) // CZ_DYNAMICNPC_CREATE_REQUEST
+
+// Packet: 0x0a17
+packetLen(0x0a17, 6) // ZC_DYNAMICNPC_CREATE_RESULT
+
+// Packet: 0x0a18
+packetLen(0x0a18, 14) // ZC_ACCEPT_ENTER3
+
+// Packet: 0x0a19
+packetLen(0x0a19, 2) // CZ_REQ_OPEN_ROULETTE
+
+// Packet: 0x0a1a
+packetLen(0x0a1a, 25) // ZC_ACK_OPEN_ROULETTE
+
+// Packet: 0x0a1b
+packetLen(0x0a1b, 2) // CZ_REQ_ROULETTE_INFO
+
+// Packet: 0x0a1c
+packetLen(0x0a1c, -1) // ZC_ACK_ROULEITTE_INFO
+
+// Packet: 0x0a1d
+packetLen(0x0a1d, 2) // CZ_REQ_CLOSE_ROULETTE
+
+// Packet: 0x0a1e
+packetLen(0x0a1e, 3) // ZC_ACK_CLOSE_ROULETTE
+
+// Packet: 0x0a1f
+packetLen(0x0a1f, 2) // CZ_REQ_GENERATE_ROULETTE
+
+// Packet: 0x0a20
+packetLen(0x0a20, 23) // ZC_ACK_GENERATE_ROULETTE
+
+// Packet: 0x0a21
+packetLen(0x0a21, 3) // CZ_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a22
+packetLen(0x0a22, 7) // ZC_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a23
+packetLen(0x0a23, -1) // ZC_ALL_ACH_LIST
+
+// Packet: 0x0a24
+packetLen(0x0a24, 66) // ZC_ACH_UPDATE
+
+// Packet: 0x0a25
+packetLen(0x0a25, 6) // CZ_REQ_ACH_REWARD
+
+// Packet: 0x0a26
+packetLen(0x0a26, 7) // ZC_REQ_ACH_REWARD_ACK
+
+// Packet: 0x0a27
+packetLen(0x0a27, 8) // ZC_RECOVERY2
+
+// Packet: 0x0a28
+packetLen(0x0a28, 3) // ZC_ACK_OPENSTORE2
+
+// Packet: 0x0a29
+packetLen(0x0a29, 6) // ZC_REQ_AU_BOT
+
+// Packet: 0x0a2a
+packetLen(0x0a2a, 6) // CZ_ACK_AU_BOT
+
+// Packet: 0x0a2b
+packetLen(0x0a2b, 14) // ZC_SE_CASHSHOP_OPEN2
+
+// Packet: 0x0a2c
+packetLen(0x0a2c, 12) // ZC_SE_PC_BUY_TAIWANCASHITEM_RESULT
+
+// Packet: 0x0a2d
+packetLen(0x0a2d, -1) // ZC_EQUIPWIN_MICROSCOPE_V6
+
+// Packet: 0x0a2e
+packetLen(0x0a2e, 6) // CZ_REQ_CHANGE_TITLE
+
+// Packet: 0x0a2f
+packetLen(0x0a2f, 7) // ZC_ACK_CHANGE_TITLE
+
+// Packet: 0x0a30
+packetLen(0x0a30, 106) // ZC_ACK_REQNAMEALL2
+
+// Packet: 0x0a31
+packetLen(0x0a31, -1) // ZC_RESULT_PACKAGE_ITEM_TEST
+
+// Packet: 0x0a32
+packetLen(0x0a32, 2) // ZC_OPEN_RODEX_THROUGH_NPC_ONLY
+
+// Packet: 0x0a33
+packetLen(0x0a33, 7) // ZC_UPDATE_ROULETTE_COIN
+
+// Packet: 0x0a34
+packetLen(0x0a34, 6) // ZC_UPDATE_TAIWANCASH
+
+// Packet: 0x0a35
+packetLen(0x0a35, 4) // CZ_REQ_ONECLICK_ITEMIDENTIFY
+
+// Packet: 0x0a36
+packetLen(0x0a36, 7) // ZC_HP_INFO_TINY
+
+// Packet: 0x0a37
+packetLen(0x0a37, 69) // ZC_ITEM_PICKUP_ACK_V7
+
+// Packet: 0x0a38
+packetLen(0x0a38, 3) // ZC_OPEN_UI
+
+// Packet: 0x0a39
+packetLen(0x0a39, 36) // CH_MAKE_CHAR
+
+// Packet: 0x0a3a
+packetLen(0x0a3a, 12)
+
+// Packet: 0x0a3b
+packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
+
+// Packet: 0x0a3c
+packetLen(0x0a3c, -1)
+
+// Packet: 0x0a3d
+packetLen(0x0a3d, 20)
+
+// Packet: 0x0a3e
+packetLen(0x0a3e, -1)
+
+// Packet: 0x0a3f
+packetLen(0x0a3f, 11)
+
+// Packet: 0x0a40
+packetLen(0x0a40, 11)
+
+// Packet: 0x0a41
+packetLen(0x0a41, 18) // ZC_AOE_EFFECT_SKILL
+
+// Packet: 0x0a42
+packetLen(0x0a42, 43)
+
+// Packet: 0x0a43
+packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0a44
+packetLen(0x0a44, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0a46
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
+
+// Packet: 0x0a47
+packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
+
+// Packet: 0x0a48
+packetLen(0x0a48, 2) // CZ_STYLE_CLOSE
+
+// Packet: 0x0a49
+packetLen(0x0a49, 22) // CZ_PRIVATE_AIRSHIP_REQUEST
+
+// Packet: 0x0a4a
+packetLen(0x0a4a, 6) // ZC_PRIVATE_AIRSHIP_RESPONSE
+
+// Packet: 0x0a4b
+packetLen(0x0a4b, 22) // ZC_AIRSHIP_MAPMOVE
+
+// Packet: 0x0a4c
+packetLen(0x0a4c, 28) // ZC_AIRSHIP_SERVERMOVE
+
+// Packet: 0x0a4d
+packetLen(0x0a4d, -1)
+
+// Packet: 0x0a4e
+packetLen(0x0a4e, 6)
+
+// Packet: 0x0a4f
+packetLen(0x0a4f, -1)
+
+// Packet: 0x0a50
+packetLen(0x0a50, 4)
+
+// Packet: 0x0a51
+packetLen(0x0a51, 34) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a52
+packetLen(0x0a52, 20)
+
+// Packet: 0x0a53
+packetLen(0x0a53, 10)
+
+// Packet: 0x0a54
+packetLen(0x0a54, -1)
+
+// Packet: 0x0a55
+packetLen(0x0a55, 2)
+
+// Packet: 0x0a56
+packetLen(0x0a56, 6)
+
+// Packet: 0x0a57
+packetLen(0x0a57, 6)
+
+// Packet: 0x0a58
+packetLen(0x0a58, 8)
+
+// Packet: 0x0a59
+packetLen(0x0a59, -1)
+
+// Packet: 0x0a5a
+packetLen(0x0a5a, 2)
+
+// Packet: 0x0a5b
+packetLen(0x0a5b, 7)
+
+// Packet: 0x0a5c
+packetLen(0x0a5c, 18)
+
+// Packet: 0x0a5d
+packetLen(0x0a5d, 6)
+
+// Packet: 0x0a68
+packetLen(0x0a68, 3) // CZ_REQ_OPEN_UI
+
+// Packet: 0x0a69
+packetLen(0x0a69, 6)
+
+// Packet: 0x0a6a
+packetLen(0x0a6a, 12)
+
+// Packet: 0x0a6b
+packetLen(0x0a6b, -1)
+
+// Packet: 0x0a6c
+packetLen(0x0a6c, 7)
+
+// Packet: 0x0a6d
+packetLen(0x0a6d, -1)
+
+// Packet: 0x0a6e
+packetLen(0x0a6e, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x0a6f
+packetLen(0x0a6f, -1) // ZC_FORMATSTRING_MSG_COLOR
+
+// Packet: 0x0a70
+packetLen(0x0a70, 2)
+
+// Packet: 0x0a71
+packetLen(0x0a71, -1)
+
+// Packet: 0x0a72
+packetLen(0x0a72, 61)
+
+// Packet: 0x0a73
+packetLen(0x0a73, 2)
+
+// Packet: 0x0a74
+packetLen(0x0a74, 8)
+
+// Packet: 0x0a76
+packetLen(0x0a76, 80)
+
+// Packet: 0x0a77
+packetLen(0x0a77, 15)
+
+// Packet: 0x0a78
+packetLen(0x0a78, 15)
+
+// Packet: 0x0a79
+packetLen(0x0a79, -1)
+
+// Packet: 0x0a7b
+packetLen(0x0a7b, -1)
+
+// Packet: 0x0a7c
+packetLen(0x0a7c, -1)
+
+// Packet: 0x0a7d
+packetLen(0x0a7d, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0a7e
+packetLen(0x0a7e, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS_READY
+
+// Packet: 0x0a7f
+packetLen(0x0a7f, -1) // CZ_OFFLINE_STORE_CREATE
+
+// Packet: 0x0a80
+packetLen(0x0a80, 6)
+
+// Packet: 0x0a81
+packetLen(0x0a81, 4)
+
+// Packet: 0x0a82
+packetLen(0x0a82, 46)
+
+// Packet: 0x0a83
+packetLen(0x0a83, 46)
+
+// Packet: 0x0a84
+packetLen(0x0a84, 94) // ZC_GUILD_INFO
+
+// Packet: 0x0a85
+packetLen(0x0a85, 82)
+
+// Packet: 0x0a86
+packetLen(0x0a86, -1)
+
+// Packet: 0x0a87
+packetLen(0x0a87, -1) // ZC_BAN_LIST
+
+// Packet: 0x0a88
+packetLen(0x0a88, 2) // CZ_COOLDOWN_RESET
+
+// Packet: 0x0a89
+packetLen(0x0a89, 61) // ZC_NOTIFY_OFFLINE_STORE
+
+// Packet: 0x0a8a
+packetLen(0x0a8a, 6) // ZC_OFFLINE_STORE_VANISH
+
+// Packet: 0x0a8b
+packetLen(0x0a8b, 2)
+
+// Packet: 0x0a8c
+packetLen(0x0a8c, 2)
+
+// Packet: 0x0a8d
+packetLen(0x0a8d, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS
+
+// Packet: 0x0a8e
+packetLen(0x0a8e, 2)
+
+// Packet: 0x0a8f
+packetLen(0x0a8f, 2)
+
+// Packet: 0x0a90
+packetLen(0x0a90, 3)
+
+// Packet: 0x0a91
+packetLen(0x0a91, -1) // ZC_OFFLINE_STORE_ITEMS
+
+// Packet: 0x0a92
+packetLen(0x0a92, -1)
+
+// Packet: 0x0a93
+packetLen(0x0a93, 3)
+
+// Packet: 0x0a94
+packetLen(0x0a94, 2)
+
+// Packet: 0x0a95
+packetLen(0x0a95, 4)
+
+// Packet: 0x0a96
+packetLen(0x0a96, 61) // ZC_ADD_EXCHANGE_ITEM4
+
+// Packet: 0x0a97
+packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_ADD
+
+// Packet: 0x0a98
+packetLen(0x0a98, 10) // ZC_ALT_EQUIPMENT_EQUIP
+
+// Packet: 0x0a99
+packetLen(0x0a99, 4) // CZ_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9a
+packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9b
+packetLen(0x0a9b, -1) // ZC_ALT_EQUIPMENT_ITEMS
+
+// Packet: 0x0a9c
+packetLen(0x0a9c, 2) // CZ_ALT_EQUIPMENT_SWITCH
+
+// Packet: 0x0a9d
+packetLen(0x0a9d, 4) // ZC_ALT_EQUIPMENT_SWITCH_ACK
+
+// Packet: 0x0a9e
+packetLen(0x0a9e, 2)
+
+// Packet: 0x0a9f
+packetLen(0x0a9f, 2)
+
+// Packet: 0x0aa0
+packetLen(0x0aa0, 2) // ZC_REFINE_OPEN_WINDOW
+
+// Packet: 0x0aa1
+packetLen(0x0aa1, 4) // CZ_REFINE_ADD_ITEM
+
+// Packet: 0x0aa2
+packetLen(0x0aa2, -1) // ZC_REFINE_ADD_ITEM
+
+// Packet: 0x0aa3
+packetLen(0x0aa3, 9) // CZ_REFINE_ITEM_REQUEST
+
+// Packet: 0x0aa4
+packetLen(0x0aa4, 2) // CZ_REFINE_WINDOW_CLOSE
+
+// Packet: 0x0aa5
+packetLen(0x0aa5, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0aa6
+packetLen(0x0aa6, 36) // ZC_MEMBER_ADD
+
+// Packet: 0x0aa7
+packetLen(0x0aa7, 6) // ZC_INVENTORY_MOVE_FAILED
+
+// Packet: 0x0aa8
+packetLen(0x0aa8, 5)
+
+// Packet: 0x0aa9
+packetLen(0x0aa9, -1)
+
+// Packet: 0x0aaa
+packetLen(0x0aaa, -1)
+
+// Packet: 0x0aab
+packetLen(0x0aab, -1)
+
+// Packet: 0x0aac
+packetLen(0x0aac, 69)
+
+// Packet: 0x0aad
+packetLen(0x0aad, 51)
+
+// Packet: 0x0aae
+packetLen(0x0aae, 2)
+
+// Packet: 0x0aaf
+packetLen(0x0aaf, 6)
+
+// Packet: 0x0ab0
+packetLen(0x0ab0, 6)
+
+// Packet: 0x0ab1
+packetLen(0x0ab1, 14)
+
+// Packet: 0x0ab2
+packetLen(0x0ab2, 7) // ZC_GROUP_ISALIVE
+
+// Packet: 0x0ab3
+packetLen(0x0ab3, 19)
+
+// Packet: 0x0ab4
+packetLen(0x0ab4, 6)
+
+// Packet: 0x0ab5
+packetLen(0x0ab5, 2)
+
+// Packet: 0x0ab6
+packetLen(0x0ab6, 8)
+
+// Packet: 0x0ab7
+packetLen(0x0ab7, 4)
+
+// Packet: 0x0ab8
+packetLen(0x0ab8, 2)
+
+// Packet: 0x0ab9
+packetLen(0x0ab9, 47) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0aba
+packetLen(0x0aba, 2)
+
+// Packet: 0x0abb
+packetLen(0x0abb, 2)
+
+// Packet: 0x0abc
+packetLen(0x0abc, -1)
+
+// Packet: 0x0abd
+packetLen(0x0abd, 10) // ZC_PARTY_MEMBER_JOB_LEVEL
+
+// Packet: 0x0abe
+packetLen(0x0abe, -1) // ZC_WARPLIST
+
+// Packet: 0x0abf
+packetLen(0x0abf, -1)
+
+// Packet: 0x0ac0
+packetLen(0x0ac0, 26) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x0ac1
+packetLen(0x0ac1, 26) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x0ac2
+packetLen(0x0ac2, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0ac3
+packetLen(0x0ac3, 2)
+
+// Packet: 0x0ac4
+packetLen(0x0ac4, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x0ac5
+packetLen(0x0ac5, 156) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0ac6
+packetLen(0x0ac6, 156)
+
+// Packet: 0x0ac7
+packetLen(0x0ac7, 156) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0ac8
+packetLen(0x0ac8, 2) // ZC_UNKNOWN_CLEAN_ITEMS_LISTS
+
+// Packet: 0x0ac9
+packetLen(0x0ac9, -1)
+
+// Packet: 0x0aca
+packetLen(0x0aca, 3)
+
+// Packet: 0x0acb
+packetLen(0x0acb, 12) // ZC_PAR_CHANGE
+
+// Packet: 0x0acc
+packetLen(0x0acc, 18) // ZC_NOTIFY_EXP
+
+// Packet: 0x0acd
+packetLen(0x0acd, 23)
+
+// Packet: 0x0ace
+packetLen(0x0ace, 4)
+
+// Packet: 0x0acf
+packetLen(0x0acf, 68) // CA_LOGIN_OTP
+
+// Packet: 0x0ad0
+packetLen(0x0ad0, 11) // CA_OTP_CODE
+
+// Packet: 0x0ad1
+packetLen(0x0ad1, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ad2
+packetLen(0x0ad2, 30)
+
+// Packet: 0x0ad3
+packetLen(0x0ad3, -1)
+
+// Packet: 0x0ad4
+packetLen(0x0ad4, -1)
+
+// Packet: 0x0ad5
+packetLen(0x0ad5, 2)
+
+// Packet: 0x0ad6
+packetLen(0x0ad6, 2)
+
+// Packet: 0x0ad7
+packetLen(0x0ad7, 8)
+
+// Packet: 0x0ad8
+packetLen(0x0ad8, 8)
+
+// Packet: 0x0ad9
+packetLen(0x0ad9, -1)
+
+// Packet: 0x0ada
+packetLen(0x0ada, 32) // ZC_REFINE_STATUS
+
+// Packet: 0x0adb
+packetLen(0x0adb, -1)
+
+// Packet: 0x0adc
+packetLen(0x0adc, 6) // ZC_EQUIPWIN_OTHER
+
+// Packet: 0x0add
+packetLen(0x0add, 24) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x0ade
+packetLen(0x0ade, 6) // ZC_OVERWEIGHT_PERCENT
+
+// Packet: 0x0adf
+packetLen(0x0adf, 58) // ZC_ACK_REQNAME_TITLE
+
+// Packet: 0x0ae0
+packetLen(0x0ae0, 30)
+
+// Packet: 0x0ae1
+packetLen(0x0ae1, 28)
+
+// Packet: 0x0ae2
+packetLen(0x0ae2, 7) // ZC_OPEN_UI
+
+// Packet: 0x0ae3
+packetLen(0x0ae3, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ae4
+packetLen(0x0ae4, 89) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0ae5
+packetLen(0x0ae5, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0ae6
+packetLen(0x0ae6, 10)
+
+// Packet: 0x0ae7
+packetLen(0x0ae7, 38)
+
+// Packet: 0x0ae8
+packetLen(0x0ae8, 2)
+
+// Packet: 0x0ae9
+packetLen(0x0ae9, 13) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x0aec
+packetLen(0x0aec, 2)
+
+// Packet: 0x0aed
+packetLen(0x0aed, 2)
+
+// Packet: 0x0aee
+packetLen(0x0aee, 2)
+
+// Packet: 0x0aef
+packetLen(0x0aef, 2) // CZ_ATTENDANCE_REWARD_REQUEST
+
+// Packet: 0x0af0
+packetLen(0x0af0, 10) // ZC_UI_ACTION
+
+// Packet: 0x0af2
+packetLen(0x0af2, 40)
+
+// Packet: 0x0af3
+packetLen(0x0af3, -1)
+
+// Packet: 0x0af4
+packetLen(0x0af4, 11) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0af5
+packetLen(0x0af5, 3)
+
+// Packet: 0x0af6
+packetLen(0x0af6, 88)
+
+// Packet: 0x0af7
+packetLen(0x0af7, 32) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0af8
+packetLen(0x0af8, 11)
+
+// Packet: 0x0af9
+packetLen(0x0af9, 6)
+
+// Packet: 0x0afa
+packetLen(0x0afa, 54)
+
+// Packet: 0x0afb
+packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
+
+// Packet: 0x0afc
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
+
+// Packet: 0x0afd
+packetLen(0x0afd, -1) // ZC_GUILD_POSITION
+
+// Packet: 0x0afe
+packetLen(0x0afe, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x0aff
+packetLen(0x0aff, -1) // ZC_ALL_QUEST_LIST4
+
+// Packet: 0x0b00
+packetLen(0x0b00, 8)
+
+// Packet: 0x0b01
+packetLen(0x0b01, 56)
+
+// Packet: 0x0b02
+packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
+
+// Packet: 0x0b03
+packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
+
+// Packet: 0x0b04
+packetLen(0x0b04, 80)
+
+// Packet: 0x0b05
+packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
+
+// Packet: 0x0b07
+packetLen(0x0b07, -1)
+
+// Packet: 0x0b08
+packetLen(0x0b08, -1) // ZC_INVENTORY_START
+
+// Packet: 0x0b09
+packetLen(0x0b09, -1) // ZC_STORE_ITEMLIST_NORMAL_V6
+
+// Packet: 0x0b0a
+packetLen(0x0b0a, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0b0b
+packetLen(0x0b0b, 4) // ZC_INVENTORY_END
+
+// Packet: 0x0b0c
+packetLen(0x0b0c, 155) // ZC_ADD_QUEST_EX
+
+// Packet: 0x0b0d
+packetLen(0x0b0d, 10) // ZC_REMOVE_EFFECT
+
+// Packet: 0x0b0e
+packetLen(0x0b0e, -1) // ZC_NPC_BARTER_OPEN
+
+// Packet: 0x0b0f
+packetLen(0x0b0f, -1) // CZ_NPC_BARTER_PURCHASE
+
+// Packet: 0x0b10
+packetLen(0x0b10, 10) // CZ_START_USE_SKILL
+
+// Packet: 0x0b11
+packetLen(0x0b11, 4) // CZ_STOP_USE_SKILL
+
+// Packet: 0x0b12
+packetLen(0x0b12, 2) // CZ_NPC_BARTER_CLOSE
+
+// Packet: 0x0b13
+packetLen(0x0b13, 48) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0b14
+packetLen(0x0b14, 2) // CZ_INVENTORY_EXPAND
+
+// Packet: 0x0b15
+packetLen(0x0b15, 7) // ZC_ACK_INVENTORY_EXPAND
+
+// Packet: 0x0b16
+packetLen(0x0b16, 2) // CZ_INVENTORY_EXPAND_CONFIRMED
+
+// Packet: 0x0b17
+packetLen(0x0b17, 3) // ZC_ACK_INVENTORY_EXPAND_RESULT
+
+// Packet: 0x0b18
+packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
+
+// Packet: 0x0b19
+packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
+
+// Packet: 0x0b1a
+packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
+
+// Packet: 0x0b1b
+#if PACKETVER >= 20190213
+packetLen(0x0b1b, 2) // ZC_ALT_PING
+#endif
+
+// Packet: 0x0b1c
+#if PACKETVER >= 20190227
+packetLen(0x0b1c, 2) // CZ_PING
+#endif
+
+// Packet: 0x0b1d
+#if PACKETVER >= 20190227
+packetLen(0x0b1d, 2) // ZC_PING
+#endif
+
+// Packet: 0x0b1e
+#if PACKETVER >= 20190227
+packetLen(0x0b1e, 10)
+#endif
+
+// Packet: 0x0b1f
+#if PACKETVER >= 20190306
+packetLen(0x0b1f, 10)
+#endif
+
+// Packet: 0x0b20
+#if PACKETVER >= 20190403
+packetLen(0x0b20, 271) // ZC_SHORTCUT_KEY_LIST_V4
+#endif
+
+// Packet: 0x0b21
+#if PACKETVER >= 20190403
+packetLen(0x0b21, 13) // CZ_SHORTCUT_KEY_CHANGE
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b21, 10) // CZ_SHORTCUT_KEY_CHANGE
+#endif
+
+// Packet: 0x0b22
+#if PACKETVER >= 20190403
+packetLen(0x0b22, 5) // CZ_SHORTCUTKEYBAR_ROTATE
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b22, 6) // CZ_SHORTCUTKEYBAR_ROTATE
+#endif
+
+// Packet: 0x0b23
+#if PACKETVER >= 20190417
+packetLen(0x0b23, 6)
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b23, 10)
+#endif
+
+// Packet: 0x0b24
+#if PACKETVER >= 20190417
+packetLen(0x0b24, 6)
+#endif
+
+// Packet: 0x0b25
+#if PACKETVER >= 20190417
+packetLen(0x0b25, 6)
+#endif
+
+// Packet: 0x0b26
+#if PACKETVER >= 20190522
+// removed
+#elif PACKETVER >= 20190508
+packetLen(0x0b26, 16)
+#elif PACKETVER >= 20190417
+packetLen(0x0b26, 18)
+#endif
+
+// Packet: 0x0b27
+#if PACKETVER >= 20190508
+packetLen(0x0b27, -1)
+#endif
+
+// Packet: 0x0b28
+#if PACKETVER >= 20190522
+packetLen(0x0b28, 3)
+#elif PACKETVER >= 20190508
+packetLen(0x0b28, 22)
+#endif
+
+// Packet: 0x0b29
+#if PACKETVER >= 20190508
+packetLen(0x0b29, 6)
+#endif
+
+// Packet: 0x0b2a
+#if PACKETVER >= 20190522
+packetLen(0x0b2a, 40)
+#elif PACKETVER >= 20190508
+packetLen(0x0b2a, 6)
+#endif
+
+// Packet: 0x0b2b
+#if PACKETVER >= 20190522
+packetLen(0x0b2b, 11)
+#endif
+
+// Packet: 0x0b2c
+#if PACKETVER >= 20190522
+packetLen(0x0b2c, 3)
+#endif
+
+// Packet: 0x0b2d
+#if PACKETVER >= 20190522
+packetLen(0x0b2d, 11)
+#endif
+
+// Packet: 0x0b2e
+#if PACKETVER >= 20190522
+packetLen(0x0b2e, 4)
+#endif
+
+// Packet: 0x0b2f
+#if PACKETVER >= 20190529
+packetLen(0x0b2f, 73)
+#endif
+
+// Packet: 0x0b30
+#if PACKETVER >= 20190529
+packetLen(0x0b30, -1)
+#endif
+
+
+#endif /* COMMON_PACKETS2019_LEN_MAIN_H */
diff --git a/src/common/packets/packets2019_len_re.h b/src/common/packets/packets2019_len_re.h
new file mode 100644
index 000000000..c553d9324
--- /dev/null
+++ b/src/common/packets/packets2019_len_re.h
@@ -0,0 +1,4517 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef COMMON_PACKETS2019_LEN_RE_H
+#define COMMON_PACKETS2019_LEN_RE_H
+
+/* This file is autogenerated, please do not commit manual changes */
+
+// Packet: 0x0064
+packetLen(0x0064, 55) // CA_LOGIN
+
+// Packet: 0x0065
+packetLen(0x0065, 17) // CH_ENTER
+
+// Packet: 0x0066
+packetLen(0x0066, 3) // CH_SELECT_CHAR
+
+// Packet: 0x0067
+packetLen(0x0067, 37) // CH_MAKE_CHAR
+
+// Packet: 0x0068
+packetLen(0x0068, 46) // CH_DELETE_CHAR
+
+// Packet: 0x0069
+packetLen(0x0069, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x006a
+packetLen(0x006a, 23) // AC_REFUSE_LOGIN
+
+// Packet: 0x006b
+packetLen(0x006b, -1) // HC_ACCEPT_ENTER
+
+// Packet: 0x006c
+packetLen(0x006c, 3) // HC_REFUSE_ENTER
+
+// Packet: 0x006d
+packetLen(0x006d, 157) // HC_ACCEPT_MAKECHAR
+
+// Packet: 0x006e
+packetLen(0x006e, 3) // HC_REFUSE_MAKECHAR
+
+// Packet: 0x006f
+packetLen(0x006f, 2) // HC_ACCEPT_DELETECHAR
+
+// Packet: 0x0070
+packetLen(0x0070, 3) // HC_REFUSE_DELETECHAR
+
+// Packet: 0x0071
+packetLen(0x0071, 28) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0072
+packetLen(0x0072, 22) // CZ_ENTER
+
+// Packet: 0x0073
+packetLen(0x0073, 11) // ZC_ACCEPT_ENTER
+
+// Packet: 0x0074
+packetLen(0x0074, 3) // ZC_REFUSE_ENTER
+
+// Packet: 0x0075
+packetLen(0x0075, -1) // ZC_NOTIFY_INITCHAR
+
+// Packet: 0x0076
+packetLen(0x0076, 9) // ZC_NOTIFY_UPDATECHAR
+
+// Packet: 0x0077
+packetLen(0x0077, 5) // ZC_NOTIFY_UPDATEPLAYER
+
+// Packet: 0x0078
+packetLen(0x0078, 55) // ZC_NOTIFY_STANDENTRY
+
+// Packet: 0x0079
+packetLen(0x0079, 53) // ZC_NOTIFY_NEWENTRY
+
+// Packet: 0x007a
+packetLen(0x007a, 58) // ZC_NOTIFY_ACTENTRY
+
+// Packet: 0x007b
+packetLen(0x007b, 60) // ZC_NOTIFY_MOVEENTRY
+
+// Packet: 0x007c
+packetLen(0x007c, 44) // ZC_NOTIFY_STANDENTRY_NPC
+
+// Packet: 0x007d
+packetLen(0x007d, 2) // CZ_NOTIFY_ACTORINIT
+
+// Packet: 0x007e
+packetLen(0x007e, 105) // CZ_REQUEST_TIME
+
+// Packet: 0x007f
+packetLen(0x007f, 6) // ZC_NOTIFY_TIME
+
+// Packet: 0x0080
+packetLen(0x0080, 7) // ZC_NOTIFY_VANISH
+
+// Packet: 0x0081
+packetLen(0x0081, 3) // SC_NOTIFY_BAN
+
+// Packet: 0x0082
+packetLen(0x0082, 2) // CZ_REQUEST_QUIT
+
+// Packet: 0x0083
+packetLen(0x0083, 2) // ZC_ACCEPT_QUIT
+
+// Packet: 0x0084
+packetLen(0x0084, 2) // ZC_REFUSE_QUIT
+
+// Packet: 0x0085
+packetLen(0x0085, 10) // CZ_REQUEST_MOVE
+
+// Packet: 0x0086
+packetLen(0x0086, 16) // ZC_NOTIFY_MOVE
+
+// Packet: 0x0087
+packetLen(0x0087, 12) // ZC_NOTIFY_PLAYERMOVE
+
+// Packet: 0x0088
+packetLen(0x0088, 10) // ZC_STOPMOVE
+
+// Packet: 0x0089
+packetLen(0x0089, 11) // CZ_REQUEST_ACT
+
+// Packet: 0x008a
+packetLen(0x008a, 29) // ZC_NOTIFY_ACT
+
+// Packet: 0x008b
+packetLen(0x008b, 23) // ZC_NOTIFY_ACT_POSITION
+
+// Packet: 0x008c
+packetLen(0x008c, 14)
+
+// Packet: 0x008d
+packetLen(0x008d, -1) // ZC_NOTIFY_CHAT
+
+// Packet: 0x008e
+packetLen(0x008e, -1) // ZC_NOTIFY_PLAYERCHAT
+
+// Packet: 0x0090
+packetLen(0x0090, 7) // CZ_CONTACTNPC
+
+// Packet: 0x0091
+packetLen(0x0091, 22) // ZC_NPCACK_MAPMOVE
+
+// Packet: 0x0092
+packetLen(0x0092, 28) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0093
+packetLen(0x0093, 2) // ZC_NPCACK_ENABLE
+
+// Packet: 0x0094
+packetLen(0x0094, 19) // CZ_REQNAME
+
+// Packet: 0x0095
+packetLen(0x0095, 30) // ZC_ACK_REQNAME
+
+// Packet: 0x0096
+packetLen(0x0096, -1) // CZ_WHISPER
+
+// Packet: 0x0097
+packetLen(0x0097, -1) // ZC_WHISPER
+
+// Packet: 0x0098
+packetLen(0x0098, 3) // ZC_ACK_WHISPER
+
+// Packet: 0x0099
+packetLen(0x0099, -1) // CZ_BROADCAST
+
+// Packet: 0x009a
+packetLen(0x009a, -1) // ZC_BROADCAST
+
+// Packet: 0x009b
+packetLen(0x009b, 34) // CZ_CHANGE_DIRECTION
+
+// Packet: 0x009c
+packetLen(0x009c, 9) // ZC_CHANGE_DIRECTION
+
+// Packet: 0x009d
+packetLen(0x009d, 19) // ZC_ITEM_ENTRY
+
+// Packet: 0x009e
+packetLen(0x009e, 19) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x009f
+packetLen(0x009f, 20) // CZ_ITEM_PICKUP
+
+// Packet: 0x00a0
+packetLen(0x00a0, 33) // ZC_ITEM_PICKUP_ACK
+
+// Packet: 0x00a1
+packetLen(0x00a1, 6) // ZC_ITEM_DISAPPEAR
+
+// Packet: 0x00a2
+packetLen(0x00a2, 14) // CZ_ITEM_THROW
+
+// Packet: 0x00a3
+packetLen(0x00a3, -1) // ZC_NORMAL_ITEMLIST
+
+// Packet: 0x00a4
+packetLen(0x00a4, -1) // ZC_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a5
+packetLen(0x00a5, -1) // ZC_STORE_NORMAL_ITEMLIST
+
+// Packet: 0x00a6
+packetLen(0x00a6, -1) // ZC_STORE_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a7
+packetLen(0x00a7, 9)
+
+// Packet: 0x00a8
+packetLen(0x00a8, 7) // ZC_USE_ITEM_ACK
+
+// Packet: 0x00a9
+packetLen(0x00a9, 6) // CZ_REQ_WEAR_EQUIP
+
+// Packet: 0x00aa
+packetLen(0x00aa, 9) // ZC_REQ_WEAR_EQUIP_ACK
+
+// Packet: 0x00ab
+packetLen(0x00ab, 4) // CZ_REQ_TAKEOFF_EQUIP
+
+// Packet: 0x00ac
+packetLen(0x00ac, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK
+
+// Packet: 0x00ae
+packetLen(0x00ae, -1) // ZC_REQ_ITEM_EXPLANATION_ACK
+
+// Packet: 0x00af
+packetLen(0x00af, 6) // ZC_ITEM_THROW_ACK
+
+// Packet: 0x00b0
+packetLen(0x00b0, 8) // ZC_PAR_CHANGE
+
+// Packet: 0x00b1
+packetLen(0x00b1, 8) // ZC_LONGPAR_CHANGE
+
+// Packet: 0x00b2
+packetLen(0x00b2, 3) // CZ_RESTART
+
+// Packet: 0x00b3
+packetLen(0x00b3, 3) // ZC_RESTART_ACK
+
+// Packet: 0x00b4
+packetLen(0x00b4, -1) // ZC_SAY_DIALOG
+
+// Packet: 0x00b5
+packetLen(0x00b5, 6) // ZC_WAIT_DIALOG
+
+// Packet: 0x00b6
+packetLen(0x00b6, 6) // ZC_CLOSE_DIALOG
+
+// Packet: 0x00b7
+packetLen(0x00b7, -1) // ZC_MENU_LIST
+
+// Packet: 0x00b8
+packetLen(0x00b8, 7) // CZ_CHOOSE_MENU
+
+// Packet: 0x00b9
+packetLen(0x00b9, 6) // CZ_REQ_NEXT_SCRIPT
+
+// Packet: 0x00ba
+packetLen(0x00ba, 2) // CZ_REQ_STATUS
+
+// Packet: 0x00bb
+packetLen(0x00bb, 5) // CZ_STATUS_CHANGE
+
+// Packet: 0x00bc
+packetLen(0x00bc, 6) // ZC_STATUS_CHANGE_ACK
+
+// Packet: 0x00bd
+packetLen(0x00bd, 44) // ZC_STATUS
+
+// Packet: 0x00be
+packetLen(0x00be, 5) // ZC_STATUS_CHANGE
+
+// Packet: 0x00bf
+packetLen(0x00bf, 3) // CZ_REQ_EMOTION
+
+// Packet: 0x00c0
+packetLen(0x00c0, 7) // ZC_EMOTION
+
+// Packet: 0x00c1
+packetLen(0x00c1, 2) // CZ_REQ_USER_COUNT
+
+// Packet: 0x00c2
+packetLen(0x00c2, 6) // ZC_USER_COUNT
+
+// Packet: 0x00c3
+packetLen(0x00c3, 8) // ZC_SPRITE_CHANGE
+
+// Packet: 0x00c4
+packetLen(0x00c4, 6) // ZC_SELECT_DEALTYPE
+
+// Packet: 0x00c5
+packetLen(0x00c5, 7) // CZ_ACK_SELECT_DEALTYPE
+
+// Packet: 0x00c6
+packetLen(0x00c6, -1) // ZC_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c7
+packetLen(0x00c7, -1) // ZC_PC_SELL_ITEMLIST
+
+// Packet: 0x00c8
+packetLen(0x00c8, -1) // CZ_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c9
+packetLen(0x00c9, -1) // CZ_PC_SELL_ITEMLIST
+
+// Packet: 0x00ca
+packetLen(0x00ca, 3) // ZC_PC_PURCHASE_RESULT
+
+// Packet: 0x00cb
+packetLen(0x00cb, 3) // ZC_PC_SELL_RESULT
+
+// Packet: 0x00cc
+packetLen(0x00cc, 6) // CZ_DISCONNECT_CHARACTER
+
+// Packet: 0x00cd
+packetLen(0x00cd, 3) // ZC_ACK_DISCONNECT_CHARACTER
+
+// Packet: 0x00ce
+packetLen(0x00ce, 2) // CZ_DISCONNECT_ALL_CHARACTER
+
+// Packet: 0x00cf
+packetLen(0x00cf, 27) // CZ_SETTING_WHISPER_PC
+
+// Packet: 0x00d0
+packetLen(0x00d0, 3) // CZ_SETTING_WHISPER_STATE
+
+// Packet: 0x00d1
+packetLen(0x00d1, 4) // ZC_SETTING_WHISPER_PC
+
+// Packet: 0x00d2
+packetLen(0x00d2, 4) // ZC_SETTING_WHISPER_STATE
+
+// Packet: 0x00d3
+packetLen(0x00d3, 2) // CZ_REQ_WHISPER_LIST
+
+// Packet: 0x00d4
+packetLen(0x00d4, -1) // ZC_WHISPER_LIST
+
+// Packet: 0x00d5
+packetLen(0x00d5, -1) // CZ_CREATE_CHATROOM
+
+// Packet: 0x00d6
+packetLen(0x00d6, 3) // ZC_ACK_CREATE_CHATROOM
+
+// Packet: 0x00d7
+packetLen(0x00d7, -1) // ZC_ROOM_NEWENTRY
+
+// Packet: 0x00d8
+packetLen(0x00d8, 6) // ZC_DESTROY_ROOM
+
+// Packet: 0x00d9
+packetLen(0x00d9, 14) // CZ_REQ_ENTER_ROOM
+
+// Packet: 0x00da
+packetLen(0x00da, 3) // ZC_REFUSE_ENTER_ROOM
+
+// Packet: 0x00db
+packetLen(0x00db, -1) // ZC_ENTER_ROOM
+
+// Packet: 0x00dc
+packetLen(0x00dc, 28) // ZC_MEMBER_NEWENTRY
+
+// Packet: 0x00dd
+packetLen(0x00dd, 29) // ZC_MEMBER_EXIT
+
+// Packet: 0x00de
+packetLen(0x00de, -1) // CZ_CHANGE_CHATROOM
+
+// Packet: 0x00df
+packetLen(0x00df, -1) // ZC_CHANGE_CHATROOM
+
+// Packet: 0x00e0
+packetLen(0x00e0, 30) // CZ_REQ_ROLE_CHANGE
+
+// Packet: 0x00e1
+packetLen(0x00e1, 30) // ZC_ROLE_CHANGE
+
+// Packet: 0x00e2
+packetLen(0x00e2, 26) // CZ_REQ_EXPEL_MEMBER
+
+// Packet: 0x00e3
+packetLen(0x00e3, 2) // CZ_EXIT_ROOM
+
+// Packet: 0x00e4
+packetLen(0x00e4, 6) // CZ_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e5
+packetLen(0x00e5, 26) // ZC_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e6
+packetLen(0x00e6, 3) // CZ_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e7
+packetLen(0x00e7, 3) // ZC_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e8
+packetLen(0x00e8, 8) // CZ_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00e9
+packetLen(0x00e9, 29) // ZC_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00ea
+packetLen(0x00ea, 5) // ZC_ACK_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00eb
+packetLen(0x00eb, 2) // CZ_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ec
+packetLen(0x00ec, 3) // ZC_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ed
+packetLen(0x00ed, 2) // CZ_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ee
+packetLen(0x00ee, 2) // ZC_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ef
+packetLen(0x00ef, 2) // CZ_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f0
+packetLen(0x00f0, 3) // ZC_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f1
+packetLen(0x00f1, 2) // ZC_EXCHANGEITEM_UNDO
+
+// Packet: 0x00f2
+packetLen(0x00f2, 6) // ZC_NOTIFY_STOREITEM_COUNTINFO
+
+// Packet: 0x00f3
+packetLen(0x00f3, -1) // CZ_REQUEST_CHAT
+
+// Packet: 0x00f4
+packetLen(0x00f4, 31) // ZC_ADD_ITEM_TO_STORE
+
+// Packet: 0x00f5
+packetLen(0x00f5, 11) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY
+
+// Packet: 0x00f6
+packetLen(0x00f6, 8) // ZC_DELETE_ITEM_FROM_STORE
+
+// Packet: 0x00f7
+packetLen(0x00f7, 17) // CZ_REQUEST_TIME
+
+// Packet: 0x00f8
+packetLen(0x00f8, 2) // ZC_CLOSE_STORE
+
+// Packet: 0x00f9
+packetLen(0x00f9, 26) // CZ_MAKE_GROUP
+
+// Packet: 0x00fa
+packetLen(0x00fa, 3) // ZC_ACK_MAKE_GROUP
+
+// Packet: 0x00fb
+packetLen(0x00fb, -1) // ZC_GROUP_LIST
+
+// Packet: 0x00fc
+packetLen(0x00fc, 6) // CZ_REQ_JOIN_GROUP
+
+// Packet: 0x00fd
+packetLen(0x00fd, 27) // ZC_ACK_REQ_JOIN_GROUP
+
+// Packet: 0x00fe
+packetLen(0x00fe, 30) // ZC_REQ_JOIN_GROUP
+
+// Packet: 0x00ff
+packetLen(0x00ff, 10) // CZ_JOIN_GROUP
+
+// Packet: 0x0100
+packetLen(0x0100, 2) // CZ_REQ_LEAVE_GROUP
+
+// Packet: 0x0101
+packetLen(0x0101, 6) // ZC_GROUPINFO_CHANGE
+
+// Packet: 0x0102
+packetLen(0x0102, 6) // CZ_CHANGE_GROUPEXPOPTION
+
+// Packet: 0x0103
+packetLen(0x0103, 30) // CZ_REQ_EXPEL_GROUP_MEMBER
+
+// Packet: 0x0104
+packetLen(0x0104, 79) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0105
+packetLen(0x0105, 31) // ZC_DELETE_MEMBER_FROM_GROUP
+
+// Packet: 0x0106
+packetLen(0x0106, 10) // ZC_NOTIFY_HP_TO_GROUPM
+
+// Packet: 0x0107
+packetLen(0x0107, 10) // ZC_NOTIFY_POSITION_TO_GROUPM
+
+// Packet: 0x0108
+packetLen(0x0108, -1) // CZ_REQUEST_CHAT_PARTY
+
+// Packet: 0x0109
+packetLen(0x0109, -1) // ZC_NOTIFY_CHAT_PARTY
+
+// Packet: 0x010a
+packetLen(0x010a, 6) // ZC_MVP_GETTING_ITEM
+
+// Packet: 0x010b
+packetLen(0x010b, 6) // ZC_MVP_GETTING_SPECIAL_EXP
+
+// Packet: 0x010c
+packetLen(0x010c, 6) // ZC_MVP
+
+// Packet: 0x010d
+packetLen(0x010d, 2) // ZC_THROW_MVPITEM
+
+// Packet: 0x010e
+packetLen(0x010e, 11) // ZC_SKILLINFO_UPDATE
+
+// Packet: 0x010f
+packetLen(0x010f, -1) // ZC_SKILLINFO_LIST
+
+// Packet: 0x0110
+packetLen(0x0110, 14) // ZC_ACK_TOUSESKILL
+
+// Packet: 0x0111
+packetLen(0x0111, 39) // ZC_ADD_SKILL
+
+// Packet: 0x0112
+packetLen(0x0112, 4) // CZ_UPGRADE_SKILLLEVEL
+
+// Packet: 0x0113
+packetLen(0x0113, 25) // CZ_USE_SKILL
+
+// Packet: 0x0114
+packetLen(0x0114, 31) // ZC_NOTIFY_SKILL
+
+// Packet: 0x0115
+packetLen(0x0115, 35) // ZC_NOTIFY_SKILL_POSITION
+
+// Packet: 0x0116
+packetLen(0x0116, 17) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0117
+packetLen(0x0117, 18) // ZC_NOTIFY_GROUNDSKILL
+
+// Packet: 0x0118
+packetLen(0x0118, 2) // CZ_CANCEL_LOCKON
+
+// Packet: 0x0119
+packetLen(0x0119, 13) // ZC_STATE_CHANGE
+
+// Packet: 0x011a
+packetLen(0x011a, 15) // ZC_USE_SKILL
+
+// Packet: 0x011b
+packetLen(0x011b, 20) // CZ_SELECT_WARPPOINT
+
+// Packet: 0x011c
+packetLen(0x011c, 68) // ZC_WARPLIST
+
+// Packet: 0x011d
+packetLen(0x011d, 2) // CZ_REMEMBER_WARPPOINT
+
+// Packet: 0x011e
+packetLen(0x011e, 3) // ZC_ACK_REMEMBER_WARPPOINT
+
+// Packet: 0x011f
+packetLen(0x011f, 16) // ZC_SKILL_ENTRY
+
+// Packet: 0x0120
+packetLen(0x0120, 6) // ZC_SKILL_DISAPPEAR
+
+// Packet: 0x0121
+packetLen(0x0121, 14) // ZC_NOTIFY_CARTITEM_COUNTINFO
+
+// Packet: 0x0122
+packetLen(0x0122, -1) // ZC_CART_EQUIPMENT_ITEMLIST
+
+// Packet: 0x0123
+packetLen(0x0123, -1) // ZC_CART_NORMAL_ITEMLIST
+
+// Packet: 0x0124
+packetLen(0x0124, 31) // ZC_ADD_ITEM_TO_CART
+
+// Packet: 0x0125
+packetLen(0x0125, 8) // ZC_DELETE_ITEM_FROM_CART
+
+// Packet: 0x0126
+packetLen(0x0126, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_CART
+
+// Packet: 0x0127
+packetLen(0x0127, 8) // CZ_MOVE_ITEM_FROM_CART_TO_BODY
+
+// Packet: 0x0128
+packetLen(0x0128, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_CART
+
+// Packet: 0x0129
+packetLen(0x0129, 8) // CZ_MOVE_ITEM_FROM_CART_TO_STORE
+
+// Packet: 0x012a
+packetLen(0x012a, 2) // CZ_REQ_CARTOFF
+
+// Packet: 0x012b
+packetLen(0x012b, 2) // ZC_CARTOFF
+
+// Packet: 0x012c
+packetLen(0x012c, 3) // ZC_ACK_ADDITEM_TO_CART
+
+// Packet: 0x012d
+packetLen(0x012d, 4) // ZC_OPENSTORE
+
+// Packet: 0x012e
+packetLen(0x012e, 2) // CZ_REQ_CLOSESTORE
+
+// Packet: 0x012f
+packetLen(0x012f, -1) // CZ_REQ_OPENSTORE
+
+// Packet: 0x0130
+packetLen(0x0130, 6) // CZ_REQ_BUY_FROMMC
+
+// Packet: 0x0131
+packetLen(0x0131, 86) // ZC_STORE_ENTRY
+
+// Packet: 0x0132
+packetLen(0x0132, 6) // ZC_DISAPPEAR_ENTRY
+
+// Packet: 0x0133
+packetLen(0x0133, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0134
+packetLen(0x0134, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0135
+packetLen(0x0135, 7) // ZC_PC_PURCHASE_RESULT_FROMMC
+
+// Packet: 0x0136
+packetLen(0x0136, -1) // ZC_PC_PURCHASE_MYITEMLIST
+
+// Packet: 0x0137
+packetLen(0x0137, 6) // ZC_DELETEITEM_FROM_MCSTORE
+
+// Packet: 0x0138
+packetLen(0x0138, 3) // CZ_PKMODE_CHANGE
+
+// Packet: 0x0139
+packetLen(0x0139, 16) // ZC_ATTACK_FAILURE_FOR_DISTANCE
+
+// Packet: 0x013a
+packetLen(0x013a, 4) // ZC_ATTACK_RANGE
+
+// Packet: 0x013b
+packetLen(0x013b, 4) // ZC_ACTION_FAILURE
+
+// Packet: 0x013c
+packetLen(0x013c, 4) // ZC_EQUIP_ARROW
+
+// Packet: 0x013d
+packetLen(0x013d, 6) // ZC_RECOVERY
+
+// Packet: 0x013e
+packetLen(0x013e, 24) // ZC_USESKILL_ACK
+
+// Packet: 0x013f
+packetLen(0x013f, 26) // CZ_ITEM_CREATE
+
+// Packet: 0x0140
+packetLen(0x0140, 22) // CZ_MOVETO_MAP
+
+// Packet: 0x0141
+packetLen(0x0141, 14) // ZC_COUPLESTATUS
+
+// Packet: 0x0142
+packetLen(0x0142, 6) // ZC_OPEN_EDITDLG
+
+// Packet: 0x0143
+packetLen(0x0143, 10) // CZ_INPUT_EDITDLG
+
+// Packet: 0x0144
+packetLen(0x0144, 23) // ZC_COMPASS
+
+// Packet: 0x0145
+packetLen(0x0145, 19) // ZC_SHOW_IMAGE
+
+// Packet: 0x0146
+packetLen(0x0146, 6) // CZ_CLOSE_DIALOG
+
+// Packet: 0x0147
+packetLen(0x0147, 39) // ZC_AUTORUN_SKILL
+
+// Packet: 0x0148
+packetLen(0x0148, 8) // ZC_RESURRECTION
+
+// Packet: 0x0149
+packetLen(0x0149, 9) // CZ_REQ_GIVE_MANNER_POINT
+
+// Packet: 0x014a
+packetLen(0x014a, 6) // ZC_ACK_GIVE_MANNER_POINT
+
+// Packet: 0x014b
+packetLen(0x014b, 27) // ZC_NOTIFY_MANNER_POINT_GIVEN
+
+// Packet: 0x014c
+packetLen(0x014c, -1) // ZC_MYGUILD_BASIC_INFO
+
+// Packet: 0x014d
+packetLen(0x014d, 2) // CZ_REQ_GUILD_MENUINTERFACE
+
+// Packet: 0x014e
+packetLen(0x014e, 6) // ZC_ACK_GUILD_MENUINTERFACE
+
+// Packet: 0x014f
+packetLen(0x014f, 6) // CZ_REQ_GUILD_MENU
+
+// Packet: 0x0150
+packetLen(0x0150, 110) // ZC_GUILD_INFO
+
+// Packet: 0x0151
+packetLen(0x0151, 6) // CZ_REQ_GUILD_EMBLEM_IMG
+
+// Packet: 0x0152
+packetLen(0x0152, -1) // ZC_GUILD_EMBLEM_IMG
+
+// Packet: 0x0153
+packetLen(0x0153, -1) // CZ_REGISTER_GUILD_EMBLEM_IMG
+
+// Packet: 0x0154
+packetLen(0x0154, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0155
+packetLen(0x0155, -1) // CZ_REQ_CHANGE_MEMBERPOS
+
+// Packet: 0x0156
+packetLen(0x0156, -1) // ZC_ACK_REQ_CHANGE_MEMBERS
+
+// Packet: 0x0157
+packetLen(0x0157, 6) // CZ_REQ_OPEN_MEMBER_INFO
+
+// Packet: 0x0159
+packetLen(0x0159, 54) // CZ_REQ_LEAVE_GUILD
+
+// Packet: 0x015a
+packetLen(0x015a, 66) // ZC_ACK_LEAVE_GUILD
+
+// Packet: 0x015b
+packetLen(0x015b, 54) // CZ_REQ_BAN_GUILD
+
+// Packet: 0x015c
+packetLen(0x015c, 90) // ZC_ACK_BAN_GUILD
+
+// Packet: 0x015d
+packetLen(0x015d, 42) // CZ_REQ_DISORGANIZE_GUILD
+
+// Packet: 0x015e
+packetLen(0x015e, 6) // ZC_ACK_DISORGANIZE_GUILD_RESULT
+
+// Packet: 0x015f
+packetLen(0x015f, 42) // ZC_ACK_DISORGANIZE_GUILD
+
+// Packet: 0x0160
+packetLen(0x0160, -1) // ZC_POSITION_INFO
+
+// Packet: 0x0161
+packetLen(0x0161, -1) // CZ_REG_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0162
+packetLen(0x0162, -1) // ZC_GUILD_SKILLINFO
+
+// Packet: 0x0163
+packetLen(0x0163, -1) // ZC_BAN_LIST
+
+// Packet: 0x0164
+packetLen(0x0164, -1) // ZC_OTHER_GUILD_LIST
+
+// Packet: 0x0165
+packetLen(0x0165, 30) // CZ_REQ_MAKE_GUILD
+
+// Packet: 0x0166
+packetLen(0x0166, -1) // ZC_POSITION_ID_NAME_INFO
+
+// Packet: 0x0167
+packetLen(0x0167, 3) // ZC_RESULT_MAKE_GUILD
+
+// Packet: 0x0168
+packetLen(0x0168, 14) // CZ_REQ_JOIN_GUILD
+
+// Packet: 0x0169
+packetLen(0x0169, 3) // ZC_ACK_REQ_JOIN_GUILD
+
+// Packet: 0x016a
+packetLen(0x016a, 30) // ZC_REQ_JOIN_GUILD
+
+// Packet: 0x016b
+packetLen(0x016b, 10) // CZ_JOIN_GUILD
+
+// Packet: 0x016c
+packetLen(0x016c, 43) // ZC_UPDATE_GDID
+
+// Packet: 0x016d
+packetLen(0x016d, 14) // ZC_UPDATE_CHARSTAT
+
+// Packet: 0x016e
+packetLen(0x016e, 186) // CZ_GUILD_NOTICE
+
+// Packet: 0x016f
+packetLen(0x016f, 182) // ZC_GUILD_NOTICE
+
+// Packet: 0x0170
+packetLen(0x0170, 14) // CZ_REQ_ALLY_GUILD
+
+// Packet: 0x0171
+packetLen(0x0171, 30) // ZC_REQ_ALLY_GUILD
+
+// Packet: 0x0172
+packetLen(0x0172, 10) // CZ_ALLY_GUILD
+
+// Packet: 0x0173
+packetLen(0x0173, 3) // ZC_ACK_REQ_ALLY_GUILD
+
+// Packet: 0x0174
+packetLen(0x0174, -1) // ZC_ACK_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0175
+packetLen(0x0175, 6) // CZ_REQ_GUILD_MEMBER_INFO
+
+// Packet: 0x0176
+packetLen(0x0176, 106) // ZC_ACK_GUILD_MEMBER_INFO
+
+// Packet: 0x0177
+packetLen(0x0177, -1) // ZC_ITEMIDENTIFY_LIST
+
+// Packet: 0x0178
+packetLen(0x0178, 4) // CZ_REQ_ITEMIDENTIFY
+
+// Packet: 0x0179
+packetLen(0x0179, 5) // ZC_ACK_ITEMIDENTIFY
+
+// Packet: 0x017a
+packetLen(0x017a, 4) // CZ_REQ_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017b
+packetLen(0x017b, -1) // ZC_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017c
+packetLen(0x017c, 6) // CZ_REQ_ITEMCOMPOSITION
+
+// Packet: 0x017d
+packetLen(0x017d, 7) // ZC_ACK_ITEMCOMPOSITION
+
+// Packet: 0x017e
+packetLen(0x017e, -1) // CZ_GUILD_CHAT
+
+// Packet: 0x017f
+packetLen(0x017f, -1) // ZC_GUILD_CHAT
+
+// Packet: 0x0180
+packetLen(0x0180, 6) // CZ_REQ_HOSTILE_GUILD
+
+// Packet: 0x0181
+packetLen(0x0181, 3) // ZC_ACK_REQ_HOSTILE_GUILD
+
+// Packet: 0x0182
+packetLen(0x0182, 106) // ZC_MEMBER_ADD
+
+// Packet: 0x0183
+packetLen(0x0183, 10) // CZ_REQ_DELETE_RELATED_GUILD
+
+// Packet: 0x0184
+packetLen(0x0184, 10) // ZC_DELETE_RELATED_GUILD
+
+// Packet: 0x0185
+packetLen(0x0185, 34) // ZC_ADD_RELATED_GUILD
+
+// Packet: 0x0187
+packetLen(0x0187, 6) // CH_UNKNOWN_PING
+
+// Packet: 0x0188
+packetLen(0x0188, 8) // ZC_ACK_ITEMREFINING
+
+// Packet: 0x0189
+packetLen(0x0189, 4) // ZC_NOTIFY_MAPINFO
+
+// Packet: 0x018a
+packetLen(0x018a, 4) // CZ_REQ_DISCONNECT
+
+// Packet: 0x018b
+packetLen(0x018b, 4) // ZC_ACK_REQ_DISCONNECT
+
+// Packet: 0x018c
+packetLen(0x018c, 29) // ZC_MONSTER_INFO
+
+// Packet: 0x018d
+packetLen(0x018d, -1) // ZC_MAKABLEITEMLIST
+
+// Packet: 0x018e
+packetLen(0x018e, 18) // CZ_REQMAKINGITEM
+
+// Packet: 0x018f
+packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM
+
+// Packet: 0x0190
+packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX
+
+// Packet: 0x0191
+packetLen(0x0191, 86) // ZC_TALKBOX_CHATCONTENTS
+
+// Packet: 0x0192
+packetLen(0x0192, 24) // ZC_UPDATE_MAPINFO
+
+// Packet: 0x0193
+packetLen(0x0193, 2) // CZ_REQNAME_BYGID
+
+// Packet: 0x0194
+packetLen(0x0194, 30) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0195
+packetLen(0x0195, 102) // ZC_ACK_REQNAMEALL
+
+// Packet: 0x0196
+packetLen(0x0196, 9) // ZC_MSG_STATE_CHANGE
+
+// Packet: 0x0197
+packetLen(0x0197, 4) // CZ_RESET
+
+// Packet: 0x0198
+packetLen(0x0198, 8) // CZ_CHANGE_MAPTYPE
+
+// Packet: 0x0199
+packetLen(0x0199, 4) // ZC_NOTIFY_MAPPROPERTY
+
+// Packet: 0x019a
+packetLen(0x019a, 14) // ZC_NOTIFY_RANKING
+
+// Packet: 0x019b
+packetLen(0x019b, 10) // ZC_NOTIFY_EFFECT
+
+// Packet: 0x019c
+packetLen(0x019c, -1) // CZ_LOCALBROADCAST
+
+// Packet: 0x019d
+packetLen(0x019d, 6) // CZ_CHANGE_EFFECTSTATE
+
+// Packet: 0x019e
+packetLen(0x019e, 2) // ZC_START_CAPTURE
+
+// Packet: 0x019f
+packetLen(0x019f, 6) // CZ_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a0
+packetLen(0x01a0, 3) // ZC_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a1
+packetLen(0x01a1, 3) // CZ_COMMAND_PET
+
+// Packet: 0x01a2
+packetLen(0x01a2, 37) // ZC_PROPERTY_PET
+
+// Packet: 0x01a3
+packetLen(0x01a3, 7) // ZC_FEED_PET
+
+// Packet: 0x01a4
+packetLen(0x01a4, 11) // ZC_CHANGESTATE_PET
+
+// Packet: 0x01a5
+packetLen(0x01a5, 26) // CZ_RENAME_PET
+
+// Packet: 0x01a6
+packetLen(0x01a6, -1) // ZC_PETEGG_LIST
+
+// Packet: 0x01a7
+packetLen(0x01a7, 4) // CZ_SELECT_PETEGG
+
+// Packet: 0x01a8
+packetLen(0x01a8, 4) // CZ_PETEGG_INFO
+
+// Packet: 0x01a9
+packetLen(0x01a9, 6) // CZ_PET_ACT
+
+// Packet: 0x01aa
+packetLen(0x01aa, 10) // ZC_PET_ACT
+
+// Packet: 0x01ab
+packetLen(0x01ab, 12) // ZC_PAR_CHANGE_USER
+
+// Packet: 0x01ac
+packetLen(0x01ac, 6) // ZC_SKILL_UPDATE
+
+// Packet: 0x01ad
+packetLen(0x01ad, -1) // ZC_MAKINGARROW_LIST
+
+// Packet: 0x01ae
+packetLen(0x01ae, 6) // CZ_REQ_MAKINGARROW
+
+// Packet: 0x01af
+packetLen(0x01af, 4) // CZ_REQ_CHANGECART
+
+// Packet: 0x01b0
+packetLen(0x01b0, 11) // ZC_NPCSPRITE_CHANGE
+
+// Packet: 0x01b1
+packetLen(0x01b1, 7) // ZC_SHOWDIGIT
+
+// Packet: 0x01b2
+packetLen(0x01b2, -1) // CZ_REQ_OPENSTORE2
+
+// Packet: 0x01b3
+packetLen(0x01b3, 67) // ZC_SHOW_IMAGE2
+
+// Packet: 0x01b4
+packetLen(0x01b4, 12) // ZC_CHANGE_GUILD
+
+// Packet: 0x01b5
+packetLen(0x01b5, 18) // SC_BILLING_INFO
+
+// Packet: 0x01b6
+packetLen(0x01b6, 114) // ZC_GUILD_INFO2
+
+// Packet: 0x01b7
+packetLen(0x01b7, 6) // CZ_GUILD_ZENY
+
+// Packet: 0x01b8
+packetLen(0x01b8, 3) // ZC_GUILD_ZENY_ACK
+
+// Packet: 0x01b9
+packetLen(0x01b9, 6) // ZC_DISPEL
+
+// Packet: 0x01ba
+packetLen(0x01ba, 26) // CZ_REMOVE_AID
+
+// Packet: 0x01bb
+packetLen(0x01bb, 26) // CZ_SHIFT
+
+// Packet: 0x01bc
+packetLen(0x01bc, 26) // CZ_RECALL
+
+// Packet: 0x01bd
+packetLen(0x01bd, 26) // CZ_RECALL_GID
+
+// Packet: 0x01be
+packetLen(0x01be, 2) // AC_ASK_PNGAMEROOM
+
+// Packet: 0x01bf
+packetLen(0x01bf, 3) // CA_REPLY_PNGAMEROOM
+
+// Packet: 0x01c0
+packetLen(0x01c0, 2) // CZ_REQ_REMAINTIME
+
+// Packet: 0x01c1
+packetLen(0x01c1, 14) // ZC_REPLY_REMAINTIME
+
+// Packet: 0x01c2
+packetLen(0x01c2, 10) // ZC_INFO_REMAINTIME
+
+// Packet: 0x01c3
+packetLen(0x01c3, -1) // ZC_BROADCAST2
+
+// Packet: 0x01c4
+packetLen(0x01c4, 32) // ZC_ADD_ITEM_TO_STORE2
+
+// Packet: 0x01c5
+packetLen(0x01c5, 32) // ZC_ADD_ITEM_TO_CART2
+
+// Packet: 0x01c6
+packetLen(0x01c6, 4) // CS_REQ_ENCRYPTION
+
+// Packet: 0x01c7
+packetLen(0x01c7, 2) // SC_ACK_ENCRYPTION
+
+// Packet: 0x01c8
+packetLen(0x01c8, 15) // ZC_USE_ITEM_ACK2
+
+// Packet: 0x01c9
+packetLen(0x01c9, 97) // ZC_SKILL_ENTRY2
+
+// Packet: 0x01ca
+packetLen(0x01ca, 3) // CZ_REQMAKINGHOMUN
+
+// Packet: 0x01cb
+packetLen(0x01cb, 9) // CZ_MONSTER_TALK
+
+// Packet: 0x01cc
+packetLen(0x01cc, 9) // ZC_MONSTER_TALK
+
+// Packet: 0x01cd
+packetLen(0x01cd, 30) // ZC_AUTOSPELLLIST
+
+// Packet: 0x01ce
+packetLen(0x01ce, 6) // CZ_SELECTAUTOSPELL
+
+// Packet: 0x01cf
+packetLen(0x01cf, 28) // ZC_DEVOTIONLIST
+
+// Packet: 0x01d0
+packetLen(0x01d0, 8) // ZC_SPIRITS
+
+// Packet: 0x01d1
+packetLen(0x01d1, 14) // ZC_BLADESTOP
+
+// Packet: 0x01d2
+packetLen(0x01d2, 10) // ZC_COMBODELAY
+
+// Packet: 0x01d3
+packetLen(0x01d3, 35) // ZC_SOUND
+
+// Packet: 0x01d4
+packetLen(0x01d4, 6) // ZC_OPEN_EDITDLGSTR
+
+// Packet: 0x01d5
+packetLen(0x01d5, -1) // CZ_INPUT_EDITDLGSTR
+
+// Packet: 0x01d6
+packetLen(0x01d6, 4) // ZC_NOTIFY_MAPPROPERTY2
+
+// Packet: 0x01d7
+packetLen(0x01d7, 15) // ZC_SPRITE_CHANGE2
+
+// Packet: 0x01d8
+packetLen(0x01d8, 58) // ZC_NOTIFY_STANDENTRY2
+
+// Packet: 0x01d9
+packetLen(0x01d9, 57) // ZC_NOTIFY_NEWENTRY2
+
+// Packet: 0x01da
+packetLen(0x01da, 64) // ZC_NOTIFY_MOVEENTRY2
+
+// Packet: 0x01db
+packetLen(0x01db, 2) // CA_REQ_HASH
+
+// Packet: 0x01dc
+packetLen(0x01dc, -1) // AC_ACK_HASH
+
+// Packet: 0x01dd
+packetLen(0x01dd, 47) // CA_LOGIN2
+
+// Packet: 0x01de
+packetLen(0x01de, 33) // ZC_NOTIFY_SKILL2
+
+// Packet: 0x01df
+packetLen(0x01df, 6) // CZ_REQ_ACCOUNTNAME
+
+// Packet: 0x01e0
+packetLen(0x01e0, 30) // ZC_ACK_ACCOUNTNAME
+
+// Packet: 0x01e1
+packetLen(0x01e1, 8) // ZC_SPIRITS2
+
+// Packet: 0x01e2
+packetLen(0x01e2, 34) // ZC_REQ_COUPLE
+
+// Packet: 0x01e3
+packetLen(0x01e3, 14) // CZ_JOIN_COUPLE
+
+// Packet: 0x01e4
+packetLen(0x01e4, 2) // ZC_START_COUPLE
+
+// Packet: 0x01e5
+packetLen(0x01e5, 6) // CZ_REQ_JOIN_COUPLE
+
+// Packet: 0x01e6
+packetLen(0x01e6, 26) // ZC_COUPLENAME
+
+// Packet: 0x01e7
+packetLen(0x01e7, 2) // CZ_DORIDORI
+
+// Packet: 0x01e8
+packetLen(0x01e8, 28) // CZ_MAKE_GROUP2
+
+// Packet: 0x01e9
+packetLen(0x01e9, 81) // ZC_ADD_MEMBER_TO_GROUP2
+
+// Packet: 0x01ea
+packetLen(0x01ea, 6) // ZC_CONGRATULATION
+
+// Packet: 0x01eb
+packetLen(0x01eb, 10) // ZC_NOTIFY_POSITION_TO_GUILDM
+
+// Packet: 0x01ec
+packetLen(0x01ec, 26) // ZC_GUILD_MEMBER_MAP_CHANGE
+
+// Packet: 0x01ed
+packetLen(0x01ed, 2) // CZ_CHOPOKGI
+
+// Packet: 0x01ee
+packetLen(0x01ee, -1) // ZC_NORMAL_ITEMLIST2
+
+// Packet: 0x01ef
+packetLen(0x01ef, -1) // ZC_CART_NORMAL_ITEMLIST2
+
+// Packet: 0x01f0
+packetLen(0x01f0, -1) // ZC_STORE_NORMAL_ITEMLIST2
+
+// Packet: 0x01f1
+packetLen(0x01f1, -1) // AC_NOTIFY_ERROR
+
+// Packet: 0x01f2
+packetLen(0x01f2, 20) // ZC_UPDATE_CHARSTAT2
+
+// Packet: 0x01f3
+packetLen(0x01f3, 10) // ZC_NOTIFY_EFFECT2
+
+// Packet: 0x01f4
+packetLen(0x01f4, 32) // ZC_REQ_EXCHANGE_ITEM2
+
+// Packet: 0x01f5
+packetLen(0x01f5, 9) // ZC_ACK_EXCHANGE_ITEM2
+
+// Packet: 0x01f6
+packetLen(0x01f6, 34) // ZC_REQ_BABY
+
+// Packet: 0x01f7
+packetLen(0x01f7, 14) // CZ_JOIN_BABY
+
+// Packet: 0x01f8
+packetLen(0x01f8, 2) // ZC_START_BABY
+
+// Packet: 0x01f9
+packetLen(0x01f9, 6) // CZ_REQ_JOIN_BABY
+
+// Packet: 0x01fa
+packetLen(0x01fa, 48) // CA_LOGIN3
+
+// Packet: 0x01fb
+packetLen(0x01fb, 56) // CH_DELETE_CHAR2
+
+// Packet: 0x01fc
+packetLen(0x01fc, -1) // ZC_REPAIRITEMLIST
+
+// Packet: 0x01fd
+packetLen(0x01fd, 25) // CZ_REQ_ITEMREPAIR
+
+// Packet: 0x01fe
+packetLen(0x01fe, 5) // ZC_ACK_ITEMREPAIR
+
+// Packet: 0x01ff
+packetLen(0x01ff, 10) // ZC_HIGHJUMP
+
+// Packet: 0x0200
+packetLen(0x0200, 26) // CA_CONNECT_INFO_CHANGED
+
+// Packet: 0x0201
+packetLen(0x0201, -1) // ZC_FRIENDS_LIST
+
+// Packet: 0x0202
+packetLen(0x0202, 26) // CZ_ADD_FRIENDS
+
+// Packet: 0x0203
+packetLen(0x0203, 10) // CZ_DELETE_FRIENDS
+
+// Packet: 0x0204
+packetLen(0x0204, 18) // CA_EXE_HASHCHECK
+
+// Packet: 0x0205
+packetLen(0x0205, 26) // ZC_DIVORCE
+
+// Packet: 0x0206
+packetLen(0x0206, 35) // ZC_FRIENDS_STATE
+
+// Packet: 0x0207
+packetLen(0x0207, 34) // ZC_REQ_ADD_FRIENDS
+
+// Packet: 0x0208
+packetLen(0x0208, 14) // CZ_ACK_REQ_ADD_FRIENDS
+
+// Packet: 0x0209
+packetLen(0x0209, 36) // ZC_ADD_FRIENDS_LIST
+
+// Packet: 0x020a
+packetLen(0x020a, 10) // ZC_DELETE_FRIENDS
+
+// Packet: 0x020d
+packetLen(0x020d, -1) // HC_BLOCK_CHARACTER
+
+// Packet: 0x020e
+packetLen(0x020e, 32) // ZC_STARSKILL
+
+// Packet: 0x020f
+packetLen(0x020f, 10) // CZ_REQ_PVPPOINT
+
+// Packet: 0x0210
+packetLen(0x0210, 22) // ZC_ACK_PVPPOINT
+
+// Packet: 0x0212
+packetLen(0x0212, 26) // CZ_REQ_GIVE_MANNER_BYNAME
+
+// Packet: 0x0213
+packetLen(0x0213, 26) // CZ_REQ_STATUS_GM
+
+// Packet: 0x0214
+packetLen(0x0214, 42) // ZC_ACK_STATUS_GM
+
+// Packet: 0x0215
+packetLen(0x0215, 6) // ZC_SKILLMSG
+
+// Packet: 0x0216
+packetLen(0x0216, 6) // ZC_BABYMSG
+
+// Packet: 0x0217
+packetLen(0x0217, 2) // CZ_BLACKSMITH_RANK
+
+// Packet: 0x0218
+packetLen(0x0218, 2) // CZ_ALCHEMIST_RANK
+
+// Packet: 0x0219
+packetLen(0x0219, 282) // ZC_BLACKSMITH_RANK
+
+// Packet: 0x021a
+packetLen(0x021a, 282) // ZC_ALCHEMIST_RANK
+
+// Packet: 0x021b
+packetLen(0x021b, 10) // ZC_BLACKSMITH_POINT
+
+// Packet: 0x021c
+packetLen(0x021c, 10) // ZC_ALCHEMIST_POINT
+
+// Packet: 0x021d
+packetLen(0x021d, 6) // CZ_LESSEFFECT
+
+// Packet: 0x021e
+packetLen(0x021e, 6) // ZC_LESSEFFECT
+
+// Packet: 0x021f
+packetLen(0x021f, 66) // ZC_NOTIFY_PKINFO
+
+// Packet: 0x0220
+packetLen(0x0220, 10) // ZC_NOTIFY_CRAZYKILLER
+
+// Packet: 0x0221
+packetLen(0x0221, -1) // ZC_NOTIFY_WEAPONITEMLIST
+
+// Packet: 0x0222
+packetLen(0x0222, 6) // CZ_REQ_WEAPONREFINE
+
+// Packet: 0x0223
+packetLen(0x0223, 10) // ZC_ACK_WEAPONREFINE
+
+// Packet: 0x0224
+packetLen(0x0224, 10) // ZC_TAEKWON_POINT
+
+// Packet: 0x0225
+packetLen(0x0225, 2) // CZ_TAEKWON_RANK
+
+// Packet: 0x0226
+packetLen(0x0226, 282) // ZC_TAEKWON_RANK
+
+// Packet: 0x0227
+packetLen(0x0227, 18) // ZC_GAME_GUARD
+
+// Packet: 0x0228
+packetLen(0x0228, 18) // CZ_ACK_GAME_GUARD
+
+// Packet: 0x0229
+packetLen(0x0229, 15) // ZC_STATE_CHANGE3
+
+// Packet: 0x022a
+packetLen(0x022a, 62) // ZC_NOTIFY_STANDENTRY3
+
+// Packet: 0x022b
+packetLen(0x022b, 61) // ZC_NOTIFY_NEWENTRY3
+
+// Packet: 0x022c
+packetLen(0x022c, 69) // ZC_NOTIFY_MOVEENTRY3
+
+// Packet: 0x022d
+packetLen(0x022d, 5) // CZ_COMMAND_MER
+
+// Packet: 0x022e
+packetLen(0x022e, 73) // ZC_PROPERTY_HOMUN
+
+// Packet: 0x022f
+packetLen(0x022f, 7) // ZC_FEED_MER
+
+// Packet: 0x0230
+packetLen(0x0230, 12) // ZC_CHANGESTATE_MER
+
+// Packet: 0x0231
+packetLen(0x0231, 26) // CZ_RENAME_MER
+
+// Packet: 0x0232
+packetLen(0x0232, 9) // CZ_REQUEST_MOVENPC
+
+// Packet: 0x0233
+packetLen(0x0233, 11) // CZ_REQUEST_ACTNPC
+
+// Packet: 0x0234
+packetLen(0x0234, 6) // CZ_REQUEST_MOVETOOWNER
+
+// Packet: 0x0235
+packetLen(0x0235, -1) // ZC_HOSKILLINFO_LIST
+
+// Packet: 0x0236
+packetLen(0x0236, 10) // ZC_KILLER_POINT
+
+// Packet: 0x0237
+packetLen(0x0237, 2) // CZ_KILLER_RANK
+
+// Packet: 0x0238
+packetLen(0x0238, 282) // ZC_KILLER_RANK
+
+// Packet: 0x0239
+packetLen(0x0239, 11) // ZC_HOSKILLINFO_UPDATE
+
+// Packet: 0x023a
+packetLen(0x023a, 4) // ZC_REQ_STORE_PASSWORD
+
+// Packet: 0x023b
+packetLen(0x023b, 36) // CZ_ACK_STORE_PASSWORD
+
+// Packet: 0x023c
+packetLen(0x023c, 6) // ZC_RESULT_STORE_PASSWORD
+
+// Packet: 0x023d
+packetLen(0x023d, 6) // AC_EVENT_RESULT
+
+// Packet: 0x023e
+packetLen(0x023e, 8) // HC_REQUEST_CHARACTER_PASSWORD
+
+// Packet: 0x023f
+packetLen(0x023f, 2) // CZ_MAIL_GET_LIST
+
+// Packet: 0x0240
+packetLen(0x0240, -1) // ZC_MAIL_REQ_GET_LIST
+
+// Packet: 0x0241
+packetLen(0x0241, 6) // CZ_MAIL_OPEN
+
+// Packet: 0x0242
+packetLen(0x0242, -1) // ZC_MAIL_REQ_OPEN
+
+// Packet: 0x0243
+packetLen(0x0243, 6) // CZ_MAIL_DELETE
+
+// Packet: 0x0244
+packetLen(0x0244, 6) // CZ_MAIL_GET_ITEM
+
+// Packet: 0x0245
+packetLen(0x0245, 3) // ZC_MAIL_REQ_GET_ITEM
+
+// Packet: 0x0246
+packetLen(0x0246, 4) // CZ_MAIL_RESET_ITEM
+
+// Packet: 0x0247
+packetLen(0x0247, 8) // CZ_MAIL_ADD_ITEM
+
+// Packet: 0x0248
+packetLen(0x0248, -1) // CZ_MAIL_SEND
+
+// Packet: 0x0249
+packetLen(0x0249, 3) // ZC_MAIL_REQ_SEND
+
+// Packet: 0x024a
+packetLen(0x024a, 70) // ZC_MAIL_RECEIVE
+
+// Packet: 0x024b
+packetLen(0x024b, 4) // CZ_AUCTION_CREATE
+
+// Packet: 0x024c
+packetLen(0x024c, 8) // CZ_AUCTION_ADD_ITEM
+
+// Packet: 0x024d
+packetLen(0x024d, 12) // CZ_AUCTION_ADD
+
+// Packet: 0x024e
+packetLen(0x024e, 6) // CZ_AUCTION_ADD_CANCEL
+
+// Packet: 0x024f
+packetLen(0x024f, 10) // CZ_AUCTION_BUY
+
+// Packet: 0x0250
+packetLen(0x0250, 3) // ZC_AUCTION_RESULT
+
+// Packet: 0x0251
+packetLen(0x0251, 34) // CZ_AUCTION_ITEM_SEARCH
+
+// Packet: 0x0252
+packetLen(0x0252, -1) // ZC_AUCTION_ITEM_REQ_SEARCH
+
+// Packet: 0x0253
+packetLen(0x0253, 3) // ZC_STARPLACE
+
+// Packet: 0x0254
+packetLen(0x0254, 3) // CZ_AGREE_STARPLACE
+
+// Packet: 0x0255
+packetLen(0x0255, 5) // ZC_ACK_MAIL_ADD_ITEM
+
+// Packet: 0x0256
+packetLen(0x0256, 5) // ZC_ACK_AUCTION_ADD_ITEM
+
+// Packet: 0x0257
+packetLen(0x0257, 8) // ZC_ACK_MAIL_DELETE
+
+// Packet: 0x0258
+packetLen(0x0258, 2) // CA_REQ_GAME_GUARD_CHECK
+
+// Packet: 0x0259
+packetLen(0x0259, 3) // AC_ACK_GAME_GUARD
+
+// Packet: 0x025a
+packetLen(0x025a, -1) // ZC_MAKINGITEM_LIST
+
+// Packet: 0x025b
+packetLen(0x025b, 8) // CZ_REQ_MAKINGITEM
+
+// Packet: 0x025c
+packetLen(0x025c, 4) // CZ_AUCTION_REQ_MY_INFO
+
+// Packet: 0x025d
+packetLen(0x025d, 6) // CZ_AUCTION_REQ_MY_SELL_STOP
+
+// Packet: 0x025e
+packetLen(0x025e, 4) // ZC_AUCTION_ACK_MY_SELL_STOP
+
+// Packet: 0x025f
+packetLen(0x025f, 6) // ZC_AUCTION_WINDOWS
+
+// Packet: 0x0260
+packetLen(0x0260, 6) // ZC_MAIL_WINDOWS
+
+// Packet: 0x0261
+packetLen(0x0261, 11) // AC_REQ_LOGIN_OLDEKEY
+
+// Packet: 0x0262
+packetLen(0x0262, 11) // AC_REQ_LOGIN_NEWEKEY
+
+// Packet: 0x0263
+packetLen(0x0263, 11) // AC_REQ_LOGIN_CARDPASS
+
+// Packet: 0x0264
+packetLen(0x0264, 20) // CA_ACK_LOGIN_OLDEKEY
+
+// Packet: 0x0265
+packetLen(0x0265, 20) // CA_ACK_LOGIN_NEWEKEY
+
+// Packet: 0x0266
+packetLen(0x0266, 30) // CA_ACK_LOGIN_CARDPASS
+
+// Packet: 0x0267
+packetLen(0x0267, 4) // AC_ACK_EKEY_FAIL_NOTEXIST
+
+// Packet: 0x0268
+packetLen(0x0268, 4) // AC_ACK_EKEY_FAIL_NOTUSESEKEY
+
+// Packet: 0x0269
+packetLen(0x0269, 4) // AC_ACK_EKEY_FAIL_NOTUSEDEKEY
+
+// Packet: 0x026a
+packetLen(0x026a, 4) // AC_ACK_EKEY_FAIL_AUTHREFUSE
+
+// Packet: 0x026b
+packetLen(0x026b, 4) // AC_ACK_EKEY_FAIL_INPUTEKEY
+
+// Packet: 0x026c
+packetLen(0x026c, 4) // AC_ACK_EKEY_FAIL_NOTICE
+
+// Packet: 0x026d
+packetLen(0x026d, 4) // AC_ACK_EKEY_FAIL_NEEDCARDPASS
+
+// Packet: 0x026f
+packetLen(0x026f, 2) // AC_ACK_FIRST_LOGIN
+
+// Packet: 0x0270
+packetLen(0x0270, 2) // AC_REQ_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0271
+packetLen(0x0271, 40) // CA_ACK_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0272
+packetLen(0x0272, 44) // AC_ACK_PT_ID_INFO
+
+// Packet: 0x0273
+packetLen(0x0273, 30) // CZ_REQ_MAIL_RETURN
+
+// Packet: 0x0274
+packetLen(0x0274, 8) // ZC_ACK_MAIL_RETURN
+
+// Packet: 0x0275
+packetLen(0x0275, 37) // CH_ENTER2
+
+// Packet: 0x0276
+packetLen(0x0276, -1) // AC_ACCEPT_LOGIN2
+
+// Packet: 0x0277
+packetLen(0x0277, 84) // CA_LOGIN_PCBANG
+
+// Packet: 0x0278
+packetLen(0x0278, 2) // ZC_NOTIFY_PCBANG
+
+// Packet: 0x0279
+packetLen(0x0279, 2) // CZ_HUNTINGLIST
+
+// Packet: 0x027a
+packetLen(0x027a, -1) // ZC_HUNTINGLIST
+
+// Packet: 0x027b
+packetLen(0x027b, 14) // ZC_PCBANG_EFFECT
+
+// Packet: 0x027c
+packetLen(0x027c, 60) // CA_LOGIN4
+
+// Packet: 0x027d
+packetLen(0x027d, 62) // ZC_PROPERTY_MERCE
+
+// Packet: 0x027e
+packetLen(0x027e, -1) // ZC_SHANDA_PROTECT
+
+// Packet: 0x027f
+packetLen(0x027f, 8) // CA_CLIENT_TYPE
+
+// Packet: 0x0280
+packetLen(0x0280, 12) // ZC_GANGSI_POINT
+
+// Packet: 0x0281
+packetLen(0x0281, 4) // CZ_GANGSI_RANK
+
+// Packet: 0x0282
+packetLen(0x0282, 284) // ZC_GANGSI_RANK
+
+// Packet: 0x0283
+packetLen(0x0283, 6) // ZC_AID
+
+// Packet: 0x0284
+packetLen(0x0284, 14) // ZC_NOTIFY_EFFECT3
+
+// Packet: 0x0285
+packetLen(0x0285, 6) // ZC_DEATH_QUESTION
+
+// Packet: 0x0286
+packetLen(0x0286, 4) // CZ_DEATH_QUESTION
+
+// Packet: 0x0287
+packetLen(0x0287, -1) // ZC_PC_CASH_POINT_ITEMLIST
+
+// Packet: 0x0288
+packetLen(0x0288, -1) // CZ_PC_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0289
+packetLen(0x0289, 12) // ZC_PC_CASH_POINT_UPDATE
+
+// Packet: 0x028a
+packetLen(0x028a, 18) // ZC_NPC_SHOWEFST_UPDATE
+
+// Packet: 0x028b
+packetLen(0x028b, -1) // HC_CHARNOTBEENSELECTED
+
+// Packet: 0x028c
+packetLen(0x028c, 46) // CH_SELECT_CHAR_GOINGTOBEUSED
+
+// Packet: 0x028d
+packetLen(0x028d, 34) // CH_REQ_IS_VALID_CHARNAME
+
+// Packet: 0x028e
+packetLen(0x028e, 4) // HC_ACK_IS_VALID_CHARNAME
+
+// Packet: 0x028f
+packetLen(0x028f, 6) // CH_REQ_CHANGE_CHARNAME
+
+// Packet: 0x0290
+packetLen(0x0290, 4) // HC_ACK_CHANGE_CHARNAME
+
+// Packet: 0x0291
+packetLen(0x0291, 4) // ZC_MSG
+
+// Packet: 0x0292
+packetLen(0x0292, 2) // CZ_STANDING_RESURRECTION
+
+// Packet: 0x0293
+packetLen(0x0293, 70) // ZC_BOSS_INFO
+
+// Packet: 0x0294
+packetLen(0x0294, 10) // ZC_READ_BOOK
+
+// Packet: 0x0295
+packetLen(0x0295, -1) // ZC_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0296
+packetLen(0x0296, -1) // ZC_STORE_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0297
+packetLen(0x0297, -1) // ZC_CART_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0298
+packetLen(0x0298, 10) // ZC_CASH_TIME_COUNTER
+
+// Packet: 0x0299
+packetLen(0x0299, 8) // ZC_CASH_ITEM_DELETE
+
+// Packet: 0x029a
+packetLen(0x029a, 37) // ZC_ITEM_PICKUP_ACK2
+
+// Packet: 0x029b
+packetLen(0x029b, 80) // ZC_MER_INIT
+
+// Packet: 0x029c
+packetLen(0x029c, 66) // ZC_MER_PROPERTY
+
+// Packet: 0x029d
+packetLen(0x029d, -1) // ZC_MER_SKILLINFO_LIST
+
+// Packet: 0x029e
+packetLen(0x029e, 11) // ZC_MER_SKILLINFO_UPDATE
+
+// Packet: 0x029f
+packetLen(0x029f, 3) // CZ_MER_COMMAND
+
+// Packet: 0x02a2
+packetLen(0x02a2, 8) // ZC_MER_PAR_CHANGE
+
+// Packet: 0x02a5
+packetLen(0x02a5, 8) // CZ_KSY_EVENT
+
+// Packet: 0x02a6
+packetLen(0x02a6, -1) // ZC_HACKSH_CPX_MSG
+
+// Packet: 0x02a7
+packetLen(0x02a7, -1) // CZ_HACKSH_CPX_MSG
+
+// Packet: 0x02aa
+packetLen(0x02aa, 4) // ZC_REQ_CASH_PASSWORD
+
+// Packet: 0x02ab
+packetLen(0x02ab, 36) // CZ_ACK_CASH_PASSWORD
+
+// Packet: 0x02ac
+packetLen(0x02ac, 6) // ZC_RESULT_CASH_PASSWORD
+
+// Packet: 0x02ad
+packetLen(0x02ad, 8) // AC_REQUEST_SECOND_PASSWORD
+
+// Packet: 0x02b0
+packetLen(0x02b0, 85) // CA_LOGIN_HAN
+
+// Packet: 0x02b1
+packetLen(0x02b1, -1) // ZC_ALL_QUEST_LIST
+
+// Packet: 0x02b2
+packetLen(0x02b2, -1) // ZC_ALL_QUEST_MISSION
+
+// Packet: 0x02b3
+packetLen(0x02b3, 107) // ZC_ADD_QUEST
+
+// Packet: 0x02b4
+packetLen(0x02b4, 6) // ZC_DEL_QUEST
+
+// Packet: 0x02b5
+packetLen(0x02b5, -1) // ZC_UPDATE_MISSION_HUNT
+
+// Packet: 0x02b6
+packetLen(0x02b6, 7) // CZ_ACTIVE_QUEST
+
+// Packet: 0x02b7
+packetLen(0x02b7, 7) // ZC_ACTIVE_QUEST
+
+// Packet: 0x02b8
+packetLen(0x02b8, 32) // ZC_ITEM_PICKUP_PARTY
+
+// Packet: 0x02b9
+packetLen(0x02b9, 191) // ZC_SHORTCUT_KEY_LIST
+
+// Packet: 0x02ba
+packetLen(0x02ba, 11) // CZ_SHORTCUT_KEY_CHANGE
+
+// Packet: 0x02bb
+packetLen(0x02bb, 8) // ZC_EQUIPITEM_DAMAGED
+
+// Packet: 0x02bc
+packetLen(0x02bc, 6) // ZC_NOTIFY_PCBANG_PLAYING_TIME
+
+// Packet: 0x02c1
+packetLen(0x02c1, -1) // ZC_NPC_CHAT
+
+// Packet: 0x02c2
+packetLen(0x02c2, -1) // ZC_FORMATSTRING_MSG
+
+// Packet: 0x02c4
+packetLen(0x02c4, 26) // CZ_PARTY_JOIN_REQ
+
+// Packet: 0x02c5
+packetLen(0x02c5, 30) // ZC_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c6
+packetLen(0x02c6, 30) // ZC_PARTY_JOIN_REQ
+
+// Packet: 0x02c7
+packetLen(0x02c7, 7) // CZ_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c8
+packetLen(0x02c8, 3) // CZ_PARTY_CONFIG
+
+// Packet: 0x02c9
+packetLen(0x02c9, 3) // ZC_PARTY_CONFIG
+
+// Packet: 0x02ca
+packetLen(0x02ca, 3) // HC_REFUSE_SELECTCHAR
+
+// Packet: 0x02cb
+packetLen(0x02cb, 65) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_INFO
+
+// Packet: 0x02cc
+packetLen(0x02cc, 4) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_NOTIFY
+
+// Packet: 0x02cd
+packetLen(0x02cd, 71) // ZC_MEMORIALDUNGEON_INFO
+
+// Packet: 0x02ce
+packetLen(0x02ce, 10) // ZC_MEMORIALDUNGEON_NOTIFY
+
+// Packet: 0x02cf
+packetLen(0x02cf, 6) // CZ_MEMORIALDUNGEON_COMMAND
+
+// Packet: 0x02d0
+packetLen(0x02d0, -1) // ZC_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d1
+packetLen(0x02d1, -1) // ZC_STORE_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d2
+packetLen(0x02d2, -1) // ZC_CART_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d3
+packetLen(0x02d3, 4) // ZC_NOTIFY_BIND_ON_EQUIP
+
+// Packet: 0x02d4
+packetLen(0x02d4, 39) // ZC_ITEM_PICKUP_ACK3
+
+// Packet: 0x02d5
+packetLen(0x02d5, 2) // ZC_ISVR_DISCONNECT
+
+// Packet: 0x02d6
+packetLen(0x02d6, 6) // CZ_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d7
+packetLen(0x02d7, -1) // ZC_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d8
+packetLen(0x02d8, 10) // CZ_CONFIG
+
+// Packet: 0x02d9
+packetLen(0x02d9, 10) // ZC_CONFIG
+
+// Packet: 0x02da
+packetLen(0x02da, 3) // ZC_CONFIG_NOTIFY
+
+// Packet: 0x02db
+packetLen(0x02db, -1) // CZ_BATTLEFIELD_CHAT
+
+// Packet: 0x02dc
+packetLen(0x02dc, -1) // ZC_BATTLEFIELD_CHAT
+
+// Packet: 0x02dd
+packetLen(0x02dd, 32) // ZC_BATTLEFIELD_NOTIFY_CAMPINFO
+
+// Packet: 0x02de
+packetLen(0x02de, 6) // ZC_BATTLEFIELD_NOTIFY_POINT
+
+// Packet: 0x02df
+packetLen(0x02df, 36) // ZC_BATTLEFIELD_NOTIFY_POSITION
+
+// Packet: 0x02e0
+packetLen(0x02e0, 34) // ZC_BATTLEFIELD_NOTIFY_HP
+
+// Packet: 0x02e1
+packetLen(0x02e1, 33) // ZC_NOTIFY_ACT2
+
+// Packet: 0x02e2
+packetLen(0x02e2, 20) // CZ_USE_ITEM_NEW_JAPEN
+
+// Packet: 0x02e3
+packetLen(0x02e3, 22) // CZ_USE_SKILL_NEW_JAPEN
+
+// Packet: 0x02e4
+packetLen(0x02e4, 11) // CZ_ITEM_PICKUP_NEW_JAPEN
+
+// Packet: 0x02e5
+packetLen(0x02e5, 9) // CZ_REQUEST_MOVE_NEW_JAPEN
+
+// Packet: 0x02e6
+packetLen(0x02e6, 6) // CZ_BOT_CHECK
+
+// Packet: 0x02e7
+packetLen(0x02e7, -1) // ZC_MAPPROPERTY
+
+// Packet: 0x02e8
+packetLen(0x02e8, -1) // ZC_NORMAL_ITEMLIST3
+
+// Packet: 0x02e9
+packetLen(0x02e9, -1) // ZC_CART_NORMAL_ITEMLIST3
+
+// Packet: 0x02ea
+packetLen(0x02ea, -1) // ZC_STORE_NORMAL_ITEMLIST3
+
+// Packet: 0x02eb
+packetLen(0x02eb, 13) // ZC_ACCEPT_ENTER2
+
+// Packet: 0x02ec
+packetLen(0x02ec, 71) // ZC_NOTIFY_MOVEENTRY4
+
+// Packet: 0x02ed
+packetLen(0x02ed, 63) // ZC_NOTIFY_NEWENTRY4
+
+// Packet: 0x02ee
+packetLen(0x02ee, 64) // ZC_NOTIFY_STANDENTRY4
+
+// Packet: 0x02ef
+packetLen(0x02ef, 8) // ZC_NOTIFY_FONT
+
+// Packet: 0x02f0
+packetLen(0x02f0, 10) // ZC_PROGRESS
+
+// Packet: 0x02f1
+packetLen(0x02f1, 2) // CZ_PROGRESS
+
+// Packet: 0x02f2
+packetLen(0x02f2, 2) // ZC_PROGRESS_CANCEL
+
+// Packet: 0x02f3
+packetLen(0x02f3, -1) // CZ_IRMAIL_SEND
+
+// Packet: 0x02f4
+packetLen(0x02f4, 3) // ZC_IRMAIL_SEND_RES
+
+// Packet: 0x02f5
+packetLen(0x02f5, 7) // ZC_IRMAIL_NOTIFY
+
+// Packet: 0x02f6
+packetLen(0x02f6, 7) // CZ_IRMAIL_LIST
+
+// Packet: 0x035c
+packetLen(0x035c, 2) // CZ_OPEN_SIMPLE_CASHSHOP_ITEMLIST
+
+// Packet: 0x035d
+packetLen(0x035d, -1) // ZC_SIMPLE_CASHSHOP_POINT_ITEMLIST
+
+// Packet: 0x035e
+packetLen(0x035e, 2) // CZ_CLOSE_WINDOW
+
+// Packet: 0x035f
+packetLen(0x035f, 5) // CZ_REQUEST_MOVE2
+
+// Packet: 0x0360
+packetLen(0x0360, 6) // CZ_REQUEST_TIME2
+
+// Packet: 0x0361
+packetLen(0x0361, 5) // CZ_CHANGE_DIRECTION2
+
+// Packet: 0x0362
+packetLen(0x0362, 6) // CZ_ITEM_PICKUP2
+
+// Packet: 0x0363
+packetLen(0x0363, 6) // CZ_ITEM_THROW2
+
+// Packet: 0x0364
+packetLen(0x0364, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_STORE2
+
+// Packet: 0x0365
+packetLen(0x0365, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY2
+
+// Packet: 0x0366
+packetLen(0x0366, 10) // CZ_USE_SKILL_TOGROUND2
+
+// Packet: 0x0367
+packetLen(0x0367, 90) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2
+
+// Packet: 0x0368
+packetLen(0x0368, 6) // CZ_REQNAME2
+
+// Packet: 0x0369
+packetLen(0x0369, 6) // CZ_REQNAME_BYGID2
+
+// Packet: 0x03dd
+packetLen(0x03dd, 18) // AHC_GAME_GUARD
+
+// Packet: 0x03de
+packetLen(0x03de, 18) // CAH_ACK_GAME_GUARD
+
+// Packet: 0x0436
+packetLen(0x0436, 19) // CZ_ENTER2
+
+// Packet: 0x0437
+packetLen(0x0437, 7) // CZ_REQUEST_ACT2
+
+// Packet: 0x0438
+packetLen(0x0438, 10) // CZ_USE_SKILL2
+
+// Packet: 0x0439
+packetLen(0x0439, 8) // CZ_USE_ITEM2
+
+// Packet: 0x043d
+packetLen(0x043d, 8) // ZC_SKILL_POSTDELAY
+
+// Packet: 0x043e
+packetLen(0x043e, -1) // ZC_SKILL_POSTDELAY_LIST
+
+// Packet: 0x043f
+packetLen(0x043f, 25) // ZC_MSG_STATE_CHANGE2
+
+// Packet: 0x0440
+packetLen(0x0440, 10) // ZC_MILLENNIUMSHIELD
+
+// Packet: 0x0441
+packetLen(0x0441, 4) // ZC_SKILLINFO_DELETE
+
+// Packet: 0x0442
+packetLen(0x0442, -1) // ZC_SKILL_SELECT_REQUEST
+
+// Packet: 0x0443
+packetLen(0x0443, 8) // CZ_SKILL_SELECT_RESPONSE
+
+// Packet: 0x0444
+packetLen(0x0444, -1) // ZC_SIMPLE_CASH_POINT_ITEMLIST
+
+// Packet: 0x0445
+packetLen(0x0445, 12) // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0446
+packetLen(0x0446, 14) // ZC_QUEST_NOTIFY_EFFECT
+
+// Packet: 0x0447
+packetLen(0x0447, 2) // CZ_BLOCKING_PLAY_CANCEL
+
+// Packet: 0x0448
+packetLen(0x0448, -1) // HC_CHARACTER_LIST
+
+// Packet: 0x0449
+packetLen(0x0449, 4) // ZC_HACKSH_ERROR_MSG
+
+// Packet: 0x044a
+packetLen(0x044a, 6) // CZ_CLIENT_VERSION
+
+// Packet: 0x044b
+packetLen(0x044b, 2) // CZ_CLOSE_SIMPLECASH_SHOP
+
+// Packet: 0x07d7
+packetLen(0x07d7, 8) // CZ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d8
+packetLen(0x07d8, 8) // ZC_REQ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d9
+packetLen(0x07d9, 268) // ZC_SHORTCUT_KEY_LIST_V2
+
+// Packet: 0x07da
+packetLen(0x07da, 6) // CZ_CHANGE_GROUP_MASTER
+
+// Packet: 0x07db
+packetLen(0x07db, 8) // ZC_HO_PAR_CHANGE
+
+// Packet: 0x07dc
+packetLen(0x07dc, 6) // CZ_SEEK_PARTY
+
+// Packet: 0x07dd
+packetLen(0x07dd, 54) // ZC_SEEK_PARTY
+
+// Packet: 0x07de
+packetLen(0x07de, 30) // CZ_SEEK_PARTY_MEMBER
+
+// Packet: 0x07df
+packetLen(0x07df, 54) // ZC_SEEK_PARTY_MEMBER
+
+// Packet: 0x07e0
+packetLen(0x07e0, 58) // ZC_ES_NOTI_MYINFO
+
+// Packet: 0x07e1
+packetLen(0x07e1, 15) // ZC_SKILLINFO_UPDATE2
+
+// Packet: 0x07e2
+packetLen(0x07e2, 8) // ZC_MSG_VALUE
+
+// Packet: 0x07e3
+packetLen(0x07e3, 6) // ZC_ITEMLISTWIN_OPEN
+
+// Packet: 0x07e4
+packetLen(0x07e4, -1) // CZ_ITEMLISTWIN_RES
+
+// Packet: 0x07e5
+packetLen(0x07e5, 4) // CH_ENTER_CHECKBOT
+
+// Packet: 0x07e6
+packetLen(0x07e6, 8) // ZC_MSG_SKILL
+
+// Packet: 0x07e7
+packetLen(0x07e7, 32) // CH_CHECKBOT
+
+// Packet: 0x07e8
+packetLen(0x07e8, -1) // HC_CHECKBOT
+
+// Packet: 0x07e9
+packetLen(0x07e9, 5) // HC_CHECKBOT_RESULT
+
+// Packet: 0x07ea
+packetLen(0x07ea, 2) // CZ_BATTLE_FIELD_LIST
+
+// Packet: 0x07eb
+packetLen(0x07eb, -1) // ZC_BATTLE_FIELD_LIST
+
+// Packet: 0x07ec
+packetLen(0x07ec, 8) // CZ_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ed
+packetLen(0x07ed, 10) // ZC_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ee
+packetLen(0x07ee, 6) // CZ_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07ef
+packetLen(0x07ef, 8) // ZC_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07f0
+packetLen(0x07f0, 6) // CZ_REQ_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f1
+packetLen(0x07f1, 18) // ZC_ACK_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f2
+packetLen(0x07f2, 8) // ZC_BATTLE_NOTI_START_STEP
+
+// Packet: 0x07f3
+packetLen(0x07f3, 6) // ZC_BATTLE_JOIN_NOTI_DEFER
+
+// Packet: 0x07f4
+packetLen(0x07f4, 3) // ZC_BATTLE_JOIN_DISABLE_STATE
+
+// Packet: 0x07f5
+packetLen(0x07f5, 6) // CZ_GM_FULLSTRIP
+
+// Packet: 0x07f6
+packetLen(0x07f6, 14) // ZC_NOTIFY_EXP
+
+// Packet: 0x07f7
+packetLen(0x07f7, -1) // ZC_NOTIFY_MOVEENTRY7
+
+// Packet: 0x07f8
+packetLen(0x07f8, -1) // ZC_NOTIFY_NEWENTRY5
+
+// Packet: 0x07f9
+packetLen(0x07f9, -1) // ZC_NOTIFY_STANDENTRY5
+
+// Packet: 0x07fa
+packetLen(0x07fa, 8) // ZC_DELETE_ITEM_FROM_BODY
+
+// Packet: 0x07fb
+packetLen(0x07fb, 25) // ZC_USESKILL_ACK2
+
+// Packet: 0x07fc
+packetLen(0x07fc, 10) // ZC_CHANGE_GROUP_MASTER
+
+// Packet: 0x07fd
+packetLen(0x07fd, -1) // ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN
+
+// Packet: 0x07fe
+packetLen(0x07fe, 26) // ZC_PLAY_NPC_BGM
+
+// Packet: 0x0800
+packetLen(0x0800, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0801
+packetLen(0x0801, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0802
+packetLen(0x0802, 18) // CZ_PARTY_BOOKING_REQ_REGISTER
+
+// Packet: 0x0803
+packetLen(0x0803, 4) // ZC_PARTY_BOOKING_ACK_REGISTER
+
+// Packet: 0x0804
+packetLen(0x0804, 14) // CZ_PARTY_BOOKING_REQ_SEARCH
+
+// Packet: 0x0805
+packetLen(0x0805, -1) // ZC_PARTY_BOOKING_ACK_SEARCH
+
+// Packet: 0x0806
+packetLen(0x0806, 2) // CZ_PARTY_BOOKING_REQ_DELETE
+
+// Packet: 0x0807
+packetLen(0x0807, 4) // ZC_PARTY_BOOKING_ACK_DELETE
+
+// Packet: 0x0808
+packetLen(0x0808, 14) // CZ_PARTY_BOOKING_REQ_UPDATE
+
+// Packet: 0x0809
+packetLen(0x0809, 50) // ZC_PARTY_BOOKING_NOTIFY_INSERT
+
+// Packet: 0x080a
+packetLen(0x080a, 18) // ZC_PARTY_BOOKING_NOTIFY_UPDATE
+
+// Packet: 0x080b
+packetLen(0x080b, 6) // ZC_PARTY_BOOKING_NOTIFY_DELETE
+
+// Packet: 0x080c
+packetLen(0x080c, 2) // CZ_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080d
+packetLen(0x080d, 3) // ZC_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080e
+packetLen(0x080e, 14) // ZC_NOTIFY_HP_TO_GROUPM_R2
+
+// Packet: 0x080f
+packetLen(0x080f, 30) // ZC_ADD_EXCHANGE_ITEM2
+
+// Packet: 0x0810
+packetLen(0x0810, 3) // ZC_OPEN_BUYING_STORE
+
+// Packet: 0x0811
+packetLen(0x0811, -1) // CZ_REQ_OPEN_BUYING_STORE
+
+// Packet: 0x0812
+packetLen(0x0812, 8) // ZC_FAILED_OPEN_BUYING_STORE_TO_BUYER
+
+// Packet: 0x0813
+packetLen(0x0813, -1) // ZC_MYITEMLIST_BUYING_STORE
+
+// Packet: 0x0814
+packetLen(0x0814, 86) // ZC_BUYING_STORE_ENTRY
+
+// Packet: 0x0815
+packetLen(0x0815, 2) // CZ_REQ_CLOSE_BUYING_STORE
+
+// Packet: 0x0816
+packetLen(0x0816, 6) // ZC_DISAPPEAR_BUYING_STORE_ENTRY
+
+// Packet: 0x0817
+packetLen(0x0817, 6) // CZ_REQ_CLICK_TO_BUYING_STORE
+
+// Packet: 0x0818
+packetLen(0x0818, -1) // ZC_ACK_ITEMLIST_BUYING_STORE
+
+// Packet: 0x0819
+packetLen(0x0819, -1) // CZ_REQ_TRADE_BUYING_STORE
+
+// Packet: 0x081a
+packetLen(0x081a, 4) // ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER
+
+// Packet: 0x081b
+packetLen(0x081b, 12) // ZC_UPDATE_ITEM_FROM_BUYING_STORE
+
+// Packet: 0x081c
+packetLen(0x081c, 10) // ZC_ITEM_DELETE_BUYING_STORE
+
+// Packet: 0x081d
+packetLen(0x081d, 22) // ZC_EL_INIT
+
+// Packet: 0x081e
+packetLen(0x081e, 8) // ZC_EL_PAR_CHANGE
+
+// Packet: 0x081f
+packetLen(0x081f, -1) // ZC_BROADCAST4
+
+// Packet: 0x0820
+packetLen(0x0820, 11) // ZC_COSTUME_SPRITE_CHANGE
+
+// Packet: 0x0821
+packetLen(0x0821, 2) // AC_OTP_USER
+
+// Packet: 0x0822
+packetLen(0x0822, 9) // CA_OTP_AUTH_REQ
+
+// Packet: 0x0823
+packetLen(0x0823, -1) // AC_OTP_AUTH_ACK
+
+// Packet: 0x0824
+packetLen(0x0824, 8) // ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER
+
+// Packet: 0x0825
+packetLen(0x0825, -1) // CA_SSO_LOGIN_REQ
+
+// Packet: 0x0827
+packetLen(0x0827, 6) // CH_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0828
+packetLen(0x0828, 14) // HC_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0829
+packetLen(0x0829, 12) // CH_DELETE_CHAR3
+
+// Packet: 0x082a
+packetLen(0x082a, 10) // HC_DELETE_CHAR3
+
+// Packet: 0x082b
+packetLen(0x082b, 6) // CH_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082c
+packetLen(0x082c, 10) // HC_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082d
+packetLen(0x082d, -1) // HC_ACCEPT_ENTER2
+
+// Packet: 0x0835
+packetLen(0x0835, -1) // CZ_SEARCH_STORE_INFO
+
+// Packet: 0x0836
+packetLen(0x0836, -1) // ZC_SEARCH_STORE_INFO_ACK
+
+// Packet: 0x0837
+packetLen(0x0837, 3) // ZC_SEARCH_STORE_INFO_FAILED
+
+// Packet: 0x0838
+packetLen(0x0838, 2) // CZ_SEARCH_STORE_INFO_NEXT_PAGE
+
+// Packet: 0x0839
+packetLen(0x0839, 66) // ZC_ACK_BAN_GUILD_SSO
+
+// Packet: 0x083a
+packetLen(0x083a, 5) // ZC_OPEN_SEARCH_STORE_INFO
+
+// Packet: 0x083b
+packetLen(0x083b, 2) // CZ_CLOSE_SEARCH_STORE_INFO
+
+// Packet: 0x083c
+packetLen(0x083c, 14) // CZ_SSILIST_ITEM_CLICK
+
+// Packet: 0x083d
+packetLen(0x083d, 6) // ZC_SSILIST_ITEM_CLICK_ACK
+
+// Packet: 0x083e
+packetLen(0x083e, 26) // AC_REFUSE_LOGIN2
+
+// Packet: 0x0840
+packetLen(0x0840, -1) // HC_NOTIFY_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0841
+packetLen(0x0841, 4) // CH_SELECT_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0842
+packetLen(0x0842, 6) // CZ_RECALL_SSO
+
+// Packet: 0x0843
+packetLen(0x0843, 6) // CZ_REMOVE_AID_SSO
+
+// Packet: 0x0844
+packetLen(0x0844, 2) // CZ_SE_CASHSHOP_OPEN
+
+// Packet: 0x0845
+packetLen(0x0845, 10) // ZC_SE_CASHSHOP_OPEN
+
+// Packet: 0x0846
+packetLen(0x0846, 4) // CZ_REQ_SE_CASH_TAB_CODE
+
+// Packet: 0x0847
+packetLen(0x0847, -1) // ZC_ACK_SE_CASH_ITEM_LIST
+
+// Packet: 0x0848
+packetLen(0x0848, -1) // CZ_SE_PC_BUY_CASHITEM_LIST
+
+// Packet: 0x0849
+packetLen(0x0849, 16) // ZC_SE_PC_BUY_CASHITEM_RESULT
+
+// Packet: 0x084a
+packetLen(0x084a, 2) // CZ_SE_CASHSHOP_CLOSE
+
+// Packet: 0x084b
+packetLen(0x084b, 21) // ZC_ITEM_FALL_ENTRY4
+
+// Packet: 0x084c
+packetLen(0x084c, 10) // CZ_MACRO_USE_SKILL
+
+// Packet: 0x084d
+packetLen(0x084d, 10) // CZ_MACRO_USE_SKILL_TOGROUND
+
+// Packet: 0x084e
+packetLen(0x084e, 5) // CZ_MACRO_REQUEST_MOVE
+
+// Packet: 0x084f
+packetLen(0x084f, 6) // CZ_MACRO_ITEM_PICKUP
+
+// Packet: 0x0850
+packetLen(0x0850, 7) // CZ_MACRO_REQUEST_ACT
+
+// Packet: 0x0851
+packetLen(0x0851, -1) // ZC_GPK_DYNCODE
+
+// Packet: 0x0852
+packetLen(0x0852, 2) // CZ_GPK_DYNCODE_RELOAD
+
+// Packet: 0x0853
+packetLen(0x0853, -1) // ZC_GPK_AUTH
+
+// Packet: 0x0854
+packetLen(0x0854, -1) // CZ_GPK_AUTH
+
+// Packet: 0x0855
+packetLen(0x0855, 6) // ZC_MACRO_ITEMPICKUP_FAIL
+
+// Packet: 0x0856
+packetLen(0x0856, -1) // ZC_NOTIFY_MOVEENTRY8
+
+// Packet: 0x0857
+packetLen(0x0857, -1) // ZC_NOTIFY_STANDENTRY7
+
+// Packet: 0x0858
+packetLen(0x0858, -1) // ZC_NOTIFY_NEWENTRY6
+
+// Packet: 0x0859
+packetLen(0x0859, -1) // ZC_EQUIPWIN_MICROSCOPE2
+
+// Packet: 0x085a
+packetLen(0x085a, 2) // ZC_REASSEMBLY_AUTH01
+
+// Packet: 0x085b
+packetLen(0x085b, 2) // ZC_REASSEMBLY_AUTH02
+
+// Packet: 0x085c
+packetLen(0x085c, 2) // ZC_REASSEMBLY_AUTH03
+
+// Packet: 0x085d
+packetLen(0x085d, 2) // ZC_REASSEMBLY_AUTH04
+
+// Packet: 0x085e
+packetLen(0x085e, 2) // ZC_REASSEMBLY_AUTH05
+
+// Packet: 0x085f
+packetLen(0x085f, 2) // ZC_REASSEMBLY_AUTH06
+
+// Packet: 0x0860
+packetLen(0x0860, 2) // ZC_REASSEMBLY_AUTH07
+
+// Packet: 0x0861
+packetLen(0x0861, 2) // ZC_REASSEMBLY_AUTH08
+
+// Packet: 0x0862
+packetLen(0x0862, 2) // ZC_REASSEMBLY_AUTH09
+
+// Packet: 0x0863
+packetLen(0x0863, 2) // ZC_REASSEMBLY_AUTH10
+
+// Packet: 0x0864
+packetLen(0x0864, 2) // ZC_REASSEMBLY_AUTH11
+
+// Packet: 0x0865
+packetLen(0x0865, 2) // ZC_REASSEMBLY_AUTH12
+
+// Packet: 0x0866
+packetLen(0x0866, 2) // ZC_REASSEMBLY_AUTH13
+
+// Packet: 0x0867
+packetLen(0x0867, 2) // ZC_REASSEMBLY_AUTH14
+
+// Packet: 0x0868
+packetLen(0x0868, 2) // ZC_REASSEMBLY_AUTH15
+
+// Packet: 0x0869
+packetLen(0x0869, 2) // ZC_REASSEMBLY_AUTH16
+
+// Packet: 0x086a
+packetLen(0x086a, 2) // ZC_REASSEMBLY_AUTH17
+
+// Packet: 0x086b
+packetLen(0x086b, 2) // ZC_REASSEMBLY_AUTH18
+
+// Packet: 0x086c
+packetLen(0x086c, 2) // ZC_REASSEMBLY_AUTH19
+
+// Packet: 0x086d
+packetLen(0x086d, 2) // ZC_REASSEMBLY_AUTH20
+
+// Packet: 0x086e
+packetLen(0x086e, 2) // ZC_REASSEMBLY_AUTH21
+
+// Packet: 0x086f
+packetLen(0x086f, 2) // ZC_REASSEMBLY_AUTH22
+
+// Packet: 0x0870
+packetLen(0x0870, 2) // ZC_REASSEMBLY_AUTH23
+
+// Packet: 0x0871
+packetLen(0x0871, 2) // ZC_REASSEMBLY_AUTH24
+
+// Packet: 0x0872
+packetLen(0x0872, 2)
+
+// Packet: 0x0873
+packetLen(0x0873, 2) // ZC_REASSEMBLY_AUTH26
+
+// Packet: 0x0874
+packetLen(0x0874, 2) // ZC_REASSEMBLY_AUTH27
+
+// Packet: 0x0875
+packetLen(0x0875, 2) // ZC_REASSEMBLY_AUTH28
+
+// Packet: 0x0876
+packetLen(0x0876, 2) // ZC_REASSEMBLY_AUTH29
+
+// Packet: 0x0877
+packetLen(0x0877, 2) // ZC_REASSEMBLY_AUTH30
+
+// Packet: 0x0878
+packetLen(0x0878, 2) // ZC_REASSEMBLY_AUTH31
+
+// Packet: 0x0879
+packetLen(0x0879, 2) // ZC_REASSEMBLY_AUTH32
+
+// Packet: 0x087a
+packetLen(0x087a, 2) // ZC_REASSEMBLY_AUTH33
+
+// Packet: 0x087b
+packetLen(0x087b, 2) // ZC_REASSEMBLY_AUTH34
+
+// Packet: 0x087c
+packetLen(0x087c, 2) // ZC_REASSEMBLY_AUTH35
+
+// Packet: 0x087d
+packetLen(0x087d, 2) // ZC_REASSEMBLY_AUTH36
+
+// Packet: 0x087e
+packetLen(0x087e, 2) // ZC_REASSEMBLY_AUTH37
+
+// Packet: 0x087f
+packetLen(0x087f, 2) // ZC_REASSEMBLY_AUTH38
+
+// Packet: 0x0880
+packetLen(0x0880, 2) // ZC_REASSEMBLY_AUTH39
+
+// Packet: 0x0881
+packetLen(0x0881, 2) // ZC_REASSEMBLY_AUTH40
+
+// Packet: 0x0882
+packetLen(0x0882, 2) // ZC_REASSEMBLY_AUTH41
+
+// Packet: 0x0883
+packetLen(0x0883, 2) // ZC_REASSEMBLY_AUTH42
+
+// Packet: 0x0884
+packetLen(0x0884, 2) // CZ_REASSEMBLY_AUTH01
+
+// Packet: 0x0885
+packetLen(0x0885, 2) // CZ_REASSEMBLY_AUTH02
+
+// Packet: 0x0886
+packetLen(0x0886, 2) // CZ_REASSEMBLY_AUTH03
+
+// Packet: 0x0887
+packetLen(0x0887, 2) // CZ_REASSEMBLY_AUTH04
+
+// Packet: 0x0888
+packetLen(0x0888, 2) // CZ_REASSEMBLY_AUTH05
+
+// Packet: 0x0889
+packetLen(0x0889, 2) // CZ_REASSEMBLY_AUTH06
+
+// Packet: 0x088a
+packetLen(0x088a, 2) // CZ_REASSEMBLY_AUTH07
+
+// Packet: 0x088b
+packetLen(0x088b, 2) // CZ_REASSEMBLY_AUTH08
+
+// Packet: 0x088c
+packetLen(0x088c, 2) // CZ_REASSEMBLY_AUTH09
+
+// Packet: 0x088d
+packetLen(0x088d, 2) // CZ_REASSEMBLY_AUTH10
+
+// Packet: 0x088e
+packetLen(0x088e, 2) // CZ_REASSEMBLY_AUTH11
+
+// Packet: 0x088f
+packetLen(0x088f, 2) // CZ_REASSEMBLY_AUTH12
+
+// Packet: 0x0890
+packetLen(0x0890, 2) // CZ_REASSEMBLY_AUTH13
+
+// Packet: 0x0891
+packetLen(0x0891, 2) // CZ_REASSEMBLY_AUTH14
+
+// Packet: 0x0892
+packetLen(0x0892, 2) // CZ_REASSEMBLY_AUTH15
+
+// Packet: 0x0893
+packetLen(0x0893, 2) // CZ_REASSEMBLY_AUTH16
+
+// Packet: 0x0894
+packetLen(0x0894, 2) // CZ_REASSEMBLY_AUTH17
+
+// Packet: 0x0895
+packetLen(0x0895, 2) // CZ_REASSEMBLY_AUTH18
+
+// Packet: 0x0896
+packetLen(0x0896, 2) // CZ_REASSEMBLY_AUTH19
+
+// Packet: 0x0897
+packetLen(0x0897, 2) // CZ_REASSEMBLY_AUTH20
+
+// Packet: 0x0898
+packetLen(0x0898, 2) // CZ_REASSEMBLY_AUTH21
+
+// Packet: 0x0899
+packetLen(0x0899, 2) // CZ_REASSEMBLY_AUTH22
+
+// Packet: 0x089a
+packetLen(0x089a, 2) // CZ_REASSEMBLY_AUTH23
+
+// Packet: 0x089b
+packetLen(0x089b, 2) // CZ_REASSEMBLY_AUTH24
+
+// Packet: 0x089c
+packetLen(0x089c, 2) // CZ_REASSEMBLY_AUTH25
+
+// Packet: 0x089d
+packetLen(0x089d, 2) // CZ_REASSEMBLY_AUTH26
+
+// Packet: 0x089e
+packetLen(0x089e, 2) // CZ_REASSEMBLY_AUTH27
+
+// Packet: 0x089f
+packetLen(0x089f, 2) // CZ_REASSEMBLY_AUTH28
+
+// Packet: 0x08a0
+packetLen(0x08a0, 2) // CZ_REASSEMBLY_AUTH29
+
+// Packet: 0x08a1
+packetLen(0x08a1, 2) // CZ_REASSEMBLY_AUTH30
+
+// Packet: 0x08a2
+packetLen(0x08a2, 2) // CZ_REASSEMBLY_AUTH31
+
+// Packet: 0x08a3
+packetLen(0x08a3, 2) // CZ_REASSEMBLY_AUTH32
+
+// Packet: 0x08a4
+packetLen(0x08a4, 2) // CZ_REASSEMBLY_AUTH33
+
+// Packet: 0x08a5
+packetLen(0x08a5, 2) // CZ_REASSEMBLY_AUTH34
+
+// Packet: 0x08a6
+packetLen(0x08a6, 2) // CZ_REASSEMBLY_AUTH35
+
+// Packet: 0x08a7
+packetLen(0x08a7, 2) // CZ_REASSEMBLY_AUTH36
+
+// Packet: 0x08a8
+packetLen(0x08a8, 2) // CZ_REASSEMBLY_AUTH37
+
+// Packet: 0x08a9
+packetLen(0x08a9, 2) // CZ_REASSEMBLY_AUTH38
+
+// Packet: 0x08aa
+packetLen(0x08aa, 2) // CZ_REASSEMBLY_AUTH39
+
+// Packet: 0x08ab
+packetLen(0x08ab, 2) // CZ_REASSEMBLY_AUTH40
+
+// Packet: 0x08ac
+packetLen(0x08ac, 2) // CZ_REASSEMBLY_AUTH41
+
+// Packet: 0x08ad
+packetLen(0x08ad, 2) // CZ_REASSEMBLY_AUTH42
+
+// Packet: 0x08af
+packetLen(0x08af, 10) // HC_WAITING_LOGIN
+
+// Packet: 0x08b0
+packetLen(0x08b0, 17) // CH_WAITING_LOGIN
+
+// Packet: 0x08b1
+packetLen(0x08b1, -1) // ZC_MCSTORE_NOTMOVEITEM_LIST
+
+// Packet: 0x08b2
+packetLen(0x08b2, -1) // AC_REALNAME_AUTH
+
+// Packet: 0x08b3
+packetLen(0x08b3, -1) // ZC_SHOWSCRIPT
+
+// Packet: 0x08b4
+packetLen(0x08b4, 2) // ZC_START_COLLECTION
+
+// Packet: 0x08b5
+packetLen(0x08b5, 6) // CZ_TRYCOLLECTION
+
+// Packet: 0x08b6
+packetLen(0x08b6, 3) // ZC_TRYCOLLECTION
+
+// Packet: 0x08b8
+packetLen(0x08b8, 10) // CH_SECOND_PASSWD_ACK
+
+// Packet: 0x08b9
+packetLen(0x08b9, 12) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x08ba
+packetLen(0x08ba, 10) // CH_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bb
+packetLen(0x08bb, 8) // HC_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bc
+packetLen(0x08bc, 10) // CH_DELETE_SECOND_PASSWD
+
+// Packet: 0x08bd
+packetLen(0x08bd, 8) // HC_DELETE_SECOND_PASSWD
+
+// Packet: 0x08be
+packetLen(0x08be, 14) // CH_EDIT_SECOND_PASSWD
+
+// Packet: 0x08bf
+packetLen(0x08bf, 8) // HC_EDIT_SECOND_PASSWD
+
+// Packet: 0x08c0
+packetLen(0x08c0, -1) // ZC_ACK_SE_CASH_ITEM_LIST2
+
+// Packet: 0x08c1
+packetLen(0x08c1, 2) // CZ_MACRO_START
+
+// Packet: 0x08c2
+packetLen(0x08c2, 2) // CZ_MACRO_STOP
+
+// Packet: 0x08c3
+packetLen(0x08c3, 10) // CH_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c4
+packetLen(0x08c4, 8) // HC_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c5
+packetLen(0x08c5, 6) // CH_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c6
+packetLen(0x08c6, 4) // HC_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c7
+packetLen(0x08c7, -1) // ZC_SKILL_ENTRY3
+
+// Packet: 0x08c8
+packetLen(0x08c8, 34) // ZC_NOTIFY_ACT3
+
+// Packet: 0x08c9
+packetLen(0x08c9, 2) // CZ_REQ_SCHEDULER_CASHITEM
+
+// Packet: 0x08ca
+packetLen(0x08ca, -1) // ZC_ACK_SCHEDULER_CASHITEM
+
+// Packet: 0x08cb
+packetLen(0x08cb, -1) // ZC_PERSONAL_INFOMATION
+
+// Packet: 0x08cc
+packetLen(0x08cc, 109) // CA_LOGIN5
+
+// Packet: 0x08cd
+packetLen(0x08cd, 10) // ZC_STOPMOVE_FORCE
+
+// Packet: 0x08ce
+packetLen(0x08ce, 2) // ZC_FAILED_GET_ITEM_FROM_ZONEDA
+
+// Packet: 0x08cf
+packetLen(0x08cf, 10) // ZC_SPIRITS_ATTRIBUTE
+
+// Packet: 0x08d0
+packetLen(0x08d0, 9) // ZC_REQ_WEAR_EQUIP_ACK2
+
+// Packet: 0x08d1
+packetLen(0x08d1, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK2
+
+// Packet: 0x08d2
+packetLen(0x08d2, 10) // ZC_FASTMOVE
+
+// Packet: 0x08d3
+packetLen(0x08d3, 10) // ZC_SE_CASHSHOP_UPDATE
+
+// Packet: 0x08d4
+packetLen(0x08d4, 8) // CH_REQ_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d5
+packetLen(0x08d5, -1) // HC_ACK_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d6
+packetLen(0x08d6, 6) // ZC_CLEAR_DIALOG
+
+// Packet: 0x08d7
+packetLen(0x08d7, 28) // CZ_REQ_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d8
+packetLen(0x08d8, 27) // ZC_ACK_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d9
+packetLen(0x08d9, 30) // ZC_NOTIFY_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08da
+packetLen(0x08da, 26) // CZ_REQ_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08db
+packetLen(0x08db, 27) // ZC_ACK_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08dc
+packetLen(0x08dc, 26) // ZC_NOTIFY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08dd
+packetLen(0x08dd, 27) // CZ_REPLY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08de
+packetLen(0x08de, 27) // ZC_REPLY_ACK_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08df
+packetLen(0x08df, 50) // ZC_NOTIFY_LOBBY_ADMISSION
+
+// Packet: 0x08e0
+packetLen(0x08e0, 51) // CZ_REPLY_LOBBY_ADMISSION
+
+// Packet: 0x08e1
+packetLen(0x08e1, 51) // ZC_REPLY_ACK_LOBBY_ADMISSION
+
+// Packet: 0x08e2
+packetLen(0x08e2, 27) // ZC_NAVIGATION_ACTIVE
+
+// Packet: 0x08e3
+packetLen(0x08e3, 157) // HC_UPDATE_CHARINFO
+
+// Packet: 0x08e4
+packetLen(0x08e4, 6) // AC_SHUTDOWN_INFO
+
+// Packet: 0x08fc
+packetLen(0x08fc, 30) // CH_REQ_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fd
+packetLen(0x08fd, 6) // CH_ACK_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fe
+packetLen(0x08fe, -1) // ZC_HUNTING_QUEST_INFO
+
+// Packet: 0x08ff
+packetLen(0x08ff, 24) // ZC_EFST_SET_ENTER
+
+// Packet: 0x0900
+packetLen(0x0900, -1) // ZC_INVENTORY_ITEMLIST_NORMAL
+
+// Packet: 0x0901
+packetLen(0x0901, -1) // ZC_INVENTORY_ITEMLIST_EQUIP
+
+// Packet: 0x0902
+packetLen(0x0902, -1) // ZC_CART_ITEMLIST_NORMAL
+
+// Packet: 0x0903
+packetLen(0x0903, -1) // ZC_CART_ITEMLIST_EQUIP
+
+// Packet: 0x0904
+packetLen(0x0904, -1) // ZC_STORE_ITEMLIST_NORMAL
+
+// Packet: 0x0905
+packetLen(0x0905, -1) // ZC_STORE_ITEMLIST_EQUIP
+
+// Packet: 0x0906
+packetLen(0x0906, -1) // ZC_MICROSCOPE
+
+// Packet: 0x0907
+packetLen(0x0907, 5) // CZ_INVENTORY_TAB
+
+// Packet: 0x0908
+packetLen(0x0908, 5) // ZC_INVENTORY_TAB
+
+// Packet: 0x090a
+packetLen(0x090a, 26) // CZ_REQ_ENTRY_QUEUE_RANKING
+
+// Packet: 0x090d
+packetLen(0x090d, -1) // ZC_PREMIUM_CAMPAIGN_INFO
+
+// Packet: 0x090e
+packetLen(0x090e, 2) // ZC_ENTRY_QUEUE_INIT
+
+// Packet: 0x090f
+packetLen(0x090f, -1) // ZC_NOTIFY_NEWENTRY7
+
+// Packet: 0x0910
+packetLen(0x0910, 10) // CZ_REQ_PARTY_NAME
+
+// Packet: 0x0911
+packetLen(0x0911, 30) // ZC_ACK_PARTY_NAME
+
+// Packet: 0x0912
+packetLen(0x0912, 10) // CZ_REQ_GUILD_NAME
+
+// Packet: 0x0913
+packetLen(0x0913, 30) // ZC_ACK_GUILD_NAME
+
+// Packet: 0x0914
+packetLen(0x0914, -1) // ZC_NOTIFY_MOVEENTRY9
+
+// Packet: 0x0915
+packetLen(0x0915, -1) // ZC_NOTIFY_STANDENTRY8
+
+// Packet: 0x0916
+packetLen(0x0916, 26) // CZ_REQ_JOIN_GUILD2
+
+// Packet: 0x0917
+packetLen(0x0917, 2) // ZC_REASSEMBLY_AUTH43
+
+// Packet: 0x0918
+packetLen(0x0918, 2) // ZC_REASSEMBLY_AUTH44
+
+// Packet: 0x0919
+packetLen(0x0919, 2) // ZC_REASSEMBLY_AUTH45
+
+// Packet: 0x091a
+packetLen(0x091a, 2) // ZC_REASSEMBLY_AUTH46
+
+// Packet: 0x091b
+packetLen(0x091b, 2) // ZC_PRNPC_STATE
+
+// Packet: 0x091c
+packetLen(0x091c, 2) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x091d
+packetLen(0x091d, 2) // ZC_REASSEMBLY_AUTH49
+
+// Packet: 0x091e
+packetLen(0x091e, 2) // ZC_REASSEMBLY_AUTH50
+
+// Packet: 0x091f
+packetLen(0x091f, 2) // ZC_REASSEMBLY_AUTH51
+
+// Packet: 0x0920
+packetLen(0x0920, 2) // ZC_REASSEMBLY_AUTH52
+
+// Packet: 0x0921
+packetLen(0x0921, 2) // ZC_REASSEMBLY_AUTH53
+
+// Packet: 0x0922
+packetLen(0x0922, 2) // ZC_REASSEMBLY_AUTH54
+
+// Packet: 0x0923
+packetLen(0x0923, 2) // ZC_REASSEMBLY_AUTH55
+
+// Packet: 0x0924
+packetLen(0x0924, 2) // ZC_REASSEMBLY_AUTH56
+
+// Packet: 0x0925
+packetLen(0x0925, 2) // ZC_REASSEMBLY_AUTH57
+
+// Packet: 0x0926
+packetLen(0x0926, 2) // ZC_REASSEMBLY_AUTH58
+
+// Packet: 0x0927
+packetLen(0x0927, 2) // ZC_REASSEMBLY_AUTH59
+
+// Packet: 0x0928
+packetLen(0x0928, 2) // ZC_REASSEMBLY_AUTH60
+
+// Packet: 0x0929
+packetLen(0x0929, 2) // ZC_REASSEMBLY_AUTH61
+
+// Packet: 0x092a
+packetLen(0x092a, 2) // ZC_REASSEMBLY_AUTH62
+
+// Packet: 0x092b
+packetLen(0x092b, 2) // ZC_REASSEMBLY_AUTH63
+
+// Packet: 0x092c
+packetLen(0x092c, 2) // ZC_REASSEMBLY_AUTH64
+
+// Packet: 0x092d
+packetLen(0x092d, 2) // ZC_REASSEMBLY_AUTH65
+
+// Packet: 0x092e
+packetLen(0x092e, 2) // ZC_REASSEMBLY_AUTH66
+
+// Packet: 0x092f
+packetLen(0x092f, 2) // ZC_REASSEMBLY_AUTH67
+
+// Packet: 0x0930
+packetLen(0x0930, 2) // ZC_REASSEMBLY_AUTH68
+
+// Packet: 0x0931
+packetLen(0x0931, 2) // ZC_REASSEMBLY_AUTH69
+
+// Packet: 0x0932
+packetLen(0x0932, 2) // ZC_REASSEMBLY_AUTH70
+
+// Packet: 0x0933
+packetLen(0x0933, 2) // ZC_REASSEMBLY_AUTH71
+
+// Packet: 0x0934
+packetLen(0x0934, 2) // ZC_REASSEMBLY_AUTH72
+
+// Packet: 0x0935
+packetLen(0x0935, 2) // ZC_REASSEMBLY_AUTH73
+
+// Packet: 0x0936
+packetLen(0x0936, 2) // ZC_REASSEMBLY_AUTH74
+
+// Packet: 0x0937
+packetLen(0x0937, 2) // ZC_REASSEMBLY_AUTH75
+
+// Packet: 0x0938
+packetLen(0x0938, 2) // ZC_REASSEMBLY_AUTH76
+
+// Packet: 0x0939
+packetLen(0x0939, 2) // ZC_REASSEMBLY_AUTH77
+
+// Packet: 0x093a
+packetLen(0x093a, 2) // ZC_REASSEMBLY_AUTH78
+
+// Packet: 0x093b
+packetLen(0x093b, 2) // ZC_REASSEMBLY_AUTH79
+
+// Packet: 0x093c
+packetLen(0x093c, 2) // ZC_REASSEMBLY_AUTH80
+
+// Packet: 0x093d
+packetLen(0x093d, 2) // ZC_REASSEMBLY_AUTH81
+
+// Packet: 0x093e
+packetLen(0x093e, 2) // ZC_REASSEMBLY_AUTH82
+
+// Packet: 0x093f
+packetLen(0x093f, 2) // ZC_REASSEMBLY_AUTH83
+
+// Packet: 0x0940
+packetLen(0x0940, 2) // ZC_REASSEMBLY_AUTH84
+
+// Packet: 0x0941
+packetLen(0x0941, 2) // CZ_REASSEMBLY_AUTH43
+
+// Packet: 0x0942
+packetLen(0x0942, 2) // CZ_REASSEMBLY_AUTH44
+
+// Packet: 0x0943
+packetLen(0x0943, 2) // CZ_REASSEMBLY_AUTH45
+
+// Packet: 0x0944
+packetLen(0x0944, 2) // CZ_REASSEMBLY_AUTH46
+
+// Packet: 0x0945
+packetLen(0x0945, 2) // CZ_REASSEMBLY_AUTH47
+
+// Packet: 0x0946
+packetLen(0x0946, 2) // CZ_REASSEMBLY_AUTH48
+
+// Packet: 0x0947
+packetLen(0x0947, 2) // CZ_REASSEMBLY_AUTH49
+
+// Packet: 0x0948
+packetLen(0x0948, 2) // CZ_REASSEMBLY_AUTH50
+
+// Packet: 0x0949
+packetLen(0x0949, 2) // CZ_REASSEMBLY_AUTH51
+
+// Packet: 0x094a
+packetLen(0x094a, 2) // CZ_REASSEMBLY_AUTH52
+
+// Packet: 0x094b
+packetLen(0x094b, 2) // CZ_REASSEMBLY_AUTH53
+
+// Packet: 0x094c
+packetLen(0x094c, 2) // CZ_REASSEMBLY_AUTH54
+
+// Packet: 0x094d
+packetLen(0x094d, 2) // CZ_REASSEMBLY_AUTH55
+
+// Packet: 0x094e
+packetLen(0x094e, 2) // CZ_REASSEMBLY_AUTH56
+
+// Packet: 0x094f
+packetLen(0x094f, 2) // CZ_REASSEMBLY_AUTH57
+
+// Packet: 0x0950
+packetLen(0x0950, 2) // CZ_REASSEMBLY_AUTH58
+
+// Packet: 0x0951
+packetLen(0x0951, 2) // CZ_REASSEMBLY_AUTH59
+
+// Packet: 0x0952
+packetLen(0x0952, 2) // CZ_REASSEMBLY_AUTH60
+
+// Packet: 0x0953
+packetLen(0x0953, 2) // CZ_REASSEMBLY_AUTH61
+
+// Packet: 0x0954
+packetLen(0x0954, 2) // CZ_REASSEMBLY_AUTH62
+
+// Packet: 0x0955
+packetLen(0x0955, 2) // CZ_REASSEMBLY_AUTH63
+
+// Packet: 0x0956
+packetLen(0x0956, 2) // CZ_REASSEMBLY_AUTH64
+
+// Packet: 0x0957
+packetLen(0x0957, 2) // CZ_REASSEMBLY_AUTH65
+
+// Packet: 0x0958
+packetLen(0x0958, 2) // CZ_REASSEMBLY_AUTH66
+
+// Packet: 0x0959
+packetLen(0x0959, 2) // CZ_REASSEMBLY_AUTH67
+
+// Packet: 0x095a
+packetLen(0x095a, 2) // CZ_REASSEMBLY_AUTH68
+
+// Packet: 0x095b
+packetLen(0x095b, 2) // CZ_REASSEMBLY_AUTH69
+
+// Packet: 0x095c
+packetLen(0x095c, 2) // CZ_REASSEMBLY_AUTH70
+
+// Packet: 0x095d
+packetLen(0x095d, 2) // CZ_REASSEMBLY_AUTH71
+
+// Packet: 0x095e
+packetLen(0x095e, 2) // CZ_REASSEMBLY_AUTH72
+
+// Packet: 0x095f
+packetLen(0x095f, 2) // CZ_REASSEMBLY_AUTH73
+
+// Packet: 0x0960
+packetLen(0x0960, 2) // CZ_REASSEMBLY_AUTH74
+
+// Packet: 0x0961
+packetLen(0x0961, 2) // CZ_REASSEMBLY_AUTH75
+
+// Packet: 0x0962
+packetLen(0x0962, 2) // CZ_REASSEMBLY_AUTH76
+
+// Packet: 0x0963
+packetLen(0x0963, 2) // CZ_REASSEMBLY_AUTH77
+
+// Packet: 0x0964
+packetLen(0x0964, 2) // CZ_REASSEMBLY_AUTH78
+
+// Packet: 0x0965
+packetLen(0x0965, 2) // CZ_REASSEMBLY_AUTH79
+
+// Packet: 0x0966
+packetLen(0x0966, 2) // CZ_REASSEMBLY_AUTH80
+
+// Packet: 0x0967
+packetLen(0x0967, 2) // CZ_REASSEMBLY_AUTH81
+
+// Packet: 0x0968
+packetLen(0x0968, 2) // CZ_REASSEMBLY_AUTH82
+
+// Packet: 0x0969
+packetLen(0x0969, 2) // CZ_REASSEMBLY_AUTH83
+
+// Packet: 0x096a
+packetLen(0x096a, 2) // CZ_REASSEMBLY_AUTH84
+
+// Packet: 0x096b
+packetLen(0x096b, 4) // ZC_PRNPC_STATE
+
+// Packet: 0x096c
+packetLen(0x096c, 6) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x096d
+packetLen(0x096d, -1) // ZC_MERGE_ITEM_OPEN
+
+// Packet: 0x096e
+packetLen(0x096e, -1) // CZ_REQ_MERGE_ITEM
+
+// Packet: 0x096f
+packetLen(0x096f, 7) // ZC_ACK_MERGE_ITEM
+
+// Packet: 0x0970
+packetLen(0x0970, 31) // CH_MAKE_CHAR_NOT_STATS
+
+// Packet: 0x0971
+packetLen(0x0971, 6) // ZC_PARTY_RECRUIT_REFUSE_VOLUNTEER_TO_PM
+
+// Packet: 0x0972
+packetLen(0x0972, -1) // ZC_SAY_DIALOG2
+
+// Packet: 0x0973
+packetLen(0x0973, 7) // ZC_WAIT_DIALOG2
+
+// Packet: 0x0974
+packetLen(0x0974, 2) // CZ_CANCEL_MERGE_ITEM
+
+// Packet: 0x0975
+packetLen(0x0975, -1) // ZC_STORE_ITEMLIST_NORMAL_V2
+
+// Packet: 0x0976
+packetLen(0x0976, -1) // ZC_STORE_ITEMLIST_EQUIP_V2
+
+// Packet: 0x0977
+packetLen(0x0977, 14) // ZC_HP_INFO
+
+// Packet: 0x0978
+packetLen(0x0978, 6) // CZ_REQ_BEFORE_WORLD_INFO
+
+// Packet: 0x0979
+packetLen(0x0979, 50) // ZC_ACK_BEFORE_WORLD_INFO
+
+// Packet: 0x097a
+packetLen(0x097a, -1) // ZC_ALL_QUEST_LIST2
+
+// Packet: 0x097b
+packetLen(0x097b, -1) // ZC_PERSONAL_INFOMATION2
+
+// Packet: 0x097c
+packetLen(0x097c, 4) // CZ_REQ_RANKING
+
+// Packet: 0x097d
+packetLen(0x097d, 288) // ZC_ACK_RANKING
+
+// Packet: 0x097e
+packetLen(0x097e, 12) // ZC_UPDATE_RANKING_POINT
+
+// Packet: 0x097f
+packetLen(0x097f, -1) // ZC_SELECTCART
+
+// Packet: 0x0980
+packetLen(0x0980, 7) // CZ_SELECTCART
+
+// Packet: 0x0981
+packetLen(0x0981, -1) // ZC_PERSONAL_INFOMATION_CHN
+
+// Packet: 0x0982
+packetLen(0x0982, 7) // ZC_FATIGUE_CHN
+
+// Packet: 0x0983
+packetLen(0x0983, 29) // ZC_MSG_STATE_CHANGE3
+
+// Packet: 0x0984
+packetLen(0x0984, 28) // ZC_EFST_SET_ENTER2
+
+// Packet: 0x0985
+packetLen(0x0985, -1) // ZC_SKILL_POSTDELAY_LIST2
+
+// Packet: 0x0986
+packetLen(0x0986, 10) // AC_SHUTDOWN_NOTIFY
+
+// Packet: 0x0987
+packetLen(0x0987, -1) // CA_LOGIN6
+
+// Packet: 0x0988
+packetLen(0x0988, 6) // ZC_NOTIFY_CLAN_CONNECTINFO
+
+// Packet: 0x0989
+packetLen(0x0989, 2) // ZC_ACK_CLAN_LEAVE
+
+// Packet: 0x098a
+packetLen(0x098a, -1) // ZC_CLANINFO
+
+// Packet: 0x098b
+packetLen(0x098b, 2) // AC_REQ_NEW_USER
+
+// Packet: 0x098c
+packetLen(0x098c, 4) // CA_ACK_NEW_USER
+
+// Packet: 0x098d
+packetLen(0x098d, -1) // CZ_CLAN_CHAT
+
+// Packet: 0x098e
+packetLen(0x098e, -1) // ZC_NOTIFY_CLAN_CHAT
+
+// Packet: 0x098f
+packetLen(0x098f, -1) // CH_DELETE_CHAR3_EXT
+
+// Packet: 0x0990
+packetLen(0x0990, 41) // ZC_ITEM_PICKUP_ACK_V5
+
+// Packet: 0x0991
+packetLen(0x0991, -1) // ZC_INVENTORY_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0992
+packetLen(0x0992, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0993
+packetLen(0x0993, -1) // ZC_CART_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0994
+packetLen(0x0994, -1) // ZC_CART_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0995
+packetLen(0x0995, -1) // ZC_STORE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0996
+packetLen(0x0996, -1) // ZC_STORE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0997
+packetLen(0x0997, -1) // ZC_EQUIPWIN_MICROSCOPE_V5
+
+// Packet: 0x0998
+packetLen(0x0998, 8) // CZ_REQ_WEAR_EQUIP_V5
+
+// Packet: 0x0999
+packetLen(0x0999, 11) // ZC_ACK_WEAR_EQUIP_V5
+
+// Packet: 0x099a
+packetLen(0x099a, 9) // ZC_ACK_TAKEOFF_EQUIP_V5
+
+// Packet: 0x099b
+packetLen(0x099b, 8) // ZC_MAPPROPERTY_R2
+
+// Packet: 0x099c
+packetLen(0x099c, 6) // CH_REQ_CHARINFO_PER_PAGE
+
+// Packet: 0x099d
+packetLen(0x099d, -1) // HC_ACK_CHARINFO_PER_PAGE
+
+// Packet: 0x099e
+packetLen(0x099e, 12) // HC_QUEUE_ORDER
+
+// Packet: 0x099f
+packetLen(0x099f, -1) // ZC_SKILL_ENTRY4
+
+// Packet: 0x09a0
+packetLen(0x09a0, 6) // HC_CHARLIST_NOTIFY
+
+// Packet: 0x09a1
+packetLen(0x09a1, 2) // CH_CHARLIST_REQ
+
+// Packet: 0x09a2
+packetLen(0x09a2, 6) // AC_REQ_MOBILE_OTP
+
+// Packet: 0x09a3
+packetLen(0x09a3, -1) // CA_ACK_MOBILE_OTP
+
+// Packet: 0x09a4
+packetLen(0x09a4, 18) // ZC_DISPATCH_TIMING_INFO_CHN
+
+// Packet: 0x09a5
+packetLen(0x09a5, 7) // AC_REFUSE_LOGIN3
+
+// Packet: 0x09a6
+packetLen(0x09a6, 12) // ZC_BANKING_CHECK
+
+// Packet: 0x09a7
+packetLen(0x09a7, 10) // CZ_REQ_BANKING_DEPOSIT
+
+// Packet: 0x09a8
+packetLen(0x09a8, 16) // ZC_ACK_BANKING_DEPOSIT
+
+// Packet: 0x09a9
+packetLen(0x09a9, 10) // CZ_REQ_BANKING_WITHDRAW
+
+// Packet: 0x09aa
+packetLen(0x09aa, 16) // ZC_ACK_BANKING_WITHDRAW
+
+// Packet: 0x09ab
+packetLen(0x09ab, 6) // CZ_REQ_BANKING_CHECK
+
+// Packet: 0x09ac
+packetLen(0x09ac, -1) // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ad
+packetLen(0x09ad, 12) // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ae
+packetLen(0x09ae, 19) // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09af
+packetLen(0x09af, 4) // ZC_ACK_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b0
+packetLen(0x09b0, 10) // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b1
+packetLen(0x09b1, 4) // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b2
+packetLen(0x09b2, 10) // ZC_NOTIFY_BARGAIN_SALE_SELLING
+
+// Packet: 0x09b3
+packetLen(0x09b3, 6) // ZC_NOTIFY_BARGAIN_SALE_CLOSE
+
+// Packet: 0x09b4
+packetLen(0x09b4, 6) // CZ_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b5
+packetLen(0x09b5, 2) // ZC_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b6
+packetLen(0x09b6, 6) // CZ_REQ_OPEN_BANKING
+
+// Packet: 0x09b7
+packetLen(0x09b7, 4) // ZC_ACK_OPEN_BANKING
+
+// Packet: 0x09b8
+packetLen(0x09b8, 6) // CZ_REQ_CLOSE_BANKING
+
+// Packet: 0x09b9
+packetLen(0x09b9, 4) // ZC_ACK_CLOSE_BANKING
+
+// Packet: 0x09ba
+packetLen(0x09ba, 2) // CZ_REQ_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bb
+packetLen(0x09bb, 6) // ZC_ACK_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bc
+packetLen(0x09bc, 6) // CZ_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09bd
+packetLen(0x09bd, 2) // ZC_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09be
+packetLen(0x09be, 2) // CZ_REQ_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09bf
+packetLen(0x09bf, 4) // ZC_ACK_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09c1
+packetLen(0x09c1, 10) // ZC_C_MARKERINFO
+
+// Packet: 0x09c2
+packetLen(0x09c2, -1) // HC_SECRETSCAN_DATA
+
+// Packet: 0x09c3
+packetLen(0x09c3, 10) // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c4
+packetLen(0x09c4, 10) // ZC_ACK_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c5
+packetLen(0x09c5, 1042) // CS_LOGIN_QUERY
+
+// Packet: 0x09c6
+packetLen(0x09c6, -1) // SC_LOGIN_ANSWER
+
+// Packet: 0x09c7
+packetLen(0x09c7, 18) // SC_LOGIN_ERROR
+
+// Packet: 0x09c8
+packetLen(0x09c8, -1) // CA_LOGIN_OTP
+
+// Packet: 0x09c9
+packetLen(0x09c9, -1) // SC_SOCT
+
+// Packet: 0x09ca
+packetLen(0x09ca, -1) // ZC_SKILL_ENTRY5
+
+// Packet: 0x09cb
+packetLen(0x09cb, 17) // ZC_USE_SKILL2
+
+// Packet: 0x09cc
+packetLen(0x09cc, -1) // ZC_SECRETSCAN_DATA
+
+// Packet: 0x09cd
+packetLen(0x09cd, 8) // ZC_MSG_COLOR
+
+// Packet: 0x09ce
+packetLen(0x09ce, 102) // CZ_ITEM_CREATE_EX
+
+// Packet: 0x09cf
+packetLen(0x09cf, -1) // ZC_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d0
+packetLen(0x09d0, -1) // CZ_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d1
+packetLen(0x09d1, 14) // ZC_PROGRESS_ACTOR
+
+// Packet: 0x09d2
+packetLen(0x09d2, -1) // ZC_GUILDSTORAGE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x09d3
+packetLen(0x09d3, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x09d4
+packetLen(0x09d4, 2) // CZ_NPC_TRADE_QUIT
+
+// Packet: 0x09d5
+packetLen(0x09d5, -1) // ZC_NPC_MARKET_OPEN
+
+// Packet: 0x09d6
+packetLen(0x09d6, -1) // CZ_NPC_MARKET_PURCHASE
+
+// Packet: 0x09d7
+packetLen(0x09d7, -1) // ZC_NPC_MARKET_PURCHASE_RESULT
+
+// Packet: 0x09d8
+packetLen(0x09d8, 2) // CZ_NPC_MARKET_CLOSE
+
+// Packet: 0x09d9
+packetLen(0x09d9, 4) // CZ_REQ_GUILDSTORAGE_LOG
+
+// Packet: 0x09da
+packetLen(0x09da, -1) // ZC_ACK_GUILDSTORAGE_LOG
+
+// Packet: 0x09db
+packetLen(0x09db, -1) // ZC_NOTIFY_MOVEENTRY10
+
+// Packet: 0x09dc
+packetLen(0x09dc, -1) // ZC_NOTIFY_NEWENTRY10
+
+// Packet: 0x09dd
+packetLen(0x09dd, -1) // ZC_NOTIFY_STANDENTRY10
+
+// Packet: 0x09de
+packetLen(0x09de, -1) // ZC_WHISPER02
+
+// Packet: 0x09df
+packetLen(0x09df, 7) // ZC_ACK_WHISPER02
+
+// Packet: 0x09e0
+packetLen(0x09e0, -1) // SC_LOGIN_ANSWER_WITH_ID
+
+// Packet: 0x09e1
+packetLen(0x09e1, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_GUILDSTORAGE
+
+// Packet: 0x09e2
+packetLen(0x09e2, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_BODY
+
+// Packet: 0x09e3
+packetLen(0x09e3, 8) // CZ_MOVE_ITEM_FROM_CART_TO_GUILDSTORAGE
+
+// Packet: 0x09e4
+packetLen(0x09e4, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_CART
+
+// Packet: 0x09e5
+packetLen(0x09e5, 18) // ZC_DELETEITEM_FROM_MCSTORE2
+
+// Packet: 0x09e6
+packetLen(0x09e6, 24) // ZC_UPDATE_ITEM_FROM_BUYING_STORE2
+
+// Packet: 0x09e7
+packetLen(0x09e7, 3) // ZC_NOTIFY_UNREAD_RODEX
+
+// Packet: 0x09e8
+packetLen(0x09e8, 11) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x09e9
+packetLen(0x09e9, 2) // CZ_CLOSE_RODEXBOX
+
+// Packet: 0x09ea
+packetLen(0x09ea, 11) // CZ_REQ_READ_RODEX
+
+// Packet: 0x09eb
+packetLen(0x09eb, -1) // ZC_ACK_READ_RODEX
+
+// Packet: 0x09ec
+packetLen(0x09ec, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x09ed
+packetLen(0x09ed, 3) // ZC_ACK_SEND_RODEX
+
+// Packet: 0x09ee
+packetLen(0x09ee, 11) // CZ_REQ_NEXT_RODEX
+
+// Packet: 0x09ef
+packetLen(0x09ef, 11) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x09f0
+packetLen(0x09f0, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x09f1
+packetLen(0x09f1, 11) // CZ_REQ_ZENY_FROM_RODEX
+
+// Packet: 0x09f2
+packetLen(0x09f2, 12) // ZC_ACK_ZENY_FROM_RODEX
+
+// Packet: 0x09f3
+packetLen(0x09f3, 11) // CZ_REQ_ITEM_FROM_RODEX
+
+// Packet: 0x09f4
+packetLen(0x09f4, 12) // ZC_ACK_ITEM_FROM_RODEX
+
+// Packet: 0x09f5
+packetLen(0x09f5, 11) // CZ_REQ_DELETE_RODEX
+
+// Packet: 0x09f6
+packetLen(0x09f6, 11) // ZC_ACK_DELETE_RODEX
+
+// Packet: 0x09f7
+packetLen(0x09f7, 77) // ZC_PROPERTY_HOMUN_2
+
+// Packet: 0x09f8
+packetLen(0x09f8, -1) // ZC_ALL_QUEST_LIST3
+
+// Packet: 0x09f9
+packetLen(0x09f9, 143) // ZC_ADD_QUEST_EX
+
+// Packet: 0x09fa
+packetLen(0x09fa, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x09fb
+packetLen(0x09fb, -1) // CZ_PET_EVOLUTION
+
+// Packet: 0x09fc
+packetLen(0x09fc, 6) // ZC_PET_EVOLUTION_RESULT
+
+// Packet: 0x09fd
+packetLen(0x09fd, -1) // ZC_NOTIFY_MOVEENTRY11
+
+// Packet: 0x09fe
+packetLen(0x09fe, -1) // ZC_NOTIFY_NEWENTRY11
+
+// Packet: 0x09ff
+packetLen(0x09ff, -1) // ZC_NOTIFY_STANDENTRY11
+
+// Packet: 0x0a00
+packetLen(0x0a00, 269) // ZC_SHORTCUT_KEY_LIST_V3
+
+// Packet: 0x0a01
+packetLen(0x0a01, 3) // CZ_SHORTCUTKEYBAR_ROTATE
+
+// Packet: 0x0a02
+packetLen(0x0a02, 4) // ZC_DRESSROOM_OPEN
+
+// Packet: 0x0a03
+packetLen(0x0a03, 2) // CZ_REQ_CANCEL_WRITE_RODEX
+
+// Packet: 0x0a04
+packetLen(0x0a04, 6) // CZ_REQ_ADD_ITEM_RODEX
+
+// Packet: 0x0a05
+packetLen(0x0a05, 63) // ZC_ACK_ADD_ITEM_RODEX
+
+// Packet: 0x0a06
+packetLen(0x0a06, 6) // CZ_REQ_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a07
+packetLen(0x0a07, 9) // ZC_ACK_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a08
+packetLen(0x0a08, 26) // CZ_REQ_OPEN_WRITE_RODEX
+
+// Packet: 0x0a09
+packetLen(0x0a09, 55) // ZC_ADD_EXCHANGE_ITEM3
+
+// Packet: 0x0a0a
+packetLen(0x0a0a, 57) // ZC_ADD_ITEM_TO_STORE3
+
+// Packet: 0x0a0b
+packetLen(0x0a0b, 57) // ZC_ADD_ITEM_TO_CART3
+
+// Packet: 0x0a0c
+packetLen(0x0a0c, 66) // ZC_ITEM_PICKUP_ACK_V6
+
+// Packet: 0x0a0d
+packetLen(0x0a0d, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a0e
+packetLen(0x0a0e, 14) // ZC_BATTLEFIELD_NOTIFY_HP2
+
+// Packet: 0x0a0f
+packetLen(0x0a0f, -1) // ZC_CART_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a10
+packetLen(0x0a10, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a11
+packetLen(0x0a11, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a12
+packetLen(0x0a12, 27) // ZC_ACK_OPEN_WRITE_RODEX
+
+// Packet: 0x0a13
+packetLen(0x0a13, 26) // CZ_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a14
+packetLen(0x0a14, 10) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a15
+packetLen(0x0a15, 12) // ZC_GOLDPCCAFE_POINT
+
+// Packet: 0x0a16
+packetLen(0x0a16, 26) // CZ_DYNAMICNPC_CREATE_REQUEST
+
+// Packet: 0x0a17
+packetLen(0x0a17, 6) // ZC_DYNAMICNPC_CREATE_RESULT
+
+// Packet: 0x0a18
+packetLen(0x0a18, 14) // ZC_ACCEPT_ENTER3
+
+// Packet: 0x0a19
+packetLen(0x0a19, 2) // CZ_REQ_OPEN_ROULETTE
+
+// Packet: 0x0a1a
+packetLen(0x0a1a, 25) // ZC_ACK_OPEN_ROULETTE
+
+// Packet: 0x0a1b
+packetLen(0x0a1b, 2) // CZ_REQ_ROULETTE_INFO
+
+// Packet: 0x0a1c
+packetLen(0x0a1c, -1) // ZC_ACK_ROULEITTE_INFO
+
+// Packet: 0x0a1d
+packetLen(0x0a1d, 2) // CZ_REQ_CLOSE_ROULETTE
+
+// Packet: 0x0a1e
+packetLen(0x0a1e, 3) // ZC_ACK_CLOSE_ROULETTE
+
+// Packet: 0x0a1f
+packetLen(0x0a1f, 2) // CZ_REQ_GENERATE_ROULETTE
+
+// Packet: 0x0a20
+packetLen(0x0a20, 23) // ZC_ACK_GENERATE_ROULETTE
+
+// Packet: 0x0a21
+packetLen(0x0a21, 3) // CZ_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a22
+packetLen(0x0a22, 7) // ZC_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a23
+packetLen(0x0a23, -1) // ZC_ALL_ACH_LIST
+
+// Packet: 0x0a24
+packetLen(0x0a24, 66) // ZC_ACH_UPDATE
+
+// Packet: 0x0a25
+packetLen(0x0a25, 6) // CZ_REQ_ACH_REWARD
+
+// Packet: 0x0a26
+packetLen(0x0a26, 7) // ZC_REQ_ACH_REWARD_ACK
+
+// Packet: 0x0a27
+packetLen(0x0a27, 8) // ZC_RECOVERY2
+
+// Packet: 0x0a28
+packetLen(0x0a28, 3) // ZC_ACK_OPENSTORE2
+
+// Packet: 0x0a29
+packetLen(0x0a29, 6) // ZC_REQ_AU_BOT
+
+// Packet: 0x0a2a
+packetLen(0x0a2a, 6) // CZ_ACK_AU_BOT
+
+// Packet: 0x0a2b
+packetLen(0x0a2b, 14) // ZC_SE_CASHSHOP_OPEN2
+
+// Packet: 0x0a2c
+packetLen(0x0a2c, 12) // ZC_SE_PC_BUY_TAIWANCASHITEM_RESULT
+
+// Packet: 0x0a2d
+packetLen(0x0a2d, -1) // ZC_EQUIPWIN_MICROSCOPE_V6
+
+// Packet: 0x0a2e
+packetLen(0x0a2e, 6) // CZ_REQ_CHANGE_TITLE
+
+// Packet: 0x0a2f
+packetLen(0x0a2f, 7) // ZC_ACK_CHANGE_TITLE
+
+// Packet: 0x0a30
+packetLen(0x0a30, 106) // ZC_ACK_REQNAMEALL2
+
+// Packet: 0x0a31
+packetLen(0x0a31, -1) // ZC_RESULT_PACKAGE_ITEM_TEST
+
+// Packet: 0x0a32
+packetLen(0x0a32, 2) // ZC_OPEN_RODEX_THROUGH_NPC_ONLY
+
+// Packet: 0x0a33
+packetLen(0x0a33, 7) // ZC_UPDATE_ROULETTE_COIN
+
+// Packet: 0x0a34
+packetLen(0x0a34, 6) // ZC_UPDATE_TAIWANCASH
+
+// Packet: 0x0a35
+packetLen(0x0a35, 4) // CZ_REQ_ONECLICK_ITEMIDENTIFY
+
+// Packet: 0x0a36
+packetLen(0x0a36, 7) // ZC_HP_INFO_TINY
+
+// Packet: 0x0a37
+packetLen(0x0a37, 69) // ZC_ITEM_PICKUP_ACK_V7
+
+// Packet: 0x0a38
+packetLen(0x0a38, 3) // ZC_OPEN_UI
+
+// Packet: 0x0a39
+packetLen(0x0a39, 36) // CH_MAKE_CHAR
+
+// Packet: 0x0a3a
+packetLen(0x0a3a, 12)
+
+// Packet: 0x0a3b
+packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
+
+// Packet: 0x0a3c
+packetLen(0x0a3c, -1)
+
+// Packet: 0x0a3d
+packetLen(0x0a3d, 20)
+
+// Packet: 0x0a3e
+packetLen(0x0a3e, -1)
+
+// Packet: 0x0a3f
+packetLen(0x0a3f, 11)
+
+// Packet: 0x0a40
+packetLen(0x0a40, 11)
+
+// Packet: 0x0a41
+packetLen(0x0a41, 18) // ZC_AOE_EFFECT_SKILL
+
+// Packet: 0x0a42
+packetLen(0x0a42, 43)
+
+// Packet: 0x0a43
+packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0a44
+packetLen(0x0a44, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0a46
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
+
+// Packet: 0x0a47
+packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
+
+// Packet: 0x0a48
+packetLen(0x0a48, 2) // CZ_STYLE_CLOSE
+
+// Packet: 0x0a49
+packetLen(0x0a49, 22) // CZ_PRIVATE_AIRSHIP_REQUEST
+
+// Packet: 0x0a4a
+packetLen(0x0a4a, 6) // ZC_PRIVATE_AIRSHIP_RESPONSE
+
+// Packet: 0x0a4b
+packetLen(0x0a4b, 22) // ZC_AIRSHIP_MAPMOVE
+
+// Packet: 0x0a4c
+packetLen(0x0a4c, 28) // ZC_AIRSHIP_SERVERMOVE
+
+// Packet: 0x0a4d
+packetLen(0x0a4d, -1)
+
+// Packet: 0x0a4e
+packetLen(0x0a4e, 6)
+
+// Packet: 0x0a4f
+packetLen(0x0a4f, -1)
+
+// Packet: 0x0a50
+packetLen(0x0a50, 4)
+
+// Packet: 0x0a51
+packetLen(0x0a51, 34) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a52
+packetLen(0x0a52, 20)
+
+// Packet: 0x0a53
+packetLen(0x0a53, 10)
+
+// Packet: 0x0a54
+packetLen(0x0a54, -1)
+
+// Packet: 0x0a55
+packetLen(0x0a55, 2)
+
+// Packet: 0x0a56
+packetLen(0x0a56, 6)
+
+// Packet: 0x0a57
+packetLen(0x0a57, 6)
+
+// Packet: 0x0a58
+packetLen(0x0a58, 8)
+
+// Packet: 0x0a59
+packetLen(0x0a59, -1)
+
+// Packet: 0x0a5a
+packetLen(0x0a5a, 2)
+
+// Packet: 0x0a5b
+packetLen(0x0a5b, 7)
+
+// Packet: 0x0a5c
+packetLen(0x0a5c, 18)
+
+// Packet: 0x0a5d
+packetLen(0x0a5d, 6)
+
+// Packet: 0x0a68
+packetLen(0x0a68, 3) // CZ_REQ_OPEN_UI
+
+// Packet: 0x0a69
+packetLen(0x0a69, 6)
+
+// Packet: 0x0a6a
+packetLen(0x0a6a, 12)
+
+// Packet: 0x0a6b
+packetLen(0x0a6b, -1)
+
+// Packet: 0x0a6c
+packetLen(0x0a6c, 7)
+
+// Packet: 0x0a6d
+packetLen(0x0a6d, -1)
+
+// Packet: 0x0a6e
+packetLen(0x0a6e, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x0a6f
+packetLen(0x0a6f, -1) // ZC_FORMATSTRING_MSG_COLOR
+
+// Packet: 0x0a70
+packetLen(0x0a70, 2)
+
+// Packet: 0x0a71
+packetLen(0x0a71, -1)
+
+// Packet: 0x0a72
+packetLen(0x0a72, 61)
+
+// Packet: 0x0a73
+packetLen(0x0a73, 2)
+
+// Packet: 0x0a74
+packetLen(0x0a74, 8)
+
+// Packet: 0x0a76
+packetLen(0x0a76, 80)
+
+// Packet: 0x0a77
+packetLen(0x0a77, 15)
+
+// Packet: 0x0a78
+packetLen(0x0a78, 15)
+
+// Packet: 0x0a79
+packetLen(0x0a79, -1)
+
+// Packet: 0x0a7b
+packetLen(0x0a7b, -1)
+
+// Packet: 0x0a7c
+packetLen(0x0a7c, -1)
+
+// Packet: 0x0a7d
+packetLen(0x0a7d, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0a7e
+packetLen(0x0a7e, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS_READY
+
+// Packet: 0x0a7f
+packetLen(0x0a7f, -1) // CZ_OFFLINE_STORE_CREATE
+
+// Packet: 0x0a80
+packetLen(0x0a80, 6)
+
+// Packet: 0x0a81
+packetLen(0x0a81, 4)
+
+// Packet: 0x0a82
+packetLen(0x0a82, 46)
+
+// Packet: 0x0a83
+packetLen(0x0a83, 46)
+
+// Packet: 0x0a84
+packetLen(0x0a84, 94) // ZC_GUILD_INFO
+
+// Packet: 0x0a85
+packetLen(0x0a85, 82)
+
+// Packet: 0x0a86
+packetLen(0x0a86, -1)
+
+// Packet: 0x0a87
+packetLen(0x0a87, -1) // ZC_BAN_LIST
+
+// Packet: 0x0a88
+packetLen(0x0a88, 2) // CZ_COOLDOWN_RESET
+
+// Packet: 0x0a89
+packetLen(0x0a89, 61) // ZC_NOTIFY_OFFLINE_STORE
+
+// Packet: 0x0a8a
+packetLen(0x0a8a, 6) // ZC_OFFLINE_STORE_VANISH
+
+// Packet: 0x0a8b
+packetLen(0x0a8b, 2)
+
+// Packet: 0x0a8c
+packetLen(0x0a8c, 2)
+
+// Packet: 0x0a8d
+packetLen(0x0a8d, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS
+
+// Packet: 0x0a8e
+packetLen(0x0a8e, 2)
+
+// Packet: 0x0a8f
+packetLen(0x0a8f, 2)
+
+// Packet: 0x0a90
+packetLen(0x0a90, 3)
+
+// Packet: 0x0a91
+packetLen(0x0a91, -1) // ZC_OFFLINE_STORE_ITEMS
+
+// Packet: 0x0a92
+packetLen(0x0a92, -1)
+
+// Packet: 0x0a93
+packetLen(0x0a93, 3)
+
+// Packet: 0x0a94
+packetLen(0x0a94, 2)
+
+// Packet: 0x0a95
+packetLen(0x0a95, 4)
+
+// Packet: 0x0a96
+packetLen(0x0a96, 61) // ZC_ADD_EXCHANGE_ITEM4
+
+// Packet: 0x0a97
+packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_ADD
+
+// Packet: 0x0a98
+packetLen(0x0a98, 10) // ZC_ALT_EQUIPMENT_EQUIP
+
+// Packet: 0x0a99
+packetLen(0x0a99, 4) // CZ_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9a
+packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9b
+packetLen(0x0a9b, -1) // ZC_ALT_EQUIPMENT_ITEMS
+
+// Packet: 0x0a9c
+packetLen(0x0a9c, 2) // CZ_ALT_EQUIPMENT_SWITCH
+
+// Packet: 0x0a9d
+packetLen(0x0a9d, 4) // ZC_ALT_EQUIPMENT_SWITCH_ACK
+
+// Packet: 0x0a9e
+packetLen(0x0a9e, 2)
+
+// Packet: 0x0a9f
+packetLen(0x0a9f, 2)
+
+// Packet: 0x0aa0
+packetLen(0x0aa0, 2) // ZC_REFINE_OPEN_WINDOW
+
+// Packet: 0x0aa1
+packetLen(0x0aa1, 4) // CZ_REFINE_ADD_ITEM
+
+// Packet: 0x0aa2
+packetLen(0x0aa2, -1) // ZC_REFINE_ADD_ITEM
+
+// Packet: 0x0aa3
+packetLen(0x0aa3, 9) // CZ_REFINE_ITEM_REQUEST
+
+// Packet: 0x0aa4
+packetLen(0x0aa4, 2) // CZ_REFINE_WINDOW_CLOSE
+
+// Packet: 0x0aa5
+packetLen(0x0aa5, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0aa6
+packetLen(0x0aa6, 36) // ZC_MEMBER_ADD
+
+// Packet: 0x0aa7
+packetLen(0x0aa7, 6) // ZC_INVENTORY_MOVE_FAILED
+
+// Packet: 0x0aa8
+packetLen(0x0aa8, 5)
+
+// Packet: 0x0aa9
+packetLen(0x0aa9, -1)
+
+// Packet: 0x0aaa
+packetLen(0x0aaa, -1)
+
+// Packet: 0x0aab
+packetLen(0x0aab, -1)
+
+// Packet: 0x0aac
+packetLen(0x0aac, 69)
+
+// Packet: 0x0aad
+packetLen(0x0aad, 51)
+
+// Packet: 0x0aae
+packetLen(0x0aae, 2)
+
+// Packet: 0x0aaf
+packetLen(0x0aaf, 6)
+
+// Packet: 0x0ab0
+packetLen(0x0ab0, 6)
+
+// Packet: 0x0ab1
+packetLen(0x0ab1, 14)
+
+// Packet: 0x0ab2
+packetLen(0x0ab2, 7) // ZC_GROUP_ISALIVE
+
+// Packet: 0x0ab3
+packetLen(0x0ab3, 19)
+
+// Packet: 0x0ab4
+packetLen(0x0ab4, 6)
+
+// Packet: 0x0ab5
+packetLen(0x0ab5, 2)
+
+// Packet: 0x0ab6
+packetLen(0x0ab6, 8)
+
+// Packet: 0x0ab7
+packetLen(0x0ab7, 4)
+
+// Packet: 0x0ab8
+packetLen(0x0ab8, 2)
+
+// Packet: 0x0ab9
+packetLen(0x0ab9, 47) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0aba
+packetLen(0x0aba, 2)
+
+// Packet: 0x0abb
+packetLen(0x0abb, 2)
+
+// Packet: 0x0abc
+packetLen(0x0abc, -1)
+
+// Packet: 0x0abd
+packetLen(0x0abd, 10) // ZC_PARTY_MEMBER_JOB_LEVEL
+
+// Packet: 0x0abe
+packetLen(0x0abe, -1) // ZC_WARPLIST
+
+// Packet: 0x0abf
+packetLen(0x0abf, -1)
+
+// Packet: 0x0ac0
+packetLen(0x0ac0, 26) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x0ac1
+packetLen(0x0ac1, 26) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x0ac2
+packetLen(0x0ac2, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0ac3
+packetLen(0x0ac3, 2)
+
+// Packet: 0x0ac4
+packetLen(0x0ac4, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x0ac5
+packetLen(0x0ac5, 156) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0ac6
+packetLen(0x0ac6, 156)
+
+// Packet: 0x0ac7
+packetLen(0x0ac7, 156) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0ac8
+packetLen(0x0ac8, 2) // ZC_UNKNOWN_CLEAN_ITEMS_LISTS
+
+// Packet: 0x0ac9
+packetLen(0x0ac9, -1)
+
+// Packet: 0x0aca
+packetLen(0x0aca, 3)
+
+// Packet: 0x0acb
+packetLen(0x0acb, 12) // ZC_PAR_CHANGE
+
+// Packet: 0x0acc
+packetLen(0x0acc, 18) // ZC_NOTIFY_EXP
+
+// Packet: 0x0acd
+packetLen(0x0acd, 23)
+
+// Packet: 0x0ace
+packetLen(0x0ace, 4)
+
+// Packet: 0x0acf
+packetLen(0x0acf, 68) // CA_LOGIN_OTP
+
+// Packet: 0x0ad0
+packetLen(0x0ad0, 11) // CA_OTP_CODE
+
+// Packet: 0x0ad1
+packetLen(0x0ad1, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ad2
+packetLen(0x0ad2, 30)
+
+// Packet: 0x0ad3
+packetLen(0x0ad3, -1)
+
+// Packet: 0x0ad4
+packetLen(0x0ad4, -1)
+
+// Packet: 0x0ad5
+packetLen(0x0ad5, 2)
+
+// Packet: 0x0ad6
+packetLen(0x0ad6, 2)
+
+// Packet: 0x0ad7
+packetLen(0x0ad7, 8)
+
+// Packet: 0x0ad8
+packetLen(0x0ad8, 8)
+
+// Packet: 0x0ad9
+packetLen(0x0ad9, -1)
+
+// Packet: 0x0ada
+packetLen(0x0ada, 32) // ZC_REFINE_STATUS
+
+// Packet: 0x0adb
+packetLen(0x0adb, -1)
+
+// Packet: 0x0adc
+packetLen(0x0adc, 6) // ZC_EQUIPWIN_OTHER
+
+// Packet: 0x0add
+packetLen(0x0add, 24) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x0ade
+packetLen(0x0ade, 6) // ZC_OVERWEIGHT_PERCENT
+
+// Packet: 0x0adf
+packetLen(0x0adf, 58) // ZC_ACK_REQNAME_TITLE
+
+// Packet: 0x0ae0
+packetLen(0x0ae0, 30)
+
+// Packet: 0x0ae1
+packetLen(0x0ae1, 28)
+
+// Packet: 0x0ae2
+packetLen(0x0ae2, 7) // ZC_OPEN_UI
+
+// Packet: 0x0ae3
+packetLen(0x0ae3, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ae4
+packetLen(0x0ae4, 89) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0ae5
+packetLen(0x0ae5, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0ae6
+packetLen(0x0ae6, 10)
+
+// Packet: 0x0ae7
+packetLen(0x0ae7, 38)
+
+// Packet: 0x0ae8
+packetLen(0x0ae8, 2)
+
+// Packet: 0x0ae9
+packetLen(0x0ae9, 13) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x0aec
+packetLen(0x0aec, 2)
+
+// Packet: 0x0aed
+packetLen(0x0aed, 2)
+
+// Packet: 0x0aee
+packetLen(0x0aee, 2)
+
+// Packet: 0x0aef
+packetLen(0x0aef, 2) // CZ_ATTENDANCE_REWARD_REQUEST
+
+// Packet: 0x0af0
+packetLen(0x0af0, 10) // ZC_UI_ACTION
+
+// Packet: 0x0af2
+packetLen(0x0af2, 40)
+
+// Packet: 0x0af3
+packetLen(0x0af3, -1)
+
+// Packet: 0x0af4
+packetLen(0x0af4, 11) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0af5
+packetLen(0x0af5, 3)
+
+// Packet: 0x0af6
+packetLen(0x0af6, 88)
+
+// Packet: 0x0af7
+packetLen(0x0af7, 32) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0af8
+packetLen(0x0af8, 11)
+
+// Packet: 0x0af9
+packetLen(0x0af9, 6)
+
+// Packet: 0x0afa
+packetLen(0x0afa, 54)
+
+// Packet: 0x0afb
+packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
+
+// Packet: 0x0afc
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
+
+// Packet: 0x0afd
+packetLen(0x0afd, -1) // ZC_GUILD_POSITION
+
+// Packet: 0x0afe
+packetLen(0x0afe, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x0aff
+packetLen(0x0aff, -1) // ZC_ALL_QUEST_LIST4
+
+// Packet: 0x0b00
+packetLen(0x0b00, 8)
+
+// Packet: 0x0b01
+packetLen(0x0b01, 56)
+
+// Packet: 0x0b02
+packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
+
+// Packet: 0x0b03
+packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
+
+// Packet: 0x0b04
+packetLen(0x0b04, 80)
+
+// Packet: 0x0b05
+packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
+
+// Packet: 0x0b07
+packetLen(0x0b07, -1)
+
+// Packet: 0x0b08
+packetLen(0x0b08, -1) // ZC_INVENTORY_START
+
+// Packet: 0x0b09
+packetLen(0x0b09, -1) // ZC_STORE_ITEMLIST_NORMAL_V6
+
+// Packet: 0x0b0a
+packetLen(0x0b0a, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0b0b
+packetLen(0x0b0b, 4) // ZC_INVENTORY_END
+
+// Packet: 0x0b0c
+packetLen(0x0b0c, 155) // ZC_ADD_QUEST_EX
+
+// Packet: 0x0b0d
+packetLen(0x0b0d, 10) // ZC_REMOVE_EFFECT
+
+// Packet: 0x0b0e
+packetLen(0x0b0e, -1) // ZC_NPC_BARTER_OPEN
+
+// Packet: 0x0b0f
+packetLen(0x0b0f, -1) // CZ_NPC_BARTER_PURCHASE
+
+// Packet: 0x0b10
+packetLen(0x0b10, 10) // CZ_START_USE_SKILL
+
+// Packet: 0x0b11
+packetLen(0x0b11, 4) // CZ_STOP_USE_SKILL
+
+// Packet: 0x0b12
+packetLen(0x0b12, 2) // CZ_NPC_BARTER_CLOSE
+
+// Packet: 0x0b13
+packetLen(0x0b13, 48) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0b14
+packetLen(0x0b14, 2) // CZ_INVENTORY_EXPAND
+
+// Packet: 0x0b15
+packetLen(0x0b15, 7) // ZC_ACK_INVENTORY_EXPAND
+
+// Packet: 0x0b16
+packetLen(0x0b16, 2) // CZ_INVENTORY_EXPAND_CONFIRMED
+
+// Packet: 0x0b17
+packetLen(0x0b17, 3) // ZC_ACK_INVENTORY_EXPAND_RESULT
+
+// Packet: 0x0b18
+packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
+
+// Packet: 0x0b19
+packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
+
+// Packet: 0x0b1a
+packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
+
+// Packet: 0x0b1b
+#if PACKETVER >= 20190213
+packetLen(0x0b1b, 2) // ZC_ALT_PING
+#endif
+
+// Packet: 0x0b1c
+#if PACKETVER >= 20190220
+packetLen(0x0b1c, 2) // CZ_PING
+#endif
+
+// Packet: 0x0b1d
+#if PACKETVER >= 20190220
+packetLen(0x0b1d, 2) // ZC_PING
+#endif
+
+// Packet: 0x0b1e
+#if PACKETVER >= 20190227
+packetLen(0x0b1e, 10)
+#endif
+
+// Packet: 0x0b1f
+#if PACKETVER >= 20190306
+packetLen(0x0b1f, 10)
+#endif
+
+// Packet: 0x0b20
+#if PACKETVER >= 20190403
+packetLen(0x0b20, 271) // ZC_SHORTCUT_KEY_LIST_V4
+#endif
+
+// Packet: 0x0b21
+#if PACKETVER >= 20190403
+packetLen(0x0b21, 13) // CZ_SHORTCUT_KEY_CHANGE
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b21, 10) // CZ_SHORTCUT_KEY_CHANGE
+#endif
+
+// Packet: 0x0b22
+#if PACKETVER >= 20190403
+packetLen(0x0b22, 5) // CZ_SHORTCUTKEYBAR_ROTATE
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b22, 6) // CZ_SHORTCUTKEYBAR_ROTATE
+#endif
+
+// Packet: 0x0b23
+#if PACKETVER >= 20190417
+packetLen(0x0b23, 6)
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b23, 10)
+#endif
+
+// Packet: 0x0b24
+#if PACKETVER >= 20190417
+packetLen(0x0b24, 6)
+#endif
+
+// Packet: 0x0b25
+#if PACKETVER >= 20190417
+packetLen(0x0b25, 6)
+#endif
+
+// Packet: 0x0b26
+#if PACKETVER >= 20190522
+// removed
+#elif PACKETVER >= 20190508
+packetLen(0x0b26, 16)
+#elif PACKETVER >= 20190417
+packetLen(0x0b26, 18)
+#endif
+
+// Packet: 0x0b27
+#if PACKETVER >= 20190508
+packetLen(0x0b27, -1)
+#endif
+
+// Packet: 0x0b28
+#if PACKETVER >= 20190522
+packetLen(0x0b28, 3)
+#elif PACKETVER >= 20190508
+packetLen(0x0b28, 22)
+#endif
+
+// Packet: 0x0b29
+#if PACKETVER >= 20190508
+packetLen(0x0b29, 6)
+#endif
+
+// Packet: 0x0b2a
+#if PACKETVER >= 20190522
+packetLen(0x0b2a, 40)
+#elif PACKETVER >= 20190508
+packetLen(0x0b2a, 6)
+#endif
+
+// Packet: 0x0b2b
+#if PACKETVER >= 20190522
+packetLen(0x0b2b, 11)
+#endif
+
+// Packet: 0x0b2c
+#if PACKETVER >= 20190522
+packetLen(0x0b2c, 3)
+#endif
+
+// Packet: 0x0b2d
+#if PACKETVER >= 20190522
+packetLen(0x0b2d, 11)
+#endif
+
+// Packet: 0x0b2e
+#if PACKETVER >= 20190522
+packetLen(0x0b2e, 4)
+#endif
+
+// Packet: 0x0b2f
+#if PACKETVER >= 20190529
+packetLen(0x0b2f, 73)
+#endif
+
+// Packet: 0x0b30
+#if PACKETVER >= 20190529
+packetLen(0x0b30, -1)
+#endif
+
+
+#endif /* COMMON_PACKETS2019_LEN_RE_H */
diff --git a/src/common/packets/packets2019_len_zero.h b/src/common/packets/packets2019_len_zero.h
new file mode 100644
index 000000000..3295b26d9
--- /dev/null
+++ b/src/common/packets/packets2019_len_zero.h
@@ -0,0 +1,4503 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef COMMON_PACKETS2019_LEN_ZERO_H
+#define COMMON_PACKETS2019_LEN_ZERO_H
+
+/* This file is autogenerated, please do not commit manual changes */
+
+// Packet: 0x0064
+packetLen(0x0064, 55) // CA_LOGIN
+
+// Packet: 0x0065
+packetLen(0x0065, 17) // CH_ENTER
+
+// Packet: 0x0066
+packetLen(0x0066, 3) // CH_SELECT_CHAR
+
+// Packet: 0x0067
+packetLen(0x0067, 37) // CH_MAKE_CHAR
+
+// Packet: 0x0068
+packetLen(0x0068, 46) // CH_DELETE_CHAR
+
+// Packet: 0x0069
+packetLen(0x0069, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x006a
+packetLen(0x006a, 23) // AC_REFUSE_LOGIN
+
+// Packet: 0x006b
+packetLen(0x006b, -1) // HC_ACCEPT_ENTER
+
+// Packet: 0x006c
+packetLen(0x006c, 3) // HC_REFUSE_ENTER
+
+// Packet: 0x006d
+packetLen(0x006d, 157) // HC_ACCEPT_MAKECHAR
+
+// Packet: 0x006e
+packetLen(0x006e, 3) // HC_REFUSE_MAKECHAR
+
+// Packet: 0x006f
+packetLen(0x006f, 2) // HC_ACCEPT_DELETECHAR
+
+// Packet: 0x0070
+packetLen(0x0070, 3) // HC_REFUSE_DELETECHAR
+
+// Packet: 0x0071
+packetLen(0x0071, 28) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0072
+packetLen(0x0072, 22) // CZ_ENTER
+
+// Packet: 0x0073
+packetLen(0x0073, 11) // ZC_ACCEPT_ENTER
+
+// Packet: 0x0074
+packetLen(0x0074, 3) // ZC_REFUSE_ENTER
+
+// Packet: 0x0075
+packetLen(0x0075, -1) // ZC_NOTIFY_INITCHAR
+
+// Packet: 0x0076
+packetLen(0x0076, 9) // ZC_NOTIFY_UPDATECHAR
+
+// Packet: 0x0077
+packetLen(0x0077, 5) // ZC_NOTIFY_UPDATEPLAYER
+
+// Packet: 0x0078
+packetLen(0x0078, 55) // ZC_NOTIFY_STANDENTRY
+
+// Packet: 0x0079
+packetLen(0x0079, 53) // ZC_NOTIFY_NEWENTRY
+
+// Packet: 0x007a
+packetLen(0x007a, 58) // ZC_NOTIFY_ACTENTRY
+
+// Packet: 0x007b
+packetLen(0x007b, 60) // ZC_NOTIFY_MOVEENTRY
+
+// Packet: 0x007c
+packetLen(0x007c, 44) // ZC_NOTIFY_STANDENTRY_NPC
+
+// Packet: 0x007d
+packetLen(0x007d, 2) // CZ_NOTIFY_ACTORINIT
+
+// Packet: 0x007e
+packetLen(0x007e, 105) // CZ_REQUEST_TIME
+
+// Packet: 0x007f
+packetLen(0x007f, 6) // ZC_NOTIFY_TIME
+
+// Packet: 0x0080
+packetLen(0x0080, 7) // ZC_NOTIFY_VANISH
+
+// Packet: 0x0081
+packetLen(0x0081, 3) // SC_NOTIFY_BAN
+
+// Packet: 0x0082
+packetLen(0x0082, 2) // CZ_REQUEST_QUIT
+
+// Packet: 0x0083
+packetLen(0x0083, 2) // ZC_ACCEPT_QUIT
+
+// Packet: 0x0084
+packetLen(0x0084, 2) // ZC_REFUSE_QUIT
+
+// Packet: 0x0085
+packetLen(0x0085, 10) // CZ_REQUEST_MOVE
+
+// Packet: 0x0086
+packetLen(0x0086, 16) // ZC_NOTIFY_MOVE
+
+// Packet: 0x0087
+packetLen(0x0087, 12) // ZC_NOTIFY_PLAYERMOVE
+
+// Packet: 0x0088
+packetLen(0x0088, 10) // ZC_STOPMOVE
+
+// Packet: 0x0089
+packetLen(0x0089, 11) // CZ_REQUEST_ACT
+
+// Packet: 0x008a
+packetLen(0x008a, 29) // ZC_NOTIFY_ACT
+
+// Packet: 0x008b
+packetLen(0x008b, 23) // ZC_NOTIFY_ACT_POSITION
+
+// Packet: 0x008c
+packetLen(0x008c, 14)
+
+// Packet: 0x008d
+packetLen(0x008d, -1) // ZC_NOTIFY_CHAT
+
+// Packet: 0x008e
+packetLen(0x008e, -1) // ZC_NOTIFY_PLAYERCHAT
+
+// Packet: 0x0090
+packetLen(0x0090, 7) // CZ_CONTACTNPC
+
+// Packet: 0x0091
+packetLen(0x0091, 22) // ZC_NPCACK_MAPMOVE
+
+// Packet: 0x0092
+packetLen(0x0092, 28) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0093
+packetLen(0x0093, 2) // ZC_NPCACK_ENABLE
+
+// Packet: 0x0094
+packetLen(0x0094, 19) // CZ_REQNAME
+
+// Packet: 0x0095
+packetLen(0x0095, 30) // ZC_ACK_REQNAME
+
+// Packet: 0x0096
+packetLen(0x0096, -1) // CZ_WHISPER
+
+// Packet: 0x0097
+packetLen(0x0097, -1) // ZC_WHISPER
+
+// Packet: 0x0098
+packetLen(0x0098, 3) // ZC_ACK_WHISPER
+
+// Packet: 0x0099
+packetLen(0x0099, -1) // CZ_BROADCAST
+
+// Packet: 0x009a
+packetLen(0x009a, -1) // ZC_BROADCAST
+
+// Packet: 0x009b
+packetLen(0x009b, 34) // CZ_CHANGE_DIRECTION
+
+// Packet: 0x009c
+packetLen(0x009c, 9) // ZC_CHANGE_DIRECTION
+
+// Packet: 0x009d
+packetLen(0x009d, 19) // ZC_ITEM_ENTRY
+
+// Packet: 0x009e
+packetLen(0x009e, 19) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x009f
+packetLen(0x009f, 20) // CZ_ITEM_PICKUP
+
+// Packet: 0x00a0
+packetLen(0x00a0, 33) // ZC_ITEM_PICKUP_ACK
+
+// Packet: 0x00a1
+packetLen(0x00a1, 6) // ZC_ITEM_DISAPPEAR
+
+// Packet: 0x00a2
+packetLen(0x00a2, 14) // CZ_ITEM_THROW
+
+// Packet: 0x00a3
+packetLen(0x00a3, -1) // ZC_NORMAL_ITEMLIST
+
+// Packet: 0x00a4
+packetLen(0x00a4, -1) // ZC_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a5
+packetLen(0x00a5, -1) // ZC_STORE_NORMAL_ITEMLIST
+
+// Packet: 0x00a6
+packetLen(0x00a6, -1) // ZC_STORE_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a7
+packetLen(0x00a7, 9)
+
+// Packet: 0x00a8
+packetLen(0x00a8, 7) // ZC_USE_ITEM_ACK
+
+// Packet: 0x00a9
+packetLen(0x00a9, 6) // CZ_REQ_WEAR_EQUIP
+
+// Packet: 0x00aa
+packetLen(0x00aa, 9) // ZC_REQ_WEAR_EQUIP_ACK
+
+// Packet: 0x00ab
+packetLen(0x00ab, 4) // CZ_REQ_TAKEOFF_EQUIP
+
+// Packet: 0x00ac
+packetLen(0x00ac, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK
+
+// Packet: 0x00ae
+packetLen(0x00ae, -1) // ZC_REQ_ITEM_EXPLANATION_ACK
+
+// Packet: 0x00af
+packetLen(0x00af, 6) // ZC_ITEM_THROW_ACK
+
+// Packet: 0x00b0
+packetLen(0x00b0, 8) // ZC_PAR_CHANGE
+
+// Packet: 0x00b1
+packetLen(0x00b1, 8) // ZC_LONGPAR_CHANGE
+
+// Packet: 0x00b2
+packetLen(0x00b2, 3) // CZ_RESTART
+
+// Packet: 0x00b3
+packetLen(0x00b3, 3) // ZC_RESTART_ACK
+
+// Packet: 0x00b4
+packetLen(0x00b4, -1) // ZC_SAY_DIALOG
+
+// Packet: 0x00b5
+packetLen(0x00b5, 6) // ZC_WAIT_DIALOG
+
+// Packet: 0x00b6
+packetLen(0x00b6, 6) // ZC_CLOSE_DIALOG
+
+// Packet: 0x00b7
+packetLen(0x00b7, -1) // ZC_MENU_LIST
+
+// Packet: 0x00b8
+packetLen(0x00b8, 7) // CZ_CHOOSE_MENU
+
+// Packet: 0x00b9
+packetLen(0x00b9, 6) // CZ_REQ_NEXT_SCRIPT
+
+// Packet: 0x00ba
+packetLen(0x00ba, 2) // CZ_REQ_STATUS
+
+// Packet: 0x00bb
+packetLen(0x00bb, 5) // CZ_STATUS_CHANGE
+
+// Packet: 0x00bc
+packetLen(0x00bc, 6) // ZC_STATUS_CHANGE_ACK
+
+// Packet: 0x00bd
+packetLen(0x00bd, 44) // ZC_STATUS
+
+// Packet: 0x00be
+packetLen(0x00be, 5) // ZC_STATUS_CHANGE
+
+// Packet: 0x00bf
+packetLen(0x00bf, 3) // CZ_REQ_EMOTION
+
+// Packet: 0x00c0
+packetLen(0x00c0, 7) // ZC_EMOTION
+
+// Packet: 0x00c1
+packetLen(0x00c1, 2) // CZ_REQ_USER_COUNT
+
+// Packet: 0x00c2
+packetLen(0x00c2, 6) // ZC_USER_COUNT
+
+// Packet: 0x00c3
+packetLen(0x00c3, 8) // ZC_SPRITE_CHANGE
+
+// Packet: 0x00c4
+packetLen(0x00c4, 6) // ZC_SELECT_DEALTYPE
+
+// Packet: 0x00c5
+packetLen(0x00c5, 7) // CZ_ACK_SELECT_DEALTYPE
+
+// Packet: 0x00c6
+packetLen(0x00c6, -1) // ZC_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c7
+packetLen(0x00c7, -1) // ZC_PC_SELL_ITEMLIST
+
+// Packet: 0x00c8
+packetLen(0x00c8, -1) // CZ_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c9
+packetLen(0x00c9, -1) // CZ_PC_SELL_ITEMLIST
+
+// Packet: 0x00ca
+packetLen(0x00ca, 3) // ZC_PC_PURCHASE_RESULT
+
+// Packet: 0x00cb
+packetLen(0x00cb, 3) // ZC_PC_SELL_RESULT
+
+// Packet: 0x00cc
+packetLen(0x00cc, 6) // CZ_DISCONNECT_CHARACTER
+
+// Packet: 0x00cd
+packetLen(0x00cd, 3) // ZC_ACK_DISCONNECT_CHARACTER
+
+// Packet: 0x00ce
+packetLen(0x00ce, 2) // CZ_DISCONNECT_ALL_CHARACTER
+
+// Packet: 0x00cf
+packetLen(0x00cf, 27) // CZ_SETTING_WHISPER_PC
+
+// Packet: 0x00d0
+packetLen(0x00d0, 3) // CZ_SETTING_WHISPER_STATE
+
+// Packet: 0x00d1
+packetLen(0x00d1, 4) // ZC_SETTING_WHISPER_PC
+
+// Packet: 0x00d2
+packetLen(0x00d2, 4) // ZC_SETTING_WHISPER_STATE
+
+// Packet: 0x00d3
+packetLen(0x00d3, 2) // CZ_REQ_WHISPER_LIST
+
+// Packet: 0x00d4
+packetLen(0x00d4, -1) // ZC_WHISPER_LIST
+
+// Packet: 0x00d5
+packetLen(0x00d5, -1) // CZ_CREATE_CHATROOM
+
+// Packet: 0x00d6
+packetLen(0x00d6, 3) // ZC_ACK_CREATE_CHATROOM
+
+// Packet: 0x00d7
+packetLen(0x00d7, -1) // ZC_ROOM_NEWENTRY
+
+// Packet: 0x00d8
+packetLen(0x00d8, 6) // ZC_DESTROY_ROOM
+
+// Packet: 0x00d9
+packetLen(0x00d9, 14) // CZ_REQ_ENTER_ROOM
+
+// Packet: 0x00da
+packetLen(0x00da, 3) // ZC_REFUSE_ENTER_ROOM
+
+// Packet: 0x00db
+packetLen(0x00db, -1) // ZC_ENTER_ROOM
+
+// Packet: 0x00dc
+packetLen(0x00dc, 28) // ZC_MEMBER_NEWENTRY
+
+// Packet: 0x00dd
+packetLen(0x00dd, 29) // ZC_MEMBER_EXIT
+
+// Packet: 0x00de
+packetLen(0x00de, -1) // CZ_CHANGE_CHATROOM
+
+// Packet: 0x00df
+packetLen(0x00df, -1) // ZC_CHANGE_CHATROOM
+
+// Packet: 0x00e0
+packetLen(0x00e0, 30) // CZ_REQ_ROLE_CHANGE
+
+// Packet: 0x00e1
+packetLen(0x00e1, 30) // ZC_ROLE_CHANGE
+
+// Packet: 0x00e2
+packetLen(0x00e2, 26) // CZ_REQ_EXPEL_MEMBER
+
+// Packet: 0x00e3
+packetLen(0x00e3, 2) // CZ_EXIT_ROOM
+
+// Packet: 0x00e4
+packetLen(0x00e4, 6) // CZ_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e5
+packetLen(0x00e5, 26) // ZC_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e6
+packetLen(0x00e6, 3) // CZ_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e7
+packetLen(0x00e7, 3) // ZC_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e8
+packetLen(0x00e8, 8) // CZ_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00e9
+packetLen(0x00e9, 29) // ZC_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00ea
+packetLen(0x00ea, 5) // ZC_ACK_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00eb
+packetLen(0x00eb, 2) // CZ_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ec
+packetLen(0x00ec, 3) // ZC_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ed
+packetLen(0x00ed, 2) // CZ_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ee
+packetLen(0x00ee, 2) // ZC_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ef
+packetLen(0x00ef, 2) // CZ_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f0
+packetLen(0x00f0, 3) // ZC_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f1
+packetLen(0x00f1, 2) // ZC_EXCHANGEITEM_UNDO
+
+// Packet: 0x00f2
+packetLen(0x00f2, 6) // ZC_NOTIFY_STOREITEM_COUNTINFO
+
+// Packet: 0x00f3
+packetLen(0x00f3, -1) // CZ_REQUEST_CHAT
+
+// Packet: 0x00f4
+packetLen(0x00f4, 31) // ZC_ADD_ITEM_TO_STORE
+
+// Packet: 0x00f5
+packetLen(0x00f5, 11) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY
+
+// Packet: 0x00f6
+packetLen(0x00f6, 8) // ZC_DELETE_ITEM_FROM_STORE
+
+// Packet: 0x00f7
+packetLen(0x00f7, 17) // CZ_REQUEST_TIME
+
+// Packet: 0x00f8
+packetLen(0x00f8, 2) // ZC_CLOSE_STORE
+
+// Packet: 0x00f9
+packetLen(0x00f9, 26) // CZ_MAKE_GROUP
+
+// Packet: 0x00fa
+packetLen(0x00fa, 3) // ZC_ACK_MAKE_GROUP
+
+// Packet: 0x00fb
+packetLen(0x00fb, -1) // ZC_GROUP_LIST
+
+// Packet: 0x00fc
+packetLen(0x00fc, 6) // CZ_REQ_JOIN_GROUP
+
+// Packet: 0x00fd
+packetLen(0x00fd, 27) // ZC_ACK_REQ_JOIN_GROUP
+
+// Packet: 0x00fe
+packetLen(0x00fe, 30) // ZC_REQ_JOIN_GROUP
+
+// Packet: 0x00ff
+packetLen(0x00ff, 10) // CZ_JOIN_GROUP
+
+// Packet: 0x0100
+packetLen(0x0100, 2) // CZ_REQ_LEAVE_GROUP
+
+// Packet: 0x0101
+packetLen(0x0101, 6) // ZC_GROUPINFO_CHANGE
+
+// Packet: 0x0102
+packetLen(0x0102, 6) // CZ_CHANGE_GROUPEXPOPTION
+
+// Packet: 0x0103
+packetLen(0x0103, 30) // CZ_REQ_EXPEL_GROUP_MEMBER
+
+// Packet: 0x0104
+packetLen(0x0104, 79) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0105
+packetLen(0x0105, 31) // ZC_DELETE_MEMBER_FROM_GROUP
+
+// Packet: 0x0106
+packetLen(0x0106, 10) // ZC_NOTIFY_HP_TO_GROUPM
+
+// Packet: 0x0107
+packetLen(0x0107, 10) // ZC_NOTIFY_POSITION_TO_GROUPM
+
+// Packet: 0x0108
+packetLen(0x0108, -1) // CZ_REQUEST_CHAT_PARTY
+
+// Packet: 0x0109
+packetLen(0x0109, -1) // ZC_NOTIFY_CHAT_PARTY
+
+// Packet: 0x010a
+packetLen(0x010a, 6) // ZC_MVP_GETTING_ITEM
+
+// Packet: 0x010b
+packetLen(0x010b, 6) // ZC_MVP_GETTING_SPECIAL_EXP
+
+// Packet: 0x010c
+packetLen(0x010c, 6) // ZC_MVP
+
+// Packet: 0x010d
+packetLen(0x010d, 2) // ZC_THROW_MVPITEM
+
+// Packet: 0x010e
+packetLen(0x010e, 11) // ZC_SKILLINFO_UPDATE
+
+// Packet: 0x010f
+packetLen(0x010f, -1) // ZC_SKILLINFO_LIST
+
+// Packet: 0x0110
+packetLen(0x0110, 14) // ZC_ACK_TOUSESKILL
+
+// Packet: 0x0111
+packetLen(0x0111, 39) // ZC_ADD_SKILL
+
+// Packet: 0x0112
+packetLen(0x0112, 4) // CZ_UPGRADE_SKILLLEVEL
+
+// Packet: 0x0113
+packetLen(0x0113, 25) // CZ_USE_SKILL
+
+// Packet: 0x0114
+packetLen(0x0114, 31) // ZC_NOTIFY_SKILL
+
+// Packet: 0x0115
+packetLen(0x0115, 35) // ZC_NOTIFY_SKILL_POSITION
+
+// Packet: 0x0116
+packetLen(0x0116, 17) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0117
+packetLen(0x0117, 18) // ZC_NOTIFY_GROUNDSKILL
+
+// Packet: 0x0118
+packetLen(0x0118, 2) // CZ_CANCEL_LOCKON
+
+// Packet: 0x0119
+packetLen(0x0119, 13) // ZC_STATE_CHANGE
+
+// Packet: 0x011a
+packetLen(0x011a, 15) // ZC_USE_SKILL
+
+// Packet: 0x011b
+packetLen(0x011b, 20) // CZ_SELECT_WARPPOINT
+
+// Packet: 0x011c
+packetLen(0x011c, 68) // ZC_WARPLIST
+
+// Packet: 0x011d
+packetLen(0x011d, 2) // CZ_REMEMBER_WARPPOINT
+
+// Packet: 0x011e
+packetLen(0x011e, 3) // ZC_ACK_REMEMBER_WARPPOINT
+
+// Packet: 0x011f
+packetLen(0x011f, 16) // ZC_SKILL_ENTRY
+
+// Packet: 0x0120
+packetLen(0x0120, 6) // ZC_SKILL_DISAPPEAR
+
+// Packet: 0x0121
+packetLen(0x0121, 14) // ZC_NOTIFY_CARTITEM_COUNTINFO
+
+// Packet: 0x0122
+packetLen(0x0122, -1) // ZC_CART_EQUIPMENT_ITEMLIST
+
+// Packet: 0x0123
+packetLen(0x0123, -1) // ZC_CART_NORMAL_ITEMLIST
+
+// Packet: 0x0124
+packetLen(0x0124, 31) // ZC_ADD_ITEM_TO_CART
+
+// Packet: 0x0125
+packetLen(0x0125, 8) // ZC_DELETE_ITEM_FROM_CART
+
+// Packet: 0x0126
+packetLen(0x0126, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_CART
+
+// Packet: 0x0127
+packetLen(0x0127, 8) // CZ_MOVE_ITEM_FROM_CART_TO_BODY
+
+// Packet: 0x0128
+packetLen(0x0128, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_CART
+
+// Packet: 0x0129
+packetLen(0x0129, 8) // CZ_MOVE_ITEM_FROM_CART_TO_STORE
+
+// Packet: 0x012a
+packetLen(0x012a, 2) // CZ_REQ_CARTOFF
+
+// Packet: 0x012b
+packetLen(0x012b, 2) // ZC_CARTOFF
+
+// Packet: 0x012c
+packetLen(0x012c, 3) // ZC_ACK_ADDITEM_TO_CART
+
+// Packet: 0x012d
+packetLen(0x012d, 4) // ZC_OPENSTORE
+
+// Packet: 0x012e
+packetLen(0x012e, 2) // CZ_REQ_CLOSESTORE
+
+// Packet: 0x012f
+packetLen(0x012f, -1) // CZ_REQ_OPENSTORE
+
+// Packet: 0x0130
+packetLen(0x0130, 6) // CZ_REQ_BUY_FROMMC
+
+// Packet: 0x0131
+packetLen(0x0131, 86) // ZC_STORE_ENTRY
+
+// Packet: 0x0132
+packetLen(0x0132, 6) // ZC_DISAPPEAR_ENTRY
+
+// Packet: 0x0133
+packetLen(0x0133, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0134
+packetLen(0x0134, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0135
+packetLen(0x0135, 7) // ZC_PC_PURCHASE_RESULT_FROMMC
+
+// Packet: 0x0136
+packetLen(0x0136, -1) // ZC_PC_PURCHASE_MYITEMLIST
+
+// Packet: 0x0137
+packetLen(0x0137, 6) // ZC_DELETEITEM_FROM_MCSTORE
+
+// Packet: 0x0138
+packetLen(0x0138, 3) // CZ_PKMODE_CHANGE
+
+// Packet: 0x0139
+packetLen(0x0139, 16) // ZC_ATTACK_FAILURE_FOR_DISTANCE
+
+// Packet: 0x013a
+packetLen(0x013a, 4) // ZC_ATTACK_RANGE
+
+// Packet: 0x013b
+packetLen(0x013b, 4) // ZC_ACTION_FAILURE
+
+// Packet: 0x013c
+packetLen(0x013c, 4) // ZC_EQUIP_ARROW
+
+// Packet: 0x013d
+packetLen(0x013d, 6) // ZC_RECOVERY
+
+// Packet: 0x013e
+packetLen(0x013e, 24) // ZC_USESKILL_ACK
+
+// Packet: 0x013f
+packetLen(0x013f, 26) // CZ_ITEM_CREATE
+
+// Packet: 0x0140
+packetLen(0x0140, 22) // CZ_MOVETO_MAP
+
+// Packet: 0x0141
+packetLen(0x0141, 14) // ZC_COUPLESTATUS
+
+// Packet: 0x0142
+packetLen(0x0142, 6) // ZC_OPEN_EDITDLG
+
+// Packet: 0x0143
+packetLen(0x0143, 10) // CZ_INPUT_EDITDLG
+
+// Packet: 0x0144
+packetLen(0x0144, 23) // ZC_COMPASS
+
+// Packet: 0x0145
+packetLen(0x0145, 19) // ZC_SHOW_IMAGE
+
+// Packet: 0x0146
+packetLen(0x0146, 6) // CZ_CLOSE_DIALOG
+
+// Packet: 0x0147
+packetLen(0x0147, 39) // ZC_AUTORUN_SKILL
+
+// Packet: 0x0148
+packetLen(0x0148, 8) // ZC_RESURRECTION
+
+// Packet: 0x0149
+packetLen(0x0149, 9) // CZ_REQ_GIVE_MANNER_POINT
+
+// Packet: 0x014a
+packetLen(0x014a, 6) // ZC_ACK_GIVE_MANNER_POINT
+
+// Packet: 0x014b
+packetLen(0x014b, 27) // ZC_NOTIFY_MANNER_POINT_GIVEN
+
+// Packet: 0x014c
+packetLen(0x014c, -1) // ZC_MYGUILD_BASIC_INFO
+
+// Packet: 0x014d
+packetLen(0x014d, 2) // CZ_REQ_GUILD_MENUINTERFACE
+
+// Packet: 0x014e
+packetLen(0x014e, 6) // ZC_ACK_GUILD_MENUINTERFACE
+
+// Packet: 0x014f
+packetLen(0x014f, 6) // CZ_REQ_GUILD_MENU
+
+// Packet: 0x0150
+packetLen(0x0150, 110) // ZC_GUILD_INFO
+
+// Packet: 0x0151
+packetLen(0x0151, 6) // CZ_REQ_GUILD_EMBLEM_IMG
+
+// Packet: 0x0152
+packetLen(0x0152, -1) // ZC_GUILD_EMBLEM_IMG
+
+// Packet: 0x0153
+packetLen(0x0153, -1) // CZ_REGISTER_GUILD_EMBLEM_IMG
+
+// Packet: 0x0154
+packetLen(0x0154, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0155
+packetLen(0x0155, -1) // CZ_REQ_CHANGE_MEMBERPOS
+
+// Packet: 0x0156
+packetLen(0x0156, -1) // ZC_ACK_REQ_CHANGE_MEMBERS
+
+// Packet: 0x0157
+packetLen(0x0157, 6) // CZ_REQ_OPEN_MEMBER_INFO
+
+// Packet: 0x0159
+packetLen(0x0159, 54) // CZ_REQ_LEAVE_GUILD
+
+// Packet: 0x015a
+packetLen(0x015a, 66) // ZC_ACK_LEAVE_GUILD
+
+// Packet: 0x015b
+packetLen(0x015b, 54) // CZ_REQ_BAN_GUILD
+
+// Packet: 0x015c
+packetLen(0x015c, 90) // ZC_ACK_BAN_GUILD
+
+// Packet: 0x015d
+packetLen(0x015d, 42) // CZ_REQ_DISORGANIZE_GUILD
+
+// Packet: 0x015e
+packetLen(0x015e, 6) // ZC_ACK_DISORGANIZE_GUILD_RESULT
+
+// Packet: 0x015f
+packetLen(0x015f, 42) // ZC_ACK_DISORGANIZE_GUILD
+
+// Packet: 0x0160
+packetLen(0x0160, -1) // ZC_POSITION_INFO
+
+// Packet: 0x0161
+packetLen(0x0161, -1) // CZ_REG_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0162
+packetLen(0x0162, -1) // ZC_GUILD_SKILLINFO
+
+// Packet: 0x0163
+packetLen(0x0163, -1) // ZC_BAN_LIST
+
+// Packet: 0x0164
+packetLen(0x0164, -1) // ZC_OTHER_GUILD_LIST
+
+// Packet: 0x0165
+packetLen(0x0165, 30) // CZ_REQ_MAKE_GUILD
+
+// Packet: 0x0166
+packetLen(0x0166, -1) // ZC_POSITION_ID_NAME_INFO
+
+// Packet: 0x0167
+packetLen(0x0167, 3) // ZC_RESULT_MAKE_GUILD
+
+// Packet: 0x0168
+packetLen(0x0168, 14) // CZ_REQ_JOIN_GUILD
+
+// Packet: 0x0169
+packetLen(0x0169, 3) // ZC_ACK_REQ_JOIN_GUILD
+
+// Packet: 0x016a
+packetLen(0x016a, 30) // ZC_REQ_JOIN_GUILD
+
+// Packet: 0x016b
+packetLen(0x016b, 10) // CZ_JOIN_GUILD
+
+// Packet: 0x016c
+packetLen(0x016c, 43) // ZC_UPDATE_GDID
+
+// Packet: 0x016d
+packetLen(0x016d, 14) // ZC_UPDATE_CHARSTAT
+
+// Packet: 0x016e
+packetLen(0x016e, 186) // CZ_GUILD_NOTICE
+
+// Packet: 0x016f
+packetLen(0x016f, 182) // ZC_GUILD_NOTICE
+
+// Packet: 0x0170
+packetLen(0x0170, 14) // CZ_REQ_ALLY_GUILD
+
+// Packet: 0x0171
+packetLen(0x0171, 30) // ZC_REQ_ALLY_GUILD
+
+// Packet: 0x0172
+packetLen(0x0172, 10) // CZ_ALLY_GUILD
+
+// Packet: 0x0173
+packetLen(0x0173, 3) // ZC_ACK_REQ_ALLY_GUILD
+
+// Packet: 0x0174
+packetLen(0x0174, -1) // ZC_ACK_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0175
+packetLen(0x0175, 6) // CZ_REQ_GUILD_MEMBER_INFO
+
+// Packet: 0x0176
+packetLen(0x0176, 106) // ZC_ACK_GUILD_MEMBER_INFO
+
+// Packet: 0x0177
+packetLen(0x0177, -1) // ZC_ITEMIDENTIFY_LIST
+
+// Packet: 0x0178
+packetLen(0x0178, 4) // CZ_REQ_ITEMIDENTIFY
+
+// Packet: 0x0179
+packetLen(0x0179, 5) // ZC_ACK_ITEMIDENTIFY
+
+// Packet: 0x017a
+packetLen(0x017a, 4) // CZ_REQ_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017b
+packetLen(0x017b, -1) // ZC_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017c
+packetLen(0x017c, 6) // CZ_REQ_ITEMCOMPOSITION
+
+// Packet: 0x017d
+packetLen(0x017d, 7) // ZC_ACK_ITEMCOMPOSITION
+
+// Packet: 0x017e
+packetLen(0x017e, -1) // CZ_GUILD_CHAT
+
+// Packet: 0x017f
+packetLen(0x017f, -1) // ZC_GUILD_CHAT
+
+// Packet: 0x0180
+packetLen(0x0180, 6) // CZ_REQ_HOSTILE_GUILD
+
+// Packet: 0x0181
+packetLen(0x0181, 3) // ZC_ACK_REQ_HOSTILE_GUILD
+
+// Packet: 0x0182
+packetLen(0x0182, 106) // ZC_MEMBER_ADD
+
+// Packet: 0x0183
+packetLen(0x0183, 10) // CZ_REQ_DELETE_RELATED_GUILD
+
+// Packet: 0x0184
+packetLen(0x0184, 10) // ZC_DELETE_RELATED_GUILD
+
+// Packet: 0x0185
+packetLen(0x0185, 34) // ZC_ADD_RELATED_GUILD
+
+// Packet: 0x0187
+packetLen(0x0187, 6) // CH_UNKNOWN_PING
+
+// Packet: 0x0188
+packetLen(0x0188, 8) // ZC_ACK_ITEMREFINING
+
+// Packet: 0x0189
+packetLen(0x0189, 4) // ZC_NOTIFY_MAPINFO
+
+// Packet: 0x018a
+packetLen(0x018a, 4) // CZ_REQ_DISCONNECT
+
+// Packet: 0x018b
+packetLen(0x018b, 4) // ZC_ACK_REQ_DISCONNECT
+
+// Packet: 0x018c
+packetLen(0x018c, 29) // ZC_MONSTER_INFO
+
+// Packet: 0x018d
+packetLen(0x018d, -1) // ZC_MAKABLEITEMLIST
+
+// Packet: 0x018e
+packetLen(0x018e, 18) // CZ_REQMAKINGITEM
+
+// Packet: 0x018f
+packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM
+
+// Packet: 0x0190
+packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX
+
+// Packet: 0x0191
+packetLen(0x0191, 86) // ZC_TALKBOX_CHATCONTENTS
+
+// Packet: 0x0192
+packetLen(0x0192, 24) // ZC_UPDATE_MAPINFO
+
+// Packet: 0x0193
+packetLen(0x0193, 2) // CZ_REQNAME_BYGID
+
+// Packet: 0x0194
+packetLen(0x0194, 30) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0195
+packetLen(0x0195, 102) // ZC_ACK_REQNAMEALL
+
+// Packet: 0x0196
+packetLen(0x0196, 9) // ZC_MSG_STATE_CHANGE
+
+// Packet: 0x0197
+packetLen(0x0197, 4) // CZ_RESET
+
+// Packet: 0x0198
+packetLen(0x0198, 8) // CZ_CHANGE_MAPTYPE
+
+// Packet: 0x0199
+packetLen(0x0199, 4) // ZC_NOTIFY_MAPPROPERTY
+
+// Packet: 0x019a
+packetLen(0x019a, 14) // ZC_NOTIFY_RANKING
+
+// Packet: 0x019b
+packetLen(0x019b, 10) // ZC_NOTIFY_EFFECT
+
+// Packet: 0x019c
+packetLen(0x019c, -1) // CZ_LOCALBROADCAST
+
+// Packet: 0x019d
+packetLen(0x019d, 6) // CZ_CHANGE_EFFECTSTATE
+
+// Packet: 0x019e
+packetLen(0x019e, 2) // ZC_START_CAPTURE
+
+// Packet: 0x019f
+packetLen(0x019f, 6) // CZ_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a0
+packetLen(0x01a0, 3) // ZC_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a1
+packetLen(0x01a1, 3) // CZ_COMMAND_PET
+
+// Packet: 0x01a2
+packetLen(0x01a2, 37) // ZC_PROPERTY_PET
+
+// Packet: 0x01a3
+packetLen(0x01a3, 7) // ZC_FEED_PET
+
+// Packet: 0x01a4
+packetLen(0x01a4, 11) // ZC_CHANGESTATE_PET
+
+// Packet: 0x01a5
+packetLen(0x01a5, 26) // CZ_RENAME_PET
+
+// Packet: 0x01a6
+packetLen(0x01a6, -1) // ZC_PETEGG_LIST
+
+// Packet: 0x01a7
+packetLen(0x01a7, 4) // CZ_SELECT_PETEGG
+
+// Packet: 0x01a8
+packetLen(0x01a8, 4) // CZ_PETEGG_INFO
+
+// Packet: 0x01a9
+packetLen(0x01a9, 6) // CZ_PET_ACT
+
+// Packet: 0x01aa
+packetLen(0x01aa, 10) // ZC_PET_ACT
+
+// Packet: 0x01ab
+packetLen(0x01ab, 12) // ZC_PAR_CHANGE_USER
+
+// Packet: 0x01ac
+packetLen(0x01ac, 6) // ZC_SKILL_UPDATE
+
+// Packet: 0x01ad
+packetLen(0x01ad, -1) // ZC_MAKINGARROW_LIST
+
+// Packet: 0x01ae
+packetLen(0x01ae, 6) // CZ_REQ_MAKINGARROW
+
+// Packet: 0x01af
+packetLen(0x01af, 4) // CZ_REQ_CHANGECART
+
+// Packet: 0x01b0
+packetLen(0x01b0, 11) // ZC_NPCSPRITE_CHANGE
+
+// Packet: 0x01b1
+packetLen(0x01b1, 7) // ZC_SHOWDIGIT
+
+// Packet: 0x01b2
+packetLen(0x01b2, -1) // CZ_REQ_OPENSTORE2
+
+// Packet: 0x01b3
+packetLen(0x01b3, 67) // ZC_SHOW_IMAGE2
+
+// Packet: 0x01b4
+packetLen(0x01b4, 12) // ZC_CHANGE_GUILD
+
+// Packet: 0x01b5
+packetLen(0x01b5, 18) // SC_BILLING_INFO
+
+// Packet: 0x01b6
+packetLen(0x01b6, 114) // ZC_GUILD_INFO2
+
+// Packet: 0x01b7
+packetLen(0x01b7, 6) // CZ_GUILD_ZENY
+
+// Packet: 0x01b8
+packetLen(0x01b8, 3) // ZC_GUILD_ZENY_ACK
+
+// Packet: 0x01b9
+packetLen(0x01b9, 6) // ZC_DISPEL
+
+// Packet: 0x01ba
+packetLen(0x01ba, 26) // CZ_REMOVE_AID
+
+// Packet: 0x01bb
+packetLen(0x01bb, 26) // CZ_SHIFT
+
+// Packet: 0x01bc
+packetLen(0x01bc, 26) // CZ_RECALL
+
+// Packet: 0x01bd
+packetLen(0x01bd, 26) // CZ_RECALL_GID
+
+// Packet: 0x01be
+packetLen(0x01be, 2) // AC_ASK_PNGAMEROOM
+
+// Packet: 0x01bf
+packetLen(0x01bf, 3) // CA_REPLY_PNGAMEROOM
+
+// Packet: 0x01c0
+packetLen(0x01c0, 2) // CZ_REQ_REMAINTIME
+
+// Packet: 0x01c1
+packetLen(0x01c1, 14) // ZC_REPLY_REMAINTIME
+
+// Packet: 0x01c2
+packetLen(0x01c2, 10) // ZC_INFO_REMAINTIME
+
+// Packet: 0x01c3
+packetLen(0x01c3, -1) // ZC_BROADCAST2
+
+// Packet: 0x01c4
+packetLen(0x01c4, 32) // ZC_ADD_ITEM_TO_STORE2
+
+// Packet: 0x01c5
+packetLen(0x01c5, 32) // ZC_ADD_ITEM_TO_CART2
+
+// Packet: 0x01c6
+packetLen(0x01c6, 4) // CS_REQ_ENCRYPTION
+
+// Packet: 0x01c7
+packetLen(0x01c7, 2) // SC_ACK_ENCRYPTION
+
+// Packet: 0x01c8
+packetLen(0x01c8, 15) // ZC_USE_ITEM_ACK2
+
+// Packet: 0x01c9
+packetLen(0x01c9, 97) // ZC_SKILL_ENTRY2
+
+// Packet: 0x01ca
+packetLen(0x01ca, 3) // CZ_REQMAKINGHOMUN
+
+// Packet: 0x01cb
+packetLen(0x01cb, 9) // CZ_MONSTER_TALK
+
+// Packet: 0x01cc
+packetLen(0x01cc, 9) // ZC_MONSTER_TALK
+
+// Packet: 0x01cd
+packetLen(0x01cd, 30) // ZC_AUTOSPELLLIST
+
+// Packet: 0x01ce
+packetLen(0x01ce, 6) // CZ_SELECTAUTOSPELL
+
+// Packet: 0x01cf
+packetLen(0x01cf, 28) // ZC_DEVOTIONLIST
+
+// Packet: 0x01d0
+packetLen(0x01d0, 8) // ZC_SPIRITS
+
+// Packet: 0x01d1
+packetLen(0x01d1, 14) // ZC_BLADESTOP
+
+// Packet: 0x01d2
+packetLen(0x01d2, 10) // ZC_COMBODELAY
+
+// Packet: 0x01d3
+packetLen(0x01d3, 35) // ZC_SOUND
+
+// Packet: 0x01d4
+packetLen(0x01d4, 6) // ZC_OPEN_EDITDLGSTR
+
+// Packet: 0x01d5
+packetLen(0x01d5, -1) // CZ_INPUT_EDITDLGSTR
+
+// Packet: 0x01d6
+packetLen(0x01d6, 4) // ZC_NOTIFY_MAPPROPERTY2
+
+// Packet: 0x01d7
+packetLen(0x01d7, 15) // ZC_SPRITE_CHANGE2
+
+// Packet: 0x01d8
+packetLen(0x01d8, 58) // ZC_NOTIFY_STANDENTRY2
+
+// Packet: 0x01d9
+packetLen(0x01d9, 57) // ZC_NOTIFY_NEWENTRY2
+
+// Packet: 0x01da
+packetLen(0x01da, 64) // ZC_NOTIFY_MOVEENTRY2
+
+// Packet: 0x01db
+packetLen(0x01db, 2) // CA_REQ_HASH
+
+// Packet: 0x01dc
+packetLen(0x01dc, -1) // AC_ACK_HASH
+
+// Packet: 0x01dd
+packetLen(0x01dd, 47) // CA_LOGIN2
+
+// Packet: 0x01de
+packetLen(0x01de, 33) // ZC_NOTIFY_SKILL2
+
+// Packet: 0x01df
+packetLen(0x01df, 6) // CZ_REQ_ACCOUNTNAME
+
+// Packet: 0x01e0
+packetLen(0x01e0, 30) // ZC_ACK_ACCOUNTNAME
+
+// Packet: 0x01e1
+packetLen(0x01e1, 8) // ZC_SPIRITS2
+
+// Packet: 0x01e2
+packetLen(0x01e2, 34) // ZC_REQ_COUPLE
+
+// Packet: 0x01e3
+packetLen(0x01e3, 14) // CZ_JOIN_COUPLE
+
+// Packet: 0x01e4
+packetLen(0x01e4, 2) // ZC_START_COUPLE
+
+// Packet: 0x01e5
+packetLen(0x01e5, 6) // CZ_REQ_JOIN_COUPLE
+
+// Packet: 0x01e6
+packetLen(0x01e6, 26) // ZC_COUPLENAME
+
+// Packet: 0x01e7
+packetLen(0x01e7, 2) // CZ_DORIDORI
+
+// Packet: 0x01e8
+packetLen(0x01e8, 28) // CZ_MAKE_GROUP2
+
+// Packet: 0x01e9
+packetLen(0x01e9, 81) // ZC_ADD_MEMBER_TO_GROUP2
+
+// Packet: 0x01ea
+packetLen(0x01ea, 6) // ZC_CONGRATULATION
+
+// Packet: 0x01eb
+packetLen(0x01eb, 10) // ZC_NOTIFY_POSITION_TO_GUILDM
+
+// Packet: 0x01ec
+packetLen(0x01ec, 26) // ZC_GUILD_MEMBER_MAP_CHANGE
+
+// Packet: 0x01ed
+packetLen(0x01ed, 2) // CZ_CHOPOKGI
+
+// Packet: 0x01ee
+packetLen(0x01ee, -1) // ZC_NORMAL_ITEMLIST2
+
+// Packet: 0x01ef
+packetLen(0x01ef, -1) // ZC_CART_NORMAL_ITEMLIST2
+
+// Packet: 0x01f0
+packetLen(0x01f0, -1) // ZC_STORE_NORMAL_ITEMLIST2
+
+// Packet: 0x01f1
+packetLen(0x01f1, -1) // AC_NOTIFY_ERROR
+
+// Packet: 0x01f2
+packetLen(0x01f2, 20) // ZC_UPDATE_CHARSTAT2
+
+// Packet: 0x01f3
+packetLen(0x01f3, 10) // ZC_NOTIFY_EFFECT2
+
+// Packet: 0x01f4
+packetLen(0x01f4, 32) // ZC_REQ_EXCHANGE_ITEM2
+
+// Packet: 0x01f5
+packetLen(0x01f5, 9) // ZC_ACK_EXCHANGE_ITEM2
+
+// Packet: 0x01f6
+packetLen(0x01f6, 34) // ZC_REQ_BABY
+
+// Packet: 0x01f7
+packetLen(0x01f7, 14) // CZ_JOIN_BABY
+
+// Packet: 0x01f8
+packetLen(0x01f8, 2) // ZC_START_BABY
+
+// Packet: 0x01f9
+packetLen(0x01f9, 6) // CZ_REQ_JOIN_BABY
+
+// Packet: 0x01fa
+packetLen(0x01fa, 48) // CA_LOGIN3
+
+// Packet: 0x01fb
+packetLen(0x01fb, 56) // CH_DELETE_CHAR2
+
+// Packet: 0x01fc
+packetLen(0x01fc, -1) // ZC_REPAIRITEMLIST
+
+// Packet: 0x01fd
+packetLen(0x01fd, 25) // CZ_REQ_ITEMREPAIR
+
+// Packet: 0x01fe
+packetLen(0x01fe, 5) // ZC_ACK_ITEMREPAIR
+
+// Packet: 0x01ff
+packetLen(0x01ff, 10) // ZC_HIGHJUMP
+
+// Packet: 0x0200
+packetLen(0x0200, 26) // CA_CONNECT_INFO_CHANGED
+
+// Packet: 0x0201
+packetLen(0x0201, -1) // ZC_FRIENDS_LIST
+
+// Packet: 0x0202
+packetLen(0x0202, 26) // CZ_ADD_FRIENDS
+
+// Packet: 0x0203
+packetLen(0x0203, 10) // CZ_DELETE_FRIENDS
+
+// Packet: 0x0204
+packetLen(0x0204, 18) // CA_EXE_HASHCHECK
+
+// Packet: 0x0205
+packetLen(0x0205, 26) // ZC_DIVORCE
+
+// Packet: 0x0206
+packetLen(0x0206, 35) // ZC_FRIENDS_STATE
+
+// Packet: 0x0207
+packetLen(0x0207, 34) // ZC_REQ_ADD_FRIENDS
+
+// Packet: 0x0208
+packetLen(0x0208, 14) // CZ_ACK_REQ_ADD_FRIENDS
+
+// Packet: 0x0209
+packetLen(0x0209, 36) // ZC_ADD_FRIENDS_LIST
+
+// Packet: 0x020a
+packetLen(0x020a, 10) // ZC_DELETE_FRIENDS
+
+// Packet: 0x020d
+packetLen(0x020d, -1) // HC_BLOCK_CHARACTER
+
+// Packet: 0x020e
+packetLen(0x020e, 32) // ZC_STARSKILL
+
+// Packet: 0x0212
+packetLen(0x0212, 26) // CZ_REQ_GIVE_MANNER_BYNAME
+
+// Packet: 0x0213
+packetLen(0x0213, 26) // CZ_REQ_STATUS_GM
+
+// Packet: 0x0214
+packetLen(0x0214, 42) // ZC_ACK_STATUS_GM
+
+// Packet: 0x0215
+packetLen(0x0215, 6) // ZC_SKILLMSG
+
+// Packet: 0x0216
+packetLen(0x0216, 6) // ZC_BABYMSG
+
+// Packet: 0x0217
+packetLen(0x0217, 2) // CZ_BLACKSMITH_RANK
+
+// Packet: 0x0218
+packetLen(0x0218, 2) // CZ_ALCHEMIST_RANK
+
+// Packet: 0x0219
+packetLen(0x0219, 282) // ZC_BLACKSMITH_RANK
+
+// Packet: 0x021a
+packetLen(0x021a, 282) // ZC_ALCHEMIST_RANK
+
+// Packet: 0x021b
+packetLen(0x021b, 10) // ZC_BLACKSMITH_POINT
+
+// Packet: 0x021c
+packetLen(0x021c, 10) // ZC_ALCHEMIST_POINT
+
+// Packet: 0x021d
+packetLen(0x021d, 6) // CZ_LESSEFFECT
+
+// Packet: 0x021e
+packetLen(0x021e, 6) // ZC_LESSEFFECT
+
+// Packet: 0x021f
+packetLen(0x021f, 66) // ZC_NOTIFY_PKINFO
+
+// Packet: 0x0220
+packetLen(0x0220, 10) // ZC_NOTIFY_CRAZYKILLER
+
+// Packet: 0x0221
+packetLen(0x0221, -1) // ZC_NOTIFY_WEAPONITEMLIST
+
+// Packet: 0x0222
+packetLen(0x0222, 6) // CZ_REQ_WEAPONREFINE
+
+// Packet: 0x0223
+packetLen(0x0223, 10) // ZC_ACK_WEAPONREFINE
+
+// Packet: 0x0224
+packetLen(0x0224, 10) // ZC_TAEKWON_POINT
+
+// Packet: 0x0225
+packetLen(0x0225, 2) // CZ_TAEKWON_RANK
+
+// Packet: 0x0226
+packetLen(0x0226, 282) // ZC_TAEKWON_RANK
+
+// Packet: 0x0227
+packetLen(0x0227, 18) // ZC_GAME_GUARD
+
+// Packet: 0x0228
+packetLen(0x0228, 18) // CZ_ACK_GAME_GUARD
+
+// Packet: 0x0229
+packetLen(0x0229, 15) // ZC_STATE_CHANGE3
+
+// Packet: 0x022a
+packetLen(0x022a, 62) // ZC_NOTIFY_STANDENTRY3
+
+// Packet: 0x022b
+packetLen(0x022b, 61) // ZC_NOTIFY_NEWENTRY3
+
+// Packet: 0x022c
+packetLen(0x022c, 69) // ZC_NOTIFY_MOVEENTRY3
+
+// Packet: 0x022d
+packetLen(0x022d, 5) // CZ_COMMAND_MER
+
+// Packet: 0x022e
+packetLen(0x022e, 73) // ZC_PROPERTY_HOMUN
+
+// Packet: 0x022f
+packetLen(0x022f, 7) // ZC_FEED_MER
+
+// Packet: 0x0230
+packetLen(0x0230, 12) // ZC_CHANGESTATE_MER
+
+// Packet: 0x0231
+packetLen(0x0231, 26) // CZ_RENAME_MER
+
+// Packet: 0x0232
+packetLen(0x0232, 9) // CZ_REQUEST_MOVENPC
+
+// Packet: 0x0233
+packetLen(0x0233, 11) // CZ_REQUEST_ACTNPC
+
+// Packet: 0x0234
+packetLen(0x0234, 6) // CZ_REQUEST_MOVETOOWNER
+
+// Packet: 0x0235
+packetLen(0x0235, -1) // ZC_HOSKILLINFO_LIST
+
+// Packet: 0x0236
+packetLen(0x0236, 10) // ZC_KILLER_POINT
+
+// Packet: 0x0237
+packetLen(0x0237, 2) // CZ_KILLER_RANK
+
+// Packet: 0x0238
+packetLen(0x0238, 282) // ZC_KILLER_RANK
+
+// Packet: 0x0239
+packetLen(0x0239, 11) // ZC_HOSKILLINFO_UPDATE
+
+// Packet: 0x023a
+packetLen(0x023a, 4) // ZC_REQ_STORE_PASSWORD
+
+// Packet: 0x023b
+packetLen(0x023b, 36) // CZ_ACK_STORE_PASSWORD
+
+// Packet: 0x023c
+packetLen(0x023c, 6) // ZC_RESULT_STORE_PASSWORD
+
+// Packet: 0x023d
+packetLen(0x023d, 6) // AC_EVENT_RESULT
+
+// Packet: 0x023e
+packetLen(0x023e, 8) // HC_REQUEST_CHARACTER_PASSWORD
+
+// Packet: 0x023f
+packetLen(0x023f, 2) // CZ_MAIL_GET_LIST
+
+// Packet: 0x0240
+packetLen(0x0240, -1) // ZC_MAIL_REQ_GET_LIST
+
+// Packet: 0x0241
+packetLen(0x0241, 6) // CZ_MAIL_OPEN
+
+// Packet: 0x0242
+packetLen(0x0242, -1) // ZC_MAIL_REQ_OPEN
+
+// Packet: 0x0243
+packetLen(0x0243, 6) // CZ_MAIL_DELETE
+
+// Packet: 0x0244
+packetLen(0x0244, 6) // CZ_MAIL_GET_ITEM
+
+// Packet: 0x0245
+packetLen(0x0245, 3) // ZC_MAIL_REQ_GET_ITEM
+
+// Packet: 0x0246
+packetLen(0x0246, 4) // CZ_MAIL_RESET_ITEM
+
+// Packet: 0x0247
+packetLen(0x0247, 8) // CZ_MAIL_ADD_ITEM
+
+// Packet: 0x0248
+packetLen(0x0248, -1) // CZ_MAIL_SEND
+
+// Packet: 0x0249
+packetLen(0x0249, 3) // ZC_MAIL_REQ_SEND
+
+// Packet: 0x024a
+packetLen(0x024a, 70) // ZC_MAIL_RECEIVE
+
+// Packet: 0x024b
+packetLen(0x024b, 4) // CZ_AUCTION_CREATE
+
+// Packet: 0x024c
+packetLen(0x024c, 8) // CZ_AUCTION_ADD_ITEM
+
+// Packet: 0x024d
+packetLen(0x024d, 12) // CZ_AUCTION_ADD
+
+// Packet: 0x024e
+packetLen(0x024e, 6) // CZ_AUCTION_ADD_CANCEL
+
+// Packet: 0x024f
+packetLen(0x024f, 10) // CZ_AUCTION_BUY
+
+// Packet: 0x0250
+packetLen(0x0250, 3) // ZC_AUCTION_RESULT
+
+// Packet: 0x0251
+packetLen(0x0251, 34) // CZ_AUCTION_ITEM_SEARCH
+
+// Packet: 0x0252
+packetLen(0x0252, -1) // ZC_AUCTION_ITEM_REQ_SEARCH
+
+// Packet: 0x0253
+packetLen(0x0253, 3) // ZC_STARPLACE
+
+// Packet: 0x0254
+packetLen(0x0254, 3) // CZ_AGREE_STARPLACE
+
+// Packet: 0x0255
+packetLen(0x0255, 5) // ZC_ACK_MAIL_ADD_ITEM
+
+// Packet: 0x0256
+packetLen(0x0256, 5) // ZC_ACK_AUCTION_ADD_ITEM
+
+// Packet: 0x0257
+packetLen(0x0257, 8) // ZC_ACK_MAIL_DELETE
+
+// Packet: 0x0258
+packetLen(0x0258, 2) // CA_REQ_GAME_GUARD_CHECK
+
+// Packet: 0x0259
+packetLen(0x0259, 3) // AC_ACK_GAME_GUARD
+
+// Packet: 0x025a
+packetLen(0x025a, -1) // ZC_MAKINGITEM_LIST
+
+// Packet: 0x025b
+packetLen(0x025b, 8) // CZ_REQ_MAKINGITEM
+
+// Packet: 0x025c
+packetLen(0x025c, 4) // CZ_AUCTION_REQ_MY_INFO
+
+// Packet: 0x025d
+packetLen(0x025d, 6) // CZ_AUCTION_REQ_MY_SELL_STOP
+
+// Packet: 0x025e
+packetLen(0x025e, 4) // ZC_AUCTION_ACK_MY_SELL_STOP
+
+// Packet: 0x025f
+packetLen(0x025f, 6) // ZC_AUCTION_WINDOWS
+
+// Packet: 0x0260
+packetLen(0x0260, 6) // ZC_MAIL_WINDOWS
+
+// Packet: 0x0261
+packetLen(0x0261, 11) // AC_REQ_LOGIN_OLDEKEY
+
+// Packet: 0x0262
+packetLen(0x0262, 11) // AC_REQ_LOGIN_NEWEKEY
+
+// Packet: 0x0263
+packetLen(0x0263, 11) // AC_REQ_LOGIN_CARDPASS
+
+// Packet: 0x0264
+packetLen(0x0264, 20) // CA_ACK_LOGIN_OLDEKEY
+
+// Packet: 0x0265
+packetLen(0x0265, 20) // CA_ACK_LOGIN_NEWEKEY
+
+// Packet: 0x0266
+packetLen(0x0266, 30) // CA_ACK_LOGIN_CARDPASS
+
+// Packet: 0x0267
+packetLen(0x0267, 4) // AC_ACK_EKEY_FAIL_NOTEXIST
+
+// Packet: 0x0268
+packetLen(0x0268, 4) // AC_ACK_EKEY_FAIL_NOTUSESEKEY
+
+// Packet: 0x0269
+packetLen(0x0269, 4) // AC_ACK_EKEY_FAIL_NOTUSEDEKEY
+
+// Packet: 0x026a
+packetLen(0x026a, 4) // AC_ACK_EKEY_FAIL_AUTHREFUSE
+
+// Packet: 0x026b
+packetLen(0x026b, 4) // AC_ACK_EKEY_FAIL_INPUTEKEY
+
+// Packet: 0x026c
+packetLen(0x026c, 4) // AC_ACK_EKEY_FAIL_NOTICE
+
+// Packet: 0x026d
+packetLen(0x026d, 4) // AC_ACK_EKEY_FAIL_NEEDCARDPASS
+
+// Packet: 0x026f
+packetLen(0x026f, 2) // AC_ACK_FIRST_LOGIN
+
+// Packet: 0x0270
+packetLen(0x0270, 2) // AC_REQ_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0271
+packetLen(0x0271, 40) // CA_ACK_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0272
+packetLen(0x0272, 44) // AC_ACK_PT_ID_INFO
+
+// Packet: 0x0273
+packetLen(0x0273, 30) // CZ_REQ_MAIL_RETURN
+
+// Packet: 0x0274
+packetLen(0x0274, 8) // ZC_ACK_MAIL_RETURN
+
+// Packet: 0x0275
+packetLen(0x0275, 37) // CH_ENTER2
+
+// Packet: 0x0276
+packetLen(0x0276, -1) // AC_ACCEPT_LOGIN2
+
+// Packet: 0x0277
+packetLen(0x0277, 84) // CA_LOGIN_PCBANG
+
+// Packet: 0x0278
+packetLen(0x0278, 2) // ZC_NOTIFY_PCBANG
+
+// Packet: 0x0279
+packetLen(0x0279, 2) // CZ_HUNTINGLIST
+
+// Packet: 0x027a
+packetLen(0x027a, -1) // ZC_HUNTINGLIST
+
+// Packet: 0x027b
+packetLen(0x027b, 14) // ZC_PCBANG_EFFECT
+
+// Packet: 0x027c
+packetLen(0x027c, 60) // CA_LOGIN4
+
+// Packet: 0x027d
+packetLen(0x027d, 62) // ZC_PROPERTY_MERCE
+
+// Packet: 0x027e
+packetLen(0x027e, -1) // ZC_SHANDA_PROTECT
+
+// Packet: 0x027f
+packetLen(0x027f, 8) // CA_CLIENT_TYPE
+
+// Packet: 0x0280
+packetLen(0x0280, 12) // ZC_GANGSI_POINT
+
+// Packet: 0x0281
+packetLen(0x0281, 4) // CZ_GANGSI_RANK
+
+// Packet: 0x0282
+packetLen(0x0282, 284) // ZC_GANGSI_RANK
+
+// Packet: 0x0283
+packetLen(0x0283, 6) // ZC_AID
+
+// Packet: 0x0284
+packetLen(0x0284, 14) // ZC_NOTIFY_EFFECT3
+
+// Packet: 0x0285
+packetLen(0x0285, 6) // ZC_DEATH_QUESTION
+
+// Packet: 0x0286
+packetLen(0x0286, 4) // CZ_DEATH_QUESTION
+
+// Packet: 0x0287
+packetLen(0x0287, -1) // ZC_PC_CASH_POINT_ITEMLIST
+
+// Packet: 0x0288
+packetLen(0x0288, -1) // CZ_PC_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0289
+packetLen(0x0289, 12) // ZC_PC_CASH_POINT_UPDATE
+
+// Packet: 0x028a
+packetLen(0x028a, 18) // ZC_NPC_SHOWEFST_UPDATE
+
+// Packet: 0x028b
+packetLen(0x028b, -1) // HC_CHARNOTBEENSELECTED
+
+// Packet: 0x028c
+packetLen(0x028c, 46) // CH_SELECT_CHAR_GOINGTOBEUSED
+
+// Packet: 0x028d
+packetLen(0x028d, 34) // CH_REQ_IS_VALID_CHARNAME
+
+// Packet: 0x028e
+packetLen(0x028e, 4) // HC_ACK_IS_VALID_CHARNAME
+
+// Packet: 0x028f
+packetLen(0x028f, 6) // CH_REQ_CHANGE_CHARNAME
+
+// Packet: 0x0290
+packetLen(0x0290, 4) // HC_ACK_CHANGE_CHARNAME
+
+// Packet: 0x0291
+packetLen(0x0291, 4) // ZC_MSG
+
+// Packet: 0x0292
+packetLen(0x0292, 2) // CZ_STANDING_RESURRECTION
+
+// Packet: 0x0293
+packetLen(0x0293, 70) // ZC_BOSS_INFO
+
+// Packet: 0x0294
+packetLen(0x0294, 10) // ZC_READ_BOOK
+
+// Packet: 0x0295
+packetLen(0x0295, -1) // ZC_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0296
+packetLen(0x0296, -1) // ZC_STORE_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0297
+packetLen(0x0297, -1) // ZC_CART_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0298
+packetLen(0x0298, 10) // ZC_CASH_TIME_COUNTER
+
+// Packet: 0x0299
+packetLen(0x0299, 8) // ZC_CASH_ITEM_DELETE
+
+// Packet: 0x029a
+packetLen(0x029a, 37) // ZC_ITEM_PICKUP_ACK2
+
+// Packet: 0x029b
+packetLen(0x029b, 80) // ZC_MER_INIT
+
+// Packet: 0x029c
+packetLen(0x029c, 66) // ZC_MER_PROPERTY
+
+// Packet: 0x029d
+packetLen(0x029d, -1) // ZC_MER_SKILLINFO_LIST
+
+// Packet: 0x029e
+packetLen(0x029e, 11) // ZC_MER_SKILLINFO_UPDATE
+
+// Packet: 0x029f
+packetLen(0x029f, 3) // CZ_MER_COMMAND
+
+// Packet: 0x02a2
+packetLen(0x02a2, 8) // ZC_MER_PAR_CHANGE
+
+// Packet: 0x02a5
+packetLen(0x02a5, 8) // CZ_KSY_EVENT
+
+// Packet: 0x02a6
+packetLen(0x02a6, -1) // ZC_HACKSH_CPX_MSG
+
+// Packet: 0x02a7
+packetLen(0x02a7, -1) // CZ_HACKSH_CPX_MSG
+
+// Packet: 0x02aa
+packetLen(0x02aa, 4) // ZC_REQ_CASH_PASSWORD
+
+// Packet: 0x02ab
+packetLen(0x02ab, 36) // CZ_ACK_CASH_PASSWORD
+
+// Packet: 0x02ac
+packetLen(0x02ac, 6) // ZC_RESULT_CASH_PASSWORD
+
+// Packet: 0x02ad
+packetLen(0x02ad, 8) // AC_REQUEST_SECOND_PASSWORD
+
+// Packet: 0x02b0
+packetLen(0x02b0, 85) // CA_LOGIN_HAN
+
+// Packet: 0x02b1
+packetLen(0x02b1, -1) // ZC_ALL_QUEST_LIST
+
+// Packet: 0x02b2
+packetLen(0x02b2, -1) // ZC_ALL_QUEST_MISSION
+
+// Packet: 0x02b3
+packetLen(0x02b3, 107) // ZC_ADD_QUEST
+
+// Packet: 0x02b4
+packetLen(0x02b4, 6) // ZC_DEL_QUEST
+
+// Packet: 0x02b5
+packetLen(0x02b5, -1) // ZC_UPDATE_MISSION_HUNT
+
+// Packet: 0x02b6
+packetLen(0x02b6, 7) // CZ_ACTIVE_QUEST
+
+// Packet: 0x02b7
+packetLen(0x02b7, 7) // ZC_ACTIVE_QUEST
+
+// Packet: 0x02b8
+packetLen(0x02b8, 32) // ZC_ITEM_PICKUP_PARTY
+
+// Packet: 0x02b9
+packetLen(0x02b9, 191) // ZC_SHORTCUT_KEY_LIST
+
+// Packet: 0x02ba
+packetLen(0x02ba, 11) // CZ_SHORTCUT_KEY_CHANGE
+
+// Packet: 0x02bb
+packetLen(0x02bb, 8) // ZC_EQUIPITEM_DAMAGED
+
+// Packet: 0x02bc
+packetLen(0x02bc, 6) // ZC_NOTIFY_PCBANG_PLAYING_TIME
+
+// Packet: 0x02c1
+packetLen(0x02c1, -1) // ZC_NPC_CHAT
+
+// Packet: 0x02c2
+packetLen(0x02c2, -1) // ZC_FORMATSTRING_MSG
+
+// Packet: 0x02c4
+packetLen(0x02c4, 26) // CZ_PARTY_JOIN_REQ
+
+// Packet: 0x02c5
+packetLen(0x02c5, 30) // ZC_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c6
+packetLen(0x02c6, 30) // ZC_PARTY_JOIN_REQ
+
+// Packet: 0x02c7
+packetLen(0x02c7, 7) // CZ_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c8
+packetLen(0x02c8, 3) // CZ_PARTY_CONFIG
+
+// Packet: 0x02c9
+packetLen(0x02c9, 3) // ZC_PARTY_CONFIG
+
+// Packet: 0x02ca
+packetLen(0x02ca, 3) // HC_REFUSE_SELECTCHAR
+
+// Packet: 0x02cb
+packetLen(0x02cb, 65) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_INFO
+
+// Packet: 0x02cc
+packetLen(0x02cc, 4) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_NOTIFY
+
+// Packet: 0x02cd
+packetLen(0x02cd, 71) // ZC_MEMORIALDUNGEON_INFO
+
+// Packet: 0x02ce
+packetLen(0x02ce, 10) // ZC_MEMORIALDUNGEON_NOTIFY
+
+// Packet: 0x02cf
+packetLen(0x02cf, 6) // CZ_MEMORIALDUNGEON_COMMAND
+
+// Packet: 0x02d0
+packetLen(0x02d0, -1) // ZC_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d1
+packetLen(0x02d1, -1) // ZC_STORE_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d2
+packetLen(0x02d2, -1) // ZC_CART_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d3
+packetLen(0x02d3, 4) // ZC_NOTIFY_BIND_ON_EQUIP
+
+// Packet: 0x02d4
+packetLen(0x02d4, 39) // ZC_ITEM_PICKUP_ACK3
+
+// Packet: 0x02d5
+packetLen(0x02d5, 2) // ZC_ISVR_DISCONNECT
+
+// Packet: 0x02d6
+packetLen(0x02d6, 6) // CZ_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d7
+packetLen(0x02d7, -1) // ZC_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d8
+packetLen(0x02d8, 10) // CZ_CONFIG
+
+// Packet: 0x02d9
+packetLen(0x02d9, 10) // ZC_CONFIG
+
+// Packet: 0x02da
+packetLen(0x02da, 3) // ZC_CONFIG_NOTIFY
+
+// Packet: 0x02db
+packetLen(0x02db, -1) // CZ_BATTLEFIELD_CHAT
+
+// Packet: 0x02dc
+packetLen(0x02dc, -1) // ZC_BATTLEFIELD_CHAT
+
+// Packet: 0x02dd
+packetLen(0x02dd, 32) // ZC_BATTLEFIELD_NOTIFY_CAMPINFO
+
+// Packet: 0x02de
+packetLen(0x02de, 6) // ZC_BATTLEFIELD_NOTIFY_POINT
+
+// Packet: 0x02df
+packetLen(0x02df, 36) // ZC_BATTLEFIELD_NOTIFY_POSITION
+
+// Packet: 0x02e0
+packetLen(0x02e0, 34) // ZC_BATTLEFIELD_NOTIFY_HP
+
+// Packet: 0x02e1
+packetLen(0x02e1, 33) // ZC_NOTIFY_ACT2
+
+// Packet: 0x02e2
+packetLen(0x02e2, 20) // CZ_USE_ITEM_NEW_JAPEN
+
+// Packet: 0x02e3
+packetLen(0x02e3, 22) // CZ_USE_SKILL_NEW_JAPEN
+
+// Packet: 0x02e4
+packetLen(0x02e4, 11) // CZ_ITEM_PICKUP_NEW_JAPEN
+
+// Packet: 0x02e5
+packetLen(0x02e5, 9) // CZ_REQUEST_MOVE_NEW_JAPEN
+
+// Packet: 0x02e6
+packetLen(0x02e6, 6) // CZ_BOT_CHECK
+
+// Packet: 0x02e7
+packetLen(0x02e7, -1) // ZC_MAPPROPERTY
+
+// Packet: 0x02e8
+packetLen(0x02e8, -1) // ZC_NORMAL_ITEMLIST3
+
+// Packet: 0x02e9
+packetLen(0x02e9, -1) // ZC_CART_NORMAL_ITEMLIST3
+
+// Packet: 0x02ea
+packetLen(0x02ea, -1) // ZC_STORE_NORMAL_ITEMLIST3
+
+// Packet: 0x02eb
+packetLen(0x02eb, 13) // ZC_ACCEPT_ENTER2
+
+// Packet: 0x02ec
+packetLen(0x02ec, 71) // ZC_NOTIFY_MOVEENTRY4
+
+// Packet: 0x02ed
+packetLen(0x02ed, 63) // ZC_NOTIFY_NEWENTRY4
+
+// Packet: 0x02ee
+packetLen(0x02ee, 64) // ZC_NOTIFY_STANDENTRY4
+
+// Packet: 0x02ef
+packetLen(0x02ef, 8) // ZC_NOTIFY_FONT
+
+// Packet: 0x02f0
+packetLen(0x02f0, 10) // ZC_PROGRESS
+
+// Packet: 0x02f1
+packetLen(0x02f1, 2) // CZ_PROGRESS
+
+// Packet: 0x02f2
+packetLen(0x02f2, 2) // ZC_PROGRESS_CANCEL
+
+// Packet: 0x02f3
+packetLen(0x02f3, -1) // CZ_IRMAIL_SEND
+
+// Packet: 0x02f4
+packetLen(0x02f4, 3) // ZC_IRMAIL_SEND_RES
+
+// Packet: 0x02f5
+packetLen(0x02f5, 7) // ZC_IRMAIL_NOTIFY
+
+// Packet: 0x02f6
+packetLen(0x02f6, 7) // CZ_IRMAIL_LIST
+
+// Packet: 0x035c
+packetLen(0x035c, 2) // CZ_OPEN_SIMPLE_CASHSHOP_ITEMLIST
+
+// Packet: 0x035d
+packetLen(0x035d, -1) // ZC_SIMPLE_CASHSHOP_POINT_ITEMLIST
+
+// Packet: 0x035e
+packetLen(0x035e, 2) // CZ_CLOSE_WINDOW
+
+// Packet: 0x035f
+packetLen(0x035f, 5) // CZ_REQUEST_MOVE2
+
+// Packet: 0x0360
+packetLen(0x0360, 6) // CZ_REQUEST_TIME2
+
+// Packet: 0x0361
+packetLen(0x0361, 5) // CZ_CHANGE_DIRECTION2
+
+// Packet: 0x0362
+packetLen(0x0362, 6) // CZ_ITEM_PICKUP2
+
+// Packet: 0x0363
+packetLen(0x0363, 6) // CZ_ITEM_THROW2
+
+// Packet: 0x0364
+packetLen(0x0364, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_STORE2
+
+// Packet: 0x0365
+packetLen(0x0365, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY2
+
+// Packet: 0x0366
+packetLen(0x0366, 10) // CZ_USE_SKILL_TOGROUND2
+
+// Packet: 0x0367
+packetLen(0x0367, 90) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2
+
+// Packet: 0x0368
+packetLen(0x0368, 6) // CZ_REQNAME2
+
+// Packet: 0x0369
+packetLen(0x0369, 6) // CZ_REQNAME_BYGID2
+
+// Packet: 0x03dd
+packetLen(0x03dd, 18) // AHC_GAME_GUARD
+
+// Packet: 0x03de
+packetLen(0x03de, 18) // CAH_ACK_GAME_GUARD
+
+// Packet: 0x0436
+packetLen(0x0436, 19) // CZ_ENTER2
+
+// Packet: 0x0437
+packetLen(0x0437, 7) // CZ_REQUEST_ACT2
+
+// Packet: 0x0438
+packetLen(0x0438, 10) // CZ_USE_SKILL2
+
+// Packet: 0x0439
+packetLen(0x0439, 8) // CZ_USE_ITEM2
+
+// Packet: 0x043d
+packetLen(0x043d, 8) // ZC_SKILL_POSTDELAY
+
+// Packet: 0x043e
+packetLen(0x043e, -1) // ZC_SKILL_POSTDELAY_LIST
+
+// Packet: 0x043f
+packetLen(0x043f, 25) // ZC_MSG_STATE_CHANGE2
+
+// Packet: 0x0440
+packetLen(0x0440, 10) // ZC_MILLENNIUMSHIELD
+
+// Packet: 0x0441
+packetLen(0x0441, 4) // ZC_SKILLINFO_DELETE
+
+// Packet: 0x0442
+packetLen(0x0442, -1) // ZC_SKILL_SELECT_REQUEST
+
+// Packet: 0x0443
+packetLen(0x0443, 8) // CZ_SKILL_SELECT_RESPONSE
+
+// Packet: 0x0444
+packetLen(0x0444, -1) // ZC_SIMPLE_CASH_POINT_ITEMLIST
+
+// Packet: 0x0445
+packetLen(0x0445, 12) // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0446
+packetLen(0x0446, 14) // ZC_QUEST_NOTIFY_EFFECT
+
+// Packet: 0x0447
+packetLen(0x0447, 2) // CZ_BLOCKING_PLAY_CANCEL
+
+// Packet: 0x0448
+packetLen(0x0448, -1) // HC_CHARACTER_LIST
+
+// Packet: 0x0449
+packetLen(0x0449, 4) // ZC_HACKSH_ERROR_MSG
+
+// Packet: 0x044a
+packetLen(0x044a, 6) // CZ_CLIENT_VERSION
+
+// Packet: 0x044b
+packetLen(0x044b, 2) // CZ_CLOSE_SIMPLECASH_SHOP
+
+// Packet: 0x07d7
+packetLen(0x07d7, 8) // CZ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d8
+packetLen(0x07d8, 8) // ZC_REQ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d9
+packetLen(0x07d9, 268) // ZC_SHORTCUT_KEY_LIST_V2
+
+// Packet: 0x07da
+packetLen(0x07da, 6) // CZ_CHANGE_GROUP_MASTER
+
+// Packet: 0x07db
+packetLen(0x07db, 8) // ZC_HO_PAR_CHANGE
+
+// Packet: 0x07dc
+packetLen(0x07dc, 6) // CZ_SEEK_PARTY
+
+// Packet: 0x07dd
+packetLen(0x07dd, 54) // ZC_SEEK_PARTY
+
+// Packet: 0x07de
+packetLen(0x07de, 30) // CZ_SEEK_PARTY_MEMBER
+
+// Packet: 0x07df
+packetLen(0x07df, 54) // ZC_SEEK_PARTY_MEMBER
+
+// Packet: 0x07e0
+packetLen(0x07e0, 58) // ZC_ES_NOTI_MYINFO
+
+// Packet: 0x07e1
+packetLen(0x07e1, 15) // ZC_SKILLINFO_UPDATE2
+
+// Packet: 0x07e2
+packetLen(0x07e2, 8) // ZC_MSG_VALUE
+
+// Packet: 0x07e3
+packetLen(0x07e3, 6) // ZC_ITEMLISTWIN_OPEN
+
+// Packet: 0x07e4
+packetLen(0x07e4, -1) // CZ_ITEMLISTWIN_RES
+
+// Packet: 0x07e5
+packetLen(0x07e5, 4) // CH_ENTER_CHECKBOT
+
+// Packet: 0x07e6
+packetLen(0x07e6, 8) // ZC_MSG_SKILL
+
+// Packet: 0x07e7
+packetLen(0x07e7, 32) // CH_CHECKBOT
+
+// Packet: 0x07e8
+packetLen(0x07e8, -1) // HC_CHECKBOT
+
+// Packet: 0x07e9
+packetLen(0x07e9, 5) // HC_CHECKBOT_RESULT
+
+// Packet: 0x07ea
+packetLen(0x07ea, 2) // CZ_BATTLE_FIELD_LIST
+
+// Packet: 0x07eb
+packetLen(0x07eb, -1) // ZC_BATTLE_FIELD_LIST
+
+// Packet: 0x07ec
+packetLen(0x07ec, 8) // CZ_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ed
+packetLen(0x07ed, 10) // ZC_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ee
+packetLen(0x07ee, 6) // CZ_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07ef
+packetLen(0x07ef, 8) // ZC_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07f0
+packetLen(0x07f0, 6) // CZ_REQ_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f1
+packetLen(0x07f1, 18) // ZC_ACK_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f2
+packetLen(0x07f2, 8) // ZC_BATTLE_NOTI_START_STEP
+
+// Packet: 0x07f3
+packetLen(0x07f3, 6) // ZC_BATTLE_JOIN_NOTI_DEFER
+
+// Packet: 0x07f4
+packetLen(0x07f4, 3) // ZC_BATTLE_JOIN_DISABLE_STATE
+
+// Packet: 0x07f5
+packetLen(0x07f5, 6) // CZ_GM_FULLSTRIP
+
+// Packet: 0x07f6
+packetLen(0x07f6, 14) // ZC_NOTIFY_EXP
+
+// Packet: 0x07f7
+packetLen(0x07f7, -1) // ZC_NOTIFY_MOVEENTRY7
+
+// Packet: 0x07f8
+packetLen(0x07f8, -1) // ZC_NOTIFY_NEWENTRY5
+
+// Packet: 0x07f9
+packetLen(0x07f9, -1) // ZC_NOTIFY_STANDENTRY5
+
+// Packet: 0x07fa
+packetLen(0x07fa, 8) // ZC_DELETE_ITEM_FROM_BODY
+
+// Packet: 0x07fb
+packetLen(0x07fb, 25) // ZC_USESKILL_ACK2
+
+// Packet: 0x07fc
+packetLen(0x07fc, 10) // ZC_CHANGE_GROUP_MASTER
+
+// Packet: 0x07fd
+packetLen(0x07fd, -1) // ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN
+
+// Packet: 0x07fe
+packetLen(0x07fe, 26) // ZC_PLAY_NPC_BGM
+
+// Packet: 0x0800
+packetLen(0x0800, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0801
+packetLen(0x0801, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0802
+packetLen(0x0802, 18) // CZ_PARTY_BOOKING_REQ_REGISTER
+
+// Packet: 0x0803
+packetLen(0x0803, 4) // ZC_PARTY_BOOKING_ACK_REGISTER
+
+// Packet: 0x0804
+packetLen(0x0804, 14) // CZ_PARTY_BOOKING_REQ_SEARCH
+
+// Packet: 0x0805
+packetLen(0x0805, -1) // ZC_PARTY_BOOKING_ACK_SEARCH
+
+// Packet: 0x0806
+packetLen(0x0806, 2) // CZ_PARTY_BOOKING_REQ_DELETE
+
+// Packet: 0x0807
+packetLen(0x0807, 4) // ZC_PARTY_BOOKING_ACK_DELETE
+
+// Packet: 0x0808
+packetLen(0x0808, 14) // CZ_PARTY_BOOKING_REQ_UPDATE
+
+// Packet: 0x0809
+packetLen(0x0809, 50) // ZC_PARTY_BOOKING_NOTIFY_INSERT
+
+// Packet: 0x080a
+packetLen(0x080a, 18) // ZC_PARTY_BOOKING_NOTIFY_UPDATE
+
+// Packet: 0x080b
+packetLen(0x080b, 6) // ZC_PARTY_BOOKING_NOTIFY_DELETE
+
+// Packet: 0x080c
+packetLen(0x080c, 2) // CZ_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080d
+packetLen(0x080d, 3) // ZC_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080e
+packetLen(0x080e, 14) // ZC_NOTIFY_HP_TO_GROUPM_R2
+
+// Packet: 0x080f
+packetLen(0x080f, 30) // ZC_ADD_EXCHANGE_ITEM2
+
+// Packet: 0x0810
+packetLen(0x0810, 3) // ZC_OPEN_BUYING_STORE
+
+// Packet: 0x0811
+packetLen(0x0811, -1) // CZ_REQ_OPEN_BUYING_STORE
+
+// Packet: 0x0812
+packetLen(0x0812, 8) // ZC_FAILED_OPEN_BUYING_STORE_TO_BUYER
+
+// Packet: 0x0813
+packetLen(0x0813, -1) // ZC_MYITEMLIST_BUYING_STORE
+
+// Packet: 0x0814
+packetLen(0x0814, 86) // ZC_BUYING_STORE_ENTRY
+
+// Packet: 0x0815
+packetLen(0x0815, 2) // CZ_REQ_CLOSE_BUYING_STORE
+
+// Packet: 0x0816
+packetLen(0x0816, 6) // ZC_DISAPPEAR_BUYING_STORE_ENTRY
+
+// Packet: 0x0817
+packetLen(0x0817, 6) // CZ_REQ_CLICK_TO_BUYING_STORE
+
+// Packet: 0x0818
+packetLen(0x0818, -1) // ZC_ACK_ITEMLIST_BUYING_STORE
+
+// Packet: 0x0819
+packetLen(0x0819, -1) // CZ_REQ_TRADE_BUYING_STORE
+
+// Packet: 0x081a
+packetLen(0x081a, 4) // ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER
+
+// Packet: 0x081b
+packetLen(0x081b, 12) // ZC_UPDATE_ITEM_FROM_BUYING_STORE
+
+// Packet: 0x081c
+packetLen(0x081c, 10) // ZC_ITEM_DELETE_BUYING_STORE
+
+// Packet: 0x081d
+packetLen(0x081d, 22) // ZC_EL_INIT
+
+// Packet: 0x081e
+packetLen(0x081e, 8) // ZC_EL_PAR_CHANGE
+
+// Packet: 0x081f
+packetLen(0x081f, -1) // ZC_BROADCAST4
+
+// Packet: 0x0820
+packetLen(0x0820, 11) // ZC_COSTUME_SPRITE_CHANGE
+
+// Packet: 0x0821
+packetLen(0x0821, 2) // AC_OTP_USER
+
+// Packet: 0x0822
+packetLen(0x0822, 9) // CA_OTP_AUTH_REQ
+
+// Packet: 0x0823
+packetLen(0x0823, -1) // AC_OTP_AUTH_ACK
+
+// Packet: 0x0824
+packetLen(0x0824, 8) // ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER
+
+// Packet: 0x0825
+packetLen(0x0825, -1) // CA_SSO_LOGIN_REQ
+
+// Packet: 0x0827
+packetLen(0x0827, 6) // CH_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0828
+packetLen(0x0828, 14) // HC_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0829
+packetLen(0x0829, 12) // CH_DELETE_CHAR3
+
+// Packet: 0x082a
+packetLen(0x082a, 10) // HC_DELETE_CHAR3
+
+// Packet: 0x082b
+packetLen(0x082b, 6) // CH_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082c
+packetLen(0x082c, 10) // HC_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082d
+packetLen(0x082d, -1) // HC_ACCEPT_ENTER2
+
+// Packet: 0x0835
+packetLen(0x0835, -1) // CZ_SEARCH_STORE_INFO
+
+// Packet: 0x0836
+packetLen(0x0836, -1) // ZC_SEARCH_STORE_INFO_ACK
+
+// Packet: 0x0837
+packetLen(0x0837, 3) // ZC_SEARCH_STORE_INFO_FAILED
+
+// Packet: 0x0838
+packetLen(0x0838, 2) // CZ_SEARCH_STORE_INFO_NEXT_PAGE
+
+// Packet: 0x0839
+packetLen(0x0839, 66) // ZC_ACK_BAN_GUILD_SSO
+
+// Packet: 0x083a
+packetLen(0x083a, 5) // ZC_OPEN_SEARCH_STORE_INFO
+
+// Packet: 0x083b
+packetLen(0x083b, 2) // CZ_CLOSE_SEARCH_STORE_INFO
+
+// Packet: 0x083c
+packetLen(0x083c, 14) // CZ_SSILIST_ITEM_CLICK
+
+// Packet: 0x083d
+packetLen(0x083d, 6) // ZC_SSILIST_ITEM_CLICK_ACK
+
+// Packet: 0x083e
+packetLen(0x083e, 26) // AC_REFUSE_LOGIN2
+
+// Packet: 0x0840
+packetLen(0x0840, -1) // HC_NOTIFY_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0841
+packetLen(0x0841, 4) // CH_SELECT_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0842
+packetLen(0x0842, 6) // CZ_RECALL_SSO
+
+// Packet: 0x0843
+packetLen(0x0843, 6) // CZ_REMOVE_AID_SSO
+
+// Packet: 0x0844
+packetLen(0x0844, 2) // CZ_SE_CASHSHOP_OPEN
+
+// Packet: 0x0845
+packetLen(0x0845, 10) // ZC_SE_CASHSHOP_OPEN
+
+// Packet: 0x0846
+packetLen(0x0846, 4) // CZ_REQ_SE_CASH_TAB_CODE
+
+// Packet: 0x0847
+packetLen(0x0847, -1) // ZC_ACK_SE_CASH_ITEM_LIST
+
+// Packet: 0x0848
+packetLen(0x0848, -1) // CZ_SE_PC_BUY_CASHITEM_LIST
+
+// Packet: 0x0849
+packetLen(0x0849, 16) // ZC_SE_PC_BUY_CASHITEM_RESULT
+
+// Packet: 0x084a
+packetLen(0x084a, 2) // CZ_SE_CASHSHOP_CLOSE
+
+// Packet: 0x084b
+packetLen(0x084b, 21) // ZC_ITEM_FALL_ENTRY4
+
+// Packet: 0x084c
+packetLen(0x084c, 10) // CZ_MACRO_USE_SKILL
+
+// Packet: 0x084d
+packetLen(0x084d, 10) // CZ_MACRO_USE_SKILL_TOGROUND
+
+// Packet: 0x084e
+packetLen(0x084e, 5) // CZ_MACRO_REQUEST_MOVE
+
+// Packet: 0x084f
+packetLen(0x084f, 6) // CZ_MACRO_ITEM_PICKUP
+
+// Packet: 0x0850
+packetLen(0x0850, 7) // CZ_MACRO_REQUEST_ACT
+
+// Packet: 0x0851
+packetLen(0x0851, -1) // ZC_GPK_DYNCODE
+
+// Packet: 0x0852
+packetLen(0x0852, 2) // CZ_GPK_DYNCODE_RELOAD
+
+// Packet: 0x0853
+packetLen(0x0853, -1) // ZC_GPK_AUTH
+
+// Packet: 0x0854
+packetLen(0x0854, -1) // CZ_GPK_AUTH
+
+// Packet: 0x0855
+packetLen(0x0855, 6) // ZC_MACRO_ITEMPICKUP_FAIL
+
+// Packet: 0x0856
+packetLen(0x0856, -1) // ZC_NOTIFY_MOVEENTRY8
+
+// Packet: 0x0857
+packetLen(0x0857, -1) // ZC_NOTIFY_STANDENTRY7
+
+// Packet: 0x0858
+packetLen(0x0858, -1) // ZC_NOTIFY_NEWENTRY6
+
+// Packet: 0x0859
+packetLen(0x0859, -1) // ZC_EQUIPWIN_MICROSCOPE2
+
+// Packet: 0x085a
+packetLen(0x085a, 2) // ZC_REASSEMBLY_AUTH01
+
+// Packet: 0x085b
+packetLen(0x085b, 2) // ZC_REASSEMBLY_AUTH02
+
+// Packet: 0x085c
+packetLen(0x085c, 2) // ZC_REASSEMBLY_AUTH03
+
+// Packet: 0x085d
+packetLen(0x085d, 2) // ZC_REASSEMBLY_AUTH04
+
+// Packet: 0x085e
+packetLen(0x085e, 2) // ZC_REASSEMBLY_AUTH05
+
+// Packet: 0x085f
+packetLen(0x085f, 2) // ZC_REASSEMBLY_AUTH06
+
+// Packet: 0x0860
+packetLen(0x0860, 2) // ZC_REASSEMBLY_AUTH07
+
+// Packet: 0x0861
+packetLen(0x0861, 2) // ZC_REASSEMBLY_AUTH08
+
+// Packet: 0x0862
+packetLen(0x0862, 2) // ZC_REASSEMBLY_AUTH09
+
+// Packet: 0x0863
+packetLen(0x0863, 2) // ZC_REASSEMBLY_AUTH10
+
+// Packet: 0x0864
+packetLen(0x0864, 2) // ZC_REASSEMBLY_AUTH11
+
+// Packet: 0x0865
+packetLen(0x0865, 2) // ZC_REASSEMBLY_AUTH12
+
+// Packet: 0x0866
+packetLen(0x0866, 2) // ZC_REASSEMBLY_AUTH13
+
+// Packet: 0x0867
+packetLen(0x0867, 2) // ZC_REASSEMBLY_AUTH14
+
+// Packet: 0x0868
+packetLen(0x0868, 2) // ZC_REASSEMBLY_AUTH15
+
+// Packet: 0x0869
+packetLen(0x0869, 2) // ZC_REASSEMBLY_AUTH16
+
+// Packet: 0x086a
+packetLen(0x086a, 2) // ZC_REASSEMBLY_AUTH17
+
+// Packet: 0x086b
+packetLen(0x086b, 2) // ZC_REASSEMBLY_AUTH18
+
+// Packet: 0x086c
+packetLen(0x086c, 2) // ZC_REASSEMBLY_AUTH19
+
+// Packet: 0x086d
+packetLen(0x086d, 2) // ZC_REASSEMBLY_AUTH20
+
+// Packet: 0x086e
+packetLen(0x086e, 2) // ZC_REASSEMBLY_AUTH21
+
+// Packet: 0x086f
+packetLen(0x086f, 2) // ZC_REASSEMBLY_AUTH22
+
+// Packet: 0x0870
+packetLen(0x0870, 2) // ZC_REASSEMBLY_AUTH23
+
+// Packet: 0x0871
+packetLen(0x0871, 2) // ZC_REASSEMBLY_AUTH24
+
+// Packet: 0x0872
+packetLen(0x0872, 2)
+
+// Packet: 0x0873
+packetLen(0x0873, 2) // ZC_REASSEMBLY_AUTH26
+
+// Packet: 0x0874
+packetLen(0x0874, 2) // ZC_REASSEMBLY_AUTH27
+
+// Packet: 0x0875
+packetLen(0x0875, 2) // ZC_REASSEMBLY_AUTH28
+
+// Packet: 0x0876
+packetLen(0x0876, 2) // ZC_REASSEMBLY_AUTH29
+
+// Packet: 0x0877
+packetLen(0x0877, 2) // ZC_REASSEMBLY_AUTH30
+
+// Packet: 0x0878
+packetLen(0x0878, 2) // ZC_REASSEMBLY_AUTH31
+
+// Packet: 0x0879
+packetLen(0x0879, 2) // ZC_REASSEMBLY_AUTH32
+
+// Packet: 0x087a
+packetLen(0x087a, 2) // ZC_REASSEMBLY_AUTH33
+
+// Packet: 0x087b
+packetLen(0x087b, 2) // ZC_REASSEMBLY_AUTH34
+
+// Packet: 0x087c
+packetLen(0x087c, 2) // ZC_REASSEMBLY_AUTH35
+
+// Packet: 0x087d
+packetLen(0x087d, 2) // ZC_REASSEMBLY_AUTH36
+
+// Packet: 0x087e
+packetLen(0x087e, 2) // ZC_REASSEMBLY_AUTH37
+
+// Packet: 0x087f
+packetLen(0x087f, 2) // ZC_REASSEMBLY_AUTH38
+
+// Packet: 0x0880
+packetLen(0x0880, 2) // ZC_REASSEMBLY_AUTH39
+
+// Packet: 0x0881
+packetLen(0x0881, 2) // ZC_REASSEMBLY_AUTH40
+
+// Packet: 0x0882
+packetLen(0x0882, 2) // ZC_REASSEMBLY_AUTH41
+
+// Packet: 0x0883
+packetLen(0x0883, 2) // ZC_REASSEMBLY_AUTH42
+
+// Packet: 0x0884
+packetLen(0x0884, 2) // CZ_REASSEMBLY_AUTH01
+
+// Packet: 0x0885
+packetLen(0x0885, 2) // CZ_REASSEMBLY_AUTH02
+
+// Packet: 0x0886
+packetLen(0x0886, 2) // CZ_REASSEMBLY_AUTH03
+
+// Packet: 0x0887
+packetLen(0x0887, 2) // CZ_REASSEMBLY_AUTH04
+
+// Packet: 0x0888
+packetLen(0x0888, 2) // CZ_REASSEMBLY_AUTH05
+
+// Packet: 0x0889
+packetLen(0x0889, 2) // CZ_REASSEMBLY_AUTH06
+
+// Packet: 0x088a
+packetLen(0x088a, 2) // CZ_REASSEMBLY_AUTH07
+
+// Packet: 0x088b
+packetLen(0x088b, 2) // CZ_REASSEMBLY_AUTH08
+
+// Packet: 0x088c
+packetLen(0x088c, 2) // CZ_REASSEMBLY_AUTH09
+
+// Packet: 0x088d
+packetLen(0x088d, 2) // CZ_REASSEMBLY_AUTH10
+
+// Packet: 0x088e
+packetLen(0x088e, 2) // CZ_REASSEMBLY_AUTH11
+
+// Packet: 0x088f
+packetLen(0x088f, 2) // CZ_REASSEMBLY_AUTH12
+
+// Packet: 0x0890
+packetLen(0x0890, 2) // CZ_REASSEMBLY_AUTH13
+
+// Packet: 0x0891
+packetLen(0x0891, 2) // CZ_REASSEMBLY_AUTH14
+
+// Packet: 0x0892
+packetLen(0x0892, 2) // CZ_REASSEMBLY_AUTH15
+
+// Packet: 0x0893
+packetLen(0x0893, 2) // CZ_REASSEMBLY_AUTH16
+
+// Packet: 0x0894
+packetLen(0x0894, 2) // CZ_REASSEMBLY_AUTH17
+
+// Packet: 0x0895
+packetLen(0x0895, 2) // CZ_REASSEMBLY_AUTH18
+
+// Packet: 0x0896
+packetLen(0x0896, 2) // CZ_REASSEMBLY_AUTH19
+
+// Packet: 0x0897
+packetLen(0x0897, 2) // CZ_REASSEMBLY_AUTH20
+
+// Packet: 0x0898
+packetLen(0x0898, 2) // CZ_REASSEMBLY_AUTH21
+
+// Packet: 0x0899
+packetLen(0x0899, 2) // CZ_REASSEMBLY_AUTH22
+
+// Packet: 0x089a
+packetLen(0x089a, 2) // CZ_REASSEMBLY_AUTH23
+
+// Packet: 0x089b
+packetLen(0x089b, 2) // CZ_REASSEMBLY_AUTH24
+
+// Packet: 0x089c
+packetLen(0x089c, 2) // CZ_REASSEMBLY_AUTH25
+
+// Packet: 0x089d
+packetLen(0x089d, 2) // CZ_REASSEMBLY_AUTH26
+
+// Packet: 0x089e
+packetLen(0x089e, 2) // CZ_REASSEMBLY_AUTH27
+
+// Packet: 0x089f
+packetLen(0x089f, 2) // CZ_REASSEMBLY_AUTH28
+
+// Packet: 0x08a0
+packetLen(0x08a0, 2) // CZ_REASSEMBLY_AUTH29
+
+// Packet: 0x08a1
+packetLen(0x08a1, 2) // CZ_REASSEMBLY_AUTH30
+
+// Packet: 0x08a2
+packetLen(0x08a2, 2) // CZ_REASSEMBLY_AUTH31
+
+// Packet: 0x08a3
+packetLen(0x08a3, 2) // CZ_REASSEMBLY_AUTH32
+
+// Packet: 0x08a4
+packetLen(0x08a4, 2) // CZ_REASSEMBLY_AUTH33
+
+// Packet: 0x08a5
+packetLen(0x08a5, 2) // CZ_REASSEMBLY_AUTH34
+
+// Packet: 0x08a6
+packetLen(0x08a6, 2) // CZ_REASSEMBLY_AUTH35
+
+// Packet: 0x08a7
+packetLen(0x08a7, 2) // CZ_REASSEMBLY_AUTH36
+
+// Packet: 0x08a8
+packetLen(0x08a8, 2) // CZ_REASSEMBLY_AUTH37
+
+// Packet: 0x08a9
+packetLen(0x08a9, 2) // CZ_REASSEMBLY_AUTH38
+
+// Packet: 0x08aa
+packetLen(0x08aa, 2) // CZ_REASSEMBLY_AUTH39
+
+// Packet: 0x08ab
+packetLen(0x08ab, 2) // CZ_REASSEMBLY_AUTH40
+
+// Packet: 0x08ac
+packetLen(0x08ac, 2) // CZ_REASSEMBLY_AUTH41
+
+// Packet: 0x08ad
+packetLen(0x08ad, 2) // CZ_REASSEMBLY_AUTH42
+
+// Packet: 0x08af
+packetLen(0x08af, 10) // HC_WAITING_LOGIN
+
+// Packet: 0x08b0
+packetLen(0x08b0, 17) // CH_WAITING_LOGIN
+
+// Packet: 0x08b1
+packetLen(0x08b1, -1) // ZC_MCSTORE_NOTMOVEITEM_LIST
+
+// Packet: 0x08b2
+packetLen(0x08b2, -1) // AC_REALNAME_AUTH
+
+// Packet: 0x08b3
+packetLen(0x08b3, -1) // ZC_SHOWSCRIPT
+
+// Packet: 0x08b4
+packetLen(0x08b4, 2) // ZC_START_COLLECTION
+
+// Packet: 0x08b5
+packetLen(0x08b5, 6) // CZ_TRYCOLLECTION
+
+// Packet: 0x08b6
+packetLen(0x08b6, 3) // ZC_TRYCOLLECTION
+
+// Packet: 0x08b8
+packetLen(0x08b8, 10) // CH_SECOND_PASSWD_ACK
+
+// Packet: 0x08b9
+packetLen(0x08b9, 12) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x08ba
+packetLen(0x08ba, 10) // CH_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bb
+packetLen(0x08bb, 8) // HC_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bc
+packetLen(0x08bc, 10) // CH_DELETE_SECOND_PASSWD
+
+// Packet: 0x08bd
+packetLen(0x08bd, 8) // HC_DELETE_SECOND_PASSWD
+
+// Packet: 0x08be
+packetLen(0x08be, 14) // CH_EDIT_SECOND_PASSWD
+
+// Packet: 0x08bf
+packetLen(0x08bf, 8) // HC_EDIT_SECOND_PASSWD
+
+// Packet: 0x08c0
+packetLen(0x08c0, -1) // ZC_ACK_SE_CASH_ITEM_LIST2
+
+// Packet: 0x08c1
+packetLen(0x08c1, 2) // CZ_MACRO_START
+
+// Packet: 0x08c2
+packetLen(0x08c2, 2) // CZ_MACRO_STOP
+
+// Packet: 0x08c3
+packetLen(0x08c3, 10) // CH_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c4
+packetLen(0x08c4, 8) // HC_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c5
+packetLen(0x08c5, 6) // CH_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c6
+packetLen(0x08c6, 4) // HC_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c7
+packetLen(0x08c7, -1) // ZC_SKILL_ENTRY3
+
+// Packet: 0x08c8
+packetLen(0x08c8, 34) // ZC_NOTIFY_ACT3
+
+// Packet: 0x08c9
+packetLen(0x08c9, 2) // CZ_REQ_SCHEDULER_CASHITEM
+
+// Packet: 0x08ca
+packetLen(0x08ca, -1) // ZC_ACK_SCHEDULER_CASHITEM
+
+// Packet: 0x08cb
+packetLen(0x08cb, -1) // ZC_PERSONAL_INFOMATION
+
+// Packet: 0x08cc
+packetLen(0x08cc, 109) // CA_LOGIN5
+
+// Packet: 0x08cd
+packetLen(0x08cd, 10) // ZC_STOPMOVE_FORCE
+
+// Packet: 0x08ce
+packetLen(0x08ce, 2) // ZC_FAILED_GET_ITEM_FROM_ZONEDA
+
+// Packet: 0x08cf
+packetLen(0x08cf, 10) // ZC_SPIRITS_ATTRIBUTE
+
+// Packet: 0x08d0
+packetLen(0x08d0, 9) // ZC_REQ_WEAR_EQUIP_ACK2
+
+// Packet: 0x08d1
+packetLen(0x08d1, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK2
+
+// Packet: 0x08d2
+packetLen(0x08d2, 10) // ZC_FASTMOVE
+
+// Packet: 0x08d3
+packetLen(0x08d3, 10) // ZC_SE_CASHSHOP_UPDATE
+
+// Packet: 0x08d4
+packetLen(0x08d4, 8) // CH_REQ_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d5
+packetLen(0x08d5, -1) // HC_ACK_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d6
+packetLen(0x08d6, 6) // ZC_CLEAR_DIALOG
+
+// Packet: 0x08d7
+packetLen(0x08d7, 28) // CZ_REQ_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d8
+packetLen(0x08d8, 27) // ZC_ACK_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d9
+packetLen(0x08d9, 30) // ZC_NOTIFY_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08da
+packetLen(0x08da, 26) // CZ_REQ_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08db
+packetLen(0x08db, 27) // ZC_ACK_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08dc
+packetLen(0x08dc, 26) // ZC_NOTIFY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08dd
+packetLen(0x08dd, 27) // CZ_REPLY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08de
+packetLen(0x08de, 27) // ZC_REPLY_ACK_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08df
+packetLen(0x08df, 50) // ZC_NOTIFY_LOBBY_ADMISSION
+
+// Packet: 0x08e0
+packetLen(0x08e0, 51) // CZ_REPLY_LOBBY_ADMISSION
+
+// Packet: 0x08e1
+packetLen(0x08e1, 51) // ZC_REPLY_ACK_LOBBY_ADMISSION
+
+// Packet: 0x08e2
+packetLen(0x08e2, 27) // ZC_NAVIGATION_ACTIVE
+
+// Packet: 0x08e3
+packetLen(0x08e3, 157) // HC_UPDATE_CHARINFO
+
+// Packet: 0x08e4
+packetLen(0x08e4, 6) // AC_SHUTDOWN_INFO
+
+// Packet: 0x08fc
+packetLen(0x08fc, 30) // CH_REQ_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fd
+packetLen(0x08fd, 6) // CH_ACK_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fe
+packetLen(0x08fe, -1) // ZC_HUNTING_QUEST_INFO
+
+// Packet: 0x08ff
+packetLen(0x08ff, 24) // ZC_EFST_SET_ENTER
+
+// Packet: 0x0900
+packetLen(0x0900, -1) // ZC_INVENTORY_ITEMLIST_NORMAL
+
+// Packet: 0x0901
+packetLen(0x0901, -1) // ZC_INVENTORY_ITEMLIST_EQUIP
+
+// Packet: 0x0902
+packetLen(0x0902, -1) // ZC_CART_ITEMLIST_NORMAL
+
+// Packet: 0x0903
+packetLen(0x0903, -1) // ZC_CART_ITEMLIST_EQUIP
+
+// Packet: 0x0904
+packetLen(0x0904, -1) // ZC_STORE_ITEMLIST_NORMAL
+
+// Packet: 0x0905
+packetLen(0x0905, -1) // ZC_STORE_ITEMLIST_EQUIP
+
+// Packet: 0x0906
+packetLen(0x0906, -1) // ZC_MICROSCOPE
+
+// Packet: 0x0907
+packetLen(0x0907, 5) // CZ_INVENTORY_TAB
+
+// Packet: 0x0908
+packetLen(0x0908, 5) // ZC_INVENTORY_TAB
+
+// Packet: 0x090a
+packetLen(0x090a, 26) // CZ_REQ_ENTRY_QUEUE_RANKING
+
+// Packet: 0x090d
+packetLen(0x090d, -1) // ZC_PREMIUM_CAMPAIGN_INFO
+
+// Packet: 0x090e
+packetLen(0x090e, 2) // ZC_ENTRY_QUEUE_INIT
+
+// Packet: 0x090f
+packetLen(0x090f, -1) // ZC_NOTIFY_NEWENTRY7
+
+// Packet: 0x0910
+packetLen(0x0910, 10) // CZ_REQ_PARTY_NAME
+
+// Packet: 0x0911
+packetLen(0x0911, 30) // ZC_ACK_PARTY_NAME
+
+// Packet: 0x0912
+packetLen(0x0912, 10) // CZ_REQ_GUILD_NAME
+
+// Packet: 0x0913
+packetLen(0x0913, 30) // ZC_ACK_GUILD_NAME
+
+// Packet: 0x0914
+packetLen(0x0914, -1) // ZC_NOTIFY_MOVEENTRY9
+
+// Packet: 0x0915
+packetLen(0x0915, -1) // ZC_NOTIFY_STANDENTRY8
+
+// Packet: 0x0916
+packetLen(0x0916, 26) // CZ_REQ_JOIN_GUILD2
+
+// Packet: 0x0917
+packetLen(0x0917, 2) // ZC_REASSEMBLY_AUTH43
+
+// Packet: 0x0918
+packetLen(0x0918, 2) // ZC_REASSEMBLY_AUTH44
+
+// Packet: 0x0919
+packetLen(0x0919, 2) // ZC_REASSEMBLY_AUTH45
+
+// Packet: 0x091a
+packetLen(0x091a, 2) // ZC_REASSEMBLY_AUTH46
+
+// Packet: 0x091b
+packetLen(0x091b, 2) // ZC_PRNPC_STATE
+
+// Packet: 0x091c
+packetLen(0x091c, 2) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x091d
+packetLen(0x091d, 2) // ZC_REASSEMBLY_AUTH49
+
+// Packet: 0x091e
+packetLen(0x091e, 2) // ZC_REASSEMBLY_AUTH50
+
+// Packet: 0x091f
+packetLen(0x091f, 2) // ZC_REASSEMBLY_AUTH51
+
+// Packet: 0x0920
+packetLen(0x0920, 2) // ZC_REASSEMBLY_AUTH52
+
+// Packet: 0x0921
+packetLen(0x0921, 2) // ZC_REASSEMBLY_AUTH53
+
+// Packet: 0x0922
+packetLen(0x0922, 2) // ZC_REASSEMBLY_AUTH54
+
+// Packet: 0x0923
+packetLen(0x0923, 2) // ZC_REASSEMBLY_AUTH55
+
+// Packet: 0x0924
+packetLen(0x0924, 2) // ZC_REASSEMBLY_AUTH56
+
+// Packet: 0x0925
+packetLen(0x0925, 2) // ZC_REASSEMBLY_AUTH57
+
+// Packet: 0x0926
+packetLen(0x0926, 2) // ZC_REASSEMBLY_AUTH58
+
+// Packet: 0x0927
+packetLen(0x0927, 2) // ZC_REASSEMBLY_AUTH59
+
+// Packet: 0x0928
+packetLen(0x0928, 2) // ZC_REASSEMBLY_AUTH60
+
+// Packet: 0x0929
+packetLen(0x0929, 2) // ZC_REASSEMBLY_AUTH61
+
+// Packet: 0x092a
+packetLen(0x092a, 2) // ZC_REASSEMBLY_AUTH62
+
+// Packet: 0x092b
+packetLen(0x092b, 2) // ZC_REASSEMBLY_AUTH63
+
+// Packet: 0x092c
+packetLen(0x092c, 2) // ZC_REASSEMBLY_AUTH64
+
+// Packet: 0x092d
+packetLen(0x092d, 2) // ZC_REASSEMBLY_AUTH65
+
+// Packet: 0x092e
+packetLen(0x092e, 2) // ZC_REASSEMBLY_AUTH66
+
+// Packet: 0x092f
+packetLen(0x092f, 2) // ZC_REASSEMBLY_AUTH67
+
+// Packet: 0x0930
+packetLen(0x0930, 2) // ZC_REASSEMBLY_AUTH68
+
+// Packet: 0x0931
+packetLen(0x0931, 2) // ZC_REASSEMBLY_AUTH69
+
+// Packet: 0x0932
+packetLen(0x0932, 2) // ZC_REASSEMBLY_AUTH70
+
+// Packet: 0x0933
+packetLen(0x0933, 2) // ZC_REASSEMBLY_AUTH71
+
+// Packet: 0x0934
+packetLen(0x0934, 2) // ZC_REASSEMBLY_AUTH72
+
+// Packet: 0x0935
+packetLen(0x0935, 2) // ZC_REASSEMBLY_AUTH73
+
+// Packet: 0x0936
+packetLen(0x0936, 2) // ZC_REASSEMBLY_AUTH74
+
+// Packet: 0x0937
+packetLen(0x0937, 2) // ZC_REASSEMBLY_AUTH75
+
+// Packet: 0x0938
+packetLen(0x0938, 2) // ZC_REASSEMBLY_AUTH76
+
+// Packet: 0x0939
+packetLen(0x0939, 2) // ZC_REASSEMBLY_AUTH77
+
+// Packet: 0x093a
+packetLen(0x093a, 2) // ZC_REASSEMBLY_AUTH78
+
+// Packet: 0x093b
+packetLen(0x093b, 2) // ZC_REASSEMBLY_AUTH79
+
+// Packet: 0x093c
+packetLen(0x093c, 2) // ZC_REASSEMBLY_AUTH80
+
+// Packet: 0x093d
+packetLen(0x093d, 2) // ZC_REASSEMBLY_AUTH81
+
+// Packet: 0x093e
+packetLen(0x093e, 2) // ZC_REASSEMBLY_AUTH82
+
+// Packet: 0x093f
+packetLen(0x093f, 2) // ZC_REASSEMBLY_AUTH83
+
+// Packet: 0x0940
+packetLen(0x0940, 2) // ZC_REASSEMBLY_AUTH84
+
+// Packet: 0x0941
+packetLen(0x0941, 2) // CZ_REASSEMBLY_AUTH43
+
+// Packet: 0x0942
+packetLen(0x0942, 2) // CZ_REASSEMBLY_AUTH44
+
+// Packet: 0x0943
+packetLen(0x0943, 2) // CZ_REASSEMBLY_AUTH45
+
+// Packet: 0x0944
+packetLen(0x0944, 2) // CZ_REASSEMBLY_AUTH46
+
+// Packet: 0x0945
+packetLen(0x0945, 2) // CZ_REASSEMBLY_AUTH47
+
+// Packet: 0x0946
+packetLen(0x0946, 2) // CZ_REASSEMBLY_AUTH48
+
+// Packet: 0x0947
+packetLen(0x0947, 2) // CZ_REASSEMBLY_AUTH49
+
+// Packet: 0x0948
+packetLen(0x0948, 2) // CZ_REASSEMBLY_AUTH50
+
+// Packet: 0x0949
+packetLen(0x0949, 2) // CZ_REASSEMBLY_AUTH51
+
+// Packet: 0x094a
+packetLen(0x094a, 2) // CZ_REASSEMBLY_AUTH52
+
+// Packet: 0x094b
+packetLen(0x094b, 2) // CZ_REASSEMBLY_AUTH53
+
+// Packet: 0x094c
+packetLen(0x094c, 2) // CZ_REASSEMBLY_AUTH54
+
+// Packet: 0x094d
+packetLen(0x094d, 2) // CZ_REASSEMBLY_AUTH55
+
+// Packet: 0x094e
+packetLen(0x094e, 2) // CZ_REASSEMBLY_AUTH56
+
+// Packet: 0x094f
+packetLen(0x094f, 2) // CZ_REASSEMBLY_AUTH57
+
+// Packet: 0x0950
+packetLen(0x0950, 2) // CZ_REASSEMBLY_AUTH58
+
+// Packet: 0x0951
+packetLen(0x0951, 2) // CZ_REASSEMBLY_AUTH59
+
+// Packet: 0x0952
+packetLen(0x0952, 2) // CZ_REASSEMBLY_AUTH60
+
+// Packet: 0x0953
+packetLen(0x0953, 2) // CZ_REASSEMBLY_AUTH61
+
+// Packet: 0x0954
+packetLen(0x0954, 2) // CZ_REASSEMBLY_AUTH62
+
+// Packet: 0x0955
+packetLen(0x0955, 2) // CZ_REASSEMBLY_AUTH63
+
+// Packet: 0x0956
+packetLen(0x0956, 2) // CZ_REASSEMBLY_AUTH64
+
+// Packet: 0x0957
+packetLen(0x0957, 2) // CZ_REASSEMBLY_AUTH65
+
+// Packet: 0x0958
+packetLen(0x0958, 2) // CZ_REASSEMBLY_AUTH66
+
+// Packet: 0x0959
+packetLen(0x0959, 2) // CZ_REASSEMBLY_AUTH67
+
+// Packet: 0x095a
+packetLen(0x095a, 2) // CZ_REASSEMBLY_AUTH68
+
+// Packet: 0x095b
+packetLen(0x095b, 2) // CZ_REASSEMBLY_AUTH69
+
+// Packet: 0x095c
+packetLen(0x095c, 2) // CZ_REASSEMBLY_AUTH70
+
+// Packet: 0x095d
+packetLen(0x095d, 2) // CZ_REASSEMBLY_AUTH71
+
+// Packet: 0x095e
+packetLen(0x095e, 2) // CZ_REASSEMBLY_AUTH72
+
+// Packet: 0x095f
+packetLen(0x095f, 2) // CZ_REASSEMBLY_AUTH73
+
+// Packet: 0x0960
+packetLen(0x0960, 2) // CZ_REASSEMBLY_AUTH74
+
+// Packet: 0x0961
+packetLen(0x0961, 2) // CZ_REASSEMBLY_AUTH75
+
+// Packet: 0x0962
+packetLen(0x0962, 2) // CZ_REASSEMBLY_AUTH76
+
+// Packet: 0x0963
+packetLen(0x0963, 2) // CZ_REASSEMBLY_AUTH77
+
+// Packet: 0x0964
+packetLen(0x0964, 2) // CZ_REASSEMBLY_AUTH78
+
+// Packet: 0x0965
+packetLen(0x0965, 2) // CZ_REASSEMBLY_AUTH79
+
+// Packet: 0x0966
+packetLen(0x0966, 2) // CZ_REASSEMBLY_AUTH80
+
+// Packet: 0x0967
+packetLen(0x0967, 2) // CZ_REASSEMBLY_AUTH81
+
+// Packet: 0x0968
+packetLen(0x0968, 2) // CZ_REASSEMBLY_AUTH82
+
+// Packet: 0x0969
+packetLen(0x0969, 2) // CZ_REASSEMBLY_AUTH83
+
+// Packet: 0x096a
+packetLen(0x096a, 2) // CZ_REASSEMBLY_AUTH84
+
+// Packet: 0x096b
+packetLen(0x096b, 4) // ZC_PRNPC_STATE
+
+// Packet: 0x096c
+packetLen(0x096c, 6) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x096d
+packetLen(0x096d, -1) // ZC_MERGE_ITEM_OPEN
+
+// Packet: 0x096e
+packetLen(0x096e, -1) // CZ_REQ_MERGE_ITEM
+
+// Packet: 0x096f
+packetLen(0x096f, 7) // ZC_ACK_MERGE_ITEM
+
+// Packet: 0x0970
+packetLen(0x0970, 31) // CH_MAKE_CHAR_NOT_STATS
+
+// Packet: 0x0971
+packetLen(0x0971, 6) // ZC_PARTY_RECRUIT_REFUSE_VOLUNTEER_TO_PM
+
+// Packet: 0x0972
+packetLen(0x0972, -1) // ZC_SAY_DIALOG2
+
+// Packet: 0x0973
+packetLen(0x0973, 7) // ZC_WAIT_DIALOG2
+
+// Packet: 0x0974
+packetLen(0x0974, 2) // CZ_CANCEL_MERGE_ITEM
+
+// Packet: 0x0975
+packetLen(0x0975, -1) // ZC_STORE_ITEMLIST_NORMAL_V2
+
+// Packet: 0x0976
+packetLen(0x0976, -1) // ZC_STORE_ITEMLIST_EQUIP_V2
+
+// Packet: 0x0977
+packetLen(0x0977, 14) // ZC_HP_INFO
+
+// Packet: 0x0978
+packetLen(0x0978, 6) // CZ_REQ_BEFORE_WORLD_INFO
+
+// Packet: 0x0979
+packetLen(0x0979, 50) // ZC_ACK_BEFORE_WORLD_INFO
+
+// Packet: 0x097a
+packetLen(0x097a, -1) // ZC_ALL_QUEST_LIST2
+
+// Packet: 0x097b
+packetLen(0x097b, -1) // ZC_PERSONAL_INFOMATION2
+
+// Packet: 0x097c
+packetLen(0x097c, 4) // CZ_REQ_RANKING
+
+// Packet: 0x097d
+packetLen(0x097d, 288) // ZC_ACK_RANKING
+
+// Packet: 0x097e
+packetLen(0x097e, 12) // ZC_UPDATE_RANKING_POINT
+
+// Packet: 0x097f
+packetLen(0x097f, -1) // ZC_SELECTCART
+
+// Packet: 0x0980
+packetLen(0x0980, 7) // CZ_SELECTCART
+
+// Packet: 0x0981
+packetLen(0x0981, -1) // ZC_PERSONAL_INFOMATION_CHN
+
+// Packet: 0x0982
+packetLen(0x0982, 7) // ZC_FATIGUE_CHN
+
+// Packet: 0x0983
+packetLen(0x0983, 29) // ZC_MSG_STATE_CHANGE3
+
+// Packet: 0x0984
+packetLen(0x0984, 28) // ZC_EFST_SET_ENTER2
+
+// Packet: 0x0985
+packetLen(0x0985, -1) // ZC_SKILL_POSTDELAY_LIST2
+
+// Packet: 0x0986
+packetLen(0x0986, 10) // AC_SHUTDOWN_NOTIFY
+
+// Packet: 0x0987
+packetLen(0x0987, -1) // CA_LOGIN6
+
+// Packet: 0x0988
+packetLen(0x0988, 6) // ZC_NOTIFY_CLAN_CONNECTINFO
+
+// Packet: 0x0989
+packetLen(0x0989, 2) // ZC_ACK_CLAN_LEAVE
+
+// Packet: 0x098a
+packetLen(0x098a, -1) // ZC_CLANINFO
+
+// Packet: 0x098b
+packetLen(0x098b, 2) // AC_REQ_NEW_USER
+
+// Packet: 0x098c
+packetLen(0x098c, 4) // CA_ACK_NEW_USER
+
+// Packet: 0x098d
+packetLen(0x098d, -1) // CZ_CLAN_CHAT
+
+// Packet: 0x098e
+packetLen(0x098e, -1) // ZC_NOTIFY_CLAN_CHAT
+
+// Packet: 0x098f
+packetLen(0x098f, -1) // CH_DELETE_CHAR3_EXT
+
+// Packet: 0x0990
+packetLen(0x0990, 41) // ZC_ITEM_PICKUP_ACK_V5
+
+// Packet: 0x0991
+packetLen(0x0991, -1) // ZC_INVENTORY_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0992
+packetLen(0x0992, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0993
+packetLen(0x0993, -1) // ZC_CART_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0994
+packetLen(0x0994, -1) // ZC_CART_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0995
+packetLen(0x0995, -1) // ZC_STORE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0996
+packetLen(0x0996, -1) // ZC_STORE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0997
+packetLen(0x0997, -1) // ZC_EQUIPWIN_MICROSCOPE_V5
+
+// Packet: 0x0998
+packetLen(0x0998, 8) // CZ_REQ_WEAR_EQUIP_V5
+
+// Packet: 0x0999
+packetLen(0x0999, 11) // ZC_ACK_WEAR_EQUIP_V5
+
+// Packet: 0x099a
+packetLen(0x099a, 9) // ZC_ACK_TAKEOFF_EQUIP_V5
+
+// Packet: 0x099b
+packetLen(0x099b, 8) // ZC_MAPPROPERTY_R2
+
+// Packet: 0x099c
+packetLen(0x099c, 6) // CH_REQ_CHARINFO_PER_PAGE
+
+// Packet: 0x099d
+packetLen(0x099d, -1) // HC_ACK_CHARINFO_PER_PAGE
+
+// Packet: 0x099e
+packetLen(0x099e, 12) // HC_QUEUE_ORDER
+
+// Packet: 0x099f
+packetLen(0x099f, -1) // ZC_SKILL_ENTRY4
+
+// Packet: 0x09a0
+packetLen(0x09a0, 6) // HC_CHARLIST_NOTIFY
+
+// Packet: 0x09a1
+packetLen(0x09a1, 2) // CH_CHARLIST_REQ
+
+// Packet: 0x09a2
+packetLen(0x09a2, 6) // AC_REQ_MOBILE_OTP
+
+// Packet: 0x09a3
+packetLen(0x09a3, -1) // CA_ACK_MOBILE_OTP
+
+// Packet: 0x09a4
+packetLen(0x09a4, 18) // ZC_DISPATCH_TIMING_INFO_CHN
+
+// Packet: 0x09a5
+packetLen(0x09a5, 7) // AC_REFUSE_LOGIN3
+
+// Packet: 0x09a6
+packetLen(0x09a6, 12) // ZC_BANKING_CHECK
+
+// Packet: 0x09a7
+packetLen(0x09a7, 10) // CZ_REQ_BANKING_DEPOSIT
+
+// Packet: 0x09a8
+packetLen(0x09a8, 16) // ZC_ACK_BANKING_DEPOSIT
+
+// Packet: 0x09a9
+packetLen(0x09a9, 10) // CZ_REQ_BANKING_WITHDRAW
+
+// Packet: 0x09aa
+packetLen(0x09aa, 16) // ZC_ACK_BANKING_WITHDRAW
+
+// Packet: 0x09ab
+packetLen(0x09ab, 6) // CZ_REQ_BANKING_CHECK
+
+// Packet: 0x09ac
+packetLen(0x09ac, -1) // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ad
+packetLen(0x09ad, 12) // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ae
+packetLen(0x09ae, 19) // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09af
+packetLen(0x09af, 4) // ZC_ACK_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b0
+packetLen(0x09b0, 10) // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b1
+packetLen(0x09b1, 4) // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b2
+packetLen(0x09b2, 10) // ZC_NOTIFY_BARGAIN_SALE_SELLING
+
+// Packet: 0x09b3
+packetLen(0x09b3, 6) // ZC_NOTIFY_BARGAIN_SALE_CLOSE
+
+// Packet: 0x09b4
+packetLen(0x09b4, 6) // CZ_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b5
+packetLen(0x09b5, 2) // ZC_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b6
+packetLen(0x09b6, 6) // CZ_REQ_OPEN_BANKING
+
+// Packet: 0x09b7
+packetLen(0x09b7, 4) // ZC_ACK_OPEN_BANKING
+
+// Packet: 0x09b8
+packetLen(0x09b8, 6) // CZ_REQ_CLOSE_BANKING
+
+// Packet: 0x09b9
+packetLen(0x09b9, 4) // ZC_ACK_CLOSE_BANKING
+
+// Packet: 0x09ba
+packetLen(0x09ba, 2) // CZ_REQ_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bb
+packetLen(0x09bb, 6) // ZC_ACK_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bc
+packetLen(0x09bc, 6) // CZ_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09bd
+packetLen(0x09bd, 2) // ZC_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09be
+packetLen(0x09be, 2) // CZ_REQ_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09bf
+packetLen(0x09bf, 4) // ZC_ACK_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09c1
+packetLen(0x09c1, 10) // ZC_C_MARKERINFO
+
+// Packet: 0x09c2
+packetLen(0x09c2, -1) // HC_SECRETSCAN_DATA
+
+// Packet: 0x09c3
+packetLen(0x09c3, 10) // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c4
+packetLen(0x09c4, 10) // ZC_ACK_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c5
+packetLen(0x09c5, 1042) // CS_LOGIN_QUERY
+
+// Packet: 0x09c6
+packetLen(0x09c6, -1) // SC_LOGIN_ANSWER
+
+// Packet: 0x09c7
+packetLen(0x09c7, 18) // SC_LOGIN_ERROR
+
+// Packet: 0x09c8
+packetLen(0x09c8, -1) // CA_LOGIN_OTP
+
+// Packet: 0x09c9
+packetLen(0x09c9, -1) // SC_SOCT
+
+// Packet: 0x09ca
+packetLen(0x09ca, -1) // ZC_SKILL_ENTRY5
+
+// Packet: 0x09cb
+packetLen(0x09cb, 17) // ZC_USE_SKILL2
+
+// Packet: 0x09cc
+packetLen(0x09cc, -1) // ZC_SECRETSCAN_DATA
+
+// Packet: 0x09cd
+packetLen(0x09cd, 8) // ZC_MSG_COLOR
+
+// Packet: 0x09ce
+packetLen(0x09ce, 102) // CZ_ITEM_CREATE_EX
+
+// Packet: 0x09cf
+packetLen(0x09cf, -1) // ZC_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d0
+packetLen(0x09d0, -1) // CZ_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d1
+packetLen(0x09d1, 14) // ZC_PROGRESS_ACTOR
+
+// Packet: 0x09d2
+packetLen(0x09d2, -1) // ZC_GUILDSTORAGE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x09d3
+packetLen(0x09d3, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x09d4
+packetLen(0x09d4, 2) // CZ_NPC_TRADE_QUIT
+
+// Packet: 0x09d5
+packetLen(0x09d5, -1) // ZC_NPC_MARKET_OPEN
+
+// Packet: 0x09d6
+packetLen(0x09d6, -1) // CZ_NPC_MARKET_PURCHASE
+
+// Packet: 0x09d7
+packetLen(0x09d7, -1) // ZC_NPC_MARKET_PURCHASE_RESULT
+
+// Packet: 0x09d8
+packetLen(0x09d8, 2) // CZ_NPC_MARKET_CLOSE
+
+// Packet: 0x09d9
+packetLen(0x09d9, 4) // CZ_REQ_GUILDSTORAGE_LOG
+
+// Packet: 0x09da
+packetLen(0x09da, -1) // ZC_ACK_GUILDSTORAGE_LOG
+
+// Packet: 0x09db
+packetLen(0x09db, -1) // ZC_NOTIFY_MOVEENTRY10
+
+// Packet: 0x09dc
+packetLen(0x09dc, -1) // ZC_NOTIFY_NEWENTRY10
+
+// Packet: 0x09dd
+packetLen(0x09dd, -1) // ZC_NOTIFY_STANDENTRY10
+
+// Packet: 0x09de
+packetLen(0x09de, -1) // ZC_WHISPER02
+
+// Packet: 0x09df
+packetLen(0x09df, 7) // ZC_ACK_WHISPER02
+
+// Packet: 0x09e0
+packetLen(0x09e0, -1) // SC_LOGIN_ANSWER_WITH_ID
+
+// Packet: 0x09e1
+packetLen(0x09e1, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_GUILDSTORAGE
+
+// Packet: 0x09e2
+packetLen(0x09e2, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_BODY
+
+// Packet: 0x09e3
+packetLen(0x09e3, 8) // CZ_MOVE_ITEM_FROM_CART_TO_GUILDSTORAGE
+
+// Packet: 0x09e4
+packetLen(0x09e4, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_CART
+
+// Packet: 0x09e5
+packetLen(0x09e5, 18) // ZC_DELETEITEM_FROM_MCSTORE2
+
+// Packet: 0x09e6
+packetLen(0x09e6, 24) // ZC_UPDATE_ITEM_FROM_BUYING_STORE2
+
+// Packet: 0x09e7
+packetLen(0x09e7, 3) // ZC_NOTIFY_UNREAD_RODEX
+
+// Packet: 0x09e8
+packetLen(0x09e8, 11) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x09e9
+packetLen(0x09e9, 2) // CZ_CLOSE_RODEXBOX
+
+// Packet: 0x09ea
+packetLen(0x09ea, 11) // CZ_REQ_READ_RODEX
+
+// Packet: 0x09eb
+packetLen(0x09eb, -1) // ZC_ACK_READ_RODEX
+
+// Packet: 0x09ec
+packetLen(0x09ec, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x09ed
+packetLen(0x09ed, 3) // ZC_ACK_SEND_RODEX
+
+// Packet: 0x09ee
+packetLen(0x09ee, 11) // CZ_REQ_NEXT_RODEX
+
+// Packet: 0x09ef
+packetLen(0x09ef, 11) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x09f0
+packetLen(0x09f0, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x09f1
+packetLen(0x09f1, 11) // CZ_REQ_ZENY_FROM_RODEX
+
+// Packet: 0x09f2
+packetLen(0x09f2, 12) // ZC_ACK_ZENY_FROM_RODEX
+
+// Packet: 0x09f3
+packetLen(0x09f3, 11) // CZ_REQ_ITEM_FROM_RODEX
+
+// Packet: 0x09f4
+packetLen(0x09f4, 12) // ZC_ACK_ITEM_FROM_RODEX
+
+// Packet: 0x09f5
+packetLen(0x09f5, 11) // CZ_REQ_DELETE_RODEX
+
+// Packet: 0x09f6
+packetLen(0x09f6, 11) // ZC_ACK_DELETE_RODEX
+
+// Packet: 0x09f7
+packetLen(0x09f7, 77) // ZC_PROPERTY_HOMUN_2
+
+// Packet: 0x09f8
+packetLen(0x09f8, -1) // ZC_ALL_QUEST_LIST3
+
+// Packet: 0x09f9
+packetLen(0x09f9, 143) // ZC_ADD_QUEST_EX
+
+// Packet: 0x09fa
+packetLen(0x09fa, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x09fb
+packetLen(0x09fb, -1) // CZ_PET_EVOLUTION
+
+// Packet: 0x09fc
+packetLen(0x09fc, 6) // ZC_PET_EVOLUTION_RESULT
+
+// Packet: 0x09fd
+packetLen(0x09fd, -1) // ZC_NOTIFY_MOVEENTRY11
+
+// Packet: 0x09fe
+packetLen(0x09fe, -1) // ZC_NOTIFY_NEWENTRY11
+
+// Packet: 0x09ff
+packetLen(0x09ff, -1) // ZC_NOTIFY_STANDENTRY11
+
+// Packet: 0x0a00
+packetLen(0x0a00, 269) // ZC_SHORTCUT_KEY_LIST_V3
+
+// Packet: 0x0a01
+packetLen(0x0a01, 3) // CZ_SHORTCUTKEYBAR_ROTATE
+
+// Packet: 0x0a02
+packetLen(0x0a02, 4) // ZC_DRESSROOM_OPEN
+
+// Packet: 0x0a03
+packetLen(0x0a03, 2) // CZ_REQ_CANCEL_WRITE_RODEX
+
+// Packet: 0x0a04
+packetLen(0x0a04, 6) // CZ_REQ_ADD_ITEM_RODEX
+
+// Packet: 0x0a05
+packetLen(0x0a05, 63) // ZC_ACK_ADD_ITEM_RODEX
+
+// Packet: 0x0a06
+packetLen(0x0a06, 6) // CZ_REQ_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a07
+packetLen(0x0a07, 9) // ZC_ACK_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a08
+packetLen(0x0a08, 26) // CZ_REQ_OPEN_WRITE_RODEX
+
+// Packet: 0x0a09
+packetLen(0x0a09, 55) // ZC_ADD_EXCHANGE_ITEM3
+
+// Packet: 0x0a0a
+packetLen(0x0a0a, 57) // ZC_ADD_ITEM_TO_STORE3
+
+// Packet: 0x0a0b
+packetLen(0x0a0b, 57) // ZC_ADD_ITEM_TO_CART3
+
+// Packet: 0x0a0c
+packetLen(0x0a0c, 66) // ZC_ITEM_PICKUP_ACK_V6
+
+// Packet: 0x0a0d
+packetLen(0x0a0d, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a0e
+packetLen(0x0a0e, 14) // ZC_BATTLEFIELD_NOTIFY_HP2
+
+// Packet: 0x0a0f
+packetLen(0x0a0f, -1) // ZC_CART_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a10
+packetLen(0x0a10, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a11
+packetLen(0x0a11, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a12
+packetLen(0x0a12, 27) // ZC_ACK_OPEN_WRITE_RODEX
+
+// Packet: 0x0a13
+packetLen(0x0a13, 26) // CZ_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a14
+packetLen(0x0a14, 10) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a15
+packetLen(0x0a15, 12) // ZC_GOLDPCCAFE_POINT
+
+// Packet: 0x0a16
+packetLen(0x0a16, 26) // CZ_DYNAMICNPC_CREATE_REQUEST
+
+// Packet: 0x0a17
+packetLen(0x0a17, 6) // ZC_DYNAMICNPC_CREATE_RESULT
+
+// Packet: 0x0a18
+packetLen(0x0a18, 14) // ZC_ACCEPT_ENTER3
+
+// Packet: 0x0a19
+packetLen(0x0a19, 2) // CZ_REQ_OPEN_ROULETTE
+
+// Packet: 0x0a1a
+packetLen(0x0a1a, 25) // ZC_ACK_OPEN_ROULETTE
+
+// Packet: 0x0a1b
+packetLen(0x0a1b, 2) // CZ_REQ_ROULETTE_INFO
+
+// Packet: 0x0a1c
+packetLen(0x0a1c, -1) // ZC_ACK_ROULEITTE_INFO
+
+// Packet: 0x0a1d
+packetLen(0x0a1d, 2) // CZ_REQ_CLOSE_ROULETTE
+
+// Packet: 0x0a1e
+packetLen(0x0a1e, 3) // ZC_ACK_CLOSE_ROULETTE
+
+// Packet: 0x0a1f
+packetLen(0x0a1f, 2) // CZ_REQ_GENERATE_ROULETTE
+
+// Packet: 0x0a20
+packetLen(0x0a20, 23) // ZC_ACK_GENERATE_ROULETTE
+
+// Packet: 0x0a21
+packetLen(0x0a21, 3) // CZ_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a22
+packetLen(0x0a22, 7) // ZC_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a23
+packetLen(0x0a23, -1) // ZC_ALL_ACH_LIST
+
+// Packet: 0x0a24
+packetLen(0x0a24, 66) // ZC_ACH_UPDATE
+
+// Packet: 0x0a25
+packetLen(0x0a25, 6) // CZ_REQ_ACH_REWARD
+
+// Packet: 0x0a26
+packetLen(0x0a26, 7) // ZC_REQ_ACH_REWARD_ACK
+
+// Packet: 0x0a27
+packetLen(0x0a27, 8) // ZC_RECOVERY2
+
+// Packet: 0x0a28
+packetLen(0x0a28, 3) // ZC_ACK_OPENSTORE2
+
+// Packet: 0x0a29
+packetLen(0x0a29, 6) // ZC_REQ_AU_BOT
+
+// Packet: 0x0a2a
+packetLen(0x0a2a, 6) // CZ_ACK_AU_BOT
+
+// Packet: 0x0a2b
+packetLen(0x0a2b, 14) // ZC_SE_CASHSHOP_OPEN2
+
+// Packet: 0x0a2c
+packetLen(0x0a2c, 12) // ZC_SE_PC_BUY_TAIWANCASHITEM_RESULT
+
+// Packet: 0x0a2d
+packetLen(0x0a2d, -1) // ZC_EQUIPWIN_MICROSCOPE_V6
+
+// Packet: 0x0a2e
+packetLen(0x0a2e, 6) // CZ_REQ_CHANGE_TITLE
+
+// Packet: 0x0a2f
+packetLen(0x0a2f, 7) // ZC_ACK_CHANGE_TITLE
+
+// Packet: 0x0a30
+packetLen(0x0a30, 106) // ZC_ACK_REQNAMEALL2
+
+// Packet: 0x0a31
+packetLen(0x0a31, -1) // ZC_RESULT_PACKAGE_ITEM_TEST
+
+// Packet: 0x0a32
+packetLen(0x0a32, 2) // ZC_OPEN_RODEX_THROUGH_NPC_ONLY
+
+// Packet: 0x0a33
+packetLen(0x0a33, 7) // ZC_UPDATE_ROULETTE_COIN
+
+// Packet: 0x0a34
+packetLen(0x0a34, 6) // ZC_UPDATE_TAIWANCASH
+
+// Packet: 0x0a35
+packetLen(0x0a35, 4) // CZ_REQ_ONECLICK_ITEMIDENTIFY
+
+// Packet: 0x0a36
+packetLen(0x0a36, 7) // ZC_HP_INFO_TINY
+
+// Packet: 0x0a37
+packetLen(0x0a37, 69) // ZC_ITEM_PICKUP_ACK_V7
+
+// Packet: 0x0a38
+packetLen(0x0a38, 3) // ZC_OPEN_UI
+
+// Packet: 0x0a39
+packetLen(0x0a39, 36) // CH_MAKE_CHAR
+
+// Packet: 0x0a3a
+packetLen(0x0a3a, 12)
+
+// Packet: 0x0a3b
+packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
+
+// Packet: 0x0a3c
+packetLen(0x0a3c, -1)
+
+// Packet: 0x0a3d
+packetLen(0x0a3d, 20)
+
+// Packet: 0x0a3e
+packetLen(0x0a3e, -1)
+
+// Packet: 0x0a3f
+packetLen(0x0a3f, 11)
+
+// Packet: 0x0a40
+packetLen(0x0a40, 11)
+
+// Packet: 0x0a41
+packetLen(0x0a41, 18) // ZC_AOE_EFFECT_SKILL
+
+// Packet: 0x0a42
+packetLen(0x0a42, 43)
+
+// Packet: 0x0a43
+packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0a44
+packetLen(0x0a44, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0a46
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
+
+// Packet: 0x0a47
+packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
+
+// Packet: 0x0a48
+packetLen(0x0a48, 2) // CZ_STYLE_CLOSE
+
+// Packet: 0x0a49
+packetLen(0x0a49, 22) // CZ_PRIVATE_AIRSHIP_REQUEST
+
+// Packet: 0x0a4a
+packetLen(0x0a4a, 6) // ZC_PRIVATE_AIRSHIP_RESPONSE
+
+// Packet: 0x0a4b
+packetLen(0x0a4b, 22) // ZC_AIRSHIP_MAPMOVE
+
+// Packet: 0x0a4c
+packetLen(0x0a4c, 28) // ZC_AIRSHIP_SERVERMOVE
+
+// Packet: 0x0a4d
+packetLen(0x0a4d, -1)
+
+// Packet: 0x0a4e
+packetLen(0x0a4e, 6)
+
+// Packet: 0x0a4f
+packetLen(0x0a4f, -1)
+
+// Packet: 0x0a50
+packetLen(0x0a50, 4)
+
+// Packet: 0x0a51
+packetLen(0x0a51, 34) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a52
+packetLen(0x0a52, 20)
+
+// Packet: 0x0a53
+packetLen(0x0a53, 10)
+
+// Packet: 0x0a54
+packetLen(0x0a54, -1)
+
+// Packet: 0x0a55
+packetLen(0x0a55, 2)
+
+// Packet: 0x0a56
+packetLen(0x0a56, 6)
+
+// Packet: 0x0a57
+packetLen(0x0a57, 6)
+
+// Packet: 0x0a58
+packetLen(0x0a58, 8)
+
+// Packet: 0x0a59
+packetLen(0x0a59, -1)
+
+// Packet: 0x0a5a
+packetLen(0x0a5a, 2)
+
+// Packet: 0x0a5b
+packetLen(0x0a5b, 7)
+
+// Packet: 0x0a5c
+packetLen(0x0a5c, 18)
+
+// Packet: 0x0a5d
+packetLen(0x0a5d, 6)
+
+// Packet: 0x0a68
+packetLen(0x0a68, 3) // CZ_REQ_OPEN_UI
+
+// Packet: 0x0a69
+packetLen(0x0a69, 6)
+
+// Packet: 0x0a6a
+packetLen(0x0a6a, 12)
+
+// Packet: 0x0a6b
+packetLen(0x0a6b, -1)
+
+// Packet: 0x0a6c
+packetLen(0x0a6c, 7)
+
+// Packet: 0x0a6d
+packetLen(0x0a6d, -1)
+
+// Packet: 0x0a6e
+packetLen(0x0a6e, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x0a6f
+packetLen(0x0a6f, -1) // ZC_FORMATSTRING_MSG_COLOR
+
+// Packet: 0x0a70
+packetLen(0x0a70, 2)
+
+// Packet: 0x0a71
+packetLen(0x0a71, -1)
+
+// Packet: 0x0a72
+packetLen(0x0a72, 61)
+
+// Packet: 0x0a73
+packetLen(0x0a73, 2)
+
+// Packet: 0x0a74
+packetLen(0x0a74, 8)
+
+// Packet: 0x0a76
+packetLen(0x0a76, 80)
+
+// Packet: 0x0a77
+packetLen(0x0a77, 15)
+
+// Packet: 0x0a78
+packetLen(0x0a78, 15)
+
+// Packet: 0x0a79
+packetLen(0x0a79, -1)
+
+// Packet: 0x0a7b
+packetLen(0x0a7b, -1)
+
+// Packet: 0x0a7c
+packetLen(0x0a7c, -1)
+
+// Packet: 0x0a7d
+packetLen(0x0a7d, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0a7e
+packetLen(0x0a7e, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS_READY
+
+// Packet: 0x0a7f
+packetLen(0x0a7f, -1) // CZ_OFFLINE_STORE_CREATE
+
+// Packet: 0x0a80
+packetLen(0x0a80, 6)
+
+// Packet: 0x0a81
+packetLen(0x0a81, 4)
+
+// Packet: 0x0a82
+packetLen(0x0a82, 46)
+
+// Packet: 0x0a83
+packetLen(0x0a83, 46)
+
+// Packet: 0x0a84
+packetLen(0x0a84, 94) // ZC_GUILD_INFO
+
+// Packet: 0x0a85
+packetLen(0x0a85, 82)
+
+// Packet: 0x0a86
+packetLen(0x0a86, -1)
+
+// Packet: 0x0a87
+packetLen(0x0a87, -1) // ZC_BAN_LIST
+
+// Packet: 0x0a88
+packetLen(0x0a88, 2) // CZ_COOLDOWN_RESET
+
+// Packet: 0x0a89
+packetLen(0x0a89, 61) // ZC_NOTIFY_OFFLINE_STORE
+
+// Packet: 0x0a8a
+packetLen(0x0a8a, 6) // ZC_OFFLINE_STORE_VANISH
+
+// Packet: 0x0a8b
+packetLen(0x0a8b, 2)
+
+// Packet: 0x0a8c
+packetLen(0x0a8c, 2)
+
+// Packet: 0x0a8d
+packetLen(0x0a8d, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS
+
+// Packet: 0x0a8e
+packetLen(0x0a8e, 2)
+
+// Packet: 0x0a8f
+packetLen(0x0a8f, 2)
+
+// Packet: 0x0a90
+packetLen(0x0a90, 3)
+
+// Packet: 0x0a91
+packetLen(0x0a91, -1) // ZC_OFFLINE_STORE_ITEMS
+
+// Packet: 0x0a92
+packetLen(0x0a92, -1)
+
+// Packet: 0x0a93
+packetLen(0x0a93, 3)
+
+// Packet: 0x0a94
+packetLen(0x0a94, 2)
+
+// Packet: 0x0a95
+packetLen(0x0a95, 4)
+
+// Packet: 0x0a96
+packetLen(0x0a96, 61) // ZC_ADD_EXCHANGE_ITEM4
+
+// Packet: 0x0a97
+packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_ADD
+
+// Packet: 0x0a98
+packetLen(0x0a98, 10) // ZC_ALT_EQUIPMENT_EQUIP
+
+// Packet: 0x0a99
+packetLen(0x0a99, 4) // CZ_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9a
+packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9b
+packetLen(0x0a9b, -1) // ZC_ALT_EQUIPMENT_ITEMS
+
+// Packet: 0x0a9c
+packetLen(0x0a9c, 2) // CZ_ALT_EQUIPMENT_SWITCH
+
+// Packet: 0x0a9d
+packetLen(0x0a9d, 4) // ZC_ALT_EQUIPMENT_SWITCH_ACK
+
+// Packet: 0x0a9e
+packetLen(0x0a9e, 2)
+
+// Packet: 0x0a9f
+packetLen(0x0a9f, 2)
+
+// Packet: 0x0aa0
+packetLen(0x0aa0, 2) // ZC_REFINE_OPEN_WINDOW
+
+// Packet: 0x0aa1
+packetLen(0x0aa1, 4) // CZ_REFINE_ADD_ITEM
+
+// Packet: 0x0aa2
+packetLen(0x0aa2, -1) // ZC_REFINE_ADD_ITEM
+
+// Packet: 0x0aa3
+packetLen(0x0aa3, 9) // CZ_REFINE_ITEM_REQUEST
+
+// Packet: 0x0aa4
+packetLen(0x0aa4, 2) // CZ_REFINE_WINDOW_CLOSE
+
+// Packet: 0x0aa5
+packetLen(0x0aa5, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0aa6
+packetLen(0x0aa6, 36) // ZC_MEMBER_ADD
+
+// Packet: 0x0aa7
+packetLen(0x0aa7, 6) // ZC_INVENTORY_MOVE_FAILED
+
+// Packet: 0x0aa8
+packetLen(0x0aa8, 5)
+
+// Packet: 0x0aa9
+packetLen(0x0aa9, -1)
+
+// Packet: 0x0aaa
+packetLen(0x0aaa, -1)
+
+// Packet: 0x0aab
+packetLen(0x0aab, -1)
+
+// Packet: 0x0aac
+packetLen(0x0aac, 69)
+
+// Packet: 0x0aad
+packetLen(0x0aad, 51)
+
+// Packet: 0x0aae
+packetLen(0x0aae, 2)
+
+// Packet: 0x0aaf
+packetLen(0x0aaf, 6)
+
+// Packet: 0x0ab0
+packetLen(0x0ab0, 6)
+
+// Packet: 0x0ab1
+packetLen(0x0ab1, 14)
+
+// Packet: 0x0ab2
+packetLen(0x0ab2, 7) // ZC_GROUP_ISALIVE
+
+// Packet: 0x0ab3
+packetLen(0x0ab3, 19)
+
+// Packet: 0x0ab4
+packetLen(0x0ab4, 6)
+
+// Packet: 0x0ab5
+packetLen(0x0ab5, 2)
+
+// Packet: 0x0ab6
+packetLen(0x0ab6, 8)
+
+// Packet: 0x0ab7
+packetLen(0x0ab7, 4)
+
+// Packet: 0x0ab8
+packetLen(0x0ab8, 2)
+
+// Packet: 0x0ab9
+packetLen(0x0ab9, 47) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0aba
+packetLen(0x0aba, 2)
+
+// Packet: 0x0abb
+packetLen(0x0abb, 2)
+
+// Packet: 0x0abc
+packetLen(0x0abc, -1)
+
+// Packet: 0x0abd
+packetLen(0x0abd, 10) // ZC_PARTY_MEMBER_JOB_LEVEL
+
+// Packet: 0x0abe
+packetLen(0x0abe, -1) // ZC_WARPLIST
+
+// Packet: 0x0abf
+packetLen(0x0abf, -1)
+
+// Packet: 0x0ac0
+packetLen(0x0ac0, 26) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x0ac1
+packetLen(0x0ac1, 26) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x0ac2
+packetLen(0x0ac2, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0ac3
+packetLen(0x0ac3, 2)
+
+// Packet: 0x0ac4
+packetLen(0x0ac4, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x0ac5
+packetLen(0x0ac5, 156) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0ac6
+packetLen(0x0ac6, 156)
+
+// Packet: 0x0ac7
+packetLen(0x0ac7, 156) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0ac8
+packetLen(0x0ac8, 2) // ZC_UNKNOWN_CLEAN_ITEMS_LISTS
+
+// Packet: 0x0ac9
+packetLen(0x0ac9, -1)
+
+// Packet: 0x0aca
+packetLen(0x0aca, 3)
+
+// Packet: 0x0acb
+packetLen(0x0acb, 12) // ZC_PAR_CHANGE
+
+// Packet: 0x0acc
+packetLen(0x0acc, 18) // ZC_NOTIFY_EXP
+
+// Packet: 0x0acd
+packetLen(0x0acd, 23)
+
+// Packet: 0x0ace
+packetLen(0x0ace, 4)
+
+// Packet: 0x0acf
+packetLen(0x0acf, 68) // CA_LOGIN_OTP
+
+// Packet: 0x0ad0
+packetLen(0x0ad0, 11) // CA_OTP_CODE
+
+// Packet: 0x0ad1
+packetLen(0x0ad1, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ad2
+packetLen(0x0ad2, 30)
+
+// Packet: 0x0ad3
+packetLen(0x0ad3, -1)
+
+// Packet: 0x0ad4
+packetLen(0x0ad4, -1)
+
+// Packet: 0x0ad5
+packetLen(0x0ad5, 2)
+
+// Packet: 0x0ad6
+packetLen(0x0ad6, 2)
+
+// Packet: 0x0ad7
+packetLen(0x0ad7, 8)
+
+// Packet: 0x0ad8
+packetLen(0x0ad8, 8)
+
+// Packet: 0x0ad9
+packetLen(0x0ad9, -1)
+
+// Packet: 0x0ada
+packetLen(0x0ada, 32) // ZC_REFINE_STATUS
+
+// Packet: 0x0adb
+packetLen(0x0adb, -1)
+
+// Packet: 0x0adc
+packetLen(0x0adc, 6) // ZC_EQUIPWIN_OTHER
+
+// Packet: 0x0add
+packetLen(0x0add, 24) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x0ade
+packetLen(0x0ade, 6) // ZC_OVERWEIGHT_PERCENT
+
+// Packet: 0x0adf
+packetLen(0x0adf, 58) // ZC_ACK_REQNAME_TITLE
+
+// Packet: 0x0ae0
+packetLen(0x0ae0, 30)
+
+// Packet: 0x0ae1
+packetLen(0x0ae1, 28)
+
+// Packet: 0x0ae2
+packetLen(0x0ae2, 7) // ZC_OPEN_UI
+
+// Packet: 0x0ae3
+packetLen(0x0ae3, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ae4
+packetLen(0x0ae4, 89) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0ae5
+packetLen(0x0ae5, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0ae6
+packetLen(0x0ae6, 10)
+
+// Packet: 0x0ae7
+packetLen(0x0ae7, 38)
+
+// Packet: 0x0ae8
+packetLen(0x0ae8, 2)
+
+// Packet: 0x0ae9
+packetLen(0x0ae9, 13) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x0aec
+packetLen(0x0aec, 2)
+
+// Packet: 0x0aed
+packetLen(0x0aed, 2)
+
+// Packet: 0x0aee
+packetLen(0x0aee, 2)
+
+// Packet: 0x0aef
+packetLen(0x0aef, 2) // CZ_ATTENDANCE_REWARD_REQUEST
+
+// Packet: 0x0af0
+packetLen(0x0af0, 10) // ZC_UI_ACTION
+
+// Packet: 0x0af2
+packetLen(0x0af2, 40)
+
+// Packet: 0x0af3
+packetLen(0x0af3, -1)
+
+// Packet: 0x0af4
+packetLen(0x0af4, 11) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0af5
+packetLen(0x0af5, 3)
+
+// Packet: 0x0af6
+packetLen(0x0af6, 88)
+
+// Packet: 0x0af7
+packetLen(0x0af7, 32) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0af8
+packetLen(0x0af8, 11)
+
+// Packet: 0x0af9
+packetLen(0x0af9, 6)
+
+// Packet: 0x0afa
+packetLen(0x0afa, 54)
+
+// Packet: 0x0afb
+packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
+
+// Packet: 0x0afc
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
+
+// Packet: 0x0afd
+packetLen(0x0afd, -1) // ZC_GUILD_POSITION
+
+// Packet: 0x0afe
+packetLen(0x0afe, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x0aff
+packetLen(0x0aff, -1) // ZC_ALL_QUEST_LIST4
+
+// Packet: 0x0b00
+packetLen(0x0b00, 8)
+
+// Packet: 0x0b01
+packetLen(0x0b01, 56)
+
+// Packet: 0x0b02
+packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
+
+// Packet: 0x0b03
+packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
+
+// Packet: 0x0b04
+packetLen(0x0b04, 80)
+
+// Packet: 0x0b05
+packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
+
+// Packet: 0x0b07
+packetLen(0x0b07, -1)
+
+// Packet: 0x0b08
+packetLen(0x0b08, -1) // ZC_INVENTORY_START
+
+// Packet: 0x0b09
+packetLen(0x0b09, -1) // ZC_STORE_ITEMLIST_NORMAL_V6
+
+// Packet: 0x0b0a
+packetLen(0x0b0a, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0b0b
+packetLen(0x0b0b, 4) // ZC_INVENTORY_END
+
+// Packet: 0x0b0c
+packetLen(0x0b0c, 155) // ZC_ADD_QUEST_EX
+
+// Packet: 0x0b0d
+packetLen(0x0b0d, 10) // ZC_REMOVE_EFFECT
+
+// Packet: 0x0b0e
+packetLen(0x0b0e, -1) // ZC_NPC_BARTER_OPEN
+
+// Packet: 0x0b0f
+packetLen(0x0b0f, -1) // CZ_NPC_BARTER_PURCHASE
+
+// Packet: 0x0b10
+packetLen(0x0b10, 10) // CZ_START_USE_SKILL
+
+// Packet: 0x0b11
+packetLen(0x0b11, 4) // CZ_STOP_USE_SKILL
+
+// Packet: 0x0b12
+packetLen(0x0b12, 2) // CZ_NPC_BARTER_CLOSE
+
+// Packet: 0x0b13
+packetLen(0x0b13, 48) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0b14
+packetLen(0x0b14, 2) // CZ_INVENTORY_EXPAND
+
+// Packet: 0x0b15
+packetLen(0x0b15, 7) // ZC_ACK_INVENTORY_EXPAND
+
+// Packet: 0x0b16
+packetLen(0x0b16, 2) // CZ_INVENTORY_EXPAND_CONFIRMED
+
+// Packet: 0x0b17
+packetLen(0x0b17, 3) // ZC_ACK_INVENTORY_EXPAND_RESULT
+
+// Packet: 0x0b18
+packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
+
+// Packet: 0x0b19
+packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
+
+// Packet: 0x0b1a
+packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
+
+// Packet: 0x0b1b
+#if PACKETVER >= 20190130
+packetLen(0x0b1b, 2) // ZC_ALT_PING
+#endif
+
+// Packet: 0x0b1c
+#if PACKETVER >= 20190220
+packetLen(0x0b1c, 2) // CZ_PING
+#endif
+
+// Packet: 0x0b1d
+#if PACKETVER >= 20190220
+packetLen(0x0b1d, 2) // ZC_PING
+#endif
+
+// Packet: 0x0b1e
+#if PACKETVER >= 20190313
+packetLen(0x0b1e, 10)
+#endif
+
+// Packet: 0x0b1f
+#if PACKETVER >= 20190313
+packetLen(0x0b1f, 10)
+#endif
+
+// Packet: 0x0b20
+#if PACKETVER >= 20190327
+packetLen(0x0b20, 271) // ZC_SHORTCUT_KEY_LIST_V4
+#endif
+
+// Packet: 0x0b21
+#if PACKETVER >= 20190327
+packetLen(0x0b21, 13) // CZ_SHORTCUT_KEY_CHANGE
+#endif
+
+// Packet: 0x0b22
+#if PACKETVER >= 20190327
+packetLen(0x0b22, 5) // CZ_SHORTCUTKEYBAR_ROTATE
+#endif
+
+// Packet: 0x0b23
+#if PACKETVER >= 20190410
+packetLen(0x0b23, 6)
+#endif
+
+// Packet: 0x0b24
+#if PACKETVER >= 20190424
+packetLen(0x0b24, 6)
+#endif
+
+// Packet: 0x0b25
+#if PACKETVER >= 20190424
+packetLen(0x0b25, 6)
+#endif
+
+// Packet: 0x0b26
+#if PACKETVER >= 20190515
+// removed
+#elif PACKETVER >= 20190424
+packetLen(0x0b26, 16)
+#endif
+
+// Packet: 0x0b27
+#if PACKETVER >= 20190502
+packetLen(0x0b27, -1)
+#elif PACKETVER >= 20190424
+packetLen(0x0b27, 2)
+#endif
+
+// Packet: 0x0b28
+#if PACKETVER >= 20190515
+packetLen(0x0b28, 3)
+#elif PACKETVER >= 20190502
+packetLen(0x0b28, 22)
+#elif PACKETVER >= 20190424
+packetLen(0x0b28, -1)
+#endif
+
+// Packet: 0x0b29
+#if PACKETVER >= 20190502
+packetLen(0x0b29, 6)
+#elif PACKETVER >= 20190424
+packetLen(0x0b29, 3)
+#endif
+
+// Packet: 0x0b2a
+#if PACKETVER >= 20190529
+packetLen(0x0b2a, 40)
+#elif PACKETVER >= 20190502
+packetLen(0x0b2a, 6)
+#endif
+
+// Packet: 0x0b2b
+#if PACKETVER >= 20190515
+packetLen(0x0b2b, 11)
+#endif
+
+// Packet: 0x0b2c
+#if PACKETVER >= 20190515
+packetLen(0x0b2c, 3)
+#endif
+
+// Packet: 0x0b2d
+#if PACKETVER >= 20190515
+packetLen(0x0b2d, 11)
+#endif
+
+// Packet: 0x0b2e
+#if PACKETVER >= 20190515
+packetLen(0x0b2e, 4)
+#endif
+
+// Packet: 0x0b2f
+#if PACKETVER >= 20190529
+packetLen(0x0b2f, 73)
+#endif
+
+// Packet: 0x0b30
+#if PACKETVER >= 20190529
+packetLen(0x0b30, -1)
+#endif
+
+
+#endif /* COMMON_PACKETS2019_LEN_ZERO_H */
diff --git a/src/common/packets/packets_len_ad.h b/src/common/packets/packets_len_ad.h
index 98f842dde..adfe65a76 100644
--- a/src/common/packets/packets_len_ad.h
+++ b/src/common/packets/packets_len_ad.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets_len_main.h b/src/common/packets/packets_len_main.h
index b35715ca6..49711994d 100644
--- a/src/common/packets/packets_len_main.h
+++ b/src/common/packets/packets_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,9 @@
/* This file is autogenerated, please do not commit manual changes */
-#if PACKETVER >= 20180000
+#if PACKETVER >= 20190000
+#include "common/packets/packets2019_len_main.h"
+#elif PACKETVER >= 20180000
#include "common/packets/packets2018_len_main.h"
#elif PACKETVER >= 20170000
#include "common/packets/packets2017_len_main.h"
diff --git a/src/common/packets/packets_len_re.h b/src/common/packets/packets_len_re.h
index 86702ae7d..506a1ef80 100644
--- a/src/common/packets/packets_len_re.h
+++ b/src/common/packets/packets_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,9 @@
/* This file is autogenerated, please do not commit manual changes */
-#if PACKETVER >= 20180000
+#if PACKETVER >= 20190000
+#include "common/packets/packets2019_len_re.h"
+#elif PACKETVER >= 20180000
#include "common/packets/packets2018_len_re.h"
#elif PACKETVER >= 20170000
#include "common/packets/packets2017_len_re.h"
diff --git a/src/common/packets/packets_len_sak.h b/src/common/packets/packets_len_sak.h
index f39f8ba5d..e359ae1d2 100644
--- a/src/common/packets/packets_len_sak.h
+++ b/src/common/packets/packets_len_sak.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2019 Hercules Dev Team
+ * Copyright (C) 2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets_len_zero.h b/src/common/packets/packets_len_zero.h
index e0c63663e..10295cac2 100644
--- a/src/common/packets/packets_len_zero.h
+++ b/src/common/packets/packets_len_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,9 @@
/* This file is autogenerated, please do not commit manual changes */
-#if PACKETVER >= 20180000
+#if PACKETVER >= 20190000
+#include "common/packets/packets2019_len_zero.h"
+#elif PACKETVER >= 20180000
#include "common/packets/packets2018_len_zero.h"
#elif PACKETVER >= 20170000
#include "common/packets/packets2017_len_zero.h"
diff --git a/src/common/packetsstatic_len.h b/src/common/packetsstatic_len.h
index 9ccc4a673..730516c27 100644
--- a/src/common/packetsstatic_len.h
+++ b/src/common/packetsstatic_len.h
@@ -24,6 +24,14 @@
#error packetLen already defined
#endif
+#define DEFINE_PACKET_HEADER(name, id) \
+ STATIC_ASSERT((int32)(PACKET_LEN_##id) == -1 || sizeof(struct PACKET_##name) == \
+ (size_t)PACKET_LEN_##id, "Wrong size PACKET_"#name); \
+ enum { HEADER_##name = id };
+
+#define DEFINE_PACKET_ID(name, id) \
+ enum { HEADER_##name = id };
+
#define packetLen(id, len) PACKET_LEN_##id = (len),
enum packet_lengths {
#include "common/packets_len.h"
diff --git a/src/common/socket.c b/src/common/socket.c
index 025776172..8ee4f06e2 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -79,8 +79,6 @@
static struct socket_interface sockt_s;
struct socket_interface *sockt;
-static const char *SOCKET_CONF_FILENAME = "conf/common/socket.conf";
-
#ifdef SEND_SHORTLIST
// Add a fd to the shortlist so that it'll be recognized as a fd that needs
// sending done on it.
@@ -462,7 +460,7 @@ static int recv_to_fifo(int fd)
socket_data_ci += len;
}
#endif // SHOW_SERVER_STATS
- return 0;
+ return (int)len;
}
static int send_from_fifo(int fd)
@@ -490,11 +488,12 @@ static int send_from_fifo(int fd)
return 0;
}
- if( len > 0 )
+ if (len > 0)
{
+ sockt->session[fd]->wdata_tick = sockt->last_tick;
// some data could not be transferred?
// shift unsent data to the beginning of the queue
- if( (size_t)len < sockt->session[fd]->wdata_size )
+ if ((size_t)len < sockt->session[fd]->wdata_size)
memmove(sockt->session[fd]->wdata, sockt->session[fd]->wdata + len, sockt->session[fd]->wdata_size - len);
sockt->session[fd]->wdata_size -= len;
@@ -648,9 +647,10 @@ static int make_listen_bind(uint32 ip, uint16 port)
if(sockt->fd_max <= fd) sockt->fd_max = fd + 1;
- create_session(fd, connect_client, null_send, null_parse);
+ create_session(fd, sockt->connect_client, null_send, null_parse);
sockt->session[fd]->client_addr = 0; // just listens
sockt->session[fd]->rdata_tick = 0; // disable timeouts on this socket
+ sockt->session[fd]->wdata_tick = 0;
return fd;
}
@@ -733,6 +733,7 @@ static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseF
sockt->session[fd]->func_send = func_send;
sockt->session[fd]->func_parse = func_parse;
sockt->session[fd]->rdata_tick = sockt->last_tick;
+ sockt->session[fd]->wdata_tick = sockt->last_tick;
sockt->session[fd]->session_data = NULL;
sockt->session[fd]->hdata = NULL;
return 0;
@@ -1505,7 +1506,7 @@ static bool socket_config_read(const char *filename, bool imported)
// import should overwrite any previous configuration, so it should be called last
if (libconfig->lookup_string(&config, "import", &import) == CONFIG_TRUE) {
- if (strcmp(import, filename) == 0 || strcmp(import, SOCKET_CONF_FILENAME) == 0) {
+ if (strcmp(import, filename) == 0 || strcmp(import, sockt->SOCKET_CONF_FILENAME) == 0) {
ShowWarning("socket_config_read: Loop detected! Skipping 'import'...\n");
} else {
if (!socket_config_read(import, true))
@@ -1714,7 +1715,7 @@ static void socket_init(void)
// Get initial local ips
sockt->naddr_ = sockt->getips(sockt->addr_,16);
- socket_config_read(SOCKET_CONF_FILENAME, false);
+ socket_config_read(sockt->SOCKET_CONF_FILENAME, false);
#ifndef SOCKET_EPOLL
// Select based Event Dispatcher:
@@ -1855,7 +1856,7 @@ static void socket_datasync(int fd, bool send)
WFIFOL(fd, 4 + ( i * 4 ) ) = data_list[i].length;
}
- WFIFOSET(fd, p_len);
+ WFIFOSET2(fd, p_len);
} else {
for( i = 0; i < alen; i++ ) {
if( RFIFOL(fd, 4 + (i * 4) ) != data_list[i].length ) {
@@ -1864,7 +1865,7 @@ static void socket_datasync(int fd, bool send)
WFIFOW(fd, 0) = 0x2b0a;
WFIFOW(fd, 2) = 8;
WFIFOL(fd, 4) = 0;
- WFIFOSET(fd, 8);
+ WFIFOSET2(fd, 8);
sockt->flush(fd);
/* shut down */
ShowFatalError("Servers are out of sync! recompile from scratch (%d)\n",i);
@@ -2133,7 +2134,7 @@ static void socket_validateWfifo(int fd, size_t len)
ShowError("Sent packet 0x%04X with size %d, but must be size %d\n", cmd, len2, packet_len);
Assert_retv(0);
}
- if (last_head_size < packet_len) {
+ if (last_head_size < (uint32)packet_len) {
ShowError("Reserved too small packet buffer for packet 0x%04X with size %u, but must be size %d\n", cmd, last_head_size, packet_len);
Assert_retv(0);
}
@@ -2143,6 +2144,8 @@ void socket_defaults(void)
{
sockt = &sockt_s;
+ sockt->SOCKET_CONF_FILENAME = "conf/common/socket.conf";
+
sockt->fd_max = 0;
/* */
sockt->stall_time = 60;
@@ -2177,6 +2180,7 @@ void socket_defaults(void)
/* */
sockt->flush = flush_fifo;
sockt->flush_fifos = flush_fifos;
+ sockt->connect_client = connect_client;
sockt->set_nonblocking = set_nonblocking;
sockt->set_defaultparse = set_defaultparse;
sockt->host2ip = host2ip;
diff --git a/src/common/socket.h b/src/common/socket.h
index 5e4251989..b20b0b07e 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -130,6 +130,7 @@ struct socket_data {
size_t rdata_pos;
uint32 last_head_size;
time_t rdata_tick; // time of last recv (for detecting timeouts); zero when timeout is disabled
+ time_t wdata_tick; // time of last send (for detecting timeouts);
RecvFunc func_recv;
SendFunc func_send;
@@ -178,6 +179,7 @@ struct socket_interface {
time_t stall_time;
time_t last_tick;
+ const char *SOCKET_CONF_FILENAME;
/* */
uint32 addr_[16]; // ip addresses of local host (host byte order)
int naddr_; // # of ip addresses
@@ -212,6 +214,7 @@ struct socket_interface {
/* */
void (*flush) (int fd);
void (*flush_fifos) (void);
+ int (*connect_client) (int listen_fd);
void (*set_nonblocking) (int fd, unsigned long yes);
void (*set_defaultparse) (ParseFunc defaultparse);
/* hostname/ip conversion functions */
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index b8cb2a90a..e3977f440 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2015 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -221,8 +221,12 @@ enum windows_ver_suite {
#define SYSINFO_COMPILER "Microsoft Visual C++ 2012 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
#elif _MSC_VER >= 1800 && _MSC_VER < 1900
#define SYSINFO_COMPILER "Microsoft Visual C++ 2013 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
-#elif _MSC_VER >= 1900 && _MSC_VER < 2000
+#elif _MSC_VER >= 1900 && _MSC_VER < 1910
#define SYSINFO_COMPILER "Microsoft Visual C++ 2015 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1910 && _MSC_VER < 1920
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2017 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1920 && _MSC_VER < 2000
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2019 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
#else // < 1300 || >= 2000
#define SYSINFO_COMPILER "Microsoft Visual C++ v" EXPAND_AND_QUOTE(_MSC_VER)
#endif
diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c
index e5dc126eb..304db5501 100644
--- a/src/login/HPMlogin.c
+++ b/src/login/HPMlogin.c
@@ -30,6 +30,8 @@
#include "login/lclif.p.h"
#include "login/login.h"
#include "login/loginlog.h"
+#include "login/packets_ac_struct.h"
+#include "login/packets_ca_struct.h"
#include "common/HPMi.h"
#include "common/conf.h"
#include "common/console.h"
diff --git a/src/login/lclif.c b/src/login/lclif.c
index 1cb8bfdbd..97871922d 100644
--- a/src/login/lclif.c
+++ b/src/login/lclif.c
@@ -24,6 +24,8 @@
#include "login/ipban.h"
#include "login/login.h"
#include "login/loginlog.h"
+#include "login/packets_ac_struct.h"
+#include "login/packets_ca_struct.h"
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/db.h"
@@ -49,10 +51,10 @@ struct lclif_interface *lclif;
/// @copydoc lclif_interface::connection_error()
static void lclif_connection_error(int fd, uint8 error)
{
- struct packet_SC_NOTIFY_BAN *packet = NULL;
+ struct PACKET_SC_NOTIFY_BAN *packet = NULL;
WFIFOHEAD(fd, sizeof(*packet));
packet = WP2PTR(fd);
- packet->packet_id = PACKET_ID_SC_NOTIFY_BAN;
+ packet->packet_id = HEADER_SC_NOTIFY_BAN;
packet->error_code = error;
WFIFOSET(fd, sizeof(*packet));
}
@@ -68,7 +70,7 @@ static enum parsefunc_rcode lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct l
static enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd)
{
- const struct packet_CA_EXE_HASHCHECK *packet = RP2PTR(fd);
+ const struct PACKET_CA_EXE_HASHCHECK *packet = RP2PTR(fd);
sd->has_client_hash = 1;
memcpy(sd->client_hash, packet->hash_value, 16);
return PACKET_VALID;
@@ -78,7 +80,7 @@ static enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_se
static enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd)
{
- const struct packet_CA_LOGIN *packet = RP2PTR(fd);
+ const struct PACKET_CA_LOGIN *packet = RP2PTR(fd);
sd->version = packet->version;
sd->clienttype = packet->clienttype;
@@ -97,7 +99,7 @@ static enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_da
static enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd)
{
- const struct packet_CA_LOGIN2 *packet = RP2PTR(fd);
+ const struct PACKET_CA_LOGIN2 *packet = RP2PTR(fd);
sd->version = packet->version;
sd->clienttype = packet->clienttype;
@@ -113,7 +115,7 @@ static enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_d
static enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd)
{
- const struct packet_CA_LOGIN3 *packet = RP2PTR(fd);
+ const struct PACKET_CA_LOGIN3 *packet = RP2PTR(fd);
sd->version = packet->version;
sd->clienttype = packet->clienttype;
@@ -131,7 +133,7 @@ static enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_d
static enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd)
{
- const struct packet_CA_LOGIN4 *packet = RP2PTR(fd);
+ const struct PACKET_CA_LOGIN4 *packet = RP2PTR(fd);
sd->version = packet->version;
sd->clienttype = packet->clienttype;
@@ -149,7 +151,7 @@ static enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_d
static enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd)
{
- const struct packet_CA_LOGIN_PCBANG *packet = RP2PTR(fd);
+ const struct PACKET_CA_LOGIN_PCBANG *packet = RP2PTR(fd);
sd->version = packet->version;
sd->clienttype = packet->clienttype;
@@ -171,7 +173,7 @@ static enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_ses
static enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd)
{
- const struct packet_CA_LOGIN_HAN *packet = RP2PTR(fd);
+ const struct PACKET_CA_LOGIN_HAN *packet = RP2PTR(fd);
sd->version = packet->version;
sd->clienttype = packet->clienttype;
@@ -194,11 +196,11 @@ static enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_sessio
static enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd)
{
- const struct packet_CA_SSO_LOGIN_REQ *packet = RP2PTR(fd);
+ const struct PACKET_CA_SSO_LOGIN_REQ *packet = RP2PTR(fd);
int tokenlen = (int)RFIFOREST(fd) - (int)sizeof(*packet);
if (tokenlen > PASSWD_LEN || tokenlen < 1) {
- ShowError("packet_CA_SSO_LOGIN_REQ: Token length is not between allowed password length, kicking player ('%s')", packet->id);
+ ShowError("PACKET_CA_SSO_LOGIN_REQ: Token length is not between allowed password length, kicking player ('%s')", packet->id);
sockt->eof(fd);
return PACKET_VALID;
}
@@ -220,11 +222,27 @@ static enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_se
static enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd)
{
- //const struct packet_CA_LOGIN_OTP *packet = RP2PTR(fd);
+ //const struct PACKET_CA_LOGIN_OTP *packet = RP2PTR(fd);
login->client_login_otp(fd, sd);
return PACKET_VALID;
}
+/// @copydoc lclif_interface_private::parse_CA_ACK_MOBILE_OTP()
+static enum parsefunc_rcode lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_session_data *sd)
+{
+ // TODO: parsing packet data
+ return PACKET_VALID;
+}
+
+/// @copydoc lclif_interface_private::parse_CA_OTP_CODE()
+static enum parsefunc_rcode lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd)
+{
+ // TODO: parsing packet data
+ return PACKET_VALID;
+}
+
/// @copydoc lclif_interface_private::parse_CA_REQ_HASH()
static enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd)
@@ -255,7 +273,7 @@ static bool lclif_send_server_list(struct login_session_data *sd)
{
int server_num = 0, i, n, length;
uint32 ip;
- struct packet_AC_ACCEPT_LOGIN *packet = NULL;
+ struct PACKET_AC_ACCEPT_LOGIN *packet = NULL;
for (i = 0; i < ARRAYLENGTH(login->dbs->server); ++i) {
if (sockt->session_is_active(login->dbs->server[i].fd))
@@ -272,9 +290,9 @@ static bool lclif_send_server_list(struct login_session_data *sd)
packet = WP2PTR(sd->fd);
#if PACKETVER < 20170315
- packet->packet_id = PACKET_ID_AC_ACCEPT_LOGIN;
+ packet->packet_id = HEADER_AC_ACCEPT_LOGIN;
#else
- packet->packet_id = PACKET_ID_AC_ACCEPT_LOGIN2;
+ packet->packet_id = HEADER_AC_ACCEPT_LOGIN2;
#endif
packet->packet_len = length;
packet->auth_code = sd->login_id1;
@@ -312,14 +330,14 @@ static bool lclif_send_server_list(struct login_session_data *sd)
static void lclif_send_auth_failed(int fd, time_t ban, uint32 error)
{
#if PACKETVER >= 20180627
- struct packet_AC_REFUSE_LOGIN_R2 *packet = NULL;
- int packet_id = PACKET_ID_AC_REFUSE_LOGIN_R3;
+ struct PACKET_AC_REFUSE_LOGIN_R2 *packet = NULL;
+ int packet_id = HEADER_AC_REFUSE_LOGIN_R3;
#elif PACKETVER >= 20101123
- struct packet_AC_REFUSE_LOGIN_R2 *packet = NULL;
- int packet_id = PACKET_ID_AC_REFUSE_LOGIN_R2;
+ struct PACKET_AC_REFUSE_LOGIN_R2 *packet = NULL;
+ int packet_id = HEADER_AC_REFUSE_LOGIN_R2;
#else
- struct packet_AC_REFUSE_LOGIN *packet = NULL;
- int packet_id = PACKET_ID_AC_REFUSE_LOGIN;
+ struct PACKET_AC_REFUSE_LOGIN *packet = NULL;
+ int packet_id = HEADER_AC_REFUSE_LOGIN;
#endif
WFIFOHEAD(fd, sizeof(*packet));
packet = WP2PTR(fd);
@@ -335,10 +353,10 @@ static void lclif_send_auth_failed(int fd, time_t ban, uint32 error)
/// @copydoc lclif_interface::login_error()
static void lclif_send_login_error(int fd, uint8 error)
{
- struct packet_AC_REFUSE_LOGIN *packet = NULL;
+ struct PACKET_AC_REFUSE_LOGIN *packet = NULL;
WFIFOHEAD(fd, sizeof(*packet));
packet = WP2PTR(fd);
- packet->packet_id = PACKET_ID_AC_REFUSE_LOGIN;
+ packet->packet_id = HEADER_AC_REFUSE_LOGIN;
packet->error_code = error;
memset(packet->block_date, '\0', sizeof(packet->block_date));
WFIFOSET(fd, sizeof(*packet));
@@ -348,12 +366,12 @@ static void lclif_send_login_error(int fd, uint8 error)
static void lclif_send_coding_key(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static void lclif_send_coding_key(int fd, struct login_session_data *sd)
{
- struct packet_AC_ACK_HASH *packet = NULL;
+ struct PACKET_AC_ACK_HASH *packet = NULL;
int16 size = sizeof(*packet) + sd->md5keylen;
WFIFOHEAD(fd, size);
packet = WP2PTR(fd);
- packet->packet_id = PACKET_ID_AC_ACK_HASH;
+ packet->packet_id = HEADER_AC_ACK_HASH;
packet->packet_len = size;
memcpy(packet->secret, sd->md5key, sd->md5keylen);
WFIFOSET(fd, size);
@@ -476,7 +494,7 @@ static enum parsefunc_rcode lclif_parse_sub(int fd, struct login_session_data *s
/// @copydoc lclif_interface::packet()
static const struct login_packet_db *lclif_packet(int16 packet_id)
{
- if (packet_id == PACKET_ID_CA_CHARSERVERCONNECT)
+ if (packet_id == HEADER_CA_CHARSERVERCONNECT)
return &lclif->p->dbs->packet_db[0];
if (packet_id > MAX_PACKET_LOGIN_DB || packet_id < MIN_PACKET_DB)
@@ -503,8 +521,8 @@ static void packetdb_loaddb(void)
int16 packet_len;
LoginParseFunc **pFunc;
} packet[] = {
-#define packet_def(name) { PACKET_ID_ ## name, sizeof(struct packet_ ## name), &lclif->p->parse_ ## name }
-#define packet_def2(name, len) { PACKET_ID_ ## name, (len), &lclif->p->parse_ ## name }
+#define packet_def(name) { HEADER_ ## name, sizeof(struct PACKET_ ## name), &lclif->p->parse_ ## name }
+#define packet_def2(name, len) { HEADER_ ## name, (len), &lclif->p->parse_ ## name }
packet_def(CA_CONNECT_INFO_CHANGED),
packet_def(CA_EXE_HASHCHECK),
packet_def(CA_LOGIN),
@@ -515,6 +533,12 @@ static void packetdb_loaddb(void)
packet_def(CA_LOGIN_HAN),
packet_def2(CA_SSO_LOGIN_REQ, -1),
packet_def(CA_LOGIN_OTP),
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114
+ packet_def(CA_ACK_MOBILE_OTP),
+#endif
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114 || defined(PACKETVER_ZERO)
+ packet_def(CA_OTP_CODE),
+#endif
packet_def(CA_REQ_HASH),
#undef packet_def
#undef packet_def2
@@ -531,7 +555,7 @@ static void packetdb_loaddb(void)
}
//Explict case, we will save character login packet in position 0 which is unused and not valid by normal
- lclif->p->dbs->packet_db[0].len = sizeof(struct packet_CA_CHARSERVERCONNECT);
+ lclif->p->dbs->packet_db[0].len = sizeof(struct PACKET_CA_CHARSERVERCONNECT);
lclif->p->dbs->packet_db[0].pFunc = &lclif->p->parse_CA_CHARSERVERCONNECT;
}
@@ -579,6 +603,8 @@ void lclif_defaults(void)
lclif->p->parse_CA_LOGIN_HAN = lclif_parse_CA_LOGIN_HAN;
lclif->p->parse_CA_SSO_LOGIN_REQ = lclif_parse_CA_SSO_LOGIN_REQ;
lclif->p->parse_CA_LOGIN_OTP = lclif_parse_CA_LOGIN_OTP;
+ lclif->p->parse_CA_ACK_MOBILE_OTP = lclif_parse_CA_ACK_MOBILE_OTP;
+ lclif->p->parse_CA_OTP_CODE = lclif_parse_CA_OTP_CODE;
lclif->p->parse_CA_REQ_HASH = lclif_parse_CA_REQ_HASH;
lclif->p->parse_CA_CHARSERVERCONNECT = lclif_parse_CA_CHARSERVERCONNECT;
}
diff --git a/src/login/lclif.h b/src/login/lclif.h
index d1e4317a2..26c061367 100644
--- a/src/login/lclif.h
+++ b/src/login/lclif.h
@@ -87,8 +87,8 @@ struct lclif_interface {
* @param fd The client connection file descriptor.
* @param ban The ban duration (if error == 6).
* @param error The authentication error code.
- * @see #PACKET_ID_AC_REFUSE_LOGIN.
- * @see #PACKET_ID_AC_REFUSE_LOGIN_R2.
+ * @see #HEADER_AC_REFUSE_LOGIN.
+ * @see #HEADER_AC_REFUSE_LOGIN_R2.
*/
void (*auth_failed)(int fd, time_t ban, uint32 error);
diff --git a/src/login/lclif.p.h b/src/login/lclif.p.h
index a80caafa2..cc9805ea8 100644
--- a/src/login/lclif.p.h
+++ b/src/login/lclif.p.h
@@ -31,279 +31,17 @@
/* Definitions and macros */
/// Maximum amount of packets processed at once from the same client
+#ifndef MAX_PROCESSED_PACKETS
#define MAX_PROCESSED_PACKETS (3)
+#endif
// Packet DB
+#ifndef MIN_PACKET_DB
#define MIN_PACKET_DB 0x0064
-#define MAX_PACKET_LOGIN_DB 0x0acf
-
-/* Enums */
-
-/// Packet IDs
-enum login_packet_id {
- // CA (Client to Login)
- PACKET_ID_CA_LOGIN = 0x0064,
- PACKET_ID_CA_LOGIN2 = 0x01dd,
- PACKET_ID_CA_LOGIN3 = 0x01fa,
- PACKET_ID_CA_CONNECT_INFO_CHANGED = 0x0200,
- PACKET_ID_CA_EXE_HASHCHECK = 0x0204,
- PACKET_ID_CA_LOGIN_PCBANG = 0x0277,
- PACKET_ID_CA_LOGIN4 = 0x027c,
- PACKET_ID_CA_LOGIN_HAN = 0x02b0,
- PACKET_ID_CA_SSO_LOGIN_REQ = 0x0825,
- PACKET_ID_CA_LOGIN_OTP = 0x0acf,
- PACKET_ID_CA_REQ_HASH = 0x01db,
- PACKET_ID_CA_CHARSERVERCONNECT = 0x2710, // Custom Hercules Packet
- //PACKET_ID_CA_SSO_LOGIN_REQa = 0x825a, /* unused */
-
- // AC (Login to Client)
-
- PACKET_ID_AC_ACCEPT_LOGIN = 0x0069,
- PACKET_ID_AC_ACCEPT_LOGIN2 = 0x0ac4,
- PACKET_ID_AC_REFUSE_LOGIN = 0x006a,
- PACKET_ID_SC_NOTIFY_BAN = 0x0081,
- PACKET_ID_AC_ACK_HASH = 0x01dc,
- PACKET_ID_AC_REFUSE_LOGIN_R2 = 0x083e,
- PACKET_ID_AC_REFUSE_LOGIN_R3 = 0x0b02,
-};
-
-/* Packets Structs */
-#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
-#pragma pack(push, 1)
-#endif // not NetBSD < 6 / Solaris
-
-/**
- * Packet structure for CA_LOGIN.
- */
-struct packet_CA_LOGIN {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_LOGIN)
- uint32 version; ///< Client Version
- char id[24]; ///< Username
- char password[24]; ///< Password
- uint8 clienttype; ///< Client Type
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_LOGIN2.
- */
-struct packet_CA_LOGIN2 {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_LOGIN2)
- uint32 version; ///< Client Version
- char id[24]; ///< Username
- uint8 password_md5[16]; ///< Password hash
- uint8 clienttype; ///< Client Type
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_LOGIN3.
- */
-struct packet_CA_LOGIN3 {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_LOGIN3)
- uint32 version; ///< Client Version
- char id[24]; ///< Username
- uint8 password_md5[16]; ///< Password hash
- uint8 clienttype; ///< Client Type
- uint8 clientinfo; ///< Index of the connection in the clientinfo file (+10 if the command-line contains "pc")
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_LOGIN4.
- */
-struct packet_CA_LOGIN4 {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_LOGIN4)
- uint32 version; ///< Client Version
- char id[24]; ///< Username
- uint8 password_md5[16]; ///< Password hash
- uint8 clienttype; ///< Client Type
- char mac_address[13]; ///< MAC Address
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_LOGIN_PCBANG.
- */
-struct packet_CA_LOGIN_PCBANG {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_LOGIN_PCBANG)
- uint32 version; ///< Client Version
- char id[24]; ///< Username
- char password[24]; ///< Password
- uint8 clienttype; ///< Client Type
- char ip[16]; ///< IP Address
- char mac_address[13]; ///< MAC Address
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_LOGIN_HAN.
- */
-struct packet_CA_LOGIN_HAN {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_LOGIN_HAN)
- uint32 version; ///< Client Version
- char id[24]; ///< Username
- char password[24]; ///< Password
- uint8 clienttype; ///< Client Type
- char ip[16]; ///< IP Address
- char mac_address[13]; ///< MAC Address
- uint8 is_han_game_user; ///< 'isGravityID'
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_SSO_LOGIN_REQ.
- *
- * Variable-length packet.
- */
-struct packet_CA_SSO_LOGIN_REQ {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_SSO_LOGIN_REQ)
- int16 packet_len; ///< Length (variable length)
- uint32 version; ///< Clientver
- uint8 clienttype; ///< Clienttype
- char id[24]; ///< Username
- char password[27]; ///< Password
- int8 mac_address[17]; ///< MAC Address
- char ip[15]; ///< IP Address
- char t1[]; ///< SSO Login Token (variable length)
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_LOGIN_OTP.
- */
-struct packet_CA_LOGIN_OTP {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_LOGIN_OTP)
-#if PACKETVER >= 20171113
- uint32 devFlags; ///< flags including dev flag
#endif
- char login[25]; ///< Username
- char password[32]; ///< Password encrypted by rijndael
- char flagsStr[5]; ///< Unknown flags. Normally string: G000
-} __attribute__((packed));
-
-#if 0 // Unused
-struct packet_CA_SSO_LOGIN_REQa {
- int16 packet_id;
- int16 packet_len;
- uint32 version;
- uint8 clienttype;
- char id[24];
- int8 mac_address[17];
- char ip[15];
- char t1[];
-} __attribute__((packed));
-#endif // unused
-
-/**
- * Packet structure for CA_CONNECT_INFO_CHANGED.
- *
- * New alive packet. Used to verify if client is always alive.
- */
-struct packet_CA_CONNECT_INFO_CHANGED {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_CONNECT_INFO_CHANGED)
- char id[24]; ///< account.userid
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_EXE_HASHCHECK.
- *
- * (kRO 2004-05-31aSakexe langtype 0 and 6)
- */
-struct packet_CA_EXE_HASHCHECK {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_EXE_HASHCHECK)
- uint8 hash_value[16]; ///< Client MD5 hash
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_REQ_HASH.
- */
-struct packet_CA_REQ_HASH {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_REQ_HASH)
-} __attribute__((packed));
-
-/**
- * Packet structure for CA_CHARSERVERCONNECT.
- *
- * This packet is used internally, to signal a char-server connection.
- */
-struct packet_CA_CHARSERVERCONNECT {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_CHARSERVERCONNECT)
- char userid[24]; ///< Username
- char password[24]; ///< Password
- int32 unknown;
- int32 ip; ///< Charserver IP
- int16 port; ///< Charserver port
- char name[20]; ///< Charserver name
- int16 unknown2;
- int16 type; ///< Charserver type
- int16 new; ///< Whether charserver is to be marked as new
-} __attribute__((packed));
-
-/**
- * Packet structure for SC_NOTIFY_BAN.
- */
-struct packet_SC_NOTIFY_BAN {
- int16 packet_id; ///< Packet ID (#PACKET_ID_SC_NOTIFY_BAN)
- uint8 error_code; ///< Error code
-} __attribute__((packed));
-
-/**
- * Packet structure for AC_REFUSE_LOGIN.
- */
-struct packet_AC_REFUSE_LOGIN {
- int16 packet_id; ///< Packet ID (#PACKET_ID_AC_REFUSE_LOGIN)
- uint8 error_code; ///< Error code
- char block_date[20]; ///< Ban expiration date
-} __attribute__((packed));
-
-/**
- * Packet structure for AC_REFUSE_LOGIN_R2.
- */
-struct packet_AC_REFUSE_LOGIN_R2 {
- int16 packet_id; ///< Packet ID (#PACKET_ID_AC_REFUSE_LOGIN_R2)
- uint32 error_code; ///< Error code
- char block_date[20]; ///< Ban expiration date
-} __attribute__((packed));
-
-/**
- * Packet structure for AC_ACCEPT_LOGIN.
- *
- * Variable-length packet.
- */
-struct packet_AC_ACCEPT_LOGIN {
- int16 packet_id; ///< Packet ID (#PACKET_ID_AC_ACCEPT_LOGIN)
- int16 packet_len; ///< Packet length (variable length)
- int32 auth_code; ///< Authentication code
- uint32 aid; ///< Account ID
- uint32 user_level; ///< User level
- uint32 last_login_ip; ///< Last login IP
- char last_login_time[26]; ///< Last login timestamp
- uint8 sex; ///< Account sex
-#if PACKETVER >= 20170315
- char twitter_auth_token[16];
- uint8 twitter_flag;
+#ifndef MAX_PACKET_LOGIN_DB
+#define MAX_PACKET_LOGIN_DB 0x0ad0
#endif
- struct {
- uint32 ip; ///< Server IP address
- int16 port; ///< Server port
- char name[20]; ///< Server name
- uint16 usercount; ///< Online users
- uint16 state; ///< Server state
- uint16 property; ///< Server property
-#if PACKETVER >= 20170315
- char unknown2[128];
-#endif
- } server_list[]; ///< List of charservers
-} __attribute__((packed));
-
-/**
- * Packet structure for AC_ACK_HASH.
- *
- * Variable-length packet
- */
-struct packet_AC_ACK_HASH {
- int16 packet_id; ///< Packet ID (#PACKET_ID_AC_ACK_HASH)
- int16 packet_len; ///< Packet length (variable length)
- uint8 secret[]; ///< Challenge string
-} __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
/**
* Login Client Interface additional data
@@ -332,18 +70,20 @@ struct lclif_interface_private {
*/
enum parsefunc_rcode (*parse_sub)(int fd, struct login_session_data *sd);
- LoginParseFunc *parse_CA_CONNECT_INFO_CHANGED; ///< Packet handler for #packet_CA_CONNECT_INFO_CHANGED.
- LoginParseFunc *parse_CA_EXE_HASHCHECK; ///< Packet handler for #packet_CA_EXE_HASHCHECK.
- LoginParseFunc *parse_CA_LOGIN; ///< Packet handler for #packet_CA_LOGIN.
- LoginParseFunc *parse_CA_LOGIN2; ///< Packet handler for #packet_CA_LOGIN2.
- LoginParseFunc *parse_CA_LOGIN3; ///< Packet handler for #packet_CA_LOGIN3.
- LoginParseFunc *parse_CA_LOGIN4; ///< Packet handler for #packet_CA_LOGIN4.
- LoginParseFunc *parse_CA_LOGIN_PCBANG; ///< Packet handler for #packet_CA_LOGIN_PCBANG.
- LoginParseFunc *parse_CA_LOGIN_HAN; ///< Packet handler for #packet_CA_LOGIN_HAN.
- LoginParseFunc *parse_CA_SSO_LOGIN_REQ; ///< Packet handler for #packet_CA_SSO_LOGIN_REQ.
- LoginParseFunc *parse_CA_LOGIN_OTP; ///< Packet handler for #packet_CA_LOGIN_OTP.
- LoginParseFunc *parse_CA_REQ_HASH; ///< Packet handler for #packet_CA_REQ_HASH.
- LoginParseFunc *parse_CA_CHARSERVERCONNECT; ///< Packet handler for #packet_CA_CHARSERVERCONNECT.
+ LoginParseFunc *parse_CA_CONNECT_INFO_CHANGED; ///< Packet handler for #PACKET_CA_CONNECT_INFO_CHANGED.
+ LoginParseFunc *parse_CA_EXE_HASHCHECK; ///< Packet handler for #PACKET_CA_EXE_HASHCHECK.
+ LoginParseFunc *parse_CA_LOGIN; ///< Packet handler for #PACKET_CA_LOGIN.
+ LoginParseFunc *parse_CA_LOGIN2; ///< Packet handler for #PACKET_CA_LOGIN2.
+ LoginParseFunc *parse_CA_LOGIN3; ///< Packet handler for #PACKET_CA_LOGIN3.
+ LoginParseFunc *parse_CA_LOGIN4; ///< Packet handler for #PACKET_CA_LOGIN4.
+ LoginParseFunc *parse_CA_LOGIN_PCBANG; ///< Packet handler for #PACKET_CA_LOGIN_PCBANG.
+ LoginParseFunc *parse_CA_LOGIN_HAN; ///< Packet handler for #PACKET_CA_LOGIN_HAN.
+ LoginParseFunc *parse_CA_SSO_LOGIN_REQ; ///< Packet handler for #PACKET_CA_SSO_LOGIN_REQ.
+ LoginParseFunc *parse_CA_LOGIN_OTP; ///< Packet handler for #PACKET_CA_LOGIN_OTP.
+ LoginParseFunc *parse_CA_ACK_MOBILE_OTP; ///< Packet handler for #PACKET_CA_ACK_MOBILE_OTP.
+ LoginParseFunc *parse_CA_OTP_CODE; ///< Packet handler for #PACKET_CA_OTP_CODE.
+ LoginParseFunc *parse_CA_REQ_HASH; ///< Packet handler for #PACKET_CA_REQ_HASH.
+ LoginParseFunc *parse_CA_CHARSERVERCONNECT; ///< Packet handler for #PACKET_CA_CHARSERVERCONNECT.
};
#endif // LOGIN_LCLIF_P_H
diff --git a/src/login/login.c b/src/login/login.c
index c1844cb25..580f79ebb 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -27,6 +27,7 @@
#include "login/ipban.h"
#include "login/loginlog.h"
#include "login/lclif.h"
+#include "login/packets_ac_struct.h"
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/conf.h"
@@ -35,6 +36,7 @@
#include "common/memmgr.h"
#include "common/md5calc.h"
#include "common/nullpo.h"
+#include "common/packetsstatic_len.h"
#include "common/random.h"
#include "common/showmsg.h"
#include "common/socket.h"
@@ -1368,36 +1370,37 @@ static bool login_client_login(int fd, struct login_session_data *sd)
static bool login_client_login_otp(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static bool login_client_login_otp(int fd, struct login_session_data *sd)
{
+#if PACKETVER_MAIN_NUM >= 20170621 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
// send ok response with fake token
-#ifdef PACKETVER_ZERO
-#if PACKETVER >= 20171127
- WFIFOHEAD(fd, 33);
- WFIFOW(fd, 0) = 0x0ae3;
- WFIFOW(fd, 2) = 33; // len
- WFIFOL(fd, 4) = 0; // normal login
- safestrncpy(WFIFOP(fd, 8), "S1000", 6);
- safestrncpy(WFIFOP(fd, 28), "token", 6);
- WFIFOSET(fd, 33);
-#elif PACKETVER >= 20171123
- WFIFOHEAD(fd, 19);
- WFIFOW(fd, 0) = 0x0ae3;
- WFIFOW(fd, 2) = 19; // len
- WFIFOL(fd, 4) = 0; // normal login
- safestrncpy(WFIFOP(fd, 8), "S1000", 6);
- safestrncpy(WFIFOP(fd, 14), "token", 6);
- WFIFOSET(fd, 19);
-#else
- WFIFOHEAD(fd, 13);
- WFIFOW(fd, 0) = 0x0ad1;
- WFIFOW(fd, 2) = 13; // len
- WFIFOL(fd, 4) = 0; // normal login
- safestrncpy(WFIFOP(fd, 8), "token", 6);
- WFIFOSET(fd, 13);
-#endif
+ const int len = sizeof(struct PACKET_AC_LOGIN_OTP) + 6; // + "token" string
+ WFIFOHEAD(fd, len);
+ struct PACKET_AC_LOGIN_OTP *packet = WP2PTR(sd->fd);
+ memset(packet, 0, len);
+ packet->packet_id = HEADER_AC_LOGIN_OTP;
+ packet->packet_len = len;
+ packet->loginFlag = 0; // normal login
+#if PACKETVER_MAIN_NUM >= 20171213 || PACKETVER_RE_NUM >= 20171213 || PACKETVER_ZERO_NUM >= 20171123
+ safestrncpy(packet->loginFlag2, "S1000", 6);
+#endif // PACKETVER_MAIN_NUM >= 20171213 || PACKETVER_RE_NUM >= 20171213 || PACKETVER_ZERO_NUM >= 20171123
+
+ safestrncpy(packet->token, "token", 6);
+ WFIFOSET(fd, len);
return true;
-#else // PACKETVER_ZERO
+#else // PACKETVER_MAIN_NUM >= 20170621 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
return false;
-#endif // PACKETVER_ZERO
+#endif // PACKETVER_MAIN_NUM >= 20170621 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
+}
+
+static void login_client_login_mobile_otp_request(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static void login_client_login_mobile_otp_request(int fd, struct login_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114 || defined(PACKETVER_ZERO)
+ WFIFOHEAD(sd->fd, sizeof(struct PACKET_AC_REQ_MOBILE_OTP));
+ struct PACKET_AC_REQ_MOBILE_OTP *packet = WP2PTR(sd->fd);
+ packet->packet_id = HEADER_AC_REQ_MOBILE_OTP;
+ packet->aid = sd->account_id;
+ WFIFOSET(fd, sizeof(struct PACKET_AC_REQ_MOBILE_OTP));
+#endif
}
static void login_char_server_connection_status(int fd, struct login_session_data* sd, uint8 status) __attribute__((nonnull (2)));
@@ -1438,13 +1441,16 @@ static void login_parse_request_connection(int fd, struct login_session_data* sd
loginlog->log(sockt->session[fd]->client_addr, sd->userid, 100, message);
result = login->mmo_auth(sd, true);
- if (core->runflag == LOGINSERVER_ST_RUNNING &&
+
+ if (!sockt->allowed_ip_check(ipl)) {
+ ShowNotice("Connection of the char-server '%s' REFUSED (IP not allowed).\n", server_name);
+ login->char_server_connection_status(fd, sd, 2);
+ } else if (core->runflag == LOGINSERVER_ST_RUNNING &&
result == -1 &&
sd->sex == 'S' &&
sd->account_id >= 0 &&
sd->account_id < ARRAYLENGTH(login->dbs->server) &&
- !sockt->session_is_valid(login->dbs->server[sd->account_id].fd) &&
- sockt->allowed_ip_check(ipl))
+ !sockt->session_is_valid(login->dbs->server[sd->account_id].fd))
{
ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
safestrncpy(login->dbs->server[sd->account_id].name, server_name, sizeof(login->dbs->server[sd->account_id].name));
@@ -1462,11 +1468,9 @@ static void login_parse_request_connection(int fd, struct login_session_data* sd
// send connection success
login->char_server_connection_status(fd, sd, 0);
- }
- else
- {
+ } else {
ShowNotice("Connection of the char-server '%s' REFUSED.\n", server_name);
- login->char_server_connection_status(fd, sd, 3);
+ login->char_server_connection_status(fd, sd, 1);
}
}
@@ -2275,6 +2279,7 @@ void login_defaults(void)
login->parse_fromchar = login_parse_fromchar;
login->client_login = login_client_login;
login->client_login_otp = login_client_login_otp;
+ login->client_login_mobile_otp_request = login_client_login_mobile_otp_request;
login->parse_request_connection = login_parse_request_connection;
login->auth_ok = login_auth_ok;
login->auth_failed = login_auth_failed;
diff --git a/src/login/login.h b/src/login/login.h
index 8a863f5aa..7f74057c6 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -219,6 +219,7 @@ struct login_interface {
void (*auth_failed) (struct login_session_data* sd, int result);
bool (*client_login) (int fd, struct login_session_data *sd);
bool (*client_login_otp) (int fd, struct login_session_data *sd);
+ void (*client_login_mobile_otp_request) (int fd, struct login_session_data *sd);
void (*char_server_connection_status) (int fd, struct login_session_data* sd, uint8 status);
void (*parse_request_connection) (int fd, struct login_session_data* sd, const char *ip, uint32 ipl);
void (*config_set_defaults) (void);
diff --git a/src/login/packets_ac_struct.h b/src/login/packets_ac_struct.h
new file mode 100644
index 000000000..c9fb04f26
--- /dev/null
+++ b/src/login/packets_ac_struct.h
@@ -0,0 +1,156 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2016-2018 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef LOGIN_PACKETS_AC_STRUCT_H
+#define LOGIN_PACKETS_AC_STRUCT_H
+
+#include "common/hercules.h"
+#include "common/mmo.h"
+#include "common/packetsstatic_len.h"
+
+/* Enums */
+
+/// Packet IDs
+enum login_ac_packet_id {
+ HEADER_AC_ACCEPT_LOGIN = 0x0069,
+ HEADER_AC_ACCEPT_LOGIN2 = 0x0ac4,
+ HEADER_AC_REFUSE_LOGIN = 0x006a,
+ HEADER_SC_NOTIFY_BAN = 0x0081,
+ HEADER_AC_ACK_HASH = 0x01dc,
+ HEADER_AC_REFUSE_LOGIN_R2 = 0x083e,
+ HEADER_AC_REFUSE_LOGIN_R3 = 0x0b02,
+};
+
+/* Packets Structs */
+#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
+#pragma pack(push, 1)
+#endif // not NetBSD < 6 / Solaris
+
+/**
+ * Packet structure for SC_NOTIFY_BAN.
+ */
+struct PACKET_SC_NOTIFY_BAN {
+ int16 packet_id; ///< Packet ID (#HEADER_SC_NOTIFY_BAN)
+ uint8 error_code; ///< Error code
+} __attribute__((packed));
+
+/**
+ * Packet structure for AC_REFUSE_LOGIN.
+ */
+struct PACKET_AC_REFUSE_LOGIN {
+ int16 packet_id; ///< Packet ID (#HEADER_AC_REFUSE_LOGIN)
+ uint8 error_code; ///< Error code
+ char block_date[20]; ///< Ban expiration date
+} __attribute__((packed));
+
+/**
+ * Packet structure for AC_REFUSE_LOGIN_R2.
+ */
+struct PACKET_AC_REFUSE_LOGIN_R2 {
+ int16 packet_id; ///< Packet ID (#HEADER_AC_REFUSE_LOGIN_R2)
+ uint32 error_code; ///< Error code
+ char block_date[20]; ///< Ban expiration date
+} __attribute__((packed));
+
+/**
+ * Packet structure for AC_ACCEPT_LOGIN.
+ *
+ * Variable-length packet.
+ */
+struct PACKET_AC_ACCEPT_LOGIN {
+ int16 packet_id; ///< Packet ID (#HEADER_AC_ACCEPT_LOGIN)
+ int16 packet_len; ///< Packet length (variable length)
+ int32 auth_code; ///< Authentication code
+ uint32 aid; ///< Account ID
+ uint32 user_level; ///< User level
+ uint32 last_login_ip; ///< Last login IP
+ char last_login_time[26]; ///< Last login timestamp
+ uint8 sex; ///< Account sex
+#if PACKETVER >= 20170315
+ char twitter_auth_token[16];
+ uint8 twitter_flag;
+#endif
+ struct {
+ uint32 ip; ///< Server IP address
+ int16 port; ///< Server port
+ char name[20]; ///< Server name
+ uint16 usercount; ///< Online users
+ uint16 state; ///< Server state
+ uint16 property; ///< Server property
+#if PACKETVER >= 20170315
+ char unknown2[128];
+#endif
+ } server_list[]; ///< List of charservers
+} __attribute__((packed));
+
+/**
+ * Packet structure for AC_ACK_HASH.
+ *
+ * Variable-length packet
+ */
+struct PACKET_AC_ACK_HASH {
+ int16 packet_id; ///< Packet ID (#HEADER_AC_ACK_HASH)
+ int16 packet_len; ///< Packet length (variable length)
+ uint8 secret[]; ///< Challenge string
+} __attribute__((packed));
+
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114 || defined(PACKETVER_ZERO)
+struct PACKET_AC_REQ_MOBILE_OTP {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_SSO_LOGIN_REQ)
+ uint32 aid; ///< Account ID
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(AC_REQ_MOBILE_OTP, 0x09a2);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20171213 || PACKETVER_RE_NUM >= 20171213 || PACKETVER_ZERO_NUM >= 20171808
+// AC_LOGIN_OTP2
+struct PACKET_AC_LOGIN_OTP {
+ int16 packet_id;
+ int16 packet_len;
+ int32 loginFlag;
+ char loginFlag2[20];
+ char token[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(AC_LOGIN_OTP, 0x0ae3);
+#elif PACKETVER_ZERO_NUM >= 20171123
+// AC_LOGIN_OTP2
+struct PACKET_AC_LOGIN_OTP {
+ int16 packet_id;
+ int16 packet_len;
+ int32 loginFlag;
+ char loginFlag2[6];
+ char token[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(AC_LOGIN_OTP, 0x0ae3);
+#elif PACKETVER_MAIN_NUM >= 20170621 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
+// AC_LOGIN_OTP1
+struct PACKET_AC_LOGIN_OTP {
+ int16 packet_id;
+ int16 packet_len;
+ int32 loginFlag;
+ char token[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(AC_LOGIN_OTP, 0x0ad1);
+#endif
+
+#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
+
+#endif // LOGIN_PACKETS_AC_STRUCT_H
diff --git a/src/login/packets_ca_struct.h b/src/login/packets_ca_struct.h
new file mode 100644
index 000000000..0828c7293
--- /dev/null
+++ b/src/login/packets_ca_struct.h
@@ -0,0 +1,239 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2016-2018 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef LOGIN_PACKETS_CA_STRUCT_H
+#define LOGIN_PACKETS_CA_STRUCT_H
+
+#include "common/hercules.h"
+#include "common/mmo.h"
+#include "common/packetsstatic_len.h"
+
+/* Enums */
+
+/// Packet IDs
+enum login_packet_ca_id {
+ HEADER_CA_LOGIN = 0x0064,
+ HEADER_CA_LOGIN2 = 0x01dd,
+ HEADER_CA_LOGIN3 = 0x01fa,
+ HEADER_CA_CONNECT_INFO_CHANGED = 0x0200,
+ HEADER_CA_EXE_HASHCHECK = 0x0204,
+ HEADER_CA_LOGIN_PCBANG = 0x0277,
+ HEADER_CA_LOGIN4 = 0x027c,
+ HEADER_CA_LOGIN_HAN = 0x02b0,
+ HEADER_CA_SSO_LOGIN_REQ = 0x0825,
+ HEADER_CA_LOGIN_OTP = 0x0acf,
+ HEADER_CA_REQ_HASH = 0x01db,
+ HEADER_CA_CHARSERVERCONNECT = 0x2710, // Custom Hercules Packet
+ //HEADER_CA_SSO_LOGIN_REQa = 0x825a, /* unused */
+};
+
+/* Packets Structs */
+#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
+#pragma pack(push, 1)
+#endif // not NetBSD < 6 / Solaris
+
+/**
+ * Packet structure for CA_LOGIN.
+ */
+struct PACKET_CA_LOGIN {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_LOGIN)
+ uint32 version; ///< Client Version
+ char id[24]; ///< Username
+ char password[24]; ///< Password
+ uint8 clienttype; ///< Client Type
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_LOGIN2.
+ */
+struct PACKET_CA_LOGIN2 {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_LOGIN2)
+ uint32 version; ///< Client Version
+ char id[24]; ///< Username
+ uint8 password_md5[16]; ///< Password hash
+ uint8 clienttype; ///< Client Type
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_LOGIN3.
+ */
+struct PACKET_CA_LOGIN3 {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_LOGIN3)
+ uint32 version; ///< Client Version
+ char id[24]; ///< Username
+ uint8 password_md5[16]; ///< Password hash
+ uint8 clienttype; ///< Client Type
+ uint8 clientinfo; ///< Index of the connection in the clientinfo file (+10 if the command-line contains "pc")
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_LOGIN4.
+ */
+struct PACKET_CA_LOGIN4 {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_LOGIN4)
+ uint32 version; ///< Client Version
+ char id[24]; ///< Username
+ uint8 password_md5[16]; ///< Password hash
+ uint8 clienttype; ///< Client Type
+ char mac_address[13]; ///< MAC Address
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_LOGIN_PCBANG.
+ */
+struct PACKET_CA_LOGIN_PCBANG {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_LOGIN_PCBANG)
+ uint32 version; ///< Client Version
+ char id[24]; ///< Username
+ char password[24]; ///< Password
+ uint8 clienttype; ///< Client Type
+ char ip[16]; ///< IP Address
+ char mac_address[13]; ///< MAC Address
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_LOGIN_HAN.
+ */
+struct PACKET_CA_LOGIN_HAN {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_LOGIN_HAN)
+ uint32 version; ///< Client Version
+ char id[24]; ///< Username
+ char password[24]; ///< Password
+ uint8 clienttype; ///< Client Type
+ char ip[16]; ///< IP Address
+ char mac_address[13]; ///< MAC Address
+ uint8 is_han_game_user; ///< 'isGravityID'
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_SSO_LOGIN_REQ.
+ *
+ * Variable-length packet.
+ */
+struct PACKET_CA_SSO_LOGIN_REQ {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_SSO_LOGIN_REQ)
+ int16 packet_len; ///< Length (variable length)
+ uint32 version; ///< Clientver
+ uint8 clienttype; ///< Clienttype
+ char id[24]; ///< Username
+ char password[27]; ///< Password
+ int8 mac_address[17]; ///< MAC Address
+ char ip[15]; ///< IP Address
+ char t1[]; ///< SSO Login Token (variable length)
+} __attribute__((packed));
+
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114
+/**
+ * Packet structure for CA_SSO_LOGIN_REQ.
+ *
+ * Variable-length packet.
+ */
+struct PACKET_CA_ACK_MOBILE_OTP {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_ACK_MOBILE_OTP)
+ int16 packet_len; ///< Length (variable length)
+ uint32 aid; ///< Account ID
+ char code[6]; ///< Code
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CA_ACK_MOBILE_OTP, 0x09a3);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114 || defined(PACKETVER_ZERO)
+struct PACKET_CA_OTP_CODE {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_OTP_CODE)
+ char code[9]; ///< Code
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CA_OTP_CODE, 0x0ad0);
+#endif
+
+/**
+ * Packet structure for CA_LOGIN_OTP.
+ */
+struct PACKET_CA_LOGIN_OTP {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_LOGIN_OTP)
+#if PACKETVER >= 20171113
+ uint32 devFlags; ///< flags including dev flag
+#endif
+ char login[25]; ///< Username
+ char password[32]; ///< Password encrypted by rijndael
+ char flagsStr[5]; ///< Unknown flags. Normally string: G000
+} __attribute__((packed));
+
+#if 0 // Unused
+struct PACKET_CA_SSO_LOGIN_REQa {
+ int16 packet_id;
+ int16 packet_len;
+ uint32 version;
+ uint8 clienttype;
+ char id[24];
+ int8 mac_address[17];
+ char ip[15];
+ char t1[];
+} __attribute__((packed));
+#endif // unused
+
+/**
+ * Packet structure for CA_CONNECT_INFO_CHANGED.
+ *
+ * New alive packet. Used to verify if client is always alive.
+ */
+struct PACKET_CA_CONNECT_INFO_CHANGED {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_CONNECT_INFO_CHANGED)
+ char id[24]; ///< account.userid
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_EXE_HASHCHECK.
+ *
+ * (kRO 2004-05-31aSakexe langtype 0 and 6)
+ */
+struct PACKET_CA_EXE_HASHCHECK {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_EXE_HASHCHECK)
+ uint8 hash_value[16]; ///< Client MD5 hash
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_REQ_HASH.
+ */
+struct PACKET_CA_REQ_HASH {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_REQ_HASH)
+} __attribute__((packed));
+
+/**
+ * Packet structure for CA_CHARSERVERCONNECT.
+ *
+ * This packet is used internally, to signal a char-server connection.
+ */
+struct PACKET_CA_CHARSERVERCONNECT {
+ int16 packet_id; ///< Packet ID (#HEADER_CA_CHARSERVERCONNECT)
+ char userid[24]; ///< Username
+ char password[24]; ///< Password
+ int32 unknown;
+ int32 ip; ///< Charserver IP
+ int16 port; ///< Charserver port
+ char name[20]; ///< Charserver name
+ int16 unknown2;
+ int16 type; ///< Charserver type
+ int16 new; ///< Whether charserver is to be marked as new
+} __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
+
+#endif // LOGIN_PACKETS_CA_STRUCT_H
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 6eff37df8..e89f47c12 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -81,11 +81,14 @@
#include "map/pet.h"
#include "map/quest.h"
#include "map/rodex.h"
+#include "map/refine.h"
+#include "map/refine.p.h"
#include "map/script.h"
#include "map/searchstore.h"
#include "map/skill.h"
#include "map/status.h"
#include "map/storage.h"
+#include "map/stylist.h"
#include "map/trade.h"
#include "map/unit.h"
#include "map/vending.h"
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index 3705fda0e..f851de756 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -44,8 +44,8 @@ MAP_C = achievement.c atcommand.c battle.c battleground.c buyingstore.c channel.
chrif.c clan.c clif.c date.c duel.c elemental.c guild.c homunculus.c HPMmap.c \
instance.c intif.c irc-bot.c itemdb.c log.c mail.c map.c mapreg_sql.c \
mercenary.c mob.c npc.c npc_chat.c party.c path.c pc.c pc_groups.c \
- pet.c quest.c rodex.c script.c searchstore.c skill.c status.c storage.c \
- trade.c unit.c vending.c
+ pet.c quest.c refine.c rodex.c script.c searchstore.c skill.c status.c storage.c \
+ stylist.c trade.c unit.c vending.c
MAP_OBJ = $(addprefix obj_sql/, $(patsubst %c,%o,$(MAP_C)))
MAP_H = achievement.h atcommand.h battle.h battleground.h buyingstore.h channel.h chat.h \
chrif.h clan.h clif.h date.h duel.h elemental.h guild.h homunculus.h HPMmap.h \
@@ -54,9 +54,9 @@ MAP_H = achievement.h atcommand.h battle.h battleground.h buyingstore.h channel.
messages_sak.h messages_zero.h mob.h npc.h packets.h packets_keys_main.h \
packets_keys_zero.h packets_shuffle_main.h packets_shuffle_re.h \
packets_shuffle_zero.h packets_struct.h party.h path.h pc.h pc_groups.h \
- pet.h quest.h rodex.h script.h searchstore.h skill.h status.h storage.h \
- trade.h unit.h vending.h
-MAP_PH =
+ pet.h quest.h refine.h rodex.h script.h searchstore.h skill.h status.h storage.h \
+ stylist.h trade.h unit.h vending.h
+MAP_PH = refine.p.h
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
diff --git a/src/map/achievement.c b/src/map/achievement.c
index 7148acae8..7ab80e183 100644
--- a/src/map/achievement.c
+++ b/src/map/achievement.c
@@ -301,6 +301,9 @@ static int achievement_validate_type(struct map_session_data *sd, enum achieveme
Assert_ret(criteria->goal != 0);
+ if (battle_config.feature_enable_achievement == 0)
+ return 0;
+
if (type == ACH_QUEST) {
ShowError("achievement_validate_type: ACH_QUEST is not handled by this function. (use achievement_validate())\n");
return 0;
@@ -358,6 +361,9 @@ static bool achievement_validate(struct map_session_data *sd, int aid, unsigned
Assert_retr(false, progress > 0);
Assert_retr(false, obj_idx < MAX_ACHIEVEMENT_OBJECTIVES);
+ if (battle_config.feature_enable_achievement == 0)
+ return false;
+
if ((ad = achievement->get(aid)) == NULL) {
ShowError("achievement_validate: Invalid Achievement %d provided.", aid);
return false;
@@ -760,14 +766,13 @@ static void achievement_validate_refine(struct map_session_data *sd, unsigned in
struct item_data *id = NULL;
nullpo_retv(sd);
- Assert_retv(idx < MAX_INVENTORY);
+ Assert_retv(idx < sd->status.inventorySize);
id = itemdb->exists(sd->status.inventory[idx].nameid);
if (sd->achievements_received == false)
return;
- Assert_retv(idx < MAX_INVENTORY);
Assert_retv(id != NULL);
criteria.goal = sd->status.inventory[idx].refine;
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index b8a2670ec..97af2afff 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -48,6 +48,7 @@
#include "map/pc_groups.h" // groupid2name
#include "map/pet.h"
#include "map/quest.h"
+#include "map/refine.h"
#include "map/script.h"
#include "map/searchstore.h"
#include "map/skill.h"
@@ -868,7 +869,7 @@ ACMD(speed)
*------------------------------------------*/
ACMD(storage)
{
- if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading || sd->state.storage_flag)
+ if (sd->npc_id || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->state.trading || sd->state.storage_flag)
return false;
if (!pc_has_permission(sd, PC_PERM_BYPASS_NOSTORAGE) && (map->list[sd->bl.m].flag.nostorage & 1)) { // mapflag nostorage already defined? can't open :c
@@ -896,7 +897,7 @@ ACMD(guildstorage)
return false;
}
- if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading)
+ if (sd->npc_id || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->state.trading)
return false;
if (sd->state.storage_flag == STORAGE_FLAG_NORMAL) {
@@ -1280,20 +1281,20 @@ ACMD(item2)
struct item_data *item_data;
char item_name[100];
int item_id, number = 0, bound = 0;
- int identify = 0, refine = 0, attr = 0;
+ int identify = 0, refine_level = 0, attr = 0;
int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
memset(item_name, '\0', sizeof(item_name));
if (!strcmpi(info->command,"itembound2") && (!*message || (
- sscanf(message, "\"%99[^\"]\" %12d %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4, &bound) < 10 &&
- sscanf(message, "%99s %12d %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4, &bound) < 10 ))) {
+ sscanf(message, "\"%99[^\"]\" %12d %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine_level, &attr, &c1, &c2, &c3, &c4, &bound) < 10 &&
+ sscanf(message, "%99s %12d %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine_level, &attr, &c1, &c2, &c3, &c4, &bound) < 10 ))) {
clif->message(fd, msg_fd(fd,296)); // Please enter all parameters (usage: @itembound2 <item name/ID> <quantity>
clif->message(fd, msg_fd(fd,297)); // <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>).
return false;
} else if (!*message
- || ( sscanf(message, "\"%99[^\"]\" %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9
- && sscanf(message, "%99s %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9
+ || ( sscanf(message, "\"%99[^\"]\" %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine_level, &attr, &c1, &c2, &c3, &c4) < 9
+ && sscanf(message, "%99s %12d %12d %12d %12d %12d %12d %12d %12d", item_name, &number, &identify, &refine_level, &attr, &c1, &c2, &c3, &c4) < 9
)) {
clif->message(fd, msg_fd(fd,984)); // Please enter all parameters (usage: @item2 <item name/ID> <quantity>
clif->message(fd, msg_fd(fd,985)); // <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4>).
@@ -1329,20 +1330,20 @@ ACMD(item2)
get_count = 1;
if (item_data->type == IT_PETEGG) {
identify = 1;
- refine = 0;
+ refine_level = 0;
}
if (item_data->type == IT_PETARMOR)
- refine = 0;
+ refine_level = 0;
} else {
identify = 1;
- refine = attr = 0;
+ refine_level = attr = 0;
}
- refine = cap_value(refine, 0, MAX_REFINE);
+ refine_level = cap_value(refine_level, 0, MAX_REFINE);
for (i = 0; i < loop; i++) {
memset(&item_tmp, 0, sizeof(item_tmp));
item_tmp.nameid = item_id;
item_tmp.identify = identify;
- item_tmp.refine = refine;
+ item_tmp.refine = refine_level;
item_tmp.attribute = attr;
item_tmp.bound = (unsigned char)bound;
item_tmp.card[0] = c1;
@@ -1369,9 +1370,7 @@ ACMD(item2)
*------------------------------------------*/
ACMD(itemreset)
{
- int i;
-
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) {
pc->delitem(sd, i, sd->status.inventory[i].amount, 0, DELITEM_NORMAL, LOG_TYPE_COMMAND);
}
@@ -2227,12 +2226,12 @@ ACMD(killmonster)
*------------------------------------------*/
ACMD(refine)
{
- int j, position = 0, refine = 0, current_position, final_refine;
+ int j, position = 0, refine_level = 0, current_position, final_refine;
int count;
memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (!*message || sscanf(message, "%12d %12d", &position, &refine) < 2) {
+ if (!*message || sscanf(message, "%12d %12d", &position, &refine_level) < 2) {
clif->message(fd, msg_fd(fd,996)); // Please enter a position and an amount (usage: @refine <equip position> <+/- amount>).
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,997), EQP_HEAD_LOW); // %d: Lower Headgear
clif->message(fd, atcmd_output);
@@ -2257,7 +2256,7 @@ ACMD(refine)
return false;
}
- refine = cap_value(refine, -MAX_REFINE, MAX_REFINE);
+ refine_level = cap_value(refine_level, -MAX_REFINE, MAX_REFINE);
count = 0;
for (j = 0; j < EQI_MAX; j++) {
@@ -2275,7 +2274,7 @@ ACMD(refine)
if(position && !(sd->status.inventory[idx].equip & position))
continue;
- final_refine = cap_value(sd->status.inventory[idx].refine + refine, 0, MAX_REFINE);
+ final_refine = cap_value(sd->status.inventory[idx].refine + refine_level, 0, MAX_REFINE);
if (sd->status.inventory[idx].refine != final_refine) {
sd->status.inventory[idx].refine = final_refine;
current_position = sd->status.inventory[idx].equip;
@@ -2730,7 +2729,7 @@ ACMD(makeegg)
sd->catch_target_class = pet->db[pet_id].class_;
intif->create_pet(
sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
} else {
@@ -4284,10 +4283,8 @@ ACMD(partyspy)
*------------------------------------------*/
ACMD(repairall)
{
- int count, i;
-
- count = 0;
- for (i = 0; i < MAX_INVENTORY; i++) {
+ int count = 0;
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].card[0] == CARD0_PET)
continue;
if (sd->status.inventory[i].nameid && (sd->status.inventory[i].attribute & ATTR_BROKEN) != 0) {
@@ -5291,20 +5288,43 @@ ACMD(follow)
}
/*==========================================
- * @dropall by [MouseJstr]
- * Drop all your possession on the ground
+ * @dropall by [MouseJstr] and [Xantara]
+ * Drop all your possession on the ground based on item type
*------------------------------------------*/
ACMD(dropall)
{
- int i;
+ int type = -1;
+ int count = 0;
+
+ if (message[0] != '\0') {
+ type = atoi(message);
+ if (!((type >= IT_HEALING && type <= IT_DELAYCONSUME) || type == IT_CASH || type == -1)) {
+ clif->message(fd, msg_fd(fd, 1500));
+ clif->message(fd, msg_fd(fd, 1501));
+ return false;
+ }
+ }
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].amount) {
- if(sd->status.inventory[i].equip != 0)
- pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE);
- pc->dropitem(sd, i, sd->status.inventory[i].amount);
+ struct item_data *item_data = itemdb->exists(sd->status.inventory[i].nameid);
+ if (item_data == NULL) {
+ ShowWarning("Non-existant item %d on dropall list (account_id: %d, char_id: %d)\n", sd->status.inventory[i].nameid, sd->status.account_id, sd->status.char_id);
+ continue;
+ }
+ if (!pc->candrop(sd, &sd->status.inventory[i]))
+ continue;
+ if (type == -1 || type == item_data->type) {
+ if (sd->status.inventory[i].equip != 0)
+ pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC | PCUNEQUIPITEM_FORCE);
+ count += sd->status.inventory[i].amount;
+ pc->dropitem(sd, i, sd->status.inventory[i].amount);
+ }
}
}
+
+ sprintf(atcmd_output, msg_fd(fd, 1502), count); // %d items are dropped!
+ clif->message(fd, atcmd_output);
return true;
}
@@ -5314,8 +5334,6 @@ ACMD(dropall)
*------------------------------------------*/
ACMD(storeall)
{
- int i;
-
if (sd->state.storage_flag != STORAGE_FLAG_NORMAL) {
//Open storage.
if (storage->open(sd) == 1) {
@@ -5329,7 +5347,7 @@ ACMD(storeall)
return false;
}
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].amount) {
if(sd->status.inventory[i].equip != 0)
pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE);
@@ -5418,7 +5436,7 @@ ACMD(clearcart)
return false;
}
- if (sd->state.vending) {
+ if (sd->state.vending || sd->state.prevend) {
clif->message(fd, msg_fd(fd,548)); // You can't clean a cart while vending!
return false;
}
@@ -5617,9 +5635,9 @@ static void atcommand_getring(struct map_session_data *sd)
memset(&item_tmp, 0, sizeof(item_tmp));
item_tmp.nameid = item_id;
item_tmp.identify = 1;
- item_tmp.card[0] = 255;
- item_tmp.card[2] = sd->status.partner_id;
- item_tmp.card[3] = sd->status.partner_id >> 16;
+ item_tmp.card[0] = CARD0_FORGE;
+ item_tmp.card[2] = GetWord(sd->status.partner_id, 0);
+ item_tmp.card[3] = GetWord(sd->status.partner_id, 1);
if((flag = pc->additem(sd,&item_tmp,1,LOG_TYPE_COMMAND))) {
clif->additem(sd,0,0,flag);
@@ -6724,9 +6742,9 @@ ACMD(refreshall)
*------------------------------------------*/
ACMD(identify)
{
- int i,num;
+ int num = 0;
- for (i=num=0;i<MAX_INVENTORY;i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){
num++;
}
@@ -7687,9 +7705,9 @@ ACMD(fakename)
if (sd->fakename[0])
{
sd->fakename[0] = '\0';
- clif->charnameack(0, &sd->bl);
+ clif->blname_ack(0, &sd->bl);
if( sd->disguise )
- clif->charnameack(sd->fd, &sd->bl);
+ clif->blname_ack(sd->fd, &sd->bl);
clif->message(sd->fd, msg_fd(fd,1307)); // Returned to real name.
return true;
}
@@ -7705,9 +7723,9 @@ ACMD(fakename)
}
safestrncpy(sd->fakename, message, sizeof(sd->fakename));
- clif->charnameack(0, &sd->bl);
+ clif->blname_ack(0, &sd->bl);
if (sd->disguise) // Another packet should be sent so the client updates the name for sd
- clif->charnameack(sd->fd, &sd->bl);
+ clif->blname_ack(sd->fd, &sd->bl);
clif->message(sd->fd, msg_fd(fd,1310)); // Fake name enabled.
return true;
@@ -8267,7 +8285,7 @@ ACMD(itemlist)
} else if( strcmpi(info->command, "itemlist") == 0 ) {
location = "inventory";
items = sd->status.inventory;
- size = MAX_INVENTORY;
+ size = sd->status.inventorySize;
} else
return false;
@@ -9822,6 +9840,22 @@ ACMD(camerainfo)
return true;
}
+ACMD(refineryui)
+{
+#if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
+ if (battle_config.enable_refinery_ui == 0) {
+ clif->message(fd, msg_fd(fd, 453));
+ return false;
+ }
+
+ clif->OpenRefineryUI(sd);
+ return true;
+#else
+ clif->message(fd, msg_fd(fd, 453));
+ return false;
+#endif
+}
+
/**
* Fills the reference of available commands in atcommand DBMap
**/
@@ -10105,6 +10139,7 @@ static void atcommand_basecommands(void)
ACMD_DEF(reloadclans),
ACMD_DEF(setzone),
ACMD_DEF(camerainfo),
+ ACMD_DEF(refineryui),
};
int i;
@@ -10735,6 +10770,9 @@ void atcommand_defaults(void)
{
atcommand = &atcommand_s;
+ atcommand->atcmd_output = &atcmd_output;
+ atcommand->atcmd_player_name = &atcmd_player_name;
+
atcommand->db = NULL;
atcommand->alias_db = NULL;
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 3bbbefa20..4fbf6b93a 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -21,9 +21,11 @@
#ifndef MAP_ATCOMMAND_H
#define MAP_ATCOMMAND_H
+#include "map/mapdefines.h"
#include "map/pc_groups.h"
#include "common/hercules.h"
#include "common/db.h"
+#include "common/mmo.h"
#include <stdarg.h>
@@ -39,7 +41,7 @@ struct config_setting_t;
* Defines
**/
#define ATCOMMAND_LENGTH 50
-#define MAX_MSG 1500
+#define MAX_MSG 1503
#define msg_txt(idx) atcommand->msg(idx)
#define msg_sd(sd,msg_number) atcommand->msgsd((sd),(msg_number))
#define msg_fd(fd,msg_number) atcommand->msgfd((fd),(msg_number))
@@ -90,6 +92,8 @@ struct atcmd_binding_data {
* Interface
**/
struct atcommand_interface {
+ char (*atcmd_output)[CHAT_SIZE_MAX];
+ char (*atcmd_player_name)[NAME_LENGTH];
unsigned char at_symbol;
unsigned char char_symbol;
/* atcommand binding */
diff --git a/src/map/battle.c b/src/map/battle.c
index f51240810..c40c3afac 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1019,7 +1019,7 @@ static int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct
{
struct map_session_data *sd, *tsd;
int cardfix = 1000;
- short t_class, s_class, s_race2, t_race2;
+ int t_class, s_class, s_race2, t_race2;
struct status_data *sstatus, *tstatus;
int i;
@@ -5552,7 +5552,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
#endif
if( flag.infdef ) { //Plants receive 1 damage when hit
- short class_ = status->get_class(target);
+ int class_ = status->get_class(target);
if( flag.hit || wd.damage > 0 )
wd.damage = wd.div_; // In some cases, right hand no need to have a weapon to increase damage
if( flag.lh && (flag.hit || wd.damage2 > 0) )
@@ -6361,7 +6361,7 @@ static enum damage_lv battle_weapon_attack(struct block_list *src, struct block_
if (d_bl != NULL
&& ((d_bl->type == BL_MER && d_md->master != NULL && d_md->master->bl.id == target->id)
- || (d_bl->type == BL_PC && d_sd->devotion[sce->val2] == target->id)
+ || (d_sd != NULL && d_bl->type == BL_PC && d_sd->devotion[sce->val2] == target->id)
)
&& check_distance_bl(target, d_bl, sce->val3)
) {
@@ -7004,7 +7004,8 @@ static const struct battle_data {
{ "player_damage_delay_rate", &battle_config.pc_damage_delay_rate, 100, 0, INT_MAX, },
{ "defunit_not_enemy", &battle_config.defnotenemy, 0, 0, 1, },
{ "gvg_traps_target_all", &battle_config.vs_traps_bctall, BL_PC, BL_NUL, BL_ALL, },
- { "traps_setting", &battle_config.traps_setting, 0, 0, 1, },
+ { "trap_options/visibility", &battle_config.trap_visibility, 2, 0, 2, },
+ { "trap_options/display_on_trigger", &battle_config.trap_trigger, 1, 0, 1, },
{ "summon_flora_setting", &battle_config.summon_flora, 1|2, 0, 1|2, },
{ "clear_skills_on_death", &battle_config.clear_unit_ondeath, BL_NUL, BL_NUL, BL_ALL, },
{ "clear_skills_on_warp", &battle_config.clear_unit_onwarp, BL_ALL, BL_NUL, BL_ALL, },
@@ -7413,6 +7414,28 @@ static const struct battle_data {
{ "min_item_buy_price", &battle_config.min_item_buy_price, 1, 0, INT_MAX, },
{ "min_item_sell_price", &battle_config.min_item_sell_price, 0, 0, INT_MAX, },
{ "display_fake_hp_when_dead", &battle_config.display_fake_hp_when_dead, 1, 0, 1, },
+ { "magicrod_type", &battle_config.magicrod_type, 0, 0, 1, },
+ { "features/enable_achievement_system", &battle_config.feature_enable_achievement, 1, 0, 1, },
+ { "ping_timer_inverval", &battle_config.ping_timer_interval, 30, 0, 99999999, },
+ { "ping_time", &battle_config.ping_time, 20, 0, 99999999, },
+ { "option_drop_max_loop", &battle_config.option_drop_max_loop, 10, 1, 100000, },
+ { "drop_connection_on_quit", &battle_config.drop_connection_on_quit, 0, 0, 1, },
+ { "features/enable_refinery_ui", &battle_config.enable_refinery_ui, 1, 0, 1, },
+ { "features/replace_refine_npcs", &battle_config.replace_refine_npcs, 1, 0, 1, },
+ { "batk_min_limit", &battle_config.batk_min, 0, 0, INT_MAX, },
+ { "batk_max_limit", &battle_config.batk_max, USHRT_MAX, 1, INT_MAX, },
+ { "matk_min_limit", &battle_config.matk_min, 0, 0, INT_MAX, },
+ { "matk_max_limit", &battle_config.matk_max, USHRT_MAX, 1, INT_MAX, },
+ { "watk_min_limit", &battle_config.watk_min, 0, 0, INT_MAX, },
+ { "watk_max_limit", &battle_config.watk_max, USHRT_MAX, 1, INT_MAX, },
+ { "flee_min_limit", &battle_config.flee_min, 1, 1, INT_MAX, },
+ { "flee_max_limit", &battle_config.flee_max, SHRT_MAX, 1, INT_MAX, },
+ { "flee2_min_limit", &battle_config.flee2_min, 10, 1, INT_MAX, },
+ { "flee2_max_limit", &battle_config.flee2_max, SHRT_MAX, 1, INT_MAX, },
+ { "critical_min_limit", &battle_config.critical_min, 10, 1, INT_MAX, },
+ { "critical_max_limit", &battle_config.critical_max, SHRT_MAX, 1, INT_MAX, },
+ { "hit_min_limit", &battle_config.hit_min, 1, 1, INT_MAX, },
+ { "hit_max_limit", &battle_config.hit_max, SHRT_MAX, 1, INT_MAX, },
};
static bool battle_set_value_sub(int index, int value)
@@ -7538,6 +7561,18 @@ static void battle_adjust_conf(void)
}
#endif
+#if !(PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO))
+ if (battle_config.enable_refinery_ui == 1) {
+ ShowWarning("conf/map/battle/feature.conf refinery ui is enabled but it requires PACKETVER 2016-11-09 RagexeRE/2016-11-30 Ragexe or newer, disabling...\n");
+ battle_config.enable_refinery_ui = 0;
+ }
+
+ if (battle_config.replace_refine_npcs == 1) {
+ ShowWarning("conf/map/battle/feature.conf replace refine npcs is enabled but it requires PACKETVER 2016-11-09 RagexeRE/2016-11-30 Ragexe or newer, disabling...\n");
+ battle_config.replace_refine_npcs = 0;
+ }
+#endif
+
#ifndef CELL_NOSTACK
if (battle_config.custom_cell_stack_limit != 1)
ShowWarning("Battle setting 'custom_cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n");
@@ -7567,6 +7602,10 @@ static bool battle_config_read(const char *filename, bool imported)
if (!imported)
battle->config_set_defaults();
+ if (libconfig->lookup(&config, "battle_configuration/traps_setting") != NULL) {
+ ShowError("The `traps_setting` battle conf option has been replaced by `trap_visibility`. Please see conf/map/battle/skill.conf.\n");
+ }
+
for (i = 0; i < ARRAYLENGTH(battle_data); i++) {
int type, val;
char config_name[256];
diff --git a/src/map/battle.h b/src/map/battle.h
index 750753c08..0ff5135d8 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -149,7 +149,8 @@ struct Battle_Config {
int pc_damage_delay_rate;
int defnotenemy;
int vs_traps_bctall;
- int traps_setting;
+ int trap_visibility;
+ int trap_trigger;
int summon_flora; //[Skotlex]
int clear_unit_ondeath; //[Skotlex]
int clear_unit_onwarp; //[Skotlex]
@@ -576,6 +577,34 @@ struct Battle_Config {
int min_item_sell_price;
int display_fake_hp_when_dead;
+
+ int magicrod_type;
+
+ int feature_enable_achievement;
+
+ int ping_timer_interval;
+ int ping_time;
+
+ int option_drop_max_loop;
+
+ int drop_connection_on_quit;
+ int enable_refinery_ui;
+ int replace_refine_npcs;
+
+ int batk_min;
+ int batk_max;
+ int matk_min;
+ int matk_max;
+ int watk_min;
+ int watk_max;
+ int flee_min;
+ int flee_max;
+ int flee2_min;
+ int flee2_max;
+ int critical_min;
+ int critical_max;
+ int hit_min;
+ int hit_max;
};
/* criteria for battle_config.idletime_critera */
@@ -590,6 +619,7 @@ enum e_battle_config_idletime {
BCIDLE_EMOTION = 0x080,
BCIDLE_DROPITEM = 0x100,
BCIDLE_ATCOMMAND = 0x200,
+ BCIDLE_SCRIPT = 0x400,
};
// Damage delayed info
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index df622e4ab..8cac65775 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -91,7 +91,7 @@ static void buyingstore_create(struct map_session_data *sd, int zenylimit, unsig
return;
}
- if( !battle_config.feature_buying_store || pc_istrading(sd) || sd->buyingstore.slots == 0 || count > sd->buyingstore.slots || zenylimit <= 0 || zenylimit > sd->status.zeny || !storename[0] )
+ if( !battle_config.feature_buying_store || pc_istrading(sd) || sd->state.prevend || sd->buyingstore.slots == 0 || count > sd->buyingstore.slots || zenylimit <= 0 || zenylimit > sd->status.zeny || !storename[0] )
{// disabled or invalid input
sd->buyingstore.slots = 0;
clif->buyingstore_open_failed(sd, BUYINGSTORE_CREATE, 0);
@@ -218,7 +218,7 @@ static void buyingstore_open(struct map_session_data *sd, int account_id)
struct map_session_data* pl_sd;
nullpo_retv(sd);
- if( !battle_config.feature_buying_store || pc_istrading(sd) )
+ if (!battle_config.feature_buying_store || pc_istrading(sd) || sd->state.prevend)
{// not allowed to sell
return;
}
@@ -255,7 +255,7 @@ static void buyingstore_trade(struct map_session_data* sd, int account_id, unsig
return;
}
- if( !battle_config.feature_buying_store || pc_istrading(sd) )
+ if (!battle_config.feature_buying_store || pc_istrading(sd) || sd->state.prevend)
{// not allowed to sell
clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0);
return;
diff --git a/src/map/chat.c b/src/map/chat.c
index d9b642219..b650ff029 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -102,7 +102,7 @@ static bool chat_createpcchat(struct map_session_data *sd, const char *title, co
if (sd->chat_id != 0)
return false; //Prevent people abusing the chat system by creating multiple chats, as pointed out by End of Exam. [Skotlex]
- if( sd->state.vending || sd->state.buyingstore )
+ if (sd->state.vending || sd->state.prevend || sd->state.buyingstore)
{// not chat, when you already have a store open
return false;
}
@@ -147,7 +147,7 @@ static bool chat_joinchat(struct map_session_data *sd, int chatid, const char *p
cd = map->id2cd(chatid);
if (cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m
- || sd->state.vending || sd->state.buyingstore || sd->chat_id != 0
+ || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->chat_id != 0
|| ((cd->owner->type == BL_NPC) ? cd->users+1 : cd->users) >= cd->limit
) {
clif->joinchatfail(sd,0); // room full
@@ -255,6 +255,14 @@ static int chat_leavechat(struct map_session_data *sd, bool kicked)
}
if( leavechar == 0 && cd->owner->type == BL_PC ) {
+
+ // check if new location are CELL_CHKNOCHAT
+ if (map->getcell(cd->usersd[0]->bl.m, NULL, cd->usersd[0]->bl.x, cd->usersd[0]->bl.y, CELL_CHKNOCHAT)) {
+ for (i = (cd->users - 1); i >= 0; i--)
+ chat->leave(cd->usersd[i], false);
+ return 2;
+ }
+
// Set and announce new owner
cd->owner = &cd->usersd[0]->bl;
clif->changechatowner(cd, cd->usersd[0]);
diff --git a/src/map/chrif.c b/src/map/chrif.c
index af3504ca2..a3277d4c2 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -975,14 +975,14 @@ static bool chrif_divorceack(int char_id, int partner_id)
if( ( sd = map->charid2sd(char_id) ) != NULL && sd->status.partner_id == partner_id ) {
sd->status.partner_id = 0;
- for(i = 0; i < MAX_INVENTORY; i++)
+ for (i = 0; i < sd->status.inventorySize; i++)
if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F)
pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_DIVORCE);
}
if( ( sd = map->charid2sd(partner_id) ) != NULL && sd->status.partner_id == char_id ) {
sd->status.partner_id = 0;
- for(i = 0; i < MAX_INVENTORY; i++)
+ for (i = 0; i < sd->status.inventorySize; i++)
if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F)
pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_DIVORCE);
}
diff --git a/src/map/clif.c b/src/map/clif.c
index 7d539b3cd..4e8653783 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -49,9 +49,11 @@
#include "map/pet.h"
#include "map/quest.h"
#include "map/rodex.h"
+#include "map/refine.h"
#include "map/script.h"
#include "map/skill.h"
#include "map/status.h"
+#include "map/stylist.h"
#include "map/storage.h"
#include "map/trade.h"
#include "map/unit.h"
@@ -92,8 +94,9 @@ 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;
-static struct packet_npc_market_open npcmarket_open;
#endif
+// temporart buffer for send big packets
+char packet_buf[0xffff];
//#define DUMP_UNKNOWN_PACKET
//#define DUMP_INVALID_PACKET
@@ -429,8 +432,13 @@ static int clif_send_actual(int fd, void *buf, int len)
*------------------------------------------*/
static bool clif_send(const void *buf, int len, struct block_list *bl, enum send_target type)
{
+ if (type != ALL_CLIENT)
+ nullpo_retr(false, bl);
+ nullpo_retr(false, buf);
+ Assert_retr(false, len > 0);
+
int i;
- struct map_session_data *sd, *tsd;
+ struct map_session_data *sd = BL_CAST(BL_PC, bl), *tsd;
struct party_data *p = NULL;
struct guild *g = NULL;
struct battleground_data *bgd = NULL;
@@ -438,11 +446,6 @@ static bool clif_send(const void *buf, int len, struct block_list *bl, enum send
struct s_mapiterator* iter;
int area_size;
- if( type != ALL_CLIENT )
- nullpo_ret(bl);
-
- sd = BL_CAST(BL_PC, bl);
-
if (sd != NULL && pc_isinvisible(sd)) {
if (type == AREA || type == BG || type == BG_AREA)
type = SELF;
@@ -890,7 +893,7 @@ static void clif_clearflooritem(struct flooritem_data *fitem, int fd)
/// 2 = logged out
/// 3 = teleport
/// 4 = trickdead
-static void clif_clearunit_single(int id, clr_type type, int fd)
+static void clif_clearunit_single(int id, enum clr_type type, int fd)
{
WFIFOHEAD(fd, packet_len(0x80));
WFIFOW(fd,0) = 0x80;
@@ -907,7 +910,7 @@ static void clif_clearunit_single(int id, clr_type type, int fd)
/// 2 = logged out
/// 3 = teleport
/// 4 = trickdead
-static void clif_clearunit_area(struct block_list *bl, clr_type type)
+static void clif_clearunit_area(struct block_list *bl, enum clr_type type)
{
unsigned char buf[8];
@@ -936,12 +939,12 @@ static void clif_clearunit_area(struct block_list *bl, clr_type type)
static int clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data)
{
struct block_list *bl = (struct block_list *)data;
- clif->clearunit_area(bl, (clr_type) id);
+ clif->clearunit_area(bl, (enum clr_type) id);
ers_free(clif->delay_clearunit_ers,bl);
return 0;
}
-static void clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick)
+static void clif_clearunit_delayed(struct block_list *bl, enum clr_type type, int64 tick)
{
struct block_list *tbl;
@@ -1116,7 +1119,7 @@ static void clif_set_unit_idle(struct block_list *bl, struct map_session_data *t
p.head = vd->hair_style;
p.weapon = vd->weapon;
p.accessory = vd->head_bottom;
-#if PACKETVER < 7 || PACKETVER_RE_NUM >= 20180704
+#if PACKETVER < 7 || PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
p.shield = vd->shield;
#endif
p.accessory2 = vd->head_top;
@@ -1273,7 +1276,7 @@ static void clif_spawn_unit(struct block_list *bl, enum send_target target)
p.head = vd->hair_style;
p.weapon = vd->weapon;
p.accessory = vd->head_bottom;
-#if PACKETVER < 7 || PACKETVER_RE_NUM >= 20180704
+#if PACKETVER < 7 || PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
p.shield = vd->shield;
#endif
p.accessory2 = vd->head_top;
@@ -1382,7 +1385,7 @@ static void clif_set_unit_walking(struct block_list *bl, struct map_session_data
p.weapon = vd->weapon;
p.accessory = vd->head_bottom;
p.moveStartTime = (unsigned int)timer->gettick();
-#if PACKETVER < 7 || PACKETVER_RE_NUM >= 20180704
+#if PACKETVER < 7 || PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
p.shield = vd->shield;
#endif
p.accessory2 = vd->head_top;
@@ -1627,6 +1630,7 @@ static bool clif_spawn(struct block_list *bl)
/// 022e <name>.24B <modified>.B <level>.W <hunger>.W <intimacy>.W <equip id>.W <atk>.W <matk>.W <hit>.W <crit>.W <def>.W <mdef>.W <flee>.W <aspd>.W <hp>.W <max hp>.W <sp>.W <max sp>.W <exp>.L <max exp>.L <skill points>.W <atk range>.W
static void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
{
+#if PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
struct status_data *hstatus;
enum homun_type htype;
struct PACKET_ZC_PROPERTY_HOMUN p;
@@ -1638,7 +1642,7 @@ static void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int
htype = homun->class2type(hd->homunculus.class_);
memset(&p, 0, sizeof(p));
- p.packetType = hominfoType;
+ p.packetType = HEADER_ZC_PROPERTY_HOMUN;
memcpy(p.name, hd->homunculus.name, NAME_LENGTH);
// Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
p.flags = (!battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0);
@@ -1704,6 +1708,7 @@ static void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int
p.skillPoints = hd->homunculus.skillpts;
p.range = status_get_range(&hd->bl);
clif->send(&p, sizeof(p), &sd->bl, SELF);
+#endif
}
/// Notification about a change in homunuculus' state (ZC_CHANGESTATE_MER).
@@ -2160,14 +2165,14 @@ static void clif_buylist(struct map_session_data *sd, struct npc_data *nd)
/// 00c7 <packet len>.W { <index>.W <price>.L <overcharge price>.L }*
static void clif_selllist(struct map_session_data *sd)
{
- int fd,i,c=0,val;
+ int c = 0, val;
nullpo_retv(sd);
- fd=sd->fd;
- WFIFOHEAD(fd, MAX_INVENTORY * 10 + 4);
+ int fd = sd->fd;
+ WFIFOHEAD(fd, sd->status.inventorySize * 10 + 4);
WFIFOW(fd,0)=0xc7;
- for( i = 0; i < MAX_INVENTORY; i++ )
+ for (int i = 0; i < sd->status.inventorySize; i++)
{
if( sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] )
{
@@ -2216,6 +2221,8 @@ static void clif_scriptmes(struct map_session_data *sd, int npcid, const char *m
slen = (int)strlen(mes) + 9;
Assert_retv(slen <= INT16_MAX);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
+
sd->state.dialog = 1;
WFIFOHEAD(fd, slen);
@@ -2252,6 +2259,8 @@ static void clif_scriptnext(struct map_session_data *sd, int npcid)
nullpo_retv(sd);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
+
fd=sd->fd;
WFIFOHEAD(fd, packet_len(0xb5));
WFIFOW(fd,0)=0xb5;
@@ -2280,6 +2289,8 @@ static void clif_scriptclose(struct map_session_data *sd, int npcid)
nullpo_retv(sd);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
+
fd=sd->fd;
WFIFOHEAD(fd, packet_len(0xb6));
WFIFOW(fd,0)=0xb6;
@@ -2351,6 +2362,8 @@ static void clif_scriptmenu(struct map_session_data *sd, int npcid, const char *
bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))))
clif->sendfakenpc(sd, npcid);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
+
WFIFOHEAD(fd, slen);
WFIFOW(fd,0) = 0xb7;
WFIFOW(fd,2) = slen;
@@ -2382,6 +2395,8 @@ static void clif_scriptinput(struct map_session_data *sd, int npcid)
bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))))
clif->sendfakenpc(sd, npcid);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
+
fd=sd->fd;
WFIFOHEAD(fd, packet_len(0x142));
WFIFOW(fd,0)=0x142;
@@ -2412,6 +2427,8 @@ static void clif_scriptinputstr(struct map_session_data *sd, int npcid)
bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))))
clif->sendfakenpc(sd, npcid);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
+
fd=sd->fd;
WFIFOHEAD(fd, packet_len(0x1d4));
WFIFOW(fd,0)=0x1d4;
@@ -2582,7 +2599,7 @@ static void clif_additem(struct map_session_data *sd, int n, int amount, int fai
p.count = amount;
if( !fail ) {
- if( n < 0 || n >= MAX_INVENTORY || sd->status.inventory[n].nameid <=0 || sd->inventory_data[n] == NULL )
+ if (n < 0 || n >= sd->status.inventorySize || sd->status.inventory[n].nameid <= 0 || sd->inventory_data[n] == NULL)
return;
if (sd->inventory_data[n]->view_id > 0)
@@ -2804,7 +2821,7 @@ static void clif_inventoryItems(struct map_session_data *sd, enum inventory_type
int i, normal = 0, equip = 0;
nullpo_retv(sd);
- for( i = 0; i < MAX_INVENTORY; i++ ) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
continue;
@@ -2838,7 +2855,7 @@ static void clif_inventoryItems(struct map_session_data *sd, enum inventory_type
}
/* on 20120925 onwards this is a field on clif_item_equip/normal */
#if PACKETVER >= 20111122 && PACKETVER < 20120925
- for( i = 0; i < MAX_INVENTORY; i++ ) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
continue;
@@ -2866,7 +2883,7 @@ static void clif_equipItems(struct map_session_data *sd, enum inventory_type typ
int i, equip = 0;
nullpo_retv(sd);
- for( i = 0; i < MAX_INVENTORY; i++ ) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
continue;
@@ -2886,7 +2903,7 @@ static void clif_equipItems(struct map_session_data *sd, enum inventory_type typ
/* on 20120925 onwards this is a field on clif_item_equip */
#if PACKETVER >= 20111122 && PACKETVER < 20120925
- for( i = 0; i < MAX_INVENTORY; i++ ) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
continue;
@@ -2927,7 +2944,7 @@ static void clif_inventoryStart(struct map_session_data *sd, enum inventory_type
p->invType = type;
#endif
#if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
- int strLen = (int)safestrnlen(name, 24);
+ int strLen = (int)safestrnlen(name, 24) + 1;
if (strLen > 24)
strLen = 24;
const int len = sizeof(struct ZC_INVENTORY_START) + strLen;
@@ -2961,28 +2978,21 @@ static void clif_storageItems(struct map_session_data *sd, enum inventory_type t
nullpo_retv(sd);
nullpo_retv(items);
- int i = 0;
- struct item_data *id;
-
- do {
- int normal = 0, equip = 0, k = 0;
-
- for( ; i < items_length && k < 500; i++, k++ ) {
-
- if( items[i].nameid <= 0 )
- continue;
+ int normal_count = 0, equip_count = 0;
+ for (int i = 0; i < items_length; ++i) {
+ if (items[i].nameid == 0)
+ continue;
- id = itemdb->search(items[i].nameid);
+ struct item_data *itd = itemdb->search(items[i].nameid);
- if( !itemdb->isstackable2(id) ) //Non-stackable (Equippable)
- clif->item_equip(i+1,&storelist_equip.list[equip++],&items[i],id,id->equip);
- else //Stackable (Normal)
- clif->item_normal(i+1,&storelist_normal.list[normal++],&items[i],id);
- }
+ if (!itemdb->isstackable2(itd))
+ clif->item_equip(i + 1, &storelist_equip.list[equip_count++], &items[i], itd, itd->equip);
+ else
+ clif->item_normal(i + 1, &storelist_normal.list[normal_count++], &items[i], itd);
- if( normal ) {
- storelist_normal.PacketType = storageListNormalType;
- storelist_normal.PacketLength = ( sizeof( storelist_normal ) - sizeof( storelist_normal.list ) ) + (sizeof(struct NORMALITEM_INFO) * normal);
+ if (normal_count > 0 && (normal_count == MAX_STORAGE_ITEM_PACKET_NORMAL || i + 1 == items_length)) {
+ storelist_normal.PacketType = storageListNormalType;
+ storelist_normal.PacketLength = (sizeof(storelist_normal) - sizeof(storelist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal_count);
#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
storelist_normal.invType = type;
@@ -2992,11 +3002,12 @@ static void clif_storageItems(struct map_session_data *sd, enum inventory_type t
#endif
clif->send(&storelist_normal, storelist_normal.PacketLength, &sd->bl, SELF);
+ normal_count = 0;
}
- if( equip ) {
- storelist_equip.PacketType = storageListEquipType;
- storelist_equip.PacketLength = ( sizeof( storelist_equip ) - sizeof( storelist_equip.list ) ) + (sizeof(struct EQUIPITEM_INFO) * equip);
+ if (equip_count > 0 && (equip_count == MAX_STORAGE_ITEM_PACKET_EQUIP || i + 1 == items_length)) {
+ storelist_equip.PacketType = storageListEquipType;
+ storelist_equip.PacketLength = (sizeof(storelist_equip) - sizeof(storelist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip_count);
#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
storelist_equip.invType = type;
@@ -3006,10 +3017,39 @@ static void clif_storageItems(struct map_session_data *sd, enum inventory_type t
#endif
clif->send(&storelist_equip, storelist_equip.PacketLength, &sd->bl, SELF);
+ equip_count = 0;
}
+ }
+
+ if (normal_count > 0) {
+ storelist_normal.PacketType = storageListNormalType;
+ storelist_normal.PacketLength = (sizeof(storelist_normal) - sizeof(storelist_normal.list)) + (sizeof(struct NORMALITEM_INFO) * normal_count);
+
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
+ storelist_normal.invType = type;
+#endif
+#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
+ safestrncpy(storelist_normal.name, "Storage", NAME_LENGTH);
+#endif
+
+ clif->send(&storelist_normal, storelist_normal.PacketLength, &sd->bl, SELF);
+ normal_count = 0;
+ }
- } while ( i < items_length );
+ if (equip_count > 0) {
+ storelist_equip.PacketType = storageListEquipType;
+ storelist_equip.PacketLength = (sizeof(storelist_equip) - sizeof(storelist_equip.list)) + (sizeof(struct EQUIPITEM_INFO) * equip_count);
+#if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
+ storelist_equip.invType = type;
+#endif
+#if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
+ safestrncpy(storelist_equip.name, "Storage", NAME_LENGTH);
+#endif
+
+ clif->send(&storelist_equip, storelist_equip.PacketLength, &sd->bl, SELF);
+ equip_count = 0;
+ }
}
static void clif_cartList(struct map_session_data *sd)
@@ -3062,6 +3102,121 @@ static void clif_cartItems(struct map_session_data *sd, enum inventory_type type
}
}
+static void clif_inventoryExpansionInfo(struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+ nullpo_retv(sd);
+
+ const int fd = sd->fd;
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_INVENTORY_EXPANSION_INFO));
+ struct PACKET_ZC_INVENTORY_EXPANSION_INFO *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_INVENTORY_EXPANSION_INFO;
+ p->expansionSize = sd->status.inventorySize - FIXED_INVENTORY_SIZE;
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_INVENTORY_EXPANSION_INFO));
+#endif
+}
+
+static void clif_inventoryExpandAck(struct map_session_data *sd, enum expand_inventory result, int itemId)
+{
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+ nullpo_retv(sd);
+
+ const int fd = sd->fd;
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_ACK_INVENTORY_EXPAND));
+ struct PACKET_ZC_ACK_INVENTORY_EXPAND *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_ACK_INVENTORY_EXPAND;
+ p->result = result;
+ p->itemId = itemId;
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_ACK_INVENTORY_EXPAND));
+#endif
+}
+
+static void clif_inventoryExpandResult(struct map_session_data *sd, enum expand_inventory_result result)
+{
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+ nullpo_retv(sd);
+
+ const int fd = sd->fd;
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_ACK_INVENTORY_EXPAND_RESULT));
+ struct PACKET_ZC_ACK_INVENTORY_EXPAND_RESULT *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_ACK_INVENTORY_EXPAND_RESULT;
+ p->result = result;
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_ACK_INVENTORY_EXPAND_RESULT));
+#endif
+}
+
+static void clif_parse_inventoryExpansion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_inventoryExpansion(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+ if (pc_isdead(sd) || pc_cant_act(sd)) {
+ clif->inventoryExpandAck(sd, EXPAND_INVENTORY_OTHER_WORK, 0);
+ return;
+ }
+ if (sd->status.inventorySize == MAX_INVENTORY) {
+ clif->inventoryExpandAck(sd, EXPAND_INVENTORY_MAX_SIZE, 0);
+ return;
+ }
+
+ char evname[EVENT_NAME_LENGTH];
+ struct event_data *ev = NULL;
+
+ safestrncpy(evname, "inventory_expansion::OnInvExpandRequest", EVENT_NAME_LENGTH);
+ if ((ev = strdb_get(npc->ev_db, evname))) {
+ script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
+ } else {
+ ShowError("clif_parse_inventoryExpansion: event '%s' not found, operation failed.\n", evname);
+ }
+#endif
+}
+
+static void clif_parse_inventoryExpansionConfirmed(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_inventoryExpansionConfirmed(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+ if (pc_isdead(sd) || pc_cant_act(sd)) {
+ clif->inventoryExpandResult(sd, EXPAND_INVENTORY_RESULT_OTHER_WORK);
+ return;
+ }
+ if (sd->status.inventorySize == MAX_INVENTORY) {
+ clif->inventoryExpandResult(sd, EXPAND_INVENTORY_RESULT_MAX_SIZE);
+ return;
+ }
+
+ char evname[EVENT_NAME_LENGTH];
+ struct event_data *ev = NULL;
+
+ safestrncpy(evname, "inventory_expansion::OnInvExpandConfirmed", EVENT_NAME_LENGTH);
+ if ((ev = strdb_get(npc->ev_db, evname))) {
+ script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
+ } else {
+ ShowError("clif_parse_inventoryExpansionConfirmed: event '%s' not found, operation failed.\n", evname);
+ }
+#endif
+}
+
+static void clif_parse_inventoryExpansionRejected(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_inventoryExpansionRejected(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+ char evname[EVENT_NAME_LENGTH];
+ struct event_data *ev = NULL;
+
+ safestrncpy(evname, "inventory_expansion::OnInvExpandRejected", EVENT_NAME_LENGTH);
+ if ((ev = strdb_get(npc->ev_db, evname))) {
+ script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
+ } else {
+ ShowError("clif_parse_inventoryExpansionRejected: event '%s' not found, operation failed.\n", evname);
+ }
+#endif
+}
+
+// CZ_REQ_REMAINTIME
+static void clif_parse_reqRemainTime(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_reqRemainTime(int fd, struct map_session_data *sd)
+{
+}
+
/// Removes cart (ZC_CARTOFF).
/// 012b
/// Client behavior:
@@ -3824,6 +3979,7 @@ static void clif_equipitemack(struct map_session_data *sd, int n, int pos, enum
p.index = n+2;
p.wearLocation = pos;
#if PACKETVER >= 20100629
+ Assert_retv(n >= 0 && n < sd->status.inventorySize);
if (result == EIA_SUCCESS && sd->inventory_data[n]->equip&EQP_VISIBLE)
p.wItemSpriteNumber = sd->inventory_data[n]->view_sprite;
else
@@ -3965,7 +4121,7 @@ static void clif_useitemack(struct map_session_data *sd, int index, int amount,
nullpo_retv(sd);
- if (index < 0 || index >= MAX_INVENTORY)
+ if (index < 0 || index >= sd->status.inventorySize)
return;
fd = sd->fd;
@@ -4187,22 +4343,25 @@ static void clif_addchat(struct chat_data *cd, struct map_session_data *sd)
/// role:
/// 0 = owner (menu)
/// 1 = normal
-static void clif_changechatowner(struct chat_data *cd, struct map_session_data *sd)
+static void clif_chatRoleChange(struct chat_data *cd, struct map_session_data *sd, struct block_list* bl, int isNotOwner)
{
- unsigned char buf[64];
-
nullpo_retv(sd);
- nullpo_retv(cd);
+ nullpo_retv(bl);
+ struct PACKET_ZC_ROLE_CHANGE p;
- WBUFW(buf, 0) = 0xe1;
- WBUFL(buf, 2) = 1;
- memcpy(WBUFP(buf,6),cd->usersd[0]->status.name,NAME_LENGTH);
+ p.packetType = HEADER_ZC_ROLE_CHANGE;
+ p.flag = isNotOwner;
+ memcpy(&p.name, sd->status.name, NAME_LENGTH);
+ clif->send(&p, sizeof(struct PACKET_ZC_ROLE_CHANGE), bl, CHAT);
+}
- WBUFW(buf,30) = 0xe1;
- WBUFL(buf,32) = 0;
- memcpy(WBUFP(buf,36),sd->status.name,NAME_LENGTH);
+static void clif_changechatowner(struct chat_data *cd, struct map_session_data *sd)
+{
+ nullpo_retv(sd);
+ nullpo_retv(cd);
- clif->send(buf,packet_len(0xe1)*2,&sd->bl,CHAT);
+ clif->chatRoleChange(cd, cd->usersd[0], &sd->bl, 1);
+ clif->chatRoleChange(cd, sd, &sd->bl, 0);
}
/// Notify about user leaving the chatroom (ZC_MEMBER_EXIT).
@@ -4314,7 +4473,7 @@ static void clif_tradeadditem(struct map_session_data *sd, struct map_session_da
if (index != 0)
{
index -= 2; //index fix
- Assert_retv(index >= 0 && index < MAX_INVENTORY);
+ Assert_retv(index >= 0 && index < sd->status.inventorySize);
if(sd->inventory_data[index] && sd->inventory_data[index]->view_id > 0)
p.itemId = sd->inventory_data[index]->view_id;
else
@@ -4910,9 +5069,8 @@ static void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit
p.xPos = su->bl.x;
p.yPos = su->bl.y;
- //Use invisible unit id for traps.
- if ((battle_config.traps_setting&1 && skill->get_inf2(su->group->skill_id)&INF2_TRAP) ||
- (skill->get_unit_flag(su->group->skill_id) & UF_RANGEDSINGLEUNIT && !(su->val2 & UF_RANGEDSINGLEUNIT)))
+ // Use invisible unit id for some ground skills.
+ if (skill->get_unit_flag(su->group->skill_id) & UF_RANGEDSINGLEUNIT && !(su->val2 & UF_RANGEDSINGLEUNIT))
p.job = UNT_DUMMYSKILL;
else
p.job = su->group->unit_id;
@@ -4921,7 +5079,7 @@ static void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit
p.RadiusRange = (unsigned char)su->range;
#endif
- p.isVisible = 1;
+ p.isVisible = su->visible;
#if PACKETVER >= 20130731
p.level = (unsigned char)su->group->skill_lv;
@@ -5286,32 +5444,31 @@ static void clif_skillinfo(struct map_session_data *sd, int skill_id, int inf)
/// 1 = no text
static void clif_useskill(struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime)
{
-#if PACKETVER < 20091124
- const int cmd = 0x13e;
-#else
- const int cmd = 0x7fb;
-#endif
- unsigned char buf[32];
- int property = skill->get_ele(skill_id, skill_lv);
+ nullpo_retv(bl);
- WBUFW(buf,0) = cmd;
- WBUFL(buf,2) = src_id;
- WBUFL(buf,6) = dst_id;
- WBUFW(buf,10) = dst_x;
- WBUFW(buf,12) = dst_y;
- WBUFW(buf,14) = skill_id;
- WBUFL(buf,16) = property<0?0:property; //Avoid sending negatives as element [Skotlex]
- WBUFL(buf,20) = casttime;
-#if PACKETVER >= 20091124
- WBUFB(buf,24) = 0; // isDisposable
+ const int element = skill->get_ele(skill_id, skill_lv);
+ struct PACKET_ZC_USESKILL_ACK p;
+ p.packetType = HEADER_ZC_USESKILL_ACK;
+ p.srcId = src_id;
+ p.dstId = dst_id;
+ p.x = dst_x;
+ p.y = dst_y;
+ p.skillId = skill_id;
+ p.element = element < 0 ? 0 : element; //Avoid sending negatives as element [Skotlex]
+ p.delayTime = casttime;
+#if PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
+ p.disposable = 0;
+#endif
+#if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
+ p.unknown = 0;
#endif
if (clif->isdisguised(bl)) {
- clif->send(buf,packet_len(cmd), bl, AREA_WOS);
- WBUFL(buf,2) = -src_id;
- clif->send(buf,packet_len(cmd), bl, SELF);
+ clif->send(&p, sizeof(p), bl, AREA_WOS);
+ p.srcId = -src_id;
+ clif->send(&p, sizeof(p), bl, SELF);
} else {
- clif->send(buf,packet_len(cmd), bl, AREA);
+ clif->send(&p, sizeof(p), bl, AREA);
}
#if PACKETVER >= 20151223
if ((skill->get_inf2(skill_id) & INF2_SHOW_SKILL_SCALE) != 0)
@@ -5652,7 +5809,7 @@ static void clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, u
nullpo_retv(sd);
fd = sd->fd;
#if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
- len = sizeof(struct PACKET_ZC_WARPLIST) + sizeof(struct PACKET_ZC_WARPLIST_sub) * mapsCount;
+ len = sizeof(struct PACKET_ZC_WARPLIST) + sizeof(struct PACKET_ZC_WARPLIST_sub) * 6;
#else
len = sizeof(struct PACKET_ZC_WARPLIST);
#endif
@@ -6377,10 +6534,10 @@ static void clif_use_card(struct map_session_data *sd, int idx)
if (!pc->can_insert_card(sd, idx))
return;
- WFIFOHEAD(fd, MAX_INVENTORY * 2 + 4);
+ WFIFOHEAD(fd, sd->status.inventorySize * 2 + 4);
WFIFOW(fd, 0) = 0x17b;
- for (i = c = 0; i < MAX_INVENTORY; i++) {
+ for (i = c = 0; i < sd->status.inventorySize; i++) {
if (!pc->can_insert_card_into(sd, idx, i))
continue;
WFIFOW(fd, 4 + c * 2) = i + 2;
@@ -6424,9 +6581,9 @@ static void clif_item_identify_list(struct map_session_data *sd)
fd=sd->fd;
- WFIFOHEAD(fd,MAX_INVENTORY * 2 + 4);
+ WFIFOHEAD(fd, sd->status.inventorySize * 2 + 4);
WFIFOW(fd,0)=0x177;
- for(i=c=0;i<MAX_INVENTORY;i++){
+ for (i = c = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid > 0 && !sd->status.inventory[i].identify){
WFIFOW(fd,c*2+4)=i+2;
c++;
@@ -6471,11 +6628,11 @@ static void clif_item_repair_list(struct map_session_data *sd, struct map_sessio
fd = sd->fd;
- len = MAX_INVENTORY * sizeof(struct PACKET_ZC_REPAIRITEMLIST_sub) + sizeof(struct PACKET_ZC_REPAIRITEMLIST);
+ len = dstsd->status.inventorySize * sizeof(struct PACKET_ZC_REPAIRITEMLIST_sub) + sizeof(struct PACKET_ZC_REPAIRITEMLIST);
WFIFOHEAD(fd, len);
p = WFIFOP(fd, 0);
p->packetType = 0x1fc;
- for (i = c = 0; i < MAX_INVENTORY; i++) {
+ for (i = c = 0; i < sd->status.inventorySize; i++) {
int nameid = dstsd->status.inventory[i].nameid;
if (nameid > 0 && (dstsd->status.inventory[i].attribute & ATTR_BROKEN) != 0) { // && skill_can_repair(sd,nameid)) {
p->items[c].index = i;
@@ -6551,11 +6708,11 @@ static void clif_item_refine_list(struct map_session_data *sd)
skill_lv = pc->checkskill(sd, WS_WEAPONREFINE);
fd = sd->fd;
- len = MAX_INVENTORY * sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub) + sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST);
+ len = sd->status.inventorySize * sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub) + sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST);
WFIFOHEAD(fd, len);
p = WFIFOP(fd, 0);
p->packetType = 0x221;
- for (i = c = 0; i < MAX_INVENTORY; i++) {
+ for (i = c = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify
&& itemdb_wlv(sd->status.inventory[i].nameid) >= 1
&& !sd->inventory_data[i]->flag.no_refine
@@ -7000,7 +7157,7 @@ static void clif_party_job_and_level(struct map_session_data *sd)
WBUFW(buf, 6) = sd->status.class;
WBUFW(buf, 8) = sd->status.base_level;
- clif_send(buf, packet_len(0xabd), &sd->bl, PARTY);
+ clif->send(buf, packet_len(0xabd), &sd->bl, PARTY);
#endif
}
@@ -7011,14 +7168,17 @@ static void clif_party_job_and_level(struct map_session_data *sd)
/// 1 = auto-deny party invites
static void clif_partyinvitationstate(struct map_session_data *sd)
{
+#if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO)
int fd;
nullpo_retv(sd);
fd = sd->fd;
- WFIFOHEAD(fd, packet_len(0x2c9));
- WFIFOW(fd, 0) = 0x2c9;
- WFIFOB(fd, 2) = sd->status.allow_party ? 1 : 0;
- WFIFOSET(fd, packet_len(0x2c9));
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_PARTY_CONFIG));
+ struct PACKET_ZC_PARTY_CONFIG *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_PARTY_CONFIG;
+ p->denyPartyInvites = sd->status.allow_party ? 1 : 0;
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_PARTY_CONFIG));
+#endif
}
/// Party invitation request.
@@ -7385,9 +7545,9 @@ static void clif_sendegg(struct map_session_data *sd)
return;
}
- WFIFOHEAD(fd, MAX_INVENTORY * 2 + 4);
+ WFIFOHEAD(fd, sd->status.inventorySize * 2 + 4);
WFIFOW(fd,0) = 0x1a6;
- for (i = n = 0; i < MAX_INVENTORY; i++) {
+ for (i = n = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL || sd->inventory_data[i]->type!=IT_PETEGG || sd->status.inventory[i].amount <= 0)
continue;
WFIFOW(fd, n * 2 + 4) = i + 2;
@@ -7509,10 +7669,11 @@ static void clif_pet_food(struct map_session_data *sd, int foodid, int fail)
/// 01cd { <skill id>.L }*7
static void clif_autospell(struct map_session_data *sd, uint16 skill_lv)
{
+#if PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618
nullpo_retv(sd);
int fd = sd->fd;
-#if PACKETVER_RE_NUM >= 20181031
+#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
// reserve space for 7 skills
WFIFOHEAD(fd, sizeof(struct PACKET_ZC_AUTOSPELLLIST) + 4 * 7);
#else
@@ -7520,7 +7681,7 @@ static void clif_autospell(struct map_session_data *sd, uint16 skill_lv)
#endif
struct PACKET_ZC_AUTOSPELLLIST *p = WFIFOP(fd, 0);
memset(p, 0, sizeof(struct PACKET_ZC_AUTOSPELLLIST));
- p->packetType = autoSpellList;
+ p->packetType = HEADER_ZC_AUTOSPELLLIST;
int index = 0;
if (skill_lv > 0 && pc->checkskill(sd, MG_NAPALMBEAT) > 0)
@@ -7538,7 +7699,7 @@ static void clif_autospell(struct map_session_data *sd, uint16 skill_lv)
if (skill_lv > 9 && pc->checkskill(sd, MG_FROSTDIVER) > 0)
p->skills[index++] = MG_FROSTDIVER;
-#if PACKETVER_RE_NUM >= 20181031
+#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
const int len = sizeof(struct PACKET_ZC_AUTOSPELLLIST) + index * 4;
p->packetLength = len;
#else
@@ -7548,6 +7709,7 @@ static void clif_autospell(struct map_session_data *sd, uint16 skill_lv)
sd->menuskill_id = SA_AUTOSPELL;
sd->menuskill_val = skill_lv;
+#endif
}
/// Devotion's visual effect (ZC_DEVOTIONLIST).
@@ -7606,17 +7768,27 @@ static void clif_devotion(struct block_list *src, struct map_session_data *tsd)
static void clif_spiritball(struct block_list *bl)
{
unsigned char buf[16];
- struct map_session_data *sd = BL_CAST(BL_PC,bl);
- struct homun_data *hd = BL_CAST(BL_HOM,bl);
nullpo_retv(bl);
WBUFW(buf, 0) = 0x1d0;
WBUFL(buf, 2) = bl->id;
WBUFW(buf, 6) = 0; //init to 0
- switch(bl->type){
- case BL_PC: WBUFW(buf, 6) = sd->spiritball; break;
- case BL_HOM: WBUFW(buf, 6) = hd->homunculus.spiritball; break;
+ switch (bl->type) {
+ case BL_PC:
+ {
+ struct map_session_data *sd = BL_CAST(BL_PC, bl);
+ nullpo_retv(sd);
+ WBUFW(buf, 6) = sd->spiritball;
+ break;
+ }
+ case BL_HOM:
+ {
+ struct homun_data *hd = BL_CAST(BL_HOM, bl);
+ nullpo_retv(hd);
+ WBUFW(buf, 6) = hd->homunculus.spiritball;
+ break;
+ }
}
clif->send(buf, packet_len(0x1d0), bl, AREA);
}
@@ -8264,6 +8436,7 @@ static void clif_guild_expulsion(struct map_session_data *sd, const char *name,
#endif
safestrncpy(&p.reason[0], mes, 40);
+// version unconfirmed
#if PACKETVER < 20100803
memset(&p.account_name, 0, NAME_LENGTH); // account name (not used for security reasons)
#endif
@@ -8275,42 +8448,44 @@ static void clif_guild_expulsion(struct map_session_data *sd, const char *name,
/// 0163 <packet len>.W { <char name>.24B <reason>.40B }* (PACKETVER >= 20100803)
static void clif_guild_expulsionlist(struct map_session_data *sd)
{
-#if PACKETVER < 20100803
- const int offset = NAME_LENGTH*2+40;
-#else
- const int offset = NAME_LENGTH+40;
-#endif
- int fd, i, c = 0;
- struct guild* g;
-
nullpo_retv(sd);
- if( (g = sd->guild) == NULL )
+ int c = 0;
+
+ struct guild* g;
+ if ((g = sd->guild) == NULL)
return;
- fd = sd->fd;
+ int fd = sd->fd;
- WFIFOHEAD(fd,4 + MAX_GUILDEXPULSION * offset);
- WFIFOW(fd,0) = 0x163;
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_BAN_LIST) + MAX_GUILDEXPULSION * sizeof(struct PACKET_ZC_BAN_LIST_sub));
+ struct PACKET_ZC_BAN_LIST *packet = WFIFOP(fd, 0);
+ packet->packetType = HEADER_ZC_BAN_LIST;
- for( i = 0; i < MAX_GUILDEXPULSION; i++ )
+ for (int i = 0; i < MAX_GUILDEXPULSION; i++)
{
struct guild_expulsion* e = &g->expulsion[i];
- if( e->account_id > 0 )
+ if (e->account_id > 0)
{
- memcpy(WFIFOP(fd,4 + c*offset), e->name, NAME_LENGTH);
-#if PACKETVER < 20100803
- memset(WFIFOP(fd,4 + c*offset+24), 0, NAME_LENGTH); // account name (not used for security reasons)
- memcpy(WFIFOP(fd,4 + c*offset+48), e->mes, 40);
+#if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
+ packet->chars[c].char_id = e->char_id;
+// version unconfirmed
+#elif PACKETVER >= 20100803
+ memcpy(packet->chars[c].char_name, e->name, NAME_LENGTH);
+
#else
- memcpy(WFIFOP(fd,4 + c*offset+24), e->mes, 40);
+ memcpy(packet->chars[c].char_name, e->name, NAME_LENGTH);
+ memset(packet->chars[c].account_name, 0, NAME_LENGTH); // account name (not used for security reasons)
+
#endif
- c++;
+ memcpy(packet->chars[c].message, e->mes, 40);
+
+ c ++;
}
}
- WFIFOW(fd,2) = 4 + c*offset;
- WFIFOSET(fd,WFIFOW(fd,2));
+ packet->packetLen = sizeof(struct PACKET_ZC_BAN_LIST) + c * sizeof(struct PACKET_ZC_BAN_LIST_sub);
+ WFIFOSET(fd, packet->packetLen);
}
/// Guild chat message (ZC_GUILD_CHAT).
@@ -8968,6 +9143,34 @@ static void clif_messagecolor(struct block_list *bl, uint32 color, const char *m
clif->send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC);
}
+// Message without owner, not logged in chat
+static void clif_serviceMessageColor(struct map_session_data *sd, uint32 color, const char *msg)
+{
+#if PACKETVER_MAIN_NUM >= 20170830 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+ nullpo_retv(msg);
+
+ int msg_len = (int)strlen(msg) + 1;
+
+ if (msg_len > 512) {
+ ShowWarning("clif_serviceMessageColor: Truncating too long message '%s' (len=%d).\n", msg, msg_len);
+ msg_len = 512;
+ }
+
+ const int len = sizeof(struct PACKET_ZC_SERVICE_MESSAGE_COLOR) + msg_len;
+ const int fd = sd->fd;
+ WFIFOHEAD(fd, len);
+ struct PACKET_ZC_SERVICE_MESSAGE_COLOR *p = WFIFOP(fd, 0);
+
+ p->packetType = HEADER_ZC_SERVICE_MESSAGE_COLOR;
+ p->packetLength = len;
+ p->color = RGB2BGR(color);
+ safestrncpy(p->message, msg, msg_len);
+
+ WFIFOSET(fd, len);
+#endif
+}
+
/**
* Notifies the client that the storage window is still open
*
@@ -9063,149 +9266,377 @@ static void clif_refresh(struct map_session_data *sd)
clif->refresh_storagewindow(sd);
}
+static void clif_send_selforarea(int fd, struct block_list *bl, const void *buf, int len)
+{
+ // if no recipient specified just update nearby clients
+ // if no recipient specified just update nearby clients
+ if (fd == 0) {
+ clif->send(buf, len, bl, AREA);
+ } else {
+ struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL;
+ if (sd != NULL) {
+ clif->send(buf, len, &sd->bl, SELF);
+ } else {
+ clif->send(buf, len, bl, SELF);
+ }
+ }
+}
+
/// Updates the object's (bl) name on client.
/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
-static void clif_charnameack(int fd, struct block_list *bl)
+static void clif_pcname_ack(int fd, struct block_list *bl)
{
- struct packet_reqnameall_ack packet = { 0 };
- int len = sizeof(struct packet_reqnameall_ack);
-
nullpo_retv(bl);
+ Assert_retv(bl->type == BL_PC);
- packet.packet_id = reqName;
+ struct PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
+ int len = sizeof(struct PACKET_ZC_ACK_REQNAMEALL);
packet.gid = bl->id;
- switch(bl->type) {
- case BL_PC:
- {
- const struct map_session_data *ssd = BL_UCCAST(BL_PC, bl);
- const struct party_data *p = NULL;
- const struct guild *g = NULL;
- int ps = -1;
+ const struct map_session_data *ssd = BL_UCCAST(BL_PC, bl);
+ const struct party_data *p = NULL;
+ const struct guild *g = NULL;
+ int ps = -1;
- if (ssd->fakename[0] != '\0' || ssd->status.guild_id > 0 || ssd->status.party_id > 0 || ssd->status.title_id > 0) {
- packet.packet_id = reqNameAllType;
- }
+ if (ssd->fakename[0] != '\0' && ssd->disguise != -1) {
+ packet.packet_id = reqName;
+ len = sizeof(struct packet_reqname_ack);
+ } else {
+ packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
+ len = sizeof(struct PACKET_ZC_ACK_REQNAMEALL);
+ }
- //Requesting your own "shadow" name. [Skotlex]
- if (ssd->fd == fd && ssd->disguise != -1) {
- packet.gid = -bl->id;
- }
+ //Requesting your own "shadow" name. [Skotlex]
+ if (ssd->fd == fd && ssd->disguise != -1) {
+ packet.gid = -bl->id;
+ }
- if (ssd->fakename[0] != '\0') {
- memcpy(packet.name, ssd->fakename, NAME_LENGTH);
- break;
- }
+ if (ssd->fakename[0] != '\0' && ssd->disguise != -1) {
+ memcpy(packet.name, ssd->fakename, NAME_LENGTH);
+ } else {
+#if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
+ // Title System [Dastgir/Hercules]
+ if (ssd->status.title_id > 0) {
+ packet.title_id = ssd->status.title_id;
+ }
+#endif
+ memcpy(packet.name, ssd->status.name, NAME_LENGTH);
-#if PACKETVER >= 20150503
- // Title System [Dastgir/Hercules]
- if (ssd->status.title_id > 0) {
- packet.title_id = ssd->status.title_id;
+ if (ssd->status.party_id != 0) {
+ p = party->search(ssd->status.party_id);
+ }
+ if (ssd->status.guild_id != 0) {
+ if ((g = ssd->guild) != NULL) {
+ int i;
+ ARR_FIND(0, g->max_member, i, g->member[i].account_id == ssd->status.account_id && g->member[i].char_id == ssd->status.char_id);
+ if (i < g->max_member)
+ ps = g->member[i].position;
}
+ }
+
+ if (!battle_config.display_party_name && g == NULL) {
+ // do not display party unless the player is also in a guild
+ p = NULL;
+ }
+
+ if (p != NULL) {
+ memcpy(packet.party_name, p->party.name, NAME_LENGTH);
+ }
+
+ if (g != NULL && ps >= 0 && ps < MAX_GUILDPOSITION) {
+ memcpy(packet.guild_name, g->name,NAME_LENGTH);
+ memcpy(packet.position_name, g->position[ps].name, NAME_LENGTH);
+ }
+ }
+
+ clif->send_selforarea(fd, bl, &packet, len);
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_homname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_HOM);
+
+ struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
+ packet.gid = bl->id;
+ memcpy(packet.name, BL_UCCAST(BL_HOM, bl)->homunculus.name, NAME_LENGTH);
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud != NULL) {
+ memcpy(packet.title, ud->title, NAME_LENGTH);
+ packet.groupId = ud->groupId;
+ }
#endif
- memcpy(packet.name, ssd->status.name, NAME_LENGTH);
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE));
+}
- if (ssd->status.party_id != 0) {
- p = party->search(ssd->status.party_id);
- }
- if (ssd->status.guild_id != 0) {
- if ((g = ssd->guild) != NULL) {
- int i;
- ARR_FIND(0, g->max_member, i, g->member[i].account_id == ssd->status.account_id && g->member[i].char_id == ssd->status.char_id);
- if (i < g->max_member)
- ps = g->member[i].position;
- }
- }
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_mername_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_MER);
- if (!battle_config.display_party_name && g == NULL) {
- // do not display party unless the player is also in a guild
- p = NULL;
- }
+ struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
+ packet.gid = bl->id;
+ memcpy(packet.name, BL_UCCAST(BL_MER, bl)->db->name, NAME_LENGTH);
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud != NULL) {
+ memcpy(packet.title, ud->title, NAME_LENGTH);
+ packet.groupId = ud->groupId;
+ }
+#endif
- if (p == NULL && g == NULL)
- break;
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE));
+}
- if (p != NULL) {
- memcpy(packet.party_name, p->party.name, NAME_LENGTH);
- }
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_petname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_PET);
- if (g != NULL && ps >= 0 && ps < MAX_GUILDPOSITION) {
- memcpy(packet.guild_name, g->name,NAME_LENGTH);
- memcpy(packet.position_name, g->position[ps].name, NAME_LENGTH);
- }
- }
+ struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
+ packet.gid = bl->id;
+ memcpy(packet.name, BL_UCCAST(BL_PET, bl)->pet.name, NAME_LENGTH);
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud != NULL) {
+ memcpy(packet.title, ud->title, NAME_LENGTH);
+ packet.groupId = ud->groupId;
+ }
+#endif
+
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE));
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_npcname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_NPC);
+
+ struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
+ packet.gid = bl->id;
+ memcpy(packet.name, BL_UCCAST(BL_NPC, bl)->name, NAME_LENGTH);
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud != NULL) {
+ memcpy(packet.title, ud->title, NAME_LENGTH);
+ packet.groupId = ud->groupId;
+ }
+#endif
+
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE));
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_mobname_guardian_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_MOB);
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+ Assert_retv(md->guardian_data && md->guardian_data->g);
+
+ struct PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
+ packet.gid = bl->id;
+ memcpy(packet.name, md->name, NAME_LENGTH);
+ memcpy(packet.guild_name, md->guardian_data->g->name, NAME_LENGTH);
+ memcpy(packet.position_name, md->guardian_data->castle->castle_name, NAME_LENGTH);
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAMEALL));
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_mobname_normal_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_MOB);
+
+ struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
+ packet.gid = bl->id;
+ memcpy(packet.name, BL_UCCAST(BL_MOB, bl)->db->name, NAME_LENGTH);
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud != NULL) {
+ memcpy(packet.title, ud->title, NAME_LENGTH);
+ packet.groupId = ud->groupId;
+ }
+#endif
+
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE));
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_mobname_additional_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_MOB);
+
+ struct PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
+ packet.gid = bl->id;
+
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+
+ memcpy(packet.name, md->name, NAME_LENGTH);
+ char mobhp[100];
+ char *str_p = mobhp;
+ if (battle_config.show_mob_info&4)
+ str_p += sprintf(str_p, "Lv. %d | ", md->level);
+ if (battle_config.show_mob_info&1)
+ str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
+ if (battle_config.show_mob_info&2)
+ str_p += sprintf(str_p, "HP: %u%% | ", get_percentage(md->status.hp, md->status.max_hp));
+ //Even thought mobhp ain't a name, we send it as one so the client
+ //can parse it. [Skotlex]
+ if (str_p != mobhp) {
+ *(str_p-3) = '\0'; //Remove trailing space + pipe.
+ memcpy(packet.party_name, mobhp, NAME_LENGTH);
+ }
+
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAMEALL));
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_mobname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_MOB);
+
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+
+ if (md->guardian_data && md->guardian_data->g) {
+ clif->mobname_guardian_ack(fd, bl);
+ } else if (battle_config.show_mob_info) {
+ clif->mobname_additional_ack(fd, bl);
+ } else {
+ clif->mobname_normal_ack(fd, bl);
+ }
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_chatname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_CHAT);
+
+ struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
+ packet.gid = bl->id;
+
+#if 0 // Clients DO request this... what should be done about it? The chat's title may not fit... [Skotlex]
+ memcpy(packet.name, BL_UCCAST(BL_CHAT, bl)->title, NAME_LENGTH);
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud != NULL) {
+ memcpy(packet.title, ud->title, NAME_LENGTH);
+ packet.groupId = ud->groupId;
+ }
+#endif
+#endif
+
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE));
+}
+
+/// Updates the object's (bl) name on client.
+/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
+/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
+/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
+static void clif_elemname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ Assert_retv(bl->type == BL_ELEM);
+
+ struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
+ packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
+ packet.gid = bl->id;
+ memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH);
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud != NULL) {
+ memcpy(packet.title, ud->title, NAME_LENGTH);
+ packet.groupId = ud->groupId;
+ }
+#endif
+
+ clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE));
+}
+
+static void clif_unknownname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+ ShowError("clif_blname_ack: bad type %u(%d)\n", bl->type, bl->id);
+}
+
+static void clif_blname_ack(int fd, struct block_list *bl)
+{
+ nullpo_retv(bl);
+
+ switch(bl->type) {
+ case BL_PC:
+ clif->pcname_ack(fd, bl);
break;
- //[blackhole89]
case BL_HOM:
- memcpy(packet.name, BL_UCCAST(BL_HOM, bl)->homunculus.name, NAME_LENGTH);
+ clif->homname_ack(fd, bl);
break;
case BL_MER:
- memcpy(packet.name, BL_UCCAST(BL_MER, bl)->db->name, NAME_LENGTH);
+ clif->mername_ack(fd, bl);
break;
case BL_PET:
- memcpy(packet.name, BL_UCCAST(BL_PET, bl)->pet.name, NAME_LENGTH);
+ clif->petname_ack(fd, bl);
break;
case BL_NPC:
- memcpy(packet.name, BL_UCCAST(BL_NPC, bl)->name, NAME_LENGTH);
+ clif->npcname_ack(fd, bl);
break;
case BL_MOB:
- {
- const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
-
- memcpy(packet.name, md->name, NAME_LENGTH);
- if (md->guardian_data && md->guardian_data->g) {
- packet.packet_id = reqNameAllType;
- memcpy(packet.guild_name, md->guardian_data->g->name, NAME_LENGTH);
- memcpy(packet.position_name, md->guardian_data->castle->castle_name, NAME_LENGTH);
- } else if (battle_config.show_mob_info) {
- char mobhp[50], *str_p = mobhp;
- packet.packet_id = reqNameAllType;
- if (battle_config.show_mob_info&4)
- str_p += sprintf(str_p, "Lv. %d | ", md->level);
- if (battle_config.show_mob_info&1)
- str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
- if (battle_config.show_mob_info&2)
- str_p += sprintf(str_p, "HP: %u%% | ", get_percentage(md->status.hp, md->status.max_hp));
- //Even thought mobhp ain't a name, we send it as one so the client
- //can parse it. [Skotlex]
- if (str_p != mobhp) {
- *(str_p-3) = '\0'; //Remove trailing space + pipe.
- memcpy(packet.party_name, mobhp, NAME_LENGTH);
- }
- }
- }
+ clif->mobname_ack(fd, bl);
break;
case BL_CHAT:
-#if 0 //FIXME: Clients DO request this... what should be done about it? The chat's title may not fit... [Skotlex]
- memcpy(packet.name, BL_UCCAST(BL_CHAT, bl)->title, NAME_LENGTH);
+ clif->chatname_ack(fd, bl);
break;
-#endif
- return;
case BL_ELEM:
- memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH);
+ clif->elemname_ack(fd, bl);
break;
default:
- ShowError("clif_charnameack: bad type %u(%d)\n", bl->type, bl->id);
- return;
- }
-
- if (packet.packet_id == reqName) {
- len = sizeof(struct packet_reqname_ack);
- }
- // if no recipient specified just update nearby clients
- // if no recipient specified just update nearby clients
- if (fd == 0) {
- clif->send(&packet, len, bl, AREA);
- } else {
- struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL;
- if (sd != NULL) {
- clif->send(&packet, len, &sd->bl, SELF);
- } else {
- clif->send(&packet, len, bl, SELF);
- }
+ clif->unknownname_ack(fd, bl);
+ break;
}
}
@@ -9216,14 +9647,14 @@ static void clif_charnameupdate(struct map_session_data *ssd)
int ps = -1;
struct party_data *p = NULL;
struct guild *g = NULL;
- struct packet_reqnameall_ack packet = { 0 };
+ struct PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
nullpo_retv(ssd);
if (ssd->fakename[0])
return; //No need to update as the party/guild was not displayed anyway.
- packet.packet_id = reqNameAllType;
+ packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
packet.gid = ssd->bl.id;
memcpy(packet.name, ssd->status.name, NAME_LENGTH);
@@ -9250,7 +9681,7 @@ static void clif_charnameupdate(struct map_session_data *ssd)
memcpy(packet.position_name, g->position[ps].name, NAME_LENGTH);
}
-#if PACKETVER >= 20150503
+#if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
// Achievement System [Dastgir/Hercules]
if (ssd->status.title_id > 0) {
packet.title_id = ssd->status.title_id;
@@ -10177,7 +10608,7 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
first_time = true;
sd->state.connect_new = 0;
clif->skillinfoblock(sd);
- clif->hotkeys(sd);
+ clif->hotkeysAll(sd);
clif->updatestatus(sd,SP_BASEEXP);
clif->updatestatus(sd,SP_NEXTBASEEXP);
clif->updatestatus(sd,SP_JOBEXP);
@@ -10359,15 +10790,7 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
// NPC Quest / Event Icon Check [Kisuka]
#if PACKETVER >= 20090218
- {
- int i;
- for (i = 0; i < VECTOR_LENGTH(map->list[sd->bl.m].qi_data); i++) {
- struct questinfo *qi = &VECTOR_INDEX(map->list[sd->bl.m].qi_data, i);
-
- if (quest->questinfo_validate(sd, qi))
- clif->quest_show_event(sd, &qi->nd->bl, qi->icon, qi->color);
- }
- }
+ quest->questinfo_refresh(sd);
#endif
}
@@ -10398,53 +10821,105 @@ static void clif_parse_TickSend(int fd, struct map_session_data *sd)
clif->notify_time(sd, timer->gettick());
}
+static void clif_hotkeysAll_send(struct map_session_data *sd)
+{
+#ifdef HOTKEY_SAVING
+ clif->hotkeys(sd, 0);
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+ // send second tab only if data exists
+ for (int i = MAX_HOTKEYS; i < MAX_HOTKEYS * 2; i++) {
+ if (sd->status.hotkeys[i].type != 0 || sd->status.hotkeys[i].id != 0 || sd->status.hotkeys[i].lv != 0) {
+ clif->hotkeys(sd, 1);
+ return;
+ }
+ }
+#endif
+#endif
+}
+
/// Sends hotkey bar.
/// 02b9 { <is skill>.B <id>.L <count>.W }*27 (ZC_SHORTCUT_KEY_LIST)
/// 07d9 { <is skill>.B <id>.L <count>.W }*36 (ZC_SHORTCUT_KEY_LIST_V2, PACKETVER >= 20090603)
/// 07d9 { <is skill>.B <id>.L <count>.W }*38 (ZC_SHORTCUT_KEY_LIST_V2, PACKETVER >= 20090617)
/// 0a00 <rotate>.B { <is skill>.B <id>.L <count>.W }*38 (ZC_SHORTCUT_KEY_LIST_V3, PACKETVER >= 20141022)
-static void clif_hotkeys_send(struct map_session_data *sd)
+static void clif_hotkeys_send(struct map_session_data *sd, int tab)
{
#ifdef HOTKEY_SAVING
- struct packet_hotkey p;
- int i;
nullpo_retv(sd);
- p.PacketType = hotkeyType;
-#if PACKETVER >= 20141022
- p.Rotate = sd->status.hotkey_rowshift;
+ struct PACKET_ZC_SHORTCUT_KEY_LIST p;
+ p.packetType = HEADER_ZC_SHORTCUT_KEY_LIST;
+#if PACKETVER_MAIN_NUM >= 20141022 || PACKETVER_RE_NUM >= 20141015 || defined(PACKETVER_ZERO)
+ if (tab == 0)
+ p.rotate = sd->status.hotkey_rowshift;
+ else
+ p.rotate = sd->status.hotkey_rowshift2;
+#endif
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+ p.tab = tab;
#endif
- for(i = 0; i < ARRAYLENGTH(p.hotkey); i++) {
- p.hotkey[i].isSkill = sd->status.hotkeys[i].type;
- p.hotkey[i].ID = sd->status.hotkeys[i].id;
- p.hotkey[i].count = sd->status.hotkeys[i].lv;
+ const int offset = tab * MAX_HOTKEYS;
+ for (int i = 0; i < MAX_HOTKEYS_PACKET; i++) {
+ p.hotkey[i].isSkill = sd->status.hotkeys[i + offset].type;
+ p.hotkey[i].id = sd->status.hotkeys[i + offset].id;
+ p.hotkey[i].count = sd->status.hotkeys[i + offset].lv;
}
- clif->send(&p, sizeof(p), &sd->bl, SELF);
+ clif->send(&p, sizeof(struct PACKET_ZC_SHORTCUT_KEY_LIST), &sd->bl, SELF);
+#endif
+}
+
+static void clif_parse_HotkeyRowShift1(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HotkeyRowShift1(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20140129 || PACKETVER_RE_NUM >= 20140129 || defined(PACKETVER_ZERO)
+ const struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE1 *p = RFIFOP(fd, 0);
+ sd->status.hotkey_rowshift = p->rowshift;
#endif
}
-static void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-static void clif_parse_HotkeyRowShift(int fd, struct map_session_data *sd)
+static void clif_parse_HotkeyRowShift2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_HotkeyRowShift2(int fd, struct map_session_data *sd)
{
- int cmd = RFIFOW(fd, 0);
- sd->status.hotkey_rowshift = RFIFOB(fd, packet_db[cmd].pos[0]);
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+ const struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 *p = RFIFOP(fd, 0);
+ if (p->tab == 0)
+ sd->status.hotkey_rowshift = p->rowshift;
+ else
+ sd->status.hotkey_rowshift2 = p->rowshift;
+#endif
}
-static void clif_parse_Hotkey(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-/// Request to update a position on the hotkey bar (CZ_SHORTCUT_KEY_CHANGE).
+static void clif_parse_Hotkey1(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+/// Request to update a position on the hotkey bar (CZ_SHORTCUT_KEY_CHANGE1).
/// 02ba <index>.W <is skill>.B <id>.L <count>.W
-static void clif_parse_Hotkey(int fd, struct map_session_data *sd)
+static void clif_parse_Hotkey1(int fd, struct map_session_data *sd)
{
#ifdef HOTKEY_SAVING
- unsigned short idx;
- int cmd;
+#if PACKETVER_MAIN_NUM >= 20070618 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_AD_NUM >= 20070618 || PACKETVER_SAK_NUM >= 20070618
+ const struct PACKET_CZ_SHORTCUT_KEY_CHANGE1 *p = RFIFOP(fd, 0);
+ const unsigned short idx = p->index;
+ Assert_retv(idx < MAX_HOTKEYS);
- cmd = RFIFOW(fd, 0);
- idx = RFIFOW(fd, packet_db[cmd].pos[0]);
- if (idx >= MAX_HOTKEYS) return;
+ sd->status.hotkeys[idx].type = p->hotkey.isSkill;
+ sd->status.hotkeys[idx].id = p->hotkey.id;
+ sd->status.hotkeys[idx].lv = p->hotkey.count;
+#endif
+#endif
+}
+
+static void clif_parse_Hotkey2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+/// Request to update a position on the hotkey bar (CZ_SHORTCUT_KEY_CHANGE2).
+static void clif_parse_Hotkey2(int fd, struct map_session_data *sd)
+{
+#ifdef HOTKEY_SAVING
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+ const struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 *p = RFIFOP(fd, 0);
+ const unsigned short idx = p->index + p->tab * MAX_HOTKEYS;
+ Assert_retv(idx < MAX_HOTKEYS_DB);
- sd->status.hotkeys[idx].type = RFIFOB(fd, packet_db[cmd].pos[1]);
- sd->status.hotkeys[idx].id = RFIFOL(fd, packet_db[cmd].pos[2]);
- sd->status.hotkeys[idx].lv = RFIFOW(fd, packet_db[cmd].pos[3]);
+ sd->status.hotkeys[idx].type = p->hotkey.isSkill;
+ sd->status.hotkeys[idx].id = p->hotkey.id;
+ sd->status.hotkeys[idx].lv = p->hotkey.count;
+#endif
#endif
}
@@ -10579,8 +11054,10 @@ static void clif_parse_QuitGame(int fd, struct map_session_data *sd)
/* Rovert's prevent logout option fixed [Valaris] */
if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] &&
(!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout)) {
- sockt->eof(fd);
clif->disconnect_ack(sd, 0);
+ sockt->flush(fd);
+ if (battle_config.drop_connection_on_quit)
+ sockt->eof(fd);
} else {
clif->disconnect_ack(sd, 1);
}
@@ -10623,7 +11100,7 @@ static void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd)
}
#endif // 0
- clif->charnameack(fd, bl);
+ clif->blname_ack(fd, bl);
}
static int clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data)
{
@@ -11270,7 +11747,7 @@ static void clif_parse_UseItem(int fd, struct map_session_data *sd)
pc->update_idle_time(sd, BCIDLE_USEITEM);
n = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2;
- if (n < 0 || n >= MAX_INVENTORY)
+ if (n < 0 || n >= sd->status.inventorySize)
return;
if (!pc->useitem(sd,n))
clif->useitemack(sd,n,0,false); //Send an empty ack packet or the client gets stuck.
@@ -11291,7 +11768,7 @@ static void clif_parse_EquipItem(int fd, struct map_session_data *sd)
}
index = p->index - 2;
- if (index >= MAX_INVENTORY)
+ if (index >= sd->status.inventorySize)
return; //Out of bounds check.
if( sd->npc_id ) {
@@ -11372,7 +11849,7 @@ static void clif_parse_NpcClicked(int fd, struct map_session_data *sd)
#endif
return;
}
- if ( pc_cant_act2(sd) || !(bl = map->id2bl(RFIFOL(fd,2))) || sd->state.vending )
+ if (pc_cant_act2(sd) || !(bl = map->id2bl(RFIFOL(fd,2))) || sd->state.vending || sd->state.prevend)
return;
switch (bl->type) {
@@ -11415,11 +11892,18 @@ static void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd)
/// 1 = "You do not have enough zeny."
/// 2 = "You are over your Weight Limit."
/// 3 = "Out of the maximum capacity, you have too many items."
+/// 9 = "Amounts are exceeded the possession of the item is not available for purchase."
+/// 10 = "Props open-air store sales will be traded in RODEX"
+/// 11 = "The exchange failed."
+/// 12 = "The exchange was well done."
+/// 13 = "The item is already sold and out of stock."
+/// 14 = "There is not enough goods to exchange."
static void clif_npc_buy_result(struct map_session_data *sd, unsigned char result)
{
int fd;
nullpo_retv(sd);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0xca));
WFIFOW(fd,0) = 0xca;
@@ -11473,6 +11957,7 @@ static void clif_npc_sell_result(struct map_session_data *sd, unsigned char resu
int fd;
nullpo_retv(sd);
+ pc->update_idle_time(sd, BCIDLE_SCRIPT);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0xcb));
WFIFOW(fd,0) = 0xcb;
@@ -11736,7 +12221,7 @@ static void clif_parse_PutItemToCart(int fd, struct map_session_data *sd) __attr
static void clif_parse_PutItemToCart(int fd, struct map_session_data *sd)
{
int flag = 0;
- if (pc_istrading(sd))
+ if (pc_istrading(sd) || sd->state.prevend)
return;
if (!pc_iscarton(sd))
return;
@@ -11751,6 +12236,8 @@ static void clif_parse_GetItemFromCart(int fd, struct map_session_data *sd) __at
/// 0127 <index>.W <amount>.L
static void clif_parse_GetItemFromCart(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || sd->state.prevend)
+ return;
if (!pc_iscarton(sd))
return;
pc->getitemfromcart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4));
@@ -11966,33 +12453,24 @@ static void clif_parse_UseSkillToPos_mercenary(struct mercenary_data *md, struct
unit->skilluse_pos(&md->bl, x, y, skill_id, skill_lv);
}
-static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
-/// Request to use a targeted skill.
-/// 0113 <skill lv>.W <skill id>.W <target id>.L (CZ_USE_SKILL)
-/// 0438 <skill lv>.W <skill id>.W <target id>.L (CZ_USE_SKILL2)
-/// There are various variants of this packet, some of them have padding between fields.
-static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
+static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2)));
+static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id)
{
- uint16 skill_id, skill_lv;
- int tmp, target_id;
int64 tick = timer->gettick();
- skill_lv = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]);
- skill_id = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[1]);
- target_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[2]);
+ if (skill_lv < 1)
+ skill_lv = 1; //No clue, I have seen the client do this with guild skills :/ [Skotlex]
- if( skill_lv < 1 ) skill_lv = 1; //No clue, I have seen the client do this with guild skills :/ [Skotlex]
-
- tmp = skill->get_inf(skill_id);
- if (tmp&INF_GROUND_SKILL || !tmp)
+ int tmp = skill->get_inf(skill_id);
+ if (tmp & INF_GROUND_SKILL || !tmp)
return; //Using a ground/passive skill on a target? WRONG.
- if( skill_id >= HM_SKILLBASE && skill_id < HM_SKILLBASE + MAX_HOMUNSKILL ) {
+ if (skill_id >= HM_SKILLBASE && skill_id < HM_SKILLBASE + MAX_HOMUNSKILL) {
clif->pUseSkillToId_homun(sd->hd, sd, tick, skill_id, skill_lv, target_id);
return;
}
- if( skill_id >= MC_SKILLBASE && skill_id < MC_SKILLBASE + MAX_MERCSKILL ) {
+ if (skill_id >= MC_SKILLBASE && skill_id < MC_SKILLBASE + MAX_MERCSKILL) {
clif->pUseSkillToId_mercenary(sd->md, sd, tick, skill_id, skill_lv, target_id);
return;
}
@@ -12009,51 +12487,52 @@ static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
return;
}
- if( pc_cant_act(sd)
- && skill_id != RK_REFRESH
- && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN))
- && (sd->state.storage_flag != STORAGE_FLAG_CLOSED && !(tmp&INF_SELF_SKILL)) // SELF skills can be used with the storage open, issue: 8027
- )
+ if (pc_cant_act(sd)
+ && skill_id != RK_REFRESH
+ && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN))
+ && (sd->state.storage_flag != STORAGE_FLAG_CLOSED && !(tmp&INF_SELF_SKILL)) // SELF skills can be used with the storage open, issue: 8027
+ ) {
return;
+ }
- if( pc_issit(sd) )
+ if (pc_issit(sd))
return;
- if( skill->not_ok(skill_id, sd) )
+ if (skill->not_ok(skill_id, sd))
return;
- if( sd->bl.id != target_id && tmp&INF_SELF_SKILL )
+ if (sd->bl.id != target_id && tmp & INF_SELF_SKILL)
target_id = sd->bl.id; // never trust the client
- if( target_id < 0 && -target_id == sd->bl.id ) // for disguises [Valaris]
+ if (target_id < 0 && -target_id == sd->bl.id) // for disguises [Valaris]
target_id = sd->bl.id;
- if( sd->ud.skilltimer != INVALID_TIMER ) {
- if( skill_id != SA_CASTCANCEL && skill_id != SO_SPELLFIST )
+ if (sd->ud.skilltimer != INVALID_TIMER) {
+ if (skill_id != SA_CASTCANCEL && skill_id != SO_SPELLFIST)
return;
- } else if( DIFF_TICK(tick, sd->ud.canact_tick) < 0 ) {
- if( sd->skillitem != skill_id ) {
+ } else if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) {
+ if (sd->skillitem != skill_id) {
clif->skill_fail(sd, skill_id, USESKILL_FAIL_SKILLINTERVAL, 0, 0);
return;
}
}
- if( sd->sc.option&OPTION_COSTUME )
+ if (sd->sc.option & OPTION_COSTUME)
return;
- if( sd->sc.data[SC_BASILICA] && (skill_id != HP_BASILICA || sd->sc.data[SC_BASILICA]->val4 != sd->bl.id) )
+ if (sd->sc.data[SC_BASILICA] && (skill_id != HP_BASILICA || sd->sc.data[SC_BASILICA]->val4 != sd->bl.id))
return; // On basilica only caster can use Basilica again to stop it.
- if( sd->menuskill_id ) {
- if( sd->menuskill_id == SA_TAMINGMONSTER ) {
+ if (sd->menuskill_id) {
+ if (sd->menuskill_id == SA_TAMINGMONSTER) {
clif_menuskill_clear(sd); //Cancel pet capture.
- } else if( sd->menuskill_id != SA_AUTOSPELL )
+ } else if (sd->menuskill_id != SA_AUTOSPELL)
return; //Can't use skills while a menu is open.
}
- if( sd->skillitem == skill_id ) {
- if( skill_lv != sd->skillitemlv )
+ if (sd->skillitem == skill_id) {
+ if (skill_lv != sd->skillitemlv)
skill_lv = sd->skillitemlv;
- if( !(tmp&INF_SELF_SKILL) )
+ if (!(tmp&INF_SELF_SKILL))
pc->delinvincibletimer(sd); // Target skills through items cancel invincibility. [Inkfish]
unit->skilluse_id(&sd->bl, target_id, skill_id, skill_lv);
return;
@@ -12062,22 +12541,56 @@ static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
sd->skillitem = sd->skillitemlv = 0;
if (skill_id >= GD_SKILLBASE && skill_id < GD_MAX) {
- if( sd->state.gmaster_flag )
+ if (sd->state.gmaster_flag)
skill_lv = guild->checkskill(sd->guild, skill_id);
else
skill_lv = 0;
} else {
tmp = pc->checkskill(sd, skill_id);
- if( skill_lv > tmp )
+ if (skill_lv > tmp)
skill_lv = tmp;
}
pc->delinvincibletimer(sd);
- if( skill_lv )
+ if (skill_lv)
unit->skilluse_id(&sd->bl, target_id, skill_id, skill_lv);
}
+static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+/// Request to use a targeted skill.
+/// 0113 <skill lv>.W <skill id>.W <target id>.L (CZ_USE_SKILL)
+/// 0438 <skill lv>.W <skill id>.W <target id>.L (CZ_USE_SKILL2)
+/// There are various variants of this packet, some of them have padding between fields.
+static void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
+{
+ clif->useSkillToIdReal(fd,
+ sd,
+ RFIFOW(fd, packet_db[RFIFOW(fd, 0)].pos[1]),
+ RFIFOW(fd, packet_db[RFIFOW(fd, 0)].pos[0]),
+ RFIFOL(fd, packet_db[RFIFOW(fd, 0)].pos[2]));
+}
+
+static void clif_parse_startUseSkillToId(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_startUseSkillToId(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
+ const struct PACKET_CZ_START_USE_SKILL *p = RFIFOP(fd, 0);
+ clif->useSkillToIdReal(fd, sd, p->skillId, p->skillLv, p->targetId);
+#endif
+}
+
+static void clif_parse_stopUseSkillToId(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_stopUseSkillToId(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
+ const struct PACKET_CZ_STOP_USE_SKILL *p = RFIFOP(fd, 0);
+ if (p->skillId != GC_ROLLINGCUTTER) {
+ ShowWarning("Packet CZ_STOP_USE_SKILL usage for unknown skill: %d\n", p->skillId);
+ }
+#endif
+}
+
/*==========================================
* Client tells server he'd like to use AoE skill id 'skill_id' of level 'skill_lv' on 'x','y' location
*------------------------------------------*/
@@ -12382,10 +12895,19 @@ static void clif_parse_NpcAmountInput(int fd, struct map_session_data *sd)
int npcid = RFIFOL(fd,2);
int amount = RFIFOL(fd,6);
- if (amount >= 0)
+ if (amount < sd->npc_amount_min) {
+ sd->npc_amount = sd->npc_amount_min;
+ sd->npc_input_capped_range = -1;
+ }
+ else if (amount > sd->npc_amount_max) {
+ sd->npc_amount = sd->npc_amount_max;
+ sd->npc_input_capped_range = 1;
+ }
+ else {
sd->npc_amount = amount;
- else
- sd->npc_amount = 0;
+ sd->npc_input_capped_range = 0;
+ }
+
npc->scriptcont(sd, npcid, false);
}
@@ -12454,7 +12976,7 @@ static void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd
short idx = RFIFOW(fd, packet_db[cmd].pos[0]) - 2;
int n;
- if (idx < 0 || idx >= MAX_INVENTORY || sd->inventory_data[idx] == NULL || sd->status.inventory[idx].nameid <= 0)
+ if (idx < 0 || idx >= sd->status.inventorySize || sd->inventory_data[idx] == NULL || sd->status.inventory[idx].nameid <= 0)
return;
if ((n = pc->have_magnifier(sd) ) != INDEX_NOT_FOUND &&
@@ -12474,7 +12996,7 @@ static void clif_parse_SelectArrow(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
return;
}
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
itemId = RFIFOL(fd, 2);
#else
itemId = RFIFOW(fd, 2);
@@ -12599,12 +13121,12 @@ static void clif_parse_MoveToKafra(int fd, struct map_session_data *sd)
{
int item_index, item_amount;
- if (pc_istrading(sd))
+ if (pc_istrading(sd) || sd->state.prevend)
return;
item_index = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2;
item_amount = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[1]);
- if (item_index < 0 || item_index >= MAX_INVENTORY || item_amount < 1)
+ if (item_index < 0 || item_index >= sd->status.inventorySize || item_amount < 1)
return;
if (sd->state.storage_flag == STORAGE_FLAG_NORMAL)
@@ -12620,6 +13142,9 @@ static void clif_parse_MoveFromKafra(int fd, struct map_session_data *sd) __attr
/// There are various variants of this packet, some of them have padding between fields.
static void clif_parse_MoveFromKafra(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || sd->state.prevend)
+ return;
+
int item_index, item_amount;
item_index = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-1;
@@ -12636,7 +13161,7 @@ static void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
/// 0129 <index>.W <amount>.L
static void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd)
{
- if( sd->state.vending )
+ if (pc_istrading(sd) || sd->state.prevend)
return;
if (!pc_iscarton(sd))
return;
@@ -12652,7 +13177,7 @@ static void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
/// 0128 <index>.W <amount>.L
static void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd)
{
- if( sd->state.vending )
+ if (pc_istrading(sd) || sd->state.prevend)
return;
if (!pc_iscarton(sd))
return;
@@ -14255,10 +14780,10 @@ static void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
return;
}
- ARR_FIND(0, MAX_INVENTORY, idx, sd->status.inventory[idx].card[0] == CARD0_PET &&
+ ARR_FIND(0, sd->status.inventorySize, idx, sd->status.inventory[idx].card[0] == CARD0_PET &&
sd->status.pet_id == MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2]));
- if (idx == MAX_INVENTORY) {
+ if (idx == sd->status.inventorySize) {
clif->petEvolutionResult(fd, PET_EVOL_NO_PETEGG);
return;
}
@@ -14322,7 +14847,7 @@ static void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
intif->create_pet(
sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
clif->petEvolutionResult(fd, PET_EVOL_SUCCESS);
@@ -15467,6 +15992,7 @@ static void clif_parse_FeelSaveOk(int fd, struct map_session_data *sd)
/// 0 = sun
/// 1 = moon
/// 2 = star
+/// 10 = Do you agree to cast the magic spell that consumes 1 Black Gemstone and 1,000,000 Zeny?
static void clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv)
{
nullpo_retv(sd);
@@ -16142,7 +16668,7 @@ static void clif_Auction_openwindow(struct map_session_data *sd)
nullpo_retv(sd);
fd = sd->fd;
- if (sd->state.storage_flag != STORAGE_FLAG_CLOSED || sd->state.vending || sd->state.buyingstore || sd->state.trading)
+ if (sd->state.storage_flag != STORAGE_FLAG_CLOSED || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->state.trading)
return;
if( !battle_config.feature_auction )
@@ -16243,7 +16769,7 @@ static void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
if( sd->auction.amount > 0 )
sd->auction.amount = 0;
- if( idx < 0 || idx >= MAX_INVENTORY ) {
+ if (idx < 0 || idx >= sd->status.inventorySize) {
ShowWarning("Character %s trying to set invalid item index in auctions.\n", sd->status.name);
return;
}
@@ -16318,7 +16844,7 @@ static void clif_parse_Auction_register(int fd, struct map_session_data *sd)
if (!battle_config.feature_auction)
return;
- Assert_retv(sd->auction.index >= 0 && sd->auction.index < MAX_INVENTORY);
+ Assert_retv(sd->auction.index >= 0 && sd->auction.index < sd->status.inventorySize);
memset(&auction, 0, sizeof(auction));
auction.price = RFIFOL(fd,2);
@@ -16815,6 +17341,9 @@ static void clif_parse_cz_config(int fd, struct map_session_data *sd)
hd->homunculus.autofeed = flag;
break;
}
+ case CZ_CONFIG_CALL:
+ sd->status.allow_call = flag;
+ break;
default:
ShowWarning("clif_parse_cz_config: Unsupported type has been received (%u).\n", type);
return;
@@ -16825,13 +17354,20 @@ static void clif_parse_cz_config(int fd, struct map_session_data *sd)
static void clif_parse_PartyTick(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// Request to change party invitation tick.
/// value:
-/// 0 = disabled
-/// 1 = enabled
+/// 0 = enabled
+/// 1 = disabled
static void clif_parse_PartyTick(int fd, struct map_session_data *sd)
{
- bool flag = RFIFOB(fd,6)?true:false;
- sd->status.allow_party = flag;
- clif->partytickack(sd, flag);
+ const struct PACKET_CZ_PARTY_CONFIG *const p = RFIFOP(fd, 0);
+ const bool newAllowParty = p->refuseInvite ? true : false;
+ if (newAllowParty != sd->status.allow_party) {
+ sd->status.allow_party = newAllowParty;
+ if ((map->save_settings & 512) != 0)
+ chrif->save(sd, 0); // send to char server
+ } else {
+ sd->status.allow_party = newAllowParty;
+ }
+ clif->partytickack(sd, sd->status.allow_party);
}
/// Questlog System [Kevin] [Inkfish]
@@ -17798,8 +18334,8 @@ static void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *s
return; // Canceled by player.
}
- if (n > MAX_INVENTORY)
- n = MAX_INVENTORY; // It should be impossible to have more than that.
+ if (n > sd->status.inventorySize)
+ n = sd->status.inventorySize; // It should be impossible to have more than that.
if (sd->menuskill_id != SO_EL_ANALYSIS && sd->menuskill_id != GN_CHANGEMATERIAL) {
clif_menuskill_clear(sd);
@@ -18386,6 +18922,7 @@ static void clif_search_store_info_ack(struct map_session_data *sd)
/// 2 = "You cannot search anymore." (0x706)
/// 3 = "You cannot search yet." (0x708)
/// 4 = "No sale (purchase) information available." (0x705)
+/// 362 = silent error
static void clif_search_store_info_failed(struct map_session_data *sd, unsigned char reason)
{
#if PACKETVER >= 20100601
@@ -18552,7 +19089,7 @@ static int clif_spellbook_list(struct map_session_data *sd)
WFIFOHEAD(fd, 8 * 8 + 8);
WFIFOW(fd,0) = 0x1ad;
- for( i = 0, c = 0; i < MAX_INVENTORY; i ++ )
+ for (i = 0, c = 0; i < sd->status.inventorySize; i ++ )
{
if( itemdb_is_spellbook(sd->status.inventory[i].nameid) )
{
@@ -18592,7 +19129,7 @@ static int clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, sh
WFIFOHEAD(fd, 8 * 8 + 8);
WFIFOW(fd,0) = 0x1ad; // This is the official packet. [pakpil]
- for( i = 0, c = 0; i < MAX_INVENTORY; i ++ ) {
+ for (i = 0, c = 0; i < sd->status.inventorySize; i ++) {
if( itemdb_is_element(sd->status.inventory[i].nameid) ) {
WFIFOW(fd, c * 2 + 4) = sd->status.inventory[i].nameid;
c ++;
@@ -18629,7 +19166,7 @@ static int clif_poison_list(struct map_session_data *sd, uint16 skill_lv)
WFIFOHEAD(fd, 8 * 8 + 8);
WFIFOW(fd,0) = 0x1ad; // This is the official packet. [pakpil]
- for( i = 0, c = 0; i < MAX_INVENTORY; i ++ ) {
+ for (i = 0, c = 0; i < sd->status.inventorySize; i ++) {
if( itemdb_is_poison(sd->status.inventory[i].nameid) ) {
WFIFOW(fd, c * 2 + 4) = sd->status.inventory[i].nameid;
c ++;
@@ -18721,7 +19258,7 @@ static void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd)
if( sd->menuskill_id != SC_AUTOSHADOWSPELL )
return;
- if( pc_istrading(sd) ) {
+ if (pc_istrading(sd) || sd->state.prevend) {
clif->skill_fail(sd, sd->ud.skill_id, 0, 0, 0);
clif_menuskill_clear(sd);
return;
@@ -18770,7 +19307,7 @@ static void clif_parse_MoveItem(int fd, struct map_session_data *sd)
index = RFIFOW(fd,2)-2;
- if (index < 0 || index >= MAX_INVENTORY)
+ if (index < 0 || index >= sd->status.inventorySize)
return;
if ( sd->status.inventory[index].favorite && RFIFOB(fd, 4) == 1 )
@@ -19070,18 +19607,26 @@ static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd)
} else {
result = CSBR_UNKONWN_ITEM;
}
-
- WFIFOHEAD(fd, 16);
- WFIFOW(fd, 0) = 0x849;
- WFIFOL(fd, 2) = id;
- WFIFOW(fd, 6) = result;/* result */
- WFIFOL(fd, 8) = sd->cashPoints;/* current cash point */
- WFIFOL(fd, 12) = sd->kafraPoints;// [Ryuuzaki]
- WFIFOSET(fd, 16);
+ clif->cashShopBuyAck(fd, sd, id, result);
}
}
+static void clif_cashShopBuyAck(int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result)
+{
+#if PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT));
+ struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT *p = WFIFOP(fd, 0);
+ p->packetType = 0x849;
+ p->itemId = itemId;
+ p->result = result;
+ p->cashPoints = sd->cashPoints;
+ p->kafraPoints = sd->kafraPoints;
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT));
+#endif
+}
+
static void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/* [Ind/Hercules] */
static void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd)
@@ -19164,7 +19709,7 @@ static void clif_partytickack(struct map_session_data *sd, bool flag)
WFIFOSET(sd->fd, packet_len(0x2c9));
}
-static void clif_ShowScript(struct block_list *bl, const char *message)
+static void clif_ShowScript(struct block_list *bl, const char *message, enum send_target target)
{
#if PACKETVER >= 20110111
char buf[256];
@@ -19185,7 +19730,7 @@ static void clif_ShowScript(struct block_list *bl, const char *message)
WBUFW(buf,2) = len+8;
WBUFL(buf,4) = bl->id;
safestrncpy(WBUFP(buf,8),message,len);
- clif->send(buf,WBUFW(buf,2),bl,AREA);
+ clif->send(buf, WBUFW(buf,2), bl, target);
#endif
}
@@ -19695,31 +20240,31 @@ static void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd)
/* NPC Market (by Ind after an extensive debugging of the packet, only possible thanks to Yommy <3) */
static void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd)
{
-#if PACKETVER >= 20131223
- struct npc_item_list *shop;
- unsigned short shop_size, i, c;
-
+#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
nullpo_retv(sd);
nullpo_retv(nd);
- shop = nd->u.scr.shop->item;
- shop_size = nd->u.scr.shop->items;
- npcmarket_open.PacketType = npcmarketopenType;
+ struct npc_item_list *shop = nd->u.scr.shop->item;
+ const int shop_size = nd->u.scr.shop->items;
+
+ int c = 0;
+ int maxCount = (sizeof(packet_buf) - sizeof(struct PACKET_ZC_NPC_MARKET_OPEN)) / sizeof(struct PACKET_ZC_NPC_MARKET_OPEN_sub);
+ struct PACKET_ZC_NPC_MARKET_OPEN *packet = (struct PACKET_ZC_NPC_MARKET_OPEN*)&packet_buf[0];
+ packet->packetType = HEADER_ZC_NPC_MARKET_OPEN;
- for(i = 0, c = 0; i < shop_size; i++) {
+ for (int i = 0; i < shop_size && c < maxCount; i++) {
struct item_data *id = NULL;
if (shop[i].nameid && (id = itemdb->exists(shop[i].nameid)) != NULL) {
- npcmarket_open.list[c].nameid = shop[i].nameid;
- npcmarket_open.list[c].price = shop[i].value;
- npcmarket_open.list[c].qty = shop[i].qty;
- npcmarket_open.list[c].type = itemtype(id->type);
- npcmarket_open.list[c].view = ( id->view_id > 0 ) ? id->view_id : id->nameid;
+ packet->list[c].nameid = shop[i].nameid;
+ packet->list[c].price = shop[i].value;
+ packet->list[c].qty = shop[i].qty;
+ packet->list[c].type = itemtype(id->type);
+ packet->list[c].weight = id->weight * 10;
c++;
}
}
- npcmarket_open.PacketLength = 4 + ( sizeof(npcmarket_open.list[0]) * c );
-
- clif->send(&npcmarket_open,npcmarket_open.PacketLength,&sd->bl,SELF);
+ packet->packetLength = sizeof(struct PACKET_ZC_NPC_MARKET_OPEN) + sizeof(struct PACKET_ZC_NPC_MARKET_OPEN_sub) * c;
+ clif->send(packet, packet->packetLength, &sd->bl, SELF);
#endif
}
@@ -19730,6 +20275,12 @@ static void clif_parse_NPCMarketClosed(int fd, struct map_session_data *sd)
sd->npc_shopid = 0;
}
+static void clif_parse_NPCBarterClosed(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NPCBarterClosed(int fd, struct map_session_data *sd)
+{
+ sd->npc_shopid = 0;
+}
+
static void clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response)
{
#if PACKETVER >= 20131223
@@ -19776,7 +20327,7 @@ static void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd)
int count = (p->PacketLength - 4) / sizeof p->list[0];
struct itemlist item_list;
- Assert_retv(count >= 0 && count <= MAX_INVENTORY);
+ Assert_retv(count >= 0 && count <= sd->status.inventorySize);
VECTOR_INIT(item_list);
VECTOR_ENSURE(item_list, count, 1);
@@ -19823,7 +20374,7 @@ static void clif_parse_RouletteOpen(int fd, struct map_session_data *sd)
}
p.PacketType = 0xa1a;
- p.Result = 0;
+ p.Result = OPEN_ROULETTE_SUCCESS;
p.Serial = 0;
p.Step = sd->roulette.stage - 1;
p.Idx = (char)sd->roulette.prizeIdx;
@@ -20082,7 +20633,7 @@ static bool clif_parse_roulette_db(void)
/**
*
**/
-static void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID)
+static void clif_roulette_generate_ack(struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID)
{
#if PACKETVER >= 20140612
struct packet_roulette_generate_ack p;
@@ -20101,20 +20652,34 @@ static void clif_roulette_generate_ack(struct map_session_data *sd, unsigned cha
#endif
}
+static void clif_roulette_close(struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20141008 || PACKETVER_RE_NUM >= 20140903 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+
+ struct PACKET_ZC_ACK_CLOSE_ROULETTE p;
+ p.packetType = HEADER_ZC_ACK_CLOSE_ROULETTE;
+ p.result = 0; // close window
+
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
+#endif
+}
+
/**
* Stackable items merger
*/
static void clif_openmergeitem(int fd, struct map_session_data *sd)
{
-#if PACKETVER > 20120228
- int i = 0, n = 0, j = 0;
+#if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+
+ int n = 0, j = 0;
struct merge_item merge_items[MAX_INVENTORY];
struct merge_item *merge_items_[MAX_INVENTORY] = {0};
- nullpo_retv(sd);
- memset(&merge_items,'\0',sizeof(merge_items));
+ memset(&merge_items, '\0', sizeof(merge_items));
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
struct item *item_data = &sd->status.inventory[i];
if (item_data->nameid == 0 || !itemdb->isstackable(item_data->nameid) || item_data->bound != IBT_NONE)
@@ -20125,17 +20690,18 @@ static void clif_openmergeitem(int fd, struct map_session_data *sd)
n++;
}
- qsort(merge_items,n,sizeof(struct merge_item),clif->comparemergeitem);
+ qsort(merge_items, n, sizeof(struct merge_item), clif->comparemergeitem);
- for (i = 0, j = 0; i < n; i++) {
- if (i > 0 && merge_items[i].nameid == merge_items[i-1].nameid)
+ j = 0;
+ for (int i = 0; i < n; i++) {
+ if (i > 0 && merge_items[i].nameid == merge_items[i - 1].nameid)
{
merge_items_[j] = &merge_items[i];
j++;
continue;
}
- if (i < n - 1 && merge_items[i].nameid == merge_items[i+1].nameid)
+ if (i < n - 1 && merge_items[i].nameid == merge_items[i + 1].nameid)
{
merge_items_[j] = &merge_items[i];
j++;
@@ -20143,12 +20709,14 @@ static void clif_openmergeitem(int fd, struct map_session_data *sd)
}
}
- WFIFOHEAD(fd,2*j+4);
- WFIFOW(fd,0) = 0x96d;
- WFIFOW(fd,2) = 2*j+4;
- for ( i = 0; i < j; i++ )
- WFIFOW(fd,i*2+4) = merge_items_[i]->position;
- WFIFOSET(fd,2*j+4);
+ const int len = sizeof(struct PACKET_ZC_MERGE_ITEM_OPEN) + j * sizeof(struct PACKET_ZC_MERGE_ITEM_OPEN_sub);
+ WFIFOHEAD(fd, len);
+ struct PACKET_ZC_MERGE_ITEM_OPEN *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_MERGE_ITEM_OPEN;
+ p->packetLen = len;
+ for (int i = 0; i < j; i++)
+ p->items[i].index = merge_items_[i]->position;
+ WFIFOSET(fd, len);
#endif
}
@@ -20164,35 +20732,42 @@ static int clif_comparemergeitem(const void *a, const void *b)
return a_->nameid > b_->nameid ? -1 : 1;
}
+static void clif_mergeitems(int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason)
+{
+#if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_ACK_MERGE_ITEM));
+ struct PACKET_ZC_ACK_MERGE_ITEM *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_ACK_MERGE_ITEM;
+ p->index = index + 2;
+ p->amount = amount;
+ p->reason = reason;
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_ACK_MERGE_ITEM));
+#endif
+}
+
static void clif_ackmergeitems(int fd, struct map_session_data *sd)
{
-#if PACKETVER > 20120228
- int i = 0, n = 0, length = 0, count = 0;
+#if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+
+ int i = 0, n = 0, count = 0;
int nameid = 0;
int16 indexes[MAX_INVENTORY] = {0}, amounts[MAX_INVENTORY] = {0};
- struct item item_data;
- nullpo_retv(sd);
- length = (RFIFOW(fd,2) - 4)/2;
+ int length = (RFIFOW(fd, 2) - 4) / 2;
- if (length >= MAX_INVENTORY || length < 2) {
- WFIFOHEAD(fd,7);
- WFIFOW(fd,0) = 0x96f;
- WFIFOW(fd,2) = 0;
- WFIFOW(fd,4) = 0;
- WFIFOB(fd,6) = MERGEITEM_FAILD;
- WFIFOSET(fd,7);
+ if (length >= sd->status.inventorySize || length < 2) {
+ clif->mergeitems(fd, sd, 0, 0, MERGEITEM_FAILD);
return;
}
for (i = 0, n = 0; i < length; i++) {
- int16 idx = RFIFOW(fd,i*2+4) - 2;
- struct item *it = NULL;
+ int16 idx = RFIFOW(fd, i * 2 + 4) - 2;
- if (idx < 0 || idx >= MAX_INVENTORY)
+ if (idx < 0 || idx >= sd->status.inventorySize)
continue;
- it = &sd->status.inventory[idx];
+ struct item *it = &sd->status.inventory[idx];
if (it->nameid == 0 || !itemdb->isstackable(it->nameid) || it->bound != IBT_NONE)
continue;
@@ -20210,43 +20785,29 @@ static void clif_ackmergeitems(int fd, struct map_session_data *sd)
}
if (n < 2 || count == 0) {
- WFIFOHEAD(fd,7);
- WFIFOW(fd,0) = 0x96f;
- WFIFOW(fd,2) = 0;
- WFIFOW(fd,4) = 0;
- WFIFOB(fd,6) = MERGEITEM_FAILD;
- WFIFOSET(fd,7);
+ clif->mergeitems(fd, sd, 0, 0, MERGEITEM_FAILD);
return;
}
if (count > MAX_AMOUNT) {
- WFIFOHEAD(fd,7);
- WFIFOW(fd,0) = 0x96f;
- WFIFOW(fd,2) = 0;
- WFIFOW(fd,4) = 0;
- WFIFOB(fd,6) = MERGEITEM_MAXCOUNTFAILD;
- WFIFOSET(fd,7);
+ clif->mergeitems(fd, sd, 0, 0, MERGEITEM_MAXCOUNTFAILD);
return;
}
for (i = 0; i < n; i++)
- pc->delitem(sd,indexes[i],amounts[i],0,DELITEM_NORMAL,LOG_TYPE_NPC);
+ pc->delitem(sd, indexes[i], amounts[i], 0, DELITEM_NORMAL, LOG_TYPE_NPC);
- memset(&item_data,'\0',sizeof(item_data));
+ struct item item_data;
+ memset(&item_data, '\0', sizeof(item_data));
item_data.nameid = nameid;
item_data.identify = 1;
item_data.unique_id = itemdb->unique_id(sd);
- pc->additem(sd,&item_data,count,LOG_TYPE_NPC);
+ pc->additem(sd, &item_data, count, LOG_TYPE_NPC);
- ARR_FIND(0,MAX_INVENTORY,i,item_data.unique_id == sd->status.inventory[i].unique_id);
+ ARR_FIND(0, sd->status.inventorySize, i, item_data.unique_id == sd->status.inventory[i].unique_id);
- WFIFOHEAD(fd,7);
- WFIFOW(fd,0) = 0x96f;
- WFIFOW(fd,2) = i+2;
- WFIFOW(fd,4) = count;
- WFIFOB(fd,6) = MERGEITEM_SUCCESS;
- WFIFOSET(fd,7);
+ clif->mergeitems(fd, sd, i, count, MERGEITEM_SUCCESS);
#endif
}
@@ -20358,21 +20919,21 @@ static const char *clif_get_bl_name(const struct block_list *bl)
*/
static void clif_clan_basicinfo(struct map_session_data *sd)
{
-#if PACKETVER >= 20120716
+#if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
int len, i, fd;
struct clan *c, *ally, *antagonist;
struct PACKET_ZC_CLANINFO *packet = NULL;
-
nullpo_retv(sd);
nullpo_retv(c = sd->clan);
len = sizeof(struct PACKET_ZC_CLANINFO);
fd = sd->fd;
- WFIFOHEAD(fd, len);
+ const int maxEntries = 100; // max entries with clan names
+ WFIFOHEAD(fd, len + maxEntries * 24);
packet = WFIFOP(fd, 0);
- packet->PacketType = clanBasicInfo;
+ packet->PacketType = HEADER_ZC_CLANINFO;
packet->ClanID = c->clan_id;
safestrncpy(packet->ClanName, c->name, NAME_LENGTH);
@@ -20383,24 +20944,27 @@ static void clif_clan_basicinfo(struct map_session_data *sd)
packet->AllyCount = VECTOR_LENGTH(c->allies);
packet->AntagonistCount = VECTOR_LENGTH(c->antagonists);
+ int cnt = 0;
// All allies and antagonists are assumed as valid entries
// since it only gets inside the vector after the validation
// on clan->config_read
- for (i = 0; i < VECTOR_LENGTH(c->allies); i++) {
+ for (i = 0; i < VECTOR_LENGTH(c->allies) && cnt < maxEntries; i++) {
struct clan_relationship *al = &VECTOR_INDEX(c->allies, i);
if ((ally = clan->search(al->clan_id)) != NULL) {
safestrncpy(WFIFOP(fd, len), ally->name, NAME_LENGTH);
len += NAME_LENGTH;
+ cnt ++;
}
}
- for (i = 0; i < VECTOR_LENGTH(c->antagonists); i++) {
+ for (i = 0; i < VECTOR_LENGTH(c->antagonists) && cnt < maxEntries; i++) {
struct clan_relationship *an = &VECTOR_INDEX(c->antagonists, i);
if ((antagonist = clan->search(an->clan_id)) != NULL) {
safestrncpy(WFIFOP(fd, len), antagonist->name, NAME_LENGTH);
len += NAME_LENGTH;
+ cnt ++;
}
}
@@ -20744,8 +21308,8 @@ static void clif_change_title_ack(int fd, struct map_session_data *sd, int title
WFIFOSET(fd, packet_len(0xa2f));
// Update names
- clif->charnameack(fd, &sd->bl);
- clif->charnameack(0, &sd->bl);
+ clif->blname_ack(fd, &sd->bl);
+ clif->blname_ack(0, &sd->bl);
#endif
}
// End of Achievement System
@@ -20795,7 +21359,7 @@ static void clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, i
int fd, j;
nullpo_retv(sd);
- if (idx < 0 || idx >= MAX_INVENTORY)
+ if (idx < 0 || idx >= sd->status.inventorySize)
return;
fd = sd->fd;
@@ -20848,7 +21412,7 @@ static void clif_rodex_remove_item_result(struct map_session_data *sd, int16 idx
int fd;
nullpo_retv(sd);
- Assert_retv(idx >= 0 && idx < MAX_INVENTORY);
+ Assert_retv(idx >= 0 && idx < sd->status.inventorySize);
fd = sd->fd;
@@ -20868,7 +21432,7 @@ static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_CHECKNAME *rPacket = RFIFOP(fd, 0);
int char_id = 0, base_level = 0;
- short class = 0;
+ int class = 0;
char name[NAME_LENGTH];
safestrncpy(name, rPacket->Name, NAME_LENGTH);
@@ -20876,7 +21440,7 @@ static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
rodex->check_player(sd, name, &base_level, &char_id, &class);
}
-static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name)
+static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name)
{
#if PACKETVER >= 20140521
struct PACKET_ZC_CHECKNAME *sPacket;
@@ -21417,7 +21981,7 @@ static void clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool
WBUFB(buf,8) = enable;
WBUFL(buf,9) = effectId;
- clif_send(buf, 13, bl, AREA);
+ clif->send(buf, 13, bl, AREA);
#endif
}
@@ -21526,6 +22090,18 @@ static void clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType)
p.data = 0;
#endif
break;
+ case CZ_MACRO_REGISTER_UI:
+ p.UIType = ZC_CAPTCHA_UI;
+#if PACKETVER >= 20171122
+ p.data = 0;
+#endif
+ break;
+ case CZ_MACRO_DETECTOR_UI:
+ p.UIType = ZC_MACRO_UI;
+#if PACKETVER >= 20171122
+ p.data = 0;
+#endif
+ break;
case CZ_ATTENDANCE_UI:
{
if (clif->attendance_getendtime() < time(NULL)) {
@@ -21612,6 +22188,17 @@ static void clif_parse_attendance_reward_request(int fd, struct map_session_data
static void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd)
{
+ clif->loadConfirm(sd);
+}
+
+static void clif_loadConfirm(struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320 || PACKETVER_ZERO_NUM >= 20190410
+ nullpo_retv(sd);
+ struct PACKET_ZC_LOAD_CONFIRM p;
+ p.packetType = HEADER_ZC_LOAD_CONFIRM;
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
+#endif
}
static void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data)
@@ -21631,7 +22218,7 @@ static void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data
static void clif_parse_private_airship_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_private_airship_request(int fd, struct map_session_data *sd)
{
-#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620
+#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620 || defined(PACKETVER_ZERO)
char evname[EVENT_NAME_LENGTH];
struct event_data *ev = NULL;
const struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST *p = RP2PTR(fd);
@@ -21651,7 +22238,7 @@ static void clif_parse_private_airship_request(int fd, struct map_session_data *
static void clif_private_airship_response(struct map_session_data *sd, uint32 flag)
{
-#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620
+#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620 || defined(PACKETVER_ZERO)
struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE p;
nullpo_retv(sd);
@@ -21670,162 +22257,23 @@ static void clif_private_airship_response(struct map_session_data *sd, uint32 fl
#endif
}
-static void clif_stylist_vector_init(void)
-{
- int i;
- for (i = 0; i < MAX_STYLIST_TYPE; i++) {
- VECTOR_INIT(stylist_data[i]);
- }
-}
-
-static void clif_stylist_vector_clear(void)
-{
- int i;
- for (i = 0; i < MAX_STYLIST_TYPE; i++) {
- VECTOR_CLEAR(stylist_data[i]);
- }
-}
-
-static bool clif_stylist_read_db_libconfig(void)
-{
- struct config_t stylist_conf;
- struct config_setting_t *stylist = NULL, *it = NULL;
- const char *config_filename = "db/stylist_db.conf"; // FIXME hardcoded name
- int i = 0;
-
- if (!libconfig->load_file(&stylist_conf, config_filename))
- return false;
-
- if ((stylist = libconfig->setting_get_member(stylist_conf.root, "stylist_db")) == NULL) {
- ShowError("can't read %s\n", config_filename);
- return false;
- }
-
- clif->stylist_vector_clear();
-
- while ((it = libconfig->setting_get_elem(stylist, i++))) {
- clif->stylist_read_db_libconfig_sub(it, i - 1, config_filename);
- }
-
- libconfig->destroy(&stylist_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, config_filename);
- return true;
-}
-
-static bool clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source)
-{
- struct stylist_data_entry entry = { 0 };
- int i32 = 0, type = 0;
- int64 i64 = 0;
-
- nullpo_ret(it);
- nullpo_ret(source);
-
- if (!itemdb->lookup_const(it, "Type", &type) || type >= MAX_STYLIST_TYPE || type < 0) {
- ShowWarning("clif_stylist_read_db_libconfig_sub: Invalid or missing Type (%d) in \"%s\", entry #%d, skipping.\n", type, source, idx);
- return false;
- }
- if (!itemdb->lookup_const(it, "Id", &i32) || i32 < 0) {
- ShowWarning("clif_stylist_read_db_libconfig_sub: Invalid or missing Id (%d) in \"%s\", entry #%d, skipping.\n", i32, source, idx);
- return false;
- }
- entry.id = i32;
-
- if (libconfig->setting_lookup_int64(it, "Zeny", &i64)) {
- if (i64 > MAX_ZENY) {
- ShowWarning("clif_stylist_read_db_libconfig_sub: zeny is too big in \"%s\", entry #%d, capping to MAX_ZENY.\n", source, idx);
- entry.zeny = MAX_ZENY;
- } else {
- entry.zeny = (int)i64;
- }
- }
-
- if (itemdb->lookup_const(it, "ItemID", &i32))
- entry.itemid = i32;
-
- if (itemdb->lookup_const(it, "BoxItemID", &i32))
- entry.boxid = i32;
-
- if (libconfig->setting_lookup_bool(it, "AllowDoram", &i32))
- entry.allow_doram = (i32 == 0) ? false : true;
-
- VECTOR_ENSURE(stylist_data[type], 1, 1);
- VECTOR_PUSH(stylist_data[type], entry);
- return true;
-}
-
-static bool clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx)
-{
- struct item it;
- struct stylist_data_entry *entry;
-
- nullpo_retr(false, sd);
- Assert_retr(false, type >= 0 && type < MAX_STYLIST_TYPE);
- Assert_retr(false, idx >= 0 && idx < VECTOR_LENGTH(stylist_data[type]));
-
- entry = &VECTOR_INDEX(stylist_data[type], idx);
-
- if (sd->status.class == JOB_SUMMONER && (entry->allow_doram == false))
- return false;
-
- if (entry->id >= 0) {
- if (entry->zeny != 0) {
- if (sd->status.zeny < entry->zeny)
- return false;
-
- sd->status.zeny -= entry->zeny;
- clif->updatestatus(sd, SP_ZENY);
- } else if (entry->itemid != 0) {
- it.nameid = entry->itemid;
- it.amount = 1;
- return script->buildin_delitem_search(sd, &it, false);
- } else if (entry->boxid != 0) {
- it.nameid = entry->boxid;
- it.amount = 1;
- return script->buildin_delitem_search(sd, &it, false);
- }
- return true;
- }
- return false;
-}
-static void clif_stylist_send_rodexitem(struct map_session_data *sd, int itemid)
-{
- struct rodex_message msg = { 0 };
-
- nullpo_retv(sd);
-
- msg.receiver_id = sd->status.char_id;
- msg.items[0].item.nameid = itemid;
- msg.items[0].item.amount = 1;
- msg.items[0].item.identify = 1;
- msg.type = MAIL_TYPE_NPC | MAIL_TYPE_ITEM;
-
- safestrncpy(msg.sender_name, msg_txt(366), NAME_LENGTH);
- safestrncpy(msg.title, msg_txt(367), RODEX_TITLE_LENGTH);
- safestrncpy(msg.body, msg_txt(368), MAIL_BODY_LENGTH);
- msg.send_date = (int)time(NULL);
- msg.expire_date = (int)time(NULL) + RODEX_EXPIRE;
-
- intif->rodex_sendmail(&msg);
-}
-
static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_STYLE_CHANGE *p = RP2PTR(fd);
if (p->HeadStyle > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR, p->HeadStyle, false);
+ stylist->request_style_change(sd, LOOK_HAIR, p->HeadStyle, false);
if (p->HeadPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
+ stylist->request_style_change(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
if (p->BodyPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
+ stylist->request_style_change(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
if (p->TopAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
if (p->MidAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_MID, p->MidAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_MID, p->MidAccessory, true);
if (p->BottomAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
clif->style_change_response(sd, STYLIST_SHOP_SUCCESS);
return;
}
@@ -21836,43 +22284,30 @@ static void clif_parse_cz_req_style_change2(int fd, struct map_session_data *sd)
const struct PACKET_CZ_REQ_STYLE_CHANGE2 *p = RP2PTR(fd);
if (p->HeadStyle > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR, p->HeadStyle, false);
+ stylist->request_style_change(sd, LOOK_HAIR, p->HeadStyle, false);
if (p->HeadPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
+ stylist->request_style_change(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
if (p->BodyPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
+ stylist->request_style_change(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
if (p->TopAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
if (p->MidAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_MID, p->MidAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_MID, p->MidAccessory, true);
if (p->BottomAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
if (p->BodyStyle > 0) {
if (pc->has_second_costume(sd)) {
- clif->cz_req_style_change_sub(sd, LOOK_BODY2, p->BodyStyle, false);
+ stylist->request_style_change(sd, LOOK_BODY2, p->BodyStyle, false);
}
}
clif->style_change_response(sd, STYLIST_SHOP_SUCCESS);
return;
}
-static void clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem)
+static void clif_parse_cz_style_close(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_cz_style_close(int fd, struct map_session_data *sd)
{
- struct stylist_data_entry *entry;
-
- nullpo_retv(sd);
- Assert_retv(idx > 0);
- Assert_retv(type >= 0 && type < MAX_STYLIST_TYPE);
-
- if ((idx - 1) < VECTOR_LENGTH(stylist_data[type])) {
- entry = &VECTOR_INDEX(stylist_data[type], idx - 1);
- if (clif->style_change_validate_requirements(sd, type, idx - 1)) {
- if (isitem == false)
- pc->changelook(sd, type, entry->id);
- else
- clif->stylist_send_rodexitem(sd, entry->id);
- }
- }
+ // do nothing
}
static void clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag)
@@ -21945,7 +22380,7 @@ static void clif_camera_showWindow(struct map_session_data *sd)
#if PACKETVER >= 20160525
nullpo_retv(sd);
struct PACKET_ZC_CAMERA_INFO p;
- p.packetType = 0xa78;
+ p.packetType = HEADER_ZC_CAMERA_INFO;
p.action = 1;
p.range = 0;
p.rotation = 0;
@@ -21959,7 +22394,7 @@ static void clif_camera_change(struct map_session_data *sd, float range, float r
#if PACKETVER >= 20160525
nullpo_retv(sd);
struct PACKET_ZC_CAMERA_INFO p;
- p.packetType = 0xa78;
+ p.packetType = HEADER_ZC_CAMERA_INFO;
p.action = 0;
p.range = range;
p.rotation = rotation;
@@ -21968,12 +22403,27 @@ static void clif_camera_change(struct map_session_data *sd, float range, float r
#endif
}
+static void clif_parse_cameraInfo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_cameraInfo(int fd, struct map_session_data *sd)
+{
+#if PACKETVER >= 20160525
+ const struct PACKET_CZ_CAMERA_INFO *const p = RFIFOP(fd, 0);
+ char command[100];
+ if (p->action == 1) {
+ sprintf(command, "%ccamerainfo", atcommand->at_symbol);
+ } else {
+ sprintf(command, "%ccamerainfo %15f %15f %15f", atcommand->at_symbol, p->range, p->rotation, p->latitude);
+ }
+ atcommand->exec(fd, sd, command, true);
+#endif
+}
+
// show item preview in already opened preview window
static void clif_item_preview(struct map_session_data *sd, int n)
{
#if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
nullpo_retv(sd);
- Assert_retv(n >= 0 && n < MAX_INVENTORY);
+ Assert_retv(n >= 0 && n < sd->status.inventorySize);
struct PACKET_ZC_ITEM_PREVIEW p;
p.packetType = HEADER_ZC_ITEM_PREVIEW;
@@ -21988,6 +22438,244 @@ static void clif_item_preview(struct map_session_data *sd, int n)
#endif
}
+// insert cardId into equipped item in pos equipment slot into slot cardSlot.
+static bool clif_enchant_equipment(struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId)
+{
+#if PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
+ nullpo_ret(sd);
+ Assert_ret(cardSlot >= 0 && cardSlot < MAX_SLOTS);
+ struct PACKET_ZC_ENCHANT_EQUIPMENT p;
+ p.packetType = HEADER_ZC_ENCHANT_EQUIPMENT;
+ p.wearState = pos;
+ p.cardSlot = cardSlot;
+ p.itemId = cardId;
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
+ return true;
+#else
+ return false;
+#endif
+}
+
+static void clif_npc_barter_open(struct map_session_data *sd, struct npc_data *nd)
+{
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+ nullpo_retv(sd);
+ nullpo_retv(nd);
+ struct npc_item_list *shop = nd->u.scr.shop->item;
+ const int shop_size = nd->u.scr.shop->items;
+
+ int c = 0;
+ int maxCount = (sizeof(packet_buf) - sizeof(struct PACKET_ZC_NPC_BARTER_OPEN)) / sizeof(struct PACKET_ZC_NPC_BARTER_OPEN_sub);
+ struct PACKET_ZC_NPC_BARTER_OPEN *packet = (struct PACKET_ZC_NPC_BARTER_OPEN*)&packet_buf[0];
+ packet->packetType = HEADER_ZC_NPC_BARTER_OPEN;
+
+ for (int i = 0; i < shop_size && c < maxCount; i++) {
+ if (shop[i].nameid) {
+ struct item_data *id = itemdb->exists(shop[i].nameid);
+ if (id == NULL)
+ continue;
+
+ packet->list[c].nameid = shop[i].nameid;
+ packet->list[c].type = itemtype(id->type);
+ packet->list[c].amount = shop[i].qty;
+ packet->list[c].currencyNameid = shop[i].value;
+ packet->list[c].currencyAmount = shop[i].value2;
+ packet->list[c].weight = id->weight * 10;
+ packet->list[c].index = i;
+ c++;
+ }
+ }
+
+ packet->packetLength = sizeof(struct PACKET_ZC_NPC_BARTER_OPEN) + sizeof(struct PACKET_ZC_NPC_BARTER_OPEN_sub) * c;
+ clif->send(packet, packet->packetLength, &sd->bl, SELF);
+#endif
+}
+
+static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+ const struct PACKET_CZ_NPC_BARTER_PURCHASE *p = RP2PTR(fd);
+ int count = (p->packetLength - sizeof(struct PACKET_CZ_NPC_BARTER_PURCHASE)) / sizeof p->list[0];
+ struct barteritemlist item_list;
+
+ Assert_retv(count >= 0 && count <= sd->status.inventorySize);
+
+ VECTOR_INIT(item_list);
+ VECTOR_ENSURE(item_list, count, 1);
+
+ for (int i = 0; i < count; i++) {
+ struct barter_itemlist_entry entry = { 0 };
+ entry.addId = p->list[i].itemId;
+ entry.addAmount = p->list[i].amount;
+ entry.removeIndex = p->list[i].invIndex - 2;
+ entry.shopIndex = p->list[i].shopIndex;
+
+ VECTOR_PUSH(item_list, entry);
+ }
+
+ int response = npc->barter_buylist(sd, &item_list);
+ clif->npc_buy_result(sd, response);
+
+ VECTOR_CLEAR(item_list);
+#endif
+}
+
+static void clif_parse_clientVersion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_clientVersion(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
+ // TODO: show or store client version
+#endif
+}
+
+static void clif_parse_ping(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ping(int fd, struct map_session_data *sd)
+{
+ // do nothing, any packet update client tick
+}
+
+static void clif_ping(struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
+ nullpo_retv(sd);
+ struct PACKET_ZC_PING p;
+ p.packetType = HEADER_ZC_PING;
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
+#endif
+}
+
+static int clif_pingTimer(int tid, int64 tick, int id, intptr_t data)
+{
+ map->foreachpc(clif->pingTimerSub, time(NULL));
+ return 0;
+}
+
+static int clif_pingTimerSub(struct map_session_data *sd, va_list ap)
+{
+ nullpo_ret(sd);
+ const int fd = sd->fd;
+
+ if (!sockt->session_is_active(fd))
+ {
+ return 0;
+ }
+
+ time_t tick = va_arg(ap, time_t);
+
+ if (sockt->session[fd]->wdata_tick + battle_config.ping_time < tick)
+ {
+ clif->ping(sd);
+ }
+ return 0;
+}
+
+static void clif_parse_ResetCooldown(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ResetCooldown(int fd, struct map_session_data *sd)
+{
+ char cmd[15];
+ sprintf(cmd,"%ccddebug reset", atcommand->at_symbol);
+ atcommand->exec(fd, sd, cmd, true);
+}
+
+static void clif_OpenRefineryUI(struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+
+ if (battle_config.enable_refinery_ui == 0)
+ return;
+
+ struct PACKET_ZC_REFINE_OPEN_WINDOW p;
+ p.packetType = HEADER_ZC_REFINE_OPEN_WINDOW;
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
+
+ sd->state.refine_ui = 1;
+#endif
+}
+
+static void clif_parse_AddItemRefineryUI(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_AddItemRefineryUI(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
+ if (battle_config.enable_refinery_ui == 0)
+ return;
+
+ const struct PACKET_CZ_REFINE_ADD_ITEM *p = RFIFO2PTR(fd);
+ refine->refinery_add_item(sd, p->index - 2);
+#endif
+}
+
+static void clif_AddItemRefineryUIAck(struct map_session_data *sd, int item_index, struct s_refine_requirement *req)
+{
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+ nullpo_retv(req);
+ Assert_retv(item_index >= 0 && item_index < sd->status.inventorySize);
+
+ if (battle_config.enable_refinery_ui == 0)
+ return;
+
+ char buf[sizeof(struct PACKET_ZC_REFINE_ADD_ITEM) + sizeof(struct PACKET_ZC_REFINE_ADD_ITEM_SUB) * MAX_REFINE_REQUIREMENTS];
+ struct PACKET_ZC_REFINE_ADD_ITEM *p = (struct PACKET_ZC_REFINE_ADD_ITEM *)buf;
+
+ p->packetType = HEADER_ZC_REFINE_ADD_ITEM;
+ p->packtLength = sizeof(*p) + sizeof(p->req[0]) * req->req_count;
+ p->itemIndex = item_index + 2;
+ p->blacksmithBlessing = req->blacksmith_blessing;
+
+ int weapon_level = itemdb_wlv(sd->status.inventory[item_index].nameid);
+ for (int i = 0; i < req->req_count; ++i) {
+ p->req[i].chance = refine->get_refine_chance(weapon_level, sd->status.inventory[item_index].refine, req->req[i].type);
+ p->req[i].itemId = req->req[i].nameid;
+ p->req[i].zeny = req->req[i].cost;
+ }
+
+ clif->send(p, p->packtLength, &sd->bl, SELF);
+#endif
+}
+
+static void clif_parse_RefineryUIRefine(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_RefineryUIRefine(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
+ if (battle_config.enable_refinery_ui == 0)
+ return;
+
+ const struct PACKET_CZ_REFINE_ITEM_REQUEST *p = RFIFO2PTR(fd);
+ refine->refinery_refine_request(sd, p->index - 2, p->itemId, (p->blacksmithBlessing == 1) ? true : false);
+#endif
+}
+
+static void clif_parse_RefineryUIClose(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_RefineryUIClose(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+ if (battle_config.enable_refinery_ui == 0)
+ return;
+
+ sd->state.refine_ui = 0;
+ return;
+#endif
+}
+
+static void clif_announce_refine_status(struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target)
+{
+#if PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
+ nullpo_retv(sd);
+
+ Assert_retv(refine_level > 0 && refine_level <= INT8_MAX);
+
+ struct PACKET_ZC_REFINE_STATUS p;
+ p.packetType = HEADER_ZC_REFINE_STATUS;
+ safestrncpy(p.name, sd->status.name, NAME_LENGTH);
+ p.itemId = item_id;
+ p.refine_level = refine_level;
+ p.status = (success) ? true : false;
+ clif->send(&p, sizeof(p), &sd->bl, target);
+#endif
+}
+
/*==========================================
* Main client packet processing function
*------------------------------------------*/
@@ -22269,6 +22957,12 @@ static int do_init_clif(bool minimal)
clif->delay_clearunit_ers = ers_new(sizeof(struct block_list),"clif.c::delay_clearunit_ers",ERS_OPT_CLEAR);
clif->delayed_damage_ers = ers_new(sizeof(struct cdelayed_damage),"clif.c::delayed_damage_ers",ERS_OPT_CLEAR);
+#if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320
+ timer->add_func_list(clif->pingTimer, "clif_pingTimer");
+ if (battle_config.ping_timer_interval != 0)
+ timer->add_interval(timer->gettick() + battle_config.ping_timer_interval * 1000, clif->pingTimer, 0, 0, battle_config.ping_timer_interval * 1000);
+#endif
+
return 0;
}
@@ -22428,6 +23122,7 @@ void clif_defaults(void)
clif->pRanklist = clif_parse_ranklist;
clif->update_rankingpoint = clif_update_rankingpoint;
clif->hotkeys = clif_hotkeys_send;
+ clif->hotkeysAll = clif_hotkeysAll_send;
clif->insight = clif_insight;
clif->outsight = clif_outsight;
clif->skillcastcancel = clif_skillcastcancel;
@@ -22447,6 +23142,12 @@ void clif_defaults(void)
clif->equipItems = clif_equipItems;
clif->cartList = clif_cartList;
clif->cartItems = clif_cartItems;
+ clif->inventoryExpansionInfo = clif_inventoryExpansionInfo;
+ clif->inventoryExpandAck = clif_inventoryExpandAck;
+ clif->inventoryExpandResult = clif_inventoryExpandResult;
+ clif->pInventoryExpansion = clif_parse_inventoryExpansion;
+ clif->pInventoryExpansionConfirmed = clif_parse_inventoryExpansionConfirmed;
+ clif->pInventoryExpansionRejected = clif_parse_inventoryExpansionRejected;
clif->favorite_item = clif_favorite_item;
clif->clearcart = clif_clearcart;
clif->item_identify_list = clif_item_identify_list;
@@ -22460,7 +23161,19 @@ void clif_defaults(void)
clif->mvp_exp = clif_mvp_exp;
clif->mvp_noitem = clif_mvp_noitem;
clif->changed_dir = clif_changed_dir;
- clif->charnameack = clif_charnameack;
+ clif->blname_ack = clif_blname_ack;
+ clif->pcname_ack = clif_pcname_ack;
+ clif->homname_ack = clif_homname_ack;
+ clif->mername_ack = clif_mername_ack;
+ clif->petname_ack = clif_petname_ack;
+ clif->npcname_ack = clif_npcname_ack;
+ clif->mobname_ack = clif_mobname_ack;
+ clif->mobname_guardian_ack = clif_mobname_guardian_ack;
+ clif->mobname_additional_ack = clif_mobname_additional_ack;
+ clif->mobname_normal_ack = clif_mobname_normal_ack;
+ clif->chatname_ack = clif_chatname_ack;
+ clif->elemname_ack = clif_elemname_ack;
+ clif->unknownname_ack = clif_unknownname_ack;
clif->monster_hp_bar = clif_monster_hp_bar;
clif->hpmeter = clif_hpmeter;
clif->hpmeter_single = clif_hpmeter_single;
@@ -22558,6 +23271,7 @@ void clif_defaults(void)
clif->joinchatok = clif_joinchatok;
clif->addchat = clif_addchat;
clif->changechatowner = clif_changechatowner;
+ clif->chatRoleChange = clif_chatRoleChange;
clif->clearchat = clif_clearchat;
clif->leavechat = clif_leavechat;
clif->changechatstatus = clif_changechatstatus;
@@ -22568,6 +23282,7 @@ void clif_defaults(void)
clif->broadcast2 = clif_broadcast2;
clif->messagecolor_self = clif_messagecolor_self;
clif->messagecolor = clif_messagecolor;
+ clif->serviceMessageColor = clif_serviceMessageColor;
clif->disp_overhead = clif_disp_overhead;
clif->notify_playerchat = clif_notify_playerchat;
clif->msgtable_skill = clif_msgtable_skill;
@@ -22819,11 +23534,13 @@ void clif_defaults(void)
/* */
clif->parse_roulette_db = clif_parse_roulette_db;
clif->roulette_generate_ack = clif_roulette_generate_ack;
+ clif->roulette_close = clif_roulette_close;
/* Merge Items */
clif->openmergeitem = clif_openmergeitem;
clif->cancelmergeitem = clif_cancelmergeitem;
clif->comparemergeitem = clif_comparemergeitem;
clif->ackmergeitems = clif_ackmergeitems;
+ clif->mergeitems = clif_mergeitems;
/* Cart Deco */
clif->selectcart = clif_selectcart;
/* */
@@ -22845,7 +23562,8 @@ void clif_defaults(void)
clif->pWantToConnection = clif_parse_WantToConnection;
clif->pLoadEndAck = clif_parse_LoadEndAck;
clif->pTickSend = clif_parse_TickSend;
- clif->pHotkey = clif_parse_Hotkey;
+ clif->pHotkey1 = clif_parse_Hotkey1;
+ clif->pHotkey2 = clif_parse_Hotkey2;
clif->pProgressbar = clif_parse_progressbar;
clif->pWalkToXY = clif_parse_WalkToXY;
clif->pQuitGame = clif_parse_QuitGame;
@@ -22892,6 +23610,9 @@ void clif_defaults(void)
clif->pUseSkillToId = clif_parse_UseSkillToId;
clif->pUseSkillToId_homun = clif_parse_UseSkillToId_homun;
clif->pUseSkillToId_mercenary = clif_parse_UseSkillToId_mercenary;
+ clif->pStartUseSkillToId = clif_parse_startUseSkillToId;
+ clif->pStopUseSkillToId = clif_parse_stopUseSkillToId;
+ clif->useSkillToIdReal = clif_useSkillToIdReal;
clif->pUseSkillToPos = clif_parse_UseSkillToPos;
clif->pUseSkillToPosSub = clif_parse_UseSkillToPosSub;
clif->pUseSkillToPos_homun = clif_parse_UseSkillToPos_homun;
@@ -23056,6 +23777,7 @@ void clif_defaults(void)
clif->pCashShopReqTab = clif_parse_CashShopReqTab;
clif->pCashShopSchedule = clif_parse_CashShopSchedule;
clif->pCashShopBuy = clif_parse_CashShopBuy;
+ clif->cashShopBuyAck = clif_cashShopBuyAck;
/* */
clif->pPartyTick = clif_parse_PartyTick;
clif->pGuildInvite2 = clif_parse_GuildInvite2;
@@ -23084,7 +23806,8 @@ void clif_defaults(void)
clif->pNPCMarketPurchase = clif_parse_NPCMarketPurchase;
/* */
clif->add_item_options = clif_add_item_options;
- clif->pHotkeyRowShift = clif_parse_HotkeyRowShift;
+ clif->pHotkeyRowShift1 = clif_parse_HotkeyRowShift1;
+ clif->pHotkeyRowShift2 = clif_parse_HotkeyRowShift2;
clif->dressroom_open = clif_dressroom_open;
clif->pOneClick_ItemIdentify = clif_parse_OneClick_ItemIdentify;
/* Achievements [Smokexyz/Hercules] */
@@ -23140,24 +23863,39 @@ void clif_defaults(void)
clif->pPrivateAirshipRequest = clif_parse_private_airship_request;
clif->PrivateAirshipResponse = clif_private_airship_response;
- clif->stylist_vector_init = clif_stylist_vector_init;
- clif->stylist_vector_clear = clif_stylist_vector_clear;
- clif->stylist_read_db_libconfig = clif_stylist_read_db_libconfig;
- clif->stylist_read_db_libconfig_sub = clif_stylist_read_db_libconfig_sub;
- clif->style_change_validate_requirements = clif_style_change_validate_requirements;
- clif->stylist_send_rodexitem = clif_stylist_send_rodexitem;
clif->pReqStyleChange = clif_parse_cz_req_style_change;
clif->pReqStyleChange2 = clif_parse_cz_req_style_change2;
- clif->cz_req_style_change_sub = clif_cz_req_style_change_sub;
+ clif->pStyleClose = clif_parse_cz_style_close;
clif->style_change_response = clif_style_change_response;
clif->camera_showWindow = clif_camera_showWindow;
clif->camera_change = clif_camera_change;
+ clif->pCameraInfo = clif_parse_cameraInfo;
clif->item_preview = clif_item_preview;
+ clif->enchant_equipment = clif_enchant_equipment;
// -- Pet Evolution
clif->pPetEvolution = clif_parse_pet_evolution;
clif->petEvolutionResult = clif_pet_evolution_result;
clif->pMemorialDungeonCommand = clif_parse_memorial_dungeon_command;
+ clif->pReqRemainTime = clif_parse_reqRemainTime;
+
+ clif->npc_barter_open = clif_npc_barter_open;
+ clif->pNPCBarterClosed = clif_parse_NPCBarterClosed;
+ clif->pNPCBarterPurchase = clif_parse_NPCBarterPurchase;
+ clif->pClientVersion = clif_parse_clientVersion;
+ clif->pPing = clif_parse_ping;
+ clif->ping = clif_ping;
+ clif->pingTimer = clif_pingTimer;
+ clif->pingTimerSub = clif_pingTimerSub;
+ clif->pResetCooldown = clif_parse_ResetCooldown;
+ clif->loadConfirm = clif_loadConfirm;
+ clif->send_selforarea = clif_send_selforarea;
+ clif->OpenRefineryUI = clif_OpenRefineryUI;
+ clif->pAddItemRefineryUI = clif_parse_AddItemRefineryUI;
+ clif->AddItemRefineryUIAck = clif_AddItemRefineryUIAck;
+ clif->pRefineryUIClose = clif_parse_RefineryUIClose;
+ clif->pRefineryUIRefine = clif_parse_RefineryUIRefine;
+ clif->announce_refine_status = clif_announce_refine_status;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 593dc15c1..5c28f80dd 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -55,6 +55,7 @@ struct skill_unit;
struct unit_data;
struct view_data;
struct achievement_data; // map/achievement.h
+struct s_refine_requirement;
enum clif_messages;
enum rodex_add_item;
@@ -71,10 +72,6 @@ enum rodex_get_items;
#define MAX_ROULETTE_COLUMNS 9 /** client-defined value **/
#define RGB2BGR(c) (((c) & 0x0000FF) << 16 | ((c) & 0x00FF00) | ((c) & 0xFF0000) >> 16)
-#ifndef MAX_STYLIST_TYPE
-#define MAX_STYLIST_TYPE LOOK_MAX
-#endif
-
#define COLOR_CYAN 0x00ffffU
#define COLOR_RED 0xff0000U
#define COLOR_GREEN 0x00ff00U
@@ -82,6 +79,11 @@ enum rodex_get_items;
#define COLOR_YELLOW 0xffff00U
#define COLOR_DEFAULT COLOR_GREEN
+#define MAX_STORAGE_ITEM_PACKET_NORMAL ((INT16_MAX - (sizeof(struct ZC_STORE_ITEMLIST_NORMAL) - (sizeof(struct NORMALITEM_INFO) * MAX_ITEMLIST))) / sizeof(struct NORMALITEM_INFO))
+#define MAX_STORAGE_ITEM_PACKET_EQUIP ((INT16_MAX - (sizeof(struct ZC_STORE_ITEMLIST_EQUIP) - (sizeof(struct EQUIPITEM_INFO) * MAX_ITEMLIST))) / sizeof(struct EQUIPITEM_INFO))
+STATIC_ASSERT(MAX_STORAGE_ITEM_PACKET_NORMAL > 0, "Max items per storage item packet for normal items is less than 1, it's most likely to be a bug and shall not be ignored.");
+STATIC_ASSERT(MAX_STORAGE_ITEM_PACKET_EQUIP > 0, "Max items per storage item packet for equip items is less than 1, it's most likely to be a bug and shall not be ignored.");
+
/**
* Enumerations
**/
@@ -237,13 +239,13 @@ typedef enum emotion_type {
E_MAX
} emotion_type;
-typedef enum clr_type {
+enum clr_type {
CLR_OUTSIGHT = 0,
CLR_DEAD,
CLR_RESPAWN,
CLR_TELEPORT,
CLR_TRICKDEAD,
-} clr_type;
+};
enum map_property { // clif_map_property
MAPPROPERTY_NOTHING = 0,
@@ -409,23 +411,26 @@ enum CASH_SHOP_BUY_RESULT {
CSBR_RUNE_OVERCOUNT = 0x9,
CSBR_EACHITEM_OVERCOUNT = 0xa,
CSBR_UNKNOWN = 0xb,
+ CSBR_BUSY = 0xc,
};
enum BATTLEGROUNDS_QUEUE_ACK {
- BGQA_SUCCESS = 1,
- BGQA_FAIL_QUEUING_FINISHED,
- BGQA_FAIL_BGNAME_INVALID,
- BGQA_FAIL_TYPE_INVALID,
- BGQA_FAIL_PPL_OVERAMOUNT,
- BGQA_FAIL_LEVEL_INCORRECT,
- BGQA_DUPLICATE_REQUEST,
- BGQA_PLEASE_RELOGIN,
- BGQA_NOT_PARTY_GUILD_LEADER,
- BGQA_FAIL_CLASS_INVALID,
+ BGQA_SUCCESS = 1,
+ BGQA_FAIL_QUEUING_FINISHED = 2,
+ BGQA_FAIL_BGNAME_INVALID = 3,
+ BGQA_FAIL_TYPE_INVALID = 4,
+ BGQA_FAIL_PPL_OVERAMOUNT = 5,
+ BGQA_FAIL_LEVEL_INCORRECT = 6,
+ BGQA_DUPLICATE_REQUEST = 7,
+ BGQA_PLEASE_RELOGIN = 8,
+ BGQA_NOT_PARTY_GUILD_LEADER = 9,
+ BGQA_FAIL_CLASS_INVALID = 10,
/* not official way to respond (gotta find packet?) */
- BGQA_FAIL_DESERTER,
- BGQA_FAIL_COOLDOWN,
- BGQA_FAIL_TEAM_COUNT,
+ BGQA_FAIL_DESERTER = 11,
+ BGQA_FAIL_COOLDOWN = 12,
+ BGQA_FAIL_TEAM_COUNT = 13,
+ // official continue
+ BGQA_FAIL_TEAM_IN_BG_ALREADY = 15
};
enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED {
@@ -493,13 +498,17 @@ enum RECV_ROULETTE_ITEM_ACK {
};
enum GENERATE_ROULETTE_ACK {
- GENERATE_ROULETTE_SUCCESS = 0x0,
- GENERATE_ROULETTE_FAILED = 0x1,
- GENERATE_ROULETTE_NO_ENOUGH_POINT = 0x2,
- GENERATE_ROULETTE_LOSING = 0x3,
+ GENERATE_ROULETTE_SUCCESS = 0x0,
+ GENERATE_ROULETTE_FAILED = 0x1,
+ GENERATE_ROULETTE_NO_ENOUGH_POINT = 0x2,
+ GENERATE_ROULETTE_LOSING = 0x3,
+ GENERATE_ROULETTE_NO_ENOUGH_INVENTORY_SPACE = 0x4,
+#if PACKETVER >= 20141001
+ GENERATE_ROULETTE_CANT_PLAY = 0x5,
+#endif
};
-enum OPEN_ROULETTE_ACK{
+enum OPEN_ROULETTE_ACK {
OPEN_ROULETTE_SUCCESS = 0x0,
OPEN_ROULETTE_FAILED = 0x1,
};
@@ -554,7 +563,7 @@ enum clif_unittype {
**/
enum CZ_CONFIG {
CZ_CONFIG_OPEN_EQUIPMENT_WINDOW = 0,
- // Unknown = 1,
+ CZ_CONFIG_CALL = 1,
CZ_CONFIG_PET_AUTOFEEDING = 2,
CZ_CONFIG_HOMUNCULUS_AUTOFEEDING = 3,
};
@@ -583,8 +592,8 @@ enum zc_ui_types {
**/
enum cz_ui_types {
CZ_STYLIST_UI = 1,
- //unknown = 2,
- //unknown = 3,
+ CZ_MACRO_REGISTER_UI = 2,
+ CZ_MACRO_DETECTOR_UI = 3,
CZ_ATTENDANCE_UI = 5
};
@@ -651,15 +660,14 @@ struct attendance_entry {
int qty;
};
-/* Stylist data [Asheraf/Hercules]*/
-struct stylist_data_entry {
- int16 id;
- int32 zeny;
- int itemid;
- int boxid;
- bool allow_doram;
+struct barter_itemlist_entry {
+ int addId;
+ int addAmount;
+ int removeIndex;
+ int shopIndex;
};
-VECTOR_DECL(struct stylist_data_entry) stylist_data[MAX_STYLIST_TYPE];
+
+VECTOR_STRUCT_DECL(barteritemlist, struct barter_itemlist_entry);
/**
* Stylist Shop Responds
@@ -673,6 +681,22 @@ enum memorial_dungeon_command {
COMMAND_MEMORIALDUNGEON_DESTROY_FORCE = 0x3,
};
+enum expand_inventory {
+ EXPAND_INVENTORY_ASK_CONFIRMATION = 0,
+ EXPAND_INVENTORY_FAILED = 1,
+ EXPAND_INVENTORY_OTHER_WORK = 2,
+ EXPAND_INVENTORY_MISSING_ITEM = 3,
+ EXPAND_INVENTORY_MAX_SIZE = 4
+};
+
+enum expand_inventory_result {
+ EXPAND_INVENTORY_RESULT_SUCCESS = 0,
+ EXPAND_INVENTORY_RESULT_FAILED = 1,
+ EXPAND_INVENTORY_RESULT_OTHER_WORK = 2,
+ EXPAND_INVENTORY_RESULT_MISSING_ITEM = 3,
+ EXPAND_INVENTORY_RESULT_MAX_SIZE = 4
+};
+
/**
* Clif.c Interface
**/
@@ -752,9 +776,9 @@ struct clif_interface {
void (*package_announce) (struct map_session_data *sd, int nameid, int containerid);
void (*item_drop_announce) (struct map_session_data *sd, int nameid, char *monsterName);
/* unit-related */
- void (*clearunit_single) (int id, clr_type type, int fd);
- void (*clearunit_area) (struct block_list* bl, clr_type type);
- void (*clearunit_delayed) (struct block_list* bl, clr_type type, int64 tick);
+ void (*clearunit_single) (int id, enum clr_type type, int fd);
+ void (*clearunit_area) (struct block_list* bl, enum clr_type type);
+ void (*clearunit_delayed) (struct block_list* bl, enum clr_type type, int64 tick);
void (*walkok) (struct map_session_data *sd);
void (*move) (struct unit_data *ud);
void (*move2) (struct block_list *bl, struct view_data *vd, struct unit_data *ud);
@@ -827,7 +851,8 @@ struct clif_interface {
void (*ranklist) (struct map_session_data *sd, enum fame_list_type type);
void (*update_rankingpoint) (struct map_session_data *sd, enum fame_list_type type, int points);
void (*pRanklist) (int fd, struct map_session_data *sd);
- void (*hotkeys) (struct map_session_data *sd);
+ void (*hotkeys) (struct map_session_data *sd, int tab);
+ void (*hotkeysAll) (struct map_session_data *sd);
int (*insight) (struct block_list *bl,va_list ap);
int (*outsight) (struct block_list *bl,va_list ap);
void (*skillcastcancel) (struct block_list* bl);
@@ -847,6 +872,12 @@ struct clif_interface {
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 (*inventoryExpansionInfo) (struct map_session_data *sd);
+ void (*inventoryExpandAck) (struct map_session_data *sd, enum expand_inventory result, int itemId);
+ void (*inventoryExpandResult) (struct map_session_data *sd, enum expand_inventory_result result);
+ void (*pInventoryExpansion) (int fd, struct map_session_data *sd);
+ void (*pInventoryExpansionConfirmed) (int fd, struct map_session_data *sd);
+ void (*pInventoryExpansionRejected) (int fd, struct map_session_data *sd);
void (*favorite_item) (struct map_session_data* sd, unsigned short index);
void (*clearcart) (int fd);
void (*item_identify_list) (struct map_session_data *sd);
@@ -860,7 +891,19 @@ struct clif_interface {
void (*mvp_exp) (struct map_session_data *sd, unsigned int exp);
void (*mvp_noitem) (struct map_session_data* sd);
void (*changed_dir) (struct block_list *bl, enum send_target target);
- void (*charnameack) (int fd, struct block_list *bl);
+ void (*blname_ack) (int fd, struct block_list *bl);
+ void (*pcname_ack) (int fd, struct block_list *bl);
+ void (*homname_ack) (int fd, struct block_list *bl);
+ void (*mername_ack) (int fd, struct block_list *bl);
+ void (*petname_ack) (int fd, struct block_list *bl);
+ void (*npcname_ack) (int fd, struct block_list *bl);
+ void (*mobname_ack) (int fd, struct block_list *bl);
+ void (*mobname_guardian_ack) (int fd, struct block_list *bl);
+ void (*mobname_additional_ack) (int fd, struct block_list *bl);
+ void (*mobname_normal_ack) (int fd, struct block_list *bl);
+ void (*chatname_ack) (int fd, struct block_list *bl);
+ void (*elemname_ack) (int fd, struct block_list *bl);
+ void (*unknownname_ack) (int fd, struct block_list *bl);
void (*monster_hp_bar) ( struct mob_data* md, struct map_session_data *sd );
int (*hpmeter) (struct map_session_data *sd);
void (*hpmeter_single) (int fd, int id, unsigned int hp, unsigned int maxhp);
@@ -958,6 +1001,7 @@ struct clif_interface {
void (*joinchatok) (struct map_session_data *sd,struct chat_data* cd);
void (*addchat) (struct chat_data* cd,struct map_session_data *sd);
void (*changechatowner) (struct chat_data* cd, struct map_session_data* sd);
+ void (*chatRoleChange) (struct chat_data *cd, struct map_session_data *sd, struct block_list* bl, int isNotOwner);
void (*clearchat) (struct chat_data *cd,int fd);
void (*leavechat) (struct chat_data* cd, struct map_session_data* sd, bool flag);
void (*changechatstatus) (struct chat_data* cd);
@@ -968,6 +1012,7 @@ struct clif_interface {
void (*broadcast2) (struct block_list *bl, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target);
void (*messagecolor_self) (int fd, uint32 color, const char *msg);
void (*messagecolor) (struct block_list* bl, uint32 color, const char* msg);
+ void (*serviceMessageColor) (struct map_session_data *sd, uint32 color, const char *msg);
void (*disp_overhead) (struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl);
void (*notify_playerchat) (struct block_list *bl, const char *mes);
void (*msgtable) (struct map_session_data* sd, enum clif_messages msg_id);
@@ -985,7 +1030,7 @@ struct clif_interface {
void (*wisexin) (struct map_session_data *sd,int type,int flag);
void (*wisall) (struct map_session_data *sd,int type,int flag);
void (*PMIgnoreList) (struct map_session_data* sd);
- void (*ShowScript) (struct block_list* bl, const char* message);
+ void (*ShowScript) (struct block_list* bl, const char* message, enum send_target target);
/* trade handling */
void (*traderequest) (struct map_session_data* sd, const char* name);
void (*tradestart) (struct map_session_data* sd, uint8 type);
@@ -1219,12 +1264,14 @@ struct clif_interface {
void (*npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response);
/* */
bool (*parse_roulette_db) (void);
- void (*roulette_generate_ack) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID);
+ void (*roulette_generate_ack) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID);
+ void (*roulette_close) (struct map_session_data *sd);
/* Merge Items */
void (*openmergeitem) (int fd, struct map_session_data *sd);
void (*cancelmergeitem) (int fd, struct map_session_data *sd);
int (*comparemergeitem) (const void *a, const void *b);
void (*ackmergeitems) (int fd, struct map_session_data *sd);
+ void (*mergeitems) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason);
/* */
bool (*isdisguised) (struct block_list* bl);
void (*navigate_to) (struct map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id);
@@ -1242,7 +1289,8 @@ struct clif_interface {
void (*pWantToConnection) (int fd, struct map_session_data *sd);
void (*pLoadEndAck) (int fd,struct map_session_data *sd);
void (*pTickSend) (int fd, struct map_session_data *sd);
- void (*pHotkey) (int fd, struct map_session_data *sd);
+ void (*pHotkey1) (int fd, struct map_session_data *sd);
+ void (*pHotkey2) (int fd, struct map_session_data *sd);
void (*pProgressbar) (int fd, struct map_session_data * sd);
void (*pWalkToXY) (int fd, struct map_session_data *sd);
void (*pQuitGame) (int fd, struct map_session_data *sd);
@@ -1285,7 +1333,10 @@ struct clif_interface {
void (*pChangeCart) (int fd,struct map_session_data *sd);
void (*pStatusUp) (int fd,struct map_session_data *sd);
void (*pSkillUp) (int fd,struct map_session_data *sd);
+ void (*useSkillToIdReal) (int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id);
void (*pUseSkillToId) (int fd, struct map_session_data *sd);
+ void (*pStartUseSkillToId) (int fd, struct map_session_data *sd);
+ void (*pStopUseSkillToId) (int fd, struct map_session_data *sd);
void (*pUseSkillToId_homun) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id);
void (*pUseSkillToId_mercenary) (struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id);
void (*pUseSkillToPos) (int fd, struct map_session_data *sd);
@@ -1451,6 +1502,7 @@ struct clif_interface {
void (*pCashShopBuy) (int fd, struct map_session_data *sd);
void (*pPartyTick) (int fd, struct map_session_data *sd);
void (*pGuildInvite2) (int fd, struct map_session_data *sd);
+ void (*cashShopBuyAck) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result);
/* Group Search System Update */
void (*pPartyBookingAddFilter) (int fd, struct map_session_data *sd);
void (*pPartyBookingSubFilter) (int fd, struct map_session_data *sd);
@@ -1476,7 +1528,8 @@ struct clif_interface {
void (*pNPCMarketPurchase) (int fd, struct map_session_data *sd);
/* */
int (*add_item_options) (struct ItemOptions *buf, const struct item *it);
- void (*pHotkeyRowShift) (int fd, struct map_session_data *sd);
+ void (*pHotkeyRowShift1) (int fd, struct map_session_data *sd);
+ void (*pHotkeyRowShift2) (int fd, struct map_session_data *sd);
void (*dressroom_open) (struct map_session_data *sd, int view);
void (*pOneClick_ItemIdentify) (int fd,struct map_session_data *sd);
/* Cart Deco */
@@ -1504,7 +1557,7 @@ struct clif_interface {
void (*pRodexCancelWriteMail) (int fd, struct map_session_data *sd);
void (*pRodexOpenMailbox) (int fd, struct map_session_data *sd);
void (*pRodexCheckName) (int fd, struct map_session_data *sd);
- void (*rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name);
+ void (*rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name);
void (*pRodexDeleteMail) (int fd, struct map_session_data *sd);
void (*rodex_delete_mail) (struct map_session_data *sd, int8 opentype, int64 mail_id);
void (*pRodexRefreshMaillist) (int fd, struct map_session_data *sd);
@@ -1537,15 +1590,9 @@ struct clif_interface {
void (*pPrivateAirshipRequest) (int fd, struct map_session_data *sd);
void (*PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag);
- void (*stylist_vector_init) (void);
- void (*stylist_vector_clear) (void);
- bool (*stylist_read_db_libconfig) (void);
- bool (*stylist_read_db_libconfig_sub) (struct config_setting_t *it, int idx, const char *source);
- bool (*style_change_validate_requirements) (struct map_session_data *sd, int type, int16 idx);
- void (*stylist_send_rodexitem) (struct map_session_data *sd, int itemid);
void (*pReqStyleChange) (int fd, struct map_session_data *sd);
void (*pReqStyleChange2) (int fd, struct map_session_data *sd);
- void (*cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+ void (*pStyleClose) (int fd, struct map_session_data *sd);
void (*style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
void (*pPetEvolution) (int fd, struct map_session_data *sd);
void (*petEvolutionResult) (int fd, enum pet_evolution_result result);
@@ -1553,7 +1600,27 @@ struct clif_interface {
void (*pMemorialDungeonCommand) (int fd, struct map_session_data *sd);
void (*camera_showWindow) (struct map_session_data *sd);
void (*camera_change) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target);
+ void (*pCameraInfo) (int fd, struct map_session_data *sd);
void (*item_preview) (struct map_session_data *sd, int n);
+ bool (*enchant_equipment) (struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId);
+ void (*pReqRemainTime) (int fd, struct map_session_data *sd);
+ void (*npc_barter_open) (struct map_session_data *sd, struct npc_data *nd);
+ void (*pNPCBarterClosed) (int fd, struct map_session_data *sd);
+ void (*pNPCBarterPurchase) (int fd, struct map_session_data *sd);
+ void (*pClientVersion) (int fd, struct map_session_data *sd);
+ void (*pPing) (int fd, struct map_session_data *sd);
+ void (*ping) (struct map_session_data *sd);
+ int (*pingTimer) (int tid, int64 tick, int id, intptr_t data);
+ int (*pingTimerSub) (struct map_session_data *sd, va_list ap);
+ void (*pResetCooldown) (int fd, struct map_session_data *sd);
+ void (*loadConfirm) (struct map_session_data *sd);
+ void (*send_selforarea) (int fd, struct block_list *bl, const void *buf, int len);
+ void (*OpenRefineryUI) (struct map_session_data *sd);
+ void (*pAddItemRefineryUI) (int fd, struct map_session_data *sd);
+ void (*AddItemRefineryUIAck) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req);
+ void (*pRefineryUIClose) (int fd, struct map_session_data *sd);
+ void (*pRefineryUIRefine) (int fd, struct map_session_data *sd);
+ void (*announce_refine_status) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target);
};
#ifdef HERCULES_CORE
diff --git a/src/map/guild.c b/src/map/guild.c
index 17bf7fa6b..ae76b22a3 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1018,7 +1018,7 @@ static int guild_send_memberinfoshort(struct map_session_data *sd, int online)
}
// cleaned up [LuzZza]
-static int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login)
+static int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login)
{
int i, alv, c, idx = INDEX_NOT_FOUND, om = 0, oldonline = -1;
struct guild *g = guild->search(guild_id);
@@ -1899,7 +1899,7 @@ static int guild_gm_changed(int guild_id, int account_id, int char_id)
if (g->member[pos].sd && g->member[pos].sd->fd) {
clif->message(g->member[pos].sd->fd, msg_sd(g->member[pos].sd,878)); //"You no longer are the Guild Master."
g->member[pos].sd->state.gmaster_flag = 0;
- clif->charnameack(0, &g->member[pos].sd->bl);
+ clif->blname_ack(0, &g->member[pos].sd->bl);
}
if (g->member[0].sd && g->member[0].sd->fd) {
@@ -1907,7 +1907,7 @@ static int guild_gm_changed(int guild_id, int account_id, int char_id)
g->member[0].sd->state.gmaster_flag = 1;
//Block his skills for 5 minutes to prevent abuse.
guild->block_skill(g->member[0].sd, 300000);
- clif->charnameack(0, &g->member[pos].sd->bl);
+ clif->blname_ack(0, &g->member[pos].sd->bl);
}
// announce the change to all guild members
diff --git a/src/map/guild.h b/src/map/guild.h
index 3df86a3ca..396cbda86 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -126,7 +126,7 @@ struct guild_interface {
int (*check_alliance) (int guild_id1, int guild_id2, int flag);
/* */
int (*send_memberinfoshort) (struct map_session_data *sd,int online);
- int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login);
+ int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login);
int (*change_memberposition) (int guild_id,int account_id,int char_id,short idx);
int (*memberposition_changed) (struct guild *g,int idx,int pos);
int (*change_position) (int guild_id,int idx,int mode,int exp_mode,const char *name);
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 6df272243..f3a4c559a 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -411,7 +411,7 @@ static bool homunculus_levelup(struct homun_data *hd)
return true;
}
-static int homunculus_change_class(struct homun_data *hd, short class_)
+static int homunculus_change_class(struct homun_data *hd, int class_)
{
int i = homun->db_search(class_,HOMUNCULUS_CLASS);
nullpo_retr(0, hd);
@@ -779,7 +779,7 @@ static bool homunculus_change_name_ack(struct map_session_data *sd, const char *
}
safestrncpy(hd->homunculus.name, newname, NAME_LENGTH);
aFree(newname);
- clif->charnameack (0,&hd->bl);
+ clif->blname_ack(0,&hd->bl);
hd->homunculus.rename_flag = 1;
clif->hominfo(sd,hd,0);
return true;
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index f0a156fd7..745c7cd84 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -174,7 +174,7 @@ struct homunculus_interface {
int (*skill_tree_get_max) (int id, int b_class);
void (*skillup) (struct homun_data *hd, uint16 skill_id);
bool (*levelup) (struct homun_data *hd);
- int (*change_class) (struct homun_data *hd, short class_);
+ int (*change_class) (struct homun_data *hd, int class_);
bool (*evolve) (struct homun_data *hd);
bool (*mutate) (struct homun_data *hd, int homun_id);
int (*gainexp) (struct homun_data *hd, unsigned int exp);
diff --git a/src/map/instance.c b/src/map/instance.c
index 1e83b0b76..e87cc03bb 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -295,13 +295,6 @@ static int instance_add_map(const char *name, int instance_id, bool usebasename,
}
}
- //Mimic questinfo
- VECTOR_INIT(map->list[im].qi_data);
- VECTOR_ENSURE(map->list[im].qi_data, VECTOR_LENGTH(map->list[m].qi_data), 1);
- for (i = 0; i < VECTOR_LENGTH(map->list[m].qi_data); i++) {
- VECTOR_PUSH(map->list[im].qi_data, VECTOR_INDEX(map->list[m].qi_data, i));
- }
-
map->list[im].m = im;
map->list[im].instance_id = instance_id;
map->list[im].instance_src_map = m;
@@ -518,7 +511,7 @@ static void instance_del_map(int16 m)
aFree(map->list[m].zone_mf);
}
- quest->questinfo_vector_clear(m);
+ VECTOR_CLEAR(map->list[m].qi_list);
// Remove from instance
for( i = 0; i < instance->list[map->list[m].instance_id].num_map; i++ ) {
diff --git a/src/map/intif.c b/src/map/intif.c
index ed4c0e2d2..e25f56b63 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -71,26 +71,26 @@ static int CheckForCharServer(void)
}
// pet
-static int intif_create_pet(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id,
+static int intif_create_pet(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name)
{
if (intif->CheckForCharServer())
return 0;
nullpo_ret(pet_name);
- WFIFOHEAD(inter_fd, 28 + NAME_LENGTH);
+ WFIFOHEAD(inter_fd, 32 + NAME_LENGTH);
WFIFOW(inter_fd, 0) = 0x3080;
WFIFOL(inter_fd, 2) = account_id;
WFIFOL(inter_fd, 6) = char_id;
- WFIFOW(inter_fd, 10) = pet_class;
- WFIFOW(inter_fd, 12) = pet_lv;
- WFIFOL(inter_fd, 14) = pet_egg_id;
- WFIFOL(inter_fd, 18) = pet_equip;
- WFIFOW(inter_fd, 22) = intimate;
- WFIFOW(inter_fd, 24) = hungry;
- WFIFOB(inter_fd, 26) = rename_flag;
- WFIFOB(inter_fd, 27) = incubate;
- memcpy(WFIFOP(inter_fd, 28), pet_name, NAME_LENGTH);
- WFIFOSET(inter_fd, 28 + NAME_LENGTH);
+ WFIFOL(inter_fd, 10) = pet_class;
+ WFIFOL(inter_fd, 14) = pet_lv;
+ WFIFOL(inter_fd, 18) = pet_egg_id;
+ WFIFOL(inter_fd, 22) = pet_equip;
+ WFIFOW(inter_fd, 26) = intimate;
+ WFIFOW(inter_fd, 28) = hungry;
+ WFIFOB(inter_fd, 30) = rename_flag;
+ WFIFOB(inter_fd, 31) = incubate;
+ memcpy(WFIFOP(inter_fd, 32), pet_name, NAME_LENGTH);
+ WFIFOSET(inter_fd, 32 + NAME_LENGTH);
return 0;
}
@@ -903,19 +903,19 @@ static int intif_guild_leave(int guild_id, int account_id, int char_id, int flag
}
//Update request / Lv online status of the guild members
-static int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class)
+static int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class)
{
if (intif->CheckForCharServer())
return 0;
- WFIFOHEAD(inter_fd, 19);
+ WFIFOHEAD(inter_fd, 23);
WFIFOW(inter_fd, 0) = 0x3035;
WFIFOL(inter_fd, 2) = guild_id;
WFIFOL(inter_fd, 6) = account_id;
WFIFOL(inter_fd,10) = char_id;
WFIFOB(inter_fd,14) = online;
- WFIFOW(inter_fd,15) = lv;
- WFIFOW(inter_fd,17) = class;
- WFIFOSET(inter_fd,19);
+ WFIFOL(inter_fd,15) = lv;
+ WFIFOL(inter_fd,19) = class;
+ WFIFOSET(inter_fd,23);
return 0;
}
@@ -1507,7 +1507,7 @@ static void intif_parse_GuildMemberWithdraw(int fd)
// ACK guild member basic info
static void intif_parse_GuildMemberInfoShort(int fd)
{
- guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17),RFIFOL(fd,19));
+ guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOL(fd,17),RFIFOL(fd,21));
}
// ACK guild break
@@ -1640,7 +1640,7 @@ static void intif_parse_GuildMasterChanged(int fd)
// Request pet creation
static void intif_parse_CreatePet(int fd)
{
- pet->get_egg(RFIFOL(fd,2), RFIFOW(fd,6), RFIFOL(fd,8));
+ pet->get_egg(RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
}
// ACK pet data
@@ -2754,16 +2754,21 @@ static void intif_parse_RodexNotifications(int fd)
/// 2 - user got Items
/// 3 - delete
/// 4 - sender Read (returned mail)
-static int intif_rodex_updatemail(int64 mail_id, int8 flag)
+static int intif_rodex_updatemail(struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag)
{
+ nullpo_ret(sd);
+
if (intif->CheckForCharServer())
return 0;
- WFIFOHEAD(inter_fd, 11);
+ WFIFOHEAD(inter_fd, 20);
WFIFOW(inter_fd, 0) = 0x3097;
- WFIFOQ(inter_fd, 2) = mail_id;
- WFIFOB(inter_fd, 10) = flag;
- WFIFOSET(inter_fd, 11);
+ WFIFOL(inter_fd, 2) = sd->status.account_id;
+ WFIFOL(inter_fd, 6) = sd->status.char_id;
+ WFIFOQ(inter_fd, 10) = mail_id;
+ WFIFOB(inter_fd, 18) = opentype;
+ WFIFOB(inter_fd, 19) = flag;
+ WFIFOSET(inter_fd, 20);
return 0;
}
@@ -2830,11 +2835,11 @@ static void intif_parse_RodexCheckName(int fd)
struct map_session_data *sd = NULL;
int reqchar_id = RFIFOL(fd, 2);
int target_char_id = RFIFOL(fd, 6);
- short target_class = RFIFOW(fd, 10);
- int target_level = RFIFOL(fd, 12);
+ int target_class = RFIFOL(fd, 10);
+ int target_level = RFIFOL(fd, 14);
char name[NAME_LENGTH];
- safestrncpy(name, RFIFOP(inter_fd, 16), NAME_LENGTH);
+ safestrncpy(name, RFIFOP(inter_fd, 18), NAME_LENGTH);
if (reqchar_id <= 0)
return;
@@ -2855,6 +2860,35 @@ static void intif_parse_RodexCheckName(int fd)
clif->rodex_checkname_result(sd, target_char_id, target_class, target_level, name);
}
+static void intif_parse_GetZenyAck(int fd)
+{
+ int char_id = RFIFOL(fd, 2);
+ int64 zeny = RFIFOL(fd, 6);
+ int64 mail_id = RFIFOQ(fd, 14);
+ uint8 opentype = RFIFOB(fd, 22);
+ struct map_session_data *sd = map->charid2sd(char_id);
+
+ if (sd == NULL) // User is not online anymore
+ return;
+ rodex->getZenyAck(sd, mail_id, opentype, zeny);
+}
+
+static void intif_parse_GetItemsAck(int fd)
+{
+ int char_id = RFIFOL(fd, 2);
+
+ struct map_session_data *sd = map->charid2sd(char_id);
+ if (sd == NULL) // User is not online anymore
+ return;
+
+ int64 mail_id = RFIFOQ(fd, 6);
+ uint8 opentype = RFIFOB(fd, 14);
+ int count = RFIFOB(fd, 15);
+ struct rodex_item items[RODEX_MAX_ITEM];
+ memcpy(&items[0], RFIFOP(fd, 16), sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+ rodex->getItemsAck(sd, mail_id, opentype, count, &items[0]);
+}
+
//-----------------------------------------------------------------
// Communication from the inter server
// Return a 0 (false) if there were any errors.
@@ -2972,6 +3006,8 @@ static int intif_parse(int fd)
case 0x3896: intif->pRodexHasNew(fd); break;
case 0x3897: intif->pRodexSendMail(fd); break;
case 0x3898: intif->pRodexCheckName(fd); break;
+ case 0x3899: intif->pGetZenyAck(fd); break;
+ case 0x389a: intif->pGetItemsAck(fd); break;
// Clan System
case 0x3858: intif->pRecvClanMemberAction(fd); break;
@@ -2995,13 +3031,13 @@ void intif_defaults(void)
-1,-1,27,-1, -1,-1,37,-1, 7, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
-1, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810 Achievements [Smokexyz/Hercules]
39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
- 10,-1,15, 0, 79,23, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
+ 10,-1,15, 0, 79,25, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
-1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
-1,-1, 7, 7, 7,11, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari] Clan System[Murilo BiO]
-1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
-1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
- 12,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
- -1,-1, 7, 3, 0,-1, 7, 15,16 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ]
+ 14,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
+ -1,-1, 7, 3, 0,-1, 7, 15,18 + NAME_LENGTH, 23, 16 + sizeof(struct rodex_item) * RODEX_MAX_ITEM, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ]
};
intif = &intif_s;
@@ -3171,6 +3207,8 @@ void intif_defaults(void)
intif->pRodexHasNew = intif_parse_RodexNotifications;
intif->pRodexSendMail = intif_parse_RodexSendMail;
intif->pRodexCheckName = intif_parse_RodexCheckName;
+ intif->pGetZenyAck = intif_parse_GetZenyAck;
+ intif->pGetItemsAck = intif_parse_GetItemsAck;
/* Clan System */
intif->pRecvClanMemberAction = intif_parse_RecvClanMemberAction;
/* Achievement System */
diff --git a/src/map/intif.h b/src/map/intif.h
index 21f7a494c..8df669217 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -58,7 +58,7 @@ struct intif_interface {
int packet_len_table[INTIF_PACKET_LEN_TABLE_SIZE];
/* funcs */
int (*parse) (int fd);
- int (*create_pet)(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id,
+ int (*create_pet)(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
int (*broadcast) (const char *mes, int len, int type);
int (*broadcast2) (const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY);
@@ -84,7 +84,7 @@ struct intif_interface {
int (*guild_request_info) (int guild_id);
int (*guild_addmember) (int guild_id, struct guild_member *m);
int (*guild_leave) (int guild_id, int account_id, int char_id, int flag, const char *mes);
- int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class);
int (*guild_break) (int guild_id);
int (*guild_message) (int guild_id, int account_id, const char *mes, int len);
int (*guild_change_gm) (int guild_id, const char *name, int len);
@@ -135,9 +135,11 @@ struct intif_interface {
// RoDEX
int(*rodex_requestinbox) (int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id);
int(*rodex_checkhasnew) (struct map_session_data *sd);
- int(*rodex_updatemail) (int64 mail_id, int8 flag);
+ int(*rodex_updatemail) (struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag);
int(*rodex_sendmail) (struct rodex_message *msg);
int(*rodex_checkname) (struct map_session_data *sd, const char *name);
+ void (*pGetZenyAck) (int fd);
+ void (*pGetItemsAck) (int fd);
/* Clan System */
int (*clan_kickoffline) (int clan_id, int kick_interval);
int (*clan_membercount) (int clan_id, int kick_interval);
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 5e447d4c0..11d778f8a 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -27,6 +27,7 @@
#include "map/map.h"
#include "map/mob.h" // MAX_MOB_DB
#include "map/pc.h" // W_MUSICAL, W_WHIP
+#include "map/refine.h"
#include "map/script.h" // item script processing
#include "common/HPM.h"
#include "common/conf.h"
@@ -1700,7 +1701,12 @@ static int itemdb_validate_entry(struct item_data *entry, int n, const char *sou
nullpo_ret(entry);
nullpo_ret(source);
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
if (entry->nameid <= 0 || entry->nameid > MAX_ITEM_ID) {
+#else
+ if (entry->nameid <= 0) {
+#endif
+ // item id wrong for any packet versions
ShowWarning("itemdb_validate_entry: Invalid item ID %d in entry %d of '%s', allowed values 0 < ID < %d (MAX_ITEM_ID), skipping.\n",
entry->nameid, n, source, MAX_ITEM_ID);
if (entry->script) {
@@ -1716,7 +1722,14 @@ static int itemdb_validate_entry(struct item_data *entry, int n, const char *sou
entry->unequip_script = NULL;
}
return 0;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
}
+#else
+ } else if (entry->nameid > MAX_ITEM_ID) {
+ // item id too big for packet version before item id in 4 bytes
+ entry->view_id = UNKNOWN_ITEM_ID;
+ }
+#endif
{
const char *c = entry->name;
@@ -2434,6 +2447,8 @@ static void itemdb_read(bool minimal)
}
}
+ itemdb->other->foreach(itemdb->other, itemdb->addname_sub);
+
if (minimal)
return;
@@ -2444,7 +2459,23 @@ static void itemdb_read(bool minimal)
itemdb->read_chains();
itemdb->read_packages();
itemdb->read_options();
- clif->stylist_read_db_libconfig();
+}
+
+/**
+ * Add item name with high id into map
+ * @see DBApply
+ */
+static int itemdb_addname_sub(union DBKey key, struct DBData *data, va_list ap)
+{
+ struct item_data *item = DB->data2ptr(data);
+ struct DBData prev;
+
+ if (itemdb->names->put(itemdb->names, DB->str2key(item->name), DB->ptr2data(item), &prev)) {
+ struct item_data *oldItem = DB->data2ptr(&prev);
+ ShowError("itemdb_read: duplicate AegisName '%s' in item ID %d and %d\n", item->name, item->nameid, oldItem->nameid);
+ }
+
+ return 0;
}
/**
@@ -2676,7 +2707,6 @@ static void do_final_itemdb(void)
itemdb->destroy_item_data(&itemdb->dummy, 0);
db_destroy(itemdb->names);
VECTOR_CLEAR(clif->attendance_data);
- clif->stylist_vector_clear();
}
static void do_init_itemdb(bool minimal)
@@ -2686,7 +2716,6 @@ static void do_init_itemdb(bool minimal)
itemdb->options = idb_alloc(DB_OPT_RELEASE_DATA);
itemdb->names = strdb_alloc(DB_OPT_BASE,ITEM_NAME_LENGTH);
itemdb->create_dummy_data(); //Dummy data item.
- clif->stylist_vector_init();
itemdb->read(minimal);
if (minimal)
@@ -2789,4 +2818,5 @@ void itemdb_defaults(void)
itemdb->is_item_usable = itemdb_is_item_usable;
itemdb->lookup_const = itemdb_lookup_const;
itemdb->lookup_const_mask = itemdb_lookup_const_mask;
+ itemdb->addname_sub = itemdb_addname_sub;
}
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index d92940445..e032def0c 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -38,7 +38,7 @@ struct hplugin_data_store;
#endif
#ifndef MAX_ITEM_ID
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
#define MAX_ITEM_ID 0x20000
#else
#define MAX_ITEM_ID 0xFFFF
@@ -72,8 +72,8 @@ struct hplugin_data_store;
#if MAX_ITEM_ID < MAX_ITEMDB
#error "MAX_ITEM_ID must be bigger or same with MAX_ITEMDB"
#endif
-#if MAX_ITEM_ID > 0xFFFF && PACKETVER_RE_NUM < 20180704
-#error "For clients before 20180704 RE, MAX_ITEM_ID must be smaller than 0x10000"
+#if MAX_ITEM_ID > 0xFFFF && PACKETVER_MAIN_NUM < 20181121 && PACKETVER_RE_NUM < 20180704 && PACKETVER_ZERO_NUM < 20181114
+#error "For clients before 20181121 Main and 20180704 RE and 20181114 zero, MAX_ITEM_ID must be smaller than 0x10000"
#endif
enum item_itemid {
@@ -130,6 +130,7 @@ enum item_itemid {
ITEMID_INDIGO_PTS = 6361,
ITEMID_YELLOW_WISH_PTS = 6362,
ITEMID_LIME_GREEN_PTS = 6363,
+ ITEMID_BLACKSMITH_BLESSING = 6635,
ITEMID_STONE = 7049,
ITEMID_FIRE_BOTTLE = 7135,
ITEMID_ACID_BOTTLE = 7136,
@@ -683,6 +684,7 @@ struct itemdb_interface {
bool (*is_item_usable) (struct item_data *item);
bool (*lookup_const) (const struct config_setting_t *it, const char *name, int *value);
bool (*lookup_const_mask) (const struct config_setting_t *it, const char *name, int *value);
+ int (*addname_sub) (union DBKey key, struct DBData *data, va_list ap);
};
#ifdef HERCULES_CORE
diff --git a/src/map/log.c b/src/map/log.c
index efb7fefbc..5bbca02a9 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -106,7 +106,7 @@ static char log_chattype2char(e_log_chat_type type)
}
/// check if this item should be logged according the settings
-static bool should_log_item(int nameid, int amount, int refine, struct item_data *id)
+static bool should_log_item(int nameid, int amount, int refine_level, struct item_data *id)
{
int filter = logs->config.filter;
@@ -123,7 +123,7 @@ static bool should_log_item(int nameid, int amount, int refine, struct item_data
( filter&LOG_FILTER_PETITEM && ( id->type == IT_PETEGG || id->type == IT_PETARMOR ) ) ||
( filter&LOG_FILTER_PRICE && id->value_buy >= logs->config.price_items_log ) ||
( filter&LOG_FILTER_AMOUNT && abs(amount) >= logs->config.amount_items_log ) ||
- ( filter&LOG_FILTER_REFINE && refine >= logs->config.refine_items_log ) ||
+ ( filter&LOG_FILTER_REFINE && refine_level >= logs->config.refine_items_log ) ||
( filter&LOG_FILTER_CHANCE && ( ( id->maxchance != -1 && id->maxchance <= logs->config.rare_items_log ) || id->nameid == ITEMID_EMPERIUM ) )
)
return true;
diff --git a/src/map/log.h b/src/map/log.h
index db802575d..116d99bfd 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -155,7 +155,7 @@ struct log_interface {
char (*picktype2char) (e_log_pick_type type);
char (*chattype2char) (e_log_chat_type type);
- bool (*should_log_item) (int nameid, int amount, int refine, struct item_data *id);
+ bool (*should_log_item) (int nameid, int amount, int refine_level, struct item_data *id);
};
#ifdef HERCULES_CORE
diff --git a/src/map/mail.c b/src/map/mail.c
index d67e658fd..0a6603a45 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -100,7 +100,7 @@ static unsigned char mail_setitem(struct map_session_data *sd, int idx, int amou
idx -= 2;
mail->removeitem(sd, 0);
- if( idx < 0 || idx >= MAX_INVENTORY )
+ if (idx < 0 || idx >= sd->status.inventorySize)
return 1;
if( amount <= 0 || amount > sd->status.inventory[idx].amount )
return 1;
@@ -128,7 +128,7 @@ static bool mail_setattachment(struct map_session_data *sd, struct mail_message
return false;
n = sd->mail.index;
- Assert_retr(false, n >= 0 && n < MAX_INVENTORY);
+ Assert_retr(false, n >= 0 && n < sd->status.inventorySize);
if( sd->mail.amount )
{
if( sd->status.inventory[n].nameid != sd->mail.nameid )
@@ -177,7 +177,7 @@ static int mail_openmail(struct map_session_data *sd)
{
nullpo_ret(sd);
- if (sd->state.storage_flag != STORAGE_FLAG_CLOSED || sd->state.vending || sd->state.buyingstore || sd->state.trading)
+ if (sd->state.storage_flag != STORAGE_FLAG_CLOSED || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->state.trading)
return 0;
clif->mail_window(sd->fd, 0);
diff --git a/src/map/map.c b/src/map/map.c
index a0ac8cd95..f92be52e9 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -56,7 +56,9 @@
#include "map/skill.h"
#include "map/status.h"
#include "map/storage.h"
+#include "map/stylist.h"
#include "map/rodex.h"
+#include "map/refine.h"
#include "map/trade.h"
#include "map/unit.h"
#include "map/achievement.h"
@@ -3584,23 +3586,27 @@ static void map_zone_db_clear(void)
}
static void map_clean(int i)
{
- int v;
Assert_retv(i >= 0 && i < map->count);
- if(map->list[i].cell && map->list[i].cell != (struct mapcell *)0xdeadbeaf) aFree(map->list[i].cell);
- if(map->list[i].block) aFree(map->list[i].block);
- if(map->list[i].block_mob) aFree(map->list[i].block_mob);
- if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random]
- int j;
- if(map->list[i].mob_delete_timer != INVALID_TIMER)
+ if (map->list[i].cell && map->list[i].cell != (struct mapcell *)0xdeadbeaf)
+ aFree(map->list[i].cell);
+ if (map->list[i].block)
+ aFree(map->list[i].block);
+ if (map->list[i].block_mob)
+ aFree(map->list[i].block_mob);
+
+ if (battle_config.dynamic_mobs != 0) { //Dynamic mobs flag by [random]
+ if (map->list[i].mob_delete_timer != INVALID_TIMER)
timer->delete(map->list[i].mob_delete_timer, map->removemobs_timer);
- for (j=0; j<MAX_MOB_LIST_PER_MAP; j++)
- if (map->list[i].moblist[j]) aFree(map->list[i].moblist[j]);
+ for (int j = 0; j < MAX_MOB_LIST_PER_MAP; j++) {
+ if (map->list[i].moblist[j] != NULL)
+ aFree(map->list[i].moblist[j]);
+ }
}
- if( map->list[i].unit_count ) {
- if( map->list[i].units ) {
- for(v = 0; v < map->list[i].unit_count; v++) {
+ if (map->list[i].unit_count != 0) {
+ if (map->list[i].units != NULL) {
+ for (int v = 0; v < map->list[i].unit_count; v++) {
aFree(map->list[i].units[v]);
}
aFree(map->list[i].units);
@@ -3609,98 +3615,44 @@ static void map_clean(int i)
map->list[i].unit_count = 0;
}
- if( map->list[i].skill_count ) {
- if( map->list[i].skills ) {
- for(v = 0; v < map->list[i].skill_count; v++) {
- aFree(map->list[i].skills[v]);
- }
+ if (map->list[i].skill_count != 0) {
+ if (map->list[i].skills != NULL) {
+ for (int v = 0; v < map->list[i].skill_count; v++) {
+ aFree(map->list[i].skills[v]);
+ }
aFree(map->list[i].skills);
map->list[i].skills = NULL;
}
map->list[i].skill_count = 0;
}
- if( map->list[i].zone_mf_count ) {
- if( map->list[i].zone_mf ) {
- for(v = 0; v < map->list[i].zone_mf_count; v++) {
- aFree(map->list[i].zone_mf[v]);
- }
+ if (map->list[i].zone_mf_count != 0) {
+ if (map->list[i].zone_mf != NULL) {
+ for (int v = 0; v < map->list[i].zone_mf_count; v++) {
+ aFree(map->list[i].zone_mf[v]);
+ }
aFree(map->list[i].zone_mf);
map->list[i].zone_mf = NULL;
}
map->list[i].zone_mf_count = 0;
}
- if( map->list[i].channel )
+ if (map->list[i].drop_list_count != 0)
+ map->list[i].drop_list_count = 0;
+ if (map->list[i].drop_list != NULL)
+ aFree(map->list[i].drop_list);
+
+ if (map->list[i].channel != NULL)
channel->delete(map->list[i].channel);
+
+ VECTOR_CLEAR(map->list[i].qi_list);
+ HPM->data_store_destroy(&map->list[i].hdata);
}
static void do_final_maps(void)
{
- int i, v = 0;
-
- for( i = 0; i < map->count; i++ ) {
-
- if(map->list[i].cell && map->list[i].cell != (struct mapcell *)0xdeadbeaf ) aFree(map->list[i].cell);
- if(map->list[i].block) aFree(map->list[i].block);
- if(map->list[i].block_mob) aFree(map->list[i].block_mob);
-
- if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random]
- int j;
- if(map->list[i].mob_delete_timer != INVALID_TIMER)
- timer->delete(map->list[i].mob_delete_timer, map->removemobs_timer);
- for (j=0; j<MAX_MOB_LIST_PER_MAP; j++)
- if (map->list[i].moblist[j]) aFree(map->list[i].moblist[j]);
- }
-
- if( map->list[i].unit_count ) {
- if( map->list[i].units ) {
- for(v = 0; v < map->list[i].unit_count; v++) {
- aFree(map->list[i].units[v]);
- }
- aFree(map->list[i].units);
- map->list[i].units = NULL;
- }
- map->list[i].unit_count = 0;
- }
-
- if( map->list[i].skill_count ) {
- if( map->list[i].skills ) {
- for(v = 0; v < map->list[i].skill_count; v++) {
- aFree(map->list[i].skills[v]);
- }
- aFree(map->list[i].skills);
- map->list[i].skills = NULL;
- }
- map->list[i].skill_count = 0;
- }
-
- if( map->list[i].zone_mf_count ) {
- if( map->list[i].zone_mf ) {
- for(v = 0; v < map->list[i].zone_mf_count; v++) {
- aFree(map->list[i].zone_mf[v]);
- }
- aFree(map->list[i].zone_mf);
- map->list[i].zone_mf = NULL;
- }
- map->list[i].zone_mf_count = 0;
- }
-
- if( map->list[i].drop_list_count ) {
- map->list[i].drop_list_count = 0;
- }
- if( map->list[i].drop_list != NULL )
- aFree(map->list[i].drop_list);
-
- if( map->list[i].channel )
- channel->delete(map->list[i].channel);
-
- quest->questinfo_vector_clear(i);
-
- HPM->data_store_destroy(&map->list[i].hdata);
- }
-
+ for (int i = 0; i < map->count; i++)
+ map->clean(i);
map->zone_db_clear();
-
}
static void map_zonedb_reload(void)
@@ -3791,7 +3743,8 @@ static void map_flags_init(void)
map->list[i].short_damage_rate = 100;
map->list[i].long_damage_rate = 100;
- VECTOR_INIT(map->list[i].qi_data);
+ VECTOR_CLEAR(map->list[i].qi_list);
+ VECTOR_INIT(map->list[i].qi_list);
}
}
@@ -4479,6 +4432,7 @@ static bool inter_config_read_database_names(const char *filename, const struct
libconfig->setting_lookup_mutable_string(setting, "autotrade_merchants_db", map->autotrade_merchants_db, sizeof(map->autotrade_merchants_db));
libconfig->setting_lookup_mutable_string(setting, "autotrade_data_db", map->autotrade_data_db, sizeof(map->autotrade_data_db));
libconfig->setting_lookup_mutable_string(setting, "npc_market_data_db", map->npc_market_data_db, sizeof(map->npc_market_data_db));
+ libconfig->setting_lookup_mutable_string(setting, "npc_barter_data_db", map->npc_barter_data_db, sizeof(map->npc_barter_data_db));
if (!mapreg->config_read(filename, setting, imported))
retval = false;
@@ -6052,28 +6006,30 @@ static int map_get_new_bonus_id(void)
return map->bonus_id++;
}
-static void map_add_questinfo(int m, struct questinfo *qi)
+static bool map_add_questinfo(int m, struct npc_data *nd)
{
- nullpo_retv(qi);
- Assert_retv(m >= 0 && m < map->count);
+ nullpo_retr(false, nd);
+ Assert_retr(false, m >= 0 && m < map->count);
- VECTOR_ENSURE(map->list[m].qi_data, 1, 1);
- VECTOR_PUSH(map->list[m].qi_data, *qi);
+ if (&VECTOR_LAST(map->list[m].qi_list) == nd)
+ return false;
+
+ VECTOR_ENSURE(map->list[m].qi_list, 1, 1);
+ VECTOR_PUSH(map->list[m].qi_list, *nd);
+ return true;
}
static bool map_remove_questinfo(int m, struct npc_data *nd)
{
- unsigned short i;
nullpo_retr(false, nd);
Assert_retr(false, m >= 0 && m < map->count);
- for (i = 0; i < VECTOR_LENGTH(map->list[m].qi_data); i++) {
- struct questinfo *qi_data = &VECTOR_INDEX(map->list[m].qi_data, i);
- if (qi_data->nd == nd) {
- VECTOR_ERASE(map->list[m].qi_data, i);
- return true;
- }
+ int i;
+ ARR_FIND(0, VECTOR_LENGTH(map->list[m].qi_list), i, &VECTOR_INDEX(map->list[m].qi_list, i) == nd);
+ if (i != VECTOR_LENGTH(map->list[m].qi_list)) {
+ VECTOR_ERASE(map->list[m].qi_list, i);
+ return true;
}
return false;
}
@@ -6214,6 +6170,7 @@ int do_final(void)
atcommand->final_msg();
skill->final();
status->final();
+ refine->final();
unit->final();
bg->final();
duel->final();
@@ -6222,6 +6179,7 @@ int do_final(void)
vending->final();
rodex->final();
achievement->final();
+ stylist->final();
HPM_map_do_final();
@@ -6429,6 +6387,8 @@ static void map_load_defaults(void)
achievement_defaults();
npc_chat_defaults();
rodex_defaults();
+ stylist_defaults();
+ refine_defaults();
}
/**
* --run-once handler
@@ -6733,6 +6693,7 @@ int do_init(int argc, char *argv[])
map->read_zone_db();/* read after item and skill initialization */
mob->init(minimal);
pc->init(minimal);
+ refine->init(minimal);
status->init(minimal);
party->init(minimal);
guild->init(minimal);
@@ -6749,6 +6710,7 @@ int do_init(int argc, char *argv[])
duel->init(minimal);
vending->init(minimal);
rodex->init(minimal);
+ stylist->init(minimal);
if (map->scriptcheck) {
bool failed = map->extra_scripts_count > 0 ? false : true;
@@ -6768,6 +6730,7 @@ int do_init(int argc, char *argv[])
npc->event_do_oninit( false ); // Init npcs (OnInit)
npc->market_fromsql(); /* after OnInit */
+ npc->barter_fromsql(); /* after OnInit */
if (battle_config.pk_mode)
ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
diff --git a/src/map/map.h b/src/map/map.h
index 25ff63edc..39eb07e4c 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -45,42 +45,6 @@ enum E_MAPSERVER_ST {
MAPSERVER_ST_LAST
};
-#define MAX_NPC_PER_MAP 512
-#define AREA_SIZE (battle->bc->area_size)
-#define CHAT_AREA_SIZE (battle->bc->chat_area_size)
-#define DEAD_AREA_SIZE (battle->bc->dead_area_size)
-#define DAMAGELOG_SIZE 30
-#define LOOTITEM_SIZE 10
-#define MAX_MOBSKILL 50
-#define MAX_MOB_LIST_PER_MAP 100
-#define MAX_EVENTQUEUE 2
-#define MAX_EVENTTIMER 32
-#define NATURAL_HEAL_INTERVAL 500
-#define MIN_FLOORITEM 2
-#define MAX_FLOORITEM START_ACCOUNT_NUM
-#define MAX_IGNORE_LIST 20 // official is 14
-#define MAX_VENDING 12
-#define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo]
-
-#define BLOCK_SIZE 8
-#define block_free_max 1048576
-#define BL_LIST_MAX 1048576
-
-// The following system marks a different job ID system used by the map server,
-// which makes a lot more sense than the normal one. [Skotlex]
-// These marks the "level" of the job.
-#define JOBL_2_1 0x0100
-#define JOBL_2_2 0x0200
-#define JOBL_2 0x0300 // JOBL_2_1 | JOBL_2_2
-#define JOBL_UPPER 0x1000
-#define JOBL_BABY 0x2000
-#define JOBL_THIRD 0x4000
-
-// For filtering and quick checking.
-#define MAPID_BASEMASK 0x00ff
-#define MAPID_UPPERMASK 0x0fff
-#define MAPID_THIRDMASK (JOBL_THIRD|MAPID_UPPERMASK)
-
//First Jobs
//Note the oddity of the novice:
//Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type.
@@ -344,36 +308,6 @@ enum {
STATIC_ASSERT(((MAPID_1_1_MAX - 1) | MAPID_BASEMASK) == MAPID_BASEMASK, "First class map IDs do not fit into MAPID_BASEMASK");
-// Max size for inputs to Graffiti, Talkie Box and Vending text prompts
-#define MESSAGE_SIZE (79 + 1)
-// String length you can write in the 'talking box'
-#define CHATBOX_SIZE (70 + 1)
-// Chatroom-related string sizes
-#define CHATROOM_TITLE_SIZE (36 + 1)
-#define CHATROOM_PASS_SIZE (8 + 1)
-// Max allowed chat text length
-#define CHAT_SIZE_MAX (255 + 1)
-// 24 for npc name + 24 for label + 2 for a "::" and 1 for EOS
-#define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 )
-#define DEFAULT_AUTOSAVE_INTERVAL (5*60*1000)
-// Specifies maps where players may hit each other
-#define map_flag_vs(m) ( \
- map->list[m].flag.pvp \
- || map->list[m].flag.gvg_dungeon \
- || map->list[m].flag.gvg \
- || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) \
- || map->list[m].flag.battleground \
- || map->list[m].flag.cvc \
- )
-// Specifies maps that have special GvG/WoE restrictions
-#define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle))
-// Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status)
-#define map_flag_gvg2(m) (map->list[m].flag.gvg || map->list[m].flag.gvg_castle)
-// No Kill Steal Protection
-#define map_flag_ks(m) (map->list[m].flag.town || map->list[m].flag.pvp || map->list[m].flag.gvg || map->list[m].flag.battleground)
-// No ViewID
-#define map_no_view(m, view) (map->list[m].flag.noviewid & (view))
-
//This stackable implementation does not means a BL can be more than one type at a time, but it's
// meant to make it easier to check for multiple types at a time on invocations such as map_foreach* calls [Skotlex]
enum bl_type {
@@ -392,9 +326,6 @@ enum bl_type {
BL_ALL = 0xFFF,
};
-// For common mapforeach calls. Since pets cannot be affected, they aren't included here yet.
-#define BL_CHAR (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM)
-
enum npc_subtype { WARP, SHOP, SCRIPT, CASHSHOP, TOMB };
/**
@@ -518,7 +449,7 @@ struct block_list {
// Mob List Held in memory for Dynamic Mobs [Wizputer]
// Expanded to specify all mob-related spawn data by [Skotlex]
struct spawn_data {
- short class_; ///< Class, used because a mob can change it's class
+ int class_; ///< Class, used because a mob can change it's class
unsigned short m, x, y; ///< Spawn information (map, point, spawn-area around point)
signed short xs, ys;
unsigned short num; ///< Number of mobs using this structure
@@ -748,16 +679,6 @@ enum map_zone_merge_type {
MZMT_NEVERMERGE, ///< Cannot merge with any zones.
};
-#define MAP_ZONE_NAME_LENGTH 60
-#define MAP_ZONE_ALL_NAME "All"
-#define MAP_ZONE_NORMAL_NAME "Normal"
-#define MAP_ZONE_PVP_NAME "PvP"
-#define MAP_ZONE_GVG_NAME "GvG"
-#define MAP_ZONE_BG_NAME "Battlegrounds"
-#define MAP_ZONE_CVC_NAME "CvC"
-#define MAP_ZONE_PK_NAME "PK Mode"
-#define MAP_ZONE_MAPFLAG_LENGTH 65
-
struct map_zone_data {
char name[MAP_ZONE_NAME_LENGTH];/* 20'd */
enum map_zone_merge_type merge_type;
@@ -784,41 +705,6 @@ struct map_drop_list {
int drop_per;
};
-struct questinfo_qreq {
- int id;
- int state;
-};
-
-struct questinfo_itemreq {
- int nameid;
- int min;
- int max;
-};
-
-struct questinfo {
- struct npc_data *nd;
- unsigned short icon;
- unsigned char color;
- bool hasJob;
- unsigned short job;/* perhaps a mapid mask would be most flexible? */
- bool sex_enabled;
- int sex;
- struct {
- int min;
- int max;
- } base_level;
- struct {
- int min;
- int max;
- } job_level;
- VECTOR_DECL(struct questinfo_itemreq) items;
- struct s_homunculus homunculus;
- int homunculus_type;
- VECTOR_DECL(struct questinfo_qreq) quest_requirement;
- int mercenary_class;
-};
-
-
struct map_data {
char name[MAP_NAME_LENGTH];
uint16 index; // The map index used by the mapindex* functions.
@@ -958,8 +844,8 @@ struct map_data {
int len;
} cell_buf;
- /* ShowEvent Data Cache */
- VECTOR_DECL(struct questinfo) qi_data;
+ /* questinfo entries list */
+ VECTOR_DECL(struct npc_data) qi_list;
/* speeds up clif_updatestatus processing by causing hpmeter to run only when someone with the permission can view it */
unsigned short hpmeter_visible;
@@ -1169,6 +1055,7 @@ struct map_interface {
char autotrade_merchants_db[32];
char autotrade_data_db[32];
char npc_market_data_db[32];
+ char npc_barter_data_db[32];
char default_codepage[32];
char default_lang_str[64];
@@ -1392,7 +1279,7 @@ END_ZEROED_BLOCK;
int (*abort_sub) (struct map_session_data *sd, va_list ap);
void (*update_cell_bl) (struct block_list *bl, bool increase);
int (*get_new_bonus_id) (void);
- void (*add_questinfo) (int m, struct questinfo *qi);
+ bool (*add_questinfo) (int m, struct npc_data *nd);
bool (*remove_questinfo) (int m, struct npc_data *nd);
struct map_zone_data *(*merge_zone) (struct map_zone_data *main, struct map_zone_data *other);
void (*zone_clear_single) (struct map_zone_data *zone);
diff --git a/src/map/mapdefines.h b/src/map/mapdefines.h
new file mode 100644
index 000000000..df9e9bccb
--- /dev/null
+++ b/src/map/mapdefines.h
@@ -0,0 +1,103 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2018 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef MAP_MAPDEFINES_H
+#define MAP_MAPDEFINES_H
+
+#define MAX_NPC_PER_MAP 512
+#define AREA_SIZE (battle->bc->area_size)
+#define CHAT_AREA_SIZE (battle->bc->chat_area_size)
+#define DEAD_AREA_SIZE (battle->bc->dead_area_size)
+#define DAMAGELOG_SIZE 30
+#define LOOTITEM_SIZE 10
+#define MAX_MOBSKILL 50
+#define MAX_MOB_LIST_PER_MAP 100
+#define MAX_EVENTQUEUE 2
+#define MAX_EVENTTIMER 32
+#define NATURAL_HEAL_INTERVAL 500
+#define MIN_FLOORITEM 2
+#define MAX_FLOORITEM START_ACCOUNT_NUM
+#define MAX_IGNORE_LIST 20 // official is 14
+#define MAX_VENDING 12
+#define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo]
+
+#define BLOCK_SIZE 8
+#define block_free_max 1048576
+#define BL_LIST_MAX 1048576
+
+// The following system marks a different job ID system used by the map server,
+// which makes a lot more sense than the normal one. [Skotlex]
+// These marks the "level" of the job.
+#define JOBL_2_1 0x0100
+#define JOBL_2_2 0x0200
+#define JOBL_2 0x0300 // JOBL_2_1 | JOBL_2_2
+#define JOBL_UPPER 0x1000
+#define JOBL_BABY 0x2000
+#define JOBL_THIRD 0x4000
+
+// For filtering and quick checking.
+#define MAPID_BASEMASK 0x00ff
+#define MAPID_UPPERMASK 0x0fff
+#define MAPID_THIRDMASK (JOBL_THIRD|MAPID_UPPERMASK)
+
+// Max size for inputs to Graffiti, Talkie Box and Vending text prompts
+#define MESSAGE_SIZE (79 + 1)
+// String length you can write in the 'talking box'
+#define CHATBOX_SIZE (70 + 1)
+// Chatroom-related string sizes
+#define CHATROOM_TITLE_SIZE (36 + 1)
+#define CHATROOM_PASS_SIZE (8 + 1)
+// Max allowed chat text length
+#define CHAT_SIZE_MAX (255 + 1)
+// 24 for npc name + 24 for label + 2 for a "::" and 1 for EOS
+#define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 )
+#define DEFAULT_AUTOSAVE_INTERVAL (5*60*1000)
+// Specifies maps where players may hit each other
+#define map_flag_vs(m) ( \
+ map->list[m].flag.pvp \
+ || map->list[m].flag.gvg_dungeon \
+ || map->list[m].flag.gvg \
+ || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) \
+ || map->list[m].flag.battleground \
+ || map->list[m].flag.cvc \
+ )
+// Specifies maps that have special GvG/WoE restrictions
+#define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle))
+// Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status)
+#define map_flag_gvg2(m) (map->list[m].flag.gvg || map->list[m].flag.gvg_castle)
+// No Kill Steal Protection
+#define map_flag_ks(m) (map->list[m].flag.town || map->list[m].flag.pvp || map->list[m].flag.gvg || map->list[m].flag.battleground)
+// No ViewID
+#define map_no_view(m, view) (map->list[m].flag.noviewid & (view))
+
+// For common mapforeach calls. Since pets cannot be affected, they aren't included here yet.
+#define BL_CHAR (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM)
+
+#define MAP_ZONE_NAME_LENGTH 60
+#define MAP_ZONE_ALL_NAME "All"
+#define MAP_ZONE_NORMAL_NAME "Normal"
+#define MAP_ZONE_PVP_NAME "PvP"
+#define MAP_ZONE_GVG_NAME "GvG"
+#define MAP_ZONE_BG_NAME "Battlegrounds"
+#define MAP_ZONE_CVC_NAME "CvC"
+#define MAP_ZONE_PK_NAME "PK Mode"
+#define MAP_ZONE_MAPFLAG_LENGTH 65
+
+#endif /* MAP_MAPDEFINES_H */
diff --git a/src/map/messages_ad.h b/src/map/messages_ad.h
index 4345e078a..e0a4e5c98 100644
--- a/src/map/messages_ad.h
+++ b/src/map/messages_ad.h
@@ -2,7 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/map/messages_main.h b/src/map/messages_main.h
index 4bef783ec..b9458e374 100644
--- a/src/map/messages_main.h
+++ b/src/map/messages_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20181107
+Latest version: 20190522
*/
enum clif_messages {
@@ -4630,9 +4630,11 @@ Thief
Knight
*/
MSG_KNIGHT = 0x364,
-/*20040913 to latest
+/*20040913 to 20181128
Prieset
Priest
+20181205 to latest
+Priest
*/
MSG_PRIEST = 0x365,
/*20040913 to latest
@@ -5269,9 +5271,11 @@ WhiteSmith
Sniper
*/
MSG_HUNTER_H = 0x3dc,
-/*20050613 to latest
+/*20050613 to 20181128
Saaassin Cross
Assassin Cross
+20181205 to latest
+Assassin Cross
*/
MSG_ASSASSIN_H = 0x3dd,
/*20050613 to latest
@@ -5299,9 +5303,11 @@ Sniper_W
Sniper
*/
MSG_HUNTER_H_W = 0x3e2,
-/*20050613 to latest
+/*20050613 to 20181128
Saaassin Cross_W
Assassin Cross
+20181205 to latest
+Assassin Cross_W
*/
MSG_ASSASSIN_H_W = 0x3e3,
/*20050613 to latest
@@ -20254,9 +20260,11 @@ http://member.gnjoy.com/user/pay/chargelist.asp
한 번에 구입 가능한 아이템의 가짓수는 8개입니다.
*/
MSG_ID_CF0 = 0xcf0,
-/*20170920 to latest
+/*20170920 to 20190228
http://gift.zhaouc.com/#/index
http://gift.zhaouc.com/
+20190306 to latest
+http://gift.zhaouc.com/
*/
MSG_ID_CF1 = 0xcf1,
#endif
@@ -21412,6 +21420,313 @@ PvP
*/
MSG_ID_DEE = 0xdee,
#endif
+#if PACKETVER >= 20181121
+/*20181121 to latest
+같은 아이템을 %d개 이상 가질 수 없습니다.
+*/
+ MSG_ID_DEF = 0xdef,
+/*20181121 to latest
+소지 한계량 초과로 구입이 불가능합니다.
+*/
+ MSG_ID_DF0 = 0xdf0,
+/*20181121 to latest
+해당 아이템은 한 번에 한 개만 살 수 있습니다.
+*/
+ MSG_ID_DF1 = 0xdf1,
+#endif
+#if PACKETVER >= 20181205
+/*20181205 to latest
+성제
+*/
+ MSG_ID_DF2 = 0xdf2,
+/*20181205 to latest
+소울리퍼
+*/
+ MSG_ID_DF3 = 0xdf3,
+#endif
+#if PACKETVER >= 20181212
+/*20181212 to latest
+설정한 내용은 정상 종료 시 서버에 저장됩니다.
+*/
+ MSG_ID_DF4 = 0xdf4,
+#endif
+#if PACKETVER >= 20190109
+/*20190109 to latest
+Capture Monster
+*/
+ MSG_ID_DF5 = 0xdf5,
+/*20190109 to latest
+message
+*/
+ MSG_ID_DF6 = 0xdf6,
+/*20190109 to latest
+TITLE
+*/
+ MSG_ID_DF7 = 0xdf7,
+/*20190109 to latest
+데미지 표기 확장
+*/
+ MSG_ID_DF8 = 0xdf8,
+#endif
+#if PACKETVER >= 20190213
+/*20190213 to latest
+맵 이름 표기
+*/
+ MSG_ID_DF9 = 0xdf9,
+/*20190213 to latest
+시스템 메세지 : 현재 노점보기 기능이 %s 상태입니다. (/노점보기)
+*/
+ MSG_ID_DFA = 0xdfa,
+/*20190213 to latest
+수직 동기
+*/
+ MSG_ID_DFB = 0xdfb,
+/*20190213 to latest
+자료
+*/
+ MSG_ID_DFC = 0xdfc,
+/*20190213 to 20190228
+http://rodata.zhaouc.com/renwu.html#container
+20190306 to latest
+http://rodata.zhaouc.com/renwu.html
+*/
+ MSG_ID_DFD = 0xdfd,
+/*20190213 to latest
+작위
+*/
+ MSG_ID_DFE = 0xdfe,
+/*20190213 to latest
+프레임 제한
+*/
+ MSG_ID_DFF = 0xdff,
+#endif
+#if PACKETVER >= 20190227
+/*20190227 to latest
+%d개를 초과할 경우 더 이상 설치 할 수 없습니다.
+*/
+ MSG_ID_E00 = 0xe00,
+/*20190227 to latest
+목적지
+*/
+ MSG_ID_E01 = 0xe01,
+#endif
+#if PACKETVER >= 20190306
+/*20190306 to latest
+잠시 후 다시 시도해주세요.
+Please try again in a moment.
+*/
+ MSG_ID_E02 = 0xe02,
+/*20190306 to latest
+등록할 수 없는 파일입니다.
+*/
+ MSG_ID_E03 = 0xe03,
+#endif
+#if PACKETVER >= 20190320
+/*20190320 to latest
+선택 삭제
+*/
+ MSG_ID_E04 = 0xe04,
+/*20190320 to latest
+모두 삭제
+*/
+ MSG_ID_E05 = 0xe05,
+/*20190320 to latest
+[%s]편지함의 모든 메일을 삭제하시겠습니까?
+*/
+ MSG_ID_E06 = 0xe06,
+/*20190320 to latest
+선택 받기
+*/
+ MSG_ID_E07 = 0xe07,
+/*20190320 to latest
+모두 받기
+*/
+ MSG_ID_E08 = 0xe08,
+/*20190320 to latest
+선택한 메일의 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E09 = 0xe09,
+/*20190320 to latest
+[%s]편지함의 모든 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E0A = 0xe0a,
+#endif
+#if PACKETVER >= 20190403
+/*20190403 to latest
+스킬바2
+*/
+ MSG_ID_E0B = 0xe0b,
+/*20190403 to latest
+스킬바 교체
+*/
+ MSG_ID_E0C = 0xe0c,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E0D = 0xe0d,
+/*20190403 to latest
+↑
+*/
+ MSG_ID_E0E = 0xe0e,
+/*20190403 to latest
+→
+*/
+ MSG_ID_E0F = 0xe0f,
+/*20190403 to latest
+↓
+*/
+ MSG_ID_E10 = 0xe10,
+/*20190403 to latest
+▤
+*/
+ MSG_ID_E11 = 0xe11,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E12 = 0xe12,
+/*20190403 to latest
+로딩중에는 창을 닫을 수 없습니다.
+*/
+ MSG_ID_E13 = 0xe13,
+#endif
+#if PACKETVER >= 20190417
+/*20190417 to latest
+리딩 스펠북으로 저장된 마법이 없습니다.
+*/
+ MSG_ID_E14 = 0xe14,
+/*20190417 to latest
+이동 시 사용한 아이템은 재교환이 불가능합니다.
+*/
+ MSG_ID_E15 = 0xe15,
+/*20190417 to latest
+자유이동권을 구매 하였습니다
+*/
+ MSG_ID_E16 = 0xe16,
+/*20190417 to latest
+자유이동권 사용 중, 관련 아이템을 소모하지 않습니다.
+*/
+ MSG_ID_E17 = 0xe17,
+/*20190417 to latest
+적용
+*/
+ MSG_ID_E18 = 0xe18,
+/*20190417 to latest
+중지
+*/
+ MSG_ID_E19 = 0xe19,
+#endif
+#if PACKETVER >= 20190508
+/*20190508 to latest
+자유이동권
+*/
+ MSG_ID_E1A = 0xe1a,
+/*20190508 to latest
+%d시간 이용, %s %d개
+*/
+ MSG_ID_E1B = 0xe1b,
+/*20190508 to latest
+자유이용권 사용중
+*/
+ MSG_ID_E1C = 0xe1c,
+/*20190508 to latest
+특성 스테이터스
+*/
+ MSG_ID_E1D = 0xe1d,
+/*20190508 to latest
+파워 파라메터
+^cc0000물리 공격력, 특성 공격력^ffffff 증가
+*/
+ MSG_ID_E1E = 0xe1e,
+/*20190508 to latest
+스테미나 파라메터
+^cc0000물리 저항력^ffffff 증가
+*/
+ MSG_ID_E1F = 0xe1f,
+/*20190508 to latest
+위즈덤 파라메터
+^cc0000마법 저항력^ffffff 증가
+*/
+ MSG_ID_E20 = 0xe20,
+/*20190508 to latest
+스펠 파라메터
+^cc0000마법 공격력, 마법 공격력^ffffff 증가
+*/
+ MSG_ID_E21 = 0xe21,
+/*20190508 to latest
+컨센트레이션 파라메터
+^cc0000명중률, 회피율, 특성 물리/마법 공격력^ffffff 증가
+*/
+ MSG_ID_E22 = 0xe22,
+/*20190508 to latest
+크리에이티브 파라메터
+^cc0000특성 힐 회복량, 크리티컬 데미지 비율^ffffff 증가
+*/
+ MSG_ID_E23 = 0xe23,
+/*20190508 to latest
+특성 물리 공격력
+*/
+ MSG_ID_E24 = 0xe24,
+/*20190508 to latest
+특성 마법 공격력
+*/
+ MSG_ID_E25 = 0xe25,
+/*20190508 to latest
+물리 저항력
+*/
+ MSG_ID_E26 = 0xe26,
+/*20190508 to latest
+마법 저항력
+*/
+ MSG_ID_E27 = 0xe27,
+/*20190508 to latest
+특성 힐 회복량
+*/
+ MSG_ID_E28 = 0xe28,
+/*20190508 to latest
+크리티컬 데미지 비율
+*/
+ MSG_ID_E29 = 0xe29,
+/*20190508 to latest
+특성 파라메터 레벨업에 사용되는 포인트
+*/
+ MSG_ID_E2A = 0xe2a,
+/*20190508 to latest
+J.Lv
+*/
+ MSG_ID_E2B = 0xe2b,
+/*20190508 to latest
+AP
+*/
+ MSG_ID_E2C = 0xe2c,
+#endif
+#if PACKETVER >= 20190522
+/*20190522 to latest
+영지로 이동
+*/
+ MSG_ID_E2D = 0xe2d,
+/*20190522 to latest
+상업도/방어도 확인
+*/
+ MSG_ID_E2E = 0xe2e,
+/*20190522 to latest
+관리영지 "%s"(으)로 이동하시겠습니까?
+(1회 이동 시 마다 1,000제니가 소모됩니다.
+공성전 시간에는 제니의 소모가 100배로 증가합니다.)
+*/
+ MSG_ID_E2F = 0xe2f,
+/*20190522 to latest
+
+관리영지 "%s"
+
+방어도: %d / %d
+상업도: %d / %d
+*/
+ MSG_ID_E30 = 0xe30,
+/*20190522 to latest
+공성 영지 내에서는 다른 공성 영지로 이동 할 수 없습니다.
+*/
+ MSG_ID_E31 = 0xe31,
+#endif
};
#endif /* MAP_MESSAGES_MAIN_H */
diff --git a/src/map/messages_re.h b/src/map/messages_re.h
index ee1a05b93..3a434ca29 100644
--- a/src/map/messages_re.h
+++ b/src/map/messages_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20181107
+Latest version: 20190522
*/
enum clif_messages {
@@ -4395,9 +4395,11 @@ Thief
Knight
*/
MSG_KNIGHT = 0x364,
-/*20080827 to latest
+/*20080827 to 20181128
Prieset
Priest
+20181205 to latest
+Priest
*/
MSG_PRIEST = 0x365,
/*20080827 to latest
@@ -4972,9 +4974,11 @@ WhiteSmith
Sniper
*/
MSG_HUNTER_H = 0x3dc,
-/*20080827 to latest
+/*20080827 to 20181128
Saaassin Cross
Assassin Cross
+20181205 to latest
+Assassin Cross
*/
MSG_ASSASSIN_H = 0x3dd,
/*20080827 to latest
@@ -5002,9 +5006,11 @@ Sniper_W
Sniper
*/
MSG_HUNTER_H_W = 0x3e2,
-/*20080827 to latest
+/*20080827 to 20181128
Saaassin Cross_W
Assassin Cross
+20181205 to latest
+Assassin Cross_W
*/
MSG_ASSASSIN_H_W = 0x3e3,
/*20080827 to latest
@@ -19733,9 +19739,11 @@ http://member.gnjoy.com/user/pay/chargelist.asp
한 번에 구입 가능한 아이템의 가짓수는 8개입니다.
*/
MSG_ID_CF0 = 0xcf0,
-/*20170920 to latest
+/*20170920 to 20190228
http://gift.zhaouc.com/#/index
http://gift.zhaouc.com/
+20190306 to latest
+http://gift.zhaouc.com/
*/
MSG_ID_CF1 = 0xcf1,
#endif
@@ -20891,6 +20899,313 @@ PvP
*/
MSG_ID_DEE = 0xdee,
#endif
+#if PACKETVER >= 20181121
+/*20181121 to latest
+같은 아이템을 %d개 이상 가질 수 없습니다.
+*/
+ MSG_ID_DEF = 0xdef,
+/*20181121 to latest
+소지 한계량 초과로 구입이 불가능합니다.
+*/
+ MSG_ID_DF0 = 0xdf0,
+/*20181121 to latest
+해당 아이템은 한 번에 한 개만 살 수 있습니다.
+*/
+ MSG_ID_DF1 = 0xdf1,
+#endif
+#if PACKETVER >= 20181205
+/*20181205 to latest
+성제
+*/
+ MSG_ID_DF2 = 0xdf2,
+/*20181205 to latest
+소울리퍼
+*/
+ MSG_ID_DF3 = 0xdf3,
+#endif
+#if PACKETVER >= 20181212
+/*20181212 to latest
+설정한 내용은 정상 종료 시 서버에 저장됩니다.
+*/
+ MSG_ID_DF4 = 0xdf4,
+#endif
+#if PACKETVER >= 20190109
+/*20190109 to latest
+Capture Monster
+*/
+ MSG_ID_DF5 = 0xdf5,
+/*20190109 to latest
+message
+*/
+ MSG_ID_DF6 = 0xdf6,
+/*20190109 to latest
+TITLE
+*/
+ MSG_ID_DF7 = 0xdf7,
+/*20190109 to latest
+데미지 표기 확장
+*/
+ MSG_ID_DF8 = 0xdf8,
+#endif
+#if PACKETVER >= 20190213
+/*20190213 to latest
+맵 이름 표기
+*/
+ MSG_ID_DF9 = 0xdf9,
+/*20190213 to latest
+시스템 메세지 : 현재 노점보기 기능이 %s 상태입니다. (/노점보기)
+*/
+ MSG_ID_DFA = 0xdfa,
+/*20190213 to latest
+수직 동기
+*/
+ MSG_ID_DFB = 0xdfb,
+/*20190213 to latest
+자료
+*/
+ MSG_ID_DFC = 0xdfc,
+/*20190213 to 20190228
+http://rodata.zhaouc.com/renwu.html#container
+20190306 to latest
+http://rodata.zhaouc.com/renwu.html
+*/
+ MSG_ID_DFD = 0xdfd,
+/*20190213 to latest
+작위
+*/
+ MSG_ID_DFE = 0xdfe,
+/*20190213 to latest
+프레임 제한
+*/
+ MSG_ID_DFF = 0xdff,
+#endif
+#if PACKETVER >= 20190220
+/*20190220 to latest
+%d개를 초과할 경우 더 이상 설치 할 수 없습니다.
+*/
+ MSG_ID_E00 = 0xe00,
+/*20190220 to latest
+목적지
+*/
+ MSG_ID_E01 = 0xe01,
+#endif
+#if PACKETVER >= 20190306
+/*20190306 to latest
+잠시 후 다시 시도해주세요.
+Please try again in a moment.
+*/
+ MSG_ID_E02 = 0xe02,
+/*20190306 to latest
+등록할 수 없는 파일입니다.
+*/
+ MSG_ID_E03 = 0xe03,
+#endif
+#if PACKETVER >= 20190320
+/*20190320 to latest
+선택 삭제
+*/
+ MSG_ID_E04 = 0xe04,
+/*20190320 to latest
+모두 삭제
+*/
+ MSG_ID_E05 = 0xe05,
+/*20190320 to latest
+[%s]편지함의 모든 메일을 삭제하시겠습니까?
+*/
+ MSG_ID_E06 = 0xe06,
+/*20190320 to latest
+선택 받기
+*/
+ MSG_ID_E07 = 0xe07,
+/*20190320 to latest
+모두 받기
+*/
+ MSG_ID_E08 = 0xe08,
+/*20190320 to latest
+선택한 메일의 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E09 = 0xe09,
+/*20190320 to latest
+[%s]편지함의 모든 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E0A = 0xe0a,
+#endif
+#if PACKETVER >= 20190403
+/*20190403 to latest
+스킬바2
+*/
+ MSG_ID_E0B = 0xe0b,
+/*20190403 to latest
+스킬바 교체
+*/
+ MSG_ID_E0C = 0xe0c,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E0D = 0xe0d,
+/*20190403 to latest
+↑
+*/
+ MSG_ID_E0E = 0xe0e,
+/*20190403 to latest
+→
+*/
+ MSG_ID_E0F = 0xe0f,
+/*20190403 to latest
+↓
+*/
+ MSG_ID_E10 = 0xe10,
+/*20190403 to latest
+▤
+*/
+ MSG_ID_E11 = 0xe11,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E12 = 0xe12,
+/*20190403 to latest
+로딩중에는 창을 닫을 수 없습니다.
+*/
+ MSG_ID_E13 = 0xe13,
+#endif
+#if PACKETVER >= 20190417
+/*20190417 to latest
+리딩 스펠북으로 저장된 마법이 없습니다.
+*/
+ MSG_ID_E14 = 0xe14,
+/*20190417 to latest
+이동 시 사용한 아이템은 재교환이 불가능합니다.
+*/
+ MSG_ID_E15 = 0xe15,
+/*20190417 to latest
+자유이동권을 구매 하였습니다
+*/
+ MSG_ID_E16 = 0xe16,
+/*20190417 to latest
+자유이동권 사용 중, 관련 아이템을 소모하지 않습니다.
+*/
+ MSG_ID_E17 = 0xe17,
+/*20190417 to latest
+적용
+*/
+ MSG_ID_E18 = 0xe18,
+/*20190417 to latest
+중지
+*/
+ MSG_ID_E19 = 0xe19,
+#endif
+#if PACKETVER >= 20190508
+/*20190508 to latest
+자유이동권
+*/
+ MSG_ID_E1A = 0xe1a,
+/*20190508 to latest
+%d시간 이용, %s %d개
+*/
+ MSG_ID_E1B = 0xe1b,
+/*20190508 to latest
+자유이용권 사용중
+*/
+ MSG_ID_E1C = 0xe1c,
+/*20190508 to latest
+특성 스테이터스
+*/
+ MSG_ID_E1D = 0xe1d,
+/*20190508 to latest
+파워 파라메터
+^cc0000물리 공격력, 특성 공격력^ffffff 증가
+*/
+ MSG_ID_E1E = 0xe1e,
+/*20190508 to latest
+스테미나 파라메터
+^cc0000물리 저항력^ffffff 증가
+*/
+ MSG_ID_E1F = 0xe1f,
+/*20190508 to latest
+위즈덤 파라메터
+^cc0000마법 저항력^ffffff 증가
+*/
+ MSG_ID_E20 = 0xe20,
+/*20190508 to latest
+스펠 파라메터
+^cc0000마법 공격력, 마법 공격력^ffffff 증가
+*/
+ MSG_ID_E21 = 0xe21,
+/*20190508 to latest
+컨센트레이션 파라메터
+^cc0000명중률, 회피율, 특성 물리/마법 공격력^ffffff 증가
+*/
+ MSG_ID_E22 = 0xe22,
+/*20190508 to latest
+크리에이티브 파라메터
+^cc0000특성 힐 회복량, 크리티컬 데미지 비율^ffffff 증가
+*/
+ MSG_ID_E23 = 0xe23,
+/*20190508 to latest
+특성 물리 공격력
+*/
+ MSG_ID_E24 = 0xe24,
+/*20190508 to latest
+특성 마법 공격력
+*/
+ MSG_ID_E25 = 0xe25,
+/*20190508 to latest
+물리 저항력
+*/
+ MSG_ID_E26 = 0xe26,
+/*20190508 to latest
+마법 저항력
+*/
+ MSG_ID_E27 = 0xe27,
+/*20190508 to latest
+특성 힐 회복량
+*/
+ MSG_ID_E28 = 0xe28,
+/*20190508 to latest
+크리티컬 데미지 비율
+*/
+ MSG_ID_E29 = 0xe29,
+/*20190508 to latest
+특성 파라메터 레벨업에 사용되는 포인트
+*/
+ MSG_ID_E2A = 0xe2a,
+/*20190508 to latest
+J.Lv
+*/
+ MSG_ID_E2B = 0xe2b,
+/*20190508 to latest
+AP
+*/
+ MSG_ID_E2C = 0xe2c,
+#endif
+#if PACKETVER >= 20190522
+/*20190522 to latest
+영지로 이동
+*/
+ MSG_ID_E2D = 0xe2d,
+/*20190522 to latest
+상업도/방어도 확인
+*/
+ MSG_ID_E2E = 0xe2e,
+/*20190522 to latest
+관리영지 "%s"(으)로 이동하시겠습니까?
+(1회 이동 시 마다 1,000제니가 소모됩니다.
+공성전 시간에는 제니의 소모가 100배로 증가합니다.)
+*/
+ MSG_ID_E2F = 0xe2f,
+/*20190522 to latest
+
+관리영지 "%s"
+
+방어도: %d / %d
+상업도: %d / %d
+*/
+ MSG_ID_E30 = 0xe30,
+/*20190522 to latest
+공성 영지 내에서는 다른 공성 영지로 이동 할 수 없습니다.
+*/
+ MSG_ID_E31 = 0xe31,
+#endif
};
#endif /* MAP_MESSAGES_RE_H */
diff --git a/src/map/messages_sak.h b/src/map/messages_sak.h
index 2cfe085c8..2c7bfd661 100644
--- a/src/map/messages_sak.h
+++ b/src/map/messages_sak.h
@@ -2,7 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h
index d814b2305..43f8b4f31 100644
--- a/src/map/messages_zero.h
+++ b/src/map/messages_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20181114
+Latest version: 20190515
*/
enum clif_messages {
@@ -4383,9 +4383,11 @@ Thief
Knight
*/
MSG_KNIGHT = 0x364,
-/*20171018 to latest
+/*20171018 to 20181128
Prieset
Priest
+20181212 to latest
+Priest
*/
MSG_PRIEST = 0x365,
/*20171018 to latest
@@ -4960,9 +4962,11 @@ WhiteSmith
Sniper
*/
MSG_HUNTER_H = 0x3dc,
-/*20171018 to latest
+/*20171018 to 20181128
Saaassin Cross
Assassin Cross
+20181212 to latest
+Assassin Cross
*/
MSG_ASSASSIN_H = 0x3dd,
/*20171018 to latest
@@ -4990,9 +4994,11 @@ Sniper_W
Sniper
*/
MSG_HUNTER_H_W = 0x3e2,
-/*20171018 to latest
+/*20171018 to 20181128
Saaassin Cross_W
Assassin Cross
+20181212 to latest
+Assassin Cross_W
*/
MSG_ASSASSIN_H_W = 0x3e3,
/*20171018 to latest
@@ -16350,9 +16356,11 @@ http://member.gnjoy.com/user/pay/chargelist.asp
한 번에 구입 가능한 아이템의 가짓수는 8개입니다.
*/
MSG_ID_CF0 = 0xcf0,
-/*20171018 to latest
+/*20171018 to 20190227
http://gift.zhaouc.com/#/index
http://gift.zhaouc.com/
+20190313 to latest
+http://gift.zhaouc.com/
*/
MSG_ID_CF1 = 0xcf1,
/*20171018 to latest
@@ -17509,6 +17517,301 @@ PvP
*/
MSG_ID_DF1 = 0xdf1,
#endif
+#if PACKETVER >= 20181212
+/*20181212 to latest
+성제
+*/
+ MSG_ID_DF2 = 0xdf2,
+/*20181212 to latest
+소울리퍼
+*/
+ MSG_ID_DF3 = 0xdf3,
+/*20181212 to latest
+설정한 내용은 정상 종료 시 서버에 저장됩니다.
+*/
+ MSG_ID_DF4 = 0xdf4,
+#endif
+#if PACKETVER >= 20181226
+/*20181226 to latest
+Capture Monster
+*/
+ MSG_ID_DF5 = 0xdf5,
+/*20181226 to latest
+message
+*/
+ MSG_ID_DF6 = 0xdf6,
+#endif
+#if PACKETVER >= 20190116
+/*20190116 to latest
+TITLE
+*/
+ MSG_ID_DF7 = 0xdf7,
+/*20190116 to latest
+데미지 표기 확장
+*/
+ MSG_ID_DF8 = 0xdf8,
+#endif
+#if PACKETVER >= 20190130
+/*20190130 to latest
+맵 이름 표기
+*/
+ MSG_ID_DF9 = 0xdf9,
+#endif
+#if PACKETVER >= 20190213
+/*20190213 to latest
+시스템 메세지 : 현재 노점보기 기능이 %s 상태입니다. (/노점보기)
+*/
+ MSG_ID_DFA = 0xdfa,
+/*20190213 to latest
+수직 동기
+*/
+ MSG_ID_DFB = 0xdfb,
+/*20190213 to latest
+자료
+*/
+ MSG_ID_DFC = 0xdfc,
+/*20190213 to 20190227
+http://rodata.zhaouc.com/renwu.html#container
+20190313 to latest
+http://rodata.zhaouc.com/renwu.html
+*/
+ MSG_ID_DFD = 0xdfd,
+/*20190213 to latest
+작위
+*/
+ MSG_ID_DFE = 0xdfe,
+/*20190213 to latest
+프레임 제한
+*/
+ MSG_ID_DFF = 0xdff,
+#endif
+#if PACKETVER >= 20190220
+/*20190220 to latest
+%d개를 초과할 경우 더 이상 설치 할 수 없습니다.
+*/
+ MSG_ID_E00 = 0xe00,
+/*20190220 to latest
+목적지
+*/
+ MSG_ID_E01 = 0xe01,
+#endif
+#if PACKETVER >= 20190313
+/*20190313 to latest
+잠시 후 다시 시도해주세요.
+Please try again in a moment.
+*/
+ MSG_ID_E02 = 0xe02,
+/*20190313 to latest
+등록할 수 없는 파일입니다.
+*/
+ MSG_ID_E03 = 0xe03,
+#endif
+#if PACKETVER >= 20190327
+/*20190327 to latest
+선택 삭제
+*/
+ MSG_ID_E04 = 0xe04,
+/*20190327 to latest
+모두 삭제
+*/
+ MSG_ID_E05 = 0xe05,
+/*20190327 to latest
+[%s]편지함의 모든 메일을 삭제하시겠습니까?
+*/
+ MSG_ID_E06 = 0xe06,
+/*20190327 to latest
+선택 받기
+*/
+ MSG_ID_E07 = 0xe07,
+/*20190327 to latest
+모두 받기
+*/
+ MSG_ID_E08 = 0xe08,
+/*20190327 to latest
+선택한 메일의 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E09 = 0xe09,
+/*20190327 to latest
+[%s]편지함의 모든 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E0A = 0xe0a,
+/*20190327 to latest
+스킬바2
+*/
+ MSG_ID_E0B = 0xe0b,
+/*20190327 to latest
+스킬바 교체
+*/
+ MSG_ID_E0C = 0xe0c,
+#endif
+#if PACKETVER >= 20190403
+/*20190403 to latest
+←
+*/
+ MSG_ID_E0D = 0xe0d,
+/*20190403 to latest
+↑
+*/
+ MSG_ID_E0E = 0xe0e,
+/*20190403 to latest
+→
+*/
+ MSG_ID_E0F = 0xe0f,
+/*20190403 to latest
+↓
+*/
+ MSG_ID_E10 = 0xe10,
+/*20190403 to latest
+▤
+*/
+ MSG_ID_E11 = 0xe11,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E12 = 0xe12,
+/*20190403 to latest
+로딩중에는 창을 닫을 수 없습니다.
+*/
+ MSG_ID_E13 = 0xe13,
+#endif
+#if PACKETVER >= 20190424
+/*20190424 to latest
+리딩 스펠북으로 저장된 마법이 없습니다.
+*/
+ MSG_ID_E14 = 0xe14,
+/*20190424 to latest
+이동 시 사용한 아이템은 재교환이 불가능합니다.
+*/
+ MSG_ID_E15 = 0xe15,
+/*20190424 to latest
+자유이동권을 구매 하였습니다
+*/
+ MSG_ID_E16 = 0xe16,
+/*20190424 to latest
+자유이동권 사용 중, 관련 아이템을 소모하지 않습니다.
+*/
+ MSG_ID_E17 = 0xe17,
+/*20190424 to latest
+적용
+*/
+ MSG_ID_E18 = 0xe18,
+/*20190424 to latest
+중지
+*/
+ MSG_ID_E19 = 0xe19,
+/*20190424 to latest
+자유이동권
+*/
+ MSG_ID_E1A = 0xe1a,
+/*20190424 to latest
+%d시간 이용, %s %d개
+*/
+ MSG_ID_E1B = 0xe1b,
+/*20190424 to latest
+자유이용권 사용중
+*/
+ MSG_ID_E1C = 0xe1c,
+/*20190424 to latest
+특성 스테이터스
+*/
+ MSG_ID_E1D = 0xe1d,
+/*20190424 to latest
+파워 파라메터
+^cc0000물리 공격력, 특성 공격력^ffffff 증가
+*/
+ MSG_ID_E1E = 0xe1e,
+/*20190424 to latest
+스테미나 파라메터
+^cc0000물리 저항력^ffffff 증가
+*/
+ MSG_ID_E1F = 0xe1f,
+/*20190424 to latest
+위즈덤 파라메터
+^cc0000마법 저항력^ffffff 증가
+*/
+ MSG_ID_E20 = 0xe20,
+/*20190424 to latest
+스펠 파라메터
+^cc0000마법 공격력, 마법 공격력^ffffff 증가
+*/
+ MSG_ID_E21 = 0xe21,
+/*20190424 to latest
+컨센트레이션 파라메터
+^cc0000명중률, 회피율, 특성 물리/마법 공격력^ffffff 증가
+*/
+ MSG_ID_E22 = 0xe22,
+/*20190424 to latest
+크리에이티브 파라메터
+^cc0000특성 힐 회복량, 크리티컬 데미지 비율^ffffff 증가
+*/
+ MSG_ID_E23 = 0xe23,
+/*20190424 to latest
+특성 물리 공격력
+*/
+ MSG_ID_E24 = 0xe24,
+/*20190424 to latest
+특성 마법 공격력
+*/
+ MSG_ID_E25 = 0xe25,
+/*20190424 to latest
+물리 저항력
+*/
+ MSG_ID_E26 = 0xe26,
+/*20190424 to latest
+마법 저항력
+*/
+ MSG_ID_E27 = 0xe27,
+/*20190424 to latest
+특성 힐 회복량
+*/
+ MSG_ID_E28 = 0xe28,
+/*20190424 to latest
+크리티컬 데미지 비율
+*/
+ MSG_ID_E29 = 0xe29,
+/*20190424 to latest
+특성 파라메터 레벨업에 사용되는 포인트
+*/
+ MSG_ID_E2A = 0xe2a,
+#endif
+#if PACKETVER >= 20190502
+/*20190502 to latest
+J.Lv
+*/
+ MSG_ID_E2B = 0xe2b,
+/*20190502 to latest
+AP
+*/
+ MSG_ID_E2C = 0xe2c,
+#endif
+#if PACKETVER >= 20190515
+/*20190515 to latest
+영지로 이동
+*/
+ MSG_ID_E2D = 0xe2d,
+/*20190515 to latest
+상업도/방어도 확인
+*/
+ MSG_ID_E2E = 0xe2e,
+/*20190515 to latest
+관리영지 "%s"(으)로 이동하시겠습니까?
+(1회 이동 시 마다 1,000제니가 소모됩니다.
+공성전 시간에는 제니의 소모가 100배로 증가합니다.)
+*/
+ MSG_ID_E2F = 0xe2f,
+/*20190515 to latest
+
+관리영지 "%s"
+
+방어도: %d / %d
+상업도: %d / %d
+*/
+ MSG_ID_E30 = 0xe30,
+/*20190515 to latest
+공성 영지 내에서는 다른 공성 영지로 이동 할 수 없습니다.
+*/
+ MSG_ID_E31 = 0xe31,
+#endif
};
#endif /* MAP_MESSAGES_ZERO_H */
diff --git a/src/map/mob.c b/src/map/mob.c
index 765acafe7..aa938a1e7 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1900,15 +1900,53 @@ static int mob_ai_hard(int tid, int64 tick, int id, intptr_t data)
return 0;
}
+/**
+ * Adds random options of a given options drop group into item.
+ *
+ * @param item : item receiving random options
+ * @param options : Random Option Drop Group to be used
+ */
+static void mob_setdropitem_options(struct item *item, struct optdrop_group *options)
+{
+ nullpo_retv(item);
+ nullpo_retv(options);
+
+ for (int i = 0; i < options->optslot_count; i++) {
+ if (rnd() % 10000 >= options->optslot_rate[i])
+ continue;
+
+ // count avoids a too long loop that would cause lag.
+ // if after option_drop_max_loop full iterations (running through all possibilities)
+ // it still fails to pick one, it'll stop at one random index in the next iteration
+ int count = battle_config.option_drop_max_loop * options->optslot[i].option_count + (rnd() % options->optslot[i].option_count);
+ int idx = 0;
+ while (count > 0 && rnd() % 10000 >= options->optslot[i].options[idx].rate) {
+ idx = (idx + 1) % options->optslot[i].option_count;
+ --count;
+ }
+
+ item->option[i].index = options->optslot[i].options[idx].id;
+
+ int min = options->optslot[i].options[idx].min;
+ int max = options->optslot[i].options[idx].max;
+ item->option[i].value = min + (rnd() % (max - min + 1));
+ }
+}
+
/*==========================================
* Initializes the delay drop structure for mob-dropped items.
*------------------------------------------*/
-static struct item_drop *mob_setdropitem(int nameid, int qty, struct item_data *data)
+static struct item_drop *mob_setdropitem(int nameid, struct optdrop_group *options, int qty, struct item_data *data)
{
struct item_drop *drop = ers_alloc(item_drop_ers, struct item_drop);
drop->item_data.nameid = nameid;
drop->item_data.amount = qty;
drop->item_data.identify = data ? itemdb->isidentified2(data) : itemdb->isidentified(nameid);
+
+ // Set item options [KirieZ]
+ if (options != NULL)
+ mob->setdropitem_options(&drop->item_data, options);
+
drop->showdropeffect = true;
drop->next = NULL;
return drop;
@@ -2196,7 +2234,7 @@ static void mob_damage(struct mob_data *md, struct block_list *src, int damage)
}
if (battle_config.show_mob_info&3)
- clif->charnameack (0, &md->bl);
+ clif->blname_ack(0, &md->bl);
#if PACKETVER >= 20131223
// Resend ZC_NOTIFY_MOVEENTRY to Update the HP
@@ -2521,7 +2559,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
continue;
}
- ditem = mob->setdropitem(md->db->dropitem[i].nameid, 1, it);
+ ditem = mob->setdropitem(md->db->dropitem[i].nameid, md->db->dropitem[i].options, 1, it);
// Official Drop Announce [Jedzkie]
if (mvp_sd != NULL) {
@@ -2538,7 +2576,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
// Ore Discovery [Celest]
if (sd == mvp_sd && pc->checkskill(sd,BS_FINDINGORE) > 0) {
if( (temp = itemdb->chain_item(itemdb->chain_cache[ECC_ORE],&i)) ) {
- ditem = mob->setdropitem(temp, 1, NULL);
+ ditem = mob->setdropitem(temp, NULL, 1, NULL);
mob->item_drop(md, dlist, ditem, 0, i, homkillonly);
}
}
@@ -2546,7 +2584,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
if(sd) {
// process script-granted extra drop bonuses
int itemid = 0;
- for (i = 0; i < ARRAYLENGTH(sd->add_drop) && (sd->add_drop[i].id || sd->add_drop[i].group); i++)
+ for (i = 0; i < ARRAYLENGTH(sd->add_drop) && (sd->add_drop[i].id != 0 || sd->add_drop[i].is_group); i++)
{
if ( sd->add_drop[i].race == -md->class_ ||
( sd->add_drop[i].race > 0 && (
@@ -2568,9 +2606,9 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
if (rnd()%10000 >= drop_rate)
continue;
- itemid = (sd->add_drop[i].id > 0) ? sd->add_drop[i].id : itemdb->chain_item(sd->add_drop[i].group,&drop_rate);
+ itemid = (!sd->add_drop[i].is_group) ? sd->add_drop[i].id : itemdb->chain_item(sd->add_drop[i].id, &drop_rate);
if( itemid )
- mob->item_drop(md, dlist, mob->setdropitem(itemid,1,NULL), 0, drop_rate, homkillonly);
+ mob->item_drop(md, dlist, mob->setdropitem(itemid, NULL, 1, NULL), 0, drop_rate, homkillonly);
}
}
@@ -2629,10 +2667,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
if (!(map->list[m].flag.nomvploot || type&1)) {
/* pose them randomly in the list -- so on 100% drop servers it wont always drop the same item */
- struct {
- int nameid;
- int p;
- } mdrop[MAX_MVP_DROP] = { { 0 } };
+ struct mob_drop mdrop[MAX_MVP_DROP] = { { 0 } };
for (i = 0; i < MAX_MVP_DROP; i++) {
int rpos;
@@ -2644,6 +2679,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
mdrop[rpos].nameid = md->db->mvpitem[i].nameid;
mdrop[rpos].p = md->db->mvpitem[i].p;
+ mdrop[rpos].options = md->db->mvpitem[i].options;
}
for (i = 0; i < MAX_MVP_DROP; i++) {
@@ -2663,6 +2699,8 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
item.nameid = mdrop[i].nameid;
item.identify = itemdb->isidentified2(data);
+ if (mdrop[i].options != NULL)
+ mob->setdropitem_options(&item, mdrop[i].options);
clif->mvp_item(mvp_sd, item.nameid);
log_mvp[0] = item.nameid;
@@ -2796,7 +2834,7 @@ static void mob_revive(struct mob_data *md, unsigned int hp)
skill->unit_move(&md->bl,tick,1);
mob->skill_use(md, tick, MSC_SPAWN);
if (battle_config.show_mob_info&3)
- clif->charnameack (0, &md->bl);
+ clif->blname_ack(0, &md->bl);
}
static int mob_guardian_guildchange(struct mob_data *md)
@@ -2921,7 +2959,7 @@ static int mob_class_change(struct mob_data *md, int class_)
md->target_id = md->attacked_id = 0;
//Need to update name display.
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
status_change_end(&md->bl,SC_KEEPING,INVALID_TIMER);
return 0;
}
@@ -2933,7 +2971,7 @@ static void mob_heal(struct mob_data *md, unsigned int heal)
{
nullpo_retv(md);
if (battle_config.show_mob_info&3)
- clif->charnameack (0, &md->bl);
+ clif->blname_ack(0, &md->bl);
#if PACKETVER >= 20131223
// Resend ZC_NOTIFY_MOVEENTRY to Update the HP
if (battle_config.show_monster_hp_bar)
@@ -3861,6 +3899,212 @@ static inline int mob_parse_dbrow_cap_value(int class_, int min, int max, int va
}
/**
+ * Reads one possible option for a option slot in a option drop group
+ * @param option : Libconfig entry
+ * @param entry : memory db entry for current slot
+ * @param idx : index of entry where this option should be inserted at
+ * @param calc_rate : if rates should be recalculated after reading all entries
+ * @param slot : option group slot being read (for messages)
+ * @param group : option group being read (for messages)
+ * @return true if it successfully read the entry, false otherwise
+ */
+static bool mob_read_optdrops_option(struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group)
+{
+ nullpo_retr(false, option);
+ nullpo_retr(false, entry);
+ nullpo_retr(false, idx);
+ nullpo_retr(false, calc_rate);
+ nullpo_retr(false, group);
+
+ const char *name = config_setting_name(option);
+ int opt_id;
+
+ if (strncmp(name, "Rate", 4) == 0)
+ return true;
+
+ if (script->get_constant(name, &opt_id) == false) {
+ ShowWarning("mob_read_optdrops_option: Invalid option \"%s\" for option slot %d of %s group, skipping.\n", name, slot, group);
+ return false;
+ }
+
+ int min = 0, max = 0, opt_rate = 0;
+ if (config_setting_is_number(option)) {
+ // OptionName: value
+ min = libconfig->setting_get_int(option);
+ } else if (config_setting_is_array(option)) {
+ // OptionName: [min, max]
+ // OptionName: [min, max, rate]
+ int slen = libconfig->setting_length(option);
+
+ if (slen >= 2) {
+ // [min, max,...]
+ min = libconfig->setting_get_int_elem(option, 0);
+ max = libconfig->setting_get_int_elem(option, 1);
+ }
+
+ if (slen == 3) {
+ // [min, max, rate]
+ opt_rate = libconfig->setting_get_int_elem(option, 2);
+ }
+ } else {
+ ShowWarning("mob_read_optdrops_option: Invalid value \"%s\" for option slot %d of %s group, skipping.\n", name, slot, group);
+ return false;
+ }
+
+ if (max < min)
+ max = min;
+
+ entry->options[*idx].id = opt_id;
+ entry->options[*idx].min = min;
+ entry->options[*idx].max = max;
+ entry->options[*idx].rate = opt_rate;
+
+ if (entry->options[*idx].rate == 0)
+ *calc_rate = true;
+
+ (*idx)++;
+
+ return true;
+}
+
+/**
+ * Reads the settings for one random option slot of a random option drop group.
+ * @param optslot : The slot entry from config file
+ * @param n : slot index
+ * @param group_id : Group index
+ * @param group : group name (used in messages)
+ * @return true if it succesfully read, false otherwise
+ */
+static bool mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group)
+{
+ nullpo_retr(false, optslot);
+ nullpo_retr(false, group);
+ Assert_retr(false, group_id >= 0 && group_id < mob->opt_drop_groups_count);
+ Assert_retr(false, n >= 0 && n < MAX_ITEM_OPTIONS);
+
+ // Structure:
+ // {
+ // Rate: chance of option 1 (int)
+ // OptionName1: value
+ // OptionName2: [min, max]
+ // OptionName3: [min, max, rate]
+ // ....
+ // }
+
+ int drop_rate; // The rate for this option to be dropped (Rate field)
+ if (libconfig->setting_lookup_int(optslot, "Rate", &drop_rate) == CONFIG_FALSE) {
+ ShowWarning("mob_read_optdrops_optslot: Missing option %d rate in group %s, skipping.\n", n, group);
+ return false;
+ }
+
+ int count = libconfig->setting_length(optslot);
+ if (count <= 1) { // 1 = Rate
+ ShowWarning("mob_read_optdrops_optslot: Option %d of %s group doesn't contain any possible options, skipping.\n", n, group);
+ return false;
+ }
+
+ struct optdrop_group_optslot *entry = &(mob->opt_drop_groups[group_id].optslot[n]);
+ entry->options = aCalloc(sizeof(struct optdrop_group_option), count);
+
+ int idx = 0;
+ int i = 0;
+ struct config_setting_t *opt = NULL;
+ bool calc_rate = false;
+ while (i < count && (opt = libconfig->setting_get_elem(optslot, i)) != NULL) {
+ ++i;
+ mob->read_optdrops_option(opt, entry, &idx, &calc_rate, n, group);
+ }
+ entry->option_count = idx;
+ mob->opt_drop_groups[group_id].optslot_count++;
+ mob->opt_drop_groups[group_id].optslot_rate[n] = drop_rate;
+
+ // If there're empty rates, calculate them
+ if (calc_rate == true) {
+ for (int j = 0; j < idx; ++j) {
+ if (entry->options[j].rate == 0)
+ entry->options[j].rate = 10000 / idx;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Reads one random option drop group.
+ * @param group : Drop Group entry from config file
+ * @param n : group index
+ * @return true if it successfuly read, false otherwise
+ */
+static bool mob_read_optdrops_group(struct config_setting_t *group, int n)
+{
+ /* Structure:
+ <Group Name>: (
+ { <Option 1 drop data> },
+ { <Option 2 drop data> },
+ ... // Up to MAX_ITEM_OPTIONS
+ )
+ */
+ nullpo_retr(false, group);
+
+ const char *group_name = config_setting_name(group);
+
+ if (group_name == NULL || *group_name == '\0') {
+ ShowWarning("mob_read_optdrops_group: Invalid name for random option drop group, skipping group %d...\n", n);
+ return false;
+ }
+
+ script->set_constant2(group_name, n, false, false);
+
+ int i = 0;
+ struct config_setting_t *drop_data = NULL;
+ while (i < MAX_ITEM_OPTIONS && (drop_data = libconfig->setting_get_elem(group, i)) != NULL) {
+ mob->read_optdrops_optslot(drop_data, i, n, group_name);
+ i++;
+ }
+
+ return true;
+}
+
+/**
+ * Reads random option drop groups database.
+ */
+static bool mob_read_optdrops_db(void)
+{
+ const char *filename = "option_drop_groups.conf"; // FIXME hardcoded name
+
+ char filepath[256];
+ safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename);
+
+ struct config_t option_groups;
+ if (libconfig->load_file(&option_groups, filepath) == CONFIG_FALSE) {
+ ShowError("Failed to load option drop groups\n");
+ return false;
+ }
+
+ struct config_setting_t *its = libconfig->lookup(&option_groups, "option_drop_group_db");
+ struct config_setting_t *groups = NULL;
+
+ int i = 0;
+ if (its != NULL && (groups = libconfig->setting_get_elem(its, 0)) != NULL) {
+ int count = libconfig->setting_length(groups);
+ mob->opt_drop_groups = aCalloc(sizeof(struct optdrop_group), count);
+ mob->opt_drop_groups_count = count; // maximum size (used by assertions)
+
+ struct config_setting_t *group = NULL;
+ while ((group = libconfig->setting_get_elem(groups, i)) != NULL) {
+ mob->read_optdrops_group(group, i);
+ i++;
+ }
+ mob->opt_drop_groups_count = i; // number of entries used (should be the same amount)
+ }
+
+ libconfig->destroy(&option_groups);
+
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, filepath);
+ return true;
+}
+
+/**
* Processes the stats for a mob database entry.
*
* @param[in,out] entry The destination mob_db entry, already initialized
@@ -3941,6 +4185,51 @@ static uint32 mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t
}
/**
+ * Process an entry of mob/mvp drops that contains a random option drop group.
+ *
+ * @param entry : mob db entry being read (used in error messages)
+ * @param item_name : AegisName of the item in this entry (used in error messages)
+ * @param drop : drop data entry
+ * @param drop_rate : used to return the entry drop_rate
+ * @returns a reference to the opt_drop_group to be used when creating this item drop
+ */
+static struct optdrop_group *mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate)
+{
+ nullpo_retr(NULL, entry);
+ nullpo_retr(NULL, item_name);
+ nullpo_retr(NULL, drop);
+ nullpo_retr(NULL, drop_rate);
+
+ // (Drop Rate, "Option Group")
+ if (!config_setting_is_list(drop) || config_setting_length(drop) != 2) {
+ ShowError("mob_read_db_optdrops: Invalid format for option drop group on item \"%s\" in monster %d, skipping.\n", item_name, entry->mob_id);
+ return NULL;
+ }
+
+ int i32;
+ if (mob->get_const(libconfig->setting_get_elem(drop, 0), &i32) && i32 >= 0)
+ *drop_rate = i32;
+
+ const char *group_name = libconfig->setting_get_string_elem(drop, 1);
+ if (group_name == NULL || *group_name == '\0') {
+ ShowError("mob_read_db_optdrops: Missing option drop group name on item \"%s\" in monster %d, skipping.\n", item_name, entry->mob_id);
+ return NULL;
+ }
+
+ int opt_id;
+ if (script->get_constant(group_name, &opt_id) == false) {
+ ShowError("mob_read_db_optdrops: Invalid option drop group \"%s\" on item \"%s\" in monster %d, does this group really exists? Skipping...\n", group_name, item_name, entry->mob_id);
+ return NULL;
+ }
+ if (opt_id < 0 || opt_id >= mob->opt_drop_groups_count) {
+ ShowError("mob_read_db_optdrops: Invalid option drop group \"%s\" index \"%d\" on item \"%s\" in monster %d, does this group really exists? Skipping...\n", group_name, opt_id, item_name, entry->mob_id);
+ return NULL;
+ }
+
+ return &mob->opt_drop_groups[opt_id];
+}
+
+/**
* Processes the MVP drops for a mob_db entry.
*
* @param[in,out] entry The destination mob_db entry, already initialized
@@ -3965,9 +4254,18 @@ static void mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting
i++;
continue;
}
- if (mob->get_const(drop, &i32) && i32 >= 0) {
- value = i32;
+
+ struct optdrop_group *drop_option = NULL;
+ if (config_setting_is_number(drop)) {
+ // Setting is a number, item doesn't contain options
+ if (mob->get_const(drop, &i32) && i32 >= 0) {
+ value = i32;
+ }
+ } else {
+ // (Drop Rate, "Opt Drop Group")
+ drop_option = mob->read_db_drops_option(entry, name, drop, &value);
}
+
if (value <= 0) {
ShowWarning("mob_read_db: wrong drop chance %d for mvp drop item %s in monster %d\n", value, name, entry->mob_id);
i++;
@@ -3981,6 +4279,7 @@ static void mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting
}
mob->item_dropratio_adjust(entry->mvpitem[idx].nameid, entry->mob_id, &rate_adjust);
entry->mvpitem[idx].p = mob->drop_adjust(value, rate_adjust, battle_config.item_drop_mvp_min, battle_config.item_drop_mvp_max);
+ entry->mvpitem[idx].options = drop_option;
//calculate and store Max available drop chance of the MVP item
if (entry->mvpitem[idx].p) {
@@ -4024,9 +4323,18 @@ static void mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t
i++;
continue;
}
- if (mob->get_const(drop, &i32) && i32 >= 0) {
- value = i32;
+
+ struct optdrop_group *drop_option = NULL;
+ if (config_setting_is_number(drop)) {
+ // Setting is a number, item doesn't contain options
+ if (mob->get_const(drop, &i32) && i32 >= 0) {
+ value = i32;
+ }
+ } else {
+ // (Drop Rate, "Opt Drop Group")
+ drop_option = mob->read_db_drops_option(entry, name, drop, &value);
}
+
if (value <= 0) {
ShowWarning("mob_read_db: wrong drop chance %d for drop item %s in monster %d\n", value, name, entry->mob_id);
i++;
@@ -4034,6 +4342,7 @@ static void mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t
}
entry->dropitem[idx].nameid = id->nameid;
+ entry->dropitem[idx].options = drop_option;
if (!entry->dropitem[idx].nameid) {
entry->dropitem[idx].p = 0; //No drop.
i++;
@@ -4301,6 +4610,8 @@ static int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *sou
* }
* Drops: {
* AegisName: chance
+ * // or
+ * AegisName: (chance, "Option Drop Group")
* ...
* }
*/
@@ -5213,6 +5524,7 @@ static void mob_load(bool minimal)
return;
}
sv->readdb(map->db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, mob->readdb_itemratio); // must be read before mobdb
+ mob->read_optdrops_db();
mob->readchatdb();
mob->readdb();
mob->readskilldb();
@@ -5254,6 +5566,8 @@ static void mob_reload(void)
}
mob->item_drop_ratio_other_db->clear(mob->item_drop_ratio_other_db, mob->final_ratio_sub);
+ mob->destroy_drop_groups();
+
mob->load(false);
}
@@ -5309,6 +5623,22 @@ static void mob_destroy_mob_db(int index)
mob->db_data[index] = NULL;
}
+/**
+ * Unloads option drop group database
+ */
+static void mob_destroy_drop_groups(void)
+{
+ for (int i = 0; i < mob->opt_drop_groups_count; i++) {
+ struct optdrop_group *group = &mob->opt_drop_groups[i];
+
+ for (int j = 0; j < group->optslot_count; j++) {
+ aFree(group->optslot[j].options);
+ }
+ }
+
+ aFree(mob->opt_drop_groups);
+}
+
/*==========================================
* Clean memory usage.
*------------------------------------------*/
@@ -5327,6 +5657,7 @@ static int do_final_mob(void)
mob->destroy_mob_db(i);
}
}
+ mob->destroy_drop_groups();
for (i = 0; i <= MAX_MOB_CHAT; i++)
{
if (mob->chat_db[i] != NULL)
@@ -5443,6 +5774,7 @@ void mob_defaults(void)
mob->ai_sub_lazy = mob_ai_sub_lazy;
mob->ai_lazy = mob_ai_lazy;
mob->ai_hard = mob_ai_hard;
+ mob->setdropitem_options = mob_setdropitem_options;
mob->setdropitem = mob_setdropitem;
mob->setlootitem = mob_setlootitem;
mob->delay_item_drop = mob_delay_item_drop;
@@ -5476,6 +5808,10 @@ void mob_defaults(void)
mob->clone_delete = mob_clone_delete;
mob->drop_adjust = mob_drop_adjust;
mob->item_dropratio_adjust = item_dropratio_adjust;
+ mob->read_optdrops_option = mob_read_optdrops_option;
+ mob->read_optdrops_optslot = mob_read_optdrops_optslot;
+ mob->read_optdrops_group = mob_read_optdrops_group;
+ mob->read_optdrops_db = mob_read_optdrops_db;
mob->lookup_const = mob_lookup_const;
mob->get_const = mob_get_const;
mob->db_validate_entry = mob_db_validate_entry;
@@ -5486,6 +5822,7 @@ void mob_defaults(void)
mob->read_db_drops_sub = mob_read_db_drops_sub;
mob->read_db_mvpdrops_sub = mob_read_db_mvpdrops_sub;
mob->read_db_mode_sub = mob_read_db_mode_sub;
+ mob->read_db_drops_option = mob_read_db_drops_option;
mob->read_db_stats_sub = mob_read_db_stats_sub;
mob->name_constants = mob_name_constants;
mob->readdb_mobavail = mob_readdb_mobavail;
@@ -5501,6 +5838,7 @@ void mob_defaults(void)
mob->final_ratio_sub = mob_final_ratio_sub;
mob->clear_spawninfo = mob_clear_spawninfo;
mob->destroy_mob_db = mob_destroy_mob_db;
+ mob->destroy_drop_groups = mob_destroy_drop_groups;
mob->skill_db_libconfig = mob_skill_db_libconfig;
mob->skill_db_libconfig_sub = mob_skill_db_libconfig_sub;
mob->skill_db_libconfig_sub_skill = mob_skill_db_libconfig_sub_skill;
diff --git a/src/map/mob.h b/src/map/mob.h
index 4cb3877ed..b63efd272 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -152,6 +152,45 @@ struct spawn_info {
unsigned short qty;
};
+/**
+ * Information of one possible option that will fill
+ * an option slot (see optdrop_group_optslot)
+ */
+struct optdrop_group_option {
+ int id; //< Option ID
+ int min; //< Minimun value when this option drops
+ int max; //< Maximun value when this option drops
+ int rate; //< Chance of dropping this option
+};
+
+/**
+ * Information of possible options that will fill
+ * one option slot
+ */
+struct optdrop_group_optslot {
+ int option_count; //< Number of options in *options
+ struct optdrop_group_option *options; //< Array of possible options
+};
+
+/**
+ * A group of options to be random picked when
+ * dropping an item
+ */
+struct optdrop_group {
+ int optslot_count; //< How many option slots are configured by this group
+ int optslot_rate[MAX_ITEM_OPTIONS]; //< The rate to fill each of the configured slots
+ struct optdrop_group_optslot optslot[MAX_ITEM_OPTIONS]; //< Details of the options that will go in each slot
+};
+
+/**
+ * Stores data related to a monster drop (normal or mvp drop)
+ */
+struct mob_drop {
+ int nameid; //< Item ID
+ int p; //< Drop chance
+ struct optdrop_group *options; //< Option Drop Group associated with this drop (NULL if none)
+};
+
struct mob_db {
int mob_id;
char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH];
@@ -160,8 +199,8 @@ struct mob_db {
short range2,range3;
short race2; // celest
unsigned short lv;
- struct { int nameid,p; } dropitem[MAX_MOB_DROP];
- struct { int nameid,p; } mvpitem[MAX_MVP_DROP];
+ struct mob_drop dropitem[MAX_MOB_DROP];
+ struct mob_drop mvpitem[MAX_MVP_DROP];
struct status_data status;
struct view_data vd;
unsigned int option;
@@ -208,7 +247,7 @@ struct mob_data {
struct spawn_data *spawn; //Spawn data.
int spawn_timer; //Required for Convex Mirror
struct item *lootitem;
- short class_;
+ int class_;
unsigned int tdmg; //Stores total damage given to the mob, for exp calculations. [Skotlex]
int level;
int target_id,attacked_id;
@@ -436,6 +475,9 @@ struct mob_interface {
struct mob_db *dummy; //Dummy mob to be returned when a non-existant one is requested.
// Dynamic mob chat database
struct mob_chat *chat_db[MAX_MOB_CHAT + 1];
+ // Random Option Drop groups
+ struct optdrop_group *opt_drop_groups;
+ int opt_drop_groups_count;
// Defines the Manuk/Splendide/Mora mob groups for the status reductions [Epoque & Frost]
int manuk[8];
int splendide[5];
@@ -494,7 +536,8 @@ struct mob_interface {
int (*ai_sub_lazy) (struct mob_data *md, va_list args);
int (*ai_lazy) (int tid, int64 tick, int id, intptr_t data);
int (*ai_hard) (int tid, int64 tick, int id, intptr_t data);
- struct item_drop* (*setdropitem) (int nameid, int qty, struct item_data *data);
+ void (*setdropitem_options) (struct item *item, struct optdrop_group *options);
+ struct item_drop* (*setdropitem) (int nameid, struct optdrop_group *options, int qty, struct item_data *data);
struct item_drop* (*setlootitem) (struct item *item);
int (*delay_item_drop) (int tid, int64 tick, int id, intptr_t data);
void (*item_drop) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag);
@@ -527,6 +570,10 @@ struct mob_interface {
int (*clone_delete) (struct mob_data *md);
unsigned int (*drop_adjust) (int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max);
void (*item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust);
+ bool (*read_optdrops_option) (struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group);
+ bool (*read_optdrops_optslot) (struct config_setting_t *optslot, int n, int group_id, const char *group);
+ bool (*read_optdrops_group) (struct config_setting_t *group, int n);
+ bool (*read_optdrops_db) (void);
void (*readdb) (void);
bool (*lookup_const) (const struct config_setting_t *it, const char *name, int *value);
bool (*get_const) (const struct config_setting_t *it, int *value);
@@ -537,6 +584,7 @@ struct mob_interface {
void (*read_db_drops_sub) (struct mob_db *entry, struct config_setting_t *t);
void (*read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t);
uint32 (*read_db_mode_sub) (struct mob_db *entry, struct config_setting_t *t);
+ struct optdrop_group *(*read_db_drops_option) (struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
void (*read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t);
void (*name_constants) (void);
bool (*readdb_mobavail) (char *str[], int columns, int current);
@@ -552,6 +600,7 @@ struct mob_interface {
void (*set_item_drop_ratio) (int nameid, struct item_drop_ratio *ratio);
int (*final_ratio_sub) (union DBKey key, struct DBData *data, va_list ap);
void (*destroy_mob_db) (int index);
+ void (*destroy_drop_groups) (void);
bool (*skill_db_libconfig) (const char *filename, bool ignore_missing);
bool (*skill_db_libconfig_sub) (struct config_setting_t *it, int n);
bool (*skill_db_libconfig_sub_skill) (struct config_setting_t *it, int n, int mob_id);
diff --git a/src/map/npc.c b/src/map/npc.c
index fa277f382..c7fc7e133 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -36,6 +36,7 @@
#include "map/mob.h"
#include "map/pc.h"
#include "map/pet.h"
+#include "map/quest.h"
#include "map/script.h"
#include "map/skill.h"
#include "map/status.h"
@@ -1449,11 +1450,12 @@ static int npc_cashshop_buylist(struct map_session_data *sd, int points, struct
return ERROR_TYPE_NPC;
if( nd->subtype != CASHSHOP ) {
- if( nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET ) {
+ if (nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) {
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
- } else
+ } else {
return ERROR_TYPE_NPC;
+ }
} else {
shop = nd->u.shop.shop_item;
shop_size = nd->u.shop.count;
@@ -1584,11 +1586,11 @@ static void npc_market_fromsql(void)
if( !(nd = npc->name2id(name)) ) {
ShowError("npc_market_fromsql: NPC '%s' not found! skipping...\n",name);
- npc->market_delfromsql_sub(name, USHRT_MAX);
+ npc->market_delfromsql_sub(name, INT_MAX);
continue;
- } else if ( nd->subtype != SCRIPT || !nd->u.scr.shop || !nd->u.scr.shop->items || nd->u.scr.shop->type != NST_MARKET ) {
+ } else if (nd->subtype != SCRIPT || !nd->u.scr.shop || !nd->u.scr.shop->items || nd->u.scr.shop->type != NST_MARKET) {
ShowError("npc_market_fromsql: NPC '%s' is not proper for market, skipping...\n",name);
- npc->market_delfromsql_sub(name, USHRT_MAX);
+ npc->market_delfromsql_sub(name, INT_MAX);
continue;
}
@@ -1610,10 +1612,10 @@ static void npc_market_fromsql(void)
/**
* Saves persistent NPC Market Data into SQL
**/
-static void npc_market_tosql(struct npc_data *nd, unsigned short index)
+static void npc_market_tosql(struct npc_data *nd, int index)
{
nullpo_retv(nd);
- Assert_retv(index < nd->u.scr.shop->items);
+ Assert_retv(index >= 0 && index < nd->u.scr.shop->items);
if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s','%d','%u')",
map->npc_market_data_db, nd->exname, nd->u.scr.shop->item[index].nameid, nd->u.scr.shop->item[index].qty))
Sql_ShowDebug(map->mysql_handle);
@@ -1621,9 +1623,9 @@ static void npc_market_tosql(struct npc_data *nd, unsigned short index)
/**
* Removes persistent NPC Market Data from SQL
*/
-static void npc_market_delfromsql_sub(const char *npcname, unsigned short index)
+static void npc_market_delfromsql_sub(const char *npcname, int index)
{
- if( index == USHRT_MAX ) {
+ if (index == INT_MAX ) {
if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `name`='%s'", map->npc_market_data_db, npcname) )
Sql_ShowDebug(map->mysql_handle);
} else {
@@ -1635,12 +1637,115 @@ static void npc_market_delfromsql_sub(const char *npcname, unsigned short index)
/**
* Removes persistent NPC Market Data from SQL
**/
-static void npc_market_delfromsql(struct npc_data *nd, unsigned short index)
+static void npc_market_delfromsql(struct npc_data *nd, int index)
+{
+ nullpo_retv(nd);
+ Assert_retv(index == INT_MAX || (index >= 0 && index < nd->u.scr.shop->items));
+ npc->market_delfromsql_sub(nd->exname, index == INT_MAX ? index : nd->u.scr.shop->item[index].nameid);
+}
+
+/**
+ * Loads persistent NPC Barter Data from SQL
+ **/
+static void npc_barter_fromsql(void)
+{
+ struct SqlStmt *stmt = SQL->StmtMalloc(map->mysql_handle);
+ char name[NAME_LENGTH + 1];
+ int itemid;
+ int amount;
+ int removeId;
+ int removeAmount;
+
+ if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemId`, `amount`, `priceId`, `priceAmount` FROM `%s`", map->npc_barter_data_db)
+ || SQL_ERROR == SQL->StmtExecute(stmt)
+ ) {
+ SqlStmt_ShowDebug(stmt);
+ SQL->StmtFree(stmt);
+ return;
+ }
+
+ SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name, sizeof name, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, sizeof itemid, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 2, SQLDT_UINT32, &amount, sizeof amount, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 3, SQLDT_INT, &removeId, sizeof removeId, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &removeAmount, sizeof removeAmount, NULL, NULL);
+
+ while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) {
+ struct npc_data *nd = NULL;
+ unsigned short i;
+
+ if (!(nd = npc->name2id(name))) {
+ ShowError("npc_barter_fromsql: NPC '%s' not found! skipping...\n",name);
+ npc->barter_delfromsql_sub(name, INT_MAX, 0, 0);
+ continue;
+ } else if (nd->subtype != SCRIPT || !nd->u.scr.shop || !nd->u.scr.shop->items || nd->u.scr.shop->type != NST_BARTER) {
+ ShowError("npc_barter_fromsql: NPC '%s' is not proper for barter, skipping...\n",name);
+ npc->barter_delfromsql_sub(name, INT_MAX, 0, 0);
+ continue;
+ }
+
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ struct npc_item_list *const item = &nd->u.scr.shop->item[i];
+ if (item->nameid == itemid && item->value == removeId && item->value2 == removeAmount) {
+ item->qty = amount;
+ break;
+ }
+ }
+
+ if (i == nd->u.scr.shop->items) {
+ ShowError("npc_barter_fromsql: NPC '%s' does not sell item %d (qty %d), deleting...\n", name, itemid, amount);
+ npc->barter_delfromsql_sub(name, itemid, removeId, removeAmount);
+ continue;
+ }
+ }
+ SQL->StmtFree(stmt);
+}
+
+/**
+ * Saves persistent NPC Barter Data into SQL
+ **/
+static void npc_barter_tosql(struct npc_data *nd, int index)
{
nullpo_retv(nd);
- Assert_retv(index == USHRT_MAX || index < nd->u.scr.shop->items);
- npc->market_delfromsql_sub(nd->exname, index == USHRT_MAX ? index : nd->u.scr.shop->item[index].nameid);
+ Assert_retv(index >= 0 && index < nd->u.scr.shop->items);
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[index];
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s', '%d', '%u', '%u', '%d')",
+ map->npc_barter_data_db, nd->exname, item->nameid, item->qty, item->value, item->value2)) {
+ Sql_ShowDebug(map->mysql_handle);
+ }
}
+
+/**
+ * Removes persistent NPC Barter Data from SQL
+ */
+static void npc_barter_delfromsql_sub(const char *npcname, int itemId, int itemId2, int amount2)
+{
+ if (itemId == INT_MAX) {
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `name`='%s'", map->npc_barter_data_db, npcname))
+ Sql_ShowDebug(map->mysql_handle);
+ } else {
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `name`='%s' AND `itemId`='%d' AND `priceId`='%d' AND `priceAmount`='%d' LIMIT 1",
+ map->npc_barter_data_db, npcname, itemId, itemId2, amount2)) {
+ Sql_ShowDebug(map->mysql_handle);
+ }
+ }
+}
+
+/**
+ * Removes persistent NPC Barter Data from SQL
+ **/
+static void npc_barter_delfromsql(struct npc_data *nd, int index)
+{
+ nullpo_retv(nd);
+ if (index == INT_MAX) {
+ npc->barter_delfromsql_sub(nd->exname, INT_MAX, 0, 0);
+ } else {
+ Assert_retv(index >= 0 && index < nd->u.scr.shop->items);
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[index];
+ npc->barter_delfromsql_sub(nd->exname, item->nameid, item->value, item->value2);
+ }
+}
+
/**
* Judges whether to allow and spawn a trader's window.
**/
@@ -1673,6 +1778,9 @@ static bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd)
clif->npc_market_open(sd,nd);
}
break;
+ case NST_BARTER:
+ clif->npc_barter_open(sd, nd);
+ break;
default:
clif->cashshop_show(sd,nd);
break;
@@ -1799,11 +1907,12 @@ static int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount,
return ERROR_TYPE_ITEM_ID; // Invalid Item
if( nd->subtype != CASHSHOP ) {
- if( nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET ) {
+ if (nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) {
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
- } else
+ } else {
return ERROR_TYPE_NPC;
+ }
} else {
shop = nd->u.shop.shop_item;
shop_size = nd->u.shop.count;
@@ -1948,7 +2057,11 @@ static int npc_buylist(struct map_session_data *sd, struct itemlist *item_list)
break;
case ADDITEM_OVERAMOUNT:
+#if PACKETVER >= 20110705
+ return 9;
+#else
return 2;
+#endif
}
value = pc->modifybuyvalue(sd,value);
@@ -2108,6 +2221,133 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
return 0;
}
+/**
+ * Processes incoming npc barter purchase list
+ **/
+static int npc_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list)
+{
+ struct npc_data* nd;
+ struct npc_item_list *shop = NULL;
+ int w, new_;
+ unsigned short shop_size = 0;
+
+ nullpo_retr(1, sd);
+ nullpo_retr(1, item_list);
+
+ nd = npc->checknear(sd, map->id2bl(sd->npc_shopid));
+
+ if (nd == NULL || nd->subtype != SCRIPT || VECTOR_LENGTH(*item_list) == 0 || !nd->u.scr.shop || nd->u.scr.shop->type != NST_BARTER)
+ return 11;
+
+ shop = nd->u.scr.shop->item;
+ shop_size = nd->u.scr.shop->items;
+
+ w = 0;
+ new_ = 0;
+
+ int items[MAX_INVENTORY] = { 0 };
+
+ // process entries in buy list, one by one
+ for (int i = 0; i < VECTOR_LENGTH(*item_list); ++i) {
+ struct barter_itemlist_entry *entry = &VECTOR_INDEX(*item_list, i);
+
+ const int n = entry->removeIndex;
+ if (n < 0 || n >= sd->status.inventorySize)
+ return 11; // wrong inventory index
+
+ int removeId = sd->status.inventory[n].nameid;
+ const int j = entry->shopIndex;
+ if (j < 0 || j >= shop_size)
+ return 13; // no such item in shop
+ if (entry->addId != shop[j].nameid && entry->addId != itemdb_viewid(shop[j].nameid))
+ return 13; // no such item in shop
+ if (removeId != shop[j].value && removeId != itemdb_viewid(shop[j].value))
+ return 13; // no such item in shop
+ entry->addId = shop[j].nameid; // item_avail replacement
+ removeId = shop[j].value; // item_avail replacement
+
+ if (!itemdb->exists(entry->addId))
+ return 13; // item no longer in itemdb
+
+ const int removeAmount = shop[j].value2;
+
+ if ((int)shop[j].qty != -1 && entry->addAmount > (int)shop[j].qty)
+ return 14; // not enough item amount in shop
+
+ if (removeAmount * entry->addAmount > sd->status.inventory[n].amount)
+ return 14; // not enough item amount in inventory
+
+ items[n] += removeAmount * entry->addAmount;
+
+ if (items[n] > sd->status.inventory[n].amount)
+ return 14; // not enough item amount in inventory
+
+ entry->addId = shop[j].nameid; //item_avail replacement
+
+ npc_market_qty[i] = j;
+
+ if (!itemdb->isstackable(entry->addId) && entry->addAmount > 1) {
+ //Exploit? You can't buy more than 1 of equipment types o.O
+ ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n",
+ sd->status.name, sd->status.account_id, sd->status.char_id, entry->addAmount, entry->addId);
+ entry->addAmount = 1;
+ }
+
+ switch (pc->checkadditem(sd, entry->addId, entry->addAmount)) {
+ case ADDITEM_EXIST:
+ break;
+ case ADDITEM_NEW:
+ new_++;
+ break;
+ case ADDITEM_OVERAMOUNT: /* TODO find official response for this */
+ return 1;
+ }
+
+ w += itemdb_weight(entry->addId) * entry->addAmount;
+ w -= itemdb_weight(removeId) * removeAmount;
+ }
+
+ if (w + sd->weight > sd->max_weight)
+ return 2; // Too heavy
+
+ if (pc->inventoryblank(sd) < new_)
+ return 3; // Not enough space to store items
+
+ for (int i = 0; i < sd->status.inventorySize; ++i) {
+ const int removeAmountTotal = items[i];
+ if (removeAmountTotal == 0)
+ continue;
+ if (pc->delitem(sd, i, removeAmountTotal, 0, DELITEM_SOLD, LOG_TYPE_NPC) != 0) {
+ return 11; // unknown exploit
+ }
+ }
+
+ for (int i = 0; i < VECTOR_LENGTH(*item_list); ++i) {
+ struct barter_itemlist_entry *entry = &VECTOR_INDEX(*item_list, i);
+ const int shopIdx = npc_market_qty[i];
+
+ if ((int)shop[shopIdx].qty != -1) {
+ if (entry->addAmount > (int)shop[shopIdx].qty) /* wohoo someone tampered with the packet. */
+ return 14;
+ shop[shopIdx].qty -= entry->addAmount;
+ }
+
+ npc->barter_tosql(nd, shopIdx);
+
+ if (itemdb_type(entry->addId) == IT_PETEGG) {
+ pet->create_egg(sd, entry->addId);
+ } else {
+ struct item item_tmp;
+ memset(&item_tmp, 0, sizeof(item_tmp));
+ item_tmp.nameid = entry->addId;
+ item_tmp.identify = 1;
+ pc->additem(sd, &item_tmp, entry->addAmount, LOG_TYPE_NPC);
+ }
+ }
+
+ return 12;
+}
+
/// npc_selllist for script-controlled shops
static int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd)
{
@@ -2231,7 +2471,7 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list)
struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i);
int nameid, value, idx = entry->id;
- if (idx >= MAX_INVENTORY || idx < 0 || entry->amount < 0) {
+ if (idx >= sd->status.inventorySize || idx < 0 || entry->amount < 0) {
return 1;
}
@@ -2399,8 +2639,9 @@ static int npc_unload(struct npc_data *nd, bool single)
nd->path = NULL;
}
- if( single && nd->bl.m != -1 )
- map->remove_questinfo(nd->bl.m,nd);
+ if (single && nd->bl.m != -1)
+ map->remove_questinfo(nd->bl.m, nd);
+ npc->questinfo_clear(nd);
if (nd->src_id == 0 && ( nd->subtype == SHOP || nd->subtype == CASHSHOP)) {
//src check for duplicate shops [Orcao]
@@ -2722,7 +2963,7 @@ static bool npc_viewisid(const char *viewid)
* @param class_ The NPC view class.
* @return A pointer to the created NPC data (ownership passed to the caller).
*/
-static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_)
+static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_)
{
struct npc_data *nd;
@@ -2739,6 +2980,7 @@ static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, i
nd->class_ = class_;
nd->speed = 200;
nd->vd = npc_viewdb[0]; // Copy INVISIBLE_CLASS view data. Actual view data is set by npc->add_to_location() later.
+ VECTOR_INIT(nd->qi_data);
return nd;
}
@@ -3672,14 +3914,14 @@ static void npc_setdisplayname(struct npc_data *nd, const char *newname)
safestrncpy(nd->name, newname, sizeof(nd->name));
if( map->list[nd->bl.m].users )
- clif->charnameack(0, &nd->bl);
+ clif->blname_ack(0, &nd->bl);
}
/// Changes the display class of the npc.
///
/// @param nd Target npc
/// @param class_ New display class
-static void npc_setclass(struct npc_data *nd, short class_)
+static void npc_setclass(struct npc_data *nd, int class_)
{
nullpo_retv(nd);
@@ -3960,7 +4202,7 @@ static const char *npc_parse_mob(const char *w1, const char *w2, const char *w3,
mobspawn.num = (unsigned short)num;
mobspawn.active = 0;
- mobspawn.class_ = (short) class_;
+ mobspawn.class_ = class_;
mobspawn.x = (unsigned short)x;
mobspawn.y = (unsigned short)y;
mobspawn.xs = (signed short)xs;
@@ -4997,6 +5239,7 @@ static int npc_reload(void)
// OnInit -> OnInterIfInit -> OnInterIfInitOnce -> OnAgitInit -> OnAgitInit2
npc->event_do_oninit( true );
npc->market_fromsql();
+ npc->barter_fromsql();
// Execute rest of the startup events if connected to char-server. [Lance]
// Executed when connection is established with char-server in chrif_connectack
if( !intif->CheckForCharServer() ) {
@@ -5095,6 +5338,18 @@ static void npc_debug_warps(void)
npc->debug_warps_sub(map->list[m].npc[i]);
}
+static void npc_questinfo_clear(struct npc_data *nd)
+{
+ nullpo_retv(nd);
+
+ for (int i = 0; i < VECTOR_LENGTH(nd->qi_data); i++) {
+ struct questinfo *qi = &VECTOR_INDEX(nd->qi_data, i);
+ VECTOR_CLEAR(qi->items);
+ VECTOR_CLEAR(qi->quest_requirement);
+ }
+ VECTOR_CLEAR(nd->qi_data);
+}
+
/*==========================================
* npc initialization
*------------------------------------------*/
@@ -5303,11 +5558,17 @@ void npc_defaults(void)
npc->trader_pay = npc_trader_pay;
npc->trader_update = npc_trader_update;
npc->market_buylist = npc_market_buylist;
+ npc->barter_buylist = npc_barter_buylist;
npc->trader_open = npc_trader_open;
npc->market_fromsql = npc_market_fromsql;
npc->market_tosql = npc_market_tosql;
npc->market_delfromsql = npc_market_delfromsql;
npc->market_delfromsql_sub = npc_market_delfromsql_sub;
+ npc->barter_fromsql = npc_barter_fromsql;
+ npc->barter_tosql = npc_barter_tosql;
+ npc->barter_delfromsql = npc_barter_delfromsql;
+ npc->barter_delfromsql_sub = npc_barter_delfromsql_sub;
npc->db_checkid = npc_db_checkid;
npc->refresh = npc_refresh;
+ npc->questinfo_clear = npc_questinfo_clear;
}
diff --git a/src/map/npc.h b/src/map/npc.h
index ed5f4138d..2819cbd87 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -41,10 +41,11 @@ enum npc_parse_options {
};
enum npc_shop_types {
- NST_ZENY,/* default */
- NST_CASH,/* official npc cash shop */
- NST_MARKET,/* official npc market type */
+ NST_ZENY, /* default */
+ NST_CASH, /* official npc cash shop */
+ NST_MARKET, /* official npc market type */
NST_CUSTOM,
+ NST_BARTER, /* official npc barter type */
/* */
NST_MAX,
};
@@ -56,11 +57,14 @@ struct npc_label_list {
char name[NAME_LENGTH];
int pos;
};
+
struct npc_item_list {
int nameid;
- unsigned int value;
+ unsigned int value; // price or barter currency item id
+ int value2; // barter currency item amount
unsigned int qty;
};
+
struct npc_shop_data {
unsigned char type;/* what am i */
struct npc_item_list *item;/* list */
@@ -73,7 +77,7 @@ struct npc_data {
struct view_data vd;
unsigned int option;
struct npc_data *master_nd;
- short class_;
+ int class_;
short speed;
char name[NAME_LENGTH+1];// display name
char exname[NAME_LENGTH+1];// unique npc name
@@ -125,6 +129,7 @@ struct npc_data {
int spawn_timer;
} tomb;
} u;
+ VECTOR_DECL(struct questinfo) qi_data;
struct hplugin_data_store *hdata; ///< HPM Plugin Data Store
};
@@ -264,7 +269,7 @@ struct npc_interface {
void (*parsename) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath);
int (*parseview) (const char *w4, const char *start, const char *buffer, const char *filepath);
bool (*viewisid) (const char *viewid);
- struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
+ struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
const char *(*parse_warp) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
const char *(*parse_shop) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
@@ -284,7 +289,7 @@ struct npc_interface {
void (*unsetcells) (struct npc_data *nd);
void (*movenpc) (struct npc_data *nd, int16 x, int16 y);
void (*setdisplayname) (struct npc_data *nd, const char *newname);
- void (*setclass) (struct npc_data *nd, short class_);
+ void (*setclass) (struct npc_data *nd, int class_);
int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname);
const char *(*parse_function) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
void (*parse_mob2) (struct spawn_data *mobspawn);
@@ -306,13 +311,19 @@ struct npc_interface {
bool (*trader_pay) (struct npc_data *nd, struct map_session_data *sd, int price, int points);
void (*trader_update) (int master);
int (*market_buylist) (struct map_session_data *sd, struct itemlist *item_list);
+ int (*barter_buylist) (struct map_session_data *sd, struct barteritemlist *item_list);
bool (*trader_open) (struct map_session_data *sd, struct npc_data *nd);
void (*market_fromsql) (void);
- void (*market_tosql) (struct npc_data *nd, unsigned short index);
- void (*market_delfromsql) (struct npc_data *nd, unsigned short index);
- void (*market_delfromsql_sub) (const char *npcname, unsigned short index);
+ void (*market_tosql) (struct npc_data *nd, int index);
+ void (*market_delfromsql) (struct npc_data *nd, int index);
+ void (*market_delfromsql_sub) (const char *npcname, int index);
+ void (*barter_fromsql) (void);
+ void (*barter_tosql) (struct npc_data *nd, int index);
+ void (*barter_delfromsql) (struct npc_data *nd, int index);
+ void (*barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2);
bool (*db_checkid) (const int id);
void (*refresh) (struct npc_data* nd);
+ void (*questinfo_clear) (struct npc_data *nd);
/**
* For the Secure NPC Timeout option (check config/Secure.h) [RR]
**/
diff --git a/src/map/packets.h b/src/map/packets.h
index 036fd4f2a..45b47c921 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -147,6 +147,7 @@ packet(0x01ba,clif->pGMShift,2);
packet(0x01bb,clif->pGMShift,2);
packet(0x01bc,clif->pGMRecall,2);
packet(0x01bd,clif->pGMRecall,2);
+packet(0x01c0,clif->pReqRemainTime);
packet(0x01ce,clif->pAutoSpell,2);
packet(0x01d5,clif->pNpcStringInput,2,4,8);
packet(0x01df,clif->pGMReqAccountName,2);
@@ -588,7 +589,6 @@ packet(0x96e,clif->ackmergeitems);
#if PACKETVER >= 20070227
packet(0x0288,clif->pcashshop_buy,2,4,6);
packet(0x02b6,clif->pquestStateAck,2,6);
- packet(0x02ba,clif->pHotkey,2,4,5,9);
packet(0x02c4,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ
packet(0x02c7,clif->pReplyPartyInvite2,2,6);
packet(0x02c8,clif->pPartyTick,2);
@@ -598,6 +598,10 @@ packet(0x96e,clif->ackmergeitems);
packet(0x02db,clif->pBattleChat,2,4);
#endif
+#if PACKETVER_MAIN_NUM >= 20070618 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_AD_NUM >= 20070618 || PACKETVER_SAK_NUM >= 20070618
+ packet(0x02ba,clif->pHotkey1);
+#endif
+
//2008-01-02aSakexe
#if PACKETVER >= 20080102
packet(0x01df,clif->pGMReqAccountName,2);
@@ -648,6 +652,10 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0439,clif->pUseItem,2,4);
#endif
+#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
+ packet(0x044a,clif->pClientVersion);
+#endif
+
// 2009-05-20aRagexe, 2009-05-20aRagexeRE
#if PACKETVER >= 20090520
// new packets
@@ -1659,10 +1667,8 @@ packet(0x96e,clif->ackmergeitems);
// changed packet sizes
#endif
-// 2014-01-29bRagexeRE
-#if PACKETVER >= 20140129
-// new packets
- packet(0x0a01,clif->pHotkeyRowShift,2); // CZ_SHORTCUTKEYBAR_ROTATE
+#if PACKETVER_MAIN_NUM >= 20140129 || PACKETVER_RE_NUM >= 20140129 || defined(PACKETVER_ZERO)
+ packet(0x0a01,clif->pHotkeyRowShift1); // CZ_SHORTCUTKEYBAR_ROTATE
#endif
// 2014-02-12aRagexeRE
@@ -1772,8 +1778,10 @@ packet(0x96e,clif->ackmergeitems);
#if PACKETVER >= 20151104
// new packets
packet(0x0a46,clif->pReqStyleChange);
+ packet(0x0a48,clif->pStyleClose);
#endif
+
// 2016-03-23aRagexeRE
#if PACKETVER >= 20160323
// new packets
@@ -1788,6 +1796,22 @@ packet(0x96e,clif->ackmergeitems);
// changed packet sizes
#endif
+// all 2016-05-25
+#if PACKETVER >= 20160525
+ packet(0x0a77,clif->pCameraInfo); // CZ_CAMERA_INFO
+#endif
+
+// all 20160622+
+#if PACKETVER >= 20160622
+ packet(0x0a88,clif->pResetCooldown);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+ packet(0x0aa1, clif->pAddItemRefineryUI);
+ packet(0x0aa3, clif->pRefineryUIRefine);
+ packet(0x0aa4, clif->pRefineryUIClose);
+#endif
+
// 2017-02-28aRagexeRE
#if PACKETVER >= 20170228
// new packets
@@ -1875,4 +1899,59 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0a49,clif->pPrivateAirshipRequest); // CZ_PRIVATE_AIRSHIP_REQUEST
#endif
+// 2018-11-14aRagexe_zero
+#if PACKETVER_ZERO_NUM >= 20181114
+// new packets
+// changed packet sizes
+ packet(0x018e,clif->pProduceMix); // CZ_REQMAKINGITEM
+ packet(0x01ae,clif->pSelectArrow,2); // CZ_REQ_MAKINGARROW
+ packet(0x01fd,clif->pRepairItem); // CZ_REQ_ITEMREPAIR
+ packet(0x025b,clif->pCooking); // CZ_REQ_MAKINGITEM
+ packet(0x0445,clif->pDull/*,XXX*/); // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+ packet(0x09ae,clif->pDull/*,XXX*/); // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+ packet(0x09b0,clif->pDull/*,XXX*/); // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+ packet(0x09c3,clif->pDull/*,XXX*/); // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+ packet(0x0a49,clif->pPrivateAirshipRequest); // CZ_PRIVATE_AIRSHIP_REQUEST
+#endif
+
+// 2018-11-21bRagexe
+#if PACKETVER_ZERO_NUM >= 20181121
+// new packets
+// changed packet sizes
+ packet(0x018e,clif->pProduceMix); // CZ_REQMAKINGITEM
+ packet(0x01ae,clif->pSelectArrow,2); // CZ_REQ_MAKINGARROW
+ packet(0x01fd,clif->pRepairItem); // CZ_REQ_ITEMREPAIR
+ packet(0x025b,clif->pCooking); // CZ_REQ_MAKINGITEM
+ packet(0x0445,clif->pDull/*,XXX*/); // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+ packet(0x09ae,clif->pDull/*,XXX*/); // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+ packet(0x09b0,clif->pDull/*,XXX*/); // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+ packet(0x09c3,clif->pDull/*,XXX*/); // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+ packet(0x0a49,clif->pPrivateAirshipRequest); // CZ_PRIVATE_AIRSHIP_REQUEST
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
+ packet(0x0b10,clif->pStartUseSkillToId);
+ packet(0x0b11,clif->pStopUseSkillToId);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+ packet(0x0b14,clif->pInventoryExpansion);
+ packet(0x0b16,clif->pInventoryExpansionConfirmed);
+ packet(0x0b19,clif->pInventoryExpansionRejected);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+ packet(0x0b0f,clif->pNPCBarterPurchase);
+ packet(0x0b12,clif->pNPCBarterClosed);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
+ packet(0x0b1c,clif->pPing);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+ packet(0x0b21,clif->pHotkey2);
+ packet(0x0b22,clif->pHotkeyRowShift2); // CZ_SHORTCUTKEYBAR_ROTATE
+#endif
+
#endif /* MAP_PACKETS_H */
diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h
index 129c4eaaa..6c1cc151a 100644
--- a/src/map/packets_keys_main.h
+++ b/src/map/packets_keys_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@
packetKeys(0x49357d72,0x22c370a1,0x5f836591);
#endif
-// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 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, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE
+// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 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, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE, 2018-11-14dRagexe, 2018-11-14dRagexeRE, 2018-11-21bRagexe, 2018-11-21cRagexeRE, 2018-11-28aRagexe, 2018-11-28aRagexeRE, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-05bRagexeRE, 2018-12-12aRagexe, 2018-12-12aRagexeRE, 2018-12-12bRagexe, 2018-12-12bRagexeRE, 2018-12-19bRagexe, 2018-12-19bRagexeRE, 2018-12-26aRagexe, 2018-12-26aRagexeRE, 2019-01-09aRagexe, 2019-01-09bRagexeRE, 2019-01-16bRagexe, 2019-01-16bRagexeRE, 2019-01-16cRagexe, 2019-01-16cRagexeRE, 2019-01-23dRagexe, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-20aRagexeRE, 2019-02-27aRagexe, 2019-02-27bRagexeRE, 2019-02-28aRagexe, 2019-02-28aRagexeRE, 2019-03-06bRagexe, 2019-03-06bRagexeRE, 2019-03-06cRagexe, 2019-03-06cRagexeRE, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-20aRagexeRE, 2019-03-22aRagexe, 2019-03-22aRagexeRE, 2019-03-27bRagexe, 2019-03-27bRagexeRE, 2019-04-03aRagexe, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE, 2019-04-17aRagexe, 2019-04-17cRagexeRE, 2019-04-18aRagexe, 2019-04-18aRagexeRE, 2019-05-08cRagexe, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexe, 2019-05-22bRagexeRE, 2019-05-22cRagexe, 2019-05-22cRagexeRE, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29bRagexeRE, 2019-05-29cRagexe, 2019-05-29cRagexeRE, 2019-05-30aRagexe, 2019-05-30aRagexeRE
#if PACKETVER == 20101123 || \
PACKETVER == 20101124 || \
PACKETVER == 20101125 || \
@@ -126,7 +126,33 @@
PACKETVER == 20181024 || \
PACKETVER == 20181031 || \
PACKETVER == 20181107 || \
- PACKETVER >= 20181114
+ PACKETVER == 20181114 || \
+ PACKETVER == 20181121 || \
+ PACKETVER == 20181128 || \
+ PACKETVER == 20181205 || \
+ PACKETVER == 20181212 || \
+ PACKETVER == 20181219 || \
+ PACKETVER == 20181226 || \
+ PACKETVER == 20190109 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190123 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190228 || \
+ PACKETVER == 20190306 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190320 || \
+ PACKETVER == 20190322 || \
+ PACKETVER == 20190327 || \
+ PACKETVER == 20190403 || \
+ PACKETVER == 20190417 || \
+ PACKETVER == 20190418 || \
+ PACKETVER == 20190508 || \
+ PACKETVER == 20190522 || \
+ PACKETVER == 20190523 || \
+ PACKETVER == 20190529 || \
+ PACKETVER >= 20190530
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h
index d5836bf96..c9a1a1ff0 100644
--- a/src/map/packets_keys_zero.h
+++ b/src/map/packets_keys_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,7 +30,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, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_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, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero
#if PACKETVER == 20171018 || \
PACKETVER == 20171019 || \
PACKETVER == 20171023 || \
@@ -63,7 +63,28 @@
PACKETVER == 20180928 || \
PACKETVER == 20181010 || \
PACKETVER == 20181024 || \
- PACKETVER >= 20181114
+ PACKETVER == 20181114 || \
+ PACKETVER == 20181120 || \
+ PACKETVER == 20181128 || \
+ PACKETVER == 20181212 || \
+ PACKETVER == 20181219 || \
+ PACKETVER == 20181226 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190117 || \
+ PACKETVER == 20190130 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190327 || \
+ PACKETVER == 20190403 || \
+ PACKETVER == 20190410 || \
+ PACKETVER == 20190424 || \
+ PACKETVER == 20190502 || \
+ PACKETVER == 20190508 || \
+ PACKETVER == 20190515 || \
+ PACKETVER == 20190529 || \
+ PACKETVER >= 20190530
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h
index 43be3821f..016de4e26 100644
--- a/src/map/packets_shuffle_main.h
+++ b/src/map/packets_shuffle_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -3345,7 +3345,7 @@
packet(0x0969,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE // 2
#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, 2018-08-29aRagexe, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-19aRagexe, 2018-10-02aRagexe, 2018-10-02bRagexe, 2018-10-17_02aRagexe, 2018-10-17_03aRagexe, 2018-10-17bRagexe, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-11-07aRagexe, 2018-11-14cRagexe
+// 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, 2018-10-02aRagexe, 2018-10-02bRagexe, 2018-10-17_02aRagexe, 2018-10-17_03aRagexe, 2018-10-17bRagexe, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-11-07aRagexe, 2018-11-14cRagexe, 2018-11-14dRagexe
#if PACKETVER == 20140611 || \
PACKETVER == 20150225 || \
PACKETVER == 20180315 || \
@@ -3376,7 +3376,7 @@
PACKETVER == 20181024 || \
PACKETVER == 20181031 || \
PACKETVER == 20181107 || \
- PACKETVER >= 20181114
+ PACKETVER == 20181114
packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
@@ -9727,5 +9727,62 @@
packet(0x0967,clif->pSolveCharName,2); // CZ_REQNAME_BYGID // 6
#endif
+// 2018-11-21bRagexe, 2018-11-28aRagexe, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-12aRagexe, 2018-12-12bRagexe, 2018-12-19bRagexe, 2018-12-26aRagexe, 2019-01-09aRagexe, 2019-01-16bRagexe, 2019-01-16cRagexe, 2019-01-23dRagexe, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-27aRagexe, 2019-02-28aRagexe, 2019-03-06bRagexe, 2019-03-06cRagexe, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-22aRagexe, 2019-03-27bRagexe, 2019-04-03aRagexe, 2019-04-17aRagexe, 2019-04-18aRagexe, 2019-05-08cRagexe, 2019-05-22bRagexe, 2019-05-22cRagexe, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29cRagexe, 2019-05-30aRagexe
+#if PACKETVER == 20181121 || \
+ PACKETVER == 20181128 || \
+ PACKETVER == 20181205 || \
+ PACKETVER == 20181212 || \
+ PACKETVER == 20181219 || \
+ PACKETVER == 20181226 || \
+ PACKETVER == 20190109 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190123 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190228 || \
+ PACKETVER == 20190306 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190320 || \
+ PACKETVER == 20190322 || \
+ PACKETVER == 20190327 || \
+ PACKETVER == 20190403 || \
+ PACKETVER == 20190417 || \
+ PACKETVER == 20190418 || \
+ PACKETVER == 20190508 || \
+ PACKETVER == 20190522 || \
+ PACKETVER == 20190523 || \
+ PACKETVER == 20190529 || \
+ PACKETVER >= 20190530
+ packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
+ packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
+ packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
+ packet(0x0281,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK // 4
+ packet(0x02c4,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ // 26
+ packet(0x035f,clif->pWalkToXY,2); // CZ_REQUEST_MOVE // 5
+ packet(0x0360,clif->pTickSend,2); // CZ_REQUEST_TIME // 6
+ packet(0x0361,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION // 5
+ packet(0x0362,clif->pTakeItem,2); // CZ_ITEM_PICKUP // 6
+ packet(0x0363,clif->pDropItem,2,4); // CZ_ITEM_THROW // 6
+ packet(0x0364,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE // 8
+ packet(0x0365,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY // 8
+ packet(0x0366,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND // 10
+ packet(0x0367,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX // 90
+ packet(0x0368,clif->pGetCharNameRequest,2); // CZ_REQNAME // 6
+ packet(0x0369,clif->pSolveCharName,2); // CZ_REQNAME_BYGID // 6
+ packet(0x0436,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER // 19
+ packet(0x0437,clif->pActionRequest,2,6); // CZ_REQUEST_ACT // 7
+ packet(0x0438,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL // 10
+ packet(0x07e4,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES // -1
+ packet(0x07ec,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD // 8
+ packet(0x0802,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER // 18
+ packet(0x0811,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE // -1
+ packet(0x0815,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE // 2
+ packet(0x0817,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE // 6
+ packet(0x0819,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE // -1
+ packet(0x0835,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO // -1
+ packet(0x0838,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE // 2
+ packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14
+#endif
+
#endif /* MAP_PACKETS_SHUFFLE_MAIN_H */
diff --git a/src/map/packets_shuffle_re.h b/src/map/packets_shuffle_re.h
index 429cf3012..9c02161ff 100644
--- a/src/map/packets_shuffle_re.h
+++ b/src/map/packets_shuffle_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -9663,7 +9663,7 @@
packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 12
#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-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-09-12dRagexeRE, 2018-09-19aRagexeRE, 2018-10-02aRagexeRE, 2018-10-02bRagexeRE, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexeRE, 2018-10-17bRagexeRE, 2018-10-31cRagexeRE, 2018-11-07aRagexeRE, 2018-11-14cRagexeRE
+// 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, 2018-10-02aRagexeRE, 2018-10-02bRagexeRE, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexeRE, 2018-10-17bRagexeRE, 2018-10-31cRagexeRE, 2018-11-07aRagexeRE, 2018-11-14cRagexeRE, 2018-11-14dRagexeRE, 2018-11-21cRagexeRE, 2018-11-28aRagexeRE, 2018-12-05bRagexeRE, 2018-12-12aRagexeRE, 2018-12-12bRagexeRE, 2018-12-19bRagexeRE, 2018-12-26aRagexeRE, 2019-01-09bRagexeRE, 2019-01-16bRagexeRE, 2019-01-16cRagexeRE, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-20aRagexeRE, 2019-02-27bRagexeRE, 2019-02-28aRagexeRE, 2019-03-06bRagexeRE, 2019-03-06cRagexeRE, 2019-03-20aRagexeRE, 2019-03-22aRagexeRE, 2019-03-27bRagexeRE, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE, 2019-04-17cRagexeRE, 2019-04-18aRagexeRE, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexeRE, 2019-05-22cRagexeRE, 2019-05-29bRagexeRE, 2019-05-29cRagexeRE, 2019-05-30aRagexeRE
#if PACKETVER == 20180704 || \
PACKETVER == 20180711 || \
PACKETVER == 20180718 || \
@@ -9677,7 +9677,31 @@
PACKETVER == 20181017 || \
PACKETVER == 20181031 || \
PACKETVER == 20181107 || \
- PACKETVER >= 20181114
+ PACKETVER == 20181114 || \
+ PACKETVER == 20181121 || \
+ PACKETVER == 20181128 || \
+ PACKETVER == 20181205 || \
+ PACKETVER == 20181212 || \
+ PACKETVER == 20181219 || \
+ PACKETVER == 20181226 || \
+ PACKETVER == 20190109 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190123 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190228 || \
+ PACKETVER == 20190306 || \
+ PACKETVER == 20190320 || \
+ PACKETVER == 20190322 || \
+ PACKETVER == 20190327 || \
+ PACKETVER == 20190403 || \
+ PACKETVER == 20190417 || \
+ PACKETVER == 20190418 || \
+ PACKETVER == 20190508 || \
+ PACKETVER == 20190522 || \
+ PACKETVER == 20190529 || \
+ PACKETVER >= 20190530
packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h
index 7b68ec472..bbf44cbc8 100644
--- a/src/map/packets_shuffle_zero.h
+++ b/src/map/packets_shuffle_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
- * Copyright (C) 2018 Andrei Karas (4144)
+ * Copyright (C) 2013-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -69,7 +69,7 @@
PACKETVER == 20180919 || \
PACKETVER == 20180928 || \
PACKETVER == 20181010 || \
- PACKETVER >= 20181024
+ PACKETVER == 20181024
packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
@@ -742,8 +742,29 @@
packet(0x0968,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
#endif
-// 2018-11-14aRagexe_zero
-#if PACKETVER == 20181114
+// 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero
+#if PACKETVER == 20181114 || \
+ PACKETVER == 20181120 || \
+ PACKETVER == 20181128 || \
+ PACKETVER == 20181212 || \
+ PACKETVER == 20181219 || \
+ PACKETVER == 20181226 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190117 || \
+ PACKETVER == 20190130 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190327 || \
+ PACKETVER == 20190403 || \
+ PACKETVER == 20190410 || \
+ PACKETVER == 20190424 || \
+ PACKETVER == 20190502 || \
+ PACKETVER == 20190508 || \
+ PACKETVER == 20190515 || \
+ PACKETVER == 20190529 || \
+ PACKETVER >= 20190530
packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index cd3a3b989..2da1ece9e 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -30,10 +30,6 @@
// Packet DB
#define MAX_PACKET_POS 20
-#define DEFINE_PACKET_HEADER(name, id) \
- STATIC_ASSERT(sizeof(struct PACKET_##name) == PACKET_LEN_##id, "Wrong size PACKET_"#name); \
- enum { HEADER_##name = id };
-
/**
*
**/
@@ -43,13 +39,6 @@ enum packet_headers {
banking_checkType = 0x9a6,
cart_additem_ackType = 0x12c,
sc_notickType = 0x196,
-#if PACKETVER >= 20141022
- hotkeyType = 0xa00,
-#elif PACKETVER >= 20090603
- hotkeyType = 0x7d9,
-#else
- hotkeyType = 0x2b9,
-#endif
#if PACKETVER >= 20150226
cartaddType = 0xa0b,
#elif PACKETVER >= 5
@@ -312,7 +301,6 @@ enum packet_headers {
monsterhpType = 0x977,
maptypeproperty2Type = 0x99b,
npcmarketresultackType = 0x9d7,
- npcmarketopenType = 0x9d5,
#if PACKETVER >= 20131223 // version probably can be 20131030 [4144]
wisendType = 0x9df,
#else
@@ -375,9 +363,6 @@ enum packet_headers {
partymemberinfo = 0x01e9,
partyinfo = 0x00fb,
#endif
-#if PACKETVER >= 20120702
- clanBasicInfo = 0x098A, ///< ZC_CLANINFO
-#endif
#if PACKETVER >= 20120716
clanOnlineCount = 0x0988, ///< ZC_NOTIFY_CLAN_CONNECTINFO
clanLeave = 0x0989, ///< ZC_ACK_CLAN_LEAVE
@@ -425,18 +410,7 @@ enum packet_headers {
#else
buyingStoreUpdateItemType = 0x81b,
#endif
-// probably can works also for < 20141223, but in 3CeaM packet size defined only for 20150513
-#if PACKETVER >= 20150513
- hominfoType = 0x9f7,
-#else
- hominfoType = 0x22e,
-#endif
reqName = 0x95,
-#if PACKETVER >= 20150503 // Confirm this?
- reqNameAllType = 0xA30,
-#else
- reqNameAllType = 0x195,
-#endif
#if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
skilWarpPointType = 0xabe,
#else
@@ -454,11 +428,6 @@ enum packet_headers {
#else
guildLeave = 0x15a,
#endif
-#if PACKETVER_RE_NUM >= 20181031
- autoSpellList = 0xafb,
-#else
- autoSpellList = 0x1cd,
-#endif
};
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
@@ -469,7 +438,7 @@ enum packet_headers {
* structs for data
*/
struct EQUIPSLOTINFO {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 card[4];
#else
uint16 card[4];
@@ -478,7 +447,7 @@ struct EQUIPSLOTINFO {
struct NORMALITEM_INFO {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -516,7 +485,7 @@ struct ItemOptions {
struct EQUIPITEM_INFO {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -593,7 +562,7 @@ struct packet_additem {
int16 PacketType;
uint16 Index;
uint16 count;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 nameid;
#else
uint16 nameid;
@@ -627,7 +596,7 @@ struct packet_additem {
struct packet_dropflooritem {
int16 PacketType;
uint32 ITAID;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -739,7 +708,7 @@ struct packet_spawn_unit {
#else
uint32 weapon;
#endif
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 shield;
#endif
uint16 accessory;
@@ -812,7 +781,7 @@ struct packet_unit_walking {
#else
uint32 weapon;
#endif
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 shield;
#endif
uint16 accessory;
@@ -884,7 +853,7 @@ struct packet_idle_unit {
#else
uint32 weapon;
#endif
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 shield;
#endif
uint16 accessory;
@@ -1047,7 +1016,7 @@ struct packet_package_item_announce {
int16 PacketType;
int16 PacketLength;
uint8 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ItemID;
#else
uint16 ItemID;
@@ -1055,7 +1024,7 @@ struct packet_package_item_announce {
int8 len;
char Name[NAME_LENGTH];
int8 unknown; // probably unused
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 BoxItemID;
#else
uint16 BoxItemID;
@@ -1067,7 +1036,7 @@ struct packet_item_drop_announce {
int16 PacketType;
int16 PacketLength;
uint8 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ItemID;
#else
uint16 ItemID;
@@ -1122,7 +1091,7 @@ struct packet_roulette_open_ack {
int32 Serial;
int8 Step;
int8 Idx;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 AdditionItemID;
#else
uint16 AdditionItemID;
@@ -1160,7 +1129,7 @@ struct packet_roulette_generate_ack {
uint8 Result;
uint16 Step;
uint16 Idx;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 AdditionItemID;
#else
uint16 AdditionItemID;
@@ -1178,7 +1147,7 @@ struct packet_roulette_itemrecv_req {
struct packet_roulette_itemrecv_ack {
int16 PacketType;
uint8 Result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 AdditionItemID;
#else
uint16 AdditionItemID;
@@ -1303,6 +1272,7 @@ struct packet_viewequip_ack {
int16 body2;
#endif
uint8 sex;
+ // [4144] need remove MAX_INVENTORY from here
struct EQUIPITEM_INFO list[MAX_INVENTORY];
} __attribute__((packed));
@@ -1383,7 +1353,7 @@ struct packet_npc_market_purchase {
int16 PacketType;
int16 PacketLength;
struct {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -1397,36 +1367,40 @@ struct packet_npc_market_result_ack {
int16 PacketLength;
uint8 result;
struct {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
#endif
uint16 qty;
uint32 price;
+ // [4144] need remove MAX_INVENTORY from here
} list[MAX_INVENTORY];/* assuming MAX_INVENTORY is max since you can't hold more than MAX_INVENTORY items thus cant buy that many at once. */
} __attribute__((packed));
-struct packet_npc_market_open {
- int16 PacketType;
- int16 PacketLength;
- /* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
- struct {
-#if PACKETVER_RE_NUM >= 20180704
- uint32 nameid;
+#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
+/* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
+struct PACKET_ZC_NPC_MARKET_OPEN_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 nameid;
#else
- uint16 nameid;
+ uint16 nameid;
#endif
- uint8 type;
- uint32 price;
- uint32 qty;
- uint16 view;
- // It seems that the client doesn't have any hard-coded limit for this list
- // it's possible to send up to 1890 items without dropping a packet that's
- // too large [Panikon]
- } list[1000];/* TODO: whats the actual max of this? */
+ uint8 type;
+ uint32 price;
+ uint32 qty;
+ uint16 weight;
} __attribute__((packed));
+struct PACKET_ZC_NPC_MARKET_OPEN {
+ int16 packetType;
+ int16 packetLength;
+ struct PACKET_ZC_NPC_MARKET_OPEN_sub list[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_NPC_MARKET_OPEN, 0x09d5);
+#endif
+
struct packet_wis_end {
int16 PacketType;
int8 result;
@@ -1442,21 +1416,90 @@ struct packet_party_leader_changed {
uint32 new_leader_aid;
} __attribute__((packed));
-struct packet_hotkey {
#ifdef HOTKEY_SAVING
- int16 PacketType;
-#if PACKETVER >= 20141022
- int8 Rotate;
+struct hotkey_data {
+ int8 isSkill; // 0: Item, 1:Skill
+ uint32 id; // Item/Skill ID
+ int16 count; // Item Quantity/Skill Level
+} __attribute__((packed));
+
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#define MAX_HOTKEYS_PACKET 38
+struct PACKET_ZC_SHORTCUT_KEY_LIST {
+ int16 packetType;
+ int8 rotate;
+ int16 tab;
+ struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x0b20);
+#elif PACKETVER_MAIN_NUM >= 20141022 || PACKETVER_RE_NUM >= 20141015 || defined(PACKETVER_ZERO)
+#define MAX_HOTKEYS_PACKET 38
+struct PACKET_ZC_SHORTCUT_KEY_LIST {
+ int16 packetType;
+ int8 rotate;
+ struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x0a00);
+#elif PACKETVER_MAIN_NUM >= 20090617 || PACKETVER_RE_NUM >= 20090617 || PACKETVER_SAK_NUM >= 20090617
+#define MAX_HOTKEYS_PACKET 38
+struct PACKET_ZC_SHORTCUT_KEY_LIST {
+ int16 packetType;
+ struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x07d9);
+#elif PACKETVER_MAIN_NUM >= 20090603 || PACKETVER_RE_NUM >= 20090603 || PACKETVER_SAK_NUM >= 20090603
+#define MAX_HOTKEYS_PACKET 36
+struct PACKET_ZC_SHORTCUT_KEY_LIST {
+ int16 packetType;
+ struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x07d9);
+#elif PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628
+#define MAX_HOTKEYS_PACKET 27
+struct PACKET_ZC_SHORTCUT_KEY_LIST {
+ int16 packetType;
+ struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x02b9);
#endif
- struct {
- int8 isSkill; // 0: Item, 1:Skill
- uint32 ID; // Item/Skill ID
- int16 count; // Item Quantity/Skill Level
- } hotkey[MAX_HOTKEYS];
-#else // not HOTKEY_SAVING
- UNAVAILABLE_STRUCT;
-#endif // HOTKEY_SAVING
+
+#if PACKETVER_MAIN_NUM >= 20070618 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_AD_NUM >= 20070618 || PACKETVER_SAK_NUM >= 20070618
+struct PACKET_CZ_SHORTCUT_KEY_CHANGE1 {
+ int16 packetType;
+ uint16 index;
+ struct hotkey_data hotkey;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE1, 0x02ba);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 {
+ int16 packetType;
+ uint16 tab;
+ uint16 index;
+ struct hotkey_data hotkey;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE2, 0x0b21);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20140129 || PACKETVER_RE_NUM >= 20140129 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE1 {
+ int16 packetType;
+ uint8 rowshift;
} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE1, 0x0a01);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 {
+ int16 packetType;
+ uint16 tab;
+ uint8 rowshift;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE2, 0x0b22);
+#endif
+
+#endif // HOTKEY_SAVING
/**
* MISSION_HUNT_INFO (PACKETVER >= 20141022)
@@ -1537,7 +1580,7 @@ struct PACKET_ZC_ADD_ITEM_TO_MAIL {
int8 result;
int16 index;
int16 count;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -1555,7 +1598,7 @@ struct PACKET_ZC_ADD_ITEM_TO_MAIL {
struct mail_item {
int16 count;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ITID;
#else
uint16 ITID;
@@ -1804,6 +1847,7 @@ struct PACKET_ZC_GROUP_LIST {
struct PACKET_ZC_GROUP_LIST_SUB members[];
} __attribute__((packed));
+#if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
struct PACKET_ZC_CLANINFO {
int16 PacketType;
int16 PacketLength;
@@ -1814,6 +1858,8 @@ struct PACKET_ZC_CLANINFO {
uint8 AllyCount;
uint8 AntagonistCount;
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_CLANINFO, 0x098a);
+#endif
struct PACKET_ZC_NOTIFY_CLAN_CONNECTINFO {
int16 PacketType;
@@ -1965,7 +2011,7 @@ struct PACKET_ZC_UI_ACTION {
struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST {
int16 PacketType;
char mapName[MAP_NAME_LENGTH_EXT];
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 ItemID;
#else
uint16 ItemID;
@@ -2011,7 +2057,7 @@ struct pet_evolution_items {
struct PACKET_CZ_PET_EVOLUTION {
int16 PacketType;
uint16 PacketLength;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 EvolvedPetEggID;
#else
uint16 EvolvedPetEggID;
@@ -2045,7 +2091,7 @@ struct PACKET_ZC_NOTIFY_PLAYERCHAT {
struct PACKET_ZC_ITEM_ENTRY {
int16 packetType;
uint32 AID;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2062,7 +2108,7 @@ struct PACKET_ZC_ADD_ITEM_TO_STORE {
int16 packetType;
int16 index;
int32 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2081,7 +2127,7 @@ struct PACKET_ZC_ADD_ITEM_TO_STORE {
struct PACKET_ZC_MVP_GETTING_ITEM {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2091,7 +2137,7 @@ struct PACKET_ZC_MVP_GETTING_ITEM {
struct PACKET_ZC_ACK_TOUSESKILL {
int16 packetType;
uint16 skillId;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
int32 btype;
uint32 itemId;
#else
@@ -2106,7 +2152,7 @@ struct PACKET_ZC_ADD_ITEM_TO_CART {
int16 packetType;
int16 index;
int32 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2125,7 +2171,7 @@ struct PACKET_ZC_ADD_ITEM_TO_CART {
struct PACKET_CZ_REQMAKINGITEM {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint32 material[3];
#else
@@ -2137,7 +2183,7 @@ struct PACKET_CZ_REQMAKINGITEM {
struct PACKET_ZC_ACK_REQMAKINGITEM {
int16 packetType;
int16 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2147,7 +2193,7 @@ struct PACKET_ZC_ACK_REQMAKINGITEM {
struct PACKET_ZC_FEED_PET {
int16 packetType;
uint8 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2157,7 +2203,7 @@ struct PACKET_ZC_FEED_PET {
struct PACKET_ZC_FEED_MER {
int16 packetType;
uint8 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2167,7 +2213,7 @@ struct PACKET_ZC_FEED_MER {
struct PACKET_ZC_USE_ITEM_ACK {
int16 packetType;
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint32 AID;
#elif PACKETVER >= 3
@@ -2182,7 +2228,7 @@ struct PACKET_ZC_SPRITE_CHANGE {
int16 packetType;
uint32 AID;
uint8 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 val;
uint32 val2;
#elif PACKETVER >= 4
@@ -2195,7 +2241,7 @@ struct PACKET_ZC_SPRITE_CHANGE {
struct PACKET_ZC_ADD_EXCHANGE_ITEM {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint8 itemType;
int32 amount;
@@ -2218,7 +2264,7 @@ struct PACKET_ZC_ADD_EXCHANGE_ITEM {
struct PACKET_ZC_CASH_TIME_COUNTER {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2229,7 +2275,7 @@ struct PACKET_ZC_CASH_TIME_COUNTER {
struct PACKET_ZC_CASH_ITEM_DELETE {
int16 packetType;
uint16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2239,7 +2285,7 @@ struct PACKET_ZC_CASH_ITEM_DELETE {
struct PACKET_ZC_ITEM_PICKUP_PARTY {
int16 packetType;
uint32 AID;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2254,7 +2300,7 @@ struct PACKET_ZC_ITEM_PICKUP_PARTY {
struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE {
int16 packetType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2273,13 +2319,15 @@ struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE {
struct PACKET_ZC_ACK_WEAPONREFINE {
int16 packetType;
int32 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
#endif
} __attribute__((packed));
+#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
+// PACKET_ZC_PROPERTY_HOMUN2
struct PACKET_ZC_PROPERTY_HOMUN {
int16 packetType;
char name[NAME_LENGTH];
@@ -2288,7 +2336,7 @@ struct PACKET_ZC_PROPERTY_HOMUN {
uint16 level;
uint16 hunger;
uint16 intimacy;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2301,13 +2349,41 @@ struct PACKET_ZC_PROPERTY_HOMUN {
uint16 mdef;
uint16 flee;
uint16 amotion;
-#if PACKETVER < 20150513
- uint16 hp;
- uint16 maxHp;
-#else
uint32 hp;
uint32 maxHp;
+ uint16 sp;
+ uint16 maxSp;
+ uint32 exp;
+ uint32 expNext;
+ uint16 skillPoints;
+ uint16 range;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x09f7);
+#elif PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
+// PACKET_ZC_PROPERTY_HOMUN1
+struct PACKET_ZC_PROPERTY_HOMUN {
+ int16 packetType;
+ char name[NAME_LENGTH];
+ // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
+ uint8 flags;
+ uint16 level;
+ uint16 hunger;
+ uint16 intimacy;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
#endif
+ uint16 atk2;
+ uint16 matk;
+ uint16 hit;
+ uint16 crit;
+ uint16 def;
+ uint16 mdef;
+ uint16 flee;
+ uint16 amotion;
+ uint16 hp;
+ uint16 maxHp;
uint16 sp;
uint16 maxSp;
uint32 exp;
@@ -2315,11 +2391,13 @@ struct PACKET_ZC_PROPERTY_HOMUN {
uint16 skillPoints;
uint16 range;
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x022e);
+#endif
struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER {
int16 packetType;
uint16 result;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2329,7 +2407,7 @@ struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER {
struct PACKET_CZ_REQ_ITEMREPAIR {
int16 packetType;
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2341,7 +2419,7 @@ struct PACKET_CZ_REQ_ITEMREPAIR {
struct PACKET_CZ_REQ_MAKINGITEM {
int16 packetType;
int16 type;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2352,7 +2430,7 @@ struct PACKET_CZ_SSILIST_ITEM_CLICK {
int16 packetType;
uint32 AID;
uint32 storeId;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2360,7 +2438,7 @@ struct PACKET_CZ_SSILIST_ITEM_CLICK {
} __attribute__((packed));
struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2381,7 +2459,7 @@ struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub {
int16 index;
int16 amount;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2406,7 +2484,7 @@ struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub {
uint32 price;
uint32 discountPrice;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2421,7 +2499,7 @@ struct PACKET_ZC_PC_PURCHASE_ITEMLIST {
struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub {
uint16 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2435,7 +2513,7 @@ struct PACKET_CZ_PC_PURCHASE_ITEMLIST {
} __attribute__((packed));
struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2457,7 +2535,7 @@ struct PACKET_ZC_MYITEMLIST_BUYING_STORE_sub {
uint32 price;
uint16 amount;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2477,7 +2555,7 @@ struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub {
uint16 amount;
int16 index;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2510,7 +2588,7 @@ struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub {
uint32 price;
uint16 amount;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2528,7 +2606,7 @@ struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE {
struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2545,7 +2623,7 @@ struct PACKET_CZ_REQ_TRADE_BUYING_STORE {
} __attribute__((packed));
struct PACKET_ZC_MAKABLEITEMLIST_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
uint32 material[3];
#else
@@ -2561,7 +2639,7 @@ struct PACKET_ZC_MAKABLEITEMLIST {
} __attribute__((packed));
struct PACKET_ZC_MAKINGARROW_LIST_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2576,7 +2654,7 @@ struct PACKET_ZC_MAKINGARROW_LIST {
struct PACKET_ZC_REPAIRITEMLIST_sub {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2593,7 +2671,7 @@ struct PACKET_ZC_REPAIRITEMLIST {
struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub {
int16 index;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2609,7 +2687,7 @@ struct PACKET_ZC_NOTIFY_WEAPONITEMLIST {
} __attribute__((packed));
struct PACKET_ZC_MAKINGITEM_LIST_sub {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2619,7 +2697,7 @@ struct PACKET_ZC_MAKINGITEM_LIST_sub {
struct PACKET_ZC_MAKINGITEM_LIST {
int16 packetType;
int16 packetLength;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 makeItem;
#else
uint16 makeItem;
@@ -2631,7 +2709,7 @@ struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub {
uint32 price;
uint32 discountPrice;
uint8 itemType;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2650,7 +2728,7 @@ struct PACKET_ZC_PC_CASH_POINT_ITEMLIST {
struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub {
uint16 amount;
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2674,7 +2752,7 @@ struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM {
} __attribute__((packed));
struct PACKET_CZ_SEARCH_STORE_INFO_item {
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2699,7 +2777,7 @@ struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub {
uint32 storeId;
uint32 AID;
char shopName[MESSAGE_SIZE];
-#if PACKETVER_RE_NUM >= 20180704
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
#else
uint16 itemId;
@@ -2766,17 +2844,46 @@ struct packet_reqname_ack {
} __attribute__((packed));
// ZC_ACK_REQNAMEALL / ZC_ACK_REQNAMEALL2
-struct packet_reqnameall_ack {
+#if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ACK_REQNAMEALL {
+ uint16 packet_id;
+ int32 gid;
+ char name[NAME_LENGTH];
+ char party_name[NAME_LENGTH];
+ char guild_name[NAME_LENGTH];
+ char position_name[NAME_LENGTH];
+ int32 title_id;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0a30);
+#else
+struct PACKET_ZC_ACK_REQNAMEALL {
uint16 packet_id;
int32 gid;
char name[NAME_LENGTH];
char party_name[NAME_LENGTH];
char guild_name[NAME_LENGTH];
char position_name[NAME_LENGTH];
-#if PACKETVER >= 20150503 // Confirm this?
- int32 title_id; // Achievement Title
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0195);
#endif
+
+#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
+struct PACKET_ZC_ACK_REQNAME_TITLE {
+ uint16 packet_id;
+ int32 gid;
+ int32 groupId;
+ char name[NAME_LENGTH];
+ char title[NAME_LENGTH];
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAME_TITLE, 0x0adf);
+#else
+struct PACKET_ZC_ACK_REQNAME_TITLE {
+ uint16 packet_id;
+ int32 gid;
+ char name[NAME_LENGTH];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_REQNAME_TITLE, 0x0095);
+#endif
struct PACKET_ZC_OVERWEIGHT_PERCENT {
int16 packetType;
@@ -2874,6 +2981,7 @@ struct PACKET_ZC_REMOVE_EFFECT {
uint32 effectId;
} __attribute__((packed));
+#if PACKETVER >= 20160525
struct PACKET_ZC_CAMERA_INFO {
int16 packetType;
int8 action;
@@ -2881,23 +2989,36 @@ struct PACKET_ZC_CAMERA_INFO {
float rotation;
float latitude;
} __attribute__((packed));
-
-#if PACKETVER_RE_NUM >= 20181031
-#define PACKET_ZC_AUTOSPELLLIST PACKET_ZC_AUTOSPELLLIST2
-#else
-#define PACKET_ZC_AUTOSPELLLIST PACKET_ZC_AUTOSPELLLIST1
+DEFINE_PACKET_HEADER(ZC_CAMERA_INFO, 0x0a78);
#endif
-struct PACKET_ZC_AUTOSPELLLIST1 {
+#if PACKETVER >= 20160525
+struct PACKET_CZ_CAMERA_INFO {
int16 packetType;
- int skills[7];
+ int8 action;
+ float range;
+ float rotation;
+ float latitude;
} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_CAMERA_INFO, 0x0a77);
+#endif
-struct PACKET_ZC_AUTOSPELLLIST2 {
+#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
+// PACKET_ZC_AUTOSPELLLIST2
+struct PACKET_ZC_AUTOSPELLLIST {
int16 packetType;
int16 packetLength;
int skills[];
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x0afb);
+#elif PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618
+// PACKET_ZC_AUTOSPELLLIST1
+struct PACKET_ZC_AUTOSPELLLIST {
+ int16 packetType;
+ int skills[7];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x01cd);
+#endif
#if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
#if PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
@@ -2923,6 +3044,414 @@ DEFINE_PACKET_HEADER(ZC_ITEM_PREVIEW, 0x0ab9);
#endif // PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
#endif // PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
+#if PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ENCHANT_EQUIPMENT {
+ int16 packetType;
+ int16 wearState;
+ int16 cardSlot;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ int32 itemId;
+#else
+ int16 itemId;
+#endif
+ int8 equipFlag;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ENCHANT_EQUIPMENT, 0x0a3f);
+#endif // PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
+
+#if PACKETVER_MAIN_NUM >= 20170830 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_SERVICE_MESSAGE_COLOR {
+ int16 packetType;
+ int16 packetLength;
+ int32 color;
+ char message[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SERVICE_MESSAGE_COLOR, 0x0adb);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
+struct PACKET_CZ_START_USE_SKILL {
+ int16 packetType;
+ int16 skillId;
+ int16 skillLv;
+ uint32 targetId;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_START_USE_SKILL, 0x0b10);
+
+struct PACKET_CZ_STOP_USE_SKILL {
+ int16 packetType;
+ int16 skillId;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_STOP_USE_SKILL, 0x0b11);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+struct PACKET_ZC_INVENTORY_EXPANSION_INFO {
+ int16 packetType;
+ int16 expansionSize;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_INVENTORY_EXPANSION_INFO, 0x0b18);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+struct PACKET_ZC_ACK_INVENTORY_EXPAND {
+ int16 packetType;
+ uint8 result;
+ uint32 itemId;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_INVENTORY_EXPAND, 0x0b15);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
+struct PACKET_ZC_ACK_INVENTORY_EXPAND_RESULT {
+ int16 packetType;
+ uint8 result;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_INVENTORY_EXPAND_RESULT, 0x0b17);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+struct PACKET_CZ_INVENTORY_EXPAND {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND, 0x0b14);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+struct PACKET_CZ_INVENTORY_EXPAND_CONFIRMED {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND_CONFIRMED, 0x0b16);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
+struct PACKET_CZ_INVENTORY_EXPAND_REJECTED {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND_REJECTED, 0x0b19);
+#endif
+
+struct PACKET_CZ_REQ_REMAINTIME {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_REQ_REMAINTIME, 0x01c0);
+
+struct PACKET_CZ_PARTY_CONFIG {
+ int16 packetType;
+ uint8 refuseInvite;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_PARTY_CONFIG, 0x02c8);
+
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+struct PACKET_ZC_NPC_BARTER_OPEN_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 nameid;
+#else
+ uint16 nameid;
+#endif
+ uint8 type;
+ uint32 amount;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 currencyNameid;
+#else
+ uint16 currencyNameid;
+#endif
+ uint32 currencyAmount;
+ uint32 weight;
+ uint32 index;
+} __attribute__((packed));
+
+struct PACKET_ZC_NPC_BARTER_OPEN {
+ int16 packetType;
+ int16 packetLength;
+ struct PACKET_ZC_NPC_BARTER_OPEN_sub list[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_NPC_BARTER_OPEN, 0x0b0e);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+struct PACKET_CZ_NPC_BARTER_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_NPC_BARTER_CLOSE, 0x0b12);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
+struct PACKET_CZ_NPC_BARTER_PURCHASE_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ uint32 amount;
+ uint16 invIndex;
+ uint32 shopIndex;
+} __attribute__((packed));
+
+struct PACKET_CZ_NPC_BARTER_PURCHASE {
+ int16 packetType;
+ int16 packetLength;
+ struct PACKET_CZ_NPC_BARTER_PURCHASE_sub list[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_NPC_BARTER_PURCHASE, 0x0b0f);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+ uint8 disposable;
+ uint32 unknown;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x0b1a);
+#elif PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+ uint8 disposable;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x07fb);
+#elif PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_SAK_NUM >= 20080618 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x013e);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_CLIENT_VERSION {
+ int16 packetType;
+ uint32 clientVersion;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_CLIENT_VERSION, 0x044a);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
+struct PACKET_CZ_PING {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_PING, 0x0b1c);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
+struct PACKET_ZC_PING {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PING, 0x0b1d);
+#endif
+
+#if PACKETVER >= 20160622
+struct PACKET_CZ_COOLDOWN_RESET {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_COOLDOWN_RESET, 0x0a88);
+#endif
+
+#if PACKETVER >= 20151104
+struct PACKET_CZ_STYLE_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_STYLE_CLOSE, 0x0a48);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320 || PACKETVER_ZERO_NUM >= 20190410
+struct PACKET_ZC_LOAD_CONFIRM {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_LOAD_CONFIRM, 0x0b1b);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_PARTY_CONFIG {
+ int16 packetType;
+ uint8 denyPartyInvites;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PARTY_CONFIG, 0x02c9);
+#endif
+
+struct PACKET_ZC_ROLE_CHANGE {
+ int16 packetType;
+ int32 flag;
+ char name[NAME_LENGTH];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ROLE_CHANGE, 0x00e1);
+
+#if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_BAN_LIST_sub {
+ int char_id;
+ char message[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_BAN_LIST {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_BAN_LIST_sub chars[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0a87);
+// version unconfirmed
+#elif PACKETVER >= 20100803
+struct PACKET_ZC_BAN_LIST_sub {
+ char char_name[NAME_LENGTH];
+ char message[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_BAN_LIST {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_BAN_LIST_sub chars[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
+#else
+struct PACKET_ZC_BAN_LIST_sub {
+ char char_name[NAME_LENGTH];
+ char account_name[NAME_LENGTH];
+ char message[40];
+} __attribute__((packed));
+
+struct PACKET_ZC_BAN_LIST {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_BAN_LIST_sub chars[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20141008 || PACKETVER_RE_NUM >= 20140903 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ACK_CLOSE_ROULETTE {
+ int16 packetType;
+ uint8 result;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_ROULETTE, 0x0a1e);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ACK_MERGE_ITEM {
+ int16 packetType;
+ int16 index;
+ int16 amount;
+ uint8 reason;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_MERGE_ITEM, 0x096f);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_MERGE_ITEM_OPEN_sub {
+ int16 index;
+} __attribute__((packed));
+
+struct PACKET_ZC_MERGE_ITEM_OPEN {
+ int16 packetType;
+ uint16 packetLen;
+ struct PACKET_ZC_MERGE_ITEM_OPEN_sub items[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_MERGE_ITEM_OPEN, 0x096d);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT {
+ int16 packetType;
+ uint32 itemId; // unused
+ uint16 result;
+ uint32 cashPoints;
+ uint32 kafraPoints;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SE_PC_BUY_CASHITEM_RESULT, 0x0849);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_REFINE_OPEN_WINDOW {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_REFINE_OPEN_WINDOW, 0x0aa0);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_REFINE_ADD_ITEM {
+ int16 packetType;
+ int16 index;
+};
+DEFINE_PACKET_HEADER(CZ_REFINE_ADD_ITEM, 0x0aa1);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_REFINE_ADD_ITEM_SUB {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ int8 chance;
+ int32 zeny;
+} __attribute__((packed));
+
+struct PACKET_ZC_REFINE_ADD_ITEM {
+ int16 packetType;
+ int16 packtLength;
+ int16 itemIndex;
+ int8 blacksmithBlessing;
+ struct PACKET_ZC_REFINE_ADD_ITEM_SUB req[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_REFINE_ADD_ITEM, 0x0aa2);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_REFINE_ITEM_REQUEST {
+ int16 packetType;
+ int16 index;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ int8 blacksmithBlessing;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_REFINE_ITEM_REQUEST, 0x0aa3);
+
+struct PACKET_CZ_REFINE_WINDOW_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_REFINE_WINDOW_CLOSE, 0x0aa4);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_REFINE_STATUS {
+ int16 packetType;
+ char name[NAME_LENGTH];
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ int8 refine_level;
+ int8 status;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_REFINE_STATUS, 0x0ada);
+#endif
+
+
#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/party.c b/src/map/party.c
index e4fb18c23..dc330d92d 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -424,6 +424,12 @@ static int party_invite(struct map_session_data *sd, struct map_session_data *ts
return 0;
}
+ if ((tsd->status.allow_party & 1) != 0) {
+ // party invite blocked by player
+ clif->party_inviteack(sd, tsd->status.name, 5);
+ return 0;
+ }
+
tsd->party_invite=sd->status.party_id;
tsd->party_invite_account=sd->status.account_id;
diff --git a/src/map/pc.c b/src/map/pc.c
index fcd36a233..5416fbec2 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -568,7 +568,7 @@ static void pc_rental_expire(struct map_session_data *sd, int i)
int nameid;
nullpo_retv(sd);
- Assert_retv(i >= 0 && i < MAX_INVENTORY);
+ Assert_retv(i >= 0 && i < sd->status.inventorySize);
nameid = sd->status.inventory[i].nameid;
/* Soon to be dropped, we got plans to integrate it with item db */
@@ -637,11 +637,11 @@ static void pc_rental_expire(struct map_session_data *sd, int i)
}
static void pc_inventory_rentals(struct map_session_data *sd)
{
- int i, c = 0;
+ int c = 0;
int64 expire_tick, next_tick = INT64_MAX;
nullpo_retv(sd);
- for( i = 0; i < MAX_INVENTORY; i++ )
+ for (int i = 0; i < sd->status.inventorySize; i++ )
{ // Check for Rentals on Inventory
if( sd->status.inventory[i].nameid == 0 )
continue; // Nothing here
@@ -782,7 +782,7 @@ static int pc_equippoint(struct map_session_data *sd, int n)
int ep = 0;
nullpo_ret(sd);
- Assert_ret(n >= 0 && n < MAX_INVENTORY);
+ Assert_ret(n >= 0 && n < sd->status.inventorySize);
if(!sd->inventory_data[n])
return 0;
@@ -838,11 +838,9 @@ static int pc_item_equippoint(struct map_session_data *sd, struct item_data *id)
static int pc_setinventorydata(struct map_session_data *sd)
{
- int i;
-
nullpo_ret(sd);
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
int id = sd->status.inventory[i].nameid;
sd->inventory_data[i] = id?itemdb->search(id):NULL;
}
@@ -902,7 +900,7 @@ static int pc_setequipindex(struct map_session_data *sd)
for(i=0;i<EQI_MAX;i++)
sd->equip_index[i] = -1;
- for(i=0;i<MAX_INVENTORY;i++) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid <= 0)
continue;
if(sd->status.inventory[i].equip) {
@@ -1073,6 +1071,7 @@ static int pc_isequip(struct map_session_data *sd, int n)
struct item_data *item;
nullpo_ret(sd);
+ Assert_ret(n >= 0 && n < sd->status.inventorySize);
item = sd->inventory_data[n];
@@ -1379,6 +1378,7 @@ static bool pc_authok(struct map_session_data *sd, int login_id2, time_t expirat
pc->setpos(sd,sd->status.last_point.map,0,0,CLR_OUTSIGHT);
}
+ clif->inventoryExpansionInfo(sd);
clif->overweight_percent(sd);
clif->authok(sd);
@@ -2221,11 +2221,12 @@ static int pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, e
return 1;
}
-static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race_mask, int rate)
+static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, int id, bool is_group, int race_mask, int rate)
{
int i;
nullpo_ret(drop);
+ Assert_ret(is_group || id > 0);
//Apply config rate adjustment settings.
if (rate >= 0) { //Absolute drop.
if (battle_config.item_rate_adddrop != 100)
@@ -2240,17 +2241,14 @@ static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id
if (rate > -1)
rate = -1;
}
- for(i = 0; i < max && (drop[i].id || drop[i].group); i++) {
- if (((id && drop[i].id == id) || (group && drop[i].group == group))
- && race_mask != RCMASK_NONE
- ) {
+ for (i = 0; i < max && (drop[i].id != 0 || drop[i].is_group); i++) {
+ if (drop[i].id == id && race_mask != RCMASK_NONE) {
drop[i].race |= race_mask;
if (drop[i].rate > 0 && rate > 0) {
//Both are absolute rates.
if (drop[i].rate < rate)
drop[i].rate = rate;
- } else
- if(drop[i].rate < 0 && rate < 0) {
+ } else if (drop[i].rate < 0 && rate < 0) {
//Both are relative rates.
if (drop[i].rate > rate)
drop[i].rate = rate;
@@ -2264,7 +2262,7 @@ static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id
return 0;
}
drop[i].id = id;
- drop[i].group = group;
+ drop[i].is_group = is_group;
drop[i].race |= race_mask;
drop[i].rate = rate;
return 1;
@@ -3111,7 +3109,7 @@ static int pc_bonus(struct map_session_data *sd, int type, int val)
#endif
case SP_ADD_MONSTER_DROP_CHAINITEM:
if (sd->state.lr_flag != 2)
- pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, map->race_id2mask(RC_ALL), 10000);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), val, true, map->race_id2mask(RC_ALL), 10000);
break;
case SP_ADDMAXWEIGHT:
if (sd->state.lr_flag != 2)
@@ -3686,7 +3684,7 @@ static int pc_bonus2(struct map_session_data *sd, int type, int type2, int val)
break;
case SP_ADD_MONSTER_DROP_ITEM:
if (sd->state.lr_flag != 2)
- pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, map->race_id2mask(RC_ALL), val);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, false, map->race_id2mask(RC_ALL), val);
break;
case SP_SP_LOSS_RATE:
if(sd->state.lr_flag != 2) {
@@ -3892,7 +3890,7 @@ static int pc_bonus2(struct map_session_data *sd, int type, int type2, int val)
break;
}
if (sd->state.lr_flag != 2)
- pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, type2, race_mask, 10000);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, true, race_mask, 10000);
}
break;
#ifdef RENEWAL
@@ -3932,12 +3930,12 @@ static int pc_bonus3(struct map_session_data *sd, int type, int type2, int type3
break;
}
if (sd->state.lr_flag != 2)
- pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, race_mask, val);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, false, race_mask, val);
}
break;
case SP_ADD_CLASS_DROP_ITEM:
if(sd->state.lr_flag != 2)
- pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, -type3, val);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, false, -type3, val);
break;
case SP_AUTOSPELL:
if(sd->state.lr_flag != 2)
@@ -4308,7 +4306,7 @@ static bool pc_can_insert_card_into(struct map_session_data *sd, int idx_card, i
nullpo_ret(sd);
- if (idx_equip < 0 || idx_equip >= MAX_INVENTORY || sd->inventory_data[idx_equip] == NULL)
+ if (idx_equip < 0 || idx_equip >= sd->status.inventorySize || sd->inventory_data[idx_equip] == NULL)
return false; //Invalid item index.
if (sd->status.inventory[idx_equip].nameid <= 0 || sd->status.inventory[idx_equip].amount < 1)
return false; // target item missing
@@ -4342,7 +4340,7 @@ static bool pc_can_insert_card(struct map_session_data *sd, int idx_card)
{
nullpo_ret(sd);
- if (idx_card < 0 || idx_card >= MAX_INVENTORY || sd->inventory_data[idx_card] == NULL)
+ if (idx_card < 0 || idx_card >= sd->status.inventorySize || sd->inventory_data[idx_card] == NULL)
return false; //Invalid card index.
if (sd->status.inventory[idx_card].nameid <= 0 || sd->status.inventory[idx_card].amount < 1)
return false; // target card missing
@@ -4438,7 +4436,6 @@ static int pc_modifysellvalue(struct map_session_data *sd, int orig_value)
*------------------------------------------*/
static int pc_checkadditem(struct map_session_data *sd, int nameid, int amount)
{
- int i;
struct item_data* data;
nullpo_ret(sd);
@@ -4454,7 +4451,7 @@ static int pc_checkadditem(struct map_session_data *sd, int nameid, int amount)
if( data->stack.inventory && amount > data->stack.amount )
return ADDITEM_OVERAMOUNT;
- for(i=0;i<MAX_INVENTORY;i++){
+ for(int i = 0; i < sd->status.inventorySize; i++) {
// FIXME: This does not consider the checked item's cards, thus could check a wrong slot for stackability.
if(sd->status.inventory[i].nameid==nameid){
if( amount > MAX_AMOUNT - sd->status.inventory[i].amount || ( data->stack.inventory && amount > data->stack.amount - sd->status.inventory[i].amount ) )
@@ -4472,11 +4469,10 @@ static int pc_checkadditem(struct map_session_data *sd, int nameid, int amount)
*------------------------------------------*/
static int pc_inventoryblank(struct map_session_data *sd)
{
- int i,b;
-
nullpo_ret(sd);
+ int b = 0;
- for(i=0,b=0;i<MAX_INVENTORY;i++){
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid==0)
b++;
}
@@ -4673,8 +4669,8 @@ static int pc_search_inventory(struct map_session_data *sd, int item_id)
int i;
nullpo_retr(INDEX_NOT_FOUND, sd);
- ARR_FIND( 0, MAX_INVENTORY, i, sd->status.inventory[i].nameid == item_id && (sd->status.inventory[i].amount > 0 || item_id == 0) );
- return ( i < MAX_INVENTORY ) ? i : INDEX_NOT_FOUND;
+ ARR_FIND(0, sd->status.inventorySize, i, sd->status.inventory[i].nameid == item_id && (sd->status.inventory[i].amount > 0 || item_id == 0));
+ return (i < sd->status.inventorySize) ? i : INDEX_NOT_FOUND;
}
/*==========================================
@@ -4736,11 +4732,11 @@ static int pc_additem(struct map_session_data *sd, const struct item *item_data,
}
}
- i = MAX_INVENTORY;
+ i = sd->status.inventorySize;
// Stackable | Non Rental
if( itemdb->isstackable2(data) && item_data->expire_time == 0 ) {
- for( i = 0; i < MAX_INVENTORY; i++ ) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if( sd->status.inventory[i].nameid == item_data->nameid &&
sd->status.inventory[i].bound == item_data->bound &&
sd->status.inventory[i].expire_time == 0 &&
@@ -4755,7 +4751,7 @@ static int pc_additem(struct map_session_data *sd, const struct item *item_data,
}
}
- if ( i >= MAX_INVENTORY ) {
+ if (i >= sd->status.inventorySize) {
i = pc->search_inventory(sd,0);
if (i == INDEX_NOT_FOUND)
return 4;
@@ -4815,7 +4811,7 @@ static int pc_additem(struct map_session_data *sd, const struct item *item_data,
static int pc_delitem(struct map_session_data *sd, int n, int amount, int type, short reason, e_log_pick_type log_type)
{
nullpo_retr(1, sd);
- Assert_retr(1, n >= 0 && n < MAX_INVENTORY);
+ Assert_retr(1, n >= 0 && n < sd->status.inventorySize);
if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amount<amount || sd->inventory_data[n] == NULL)
return 1;
@@ -4849,7 +4845,7 @@ static int pc_dropitem(struct map_session_data *sd, int n, int amount)
{
nullpo_retr(1, sd);
- if(n < 0 || n >= MAX_INVENTORY)
+ if(n < 0 || n >= sd->status.inventorySize)
return 0;
if(amount <= 0)
@@ -4858,7 +4854,7 @@ static int pc_dropitem(struct map_session_data *sd, int n, int amount)
if(sd->status.inventory[n].nameid <= 0 ||
sd->status.inventory[n].amount <= 0 ||
sd->status.inventory[n].amount < amount ||
- sd->state.trading || sd->state.vending ||
+ sd->state.trading || sd->state.vending || sd->state.prevend ||
!sd->inventory_data[n] //pc->delitem would fail on this case.
)
return 0;
@@ -4960,7 +4956,7 @@ static int pc_isUseitem(struct map_session_data *sd, int n)
int nameid;
nullpo_ret(sd);
- Assert_ret(n >= 0 && n < MAX_INVENTORY);
+ Assert_ret(n >= 0 && n < sd->status.inventorySize);
item = sd->inventory_data[n];
nameid = sd->status.inventory[n].nameid;
@@ -5196,7 +5192,7 @@ static int pc_useitem(struct map_session_data *sd, int n)
bool removeItem = false;
nullpo_ret(sd);
- Assert_ret(n >= 0 && n < MAX_INVENTORY);
+ Assert_ret(n >= 0 && n < sd->status.inventorySize);
if (sd->npc_id || sd->state.workinprogress & 1) {
#if PACKETVER >= 20110308
@@ -5323,6 +5319,10 @@ static int pc_useitem(struct map_session_data *sd, int n)
if(sd->catch_target_class != -1) //Abort pet catching.
sd->catch_target_class = -1;
+ // Removes abracadabra/randomize spell flag for delayed consume items or item doesn't get consumed
+ if (sd->inventory_data[n]->flag.delay_consume)
+ sd->state.abra_flag = 0;
+
amount = sd->status.inventory[n].amount;
//Check if the item is to be consumed immediately [Skotlex]
if (sd->inventory_data[n]->flag.delay_consume || sd->inventory_data[n]->flag.keepafteruse)
@@ -5433,7 +5433,7 @@ static int pc_cart_delitem(struct map_session_data *sd, int n, int amount, int t
{
struct item_data * data;
nullpo_retr(1, sd);
- Assert_retr(1, n >= 0 && n < MAX_INVENTORY);
+ Assert_retr(1, n >= 0 && n < MAX_CART);
if( sd->status.cart[n].nameid == 0 || sd->status.cart[n].amount < amount || !(data = itemdb->exists(sd->status.cart[n].nameid)) )
return 1;
@@ -5467,12 +5467,12 @@ static int pc_putitemtocart(struct map_session_data *sd, int idx, int amount)
nullpo_ret(sd);
- if (idx < 0 || idx >= MAX_INVENTORY) //Invalid index check [Skotlex]
+ if (idx < 0 || idx >= sd->status.inventorySize) //Invalid index check [Skotlex]
return 1;
item_data = &sd->status.inventory[idx];
- if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending )
+ if (item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending || sd->state.prevend)
return 1;
if( (flag = pc->cart_additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0 )
@@ -5519,10 +5519,10 @@ static int pc_getitemfromcart(struct map_session_data *sd, int idx, int amount)
item_data=&sd->status.cart[idx];
- if(item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->state.vending )
+ if (item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending || sd->state.prevend)
return 1;
- if((flag = pc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0)
+ if ((flag = pc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0)
return pc->cart_delitem(sd,idx,amount,0,LOG_TYPE_NONE);
return flag;
@@ -5537,7 +5537,7 @@ static void pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type t
/* both restricted to inventory */
case IBT_PARTY:
case IBT_CHARACTER:
- for( i = 0; i < MAX_INVENTORY; i++ ){
+ for (i = 0; i < sd->status.inventorySize; i++ ) {
if( sd->status.inventory[i].bound == type ) {
pc->delitem(sd, i, sd->status.inventory[i].amount, 0, DELITEM_SKILLUSE, LOG_TYPE_OTHER); // FIXME: is this the correct reason flag?
}
@@ -5549,7 +5549,7 @@ static void pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type t
case IBT_GUILD: {
struct guild_storage *gstor = idb_get(gstorage->db,sd->status.guild_id);
- for( i = 0; i < MAX_INVENTORY; i++ ){
+ for (i = 0; i < sd->status.inventorySize; i++ ) {
if(sd->status.inventory[i].bound == type) {
if( gstor )
gstorage->additem(sd,gstor,&sd->status.inventory[i],sd->status.inventory[i].amount);
@@ -5706,7 +5706,7 @@ static int pc_steal_coin(struct map_session_data *sd, struct block_list *target,
* 1 - Invalid map index.
* 2 - Map not in this map-server, and failed to locate alternate map-server.
*------------------------------------------*/
-static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype)
+static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype)
{
int16 m;
@@ -5946,7 +5946,7 @@ static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int
* 0 = fail or FIXME success (from pc->setpos)
* x(1|2) = fail
*------------------------------------------*/
-static int pc_randomwarp(struct map_session_data *sd, clr_type type)
+static int pc_randomwarp(struct map_session_data *sd, enum clr_type type)
{
int x,y,i=0;
int16 m;
@@ -6147,7 +6147,7 @@ static int pc_checkequip(struct map_session_data *sd, int pos)
* Convert's from the client's lame Job ID system
* to the map server's 'makes sense' system. [Skotlex]
*------------------------------------------*/
-static int pc_jobid2mapid(int16 class)
+static int pc_jobid2mapid(int class)
{
switch (class) {
//Novice And 1-1 Jobs
@@ -6289,9 +6289,9 @@ static int pc_jobid2mapid(int16 class)
}
//Reverts the map-style class id to the client-style one.
-static int pc_mapid2jobid(uint16 job, int sex)
+static int pc_mapid2jobid(unsigned int class, int sex)
{
- switch (job) {
+ switch (class) {
//Novice And 1-1 Jobs
case MAPID_NOVICE: return JOB_NOVICE;
case MAPID_SWORDMAN: return JOB_SWORDMAN;
@@ -7945,7 +7945,7 @@ static int pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id)
return bonus;
}
-static void pc_respawn(struct map_session_data *sd, clr_type clrtype)
+static void pc_respawn(struct map_session_data *sd, enum clr_type clrtype)
{
if( !pc_isdead(sd) )
return; // not applicable
@@ -8138,7 +8138,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
if( battle_config.show_mob_info&4 )
{// update name with new level
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
}
}
src = battle->get_master(src); // Maybe Player Summon
@@ -8290,15 +8290,15 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
if(id == 0)
continue;
if(id == -1){
- int eq_num=0,eq_n[MAX_INVENTORY],k;
+ int eq_num = 0, eq_n[MAX_INVENTORY], k;
memset(eq_n,0,sizeof(eq_n));
- for(i=0;i<MAX_INVENTORY;i++){
+ for(i = 0; i < sd->status.inventorySize; i++) {
if( (type == 1 && !sd->status.inventory[i].equip)
|| (type == 2 && sd->status.inventory[i].equip)
|| type == 3)
{
- ARR_FIND( 0, MAX_INVENTORY, k, eq_n[k] <= 0 );
- if( k < MAX_INVENTORY )
+ ARR_FIND(0, sd->status.inventorySize, k, eq_n[k] <= 0);
+ if (k < sd->status.inventorySize)
eq_n[k] = i;
eq_num++;
@@ -8314,7 +8314,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
}
}
else if(id > 0){
- for(i=0;i<MAX_INVENTORY;i++){
+ for( i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid == id
&& rnd()%10000 < per
&& ((type == 1 && !sd->status.inventory[i].equip)
@@ -9008,6 +9008,13 @@ static int pc_jobchange(struct map_session_data *sd, int class, int upper)
if (sd->disguise != -1)
pc->disguise(sd, -1);
+ // Fix atcommand @jobchange when the player changing from 3rd job having alternate body style into non-3rd job, crashing the client
+ if (pc->has_second_costume(sd) == false) {
+ sd->status.body = 0;
+ sd->vd.body_style = 0;
+ clif->changelook(&sd->bl, LOOK_BODY2, sd->vd.body_style);
+ }
+
status->set_viewdata(&sd->bl, class);
clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); // move sprite update to prevent client crashes with incompatible equipment [Valaris]
if(sd->vd.cloth_color)
@@ -10145,7 +10152,7 @@ static int pc_equipitem(struct map_session_data *sd, int n, int req_pos)
nullpo_ret(sd);
- if( n < 0 || n >= MAX_INVENTORY ) {
+ if (n < 0 || n >= sd->status.inventorySize) {
clif->equipitemack(sd,0,0,EIA_FAIL);
return 0;
}
@@ -10353,7 +10360,7 @@ static int pc_unequipitem(struct map_session_data *sd, int n, int flag)
nullpo_ret(sd);
- if (n < 0 || n >= MAX_INVENTORY) {
+ if (n < 0 || n >= sd->status.inventorySize) {
clif->unequipitemack(sd, 0, 0, UIA_FAIL);
return 0;
}
@@ -10505,7 +10512,7 @@ static int pc_checkitem(struct map_session_data *sd)
int id = 0;
if (sd->itemcheck & PCCHECKITEM_INVENTORY) {
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if ((id = sd->status.inventory[i].nameid) == 0)
continue;
@@ -10585,7 +10592,7 @@ static int pc_checkitem(struct map_session_data *sd)
}
}
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].nameid == 0)
continue;
@@ -10759,11 +10766,14 @@ static int pc_divorce(struct map_session_data *sd)
// Both players online, lets do the divorce manually
sd->status.partner_id = 0;
p_sd->status.partner_id = 0;
- for( i = 0; i < MAX_INVENTORY; i++ )
+ for (i = 0; i < sd->status.inventorySize; i++)
{
- if( sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F )
+ if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F)
pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_DIVORCE);
- if( p_sd->status.inventory[i].nameid == WEDDING_RING_M || p_sd->status.inventory[i].nameid == WEDDING_RING_F )
+ }
+ for (i = 0; i < p_sd->status.inventorySize; i++)
+ {
+ if (p_sd->status.inventory[i].nameid == WEDDING_RING_M || p_sd->status.inventory[i].nameid == WEDDING_RING_F)
pc->delitem(p_sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_DIVORCE);
}
@@ -12332,11 +12342,29 @@ static bool pc_has_second_costume(struct map_session_data *sd)
{
nullpo_retr(false, sd);
- if ((sd->job & JOBL_THIRD) != 0)
+// FIXME: JOB_SUPER_NOVICE_E(4190) is not supposed to be 3rd Job. (Issue#2383)
+ if ((sd->job & JOBL_THIRD) != 0 && (sd->job & MAPID_BASEMASK) != MAPID_NOVICE)
return true;
return false;
}
+static bool pc_expandInventory(struct map_session_data *sd, int adjustSize)
+{
+ nullpo_retr(false, sd);
+ const int invSize = sd->status.inventorySize;
+ if (adjustSize > MAX_INVENTORY || invSize + adjustSize <= FIXED_INVENTORY_SIZE || invSize + adjustSize > MAX_INVENTORY) {
+ clif->inventoryExpandResult(sd, EXPAND_INVENTORY_RESULT_MAX_SIZE);
+ return false;
+ }
+ if (pc_isdead(sd) || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->chat_id != 0 || sd->state.trading || sd->state.storage_flag || sd->state.prevend) {
+ clif->inventoryExpandResult(sd, EXPAND_INVENTORY_RESULT_OTHER_WORK);
+ return false;
+ }
+ sd->status.inventorySize += adjustSize;
+ clif->inventoryExpansionInfo(sd);
+ return true;
+}
+
static void do_final_pc(void)
{
@@ -12739,4 +12767,5 @@ void pc_defaults(void)
pc->isDeathPenaltyJob = pc_isDeathPenaltyJob;
pc->has_second_costume = pc_has_second_costume;
+ pc->expandInventory = pc_expandInventory;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 8302279b1..7c89f7f32 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -117,22 +117,22 @@ BEGIN_ZEROED_BLOCK; // all the variables within this block get zero'ed in each c
int addrace2[RC2_MAX];
int addsize[3];
struct drain_data {
- short rate;
- short per;
- short value;
+ int rate;
+ int per;
+ int value;
unsigned type:1;
} hp_drain[RC_MAX], sp_drain[RC_MAX];
struct {
- short class_, rate;
+ int class_, rate;
} add_dmg[MAX_PC_BONUS];
struct {
- short flag, rate;
+ int flag, rate;
unsigned char ele;
} addele2[MAX_PC_BONUS];
END_ZEROED_BLOCK;
};
struct s_autospell {
- short id, lv, rate, flag;
+ int id, lv, rate, flag;
int card_id;
bool lock; // bAutoSpellOnSkill: blocks autospell from triggering again, while being executed
};
@@ -147,20 +147,20 @@ struct s_addeffect {
};
struct s_addeffectonskill {
enum sc_type id;
- short rate, skill;
+ int rate, skill;
unsigned char target;
};
struct s_add_drop {
+ bool is_group;
int id;
- short group;
int race, rate;
};
struct s_autobonus {
- short rate,atk_type;
+ int rate,atk_type;
unsigned int duration;
char *bonus_script, *other_script;
int active;
- unsigned short pos;
+ unsigned int pos;
};
enum npc_timeout_type {
NPCT_INPUT = 0,
@@ -219,11 +219,11 @@ struct map_session_data {
unsigned int changemap : 1;
unsigned int callshop : 1; // flag to indicate that a script used callshop; on a shop
short pmap; // Previous map on Map Change
- unsigned short autoloot;
+ unsigned int autoloot;
int autolootid[AUTOLOOTITEM_SIZE]; // [Zephyrus]
- unsigned short autoloottype;
+ unsigned int autoloottype;
unsigned int autolooting : 1; //performance-saver, autolooting state for @alootid
- unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish]
+ unsigned int autobonus; //flag to indicate if an autobonus is activated. [Inkfish]
unsigned int gmaster_flag : 1;
unsigned int prevend : 1;//used to flag wheather you've spent 40sp to open the vending or not.
unsigned int warping : 1;//states whether you're in the middle of a warp processing
@@ -237,6 +237,7 @@ struct map_session_data {
unsigned int standalone : 1;/* [Ind/Hercules <3] */
unsigned int loggingout : 1;
unsigned int warp_clean : 1;
+ unsigned int refine_ui : 1;
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
@@ -273,6 +274,9 @@ struct map_session_data {
int npc_item_flag; //Marks the npc_id with which you can change equipments during interactions with said npc (see script command enable_itemuse)
int npc_menu; // internal variable, used in npc menu handling
int npc_amount;
+ int npc_amount_min;
+ int npc_amount_max;
+ int npc_input_capped_range;
struct script_state *st;
char npc_str[CHATBOX_SIZE]; // for passing npc input box text to script engine
int npc_timer_id; //For player attached npc timers. [Skotlex]
@@ -288,7 +292,7 @@ struct map_session_data {
int followtimer; // [MouseJstr]
int followtarget;
time_t emotionlasttime; // to limit flood with emotion packets
- short skillitem,skillitemlv;
+ int skillitem,skillitemlv;
uint16 skill_id_old,skill_lv_old;
uint16 skill_id_dance,skill_lv_dance;
short cook_mastery; // range: [0,1999] [Inkfish]
@@ -312,7 +316,7 @@ struct map_session_data {
int16 weapontype; ///< Weapon type considering both hands (@see enum weapon_type).
int16 weapontype1; ///< Weapon type in the right/primary hand (@see enum weapon_type).
int16 weapontype2; ///< Weapon type in the left/secondary hand (@see enum weapon_type).
- short disguise; // [Valaris]
+ int disguise; // [Valaris]
struct weapon_data right_weapon, left_weapon;
BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of status_calc_pc()
@@ -337,9 +341,9 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int expaddrace[RC_MAX];
int ignore_mdef[RC_MAX];
int ignore_def[RC_MAX];
- short sp_gain_race[RC_MAX];
- short sp_gain_race_attack[RC_MAX];
- short hp_gain_race_attack[RC_MAX];
+ int sp_gain_race[RC_MAX];
+ int sp_gain_race_attack[RC_MAX];
+ int hp_gain_race_attack[RC_MAX];
#ifdef RENEWAL
int race_tolerance[RC_MAX];
#endif
@@ -347,16 +351,16 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
struct s_addeffect addeff[MAX_PC_BONUS], addeff2[MAX_PC_BONUS];
struct s_addeffectonskill addeff3[MAX_PC_BONUS];
struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills.
- unsigned short id;
- short val;
+ unsigned int id;
+ int val;
} skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS], skillfixcastrate[MAX_PC_BONUS];
struct {
- short value;
+ int value;
int rate;
int tick;
} hp_loss, sp_loss, hp_regen, sp_regen;
struct {
- short class_, rate;
+ int class_, rate;
} add_def[MAX_PC_BONUS], add_mdef[MAX_PC_BONUS], add_mdmg[MAX_PC_BONUS];
struct s_add_drop add_drop[MAX_PC_BONUS];
struct {
@@ -364,11 +368,11 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int rate;
} itemhealrate[MAX_PC_BONUS];
struct {
- short flag, rate;
+ int flag, rate;
unsigned char ele;
} subele2[MAX_PC_BONUS];
struct {
- short value;
+ int value;
int rate, tick;
} def_set_race[RC_MAX], mdef_set_race[RC_MAX];
struct {
@@ -394,17 +398,17 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
int shieldmdef;//royal guard's
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
- short splash_range, splash_add_range;
- short add_steal_rate;
- short add_heal_rate, add_heal2_rate;
- short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
- short hp_vanish_rate;
- short hp_vanish_per, hp_vanish_trigger;
- short sp_vanish_rate;
- short sp_vanish_per, sp_vanish_trigger;
- unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
- unsigned short unbreakable_equip; //100% break resistance on certain equipment
- unsigned short unstripable_equip;
+ int splash_range, splash_add_range;
+ int add_steal_rate;
+ int add_heal_rate, add_heal2_rate;
+ int sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
+ int hp_vanish_rate;
+ int hp_vanish_per, hp_vanish_trigger;
+ int sp_vanish_rate;
+ int sp_vanish_per, sp_vanish_trigger;
+ unsigned int unbreakable; // chance to prevent ANY equipment breaking [celest]
+ unsigned int unbreakable_equip; //100% break resistance on certain equipment
+ unsigned int unstripable_equip;
int fixcastrate,varcastrate;
int add_fixcast,add_varcast;
int ematk; // matk bonus from equipment
@@ -419,22 +423,22 @@ END_ZEROED_BLOCK;
int matk_rate;
int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
int itemid;
- short itemindex; //Used item's index in sd->inventory [Skotlex]
- short catch_target_class; // pet catching, stores a pet class to catch (short now) [zzo]
- short spiritball, spiritball_old;
+ int itemindex; //Used item's index in sd->inventory [Skotlex]
+ int catch_target_class;
+ int spiritball, spiritball_old;
int spirit_timer[MAX_SPIRITBALL];
- short charm_count;
+ int charm_count;
int charm_type;
int charm_timer[MAX_SPIRITCHARM];
unsigned char potion_success_counter; //Potion successes in row counter
unsigned char mission_count; //Stores the bounty kill count for TK_MISSION
- short mission_mobid; //Stores the target mob_id for TK_MISSION
+ int mission_mobid; //Stores the target mob_id for TK_MISSION
int die_counter; //Total number of times you've died
int devotion[MAX_PC_DEVOTION]; //Stores the account IDs of chars devoted to.
int trade_partner;
struct {
struct {
- short index, amount;
+ int index, amount;
} item[10];
int zeny, weight;
} deal;
@@ -465,18 +469,18 @@ END_ZEROED_BLOCK;
struct {
int m; //-1 - none, other: map index corresponding to map name.
- unsigned short index; //map index
+ unsigned int index; //map index
} feel_map[MAX_PC_FEELHATE];// 0 - Sun; 1 - Moon; 2 - Stars
- short hate_mob[MAX_PC_FEELHATE];
+ int hate_mob[MAX_PC_FEELHATE];
int pvp_timer;
- short pvp_point;
- unsigned short pvp_rank, pvp_lastusers;
- unsigned short pvp_won, pvp_lost;
+ int pvp_point;
+ unsigned int pvp_rank, pvp_lastusers;
+ unsigned int pvp_won, pvp_lost;
char eventqueue[MAX_EVENTQUEUE][EVENT_NAME_LENGTH];
int eventtimer[MAX_EVENTTIMER];
- unsigned short eventcount; // [celest]
+ unsigned int eventcount; // [celest]
int change_level_2nd; // job level when changing from 1st to 2nd class [jobchange_level in global_reg_value]
int change_level_3rd; // job level when changing from 2nd to 3rd class [jobchange_level_3rd in global_reg_value]
@@ -660,10 +664,10 @@ END_ZEROED_BLOCK;
#define pc_issit(sd) ( (sd)->vd.dead_sit == 2 )
#define pc_isidle(sd) ( (sd)->chat_id != 0 || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(sockt->last_tick, (sd)->idletime) >= battle->bc->idle_no_share )
#define pc_istrading(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading )
-#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chat_id != 0 || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
+#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chat_id != 0 || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend || (sd)->state.refine_ui == 1)
/* equals pc_cant_act except it doesn't check for chat rooms */
-#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
+#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend || (sd)->state.refine_ui == 1)
#define pc_setdir(sd,b,h) ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) )
#define pc_setchatid(sd,n) ( (sd)->chat_id = (n) )
@@ -769,24 +773,24 @@ END_ZEROED_BLOCK;
#define pc_can_give_bound_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE_BOUND) )
struct skill_tree_requirement {
- short id;
+ int id;
unsigned short idx;
unsigned char lv;
};
struct skill_tree_entry {
- short id;
+ int id;
unsigned short idx;
unsigned char max;
unsigned char joblv;
- short inherited;
+ int inherited;
VECTOR_DECL(struct skill_tree_requirement) need;
}; // Celest
struct sg_data {
- short anger_id;
- short bless_id;
- short comfort_id;
+ int anger_id;
+ int bless_id;
+ int comfort_id;
char feel_var[NAME_LENGTH];
char hate_var[NAME_LENGTH];
bool (*day_func)(void);
@@ -905,7 +909,7 @@ END_ZEROED_BLOCK; /* End */
int (*setrestartvalue) (struct map_session_data *sd,int type);
int (*makesavestatus) (struct map_session_data *sd);
- void (*respawn) (struct map_session_data* sd, clr_type clrtype);
+ void (*respawn) (struct map_session_data* sd, enum clr_type clrtype);
int (*setnewpc) (struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd);
bool (*authok) (struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers);
void (*authfail) (struct map_session_data *sd);
@@ -927,9 +931,9 @@ END_ZEROED_BLOCK; /* End */
int (*calc_skilltree_normalize_job) (struct map_session_data *sd);
int (*clean_skilltree) (struct map_session_data *sd);
- int (*setpos) (struct map_session_data* sd, unsigned short map_index, int x, int y, clr_type clrtype);
+ int (*setpos) (struct map_session_data* sd, unsigned short map_index, int x, int y, enum clr_type clrtype);
int (*setsavepoint) (struct map_session_data *sd, short map_index, int x, int y);
- int (*randomwarp) (struct map_session_data *sd,clr_type type);
+ int (*randomwarp) (struct map_session_data *sd, enum clr_type type);
int (*memo) (struct map_session_data* sd, int pos);
int (*checkadditem) (struct map_session_data *sd,int nameid,int amount);
@@ -1068,8 +1072,8 @@ END_ZEROED_BLOCK; /* End */
void (*setstand) (struct map_session_data *sd);
int (*candrop) (struct map_session_data *sd,struct item *item);
- int (*jobid2mapid) (int16 class); // Skotlex
- int (*mapid2jobid) (unsigned short class_, int sex); // Skotlex
+ int (*jobid2mapid) (int class); // Skotlex
+ int (*mapid2jobid) (unsigned int class_, int sex); // Skotlex
const char * (*job_name) (int class);
@@ -1124,7 +1128,7 @@ END_ZEROED_BLOCK; /* End */
int (*bonus_autospell_onskill) (struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int card_id);
int (*bonus_addeff) (struct s_addeffect* effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration);
int (*bonus_addeff_onskill) (struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target);
- int (*bonus_item_drop) (struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
+ int (*bonus_item_drop) (struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate);
void (*calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src);
int (*respawn_timer) (int tid, int64 tick, int id, intptr_t data);
int (*jobchange_killclone) (struct block_list *bl, va_list ap);
@@ -1185,6 +1189,7 @@ END_ZEROED_BLOCK; /* End */
bool (*check_basicskill) (struct map_session_data *sd, int level);
bool (*isDeathPenaltyJob) (uint16 job);
bool (*has_second_costume) (struct map_session_data *sd);
+ bool (*expandInventory) (struct map_session_data *sd, int adjustSize);
};
#ifdef HERCULES_CORE
diff --git a/src/map/pet.c b/src/map/pet.c
index c32a92b78..ce26b6cb1 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -94,10 +94,10 @@ static void pet_set_intimate(struct pet_data *pd, int value)
if (value <= 0) {
int i;
- ARR_FIND(0, MAX_INVENTORY, i, sd->status.inventory[i].card[0] == CARD0_PET &&
+ ARR_FIND(0, sd->status.inventorySize, i, sd->status.inventory[i].card[0] == CARD0_PET &&
pd->pet.pet_id == MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2]));
- if (i != MAX_INVENTORY) {
+ if (i != sd->status.inventorySize) {
pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_EGG);
}
}
@@ -111,8 +111,8 @@ static int pet_create_egg(struct map_session_data *sd, int item_id)
if (!pc->inventoryblank(sd)) return 0; // Inventory full
sd->catch_target_class = pet->db[pet_id].class_;
intif->create_pet(sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_,
- (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_,
+ mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0,
(short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
@@ -251,7 +251,7 @@ static int pet_hungry(int tid, int64 tick, int id, intptr_t data)
pd->pet.hungry--;
/* Pet Autofeed */
- if (battle_config.feature_enable_homun_autofeed != 0) {
+ if (battle_config.feature_enable_pet_autofeed != 0) {
if (pd->petDB->autofeed == 1 && pd->pet.autofeed == 1 && pd->pet.hungry <= 25) {
pet->food(sd, pd);
}
@@ -342,12 +342,27 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
pet->lootitem_drop(pd,sd);
// Pet Evolution
- ARR_FIND(0, MAX_INVENTORY, i, sd->status.inventory[i].card[0] == CARD0_PET &&
+ ARR_FIND(0, sd->status.inventorySize, i, sd->status.inventory[i].card[0] == CARD0_PET &&
pd->pet.pet_id == MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2]));
- if (i != MAX_INVENTORY) {
+ if (i != sd->status.inventorySize) {
sd->status.inventory[i].attribute &= ~ATTR_BROKEN;
sd->status.inventory[i].bound = IBT_NONE;
+ } else {
+ // The pet egg wasn't found: it was probably hatched with the old system that deleted the egg.
+ struct item tmp_item = {0};
+ int flag;
+
+ tmp_item.nameid = pd->petDB->EggID;
+ tmp_item.identify = 1;
+ tmp_item.card[0] = CARD0_PET;
+ tmp_item.card[1] = GetWord(pd->pet.pet_id, 0);
+ tmp_item.card[2] = GetWord(pd->pet.pet_id, 1);
+ tmp_item.card[3] = pd->pet.rename_flag;
+ if ((flag = pc->additem(sd, &tmp_item, 1, LOG_TYPE_EGG)) != 0) {
+ clif->additem(sd, 0, 0, flag);
+ map->addflooritem(&sd->bl, &tmp_item, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false);
+ }
}
#if PACKETVER >= 20180704
clif->inventoryList(sd);
@@ -492,10 +507,10 @@ static int pet_recv_petdata(int account_id, struct s_pet *p, int flag)
if(p->incubate == 1) {
int i;
// Get Egg Index
- ARR_FIND(0, MAX_INVENTORY, i, sd->status.inventory[i].card[0] == CARD0_PET &&
+ ARR_FIND(0, sd->status.inventorySize, i, sd->status.inventory[i].card[0] == CARD0_PET &&
p->pet_id == MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2]));
- if(i == MAX_INVENTORY) {
+ if(i == sd->status.inventorySize) {
ShowError("pet_recv_petdata: Hatching pet (%d:%s) aborted, couldn't find egg in inventory for removal!\n",p->pet_id, p->name);
sd->status.pet_id = 0;
return 1;
@@ -527,7 +542,7 @@ static int pet_select_egg(struct map_session_data *sd, int egg_index)
{
nullpo_ret(sd);
- if(egg_index < 0 || egg_index >= MAX_INVENTORY)
+ if (egg_index < 0 || egg_index >= sd->status.inventorySize)
return 0; //Forged packet!
if(sd->status.inventory[egg_index].card[0] == CARD0_PET)
@@ -614,7 +629,7 @@ static int pet_catch_process2(struct map_session_data *sd, int target_id)
* pet_id - Should contain pet id otherwise means failure
* returns true on success
**/
-static bool pet_get_egg(int account_id, short pet_class, int pet_id)
+static bool pet_get_egg(int account_id, int pet_class, int pet_id)
{
struct map_session_data *sd;
struct item tmp_item;
@@ -733,7 +748,7 @@ static int pet_change_name_ack(struct map_session_data *sd, const char *name, in
}
safestrncpy(pd->pet.name, newname, NAME_LENGTH);
aFree(newname);
- clif->charnameack (0,&pd->bl);
+ clif->blname_ack(0,&pd->bl);
pd->pet.rename_flag = 1;
clif->send_petdata(NULL, sd->pd, 3, sd->pd->vd.head_bottom);
clif->send_petstatus(sd);
diff --git a/src/map/pet.h b/src/map/pet.h
index 049816804..2508a70a6 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -37,7 +37,7 @@ struct pet_evolve_data {
};
struct s_pet_db {
- short class_;
+ int class_;
char name[NAME_LENGTH],jname[NAME_LENGTH];
int itemID;
int EggID;
@@ -160,7 +160,7 @@ struct pet_interface {
int (*select_egg) (struct map_session_data *sd, int egg_index);
int (*catch_process1) (struct map_session_data *sd, int target_class);
int (*catch_process2) (struct map_session_data *sd, int target_id);
- bool (*get_egg) (int account_id, short pet_class, int pet_id );
+ bool (*get_egg) (int account_id, int pet_class, int pet_id );
int (*unequipitem) (struct map_session_data *sd, struct pet_data *pd);
int (*food) (struct map_session_data *sd, struct pet_data *pd);
int (*ai_sub_hard_lootsearch) (struct block_list *bl, va_list ap);
diff --git a/src/map/quest.c b/src/map/quest.c
index f10d6847f..9540b411d 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -672,21 +672,22 @@ static int quest_questinfo_validate_icon(int icon)
*/
static void quest_questinfo_refresh(struct map_session_data *sd)
{
- int i;
-
nullpo_retv(sd);
- for (i = 0; i < VECTOR_LENGTH(map->list[sd->bl.m].qi_data); i++) {
- struct questinfo *qi = &VECTOR_INDEX(map->list[sd->bl.m].qi_data, i);
- // Remove the bubbles if one of the conditions is no longer valid.
- if (quest->questinfo_validate(sd, qi) == false) {
+ for (int i = 0; i < VECTOR_LENGTH(map->list[sd->bl.m].qi_list); i++) {
+ struct npc_data *nd = &VECTOR_INDEX(map->list[sd->bl.m].qi_list, i);
+
+ int j;
+ ARR_FIND(0, VECTOR_LENGTH(nd->qi_data), j, quest->questinfo_validate(sd, &VECTOR_INDEX(nd->qi_data, j)) == true);
+ if (j != VECTOR_LENGTH(nd->qi_data)) {
+ struct questinfo *qi = &VECTOR_INDEX(nd->qi_data, j);
+ clif->quest_show_event(sd, &nd->bl, qi->icon, qi->color);
+ } else {
#if PACKETVER >= 20120410
- clif->quest_show_event(sd, &qi->nd->bl, 9999, 0);
+ clif->quest_show_event(sd, &nd->bl, 9999, 0);
#else
- clif->quest_show_event(sd, &qi->nd->bl, 0, 0);
+ clif->quest_show_event(sd, &nd->bl, 0, 0);
#endif
- } else {
- clif->quest_show_event(sd, &qi->nd->bl, qi->icon, qi->color);
}
}
}
@@ -814,7 +815,7 @@ static bool quest_questinfo_validate_items(struct map_session_data *sd, struct q
for (int i = 0; i < VECTOR_LENGTH(qi->items); i++) {
struct questinfo_itemreq *item = &VECTOR_INDEX(qi->items, i);
int count = 0;
- for (int j = 0; j < MAX_INVENTORY; j++) {
+ for (int j = 0; j < sd->status.inventorySize; j++) {
if (sd->status.inventory[j].nameid == item->nameid)
count += sd->status.inventory[j].amount;
}
@@ -927,26 +928,6 @@ static bool quest_questinfo_validate_mercenary_class(struct map_session_data *sd
}
/**
- * Clears the questinfo data vector
- *
- * @param m mapindex.
- *
- */
-static void quest_questinfo_vector_clear(int m)
-{
- int i;
-
- Assert_retv(m >= 0 && m < map->count);
-
- for (i = 0; i < VECTOR_LENGTH(map->list[m].qi_data); i++) {
- struct questinfo *qi_data = &VECTOR_INDEX(map->list[m].qi_data, i);
- VECTOR_CLEAR(qi_data->items);
- VECTOR_CLEAR(qi_data->quest_requirement);
- }
- VECTOR_CLEAR(map->list[m].qi_data);
-}
-
-/**
* Initializes the quest interface.
*
* @param minimal Run in minimal mode (skips most of the loading)
@@ -1020,5 +1001,4 @@ void quest_defaults(void)
quest->questinfo_validate_homunculus_type = quest_questinfo_validate_homunculus_type;
quest->questinfo_validate_quests = quest_questinfo_validate_quests;
quest->questinfo_validate_mercenary_class = quest_questinfo_validate_mercenary_class;
- quest->questinfo_vector_clear = quest_questinfo_vector_clear;
}
diff --git a/src/map/quest.h b/src/map/quest.h
index 206a7902f..d60b9b33c 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -60,6 +60,39 @@ enum quest_check_type {
HUNTING, ///< Check if the given hunting quest's requirements have been met
};
+struct questinfo_qreq {
+ int id;
+ int state;
+};
+
+struct questinfo_itemreq {
+ int nameid;
+ int min;
+ int max;
+};
+
+struct questinfo {
+ unsigned short icon;
+ unsigned char color;
+ bool hasJob;
+ unsigned int job;/* perhaps a mapid mask would be most flexible? */
+ bool sex_enabled;
+ int sex;
+ struct {
+ int min;
+ int max;
+ } base_level;
+ struct {
+ int min;
+ int max;
+ } job_level;
+ VECTOR_DECL(struct questinfo_itemreq) items;
+ struct s_homunculus homunculus;
+ int homunculus_type;
+ VECTOR_DECL(struct questinfo_qreq) quest_requirement;
+ int mercenary_class;
+};
+
struct quest_interface {
struct quest_db **db_data; ///< Quest database
struct quest_db dummy; ///< Dummy entry for invalid quest lookups
@@ -93,7 +126,6 @@ struct quest_interface {
bool (*questinfo_validate_homunculus_type) (struct map_session_data *sd, struct questinfo *qi);
bool (*questinfo_validate_quests) (struct map_session_data *sd, struct questinfo *qi);
bool (*questinfo_validate_mercenary_class) (struct map_session_data *sd, struct questinfo *qi);
- void (*questinfo_vector_clear) (int m);
};
#ifdef HERCULES_CORE
diff --git a/src/map/refine.c b/src/map/refine.c
new file mode 100644
index 000000000..4fe6e73c4
--- /dev/null
+++ b/src/map/refine.c
@@ -0,0 +1,669 @@
+/**
+* This file is part of Hercules.
+* http://herc.ws - http://github.com/HerculesWS/Hercules
+*
+* Copyright (C) 2019 Hercules Dev Team
+*
+* Hercules is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define HERCULES_CORE
+
+#include "refine.p.h"
+#include "common/cbasetypes.h"
+#include "common/nullpo.h"
+#include "common/random.h"
+#include "common/showmsg.h"
+#include "common/strlib.h"
+#include "common/utils.h"
+#include "map/itemdb.h"
+#include "map/map.h"
+#include "map/pc.h"
+#include "map/script.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/** @file
+* Implementation of the refine interface.
+*/
+
+static struct refine_interface refine_s;
+static struct refine_interface_private refine_p;
+static struct refine_interface_dbs refine_dbs;
+struct refine_interface *refine;
+
+/// @copydoc refine_interface::refinery_refine_request()
+static void refine_refinery_refine_request(struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing)
+{
+ nullpo_retv(sd);
+
+ if (item_index < 0 || item_index >= sd->status.inventorySize)
+ return;
+
+ if (!refine->p->is_refinable(sd, item_index))
+ return;
+
+ int weapon_level = itemdb_wlv(sd->status.inventory[item_index].nameid);
+ int refine_level = sd->status.inventory[item_index].refine;
+ int i = 0;
+ const struct s_refine_requirement *req = &refine->p->dbs->refine_info[weapon_level].refine_requirements[refine_level];
+ ARR_FIND(0, req->req_count, i, req->req[i].nameid == material_id);
+
+ if (i == req->req_count)
+ return;
+
+ if (use_blacksmith_blessing && req->blacksmith_blessing == 0)
+ return;
+
+ if (sd->status.zeny < req->req[i].cost)
+ return;
+
+ if (use_blacksmith_blessing) {
+ int count = 0;
+ for (int k = 0; k < sd->status.inventorySize; ++k) {
+ if (sd->status.inventory[k].nameid == ITEMID_BLACKSMITH_BLESSING)
+ count += sd->status.inventory[k].amount;
+ }
+
+ if (count < req->blacksmith_blessing)
+ return;
+ }
+
+ int idx;
+ if ((idx = pc->search_inventory(sd, req->req[i].nameid)) == INDEX_NOT_FOUND)
+ return;
+
+ if (use_blacksmith_blessing) {
+ int amount = req->blacksmith_blessing;
+ for (int k = 0; k < sd->status.inventorySize; ++k) {
+ if (sd->status.inventory[k].nameid != ITEMID_BLACKSMITH_BLESSING)
+ continue;
+
+ int delamount = (amount < sd->status.inventory[k].amount) ? amount : sd->status.inventory[k].amount;
+ if (pc->delitem(sd, k, delamount, 0, DELITEM_NORMAL, LOG_TYPE_REFINE) != 0)
+ break;
+
+ amount -= delamount;
+ if (amount == 0)
+ break;
+ }
+ }
+
+ if (pc->delitem(sd, idx, 1, 0, DELITEM_NORMAL, LOG_TYPE_REFINE) != 0)
+ return;
+
+ if (pc->payzeny(sd, req->req[i].cost, LOG_TYPE_REFINE, NULL) != 0)
+ return;
+
+ int refine_chance = refine->get_refine_chance(weapon_level, refine_level, req->req[i].type);
+ if (rnd() % 100 >= refine_chance) {
+ clif->misceffect(&sd->bl, 2);
+
+ int failure_behabior = (use_blacksmith_blessing) ? REFINE_FAILURE_BEHAVIOR_KEEP : req->req[i].failure_behavior;
+ switch (failure_behabior) {
+ case REFINE_FAILURE_BEHAVIOR_KEEP:
+ clif->refine(sd->fd, 1, 0, sd->status.inventory[item_index].refine);
+ refine->refinery_add_item(sd, item_index);
+ break;
+ case REFINE_FAILURE_BEHAVIOR_DOWNGRADE:
+ sd->status.inventory[item_index].refine -= 1;
+ sd->status.inventory[item_index].refine = cap_value(sd->status.inventory[item_index].refine, 0, MAX_REFINE);
+ clif->refine(sd->fd, 2, item_index, sd->status.inventory[item_index].refine);
+ logs->pick_pc(sd, LOG_TYPE_REFINE, 1, &sd->status.inventory[item_index], sd->inventory_data[item_index]);
+ refine->refinery_add_item(sd, item_index);
+ break;
+ case REFINE_FAILURE_BEHAVIOR_DESTROY:
+ default:
+ clif->refine(sd->fd, 1, item_index, sd->status.inventory[item_index].refine);
+ pc->delitem(sd, item_index, 1, 0, DELITEM_FAILREFINE, LOG_TYPE_REFINE);
+ break;
+ }
+
+ if ((req->announce & REFINE_ANNOUNCE_FAILURE) != 0)
+ clif->announce_refine_status(sd, sd->status.inventory[item_index].nameid, sd->status.inventory[item_index].refine, false, ALL_CLIENT);
+ } else {
+ sd->status.inventory[item_index].refine += 1;
+ sd->status.inventory[item_index].refine = cap_value(sd->status.inventory[item_index].refine, 0, MAX_REFINE);
+
+ clif->misceffect(&sd->bl, 3);
+ clif->refine(sd->fd, 0, item_index, sd->status.inventory[item_index].refine);
+ logs->pick_pc(sd, LOG_TYPE_REFINE, 1, &sd->status.inventory[item_index], sd->inventory_data[item_index]);
+ refine->refinery_add_item(sd, item_index);
+
+ if ((req->announce & REFINE_ANNOUNCE_SUCCESS) != 0)
+ clif->announce_refine_status(sd, sd->status.inventory[item_index].nameid, sd->status.inventory[item_index].refine, true, ALL_CLIENT);
+ }
+}
+
+/// @copydoc refine_interface::refinery_add_item()
+static void refine_refinery_add_item(struct map_session_data *sd, int item_index)
+{
+ nullpo_retv(sd);
+
+ if (item_index < 0 || item_index >= sd->status.inventorySize)
+ return;
+
+ if (!refine->p->is_refinable(sd, item_index))
+ return;
+
+ int weapon_level = itemdb_wlv(sd->status.inventory[item_index].nameid);
+ int refine_level = sd->status.inventory[item_index].refine;
+ clif->AddItemRefineryUIAck(sd, item_index, &refine->p->dbs->refine_info[weapon_level].refine_requirements[refine_level]);
+}
+
+/// @copydoc refine_interface_private::is_refinable()
+static bool refine_is_refinable(struct map_session_data *sd, int item_index)
+{
+ nullpo_retr(false, sd);
+ Assert_retr(false, item_index >= 0 && item_index < sd->status.inventorySize);
+
+ if (sd->status.inventory[item_index].nameid == 0)
+ return false;
+
+ struct item_data *itd = itemdb->search(sd->status.inventory[item_index].nameid);
+
+ if (itd == &itemdb->dummy)
+ return false;
+
+ if (itd->type != IT_WEAPON && itd->type != IT_ARMOR)
+ return false;
+
+ if (itd->flag.no_refine == 1)
+ return false;
+
+ if (sd->status.inventory[item_index].identify == 0)
+ return false;
+
+ if (sd->status.inventory[item_index].refine >= MAX_REFINE || sd->status.inventory[item_index].expire_time > 0)
+ return false;
+
+ if ((sd->status.inventory[item_index].attribute & ATTR_BROKEN) != 0)
+ return false;
+
+ return true;
+}
+
+/// @copydoc refine_interface::get_randombonus_max()
+static int refine_get_randombonus_max(enum refine_type equipment_type, int refine_level)
+{
+ Assert_ret((int)equipment_type >= REFINE_TYPE_ARMOR && equipment_type < REFINE_TYPE_MAX);
+ Assert_ret(refine_level > 0 && refine_level <= MAX_REFINE);
+
+ return refine->p->dbs->refine_info[equipment_type].randombonus_max[refine_level - 1];
+}
+
+/// @copydoc refine_interface::get_bonus()
+static int refine_get_bonus(enum refine_type equipment_type, int refine_level)
+{
+ Assert_ret((int)equipment_type >= REFINE_TYPE_ARMOR && equipment_type < REFINE_TYPE_MAX);
+ Assert_ret(refine_level > 0 && refine_level <= MAX_REFINE);
+
+ return refine->p->dbs->refine_info[equipment_type].bonus[refine_level - 1];
+}
+
+/// @copydoc refine_interface::get_refine_chance()
+static int refine_get_refine_chance(enum refine_type wlv, int refine_level, enum refine_chance_type type)
+{
+ Assert_ret((int)wlv >= REFINE_TYPE_ARMOR && wlv < REFINE_TYPE_MAX);
+
+ if (refine_level < 0 || refine_level >= MAX_REFINE)
+ return 0;
+
+ if (type >= REFINE_CHANCE_TYPE_MAX)
+ return 0;
+
+ return refine->p->dbs->refine_info[wlv].chance[type][refine_level];
+}
+
+/// @copydoc refine_interface_private::announce_behavior_string2enum()
+static bool refine_announce_behavior_string2enum(const char *str, unsigned int *result)
+{
+ nullpo_retr(false, str);
+ nullpo_retr(false, result);
+
+ if (strcasecmp(str, "Success") == 0)
+ *result = REFINE_ANNOUNCE_SUCCESS;
+ else if (strcasecmp(str, "Failure") == 0)
+ *result = REFINE_ANNOUNCE_FAILURE;
+ else if (strcasecmp(str, "Always") == 0)
+ *result = REFINE_ANNOUNCE_ALWAYS;
+ else
+ return false;
+
+ return true;
+}
+
+/// @copydoc refine_interface_private::failure_behavior_string2enum()
+static bool refine_failure_behavior_string2enum(const char *str, enum refine_ui_failure_behavior *result)
+{
+ nullpo_retr(false, str);
+ nullpo_retr(false, result);
+
+ if (strcasecmp(str, "Destroy") == 0)
+ *result = REFINE_FAILURE_BEHAVIOR_DESTROY;
+ else if (strcasecmp(str, "Keep") == 0)
+ *result = REFINE_FAILURE_BEHAVIOR_KEEP;
+ else if (strcasecmp(str, "Downgrade") == 0)
+ *result = REFINE_FAILURE_BEHAVIOR_DOWNGRADE;
+ else
+ return false;
+
+ return true;
+}
+
+/// @copydoc refine_interface_private::readdb_refinery_ui_settings_items()
+static bool refine_readdb_refinery_ui_settings_items(const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source)
+{
+ nullpo_retr(false, elem);
+ nullpo_retr(false, req);
+ nullpo_retr(false, name);
+ nullpo_retr(false, source);
+ Assert_retr(false, req->req_count < MAX_REFINE_REQUIREMENTS);
+
+ const char *aegis_name = config_setting_name(elem);
+ struct item_data *itd;
+
+ if ((itd = itemdb->search_name(aegis_name)) == NULL) {
+ ShowWarning("refine_readdb_requirements_items: Invalid item '%s' passed to requirements of '%s' in \"%s\" skipping...\n", aegis_name, name, source);
+ return false;
+ }
+
+ for (int i = 0; i < req->req_count; ++i) {
+ if (req->req[i].nameid == itd->nameid) {
+ ShowWarning("refine_readdb_requirements_items: Duplicated item '%s' passed to requirements of '%s' in \"%s\" skipping...\n", aegis_name, name, source);
+ return false;
+ }
+ }
+
+ const char *type_string = NULL;
+ if (libconfig->setting_lookup_string(elem, "Type", &type_string) == CONFIG_FALSE) {
+ ShowWarning("refine_readdb_requirements_items: no type passed to item '%s' of requirements of '%s' in \"%s\" skipping...\n", aegis_name, name, source);
+ return false;
+ }
+
+ int type;
+ if (!script->get_constant(type_string, &type)) {
+ ShowWarning("refine_readdb_requirements_items: invalid type '%s' passed to item '%s' of requirements of '%s' in \"%s\" skipping...\n", type_string, aegis_name, name, source);
+ return false;
+ }
+
+ int cost = 0;
+ if (libconfig->setting_lookup_int(elem, "Cost", &cost) == CONFIG_TRUE) {
+ if (cost < 1) {
+ ShowWarning("refine_readdb_requirements_items: invalid cost value %d passed to item '%s' of requirements of '%s' in \"%s\" defaulting to 0...\n", cost, aegis_name, name, source);
+ cost = 0;
+ }
+ }
+
+ enum refine_ui_failure_behavior behavior = REFINE_FAILURE_BEHAVIOR_DESTROY;
+ const char *behavior_string = NULL;
+ if (libconfig->setting_lookup_string(elem, "FailureBehavior", &behavior_string) != CONFIG_FALSE) {
+ if (!refine->p->failure_behavior_string2enum(behavior_string, &behavior)) {
+ ShowWarning("refine_readdb_requirements_items: invalid failure behavior value %s passed to item '%s' of requirements of '%s' in \"%s\" defaulting to 'Destroy'...\n", behavior_string, aegis_name, name, source);
+ }
+ }
+
+ req->req[req->req_count].nameid = itd->nameid;
+ req->req[req->req_count].type = type;
+ req->req[req->req_count].cost = cost;
+ req->req[req->req_count].failure_behavior = behavior;
+ req->req_count++;
+
+ return true;
+}
+
+/// @copydoc refine_interface_private::readdb_refinery_ui_settings_sub()
+static bool refine_readdb_refinery_ui_settings_sub(const struct config_setting_t *elem, int type, const char *name, const char *source)
+{
+ nullpo_retr(false, elem);
+ nullpo_retr(false, name);
+ nullpo_retr(false, source);
+ Assert_retr(0, type >= REFINE_TYPE_ARMOR && type < REFINE_TYPE_MAX);
+
+ struct config_setting_t *level_t;
+ bool levels[MAX_REFINE] = {0};
+
+ if ((level_t = libconfig->setting_get_member(elem, "Level")) == NULL) {
+ ShowWarning("refine_readdb_requirements_sub: a requirements element missing level field for entry '%s' in \"%s\" skipping...\n", name, source);
+ return false;
+ }
+
+ if (config_setting_is_scalar(level_t)) {
+ if (!config_setting_is_number(level_t)) {
+ ShowWarning("refine_readdb_requirements_sub: expected 'Level' field to be an integer '%s' in \"%s\" skipping...\n", name, source);
+ return false;
+ }
+
+ int refine_level = libconfig->setting_get_int(level_t);
+ if (refine_level < 1 || refine_level > MAX_REFINE) {
+ ShowWarning("refine_readdb_requirements_sub: Invalid 'Level' given value %d expected a value between %d and %d '%s' in \"%s\" skipping...\n", refine_level, 1, MAX_REFINE, name, source);
+ return false;
+ }
+
+ levels[refine_level - 1] = true;
+ } else if (config_setting_is_aggregate(level_t)) {
+ if (libconfig->setting_length(level_t) != 2) {
+ ShowWarning("refine_readdb_requirements_sub: invalid length for Level array, expected 2 found %d for entry '%s' in \"%s\" skipping...\n", libconfig->setting_length(level_t), name, source);
+ return false;
+ }
+
+ int levels_range[2];
+ const struct config_setting_t *level_entry = NULL;
+ int i = 0,
+ k = 0;
+ while ((level_entry = libconfig->setting_get_elem(level_t, i++)) != NULL) {
+ if (!config_setting_is_number(level_entry)) {
+ ShowWarning("refine_readdb_requirements_sub: expected 'Level' array field to be an integer '%s' in \"%s\" skipping...\n", name, source);
+ return false;
+ }
+
+ levels_range[k] = libconfig->setting_get_int(level_entry);
+ if (levels_range[k] < 1 || levels_range[k] > MAX_REFINE) {
+ ShowWarning("refine_readdb_requirements_sub: Invalid 'Level' given value %d expected a value between %d and %d in entry'%s' in \"%s\" skipping...\n", levels_range[k], 1, MAX_REFINE, name, source);
+ return false;
+ }
+
+ ++k;
+ }
+
+ if (!(levels_range[0] < levels_range[1])) {
+ ShowWarning("refine_readdb_requirements_sub: Invalid 'Level' range was given low %d high %d in entry'%s' in \"%s\" skipping...\n", levels_range[0], levels_range[1], name, source);
+ return false;
+ }
+
+ for (i = levels_range[0] - 1; i < levels_range[1]; ++i) {
+ levels[i] = true;
+ }
+ }
+
+ struct s_refine_requirement req = {0};
+ if (libconfig->setting_lookup_int(elem, "BlacksmithBlessing", &req.blacksmith_blessing) == CONFIG_TRUE) {
+ if (req.blacksmith_blessing < 1 || req.blacksmith_blessing > INT8_MAX) {
+ ShowWarning("refine_readdb_requirements_sub: Invalid 'BlacksmithBlessing' amount was given value %d expected a value between %d and %d in entry'%s' in \"%s\" defaulting to 0...\n", req.blacksmith_blessing, 1, INT8_MAX, name, source);
+ req.blacksmith_blessing = 0;
+ }
+ }
+
+ req.announce = 0;
+ const char *announce_behavior = NULL;
+ if (libconfig->setting_lookup_string(elem, "Announce", &announce_behavior) != CONFIG_FALSE) {
+ if (!refine->p->announce_behavior_string2enum(announce_behavior, &req.announce)) {
+ ShowWarning("refine_readdb_requirements_sub: invalid announce behavior value '%s' in entry '%s' in \"%s\" defaulting to not announce...\n", announce_behavior, name, source);
+ }
+ }
+
+ struct config_setting_t *items_t;
+ if ((items_t = libconfig->setting_get_member(elem, "Items")) == NULL) {
+ ShowWarning("refine_readdb_requirements_sub: a requirements element missing Items element for entry '%s' in \"%s\" skipping...\n", name, source);
+ return false;
+ }
+
+ if (libconfig->setting_length(items_t) < 1) {
+ ShowWarning("refine_readdb_requirements_sub: an Items element containing no items passed for entry '%s' in \"%s\" skipping...\n", name, source);
+ return false;
+ }
+
+ int loaded_items = 0;
+ for (int i = 0; i < libconfig->setting_length(items_t); ++i) {
+ if (req.req_count >= MAX_REFINE_REQUIREMENTS) {
+ ShowWarning("refine_readdb_requirements_sub: Too many items passed to requirements maximum possible items is %d entry '%s' in \"%s\" skipping...\n", MAX_REFINE_REQUIREMENTS, name, source);
+ continue;
+ }
+
+ struct config_setting_t *item_t = libconfig->setting_get_elem(items_t, i);
+
+ if (!refine->p->readdb_refinery_ui_settings_items(item_t, &req, name, source))
+ continue;
+
+ loaded_items++;
+ }
+
+ if (loaded_items == 0) {
+ ShowWarning("refine_readdb_requirements_sub: no valid items for requirements is passed for entry '%s' in \"%s\" skipping...\n", name, source);
+ return false;
+ }
+
+ for (int i = 0; i < MAX_REFINE; ++i) {
+ if (!levels[i])
+ continue;
+
+ refine->p->dbs->refine_info[type].refine_requirements[i] = req;
+ }
+
+ return true;
+}
+
+/// @copydoc refine_interface_private::readdb_refinery_ui_settings()
+static int refine_readdb_refinery_ui_settings(const struct config_setting_t *r, int type, const char *name, const char *source)
+{
+ nullpo_retr(0, r);
+ nullpo_retr(0, name);
+ nullpo_retr(0, source);
+ Assert_retr(0, type >= REFINE_TYPE_ARMOR && type < REFINE_TYPE_MAX);
+
+ int i = 0;
+ const struct config_setting_t *elem = NULL;
+ while ((elem = libconfig->setting_get_elem(r, i++)) != NULL) {
+ refine->p->readdb_refinery_ui_settings_sub(elem, type, name, source);
+ }
+
+ int retval = 0;
+ for (i = 0; i < MAX_REFINE; ++i) {
+ if (refine->p->dbs->refine_info[type].refine_requirements[i].req_count > 0)
+ retval++;
+ }
+
+ return retval;
+}
+
+/// @copydoc refine_interface_private::readdb_refine_libconfig_sub()
+static int refine_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source)
+{
+ struct config_setting_t *rate = NULL;
+ int type = REFINE_TYPE_ARMOR, bonus_per_level = 0, rnd_bonus_v = 0, rnd_bonus_lv = 0;
+ char lv[4];
+ nullpo_ret(r);
+ nullpo_ret(name);
+ nullpo_ret(source);
+
+ if (strncmp(name, "Armors", 6) == 0) {
+ type = REFINE_TYPE_ARMOR;
+ } else if (strncmp(name, "WeaponLevel", 11) != 0 || !strspn(&name[strlen(name)-1], "0123456789") || (type = atoi(strncpy(lv, name+11, 2))) == REFINE_TYPE_ARMOR) {
+ ShowError("status_readdb_refine_libconfig_sub: Invalid key name for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+ if (type < REFINE_TYPE_ARMOR || type >= REFINE_TYPE_MAX) {
+ ShowError("status_readdb_refine_libconfig_sub: Out of range level for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+
+ struct config_setting_t *refinery_ui_settings;
+ if ((refinery_ui_settings = libconfig->setting_get_member(r, "RefineryUISettings")) == NULL) {
+ ShowWarning("status_readdb_refine_libconfig_sub: Missing Requirements for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+
+ if (refine->p->readdb_refinery_ui_settings(refinery_ui_settings, type, name, source) != MAX_REFINE) {
+ ShowWarning("status_readdb_refine_libconfig_sub: Not all refine levels have requrements entry for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+
+ if (!libconfig->setting_lookup_int(r, "StatsPerLevel", &bonus_per_level)) {
+ ShowWarning("status_readdb_refine_libconfig_sub: Missing StatsPerLevel for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+ if (!libconfig->setting_lookup_int(r, "RandomBonusStartLevel", &rnd_bonus_lv)) {
+ ShowWarning("status_readdb_refine_libconfig_sub: Missing RandomBonusStartLevel for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+ if (!libconfig->setting_lookup_int(r, "RandomBonusValue", &rnd_bonus_v)) {
+ ShowWarning("status_readdb_refine_libconfig_sub: Missing RandomBonusValue for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+
+ if ((rate=libconfig->setting_get_member(r, "Rates")) != NULL && config_setting_is_group(rate)) {
+ bool duplicate[MAX_REFINE];
+ int bonus[MAX_REFINE], rnd_bonus[MAX_REFINE];
+ int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE];
+
+ memset(&duplicate, 0, sizeof(duplicate));
+ memset(&bonus, 0, sizeof(bonus));
+ memset(&rnd_bonus, 0, sizeof(rnd_bonus));
+
+ for (int i = 0; i < REFINE_CHANCE_TYPE_MAX; i++)
+ for (int j = 0; j < MAX_REFINE; j++)
+ chance[i][j] = 100; // default value for all rates.
+
+ struct config_setting_t *t = NULL;
+ for (int i = 0; (t = libconfig->setting_get_elem(rate, i)) != NULL && config_setting_is_group(t); ++i) {
+ int level = 0, i32;
+ char *rlvl = config_setting_name(t);
+ memset(&lv, 0, sizeof(lv));
+
+ if (!strspn(&rlvl[strlen(rlvl) - 1], "0123456789") || (level = atoi(strncpy(lv, rlvl + 2, 3))) <= 0) {
+ ShowError("status_readdb_refine_libconfig_sub: Invalid refine level format '%s' for entry %s in \"%s\"... skipping.\n", rlvl, name, source);
+ continue;
+ }
+
+ if (level <= 0 || level > MAX_REFINE) {
+ ShowError("status_readdb_refine_libconfig_sub: Out of range refine level '%s' for entry %s in \"%s\"... skipping.\n", rlvl, name, source);
+ continue;
+ }
+
+ level--;
+
+ if (duplicate[level]) {
+ ShowWarning("status_readdb_refine_libconfig_sub: duplicate rate '%s' for entry %s in \"%s\", overwriting previous entry...\n", rlvl, name, source);
+ } else {
+ duplicate[level] = true;
+ }
+
+ if (libconfig->setting_lookup_int(t, "NormalChance", &i32) != 0)
+ chance[REFINE_CHANCE_TYPE_NORMAL][level] = i32;
+ else
+ chance[REFINE_CHANCE_TYPE_NORMAL][level] = 100;
+
+ if (libconfig->setting_lookup_int(t, "EnrichedChance", &i32) != 0)
+ chance[REFINE_CHANCE_TYPE_ENRICHED][level] = i32;
+ else
+ chance[REFINE_CHANCE_TYPE_ENRICHED][level] = level > 10 ? 0 : 100; // enriched ores up to +10 only.
+
+ if (libconfig->setting_lookup_int(t, "EventNormalChance", &i32) != 0)
+ chance[REFINE_CHANCE_TYPE_E_NORMAL][level] = i32;
+ else
+ chance[REFINE_CHANCE_TYPE_E_NORMAL][level] = 100;
+
+ if (libconfig->setting_lookup_int(t, "EventEnrichedChance", &i32) != 0)
+ chance[REFINE_CHANCE_TYPE_E_ENRICHED][level] = i32;
+ else
+ chance[REFINE_CHANCE_TYPE_E_ENRICHED][level] = level > 10 ? 0 : 100; // enriched ores up to +10 only.
+
+ if (libconfig->setting_lookup_int(t, "Bonus", &i32) != 0)
+ bonus[level] += i32;
+
+ if (level >= rnd_bonus_lv - 1)
+ rnd_bonus[level] = rnd_bonus_v * (level - rnd_bonus_lv + 2);
+ }
+ for (int i = 0; i < MAX_REFINE; i++) {
+ refine->p->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_NORMAL][i] = chance[REFINE_CHANCE_TYPE_NORMAL][i];
+ refine->p->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_E_NORMAL][i] = chance[REFINE_CHANCE_TYPE_E_NORMAL][i];
+ refine->p->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_ENRICHED][i] = chance[REFINE_CHANCE_TYPE_ENRICHED][i];
+ refine->p->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_E_ENRICHED][i] = chance[REFINE_CHANCE_TYPE_E_ENRICHED][i];
+ refine->p->dbs->refine_info[type].randombonus_max[i] = rnd_bonus[i];
+ bonus[i] += bonus_per_level + (i > 0 ? bonus[i - 1] : 0);
+ refine->p->dbs->refine_info[type].bonus[i] = bonus[i];
+ }
+ } else {
+ ShowWarning("status_readdb_refine_libconfig_sub: Missing refine rates for entry '%s' in \"%s\", skipping.\n", name, source);
+ return 0;
+ }
+
+ return type + 1;
+}
+
+/// @copydoc refine_interface_private::readdb_refine_libconfig()
+static int refine_readdb_refine_libconfig(const char *filename)
+{
+ nullpo_retr(0, filename);
+
+ bool duplicate[REFINE_TYPE_MAX];
+ struct config_t refine_db_conf;
+ struct config_setting_t *r;
+ char filepath[256];
+ int i = 0, count = 0;
+
+ safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename);
+ if (!libconfig->load_file(&refine_db_conf, filepath))
+ return 0;
+
+ memset(&duplicate, 0, sizeof(duplicate));
+
+ while((r = libconfig->setting_get_elem(refine_db_conf.root, i++))) {
+ char *name = config_setting_name(r);
+ int type = refine->p->readdb_refine_libconfig_sub(r, name, filename);
+ if (type != 0) {
+ if (duplicate[type - 1]) {
+ ShowWarning("status_readdb_refine_libconfig: duplicate entry for %s in \"%s\", overwriting previous entry...\n", name, filename);
+ } else {
+ duplicate[type - 1] = true;
+ }
+ count++;
+ }
+ }
+ libconfig->destroy(&refine_db_conf);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
+
+ return count;
+}
+
+/// @copydoc refine_interface::init()
+static int refine_init(bool minimal)
+{
+ if (minimal)
+ return 0;
+
+ refine->p->readdb_refine_libconfig(DBPATH"refine_db.conf");
+ return 0;
+}
+
+/// @copydoc refine_interface::final()
+static void refine_final(void)
+{
+}
+
+void refine_defaults(void)
+{
+ refine = &refine_s;
+ refine->p = &refine_p;
+ refine->p->dbs = &refine_dbs;
+
+ refine->p->readdb_refine_libconfig = refine_readdb_refine_libconfig;
+ refine->p->readdb_refine_libconfig_sub = refine_readdb_refine_libconfig_sub;
+ refine->p->announce_behavior_string2enum = refine_announce_behavior_string2enum;
+ refine->p->failure_behavior_string2enum = refine_failure_behavior_string2enum;
+ refine->p->readdb_refinery_ui_settings_items = refine_readdb_refinery_ui_settings_items;
+ refine->p->readdb_refinery_ui_settings_sub = refine_readdb_refinery_ui_settings_sub;
+ refine->p->readdb_refinery_ui_settings = refine_readdb_refinery_ui_settings;
+ refine->p->is_refinable = refine_is_refinable;
+
+ refine->init = refine_init;
+ refine->final = refine_final;
+ refine->refinery_refine_request = refine_refinery_refine_request;
+ refine->refinery_add_item = refine_refinery_add_item;
+ refine->get_refine_chance = refine_get_refine_chance;
+ refine->get_bonus = refine_get_bonus;
+ refine->get_randombonus_max = refine_get_randombonus_max;
+}
diff --git a/src/map/refine.h b/src/map/refine.h
new file mode 100644
index 000000000..410811e06
--- /dev/null
+++ b/src/map/refine.h
@@ -0,0 +1,148 @@
+/**
+* This file is part of Hercules.
+* http://herc.ws - http://github.com/HerculesWS/Hercules
+*
+* Copyright (C) 2019 Hercules Dev Team
+*
+* Hercules is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MAP_REFINE_H
+#define MAP_REFINE_H
+
+/** @file
+ * Refine Interface.
+ **/
+#include "common/hercules.h"
+#include "common/mmo.h"
+
+/* Defines */
+/**
+* Max Refine available to your server
+* Changing this limit requires edits to refine_db.conf
+**/
+#ifdef RENEWAL
+ #define MAX_REFINE 20
+#else
+ #define MAX_REFINE 10
+#endif
+
+/* Forward Declarations */
+struct refine_interface_private;
+
+/* Enums */
+enum refine_type {
+ REFINE_TYPE_ARMOR = 0,
+ REFINE_TYPE_WEAPON1 = 1,
+ REFINE_TYPE_WEAPON2 = 2,
+ REFINE_TYPE_WEAPON3 = 3,
+ REFINE_TYPE_WEAPON4 = 4,
+#ifndef REFINE_TYPE_MAX
+ REFINE_TYPE_MAX = 5
+#endif
+};
+
+enum refine_chance_type {
+ REFINE_CHANCE_TYPE_NORMAL = 0, // Normal Chance
+ REFINE_CHANCE_TYPE_ENRICHED = 1, // Enriched Ore Chance
+ REFINE_CHANCE_TYPE_E_NORMAL = 2, // Event Normal Ore Chance
+ REFINE_CHANCE_TYPE_E_ENRICHED = 3, // Event Enriched Ore Chance
+ REFINE_CHANCE_TYPE_MAX
+};
+
+enum refine_ui_failure_behavior {
+ REFINE_FAILURE_BEHAVIOR_DESTROY,
+ REFINE_FAILURE_BEHAVIOR_KEEP,
+ REFINE_FAILURE_BEHAVIOR_DOWNGRADE
+};
+
+/* Structure */
+struct s_refine_requirement {
+ int blacksmith_blessing;
+ int req_count;
+ unsigned int announce;
+
+ struct {
+ int nameid;
+ int cost;
+ enum refine_chance_type type;
+ enum refine_ui_failure_behavior failure_behavior;
+ } req[MAX_REFINE_REQUIREMENTS];
+};
+
+/**
+ * Refine Interface
+ **/
+struct refine_interface {
+ struct refine_interface_private *p;
+
+ /**
+ * Initialize refine system
+ * @param minimal sets refine system to minimal mode in which it won't load or initialize itself
+ * @return returns 0 in-case of success 1 otherwise
+ **/
+ int (*init)(bool minimal);
+
+ /**
+ * Finalize refine system
+ **/
+ void (*final)(void);
+
+ /**
+ * Get the chance to upgrade a piece of equipment.
+ * @param wlv The weapon type of the item to refine (see see enum refine_type)
+ * @param refine The target refine level
+ * @return The chance to refine the item, in percent (0~100)
+ **/
+ int (*get_refine_chance) (enum refine_type wlv, int refine_level, enum refine_chance_type type);
+
+ /**
+ * Gets the attack/deffense bonus for the given equipment type and refine level
+ * @param equipment_type the equipment type
+ * @param refine_level the equipment refine level
+ * @return returns the bonus from refine db
+ **/
+ int (*get_bonus) (enum refine_type equipment_type, int refine_level);
+
+ /**
+ * Gets the maximum attack/deffense random bonus for the given equipment type and refine level
+ * @param equipment_type the equipment type
+ * @param refine_level the equipment refine level
+ * @return returns the bonus from refine db
+ **/
+ int(*get_randombonus_max) (enum refine_type equipment_type, int refine_level);
+
+ /**
+ * Validates and send Item addition packet to the client for refinery UI
+ * @param sd player session data.
+ * @param item_index the requested item index in inventory.
+ **/
+ void (*refinery_add_item) (struct map_session_data *sd, int item_index);
+
+ /**
+ * Processes an refine request through Refinery UI
+ * @param sd player session data
+ * @param item_index the index of the requested item
+ * @param material_id the refine material chosen by player
+ * @param use_blacksmith_blessing sets either if blacksmith blessing is requested to be used or not
+ **/
+ void (*refinery_refine_request) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing);
+};
+
+#ifdef HERCULES_CORE
+void refine_defaults(void);
+#endif
+
+HPShared struct refine_interface *refine;
+#endif
diff --git a/src/map/refine.p.h b/src/map/refine.p.h
new file mode 100644
index 000000000..3247d15c9
--- /dev/null
+++ b/src/map/refine.p.h
@@ -0,0 +1,144 @@
+/**
+* This file is part of Hercules.
+* http://herc.ws - http://github.com/HerculesWS/Hercules
+*
+* Copyright (C) 2019 Hercules Dev Team
+*
+* Hercules is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MAP_REFINE_P_H
+#define MAP_REFINE_P_H
+
+/** @file
+ * Private header for the refine interface.
+ **/
+
+#include "refine.h"
+#include "common/conf.h"
+/* Enums */
+enum refine_announce_condition {
+ REFINE_ANNOUNCE_SUCCESS = 0x1,
+ REFINE_ANNOUNCE_FAILURE = 0x2,
+ REFINE_ANNOUNCE_ALWAYS = REFINE_ANNOUNCE_SUCCESS | REFINE_ANNOUNCE_FAILURE,
+};
+
+/* Structures */
+struct s_refine_info {
+ int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE]; //< success chance
+ int bonus[MAX_REFINE]; //< cumulative fixed bonus damage
+ int randombonus_max[MAX_REFINE]; //< cumulative maximum random bonus damage
+ struct s_refine_requirement refine_requirements[MAX_REFINE]; //< The requirements used for refinery UI
+};
+
+struct refine_interface_dbs {
+ struct s_refine_info refine_info[REFINE_TYPE_MAX];
+};
+
+/**
+ * Refine Private Interface
+ **/
+struct refine_interface_private {
+ struct refine_interface_dbs *dbs;
+
+ /**
+ * Processes a refine_db.conf entry.
+ *
+ * @param r Libconfig setting entry. It is expected to be valid and it
+ * won't be freed (it is care of the caller to do so if
+ * necessary)
+ * @param n Ordinal number of the entry, to be displayed in case of
+ * validation errors.
+ * @param source Source of the entry (file name), to be displayed in case of
+ * validation errors.
+ * @return # of the validated entry, or 0 in case of failure.
+ **/
+ int (*readdb_refine_libconfig_sub) (struct config_setting_t *r, const char *name, const char *source);
+
+ /**
+ * Reads from a libconfig-formatted refine_db.conf file.
+ *
+ * @param *filename File name, relative to the database path.
+ * @return The number of found entries.
+ **/
+ int (*readdb_refine_libconfig) (const char *filename);
+
+ /**
+ * Converts refine database announce behvaior string to enum refine_announce_condition
+ * @param str the string to convert
+ * @param result pointer to where the converted value will be held
+ * @return true on success, false otherwise.
+ **/
+ bool (*announce_behavior_string2enum) (const char *str, unsigned int *result);
+
+ /**
+ * Converts refine database failure behvaior string to enum refine_ui_failure_behavior
+ * @param str the string to convert
+ * @param result pointer to where the converted value will be held
+ * @return true on success, false otherwise.
+ **/
+ bool (*failure_behavior_string2enum) (const char *str, enum refine_ui_failure_behavior *result);
+
+ /**
+ * Processes a refine_db.conf RefineryUISettings items entry.
+ *
+ * @param elem Libconfig setting entry. It is expected to be valid and it
+ * won't be freed (it is care of the caller to do so if
+ * necessary)
+ * @param req a pointer to requirements struct to fill with the item data
+ * @param name the current element name
+ * @param source Source of the entry (file name), to be displayed in case of
+ * validation errors.
+ * @return true on success, false otherwise.
+ **/
+ bool (*readdb_refinery_ui_settings_items) (const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source);
+
+ /**
+ * Processes a refine_db.conf RefineryUISettings entry.
+ *
+ * @param elem Libconfig setting entry. It is expected to be valid and it
+ * won't be freed (it is care of the caller to do so if
+ * necessary)
+ * @param type the type index in refine database to fill the data
+ * @param name the current element name
+ * @param source Source of the entry (file name), to be displayed in case of
+ * validation errors.
+ * @return true on success, false otherwise.
+ **/
+ bool (*readdb_refinery_ui_settings_sub) (const struct config_setting_t *elem, int type, const char *name, const char *source);
+
+ /**
+ * Reads a refine_db.conf RefineryUISettings entry and sends it to be processed.
+ *
+ * @param r Libconfig setting entry. It is expected to be valid and it
+ * won't be freed (it is care of the caller to do so if
+ * necessary)
+ * @param type the type index in refine database to fill the data
+ * @param name the current element name
+ * @param source Source of the entry (file name), to be displayed in case of
+ * validation errors.
+ * @return true on success, false otherwise.
+ **/
+ int (*readdb_refinery_ui_settings) (const struct config_setting_t *r, int type, const char *name, const char *source);
+
+ /**
+ * Checks if a given item in player's inventory is refineable.
+ * @param sd player session data.
+ * @param item_index the item index in player's inventory.
+ * @return true if item is refineable, false otherwise.
+ **/
+ bool (*is_refinable) (struct map_session_data *sd, int item_index);
+};
+
+#endif
diff --git a/src/map/rodex.c b/src/map/rodex.c
index 602754d42..766fdc5ea 100644
--- a/src/map/rodex.c
+++ b/src/map/rodex.c
@@ -83,7 +83,7 @@ static void rodex_add_item(struct map_session_data *sd, int16 idx, int16 amount)
nullpo_retv(sd);
- if (idx < 0 || idx >= MAX_INVENTORY) {
+ if (idx < 0 || idx >= sd->status.inventorySize) {
clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_FATAL_ERROR);
return;
}
@@ -160,7 +160,7 @@ static void rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amou
struct item_data *itd;
nullpo_retv(sd);
- Assert_retv(idx >= 0 && idx < MAX_INVENTORY);
+ Assert_retv(idx >= 0 && idx < sd->status.inventorySize);
for (i = 0; i < RODEX_MAX_ITEM; ++i) {
if (sd->rodex.tmp.items[i].idx == idx)
@@ -204,7 +204,7 @@ static void rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amou
/// @param base_level : Reference to return the character base level, if he exists
/// @param char_id : Reference to return the character id, if he exists
/// @param class : Reference to return the character class id, if he exists
-static void rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class)
+static void rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class)
{
intif->rodex_checkname(sd, name);
}
@@ -404,12 +404,12 @@ static void rodex_read_mail(struct map_session_data *sd, int64 mail_id)
if (msg->opentype == RODEX_OPENTYPE_RETURN) {
if (msg->sender_read == false) {
- intif->rodex_updatemail(msg->id, 4);
+ intif->rodex_updatemail(sd, msg->id, 0, 4);
msg->sender_read = true;
}
} else {
if (msg->is_read == false) {
- intif->rodex_updatemail(msg->id, 0);
+ intif->rodex_updatemail(sd, msg->id, 0, 0);
msg->is_read = true;
}
}
@@ -430,21 +430,36 @@ static void rodex_delete_mail(struct map_session_data *sd, int64 mail_id)
nullpo_retv(msg);
msg->is_deleted = true;
- intif->rodex_updatemail(msg->id, 3);
+ intif->rodex_updatemail(sd, msg->id, 0, 3);
clif->rodex_delete_mail(sd, msg->opentype, msg->id);
}
+/// give requested zeny from message to player
+static void rodex_getZenyAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny)
+{
+ nullpo_retv(sd);
+ if (zeny <= 0) {
+ clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
+ return;
+ }
+
+ if (pc->getzeny(sd, (int)zeny, LOG_TYPE_MAIL, NULL) != 0) {
+ clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
+ return;
+ }
+
+ clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_SUCCESS);
+}
+
/// Gets attached zeny
/// @param sd : Who's getting
/// @param mail_id : Mail ID that we're getting zeny from
static void rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id)
{
- struct rodex_message *msg;
-
nullpo_retv(sd);
- msg = rodex->get_mail(sd, mail_id);
+ struct rodex_message *msg = rodex->get_mail(sd, mail_id);
if (msg == NULL) {
clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
@@ -456,16 +471,31 @@ static void rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mai
return;
}
- if (pc->getzeny(sd, (int)msg->zeny, LOG_TYPE_MAIL, NULL) != 0) {
- clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
- return;
- }
-
msg->type &= ~MAIL_TYPE_ZENY;
msg->zeny = 0;
- intif->rodex_updatemail(mail_id, 1);
+ intif->rodex_updatemail(sd, mail_id, opentype, 1);
+}
- clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_SUCCESS);
+// give requested items from message to player
+static void rodex_getItemsAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items)
+{
+ nullpo_retv(sd);
+ nullpo_retv(items);
+
+ for (int i = 0; i < count; ++i) {
+ const struct item *it = &items[i].item;
+
+ if (it->nameid == 0) {
+ continue;
+ }
+
+ if (pc->additem(sd, it, it->amount, LOG_TYPE_MAIL) != 0) {
+ clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR);
+ return;
+ }
+ }
+
+ clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEMS_SUCCESS);
}
/// Gets attached item
@@ -473,14 +503,12 @@ static void rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mai
/// @param mail_id : Mail ID that we're getting items from
static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 mail_id)
{
- struct rodex_message *msg;
- int weight = 0;
- int empty_slots = 0, required_slots;
- int i;
-
nullpo_retv(sd);
- msg = rodex->get_mail(sd, mail_id);
+ int weight = 0;
+ int empty_slots = 0;
+
+ struct rodex_message *msg = rodex->get_mail(sd, mail_id);
if (msg == NULL) {
clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FATAL_ERROR);
@@ -492,7 +520,7 @@ static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 ma
return;
}
- for (i = 0; i < RODEX_MAX_ITEM; ++i) {
+ for (int i = 0; i < RODEX_MAX_ITEM; ++i) {
if (msg->items[i].item.nameid != 0) {
weight += itemdb->search(msg->items[i].item.nameid)->weight * msg->items[i].item.amount;
}
@@ -503,8 +531,8 @@ static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 ma
return;
}
- required_slots = msg->items_count;
- for (i = 0; i < MAX_INVENTORY; ++i) {
+ int required_slots = msg->items_count;
+ for (int i = 0; i < sd->status.inventorySize; ++i) {
if (sd->status.inventory[i].nameid == 0) {
empty_slots++;
} else if (itemdb->isstackable(sd->status.inventory[i].nameid) == 1) {
@@ -529,27 +557,9 @@ static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 ma
return;
}
- for (i = 0; i < RODEX_MAX_ITEM; ++i) {
- struct item *it = &msg->items[i].item;
-
- if (it->nameid == 0) {
- continue;
- }
-
- if (pc->additem(sd, it, it->amount, LOG_TYPE_MAIL) != 0) {
- clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR);
- intif->rodex_updatemail(mail_id, 2);
- return;
- } else {
- memset(it, 0x0, sizeof(*it));
- }
- }
-
msg->type &= ~MAIL_TYPE_ITEM;
msg->items_count = 0;
- intif->rodex_updatemail(mail_id, 2);
-
- clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEMS_SUCCESS);
+ intif->rodex_updatemail(sd, mail_id, opentype, 2);
}
/// Cleans user's RoDEX related data
@@ -668,4 +678,6 @@ void rodex_defaults(void)
rodex->get_zeny = rodex_get_zeny;
rodex->get_items = rodex_get_items;
rodex->clean = rodex_clean;
+ rodex->getZenyAck = rodex_getZenyAck;
+ rodex->getItemsAck = rodex_getItemsAck;
}
diff --git a/src/map/rodex.h b/src/map/rodex.h
index ddf7cb32b..b6e7ca5b7 100644
--- a/src/map/rodex.h
+++ b/src/map/rodex.h
@@ -65,7 +65,7 @@ struct rodex_interface {
void (*refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id);
void (*add_item) (struct map_session_data *sd, int16 idx, int16 amount);
void (*remove_item) (struct map_session_data *sd, int16 idx, int16 amount);
- void (*check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class);
+ void (*check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class);
int (*send_mail) (struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny);
void (*send_mail_result) (struct map_session_data *ssd, struct map_session_data *rsd, bool result);
struct rodex_message *(*get_mail) (struct map_session_data *sd, int64 mail_id);
@@ -74,6 +74,8 @@ struct rodex_interface {
void (*get_items) (struct map_session_data *sd, int8 opentype, int64 mail_id);
void (*delete_mail) (struct map_session_data *sd, int64 mail_id);
void (*clean) (struct map_session_data *sd, int8 flag);
+ void (*getZenyAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny);
+ void (*getItemsAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items);
};
#ifdef HERCULES_CORE
diff --git a/src/map/script.c b/src/map/script.c
index e92c4c227..c6f1c9a12 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -52,6 +52,7 @@
#include "map/pet.h"
#include "map/pet.h"
#include "map/quest.h"
+#include "map/refine.h"
#include "map/skill.h"
#include "map/status.h"
#include "map/status.h"
@@ -4621,6 +4622,9 @@ static void run_script_main(struct script_state *st)
nullpo_retv(st);
script->attach_state(st);
+ if (st->state != END && Assert_chk(st->state == RUN || st->state == STOP || st->state == RERUNLINE)) {
+ st->state = END;
+ }
nd = map->id2nd(st->oid);
if( nd && nd->bl.m >= 0 )
@@ -5958,6 +5962,19 @@ static BUILDIN(next)
return true;
}
+/// Clears the NPC dialog and continues the script without press next button.
+///
+/// mesclear();
+static BUILDIN(mesclear)
+{
+ struct map_session_data *sd = script->rid2sd(st);
+
+ if (sd != NULL)
+ clif->scriptclear(sd, st->oid);
+
+ return true;
+}
+
/// Ends the script and displays the button 'close' on the npc dialog.
/// The dialog is closed when the button is pressed.
///
@@ -6944,59 +6961,60 @@ static BUILDIN(jobname)
return true;
}
-/// Get input from the player.
-/// For numeric inputs the value is capped to the range [min,max]. Returns 1 if
-/// the value was higher than 'max', -1 if lower than 'min' and 0 otherwise.
-/// For string inputs it returns 1 if the string was longer than 'max', -1 is
-/// shorter than 'min' and 0 otherwise.
-///
-/// input(<var>{,<min>{,<max>}}) -> <int>
+/*
+ * Get input from the player.
+ * For numeric inputs the value is capped to the range [min,max]. Returns 1 if
+ * the value was higher than 'max', -1 if lower than 'min' and 0 otherwise.
+ * For string inputs it returns 1 if the string was longer than 'max', -1 is
+ * shorter than 'min' and 0 otherwise.
+ *
+ * input(<var>{,<min>{,<max>}}) -> <int>
+ */
static BUILDIN(input)
{
- struct script_data* data;
- int64 uid;
- const char* name;
- int min;
- int max;
struct map_session_data *sd = script->rid2sd(st);
if (sd == NULL)
return true;
- data = script_getdata(st,2);
- if( !data_isreference(data) ) {
+ struct script_data *data = script_getdata(st, 2);
+ if (!data_isreference(data)) {
ShowError("script:input: not a variable\n");
script->reportdata(data);
st->state = END;
return false;
}
- uid = reference_getuid(data);
- name = reference_getname(data);
- min = (script_hasdata(st,3) ? script_getnum(st,3) : script->config.input_min_value);
- max = (script_hasdata(st,4) ? script_getnum(st,4) : script->config.input_max_value);
+
+ int64 uid = reference_getuid(data);
+ const char *name = reference_getname(data);
+ int min = (script_hasdata(st, 3) ? script_getnum(st, 3) : script->config.input_min_value);
+ int max = (script_hasdata(st, 4) ? script_getnum(st, 4) : script->config.input_max_value);
#ifdef SECURE_NPCTIMEOUT
sd->npc_idle_type = NPCT_WAIT;
#endif
- if( !sd->state.menu_or_input ) {
+ if (!sd->state.menu_or_input) {
// first invocation, display npc input box
sd->state.menu_or_input = 1;
st->state = RERUNLINE;
- if( is_string_variable(name) )
- clif->scriptinputstr(sd,st->oid);
- else
- clif->scriptinput(sd,st->oid);
+ if (is_string_variable(name)) {
+ clif->scriptinputstr(sd, st->oid);
+ } else {
+ sd->npc_amount_min = min;
+ sd->npc_amount_max = max;
+ clif->scriptinput(sd, st->oid);
+ }
} else {
// take received text/value and store it in the designated variable
sd->state.menu_or_input = 0;
if (is_string_variable(name)) {
int len = (int)strlen(sd->npc_str);
- script->set_reg(st, sd, uid, name, sd->npc_str, script_getref(st,2));
+ script->set_reg(st, sd, uid, name, sd->npc_str, script_getref(st, 2));
script_pushint(st, (len > max ? 1 : len < min ? -1 : 0));
} else {
int amount = sd->npc_amount;
script->set_reg(st, sd, uid, name, (const void *)h64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2));
- script_pushint(st, (amount > max ? 1 : amount < min ? -1 : 0));
+ script_pushint(st, sd->npc_input_capped_range);
}
st->state = RUN;
}
@@ -7553,7 +7571,6 @@ static BUILDIN(viewpoint)
*------------------------------------------*/
static BUILDIN(countitem)
{
- int nameid, i;
int count = 0;
struct item_data* id = NULL;
@@ -7575,11 +7592,12 @@ static BUILDIN(countitem)
return false;
}
- nameid = id->nameid;
+ int nameid = id->nameid;
- for(i = 0; i < MAX_INVENTORY; i++)
- if(sd->status.inventory[i].nameid == nameid)
+ for (int i = 0; i < sd->status.inventorySize; i++) {
+ if (sd->status.inventory[i].nameid == nameid)
count += sd->status.inventory[i].amount;
+ }
script_pushint(st,count);
return true;
@@ -7593,7 +7611,6 @@ static BUILDIN(countitem2)
{
int nameid, iden, ref, attr, c1, c2, c3, c4;
int count = 0;
- int i;
struct item_data* id = NULL;
struct map_session_data *sd = script->rid2sd(st);
@@ -7623,7 +7640,7 @@ static BUILDIN(countitem2)
c3 = script_getnum(st,8);
c4 = script_getnum(st,9);
- for(i = 0; i < MAX_INVENTORY; i++)
+ for (int i = 0; i < sd->status.inventorySize; i++)
if (sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] != NULL &&
sd->status.inventory[i].amount > 0 && sd->status.inventory[i].nameid == nameid &&
sd->status.inventory[i].identify == iden && sd->status.inventory[i].refine == ref &&
@@ -7638,6 +7655,65 @@ static BUILDIN(countitem2)
}
/*==========================================
+ * countnameditem(item ID, { <Char Name / ID> })
+ * returns number of named items.
+ *------------------------------------------*/
+static BUILDIN(countnameditem)
+{
+ int count = 0;
+ struct item_data* id = NULL;
+ struct map_session_data *sd;
+
+ if (script_hasdata(st, 3)) {
+ if (script_isstringtype(st, 3)) {
+ // Character name was given
+ sd = script->nick2sd(st, script_getstr(st, 3));
+ } else {
+ // Character ID was given
+ sd = script->charid2sd(st, script_getnum(st, 3));
+ }
+ } else {
+ // Use RID by default if no name was provided
+ sd = script->rid2sd(st);
+ }
+
+ // Player not attached
+ if (sd == NULL) {
+ return true;
+ }
+
+ if (script_isstringtype(st, 2)) {
+ // Get item from DB via item name
+ id = itemdb->search_name(script_getstr(st, 2));
+ } else {
+ // Get item from DB via item ID
+ id = itemdb->exists(script_getnum(st, 2));
+ }
+
+ if (id == NULL) {
+ ShowError("buildin_countnameditem: Invalid item '%s'.\n", script_getstr(st, 2)); // returns string, regardless of what it was
+ script_pushint(st, 0);
+ return false;
+ }
+
+ for (int i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].nameid > 0 &&
+ sd->inventory_data[i] != NULL &&
+ sd->status.inventory[i].amount > 0 &&
+ sd->status.inventory[i].nameid == id->nameid &&
+ sd->status.inventory[i].card[0] == CARD0_CREATE &&
+ sd->status.inventory[i].card[2] == sd->status.char_id &&
+ sd->status.inventory[i].card[3] == sd->status.char_id >> 16)
+ {
+ count += sd->status.inventory[i].amount;
+ }
+ }
+
+ script_pushint(st, count);
+ return true;
+}
+
+/*==========================================
* Check if item with this amount can fit in inventory
* Checking : weight, stack amount >32k, slots amount >(MAX_INVENTORY)
* Return
@@ -8116,12 +8192,12 @@ static BUILDIN(getnameditem)
}
memset(&item_tmp,0,sizeof(item_tmp));
- item_tmp.nameid=nameid;
- item_tmp.amount=1;
- item_tmp.identify=1;
- item_tmp.card[0]=CARD0_CREATE; //we don't use 255! because for example SIGNED WEAPON shouldn't get TOP10 BS Fame bonus [Lupus]
- item_tmp.card[2]=tsd->status.char_id;
- item_tmp.card[3]=tsd->status.char_id >> 16;
+ item_tmp.nameid = nameid;
+ item_tmp.amount = 1;
+ item_tmp.identify = 1;
+ item_tmp.card[0] = CARD0_CREATE; //we don't use 255! because for example SIGNED WEAPON shouldn't get TOP10 BS Fame bonus [Lupus]
+ item_tmp.card[2] = GetWord(tsd->status.char_id, 0);
+ item_tmp.card[3] = GetWord(tsd->status.char_id, 1);
if(pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT)) {
script_pushint(st,0);
return true; //Failed to add item, we will not drop if they don't fit
@@ -8555,6 +8631,48 @@ static BUILDIN(delitem2)
return false;
}
+/**
+ * Deletes item at given index.
+ * delitem(<index>{, <amount{, <account id>}});
+ */
+static BUILDIN(delitemidx)
+{
+ struct map_session_data *sd;
+
+ if (script_hasdata(st, 4)) {
+ if ((sd = script->id2sd(st, script_getnum(st, 4))) == NULL) {
+ st->state = END;
+ return true;
+ }
+ } else {
+ if ((sd = script->rid2sd(st)) == NULL)
+ return true;
+ }
+
+ int i = script_getnum(st, 2);
+ if (i < 0 || i >= sd->status.inventorySize) {
+ ShowError("buildin_delitemidx: Index (%d) should be from 0-%d.\n", i, sd->status.inventorySize - 1);
+ st->state = END;
+ return false;
+ }
+
+ if (itemdb->exists(sd->status.inventory[i].nameid) == NULL)
+ ShowWarning("buildin_delitemidx: Deleting invalid Item ID (%d).\n", sd->status.inventory[i].nameid);
+
+ int amount = 0;
+ if (script_hasdata(st, 3)) {
+ if ((amount = script_getnum(st, 3)) > sd->status.inventory[i].amount)
+ amount = sd->status.inventory[i].amount;
+ } else {
+ amount = sd->status.inventory[i].amount;
+ }
+
+ if (amount > 0)
+ script->buildin_delitem_delete(sd, i, &amount, true);
+
+ return true;
+}
+
/*==========================================
* Enables/Disables use of items while in an NPC [Skotlex]
*------------------------------------------*/
@@ -8925,6 +9043,63 @@ static BUILDIN(getguildmember)
return true;
}
+/**
+ * getguildonline(<Guild ID>{, type})
+ * Returns amount of guild members online.
+**/
+
+enum script_getguildonline_types {
+ GUILD_ONLINE_ALL = 0,
+ GUILD_ONLINE_VENDOR,
+ GUILD_ONLINE_NO_VENDOR
+};
+
+BUILDIN(getguildonline)
+{
+ struct guild *g;
+ int guild_id = script_getnum(st, 2);
+ int type = GUILD_ONLINE_ALL, j = 0;
+
+ if ((g = guild->search(guild_id)) == NULL) {
+ script_pushint(st, -1);
+ return true;
+ }
+
+ if (script_hasdata(st, 3)) {
+ type = script_getnum(st, 3);
+
+ if (type < GUILD_ONLINE_ALL || type > GUILD_ONLINE_NO_VENDOR) {
+ ShowWarning("buildin_getguildonline: Invalid type specified. Defaulting to GUILD_ONLINE_ALL.\n");
+ type = GUILD_ONLINE_ALL;
+ }
+ }
+
+ struct map_session_data *sd;
+ for (int i = 0; i < MAX_GUILD; i++) {
+ if (g->member[i].online && (sd = g->member[i].sd) != NULL) {
+ switch (type) {
+ case GUILD_ONLINE_VENDOR:
+ if (sd->state.vending > 0)
+ j++;
+ break;
+
+ case GUILD_ONLINE_NO_VENDOR:
+ if (sd->state.vending == 0)
+ j++;
+ break;
+
+ default:
+ j++;
+ break;
+ }
+ }
+ }
+
+ script_pushint(st, j);
+
+ return true;
+}
+
/*==========================================
* Get char string information by type :
* Return by @type :
@@ -9148,13 +9323,13 @@ static BUILDIN(getequipname)
*------------------------------------------*/
static BUILDIN(getbrokenid)
{
- int i,num,id=0,brokencounter=0;
+ int num,id=0,brokencounter=0;
struct map_session_data *sd = script->rid2sd(st);
if (sd == NULL)
return true;
num=script_getnum(st,2);
- for(i=0; i<MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].card[0] == CARD0_PET)
continue;
if ((sd->status.inventory[i].attribute & ATTR_BROKEN) != 0) {
@@ -9181,7 +9356,7 @@ static BUILDIN(getbrokencount)
if (sd == NULL)
return true;
- for (i = 0; i < MAX_INVENTORY; i++) {
+ for (i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].card[0] == CARD0_PET)
continue;
if ((sd->status.inventory[i].attribute & ATTR_BROKEN) != 0)
@@ -9198,14 +9373,13 @@ static BUILDIN(getbrokencount)
*------------------------------------------*/
static BUILDIN(repair)
{
- int i,num;
int repaircounter=0;
struct map_session_data *sd = script->rid2sd(st);
if (sd == NULL)
return true;
- num=script_getnum(st,2);
- for(i=0; i<MAX_INVENTORY; i++) {
+ int num = script_getnum(st, 2);
+ for(int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].card[0] == CARD0_PET)
continue;
if ((sd->status.inventory[i].attribute & ATTR_BROKEN) != 0) {
@@ -9229,12 +9403,12 @@ static BUILDIN(repair)
*------------------------------------------*/
static BUILDIN(repairall)
{
- int i, repaircounter = 0;
+ int repaircounter = 0;
struct map_session_data *sd = script->rid2sd(st);
if (sd == NULL)
return true;
- for(i = 0; i < MAX_INVENTORY; i++)
+ for (int i = 0; i < sd->status.inventorySize; i++)
{
if (sd->status.inventory[i].card[0] == CARD0_PET)
continue;
@@ -9445,7 +9619,7 @@ static BUILDIN(getequippercentrefinery)
if (i >= 0 && sd->status.inventory[i].nameid != 0 && sd->status.inventory[i].refine < MAX_REFINE)
script_pushint(st,
- status->get_refine_chance(itemdb_wlv(sd->status.inventory[i].nameid), (int) sd->status.inventory[i].refine, (enum refine_chance_type) type));
+ refine->get_refine_chance(itemdb_wlv(sd->status.inventory[i].nameid), (int) sd->status.inventory[i].refine, (enum refine_chance_type) type));
else
script_pushint(st, 0);
@@ -9657,6 +9831,25 @@ static BUILDIN(statusup2)
return true;
}
+
+/*==========================================
+* Returns the number of stat points needed to change the specified stat by val.
+* needed_status_point(<type>,<val>); [secretdataz]
+*------------------------------------------*/
+static BUILDIN(needed_status_point)
+{
+ int type = script_getnum(st, 2);
+ int val = script_getnum(st, 3);;
+ struct map_session_data *sd = script->rid2sd(st);
+
+ if (sd == NULL)
+ script_pushint(st, 0);
+ else
+ script_pushint(st, pc->need_status_point(sd, type, val));
+
+ return true;
+}
+
/// See 'doc/item_bonus.txt'
///
/// bonus <bonus type>,<val1>;
@@ -10525,24 +10718,36 @@ static BUILDIN(gettime)
return true;
}
-/*==========================================
+/*
* GetTimeStr("TimeFMT", Length);
- *------------------------------------------*/
+ */
static BUILDIN(gettimestr)
{
char *tmpstr;
const char *fmtstr;
int maxlen;
- time_t now = time(NULL);
+ time_t now;
+
+ fmtstr = script_getstr(st, 2);
+ maxlen = script_getnum(st, 3);
- fmtstr=script_getstr(st,2);
- maxlen=script_getnum(st,3);
+ if (script_hasdata(st, 4)) {
+ int timestamp = script_getnum(st, 4);
+ if (timestamp < 0) {
+ ShowWarning("buildin_gettimestr: UNIX timestamp must be in positive value.\n");
+ return false;
+ }
- tmpstr=(char *)aMalloc((maxlen+1)*sizeof(char));
- strftime(tmpstr,maxlen,fmtstr,localtime(&now));
- tmpstr[maxlen]='\0';
+ now = (time_t)timestamp;
+ } else {
+ now = time(NULL);
+ }
- script_pushstr(st,tmpstr);
+ tmpstr = (char *)aMalloc((maxlen +1)*sizeof(char));
+ strftime(tmpstr, maxlen, fmtstr, localtime(&now));
+ tmpstr[maxlen] = '\0';
+
+ script_pushstr(st, tmpstr);
return true;
}
@@ -10666,7 +10871,7 @@ static BUILDIN(makepet)
if (pet_id >= 0 && sd) {
sd->catch_target_class = pet->db[pet_id].class_;
intif->create_pet(sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
}
@@ -10964,10 +11169,16 @@ static BUILDIN(killmonster)
int16 m,allflag=0;
mapname=script_getstr(st,2);
event=script_getstr(st,3);
- if(strcmp(event,"All")==0)
+
+ if (strcmpi(event, "all") == 0) {
+ if (strcmp(event, "all") != 0) {
+ ShowWarning("buildin_killmonster: \"%s\" deprecated! Please use \"all\" instead.\n", event);
+ script->reportsrc(st);
+ }
allflag = 1;
- else
+ } else {
script->check_event(st, event);
+ }
if( (m=map->mapname2mapid(mapname))<0 )
return true;
@@ -11028,6 +11239,21 @@ static BUILDIN(killmonsterall)
return true;
}
+static BUILDIN(killmonstergid)
+{
+ int mobgid = script_getnum(st, 2);
+ struct mob_data *md = map->id2md(mobgid);
+
+ if (md == NULL) {
+ ShowWarning("buildin_killmonstergid: Error in finding monster GID '%d' or the target is not a monster.\n", mobgid);
+ return false;
+ }
+
+ md->state.npc_killmonster = 1;
+ status_kill(&md->bl);
+ return true;
+}
+
/*==========================================
* Creates a clone of a player.
* clone map, x, y, event, char_id, master_id, mode, flag, duration
@@ -11663,6 +11889,18 @@ static BUILDIN(playerattached)
}
/*==========================================
+ * Used by OnTouchNPC: label to return monster GID
+ *------------------------------------------*/
+static BUILDIN(mobattached)
+{
+ if (st->rid == 0 || map->id2md(st->rid) == NULL)
+ script_pushint(st, 0);
+ else
+ script_pushint(st, st->rid);
+ return true;
+}
+
+/*==========================================
*------------------------------------------*/
static BUILDIN(announce)
{
@@ -12945,7 +13183,8 @@ enum mapinfo_info {
MAPINFO_ID,
MAPINFO_SIZE_X,
MAPINFO_SIZE_Y,
- MAPINFO_ZONE
+ MAPINFO_ZONE,
+ MAPINFO_NPC_COUNT
};
static BUILDIN(getmapinfo)
@@ -12970,7 +13209,7 @@ static BUILDIN(getmapinfo)
}
if (bl == NULL) {
- ShowError("script:getmapinfo: map not supplied and NPC/PC not attached!\n");
+ ShowError("buildin_getmapinfo: map not supplied and NPC/PC not attached!\n");
script_pushint(st, -3);
return false;
}
@@ -13001,8 +13240,11 @@ static BUILDIN(getmapinfo)
case MAPINFO_ZONE:
script_pushstrcopy(st, map->list[m].zone->name);
break;
+ case MAPINFO_NPC_COUNT:
+ script_pushint(st, map->list[m].npc_num);
+ break;
default:
- ShowError("script:getmapinfo: unknown option in second argument (%u).\n", mode);
+ ShowError("buildin_getmapinfo: unknown option in second argument (%u).\n", mode);
script_pushint(st, -2);
return false;
}
@@ -13814,7 +14056,8 @@ static BUILDIN(failedremovecards)
if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) {
cardflag = 1;
- sd->status.inventory[i].card[c] = 0;
+ if (typefail == 1)
+ sd->status.inventory[i].card[c] = 0;
if (typefail == 2) { // add cards to inventory, clear
int flag;
@@ -14732,47 +14975,55 @@ static BUILDIN(petloot)
* Set arrays with info of all sd inventory :
* @inventorylist_id, @inventorylist_amount, @inventorylist_equip,
* @inventorylist_refine, @inventorylist_identify, @inventorylist_attribute,
- * @inventorylist_card(0..3), @inventorylist_expire
+ * @inventorylist_card(0..3),
+ * @inventorylist_opt_id(0..MAX_ITEM_OPTIONS),
+ * @inventorylist_opt_val(0..MAX_ITEM_OPTIONS),
+ * @inventorylist_opt_param(0..MAX_ITEM_OPTIONS),
+ * @inventorylist_expire, @inventorylist_bound, @inventorylist_favorite,
+ * @inventorylist_idx
* @inventorylist_count = scalar
*------------------------------------------*/
static BUILDIN(getinventorylist)
{
struct map_session_data *sd = script->rid2sd(st);
- char card_var[SCRIPT_VARNAME_LENGTH];
+ char script_var[SCRIPT_VARNAME_LENGTH];
+ int j = 0, k = 0;
- int i,j=0,k;
- if(!sd) return true;
+ if (sd == NULL)
+ return true;
- for(i=0;i<MAX_INVENTORY;i++) {
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0) {
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_id"), j),sd->status.inventory[i].nameid);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_amount"), j),sd->status.inventory[i].amount);
- if(sd->status.inventory[i].equip) {
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_equip"), j),pc->equippoint(sd,i));
+ for (int i = 0; i < sd->status.inventorySize; i++) {
+ if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0) {
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_id"), j), sd->status.inventory[i].nameid);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_amount"), j), sd->status.inventory[i].amount);
+ if (sd->status.inventory[i].equip != 0) {
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_equip"), j), pc->equippoint(sd, i));
} else {
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_equip"), j),0);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_equip"), j), 0);
}
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_refine"), j),sd->status.inventory[i].refine);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_identify"), j),sd->status.inventory[i].identify);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_attribute"), j),sd->status.inventory[i].attribute);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_refine"), j), sd->status.inventory[i].refine);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_identify"), j), sd->status.inventory[i].identify);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_attribute"), j), sd->status.inventory[i].attribute);
for (k = 0; k < MAX_SLOTS; k++) {
- sprintf(card_var, "@inventorylist_card%d",k+1);
- pc->setreg(sd,reference_uid(script->add_variable(card_var), j),sd->status.inventory[i].card[k]);
+ sprintf(script_var, "@inventorylist_card%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].card[k]);
}
for (k = 0; k < MAX_ITEM_OPTIONS; k++) {
- sprintf(card_var, "@inventorylist_opt_id%d", k + 1);
- pc->setreg(sd, reference_uid(script->add_variable(card_var), j), sd->status.inventory[i].option[k].index);
- sprintf(card_var, "@inventorylist_opt_val%d", k + 1);
- pc->setreg(sd, reference_uid(script->add_variable(card_var), j), sd->status.inventory[i].option[k].value);
- sprintf(card_var, "@inventorylist_opt_param%d", k + 1);
- pc->setreg(sd, reference_uid(script->add_variable(card_var), j), sd->status.inventory[i].option[k].param);
+ sprintf(script_var, "@inventorylist_opt_id%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].option[k].index);
+ sprintf(script_var, "@inventorylist_opt_val%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].option[k].value);
+ sprintf(script_var, "@inventorylist_opt_param%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].option[k].param);
}
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_expire"), j),sd->status.inventory[i].expire_time);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_bound"), j),sd->status.inventory[i].bound);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_expire"), j), sd->status.inventory[i].expire_time);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_bound"), j), sd->status.inventory[i].bound);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_favorite"), j), sd->status.inventory[i].favorite);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_idx"), j), i);
j++;
}
}
- pc->setreg(sd,script->add_variable("@inventorylist_count"),j);
+ pc->setreg(sd, script->add_variable("@inventorylist_count"), j);
return true;
}
@@ -14834,10 +15085,9 @@ static BUILDIN(getskilllist)
static BUILDIN(clearitem)
{
struct map_session_data *sd = script->rid2sd(st);
- int i;
if (sd == NULL)
return true;
- for (i=0; i<MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].amount) {
pc->delitem(sd, i, sd->status.inventory[i].amount, 0, DELITEM_NORMAL, LOG_TYPE_SCRIPT);
}
@@ -15486,36 +15736,74 @@ static BUILDIN(recovery)
return true;
}
-/*==========================================
- * Get your pet info: getpetinfo(n)
- * n -> 0:pet_id 1:pet_class 2:pet_name
- * 3:friendly 4:hungry, 5: rename flag.
- *------------------------------------------*/
+/*
+ * Get your current pet information
+ */
static BUILDIN(getpetinfo)
{
struct map_session_data *sd = script->rid2sd(st);
- struct pet_data *pd;
- int type=script_getnum(st,2);
+ if (sd == NULL)
+ return true;
- if (sd == NULL || sd->pd == NULL) {
- if (type == 2)
- script_pushconststr(st,"null");
+ struct pet_data *pd = sd->pd;
+ int type = script_getnum(st, 2);
+ if (pd == NULL) {
+ if (type == PETINFO_NAME)
+ script_pushconststr(st, "null");
else
- script_pushint(st,0);
+ script_pushint(st, 0);
return true;
}
- pd = sd->pd;
+
switch(type) {
- case 0: script_pushint(st,pd->pet.pet_id); break;
- case 1: script_pushint(st,pd->pet.class_); break;
- case 2: script_pushstrcopy(st,pd->pet.name); break;
- case 3: script_pushint(st,pd->pet.intimate); break;
- case 4: script_pushint(st,pd->pet.hungry); break;
- case 5: script_pushint(st,pd->pet.rename_flag); break;
- default:
- script_pushint(st,0);
- break;
+ case PETINFO_ID:
+ script_pushint(st, pd->pet.pet_id);
+ break;
+ case PETINFO_CLASS:
+ script_pushint(st, pd->pet.class_);
+ break;
+ case PETINFO_NAME:
+ script_pushstrcopy(st, pd->pet.name);
+ break;
+ case PETINFO_INTIMACY:
+ script_pushint(st, pd->pet.intimate);
+ break;
+ case PETINFO_HUNGRY:
+ script_pushint(st, pd->pet.hungry);
+ break;
+ case PETINFO_RENAME:
+ script_pushint(st, pd->pet.rename_flag);
+ break;
+ case PETINFO_GID:
+ script_pushint(st, pd->bl.id);
+ break;
+ case PETINFO_EGGITEM:
+ script_pushint(st, pd->pet.egg_id);
+ break;
+ case PETINFO_FOODITEM:
+ script_pushint(st, pd->petDB->FoodID);
+ break;
+ case PETINFO_ACCESSORYITEM:
+ script_pushint(st, pd->petDB->AcceID);
+ break;
+ case PETINFO_ACCESSORYFLAG:
+ script_pushint(st, (pd->pet.equip != 0)? 1:0);
+ break;
+ case PETINFO_EVO_EGGID:
+ if (VECTOR_DATA(pd->petDB->evolve_data) != NULL)
+ script_pushint(st, VECTOR_DATA(pd->petDB->evolve_data)->petEggId);
+ else
+ script_pushint(st, 0);
+ break;
+ case PETINFO_AUTOFEED:
+ script_pushint(st, pd->pet.autofeed);
+ break;
+ default:
+ ShowWarning("buildin_getpetinfo: Invalid type %d.\n", type);
+ script_pushint(st, 0);
+ return false;
}
+
return true;
}
@@ -15553,20 +15841,15 @@ static BUILDIN(gethominfo)
return true;
}
-/// Retrieves information about character's mercenary
-/// getmercinfo <type>[,<char id>];
+/*
+ * Retrieves information about character's mercenary
+ * getmercinfo <type>{, <char id> };
+ */
static BUILDIN(getmercinfo)
{
- int type;
- struct map_session_data* sd;
- struct mercenary_data* md;
-
- type = script_getnum(st,2);
-
- if (script_hasdata(st,3)) {
- int char_id = script_getnum(st,3);
-
- if ((sd = script->charid2sd(st, char_id)) == NULL) {
+ struct map_session_data *sd;
+ if (script_hasdata(st, 3)) {
+ if ((sd = script->charid2sd(st, script_getnum(st, 3))) == NULL) {
script_pushnil(st);
return true;
}
@@ -15575,27 +15858,48 @@ static BUILDIN(getmercinfo)
return true;
}
- md = ( sd->status.mer_id && sd->md ) ? sd->md : NULL;
+ struct mercenary_data *md = (sd->status.mer_id && sd->md)? sd->md : NULL;
+ int type = script_getnum(st, 2);
+ if (md == NULL) {
+ if (type == MERCINFO_NAME)
+ script_pushconststr(st, "");
+ else
+ script_pushint(st, 0);
+ return true;
+ }
- switch( type )
- {
- case 0: script_pushint(st,md ? md->mercenary.mercenary_id : 0); break;
- case 1: script_pushint(st,md ? md->mercenary.class_ : 0); break;
- case 2:
- if( md )
- script_pushstrcopy(st,md->db->name);
- else
- script_pushconststr(st,"");
- break;
- case 3: script_pushint(st,md ? mercenary->get_faith(md) : 0); break;
- case 4: script_pushint(st,md ? mercenary->get_calls(md) : 0); break;
- case 5: script_pushint(st,md ? md->mercenary.kill_count : 0); break;
- case 6: script_pushint(st,md ? mercenary->get_lifetime(md) : 0); break;
- case 7: script_pushint(st,md ? md->db->lv : 0); break;
- default:
- ShowError("buildin_getmercinfo: Invalid type %d (char_id=%d).\n", type, sd->status.char_id);
- script_pushnil(st);
- return false;
+ switch (type) {
+ case MERCINFO_ID:
+ script_pushint(st, md->mercenary.mercenary_id);
+ break;
+ case MERCINFO_CLASS:
+ script_pushint(st, md->mercenary.class_);
+ break;
+ case MERCINFO_NAME:
+ script_pushstrcopy(st, md->db->name);
+ break;
+ case MERCINFO_FAITH:
+ script_pushint(st, mercenary->get_faith(md));
+ break;
+ case MERCINFO_CALLS:
+ script_pushint(st, mercenary->get_calls(md));
+ break;
+ case MERCINFO_KILLCOUNT:
+ script_pushint(st, md->mercenary.kill_count);
+ break;
+ case MERCINFO_LIFETIME:
+ script_pushint(st, mercenary->get_lifetime(md));
+ break;
+ case MERCINFO_LEVEL:
+ script_pushint(st, md->db->lv);
+ break;
+ case MERCINFO_GID:
+ script_pushint(st, md->bl.id);
+ break;
+ default:
+ ShowError("buildin_getmercinfo: Invalid type %d (char_id=%d).\n", type, sd->status.char_id);
+ script_pushnil(st);
+ return false;
}
return true;
@@ -15608,19 +15912,18 @@ static BUILDIN(getmercinfo)
*------------------------------------------*/
static BUILDIN(checkequipedcard)
{
- int n,i,c=0;
struct map_session_data *sd = script->rid2sd(st);
if (sd == NULL)
return true;
- c = script_getnum(st,2);
+ int c = script_getnum(st,2);
- for( i=0; i<MAX_INVENTORY; i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount && sd->inventory_data[i]) {
if (itemdb_isspecial(sd->status.inventory[i].card[0]))
continue;
- for(n=0;n<sd->inventory_data[i]->slot;n++) {
+ for (int n = 0; n < sd->inventory_data[i]->slot; n++) {
if(sd->status.inventory[i].card[n]==c) {
script_pushint(st,1);
return true;
@@ -15696,6 +15999,29 @@ static BUILDIN(message)
return true;
}
+static BUILDIN(servicemessage)
+{
+ struct map_session_data *sd = NULL;
+
+ if (script_hasdata(st, 4)) {
+ if (script_isstringtype(st, 4))
+ sd = script->nick2sd(st, script_getstr(st, 4));
+ else
+ sd = script->id2sd(st, script_getnum(st, 4));
+ } else {
+ sd = script->rid2sd(st);
+ }
+
+ if (sd == NULL)
+ return true;
+
+ const char *message = script_getstr(st, 2);
+ const int color = script_getnum(st, 3);
+ clif->serviceMessageColor(sd, color, message);
+
+ return true;
+}
+
/*==========================================
* npctalk (sends message to surrounding area)
* usage: npctalk("<message>"{, "<npc name>"{, <show_name>}});
@@ -15734,37 +16060,41 @@ static BUILDIN(npctalk)
// change npc walkspeed [Valaris]
static BUILDIN(npcspeed)
{
- struct npc_data* nd;
- int speed;
-
- speed = script_getnum(st,2);
- nd = map->id2nd(st->oid);
+ struct npc_data *nd = map->id2nd(st->oid);
+ int speed = script_getnum(st, 2);
if (nd != NULL) {
unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit
+ if (nd->ud == NULL) {
+ ShowWarning("buildin_npcspeed: floating NPC don't have unit data.\n");
+ return false;
+ }
nd->speed = speed;
nd->ud->state.speed_changed = 1;
}
return true;
}
+
// make an npc walk to a position [Valaris]
static BUILDIN(npcwalkto)
{
struct npc_data *nd = map->id2nd(st->oid);
- int x=0,y=0;
-
- x=script_getnum(st,2);
- y=script_getnum(st,3);
+ int x = script_getnum(st, 2);
+ int y = script_getnum(st, 3);
if (nd != NULL) {
unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit
+ if (nd->ud == NULL) {
+ ShowWarning("buildin_npcwalkto: floating NPC don't have unit data.\n");
+ return false;
+ }
if (!nd->status.hp) {
status_calc_npc(nd, SCO_FIRST);
} else {
status_calc_npc(nd, SCO_NONE);
}
- unit->walktoxy(&nd->bl,x,y,0);
+ unit->walktoxy(&nd->bl, x, y, 0);
}
return true;
@@ -15776,6 +16106,10 @@ static BUILDIN(npcstop)
if (nd != NULL) {
unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit
+ if (nd->ud == NULL) {
+ ShowWarning("buildin_npcstop: floating NPC don't have unit data.\n");
+ return false;
+ }
unit->stop_walking(&nd->bl, STOPWALKING_FLAG_FIXPOS|STOPWALKING_FLAG_NEXTCELL);
}
@@ -16465,9 +16799,9 @@ static BUILDIN(equip)
ShowError("wrong item ID : equipitem(%d)\n",nameid);
return false;
}
- ARR_FIND( 0, MAX_INVENTORY, i, sd->status.inventory[i].nameid == nameid && sd->status.inventory[i].equip == 0 );
- if( i < MAX_INVENTORY )
- pc->equipitem(sd,i,item_data->equip);
+ ARR_FIND(0, sd->status.inventorySize, i, sd->status.inventory[i].nameid == nameid && sd->status.inventory[i].equip == 0);
+ if (i < sd->status.inventorySize)
+ pc->equipitem(sd, i, item_data->equip);
return true;
}
@@ -16525,21 +16859,21 @@ static BUILDIN(equip2)
c2 = script_getnum(st, 7);
c3 = script_getnum(st, 8);
- ARR_FIND( 0, MAX_INVENTORY, i,( sd->status.inventory[i].equip == 0 &&
+ ARR_FIND(0, sd->status.inventorySize, i, (sd->status.inventory[i].equip == 0 &&
sd->status.inventory[i].nameid == nameid &&
sd->status.inventory[i].refine == ref &&
sd->status.inventory[i].attribute == attr &&
sd->status.inventory[i].card[0] == c0 &&
sd->status.inventory[i].card[1] == c1 &&
sd->status.inventory[i].card[2] == c2 &&
- sd->status.inventory[i].card[3] == c3 ) );
+ sd->status.inventory[i].card[3] == c3));
- if( i < MAX_INVENTORY ) {
+ if (i < sd->status.inventorySize) {
script_pushint(st,1);
pc->equipitem(sd,i,item_data->equip);
- }
- else
+ } else {
script_pushint(st,0);
+ }
return true;
}
@@ -17594,6 +17928,17 @@ static BUILDIN(max)
return true;
}
+static BUILDIN(cap_value)
+{
+ int value = script_getnum(st, 2);
+ int min = script_getnum(st, 3);
+ int max = script_getnum(st, 4);
+
+ script_pushint(st, (int)cap_value(value, min, max));
+
+ return true;
+}
+
static BUILDIN(md5)
{
const char *tmpstr;
@@ -18554,6 +18899,10 @@ static BUILDIN(getunittype)
* @param4 Value#2 Optional int value to be passed for certain data types.
* @param5 Value#3 Optional int value to be passed for certain data types.
* @return 1 on success, 0 on failure.
+
+ Note: Please make this script command only modify ONE INTEGER value.
+ If need to modify string type data, or having multiple arguments, please
+ introduce a new script command.
*/
static BUILDIN(setunitdata)
{
@@ -18579,7 +18928,7 @@ static BUILDIN(setunitdata)
return false;
}
- /* Mandatory Argument 3 */
+ /* Mandatory Argument 3. Subject to deprecate. */
if (type == UDT_MAPIDXY) {
if (!script_isstringtype(st, 4)) {
ShowError("buildin_setunitdata: Invalid data type for argument #3.\n");
@@ -18774,6 +19123,20 @@ static BUILDIN(setunitdata)
case UDT_ELELEVEL:
setunitdata_check_bounds(4, 0, CHAR_MAX);
break;
+ case UDT_GROUP:
+ {
+ setunitdata_check_bounds(4, 0, INT_MAX);
+ struct unit_data *ud = unit->bl2ud2(bl);
+ if (ud == NULL) {
+ ShowError("buildin_setunitdata: ud is NULL!\n");
+ script_pushint(st, 0);
+ return false;
+ }
+ ud->groupId = script_getnum(st, 4);
+ clif->blname_ack(0, bl); // Send update to client.
+ script_pushint(st, 1);
+ return true;
+ }
default:
break;
}
@@ -18797,14 +19160,16 @@ static BUILDIN(setunitdata)
break;
case UDT_LEVEL:
md->level = val;
+ if (battle_config.show_mob_info & 4)
+ clif->blname_ack(0, &md->bl);
break;
case UDT_HP:
status->set_hp(bl, (unsigned int) val, STATUS_HEAL_DEFAULT);
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
break;
case UDT_MAXHP:
md->status.max_hp = (unsigned int) val;
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
break;
case UDT_SP:
status->set_sp(bl, (unsigned int) val, STATUS_HEAL_DEFAULT);
@@ -19671,6 +20036,10 @@ static BUILDIN(setunitdata)
* @param2 DataType Type of Data to be set for the unit.
* @param3 Variable array reference to store data into. (used for UDT_MAPIDXY)
* @return 0 on failure, <value> on success
+
+ Note: Please make this script command only return ONE INTEGER value.
+ If the unit data having multiple arguments, or need to return in array,
+ please introduce a new script command.
*/
static BUILDIN(getunitdata)
{
@@ -19685,7 +20054,7 @@ static BUILDIN(getunitdata)
if (bl == NULL) {
ShowWarning("buildin_getunitdata: Error in finding object with given GID %d!\n", script_getnum(st, 2));
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
@@ -19694,15 +20063,15 @@ static BUILDIN(getunitdata)
/* Type check */
if (type < UDT_TYPE || type >= UDT_MAX) {
ShowError("buildin_getunitdata: Invalid unit data type %d provided.\n", type);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
- /* Argument checks */
+ /* Argument checks. Subject to deprecate */
if (type == UDT_MAPIDXY) {
if (data == NULL || !data_isreference(data)) {
ShowWarning("buildin_getunitdata: Error in argument 3. Please provide a reference variable to store values in.\n");
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
@@ -19712,10 +20081,19 @@ static BUILDIN(getunitdata)
sd = script->rid2sd(st);
if (sd == NULL) {
ShowWarning("buildin_getunitdata: Player not attached! Cannot use player variable %s.\n",name);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return true;// no player attached
}
}
+ } else if (type == UDT_GROUP) {
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud == NULL) {
+ ShowError("buildin_setunitdata: ud is NULL!\n");
+ script_pushint(st, -1);
+ return false;
+ }
+ script_pushint(st, ud->groupId);
+ return true;
}
#define getunitdata_sub(idx__,var__) script->setd_sub(st,NULL,name,(idx__),(void *)h64BPTRSIZE((int)(var__)),data->ref);
@@ -19782,7 +20160,7 @@ static BUILDIN(getunitdata)
case UDT_DMOTION: script_pushint(st, md->status.dmotion); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mob unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -19839,7 +20217,7 @@ static BUILDIN(getunitdata)
case UDT_INTIMACY: script_pushint(st, hd->homunculus.intimacy); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Homunculus unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -19896,7 +20274,7 @@ static BUILDIN(getunitdata)
case UDT_INTIMACY: script_pushint(st, pd->pet.intimate); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Pet unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -19952,7 +20330,7 @@ static BUILDIN(getunitdata)
case UDT_LIFETIME: script_pushint(st, mc->mercenary.life_time); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mercenary unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -20006,7 +20384,7 @@ static BUILDIN(getunitdata)
case UDT_MASTERCID: script_pushint(st, ed->elemental.char_id); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Elemental unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -20071,14 +20449,14 @@ static BUILDIN(getunitdata)
case UDT_BODY2: script_pushint(st, nd->vd.body_style); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
break;
default:
ShowError("buildin_getunitdata: Unknown object!\n");
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
} // end of bl->type switch
@@ -20174,7 +20552,47 @@ static BUILDIN(setunitname)
}
script_pushint(st, 1);
- clif->charnameack(0, bl); // Send update to client.
+ clif->blname_ack(0, bl); // Send update to client.
+
+ return true;
+}
+
+static BUILDIN(setunittitle)
+{
+ struct block_list *bl = map->id2bl(script_getnum(st, 2));
+ if (bl == NULL) {
+ ShowWarning("buildin_setunittitle: Error in finding object with given game ID %d!\n", script_getnum(st, 2));
+ return false;
+ }
+
+ struct unit_data *ud = unit->bl2ud2(bl);
+ if (ud == NULL) {
+ ShowWarning("buildin_setunittitle: Error in finding unit_data for given game ID %d!\n", script_getnum(st, 2));
+ return false;
+ }
+
+ safestrncpy(ud->title, script_getstr(st, 3), NAME_LENGTH);
+ clif->blname_ack(0, bl); // Send update to client.
+
+ return true;
+}
+
+static BUILDIN(getunittitle)
+{
+ struct block_list *bl = map->id2bl(script_getnum(st, 2));
+ if (bl == NULL) {
+ ShowWarning("buildin_getunitname: Error in finding object with given game ID %d!\n", script_getnum(st, 2));
+ script_pushconststr(st, "Unknown");
+ return false;
+ }
+
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud == NULL) {
+ ShowWarning("buildin_setunittitle: Error in finding unit_data for given game ID %d!\n", script_getnum(st, 2));
+ return false;
+ }
+
+ script_pushstrcopy(st, ud->title);
return true;
}
@@ -20186,24 +20604,28 @@ static BUILDIN(setunitname)
/// unitwalk(<unit_id>,<target_id>) -> <bool>
static BUILDIN(unitwalk)
{
- struct block_list* bl;
+ struct block_list *bl = map->id2bl(script_getnum(st, 2));
- bl = map->id2bl(script_getnum(st,2));
- if( bl == NULL ) {
+ if (bl == NULL) {
script_pushint(st, 0);
return true;
}
- if( bl->type == BL_NPC ) {
- unit->bl2ud2(bl); // ensure the ((struct npc_data*)bl)->ud is safe to edit
+ if (bl->type == BL_NPC) {
+ struct unit_data *ud = unit->bl2ud2(bl); // ensure the ((struct npc_data*)bl)->ud is safe to edit
+ if (ud == NULL) {
+ ShowWarning("buildin_unitwalk: floating NPC don't have unit data.\n");
+ return false;
+ }
}
- if( script_hasdata(st,4) ) {
- int x = script_getnum(st,3);
- int y = script_getnum(st,4);
- script_pushint(st, unit->walktoxy(bl,x,y,0));// We'll use harder calculations.
- } else {
- int target_id = script_getnum(st,3);
- script_pushint(st, unit->walktobl(bl,map->id2bl(target_id),1,1));
+ if (script_hasdata(st, 4)) {
+ int x = script_getnum(st, 3);
+ int y = script_getnum(st, 4);
+ script_pushint(st, unit->walktoxy(bl, x, y, 0));// We'll use harder calculations.
+ }
+ else {
+ int target_id = script_getnum(st, 3);
+ script_pushint(st, unit->walktobl(bl, map->id2bl(target_id), 1, 1));
}
return true;
@@ -20227,32 +20649,34 @@ static BUILDIN(unitkill)
/// unitwarp(<unit_id>,"<map name>",<x>,<y>) -> <bool>
static BUILDIN(unitwarp)
{
- int unit_id;
+ int unit_id = script_getnum(st, 2);
+ const char *mapname = script_getstr(st, 3);
+ short x = (short)script_getnum(st, 4);
+ short y = (short)script_getnum(st, 5);
int mapid;
- short x;
- short y;
- struct block_list* bl;
- const char *mapname;
-
- unit_id = script_getnum(st,2);
- mapname = script_getstr(st, 3);
- x = (short)script_getnum(st,4);
- y = (short)script_getnum(st,5);
+ struct block_list *bl;
if (!unit_id) //Warp the script's runner
bl = map->id2bl(st->rid);
else
bl = map->id2bl(unit_id);
- if( strcmp(mapname,"this") == 0 )
- mapid = bl?bl->m:-1;
+ if (strcmp(mapname, "this") == 0)
+ mapid = bl ? bl->m : -1;
else
mapid = map->mapname2mapid(mapname);
- if( mapid >= 0 && bl != NULL ) {
- unit->bl2ud2(bl); // ensure ((struct npc_data *)bl)->ud is safe to edit
- script_pushint(st, unit->warp(bl,mapid,x,y,CLR_OUTSIGHT));
- } else {
+ if (mapid >= 0 && bl != NULL) {
+ struct unit_data *ud = unit->bl2ud2(bl); // ensure ((struct npc_data *)bl)->ud is safe to edit
+ if (bl->type == BL_NPC) {
+ if (ud == NULL) {
+ ShowWarning("buildin_unitwarp: floating NPC don't have unit data.\n");
+ return false;
+ }
+ }
+ script_pushint(st, unit->warp(bl, mapid, x, y, CLR_OUTSIGHT));
+ }
+ else {
script_pushint(st, 0);
}
@@ -20323,17 +20747,19 @@ static BUILDIN(unitattack)
/// unitstop <unit_id>;
static BUILDIN(unitstop)
{
- int unit_id;
- struct block_list* bl;
-
- unit_id = script_getnum(st,2);
+ struct block_list *bl = map->id2bl(script_getnum(st, 2));
- bl = map->id2bl(unit_id);
- if( bl != NULL ) {
- unit->bl2ud2(bl); // ensure ((struct npc_data *)bl)->ud is safe to edit
+ if (bl != NULL) {
+ struct unit_data *ud = unit->bl2ud2(bl); // ensure ((struct npc_data *)bl)->ud is safe to edit
+ if (bl->type == BL_NPC) {
+ if (ud == NULL) {
+ ShowWarning("buildin_unitstop: floating NPC don't have unit data.\n");
+ return false;
+ }
+ }
unit->stop_attack(bl);
unit->stop_walking(bl, STOPWALKING_FLAG_NEXTCELL);
- if( bl->type == BL_MOB )
+ if (bl->type == BL_MOB)
BL_UCAST(BL_MOB, bl)->target_id = 0;
}
@@ -20999,7 +21425,6 @@ static BUILDIN(questinfo)
return false;
}
- qi.nd = nd;
qi.icon = quest->questinfo_validate_icon(icon);
if (script_hasdata(st, 3)) {
int color = script_getnum(st, 3);
@@ -21011,7 +21436,9 @@ static BUILDIN(questinfo)
qi.color = (unsigned char)color;
}
- map->add_questinfo(nd->bl.m, &qi);
+ VECTOR_ENSURE(nd->qi_data, 1, 1);
+ VECTOR_PUSH(nd->qi_data, qi);
+ map->add_questinfo(nd->bl.m, nd);
return true;
}
@@ -21029,15 +21456,12 @@ static BUILDIN(setquestinfo)
return false;
}
- qi = &VECTOR_LAST(map->list[nd->bl.m].qi_data);
+ qi = &VECTOR_LAST(nd->qi_data);
if (qi == NULL) {
ShowWarning("buildin_setquestinfo: no valide questinfo data has been found for this npc.\n");
return false;
}
- if (qi->nd != nd) {
- ShowWarning("buildin_setquestinfo: invalid usage, setquestinfo must be used only after questinfo.\n");
- return false;
- }
+
switch (type) {
case QINFO_JOB:
{
@@ -21553,7 +21977,7 @@ static BUILDIN(bg_monster_set_team)
mob_stop_attack(md);
mob_stop_walking(md, STOPWALKING_FLAG_NONE);
md->target_id = md->attacked_id = 0;
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
return true;
}
@@ -23605,7 +24029,7 @@ static BUILDIN(bg_create_team)
if( strcmp(map_name,"-") != 0 ) {
map_index = script->mapindexname2id(st,map_name);
if( map_index == 0 ) { // Invalid Map
- script_pushint(st,0);
+ script_pushint(st, -1);
return true;
}
}
@@ -23653,7 +24077,7 @@ static BUILDIN(bg_join_team)
*------------------------------------------*/
static BUILDIN(countbound)
{
- int i, type, j=0, k=0;
+ int type, j=0, k=0;
struct map_session_data *sd = script->rid2sd(st);
if (sd == NULL)
@@ -23661,7 +24085,7 @@ static BUILDIN(countbound)
type = script_hasdata(st,2)?script_getnum(st,2):0;
- for(i=0;i<MAX_INVENTORY;i++) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid > 0 && (
(!type && sd->status.inventory[i].bound > 0) ||
(type && sd->status.inventory[i].bound == type)
@@ -23707,20 +24131,21 @@ static BUILDIN(checkbound)
ShowError("script_checkbound: Not a valid bind type! Type=%d\n", bound_type);
}
- ARR_FIND( 0, MAX_INVENTORY, i, (sd->status.inventory[i].nameid == nameid &&
+ ARR_FIND(0, sd->status.inventorySize, i, (sd->status.inventory[i].nameid == nameid &&
( sd->status.inventory[i].refine == (script_hasdata(st,4)? script_getnum(st,4) : sd->status.inventory[i].refine) ) &&
( sd->status.inventory[i].attribute == (script_hasdata(st,5)? script_getnum(st,5) : sd->status.inventory[i].attribute) ) &&
( sd->status.inventory[i].card[0] == (script_hasdata(st,6)? script_getnum(st,6) : sd->status.inventory[i].card[0]) ) &&
( sd->status.inventory[i].card[1] == (script_hasdata(st,7)? script_getnum(st,7) : sd->status.inventory[i].card[1]) ) &&
( sd->status.inventory[i].card[2] == (script_hasdata(st,8)? script_getnum(st,8) : sd->status.inventory[i].card[2]) ) &&
( sd->status.inventory[i].card[3] == (script_hasdata(st,9)? script_getnum(st,9) : sd->status.inventory[i].card[3]) ) &&
- ((sd->status.inventory[i].bound > 0 && !bound_type) || sd->status.inventory[i].bound == bound_type )) );
+ ((sd->status.inventory[i].bound > 0 && !bound_type) || sd->status.inventory[i].bound == bound_type)));
- if( i < MAX_INVENTORY ){
+ if (i < sd->status.inventorySize) {
script_pushint(st, sd->status.inventory[i].bound);
return true;
- } else
+ } else {
script_pushint(st,0);
+ }
return true;
}
@@ -23857,6 +24282,7 @@ static BUILDIN(sellitem)
struct item_data *it;
int i = 0, id = script_getnum(st,2);
int value = 0;
+ int value2 = 0;
int qty = 0;
if( !(nd = map->id2nd(st->oid)) ) {
@@ -23867,19 +24293,45 @@ static BUILDIN(sellitem)
return false;
}
- value = script_hasdata(st,3) ? script_getnum(st, 3) : it->value_buy;
- if( value == -1 )
- value = it->value_buy;
-
- if( !nd->u.scr.shop )
- npc->trader_update(nd->src_id?nd->src_id:nd->bl.id);
- else {/* no need to run this if its empty */
- for( i = 0; i < nd->u.scr.shop->items; i++ ) {
- if( nd->u.scr.shop->item[i].nameid == id )
- break;
+ if (!nd->u.scr.shop) {
+ npc->trader_update(nd->src_id ? nd->src_id : nd->bl.id);
+ if (nd->u.scr.shop->type == NST_BARTER) {
+ if (!script_hasdata(st, 5)) {
+ ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n");
+ return false;
+ }
+ value = script_getnum(st, 4);
+ value2 = script_getnum(st, 5);
+ }
+ } else {/* no need to run this if its empty */
+ if (nd->u.scr.shop->type == NST_BARTER) {
+ if (!script_hasdata(st, 5)) {
+ ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n");
+ return false;
+ }
+ value = script_getnum(st, 4);
+ value2 = script_getnum(st, 5);
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[i];
+ if (item->nameid == id && item->value == value && item->value2 == value2) {
+ break;
+ }
+ }
+ } else {
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ if (nd->u.scr.shop->item[i].nameid == id) {
+ break;
+ }
+ }
}
}
+ if (nd->u.scr.shop->type != NST_BARTER) {
+ value = script_hasdata(st,3) ? script_getnum(st, 3) : it->value_buy;
+ if( value == -1 )
+ value = it->value_buy;
+ }
+
if( nd->u.scr.shop->type == NST_MARKET ) {
if( !script_hasdata(st,4) || ( qty = script_getnum(st, 4) ) <= 0 ) {
ShowError("buildin_sellitem: invalid 'qty' for market-type shop!\n");
@@ -23892,19 +24344,29 @@ static BUILDIN(sellitem)
it->name, id, value, (int)(value*0.75), it->value_sell, (int)(it->value_sell*1.24), nd->exname, nd->path);
}
- if( i != nd->u.scr.shop->items ) {
+ if (nd->u.scr.shop->type == NST_BARTER) {
+ qty = script_getnum(st, 3);
+ if (qty < -1 || value <= 0 || value2 <= 0) {
+ ShowError("buildin_sellitem: invalid parameters for barter-type shop!\n");
+ return false;
+ }
+ }
+
+ if (i != nd->u.scr.shop->items) {
nd->u.scr.shop->item[i].value = value;
nd->u.scr.shop->item[i].qty = qty;
- if( nd->u.scr.shop->type == NST_MARKET ) /* has been manually updated, make it reflect on sql */
- npc->market_tosql(nd,i);
+ if (nd->u.scr.shop->type == NST_MARKET) /* has been manually updated, make it reflect on sql */
+ npc->market_tosql(nd, i);
+ else if (nd->u.scr.shop->type == NST_BARTER) /* has been manually updated, make it reflect on sql */
+ npc->barter_tosql(nd, i);
} else {
- for( i = 0; i < nd->u.scr.shop->items; i++ ) {
- if( nd->u.scr.shop->item[i].nameid == 0 )
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ if (nd->u.scr.shop->item[i].nameid == 0)
break;
}
- if( i == nd->u.scr.shop->items ) {
- if( nd->u.scr.shop->items == USHRT_MAX ) {
+ if (i == nd->u.scr.shop->items) {
+ if (nd->u.scr.shop->items == USHRT_MAX) {
ShowWarning("buildin_sellitem: Can't add %s (%s/%s), shop list is full!\n", it->name, nd->exname, nd->path);
return false;
}
@@ -23914,6 +24376,7 @@ static BUILDIN(sellitem)
nd->u.scr.shop->item[i].nameid = it->nameid;
nd->u.scr.shop->item[i].value = value;
+ nd->u.scr.shop->item[i].value2 = value2;
nd->u.scr.shop->item[i].qty = qty;
}
@@ -23930,35 +24393,55 @@ static BUILDIN(sellitem)
static BUILDIN(stopselling)
{
struct npc_data *nd;
- int i, id = script_getnum(st,2);
+ int i, id = script_getnum(st, 2);
- if( !(nd = map->id2nd(st->oid)) || !nd->u.scr.shop ) {
+ if (!(nd = map->id2nd(st->oid)) || !nd->u.scr.shop) {
ShowWarning("buildin_stopselling: trying to run without a proper NPC!\n");
return false;
}
- for( i = 0; i < nd->u.scr.shop->items; i++ ) {
- if( nd->u.scr.shop->item[i].nameid == id )
- break;
+ if (nd->u.scr.shop->type == NST_BARTER) {
+ if (!script_hasdata(st, 4)) {
+ ShowError("buildin_stopselling: called with wrong number of arguments\n");
+ return false;
+ }
+ const int id2 = script_getnum(st, 3);
+ const int amount2 = script_getnum(st, 4);
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[i];
+ if (item->nameid == id && item->value == id2 && item->value2 == amount2) {
+ break;
+ }
+ }
+ } else {
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ if (nd->u.scr.shop->item[i].nameid == id) {
+ break;
+ }
+ }
}
- if( i != nd->u.scr.shop->items ) {
+ if (i != nd->u.scr.shop->items) {
int cursor;
- if( nd->u.scr.shop->type == NST_MARKET )
- npc->market_delfromsql(nd,i);
+ if (nd->u.scr.shop->type == NST_MARKET)
+ npc->market_delfromsql(nd, i);
+ if (nd->u.scr.shop->type == NST_BARTER)
+ npc->barter_delfromsql(nd, i);
nd->u.scr.shop->item[i].nameid = 0;
nd->u.scr.shop->item[i].value = 0;
+ nd->u.scr.shop->item[i].value2 = 0;
nd->u.scr.shop->item[i].qty = 0;
- for( i = 0, cursor = 0; i < nd->u.scr.shop->items; i++ ) {
- if( nd->u.scr.shop->item[i].nameid == 0 )
+ for (i = 0, cursor = 0; i < nd->u.scr.shop->items; i++) {
+ if (nd->u.scr.shop->item[i].nameid == 0)
continue;
- if( cursor != i ) {
+ if (cursor != i) {
nd->u.scr.shop->item[cursor].nameid = nd->u.scr.shop->item[i].nameid;
nd->u.scr.shop->item[cursor].value = nd->u.scr.shop->item[i].value;
+ nd->u.scr.shop->item[cursor].value2 = nd->u.scr.shop->item[i].value2;
nd->u.scr.shop->item[cursor].qty = nd->u.scr.shop->item[i].qty;
}
@@ -24024,7 +24507,8 @@ static BUILDIN(tradertype)
nd->u.scr.shop->item[i].value = 0;
nd->u.scr.shop->item[i].qty = 0;
}
- npc->market_delfromsql(nd,USHRT_MAX);
+ npc->market_delfromsql(nd, INT_MAX);
+ npc->barter_delfromsql(nd, INT_MAX);
}
#if PACKETVER < 20131223
@@ -24033,6 +24517,12 @@ static BUILDIN(tradertype)
script->reportsrc(st);
}
#endif
+#if PACKETVER_MAIN_NUM < 20190116 && PACKETVER_RE_NUM < 20190116 && PACKETVER_ZERO_NUM < 20181226
+ if (type == NST_BARTER) {
+ ShowWarning("buildin_tradertype: NST_BARTER is only available with PACKETVER_ZERO_NUM 20181226 or PACKETVER_MAIN_NUM 20190116 or PACKETVER_RE_NUM 20190116 or newer!\n");
+ script->reportsrc(st);
+ }
+#endif
if( nd->u.scr.shop )
nd->u.scr.shop->type = type;
@@ -24076,8 +24566,8 @@ static BUILDIN(shopcount)
} else if ( !nd->u.scr.shop || !nd->u.scr.shop->items ) {
ShowWarning("buildin_shopcount(%d): trying to use without any items!\n",id);
return false;
- } else if ( nd->u.scr.shop->type != NST_MARKET ) {
- ShowWarning("buildin_shopcount(%d): trying to use on a non-NST_MARKET shop!\n",id);
+ } else if (nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) {
+ ShowWarning("buildin_shopcount(%d): trying to use on a non-NST_MARKET and non-NST_BARTER shop!\n",id);
return false;
}
@@ -24178,7 +24668,7 @@ static BUILDIN(showscript)
{
struct block_list *bl = NULL;
const char *msg = script_getstr(st, 2);
- int id = 0;
+ int id = 0, flag = AREA;
if (script_hasdata(st, 3)) {
id = script_getnum(st, 3);
@@ -24190,14 +24680,14 @@ static BUILDIN(showscript)
if (!bl) {
ShowError("buildin_showscript: Script not attached. (id=%d, rid=%d, oid=%d)\n", id, st->rid, st->oid);
- script_pushint(st, 0);
return false;
}
- clif->ShowScript(bl, msg);
-
- script_pushint(st, 1);
-
+ if (script_hasdata(st, 4))
+ if (script_getnum(st, 4) == SELF)
+ flag = SELF;
+
+ clif->ShowScript(bl, msg, flag);
return true;
}
@@ -24307,6 +24797,57 @@ static BUILDIN(getcalendartime)
return true;
}
+enum consolemes_type {
+ CONSOLEMES_DEBUG = 0,
+ CONSOLEMES_ERROR = 1,
+ CONSOLEMES_WARNING = 2,
+ CONSOLEMES_INFO = 3,
+ CONSOLEMES_STATUS = 4,
+ CONSOLEMES_NOTICE = 5,
+};
+
+/*==========================================
+* consolemes(<type>, "text")
+*------------------------------------------*/
+static BUILDIN(consolemes)
+{
+ struct StringBuf buf;
+ StrBuf->Init(&buf);
+ int type = script_hasdata(st, 2) ? script_getnum(st, 2) : 0;
+
+ if (!script->sprintf_helper(st, 3, &buf)) {
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 0);
+ return false;
+ }
+
+ switch (type) {
+ default:
+ case CONSOLEMES_DEBUG:
+ ShowDebug("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_ERROR:
+ ShowError("consolemes: (st->rid: %d) (st->oid: %d) %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_WARNING:
+ ShowWarning("consolemes: (st->rid: %d) (st->oid: %d) %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_INFO:
+ ShowInfo("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_STATUS:
+ ShowStatus("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_NOTICE:
+ ShowNotice("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ }
+
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 1);
+ return true;
+}
+
/** place holder for the translation macro **/
static BUILDIN(_)
{
@@ -24808,6 +25349,129 @@ static BUILDIN(itempreview)
return true;
}
+// insert or remove card into equipped item
+static BUILDIN(enchantitem)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd == NULL)
+ return false;
+ const int pos = script_getnum(st, 2);
+ if ((pos < EQI_ACC_L || pos > EQI_HAND_R) && pos != EQI_AMMO) {
+ ShowError("Wrong equip position: %d\n", pos);
+ script->reportfunc(st);
+ script->reportsrc(st);
+ script_pushint(st, false);
+ return true;
+ }
+ const int cardId = script_getnum(st, 4);
+ struct item_data *it = itemdb->exists(cardId);
+ if (it == NULL || it->type != IT_CARD) {
+ ShowError("Item id is not card or not exists: %d\n", cardId);
+ script->reportfunc(st);
+ script->reportsrc(st);
+ script_pushint(st, false);
+ return true;
+ }
+ const int n = sd->equip_index[pos];
+ if (n < 0) {
+ ShowError("Item in equipment slot %d is not equipped\n", pos);
+ script->reportfunc(st);
+ script->reportsrc(st);
+ script_pushint(st, false);
+ return true;
+ }
+ const int cardSlot = script_getnum(st, 3);
+ if (cardSlot < 0 || cardSlot >= MAX_SLOTS) {
+ ShowError("Wrong card slot %d. Must be in range 0-3.\n", cardSlot);
+ script->reportfunc(st);
+ script->reportsrc(st);
+ script_pushint(st, false);
+ return true;
+ }
+ const bool res = clif->enchant_equipment(sd, pc->equip_pos[pos], cardSlot, cardId);
+ if (res) {
+ logs->pick_pc(sd, LOG_TYPE_CARD, -1, &sd->status.inventory[n],sd->inventory_data[n]);
+ sd->status.inventory[n].card[cardSlot] = cardId;
+ logs->pick_pc(sd, LOG_TYPE_CARD, 1, &sd->status.inventory[n],sd->inventory_data[n]);
+ status_calc_pc(sd, SCO_NONE);
+ }
+ script_pushint(st, res);
+ return true;
+}
+
+// send ack to inventory expand request
+static BUILDIN(expandinventoryack)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd == NULL)
+ return false;
+ int itemId = 0;
+ if (script_hasdata(st, 3)) {
+ itemId = script_getnum(st, 3);
+ }
+ clif->inventoryExpandAck(sd, script_getnum(st, 2), itemId);
+ return true;
+}
+
+// send final ack to inventory expand request
+static BUILDIN(expandinventoryresult)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd == NULL)
+ return false;
+ clif->inventoryExpandResult(sd, script_getnum(st, 2));
+ return true;
+}
+
+// adjust player inventory size to given value positive or negative
+static BUILDIN(expandinventory)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd == NULL)
+ return false;
+ script_pushint(st, pc->expandInventory(sd, script_getnum(st, 2)));
+ return true;
+}
+
+// return current player inventory size
+static BUILDIN(getinventorysize)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd == NULL)
+ return false;
+ script_pushint(st, sd->status.inventorySize);
+ return true;
+}
+
+// force close roulette window if it opened
+static BUILDIN(closeroulette)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd == NULL)
+ return false;
+ clif->roulette_close(sd);
+ return true;
+}
+
+static BUILDIN(openrefineryui)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+
+ if (sd == NULL) {
+ script_pushint(st, 0);
+ return true;
+ }
+
+ if (battle_config.enable_refinery_ui == 0) {
+ script_pushint(st, 0);
+ return true;
+ }
+
+ clif->OpenRefineryUI(sd);
+ script_pushint(st, 1);
+ return true;
+}
+
/**
* Adds a built-in script function.
*
@@ -24972,6 +25636,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(mes, "?"),
BUILDIN_DEF(mesf, "s*"),
BUILDIN_DEF(next,""),
+ BUILDIN_DEF(mesclear,""),
BUILDIN_DEF(close,""),
BUILDIN_DEF(close2,""),
BUILDIN_DEF(menu,"sl*"),
@@ -25010,6 +25675,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(makeitem2,"viiiiiiii????"),
BUILDIN_DEF(delitem,"vi?"),
BUILDIN_DEF(delitem2,"viiiiiiii?"),
+ BUILDIN_DEF(delitemidx, "i??"),
BUILDIN_DEF2(enableitemuse,"enable_items",""),
BUILDIN_DEF2(disableitemuse,"disable_items",""),
BUILDIN_DEF(cutin,"si"),
@@ -25020,6 +25686,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(rand,"i?"),
BUILDIN_DEF(countitem,"v"),
BUILDIN_DEF(countitem2,"viiiiiii"),
+ BUILDIN_DEF(countnameditem,"v?"),
BUILDIN_DEF(checkweight,"vi*"),
BUILDIN_DEF(checkweight2,"rr"),
BUILDIN_DEF(readparam,"i?"),
@@ -25033,6 +25700,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(getguildmaster,"i"),
BUILDIN_DEF(getguildmasterid,"i"),
BUILDIN_DEF(getguildmember,"i?"),
+ BUILDIN_DEF(getguildonline, "i?"),
BUILDIN_DEF(strcharinfo,"i??"),
BUILDIN_DEF(strnpcinfo,"i??"),
BUILDIN_DEF(charid2rid,"i"),
@@ -25053,6 +25721,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(downrefitem,"i?"),
BUILDIN_DEF(statusup,"i"),
BUILDIN_DEF(statusup2,"ii"),
+ BUILDIN_DEF(needed_status_point, "ii"),
BUILDIN_DEF(bonus,"iv"),
BUILDIN_DEF2(bonus,"bonus2","ivi"),
BUILDIN_DEF2(bonus,"bonus3","ivii"),
@@ -25083,7 +25752,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(savepoint,"sii"),
BUILDIN_DEF(gettimetick,"i"),
BUILDIN_DEF(gettime,"i"),
- BUILDIN_DEF(gettimestr,"si"),
+ BUILDIN_DEF(gettimestr, "si?"),
BUILDIN_DEF(openstorage,""),
BUILDIN_DEF(guildopenstorage,""),
BUILDIN_DEF(itemskill,"vi?"),
@@ -25094,6 +25763,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(areamonster,"siiiisii???"),
BUILDIN_DEF(killmonster,"ss?"),
BUILDIN_DEF(killmonsterall,"s?"),
+ BUILDIN_DEF(killmonstergid, "i"),
BUILDIN_DEF(clone,"siisi????"),
BUILDIN_DEF(doevent,"s"),
BUILDIN_DEF(donpcevent,"s"),
@@ -25110,6 +25780,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(attachnpctimer,"?"), // attached the player id to the npc timer [Celest]
BUILDIN_DEF(detachnpctimer,"?"), // detached the player id from the npc timer [Celest]
BUILDIN_DEF(playerattached,""), // returns id of the current attached player. [Skotlex]
+ BUILDIN_DEF(mobattached, ""),
BUILDIN_DEF(announce,"si?????"),
BUILDIN_DEF(mapannounce,"ssi?????"),
BUILDIN_DEF(areaannounce,"siiiisi?????"),
@@ -25128,7 +25799,8 @@ static void script_parse_builtin(void)
BUILDIN_DEF(sc_end,"i?"),
BUILDIN_DEF(getstatus, "i?"),
BUILDIN_DEF(getscrate,"ii?"),
- BUILDIN_DEF(debugmes,"v*"),
+ BUILDIN_DEF_DEPRECATED(debugmes,"v*"),
+ BUILDIN_DEF(consolemes,"iv*"),
BUILDIN_DEF2(catchpet,"pet","i"),
BUILDIN_DEF2(birthpet,"bpet",""),
BUILDIN_DEF(resetlvl,"i"),
@@ -25212,6 +25884,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF2(atcommand,"charcommand","s"), // [MouseJstr]
BUILDIN_DEF(movenpc,"sii?"), // [MouseJstr]
BUILDIN_DEF(message,"vs"), // [MouseJstr]
+ BUILDIN_DEF(servicemessage, "si?"),
BUILDIN_DEF(npctalk,"s??"), // [Valaris][Murilo BiO]
BUILDIN_DEF(mobcount,"ss"),
BUILDIN_DEF(getlook,"i"),
@@ -25294,13 +25967,14 @@ static void script_parse_builtin(void)
// <--- List of mathematics commands
BUILDIN_DEF(min, "i*"),
BUILDIN_DEF(max, "i*"),
+ BUILDIN_DEF(cap_value, "iii"),
BUILDIN_DEF(md5,"s"),
BUILDIN_DEF(swap,"rr"),
// [zBuffer] List of dynamic var commands --->
BUILDIN_DEF(getd,"s"),
BUILDIN_DEF(setd,"sv"),
// <--- [zBuffer] List of dynamic var commands
- BUILDIN_DEF(petstat,"i"),
+ BUILDIN_DEF_DEPRECATED(petstat, "i"), // Deprecated 2019-03-11
BUILDIN_DEF(callshop,"s?"), // [Skotlex]
BUILDIN_DEF(npcshopitem,"sii*"), // [Lance]
BUILDIN_DEF(npcshopadditem,"sii*"),
@@ -25338,6 +26012,8 @@ static void script_parse_builtin(void)
BUILDIN_DEF(getunitdata,"ii?"),
BUILDIN_DEF(getunitname,"i"),
BUILDIN_DEF(setunitname,"is"),
+ BUILDIN_DEF(getunittitle,"i"),
+ BUILDIN_DEF(setunittitle,"is"),
BUILDIN_DEF(unitwalk,"ii?"),
BUILDIN_DEF(unitkill,"i"),
BUILDIN_DEF(unitwarp,"isii"),
@@ -25506,8 +26182,8 @@ static void script_parse_builtin(void)
/* New Shop Support */
BUILDIN_DEF(openshop,"?"),
- BUILDIN_DEF(sellitem,"i??"),
- BUILDIN_DEF(stopselling,"i"),
+ BUILDIN_DEF(sellitem,"i???"),
+ BUILDIN_DEF(stopselling,"i??"),
BUILDIN_DEF(setcurrency,"i?"),
BUILDIN_DEF(tradertype,"i"),
BUILDIN_DEF(purchaseok,""),
@@ -25524,7 +26200,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(channelmes, "ss"),
BUILDIN_DEF(addchannelhandler, "ss"),
BUILDIN_DEF(removechannelhandler, "ss"),
- BUILDIN_DEF(showscript, "s?"),
+ BUILDIN_DEF(showscript, "s??"),
BUILDIN_DEF(mergeitem,""),
BUILDIN_DEF(getcalendartime, "ii??"),
@@ -25546,6 +26222,14 @@ static void script_parse_builtin(void)
BUILDIN_DEF(changecamera, "iii?"),
BUILDIN_DEF(itempreview, "i"),
+ BUILDIN_DEF(enchantitem, "iii"),
+ BUILDIN_DEF(expandinventoryack, "i?"),
+ BUILDIN_DEF(expandinventoryresult, "i"),
+ BUILDIN_DEF(expandinventory, "i"),
+ BUILDIN_DEF(getinventorysize, ""),
+
+ BUILDIN_DEF(closeroulette, ""),
+ BUILDIN_DEF(openrefineryui, ""),
};
int i, len = ARRAYLENGTH(BUILDIN);
RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up
@@ -25585,15 +26269,20 @@ static void script_hardcoded_constants(void)
script->set_constant("MAX_LEVEL",MAX_LEVEL,false, false);
script->set_constant("MAX_STORAGE",MAX_STORAGE,false, false);
script->set_constant("MAX_GUILD_STORAGE",MAX_GUILD_STORAGE,false, false);
- script->set_constant("MAX_CART",MAX_INVENTORY,false, false);
+ script->set_constant("MAX_CART", MAX_CART, false, false);
script->set_constant("MAX_INVENTORY",MAX_INVENTORY,false, false);
+ script->set_constant("FIXED_INVENTORY_SIZE", FIXED_INVENTORY_SIZE, false, false);
script->set_constant("MAX_ZENY",MAX_ZENY,false, false);
script->set_constant("MAX_BANK_ZENY", MAX_BANK_ZENY, false, false);
script->set_constant("MAX_BG_MEMBERS",MAX_BG_MEMBERS,false, false);
script->set_constant("MAX_CHAT_USERS",MAX_CHAT_USERS,false, false);
script->set_constant("MAX_REFINE",MAX_REFINE,false, false);
+ script->set_constant("MAX_ITEM_ID",MAX_ITEM_ID,false, false);
script->set_constant("MAX_MENU_OPTIONS", MAX_MENU_OPTIONS, false, false);
script->set_constant("MAX_MENU_LENGTH", MAX_MENU_LENGTH, false, false);
+ script->set_constant("MOB_CLONE_START", MOB_CLONE_START, false, false);
+ script->set_constant("MOB_CLONE_END", MOB_CLONE_END, false, false);
+ script->set_constant("MAX_NPC_PER_MAP", MAX_NPC_PER_MAP, false, false);
script->constdb_comment("status options");
script->set_constant("Option_Nothing",OPTION_NOTHING,false, false);
@@ -25845,6 +26534,15 @@ static void script_hardcoded_constants(void)
script->set_constant("MAPINFO_SIZE_X", MAPINFO_SIZE_X, false, false);
script->set_constant("MAPINFO_SIZE_Y", MAPINFO_SIZE_Y, false, false);
script->set_constant("MAPINFO_ZONE", MAPINFO_ZONE, false, false);
+ script->set_constant("MAPINFO_NPC_COUNT", MAPINFO_NPC_COUNT, false, false);
+
+ script->constdb_comment("consolemes options");
+ script->set_constant("CONSOLEMES_DEBUG", CONSOLEMES_DEBUG, false, false);
+ script->set_constant("CONSOLEMES_ERROR", CONSOLEMES_ERROR, false, false);
+ script->set_constant("CONSOLEMES_WARNING", CONSOLEMES_WARNING, false, false);
+ script->set_constant("CONSOLEMES_INFO", CONSOLEMES_INFO, false, false);
+ script->set_constant("CONSOLEMES_STATUS", CONSOLEMES_STATUS, false, false);
+ script->set_constant("CONSOLEMES_NOTICE", CONSOLEMES_NOTICE, false, false);
script->constdb_comment("set/getiteminfo options");
script->set_constant("ITEMINFO_BUYPRICE", ITEMINFO_BUYPRICE, false, false);
@@ -25866,6 +26564,32 @@ static void script_hardcoded_constants(void)
script->set_constant("ITEMINFO_VIEWSPRITE", ITEMINFO_VIEWSPRITE, false, false);
script->set_constant("ITEMINFO_TRADE", ITEMINFO_TRADE, false, false);
+ script->constdb_comment("getmercinfo options");
+ script->set_constant("MERCINFO_ID,", MERCINFO_ID, false, false);
+ script->set_constant("MERCINFO_CLASS", MERCINFO_CLASS, false, false);
+ script->set_constant("MERCINFO_NAME", MERCINFO_NAME, false, false);
+ script->set_constant("MERCINFO_FAITH", MERCINFO_FAITH, false, false);
+ script->set_constant("MERCINFO_CALLS", MERCINFO_CALLS, false, false);
+ script->set_constant("MERCINFO_KILLCOUNT", MERCINFO_KILLCOUNT, false, false);
+ script->set_constant("MERCINFO_LIFETIME", MERCINFO_LIFETIME, false, false);
+ script->set_constant("MERCINFO_LEVEL", MERCINFO_LEVEL, false, false);
+ script->set_constant("MERCINFO_GID", MERCINFO_GID, false, false);
+
+ script->constdb_comment("getpetinfo options");
+ script->set_constant("PETINFO_ID", PETINFO_ID, false, false);
+ script->set_constant("PETINFO_CLASS", PETINFO_CLASS, false, false);
+ script->set_constant("PETINFO_NAME", PETINFO_NAME, false, false);
+ script->set_constant("PETINFO_INTIMACY", PETINFO_INTIMACY, false, false);
+ script->set_constant("PETINFO_HUNGRY", PETINFO_HUNGRY, false, false);
+ script->set_constant("PETINFO_RENAME", PETINFO_RENAME, false, false);
+ script->set_constant("PETINFO_GID", PETINFO_GID, false, false);
+ script->set_constant("PETINFO_EGGITEM", PETINFO_EGGITEM, false, false);
+ script->set_constant("PETINFO_FOODITEM", PETINFO_FOODITEM, false, false);
+ script->set_constant("PETINFO_ACCESSORYITEM", PETINFO_ACCESSORYITEM, false, false);
+ script->set_constant("PETINFO_ACCESSORYFLAG", PETINFO_ACCESSORYFLAG, false, false);
+ script->set_constant("PETINFO_EVO_EGGID", PETINFO_EVO_EGGID, false, false);
+ script->set_constant("PETINFO_AUTOFEED", PETINFO_AUTOFEED, false, false);
+
script->constdb_comment("monster skill states");
script->set_constant("MSS_ANY", MSS_ANY, false, false);
script->set_constant("MSS_IDLE", MSS_IDLE, false, false);
@@ -25969,6 +26693,91 @@ static void script_hardcoded_constants(void)
script->set_constant("ITR_NOAUCTION", ITR_NOAUCTION, false, false);
script->set_constant("ITR_ALL", ITR_ALL, false, false);
+ script->constdb_comment("inventory expand ack responds");
+ script->set_constant("EXPAND_INV_ASK_CONFIRMATION", EXPAND_INVENTORY_ASK_CONFIRMATION, false, false);
+ script->set_constant("EXPAND_INV_FAILED", EXPAND_INVENTORY_FAILED, false, false);
+ script->set_constant("EXPAND_INV_OTHER_WORK", EXPAND_INVENTORY_OTHER_WORK, false, false);
+ script->set_constant("EXPAND_INV_MISSING_ITEM", EXPAND_INVENTORY_MISSING_ITEM, false, false);
+ script->set_constant("EXPAND_INV_MAX_SIZE", EXPAND_INVENTORY_MAX_SIZE, false, false);
+
+ script->constdb_comment("inventory expand final responds");
+ script->set_constant("EXPAND_INV_RESULT_SUCCESS", EXPAND_INVENTORY_RESULT_SUCCESS, false, false);
+ script->set_constant("EXPAND_INV_RESULT_FAILED", EXPAND_INVENTORY_RESULT_FAILED, false, false);
+ script->set_constant("EXPAND_INV_RESULT_OTHER_WORK", EXPAND_INVENTORY_RESULT_OTHER_WORK, false, false);
+ script->set_constant("EXPAND_INV_RESULT_MISSING_ITEM", EXPAND_INVENTORY_RESULT_MISSING_ITEM, false, false);
+ script->set_constant("EXPAND_INV_RESULT_MAX_SIZE", EXPAND_INVENTORY_RESULT_MAX_SIZE, false, false);
+
+ script->constdb_comment("trader type");
+ script->set_constant("NST_ZENY", NST_ZENY, false, false);
+ script->set_constant("NST_CASH", NST_CASH, false, false);
+ script->set_constant("NST_MARKET", NST_MARKET, false, false);
+ script->set_constant("NST_CUSTOM", NST_CUSTOM, false, false);
+ script->set_constant("NST_BARTER", NST_BARTER, false, false);
+
+ script->constdb_comment("script unit data types");
+ script->set_constant("UDT_TYPE", UDT_TYPE, false, false);
+ script->set_constant("UDT_SIZE", UDT_SIZE, false, false);
+ script->set_constant("UDT_LEVEL", UDT_LEVEL, false, false);
+ script->set_constant("UDT_HP", UDT_HP, false, false);
+ script->set_constant("UDT_MAXHP", UDT_MAXHP, false, false);
+ script->set_constant("UDT_SP", UDT_SP, false, false);
+ script->set_constant("UDT_MAXSP", UDT_MAXSP, false, false);
+ script->set_constant("UDT_MASTERAID", UDT_MASTERAID, false, false);
+ script->set_constant("UDT_MASTERCID", UDT_MASTERCID, false, false);
+ script->set_constant("UDT_MAPIDXY", UDT_MAPIDXY, false, true); // for setunitdata use *unitwarp, for getunitdata use *getmapxy
+ script->set_constant("UDT_WALKTOXY", UDT_WALKTOXY, false, true); // use *unitwalk
+ script->set_constant("UDT_SPEED", UDT_SPEED, false, false);
+ script->set_constant("UDT_MODE", UDT_MODE, false, false);
+ script->set_constant("UDT_AI", UDT_AI, false, false);
+ script->set_constant("UDT_SCOPTION", UDT_SCOPTION, false, false);
+ script->set_constant("UDT_SEX", UDT_SEX, false, false);
+ script->set_constant("UDT_CLASS", UDT_CLASS, false, false);
+ script->set_constant("UDT_HAIRSTYLE", UDT_HAIRSTYLE, false, false);
+ script->set_constant("UDT_HAIRCOLOR", UDT_HAIRCOLOR, false, false);
+ script->set_constant("UDT_HEADBOTTOM", UDT_HEADBOTTOM, false, false);
+ script->set_constant("UDT_HEADMIDDLE", UDT_HEADMIDDLE, false, false);
+ script->set_constant("UDT_HEADTOP", UDT_HEADTOP, false, false);
+ script->set_constant("UDT_CLOTHCOLOR", UDT_CLOTHCOLOR, false, false);
+ script->set_constant("UDT_SHIELD", UDT_SHIELD, false, false);
+ script->set_constant("UDT_WEAPON", UDT_WEAPON, false, false);
+ script->set_constant("UDT_LOOKDIR", UDT_LOOKDIR, false, false);
+ script->set_constant("UDT_CANMOVETICK", UDT_CANMOVETICK, false, false);
+ script->set_constant("UDT_STR", UDT_STR, false, false);
+ script->set_constant("UDT_AGI", UDT_AGI, false, false);
+ script->set_constant("UDT_VIT", UDT_VIT, false, false);
+ script->set_constant("UDT_INT", UDT_INT, false, false);
+ script->set_constant("UDT_DEX", UDT_DEX, false, false);
+ script->set_constant("UDT_LUK", UDT_LUK, false, false);
+ script->set_constant("UDT_ATKRANGE", UDT_ATKRANGE, false, false);
+ script->set_constant("UDT_ATKMIN", UDT_ATKMIN, false, false);
+ script->set_constant("UDT_ATKMAX", UDT_ATKMAX, false, false);
+ script->set_constant("UDT_MATKMIN", UDT_MATKMIN, false, false);
+ script->set_constant("UDT_MATKMAX", UDT_MATKMAX, false, false);
+ script->set_constant("UDT_DEF", UDT_DEF, false, false);
+ script->set_constant("UDT_MDEF", UDT_MDEF, false, false);
+ script->set_constant("UDT_HIT", UDT_HIT, false, false);
+ script->set_constant("UDT_FLEE", UDT_FLEE, false, false);
+ script->set_constant("UDT_PDODGE", UDT_PDODGE, false, false);
+ script->set_constant("UDT_CRIT", UDT_CRIT, false, false);
+ script->set_constant("UDT_RACE", UDT_RACE, false, false);
+ script->set_constant("UDT_ELETYPE", UDT_ELETYPE, false, false);
+ script->set_constant("UDT_ELELEVEL", UDT_ELELEVEL, false, false);
+ script->set_constant("UDT_AMOTION", UDT_AMOTION, false, false);
+ script->set_constant("UDT_ADELAY", UDT_ADELAY, false, false);
+ script->set_constant("UDT_DMOTION", UDT_DMOTION, false, false);
+ script->set_constant("UDT_HUNGER", UDT_HUNGER, false, false);
+ script->set_constant("UDT_INTIMACY", UDT_INTIMACY, false, false);
+ script->set_constant("UDT_LIFETIME", UDT_LIFETIME, false, false);
+ script->set_constant("UDT_MERC_KILLCOUNT", UDT_MERC_KILLCOUNT, false, false);
+ script->set_constant("UDT_STATPOINT", UDT_STATPOINT, false, false);
+ script->set_constant("UDT_ROBE", UDT_ROBE, false, false);
+ script->set_constant("UDT_BODY2", UDT_BODY2, false, false);
+ script->set_constant("UDT_GROUP", UDT_GROUP, false, false);
+
+ script->constdb_comment("getguildonline types");
+ script->set_constant("GUILD_ONLINE_ALL", GUILD_ONLINE_ALL, false, false);
+ script->set_constant("GUILD_ONLINE_VENDOR", GUILD_ONLINE_VENDOR, false, false);
+ script->set_constant("GUILD_ONLINE_NO_VENDOR", GUILD_ONLINE_NO_VENDOR, false, false);
script->constdb_comment("Renewal");
#ifdef RENEWAL
diff --git a/src/map/script.h b/src/map/script.h
index e577867ba..62950ba8d 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -433,6 +433,7 @@ enum script_unit_data_types {
UDT_STATPOINT,
UDT_ROBE,
UDT_BODY2,
+ UDT_GROUP,
UDT_MAX
};
@@ -463,6 +464,44 @@ enum script_iteminfo_types {
};
/**
+ * Mercenary Info types.
+ */
+enum script_mercinfo_types {
+ MERCINFO_ID = 0,
+ MERCINFO_CLASS,
+ MERCINFO_NAME,
+ MERCINFO_FAITH,
+ MERCINFO_CALLS,
+ MERCINFO_KILLCOUNT,
+ MERCINFO_LIFETIME,
+ MERCINFO_LEVEL,
+ MERCINFO_GID,
+
+ MERCINFO_MAX
+};
+
+/**
+ * Pet Info types.
+ */
+enum script_petinfo_types {
+ PETINFO_ID = 0,
+ PETINFO_CLASS,
+ PETINFO_NAME,
+ PETINFO_INTIMACY,
+ PETINFO_HUNGRY,
+ PETINFO_RENAME,
+ PETINFO_GID,
+ PETINFO_EGGITEM,
+ PETINFO_FOODITEM,
+ PETINFO_ACCESSORYITEM,
+ PETINFO_ACCESSORYFLAG,
+ PETINFO_EVO_EGGID,
+ PETINFO_AUTOFEED,
+
+ PETINFO_MAX
+};
+
+/**
* Player blocking actions related flags.
*/
enum pcblock_action_flag {
diff --git a/src/map/searchstore.c b/src/map/searchstore.c
index 0c6fa3555..c991e38c4 100644
--- a/src/map/searchstore.c
+++ b/src/map/searchstore.c
@@ -345,7 +345,7 @@ static void searchstore_clearremote(struct map_session_data *sd)
}
/// receives results from a store-specific callback
-static bool searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option)
+static bool searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option)
{
struct s_search_store_info_item* ssitem;
@@ -364,7 +364,7 @@ static bool searchstore_result(struct map_session_data *sd, unsigned int store_i
ssitem->amount = amount;
ssitem->price = price;
memcpy(ssitem->card, card, sizeof(ssitem->card));
- ssitem->refine = refine;
+ ssitem->refine = refine_level;
memcpy(ssitem->option, option, sizeof(ssitem->option));
return true;
diff --git a/src/map/searchstore.h b/src/map/searchstore.h
index e5ccfd300..71d562679 100644
--- a/src/map/searchstore.h
+++ b/src/map/searchstore.h
@@ -109,7 +109,7 @@ struct searchstore_interface {
void (*click) (struct map_session_data* sd, int account_id, int store_id, int nameid);
bool (*queryremote) (struct map_session_data* sd, int account_id);
void (*clearremote) (struct map_session_data* sd);
- bool (*result) (struct map_session_data* sd, unsigned int store_id, int account_id, const char* store_name, int nameid, unsigned short amount, unsigned int price, const int* card, unsigned char refine, const struct item_option *option);
+ bool (*result) (struct map_session_data* sd, unsigned int store_id, int account_id, const char* store_name, int nameid, unsigned short amount, unsigned int price, const int* card, unsigned char refine_level, const struct item_option *option);
};
#ifdef HERCULES_CORE
diff --git a/src/map/skill.c b/src/map/skill.c
index 8410a77d0..a259829ef 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -44,6 +44,7 @@
#include "map/path.h"
#include "map/pc.h"
#include "map/pet.h"
+#include "map/refine.h"
#include "map/script.h"
#include "map/status.h"
#include "map/unit.h"
@@ -2892,14 +2893,16 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li
}
#endif /* MAGIC_REFLECTION_TYPE */
}
- if(sc && sc->data[SC_MAGICROD] && src == dsrc) {
- int sp = skill->get_sp(skill_id,skill_lv);
+ if (sc && sc->data[SC_MAGICROD] && src == dsrc) {
+ int sp = skill->get_sp(skill_id, skill_lv);
dmg.damage = dmg.damage2 = 0;
dmg.dmg_lv = ATK_MISS; //This will prevent skill additional effect from taking effect. [Skotlex]
sp = sp * sc->data[SC_MAGICROD]->val2 / 100;
- if(skill_id == WZ_WATERBALL && skill_lv > 1)
- sp = sp/((skill_lv|1)*(skill_lv|1)); //Estimate SP cost of a single water-ball
+ if (skill_id == WZ_WATERBALL && skill_lv > 1)
+ sp = sp / ((skill_lv | 1) * (skill_lv | 1)); //Estimate SP cost of a single water-ball
status->heal(bl, 0, sp, STATUS_HEAL_SHOWEFFECT);
+ if (battle->bc->magicrod_type == 1)
+ clif->skill_nodamage(bl, bl, SA_MAGICROD, sc->data[SC_MAGICROD]->val1, 1); // Animation used here in eAthena [Wolfie]
}
}
@@ -4153,10 +4156,9 @@ static int skill_reveal_trap(struct block_list *bl, va_list ap)
Assert_ret(bl->type == BL_SKILL);
su = BL_UCAST(BL_SKILL, bl);
- if (su->alive && su->group && skill->get_inf2(su->group->skill_id)&INF2_TRAP) { //Reveal trap.
- //Change look is not good enough, the client ignores it as an actual trap still. [Skotlex]
- //clif->changetraplook(bl, su->group->unit_id);
- clif->getareachar_skillunit(&su->bl,su,AREA);
+ if (su->alive && su->group && skill->get_inf2(su->group->skill_id) & INF2_HIDDEN_TRAP) { //Reveal trap.
+ su->visible = true;
+ clif->skillunit_update(bl);
return 1;
}
return 0;
@@ -7881,8 +7883,9 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list *
}
break;
case SA_MAGICROD:
- clif->skill_nodamage(src,src,SA_MAGICROD,skill_lv,1);
- sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
+ if (battle->bc->magicrod_type == 0)
+ clif->skill_nodamage(src, src, SA_MAGICROD, skill_lv, 1); // Animation used here in official [Wolfie]
+ sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
break;
case SA_AUTOSPELL:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -11041,9 +11044,10 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill
map->foreachinarea(status->change_timer_sub,
src->m, x-r, y-r, x+r,y+r,BL_CHAR,
src,NULL,SC_SIGHT,tick);
- if(battle_config.traps_setting&1)
- map->foreachinarea(skill_reveal_trap,
- src->m, x-r, y-r, x+r, y+r, BL_SKILL);
+ if (battle_config.trap_visibility != 0) {
+ map->foreachinarea(skill_reveal_trap,
+ src->m, x - r, y - r, x + r, y + r, BL_SKILL);
+ }
break;
case SR_RIDEINLIGHTNING:
@@ -12760,6 +12764,13 @@ static int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *b
ts->tick += sg->interval*(map->count_oncell(bl->m,bl->x,bl->y,BL_CHAR,0)-1);
}
+ if (sg->skill_id == HT_ANKLESNARE
+ || (battle_config.trap_trigger == 1 && skill->get_inf2(sg->skill_id) & INF2_HIDDEN_TRAP)
+ ) {
+ src->visible = true;
+ clif->skillunit_update(&src->bl);
+ }
+
switch (sg->unit_id) {
case UNT_FIREWALL:
case UNT_KAEN: {
@@ -12912,10 +12923,11 @@ static int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *b
clif->fixpos(bl);
}
sg->val2 = bl->id;
- } else
+ } else {
sec = 3000; //Couldn't trap it?
+ }
+
if( sg->unit_id == UNT_ANKLESNARE ) {
- clif->skillunit_update(&src->bl);
/**
* If you're snared from a trap that was invisible this makes the trap be
* visible again -- being you stepped on it (w/o this the trap remains invisible and you go "WTF WHY I CANT MOVE")
@@ -14490,8 +14502,8 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
**/
case AB_ANCILLA:
{
- int count = 0, i;
- for( i = 0; i < MAX_INVENTORY; i ++ )
+ int count = 0;
+ for (int i = 0; i < sd->status.inventorySize; i ++)
if (sd->status.inventory[i].nameid == ITEMID_ANSILA)
count += sd->status.inventory[i].amount;
if( count >= 3 ) {
@@ -16109,7 +16121,7 @@ static void skill_repairweapon(struct map_session_data *sd, int idx)
if (idx == 0xFFFF || idx == -1) // No item selected ('Cancel' clicked)
return;
- if( idx < 0 || idx >= MAX_INVENTORY )
+ if (idx < 0 || idx >= sd->status.inventorySize)
return; //Invalid index??
item = &target_sd->status.inventory[idx];
@@ -16157,7 +16169,7 @@ static void skill_identify(struct map_session_data *sd, int idx)
nullpo_retv(sd);
sd->state.workinprogress = 0;
- if(idx >= 0 && idx < MAX_INVENTORY) {
+ if (idx >= 0 && idx < sd->status.inventorySize) {
if(sd->status.inventory[idx].nameid > 0 && sd->status.inventory[idx].identify == 0 ){
flag=0;
sd->status.inventory[idx].identify=1;
@@ -16173,7 +16185,7 @@ static void skill_weaponrefine(struct map_session_data *sd, int idx)
{
nullpo_retv(sd);
- if (idx >= 0 && idx < MAX_INVENTORY) {
+ if (idx >= 0 && idx < sd->status.inventorySize) {
struct item *item;
struct item_data *ditem = sd->inventory_data[idx];
item = &sd->status.inventory[idx];
@@ -16201,7 +16213,7 @@ static void skill_weaponrefine(struct map_session_data *sd, int idx)
return;
}
- per = status->get_refine_chance(ditem->wlv, (int)item->refine, REFINE_CHANCE_TYPE_NORMAL) * 10;
+ per = refine->get_refine_chance(ditem->wlv, (int)item->refine, REFINE_CHANCE_TYPE_NORMAL) * 10;
// Aegis leaked formula. [malufett]
if (sd->status.class == JOB_MECHANIC_T)
@@ -17072,6 +17084,14 @@ static struct skill_unit *skill_initunit(struct skill_unit_group *group, int idx
su->val1=val1;
su->val2 = val2;
su->prev = 0;
+ su->visible = true;
+
+ if (skill->get_inf2(group->skill_id) & INF2_HIDDEN_TRAP
+ && ((battle_config.trap_visibility == 1 && map_flag_vs(group->map)) // invisible in PvP/GvG
+ || battle_config.trap_visibility == 2 // always invisible
+ )) {
+ su->visible = false;
+ }
idb_put(skill->unit_db, su->bl.id, su);
map->addiddb(&su->bl);
@@ -17992,8 +18012,8 @@ static int skill_can_produce_mix(struct map_session_data *sd, int nameid, int tr
if (pc->search_inventory(sd,id) == INDEX_NOT_FOUND)
return 0;
} else {
- int x, y;
- for(y=0,x=0;y<MAX_INVENTORY;y++)
+ int x = 0;
+ for (int y = 0; y < sd->status.inventorySize; y++)
if( sd->status.inventory[y].nameid == id )
x+=sd->status.inventory[y].amount;
if(x<qty*skill->dbs->produce_db[i].mat_amount[j])
@@ -18064,7 +18084,7 @@ static int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int n
else temp_qty = 1;
if (data->stack.inventory) {
- for( i = 0; i < MAX_INVENTORY; i++ ) {
+ for (i = 0; i < sd->status.inventorySize; i++ ) {
if( sd->status.inventory[i].nameid == nameid ) {
if( sd->status.inventory[i].amount >= data->stack.amount ) {
#if PACKETVER >= 20090729
@@ -18872,7 +18892,7 @@ static int skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv,
del_amount -= (del_amount % 10);
add_amount = (skill_lv == 1) ? del_amount * (5 + rnd()%5) : del_amount / 10 ;
- if (idx < 0 || idx >= MAX_INVENTORY
+ if (idx < 0 || idx >= sd->status.inventorySize
|| (nameid = sd->status.inventory[idx].nameid) <= 0
|| del_amount < 0 || del_amount > sd->status.inventory[idx].amount) {
clif->skill_fail(sd, SO_EL_ANALYSIS, USESKILL_FAIL_LEVEL, 0, 0);
@@ -18943,7 +18963,7 @@ static int skill_changematerial(struct map_session_data *sd, const struct itemli
for (k = 0; k < VECTOR_LENGTH(*item_list); k++) {
const struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, k);
int idx = entry->id;
- Assert_ret(idx >= 0 && idx < MAX_INVENTORY);
+ Assert_ret(idx >= 0 && idx < sd->status.inventorySize);
amount = entry->amount;
nameid = sd->status.inventory[idx].nameid;
if (nameid > 0 && sd->status.inventory[idx].identify == 0) {
@@ -20237,6 +20257,12 @@ static void skill_validate_skillinfo(struct config_setting_t *conf, struct s_ski
} else {
sk->inf2 &= ~INF2_ALLOW_REPRODUCE;
}
+ } else if (strcmpi(type, "HiddenTrap") == 0) {
+ if (on) {
+ sk->inf2 |= INF2_HIDDEN_TRAP;
+ } else {
+ sk->inf2 &= ~INF2_HIDDEN_TRAP;
+ }
} else if (strcmpi(type, "None") != 0) {
skilldb_invalid_error(type, config_setting_name(t), sk->nameid);
}
diff --git a/src/map/skill.h b/src/map/skill.h
index 0ace19927..5da37d129 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -124,6 +124,7 @@ enum e_skill_inf2 {
INF2_FREE_CAST_REDUCED = 0x10000,
INF2_SHOW_SKILL_SCALE = 0x20000,
INF2_ALLOW_REPRODUCE = 0x40000,
+ INF2_HIDDEN_TRAP = 0x80000, // Traps that are hidden (based on trap_visiblity battle conf)
};
@@ -1806,6 +1807,7 @@ struct skill_unit {
int limit;
int val1,val2;
+ bool visible;
short alive,range;
int prev;
};
diff --git a/src/map/status.c b/src/map/status.c
index 75744c59b..63e71c9dc 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -38,6 +38,7 @@
#include "map/path.h"
#include "map/pc.h"
#include "map/pet.h"
+#include "map/refine.h"
#include "map/script.h"
#include "map/skill.h"
#include "map/skill.h"
@@ -2446,7 +2447,7 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o
sd->regen.sregen = &sd->sregen;
sd->regen.ssregen = &sd->ssregen;
sd->weight=0;
- for(i=0;i<MAX_INVENTORY;i++){
+ for (i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid==0 || sd->inventory_data[i] == NULL)
continue;
sd->weight += sd->inventory_data[i]->weight*sd->status.inventory[i].amount;
@@ -2577,18 +2578,18 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o
r = 0;
if (r)
- wa->atk2 = status->dbs->refine_info[wlv].bonus[r-1] / 100;
+ wa->atk2 = refine->get_bonus(wlv, r) / 100;
#ifdef RENEWAL
wa->matk += sd->inventory_data[index]->matk;
wa->wlv = wlv;
if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus
- wa->matk += status->dbs->refine_info[wlv].bonus[r-1] / 100;
+ wa->matk += refine->get_bonus(wlv, r) / 100;
#endif
//Overrefined bonus.
if (r)
- wd->overrefine = status->dbs->refine_info[wlv].randombonus_max[r-1] / 100;
+ wd->overrefine = refine->get_randombonus_max(wlv, r) / 100;
wa->range += sd->inventory_data[index]->range;
if(sd->inventory_data[index]->script) {
@@ -2623,7 +2624,7 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o
r = 0;
if (r)
- refinedef += status->dbs->refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
+ refinedef += refine->get_bonus(REFINE_TYPE_ARMOR, r);
if(sd->inventory_data[index]->script) {
if( i == EQI_HAND_L ) //Shield
@@ -3853,7 +3854,7 @@ static void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag
temp = bst->batk - status->base_atk(bl,bst);
if (temp) {
temp += st->batk;
- st->batk = cap_value(temp, 0, USHRT_MAX);
+ st->batk = cap_value(temp, battle_config.batk_min, battle_config.batk_max);
}
st->batk = status->calc_batk(bl, sc, st->batk, true);
}
@@ -4448,7 +4449,7 @@ static int status_base_amotion_pc(struct map_session_data *sd, struct status_dat
return amotion;
}
-static unsigned short status_base_atk(const struct block_list *bl, const struct status_data *st)
+static int status_base_atk(const struct block_list *bl, const struct status_data *st)
{
int flag = 0, str, dex, dstr;
@@ -4505,42 +4506,50 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct
if (bl->type == BL_PC)
str += dex / 5 + st->luk / 5;
#endif // RENEWAL
- return cap_value(str, 0, USHRT_MAX);
+ return cap_value(str, battle_config.batk_min, battle_config.batk_max);
}
-static unsigned short status_base_matk_min(const struct status_data *st)
+static int status_base_matk_min(const struct status_data *st)
{
nullpo_ret(st);
#ifdef RENEWAL
Assert_ret(0);
return 0;
#else // not RENEWAL
- return st->int_ + (st->int_ / 7) * (st->int_ / 7);
+ int matk = st->int_ + (st->int_ / 7) * (st->int_ / 7);
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
#endif // RENEWAL
}
-static unsigned short status_base_matk_max(const struct status_data *st)
+static int status_base_matk_max(const struct status_data *st)
{
nullpo_ret(st);
- return st->int_ + (st->int_ / 5)*(st->int_ / 5);
+ int matk = st->int_ + (st->int_ / 5) * (st->int_ / 5);
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
}
-static unsigned short status_base_matk(struct block_list *bl, const struct status_data *st, int level)
+static int status_base_matk(struct block_list *bl, const struct status_data *st, int level)
{
#ifdef RENEWAL
nullpo_ret(bl);
nullpo_ret(st);
- switch ( bl->type ) {
+ int matk = 0;
+ switch (bl->type) {
case BL_MOB:
- return st->int_ + level;
+ matk = st->int_ + level;
+ break;
case BL_HOM:
- return status_get_homint(st, BL_UCCAST(BL_HOM, bl)) + level;
+ matk = status_get_homint(st, BL_UCCAST(BL_HOM, bl)) + level;
+ break;
case BL_MER:
- return st->int_ + st->int_ / 5 * st->int_ / 5;
+ matk = st->int_ + st->int_ / 5 * st->int_ / 5;
+ break;
case BL_PC:
default: // temporary until all are formulated
- return st->int_ + (st->int_ / 2) + (st->dex / 5) + (st->luk / 3) + (level / 4);
+ matk = st->int_ + (st->int_ / 2) + (st->dex / 5) + (st->luk / 3) + (level / 4);
+ break;
}
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
#else
Assert_ret(0);
return 0;
@@ -4597,7 +4606,7 @@ static void status_calc_misc(struct block_list *bl, struct status_data *st, int
if ( st->batk ) {
int temp = st->batk + status->base_atk(bl, st);
- st->batk = cap_value(temp, 0, USHRT_MAX);
+ st->batk = cap_value(temp, battle_config.batk_min, battle_config.batk_max);
} else
st->batk = status->base_atk(bl, st);
if ( st->cri ) {
@@ -4994,17 +5003,17 @@ static unsigned short status_calc_luk(struct block_list *bl, struct status_chang
return (unsigned short)cap_value(luk, 0, USHRT_MAX);
}
-static unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable)
+static int status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable)
{
nullpo_ret(bl);
if(!sc || !sc->count)
- return cap_value(batk,0,USHRT_MAX);
+ return cap_value(batk, battle_config.batk_min, battle_config.batk_max);
if( !viewable ){
/* some statuses that are hidden in the status window */
if(sc->data[SC_PLUSATTACKPOWER])
batk += sc->data[SC_PLUSATTACKPOWER]->val1;
- return (unsigned short)cap_value(batk,0,USHRT_MAX);
+ return cap_value(batk, battle_config.batk_min, battle_config.batk_max);
}
#ifndef RENEWAL
if(sc->data[SC_PLUSATTACKPOWER])
@@ -5087,14 +5096,14 @@ static unsigned short status_calc_batk(struct block_list *bl, struct status_chan
if (sc->data[SC_SHRIMP])
batk += batk * sc->data[SC_SHRIMP]->val2 / 100;
- return (unsigned short)cap_value(batk,0,USHRT_MAX);
+ return cap_value(batk, battle_config.batk_min, battle_config.batk_max);
}
-static unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable)
+static int status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable)
{
nullpo_ret(bl);
if(!sc || !sc->count)
- return cap_value(watk,0,USHRT_MAX);
+ return cap_value(watk, battle_config.watk_min, battle_config.watk_max);
if( !viewable ){
/* some statuses that are hidden in the status window */
@@ -5102,7 +5111,7 @@ static unsigned short status_calc_watk(struct block_list *bl, struct status_chan
watk -= sc->data[SC_WATER_BARRIER]->val3;
if(sc->data[SC_GENTLETOUCH_CHANGE] && sc->data[SC_GENTLETOUCH_CHANGE]->val2)
watk += sc->data[SC_GENTLETOUCH_CHANGE]->val2;
- return (unsigned short)cap_value(watk,0,USHRT_MAX);
+ return cap_value(watk, battle_config.watk_min, battle_config.watk_max);
}
#ifndef RENEWAL
if(sc->data[SC_IMPOSITIO])
@@ -5180,14 +5189,14 @@ static unsigned short status_calc_watk(struct block_list *bl, struct status_chan
if (sc->data[SC_CATNIPPOWDER])
watk -= watk * sc->data[SC_CATNIPPOWDER]->val2 / 100;
- return (unsigned short)cap_value(watk,0,USHRT_MAX);
+ return cap_value(watk, battle_config.watk_min, battle_config.watk_max);
}
-static unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk)
+static int status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk)
{
#ifdef RENEWAL
if (!sc || !sc->count)
- return cap_value(matk,0,USHRT_MAX);
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
if (sc->data[SC_PLUSMAGICPOWER])
matk += sc->data[SC_PLUSMAGICPOWER]->val1;
if (sc->data[SC_MATKFOOD])
@@ -5208,22 +5217,22 @@ static unsigned short status_calc_ematk(struct block_list *bl, struct status_cha
matk += 25 * sc->data[SC_IZAYOI]->val1;
if (sc->data[SC_SHRIMP])
matk += matk * sc->data[SC_SHRIMP]->val2 / 100;
- return (unsigned short)cap_value(matk,0,USHRT_MAX);
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
#else
return 0;
#endif
}
-static unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable)
+static int status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable)
{
if (!sc || !sc->count)
- return cap_value(matk,0,USHRT_MAX);
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
if (!viewable) {
/* some statuses that are hidden in the status window */
if (sc->data[SC_MINDBREAKER])
matk += matk * sc->data[SC_MINDBREAKER]->val2 / 100;
- return (unsigned short)cap_value(matk, 0, USHRT_MAX);
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
}
#ifndef RENEWAL
@@ -5281,17 +5290,17 @@ static unsigned short status_calc_matk(struct block_list *bl, struct status_chan
if (sc->data[SC_MAGIC_CANDY])
matk += sc->data[SC_MAGIC_CANDY]->val1;
- return (unsigned short)cap_value(matk, 0, USHRT_MAX);
+ return cap_value(matk, battle_config.matk_min, battle_config.matk_max);
}
-static signed short status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable)
+static int status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable)
{
if (!sc || !sc->count)
- return cap_value(critical, 10, SHRT_MAX);
+ return cap_value(critical, battle_config.critical_min, battle_config.critical_max);
if (!viewable) {
/* some statuses that are hidden in the status window */
- return (short)cap_value(critical, 10, SHRT_MAX);
+ return cap_value(critical, battle_config.critical_min, battle_config.critical_max);
}
if (sc->data[SC_CRITICALPERCENT])
@@ -5322,20 +5331,20 @@ static signed short status_calc_critical(struct block_list *bl, struct status_ch
if (sc->data[SC_BUCHEDENOEL])
critical += sc->data[SC_BUCHEDENOEL]->val4 * 10;
- return (short)cap_value(critical, 10, SHRT_MAX);
+ return cap_value(critical, battle_config.critical_min, battle_config.critical_max);
}
-static signed short status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable)
+static int status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable)
{
if (!sc || !sc->count)
- return cap_value(hit, 1, SHRT_MAX);
+ return cap_value(hit, battle_config.hit_min, battle_config.hit_max);
if (!viewable) {
/* some statuses that are hidden in the status window */
if (sc->data[SC_MTF_ASPD])
hit += sc->data[SC_MTF_ASPD]->val2;
- return (short)cap_value(hit, 1, SHRT_MAX);
+ return cap_value(hit, battle_config.hit_min, battle_config.hit_max);
}
if (sc->data[SC_INCHIT])
@@ -5377,26 +5386,26 @@ static signed short status_calc_hit(struct block_list *bl, struct status_change
if (sc->data[SC_BUCHEDENOEL])
hit += sc->data[SC_BUCHEDENOEL]->val3;
- return (short)cap_value(hit, 1, SHRT_MAX);
+ return cap_value(hit, battle_config.hit_min, battle_config.hit_max);
}
-static signed short status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable)
+static int status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable)
{
nullpo_retr(1, bl);
if (bl->type == BL_PC) {
if (map_flag_gvg2(bl->m))
flee -= flee * battle_config.gvg_flee_penalty / 100;
- else if( map->list[bl->m].flag.battleground )
+ else if (map->list[bl->m].flag.battleground)
flee -= flee * battle_config.bg_flee_penalty / 100;
}
if (!sc || !sc->count)
- return cap_value(flee, 1, SHRT_MAX);
+ return cap_value(flee, battle_config.flee_min, battle_config.flee_max);
if (!viewable) {
/* some statuses that are hidden in the status window */
- return (short)cap_value(flee, 1, SHRT_MAX);
+ return cap_value(flee, battle_config.flee_min, battle_config.flee_max);
}
if (sc->data[SC_INCFLEE])
@@ -5474,17 +5483,17 @@ static signed short status_calc_flee(struct block_list *bl, struct status_change
if (sc->data[SC_MYSTICPOWDER])
flee += sc->data[SC_MYSTICPOWDER]->val2;
- return (short)cap_value(flee, 1, SHRT_MAX);
+ return cap_value(flee, battle_config.flee_min, battle_config.flee_max);
}
-static signed short status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable)
+static int status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable)
{
if(!sc || !sc->count)
- return cap_value(flee2,10,SHRT_MAX);
+ return cap_value(flee2, battle_config.flee2_min, battle_config.flee2_max);
if( !viewable ){
/* some statuses that are hidden in the status window */
- return (short)cap_value(flee2,10,SHRT_MAX);
+ return cap_value(flee2, battle_config.flee2_min, battle_config.flee2_max);
}
if(sc->data[SC_PLUSAVOIDVALUE])
@@ -5496,7 +5505,7 @@ static signed short status_calc_flee2(struct block_list *bl, struct status_chang
if (sc->data[SC_FREYJASCROLL])
flee2 += sc->data[SC_FREYJASCROLL]->val2;
- return (short)cap_value(flee2,10,SHRT_MAX);
+ return cap_value(flee2, battle_config.flee2_min, battle_config.flee2_max);
}
static defType status_calc_def(struct block_list *bl, struct status_change *sc, int def, bool viewable)
@@ -7426,6 +7435,9 @@ static int status_get_sc_def(struct block_list *src, struct block_list *bl, enum
case SC_NETHERWORLD:
tick = max(tick, 4000);
break;
+ case SC_SIREN:
+ tick = max(tick, 10000); // Minimum duration 10s
+ break;
default:
//Skills need to trigger even if the duration is reduced below 1ms
tick = max(tick, 1);
@@ -8471,12 +8483,12 @@ static int status_change_start(struct block_list *src, struct block_list *bl, en
val3 = 0;
val4 = 0;
max_stat = (status->get_lv(bl)-10<50)?status->get_lv(bl)-10:50;
- stat = max(0, max_stat - status2->str ); val3 |= cap_value(stat,0,0xFF)<<16;
- stat = max(0, max_stat - status2->agi ); val3 |= cap_value(stat,0,0xFF)<<8;
- stat = max(0, max_stat - status2->vit ); val3 |= cap_value(stat,0,0xFF);
- stat = max(0, max_stat - status2->int_); val4 |= cap_value(stat,0,0xFF)<<16;
- stat = max(0, max_stat - status2->dex ); val4 |= cap_value(stat,0,0xFF)<<8;
- stat = max(0, max_stat - status2->luk ); val4 |= cap_value(stat,0,0xFF);
+ stat = max(0, max_stat - (int)status2->str ); val3 |= cap_value(stat,0,0xFF)<<16;
+ stat = max(0, max_stat - (int)status2->agi ); val3 |= cap_value(stat,0,0xFF)<<8;
+ stat = max(0, max_stat - (int)status2->vit ); val3 |= cap_value(stat,0,0xFF);
+ stat = max(0, max_stat - (int)status2->int_); val4 |= cap_value(stat,0,0xFF)<<16;
+ stat = max(0, max_stat - (int)status2->dex ); val4 |= cap_value(stat,0,0xFF)<<8;
+ stat = max(0, max_stat - (int)status2->luk ); val4 |= cap_value(stat,0,0xFF);
}
break;
case SC_SWORDREJECT:
@@ -12505,10 +12517,10 @@ static int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk,
if ( bl->type == BL_PC && !(flag & 2) ) {
const struct map_session_data *sd = BL_UCCAST(BL_PC, bl);
- short index = sd->equip_index[EQI_HAND_R], refine;
+ short index = sd->equip_index[EQI_HAND_R], refine_level;
if ( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON
- && (refine = sd->status.inventory[index].refine) < 16 && refine ) {
- int r = status->dbs->refine_info[watk->wlv].randombonus_max[refine + (4 - watk->wlv)] / 100;
+ && (refine_level = sd->status.inventory[index].refine) < 16 && refine_level) {
+ int r = refine->get_randombonus_max(watk->wlv, refine_level + (4 - watk->wlv) + 1) / 100;
if ( r )
max += (rnd() % 100) % r + 1;
}
@@ -12620,10 +12632,10 @@ static void status_get_matk_sub(struct block_list *bl, int flag, unsigned short
#ifdef RENEWAL
if ( sd && !(flag & 2) ) {
- short index = sd->equip_index[EQI_HAND_R], refine;
+ short index = sd->equip_index[EQI_HAND_R], refine_level;
if ( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON
- && (refine = sd->status.inventory[index].refine) < 16 && refine ) {
- int r = status->dbs->refine_info[sd->inventory_data[index]->wlv].randombonus_max[refine + (4 - sd->inventory_data[index]->wlv)] / 100;
+ && (refine_level = sd->status.inventory[index].refine) < 16 && refine_level) {
+ int r = refine->get_randombonus_max(sd->inventory_data[index]->wlv, refine_level + (4 - sd->inventory_data[index]->wlv) + 1) / 100;
if ( r )
*matk_max += (rnd() % 100) % r + 1;
}
@@ -13073,25 +13085,6 @@ static int status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data)
return 0;
}
-/**
- * Get the chance to upgrade a piece of equipment.
- * @param wlv The weapon type of the item to refine (see see enum refine_type)
- * @param refine The target refine level
- * @return The chance to refine the item, in percent (0~100)
- */
-static int status_get_refine_chance(enum refine_type wlv, int refine, enum refine_chance_type type)
-{
- Assert_ret((int)wlv >= REFINE_TYPE_ARMOR && wlv < REFINE_TYPE_MAX);
-
- if (refine < 0 || refine >= MAX_REFINE)
- return 0;
-
- if (type >= REFINE_CHANCE_TYPE_MAX)
- return 0;
-
- return status->dbs->refine_info[wlv].chance[type][refine];
-}
-
static int status_get_sc_type(sc_type type)
{
@@ -13402,171 +13395,6 @@ static bool status_readdb_sizefix(char *fields[], int columns, int current)
return true;
}
-/**
- * Processes a refine_db.conf entry.
- *
- * @param r Libconfig setting entry. It is expected to be valid and it
- * won't be freed (it is care of the caller to do so if
- * necessary)
- * @param n Ordinal number of the entry, to be displayed in case of
- * validation errors.
- * @param source Source of the entry (file name), to be displayed in case of
- * validation errors.
- * @return # of the validated entry, or 0 in case of failure.
- */
-static int status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source)
-{
- struct config_setting_t *rate = NULL;
- int type = REFINE_TYPE_ARMOR, bonus_per_level = 0, rnd_bonus_v = 0, rnd_bonus_lv = 0;
- char lv[4];
- nullpo_ret(r);
- nullpo_ret(name);
- nullpo_ret(source);
-
- if (strncmp(name, "Armors", 6) == 0) {
- type = REFINE_TYPE_ARMOR;
- } else if (strncmp(name, "WeaponLevel", 11) != 0 || !strspn(&name[strlen(name)-1], "0123456789") || (type = atoi(strncpy(lv, name+11, 2))) == REFINE_TYPE_ARMOR) {
- ShowError("status_readdb_refine_libconfig_sub: Invalid key name for entry '%s' in \"%s\", skipping.\n", name, source);
- return 0;
- }
- if (type < REFINE_TYPE_ARMOR || type >= REFINE_TYPE_MAX) {
- ShowError("status_readdb_refine_libconfig_sub: Out of range level for entry '%s' in \"%s\", skipping.\n", name, source);
- return 0;
- }
- if (!libconfig->setting_lookup_int(r, "StatsPerLevel", &bonus_per_level)) {
- ShowWarning("status_readdb_refine_libconfig_sub: Missing StatsPerLevel for entry '%s' in \"%s\", skipping.\n", name, source);
- return 0;
- }
- if (!libconfig->setting_lookup_int(r, "RandomBonusStartLevel", &rnd_bonus_lv)) {
- ShowWarning("status_readdb_refine_libconfig_sub: Missing RandomBonusStartLevel for entry '%s' in \"%s\", skipping.\n", name, source);
- return 0;
- }
- if (!libconfig->setting_lookup_int(r, "RandomBonusValue", &rnd_bonus_v)) {
- ShowWarning("status_readdb_refine_libconfig_sub: Missing RandomBonusValue for entry '%s' in \"%s\", skipping.\n", name, source);
- return 0;
- }
-
- if ((rate=libconfig->setting_get_member(r, "Rates")) != NULL && config_setting_is_group(rate)) {
- struct config_setting_t *t = NULL;
- bool duplicate[MAX_REFINE];
- int bonus[MAX_REFINE], rnd_bonus[MAX_REFINE];
- int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE];
- int i, j;
-
- memset(&duplicate, 0, sizeof(duplicate));
- memset(&bonus, 0, sizeof(bonus));
- memset(&rnd_bonus, 0, sizeof(rnd_bonus));
-
- for (i = 0; i < REFINE_CHANCE_TYPE_MAX; i++)
- for (j = 0; j < MAX_REFINE; j++)
- chance[i][j] = 100; // default value for all rates.
-
- i = 0;
- j = 0;
- while ((t = libconfig->setting_get_elem(rate,i++)) != NULL && config_setting_is_group(t)) {
- int level = 0, i32;
- char *rlvl = config_setting_name(t);
- memset(&lv, 0, sizeof(lv));
-
- if (!strspn(&rlvl[strlen(rlvl) - 1], "0123456789") || (level = atoi(strncpy(lv, rlvl + 2, 3))) <= 0) {
- ShowError("status_readdb_refine_libconfig_sub: Invalid refine level format '%s' for entry %s in \"%s\"... skipping.\n", rlvl, name, source);
- continue;
- }
-
- if (level <= 0 || level > MAX_REFINE) {
- ShowError("status_readdb_refine_libconfig_sub: Out of range refine level '%s' for entry %s in \"%s\"... skipping.\n", rlvl, name, source);
- continue;
- }
-
- level--;
-
- if (duplicate[level]) {
- ShowWarning("status_readdb_refine_libconfig_sub: duplicate rate '%s' for entry %s in \"%s\", overwriting previous entry...\n", rlvl, name, source);
- } else {
- duplicate[level] = true;
- }
-
- if (libconfig->setting_lookup_int(t, "NormalChance", &i32) != 0)
- chance[REFINE_CHANCE_TYPE_NORMAL][level] = i32;
- else
- chance[REFINE_CHANCE_TYPE_NORMAL][level] = 100;
-
- if (libconfig->setting_lookup_int(t, "EnrichedChance", &i32) != 0)
- chance[REFINE_CHANCE_TYPE_ENRICHED][level] = i32;
- else
- chance[REFINE_CHANCE_TYPE_ENRICHED][level] = level > 10 ? 0 : 100; // enriched ores up to +10 only.
-
- if (libconfig->setting_lookup_int(t, "EventNormalChance", &i32) != 0)
- chance[REFINE_CHANCE_TYPE_E_NORMAL][level] = i32;
- else
- chance[REFINE_CHANCE_TYPE_E_NORMAL][level] = 100;
-
- if (libconfig->setting_lookup_int(t, "EventEnrichedChance", &i32) != 0)
- chance[REFINE_CHANCE_TYPE_E_ENRICHED][level] = i32;
- else
- chance[REFINE_CHANCE_TYPE_E_ENRICHED][level] = level > 10 ? 0 : 100; // enriched ores up to +10 only.
-
- if (libconfig->setting_lookup_int(t, "Bonus", &i32) != 0)
- bonus[level] += i32;
-
- if (level >= rnd_bonus_lv - 1)
- rnd_bonus[level] = rnd_bonus_v * (level - rnd_bonus_lv + 2);
- }
- for (i = 0; i < MAX_REFINE; i++) {
- status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_NORMAL][i] = chance[REFINE_CHANCE_TYPE_NORMAL][i];
- status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_E_NORMAL][i] = chance[REFINE_CHANCE_TYPE_E_NORMAL][i];
- status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_ENRICHED][i] = chance[REFINE_CHANCE_TYPE_ENRICHED][i];
- status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_E_ENRICHED][i] = chance[REFINE_CHANCE_TYPE_E_ENRICHED][i];
- status->dbs->refine_info[type].randombonus_max[i] = rnd_bonus[i];
- bonus[i] += bonus_per_level + (i > 0 ? bonus[i - 1] : 0);
- status->dbs->refine_info[type].bonus[i] = bonus[i];
- }
- } else {
- ShowWarning("status_readdb_refine_libconfig_sub: Missing refine rates for entry '%s' in \"%s\", skipping.\n", name, source);
- return 0;
- }
-
- return type + 1;
-}
-
-/**
- * Reads from a libconfig-formatted refine_db.conf file.
- *
- * @param *filename File name, relative to the database path.
- * @return The number of found entries.
- */
-static int status_readdb_refine_libconfig(const char *filename)
-{
- bool duplicate[REFINE_TYPE_MAX];
- struct config_t refine_db_conf;
- struct config_setting_t *r;
- char filepath[256];
- int i = 0, count = 0;
-
- safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename);
- if (!libconfig->load_file(&refine_db_conf, filepath))
- return 0;
-
- memset(&duplicate,0,sizeof(duplicate));
-
- while((r = libconfig->setting_get_elem(refine_db_conf.root,i++))) {
- char *name = config_setting_name(r);
- int type = status->readdb_refine_libconfig_sub(r, name, filename);
- if (type != 0) {
- if (duplicate[type-1]) {
- ShowWarning("status_readdb_refine_libconfig: duplicate entry for %s in \"%s\", overwriting previous entry...\n", name, filename);
- } else {
- duplicate[type-1] = true;
- }
- count++;
- }
- }
- libconfig->destroy(&refine_db_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
-
- return count;
-}
-
static bool status_readdb_scconfig(char *fields[], int columns, int current)
{
int val = 0;
@@ -13624,7 +13452,6 @@ static int status_readdb(void)
//
sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, status->readdb_job2);
sv->readdb(map->db_path, DBPATH"size_fix.txt", ',', MAX_SINGLE_WEAPON_TYPE, MAX_SINGLE_WEAPON_TYPE, ARRAYLENGTH(status->dbs->atkmods), status->readdb_sizefix);
- status->readdb_refine_libconfig(DBPATH"refine_db.conf");
sv->readdb(map->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, status->readdb_scconfig);
status->read_job_db();
@@ -13682,7 +13509,6 @@ void status_defaults(void)
status->natural_heal_prev_tick = 0;
status->natural_heal_diff_tick = 0;
/* funcs */
- status->get_refine_chance = status_get_refine_chance;
// for looking up associated data
status->skill2sc = status_skill2sc;
status->sc2skill = status_sc2skill;
@@ -13816,8 +13642,6 @@ void status_defaults(void)
status->natural_heal_timer = status_natural_heal_timer;
status->readdb_job2 = status_readdb_job2;
status->readdb_sizefix = status_readdb_sizefix;
- status->readdb_refine_libconfig = status_readdb_refine_libconfig;
- status->readdb_refine_libconfig_sub = status_readdb_refine_libconfig_sub;
status->readdb_scconfig = status_readdb_scconfig;
status->read_job_db = status_read_job_db;
status->read_job_db_sub = status_read_job_db_sub;
diff --git a/src/map/status.h b/src/map/status.h
index 17af22703..853a7a1a6 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -49,27 +49,6 @@ struct pet_data;
)
/**
- * Max Refine available to your server
- * Changing this limit requires edits to refine_db.txt
- **/
-#ifdef RENEWAL
- #define MAX_REFINE 20
-#else
- #define MAX_REFINE 10
-#endif
-
-enum refine_type {
- REFINE_TYPE_ARMOR = 0,
- REFINE_TYPE_WEAPON1 = 1,
- REFINE_TYPE_WEAPON2 = 2,
- REFINE_TYPE_WEAPON3 = 3,
- REFINE_TYPE_WEAPON4 = 4,
-#ifndef REFINE_TYPE_MAX
- REFINE_TYPE_MAX = 5
-#endif
-};
-
-/**
* SC configuration type
* @see db/sc_config.txt for more information
**/
@@ -2066,29 +2045,28 @@ enum e_status_calc_opt {
//Required because players have two of these, one in status_data
//and another for their left hand weapon.
typedef struct weapon_atk {
- unsigned short atk, atk2;
+ unsigned int atk, atk2;
unsigned short range;
unsigned char ele;
#ifdef RENEWAL
- unsigned short matk;
+ unsigned int matk;
unsigned char wlv;
#endif
} weapon_atk;
//For holding basic status (which can be modified by status changes)
struct status_data {
- unsigned int
+ uint32
hp, sp, // see status_cpy before adding members before hp and sp
max_hp, max_sp;
- unsigned short
- str, agi, vit, int_, dex, luk,
+ uint16 str, agi, vit, int_, dex, luk;
+ uint32
batk,
matk_min, matk_max,
speed,
- amotion, adelay, dmotion;
- uint32 mode;
- short
- hit, flee, cri, flee2,
+ amotion, adelay, dmotion,
+ mode;
+ int32 hit, flee, cri, flee2,
def2, mdef2,
#ifdef RENEWAL_ASPD
aspd_rate2,
@@ -2249,21 +2227,6 @@ struct status_change {
#define status_calc_elemental(ed, opt) (status->calc_bl_(&(ed)->bl, SCB_ALL, (opt)))
#define status_calc_npc(nd, opt) (status->calc_bl_(&(nd)->bl, SCB_ALL, (opt)))
-enum refine_chance_type {
- REFINE_CHANCE_TYPE_NORMAL = 0, // Normal Chance
- REFINE_CHANCE_TYPE_ENRICHED = 1, // Enriched Ore Chance
- REFINE_CHANCE_TYPE_E_NORMAL = 2, // Event Normal Ore Chance
- REFINE_CHANCE_TYPE_E_ENRICHED = 3, // Event Enriched Ore Chance
- REFINE_CHANCE_TYPE_MAX
-};
-
-// bonus values and upgrade chances for refining equipment
-struct s_refine_info {
- int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE]; // success chance
- int bonus[MAX_REFINE]; // cumulative fixed bonus damage
- int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage
-};
-
struct s_status_dbs {
BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */
int max_weight_base[CLASS_COUNT];
@@ -2277,8 +2240,6 @@ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when sta
int RelevantBLTypes[SI_MAX]; // "icon" -> enum bl_type (for clif->status_change to identify for which bl types to send packets)
bool DisplayType[SC_MAX];
/* */
- struct s_refine_info refine_info[REFINE_TYPE_MAX];
- /* */
int atkmods[3][MAX_SINGLE_WEAPON_TYPE];//ATK weapon modification for size (size_fix.txt)
char job_bonus[CLASS_COUNT][MAX_LEVEL];
sc_conf_type sc_conf[SC_MAX];
@@ -2307,7 +2268,6 @@ struct status_interface {
int (*init) (bool minimal);
void (*final) (void);
/* funcs */
- int (*get_refine_chance) (enum refine_type wlv, int refine, enum refine_chance_type type);
// for looking up associated data
sc_type (*skill2sc) (int skill_id);
int (*sc2skill) (sc_type sc);
@@ -2379,8 +2339,8 @@ struct status_interface {
short (*calc_def2) (struct block_list *bl, struct status_change *sc, int def2, bool viewable);
defType (*calc_mdef) (struct block_list *bl, struct status_change *sc, int mdef, bool viewable);
short (*calc_mdef2) (struct block_list *bl, struct status_change *sc, int mdef2, bool viewable);
- unsigned short (*calc_batk)(struct block_list *bl, struct status_change *sc, int batk, bool viewable);
- unsigned short(*base_matk) (struct block_list *bl, const struct status_data *st, int level);
+ int (*calc_batk)(struct block_list *bl, struct status_change *sc, int batk, bool viewable);
+ int (*base_matk) (struct block_list *bl, const struct status_data *st, int level);
int (*get_weapon_atk) (struct block_list *src, struct weapon_atk *watk, int flag);
int (*get_total_mdef) (struct block_list *src);
int (*get_total_def) (struct block_list *src);
@@ -2391,7 +2351,7 @@ struct status_interface {
void (*initChangeTables) (void);
void (*initDummyData) (void);
int (*base_amotion_pc) (struct map_session_data *sd, struct status_data *st);
- unsigned short (*base_atk) (const struct block_list *bl, const struct status_data *st);
+ int (*base_atk) (const struct block_list *bl, const struct status_data *st);
unsigned int (*get_base_maxhp) (const struct map_session_data *sd, const struct status_data *st);
unsigned int (*get_base_maxsp) (const struct map_session_data *sd, const struct status_data *st);
unsigned int (*get_restart_hp) (const struct map_session_data *sd, const struct status_data *st);
@@ -2403,12 +2363,12 @@ struct status_interface {
unsigned short (*calc_int) (struct block_list *bl, struct status_change *sc, int int_);
unsigned short (*calc_dex) (struct block_list *bl, struct status_change *sc, int dex);
unsigned short (*calc_luk) (struct block_list *bl, struct status_change *sc, int luk);
- unsigned short (*calc_watk) (struct block_list *bl, struct status_change *sc, int watk, bool viewable);
- unsigned short (*calc_matk) (struct block_list *bl, struct status_change *sc, int matk, bool viewable);
- signed short (*calc_hit) (struct block_list *bl, struct status_change *sc, int hit, bool viewable);
- signed short (*calc_critical) (struct block_list *bl, struct status_change *sc, int critical, bool viewable);
- signed short (*calc_flee) (struct block_list *bl, struct status_change *sc, int flee, bool viewable);
- signed short (*calc_flee2) (struct block_list *bl, struct status_change *sc, int flee2, bool viewable);
+ int (*calc_watk) (struct block_list *bl, struct status_change *sc, int watk, bool viewable);
+ int (*calc_matk) (struct block_list *bl, struct status_change *sc, int matk, bool viewable);
+ signed int (*calc_hit) (struct block_list *bl, struct status_change *sc, int hit, bool viewable);
+ signed int (*calc_critical) (struct block_list *bl, struct status_change *sc, int critical, bool viewable);
+ signed int (*calc_flee) (struct block_list *bl, struct status_change *sc, int flee, bool viewable);
+ signed int (*calc_flee2) (struct block_list *bl, struct status_change *sc, int flee2, bool viewable);
unsigned short (*calc_speed) (struct block_list *bl, struct status_change *sc, int speed);
short (*calc_aspd_rate) (struct block_list *bl, struct status_change *sc, int aspd_rate);
unsigned short (*calc_dmotion) (struct block_list *bl, struct status_change *sc, int dmotion);
@@ -2419,7 +2379,7 @@ struct status_interface {
unsigned char (*calc_element) (struct block_list *bl, struct status_change *sc, int element);
unsigned char (*calc_element_lv) (struct block_list *bl, struct status_change *sc, int lv);
uint32 (*calc_mode) (const struct block_list *bl, const struct status_change *sc, uint32 mode);
- unsigned short (*calc_ematk) (struct block_list *bl, struct status_change *sc, int matk);
+ int (*calc_ematk) (struct block_list *bl, struct status_change *sc, int matk);
void (*calc_bl_main) (struct block_list *bl, int flag);
void (*display_add) (struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3);
void (*display_remove) (struct map_session_data *sd, enum sc_type type);
@@ -2427,15 +2387,13 @@ struct status_interface {
int (*natural_heal_timer) (int tid, int64 tick, int id, intptr_t data);
bool (*readdb_job2) (char *fields[], int columns, int current);
bool (*readdb_sizefix) (char *fields[], int columns, int current);
- int (*readdb_refine_libconfig) (const char *filename);
- int (*readdb_refine_libconfig_sub) (struct config_setting_t *r, const char *name, const char *source);
bool (*readdb_scconfig) (char *fields[], int columns, int current);
void (*read_job_db) (void);
void (*read_job_db_sub) (int idx, const char *name, struct config_setting_t *jdb);
void (*set_sc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag);
void (*copy) (struct status_data *a, const struct status_data *b);
- unsigned short (*base_matk_min) (const struct status_data *st);
- unsigned short (*base_matk_max) (const struct status_data *st);
+ int (*base_matk_min) (const struct status_data *st);
+ int (*base_matk_max) (const struct status_data *st);
};
#ifdef HERCULES_CORE
diff --git a/src/map/storage.c b/src/map/storage.c
index a6f0715e7..90b620f63 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -285,7 +285,7 @@ static int storage_add_from_inventory(struct map_session_data *sd, int index, in
if (sd->storage.aggregate > MAX_STORAGE)
return 0; // storage full
- if (index < 0 || index >= MAX_INVENTORY)
+ if (index < 0 || index >= sd->status.inventorySize)
return 0;
if (sd->status.inventory[index].nameid <= 0)
@@ -623,7 +623,7 @@ static int storage_guild_storageadd(struct map_session_data *sd, int index, int
if( !stor->storage_status || stor->storage_amount > MAX_GUILD_STORAGE )
return 0;
- if( index<0 || index>=MAX_INVENTORY )
+ if (index < 0 || index >= sd->status.inventorySize)
return 0;
if( sd->status.inventory[index].nameid <= 0 )
diff --git a/src/map/stylist.c b/src/map/stylist.c
new file mode 100644
index 000000000..7e7c13bf7
--- /dev/null
+++ b/src/map/stylist.c
@@ -0,0 +1,228 @@
+/**
+* This file is part of Hercules.
+* http://herc.ws - http://github.com/HerculesWS/Hercules
+*
+* Copyright (C) 2018-2019 Hercules Dev Team
+*
+* Hercules is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+#define HERCULES_CORE
+
+#include "map/stylist.h"
+
+#include "common/conf.h"
+#include "common/db.h"
+#include "common/memmgr.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+
+#include "map/clif.h"
+#include "map/intif.h"
+#include "map/itemdb.h"
+#include "map/pc.h"
+#include "map/script.h"
+
+static struct stylist_interface stylist_s;
+struct stylist_interface *stylist;
+
+static bool stylist_read_db_libconfig(void)
+{
+ struct config_t stylist_conf;
+ struct config_setting_t *stylist_db = NULL, *it = NULL;
+ const char *config_filename = "db/stylist_db.conf"; // FIXME hardcoded name
+ int i = 0;
+
+ if (!libconfig->load_file(&stylist_conf, config_filename))
+ return false;
+
+ if ((stylist_db = libconfig->setting_get_member(stylist_conf.root, "stylist_db")) == NULL) {
+ ShowError("can't read %s\n", config_filename);
+ return false;
+ }
+
+ stylist->vector_clear();
+
+ while ((it = libconfig->setting_get_elem(stylist_db, i++))) {
+ stylist->read_db_libconfig_sub(it, i - 1, config_filename);
+ }
+
+ libconfig->destroy(&stylist_conf);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, config_filename);
+ return true;
+}
+
+static bool stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source)
+{
+ struct stylist_data_entry entry = { 0 };
+ int i32 = 0, type = 0;
+ int64 i64 = 0;
+
+ nullpo_ret(it);
+ nullpo_ret(source);
+
+ if (!itemdb->lookup_const(it, "Type", &type) || type >= MAX_STYLIST_TYPE || type < 0) {
+ ShowWarning("stylist_read_db_libconfig_sub: Invalid or missing Type (%d) in \"%s\", entry #%d, skipping.\n", type, source, idx);
+ return false;
+ }
+ if (!itemdb->lookup_const(it, "Id", &i32) || i32 < 0) {
+ ShowWarning("stylist_read_db_libconfig_sub: Invalid or missing Id (%d) in \"%s\", entry #%d, skipping.\n", i32, source, idx);
+ return false;
+ }
+ entry.id = i32;
+
+ if (libconfig->setting_lookup_int64(it, "Zeny", &i64)) {
+ if (i64 > MAX_ZENY) {
+ ShowWarning("stylist_read_db_libconfig_sub: zeny is too big in \"%s\", entry #%d, capping to MAX_ZENY.\n", source, idx);
+ entry.zeny = MAX_ZENY;
+ } else {
+ entry.zeny = (int)i64;
+ }
+ }
+
+ if (itemdb->lookup_const(it, "ItemID", &i32))
+ entry.itemid = i32;
+
+ if (itemdb->lookup_const(it, "BoxItemID", &i32))
+ entry.boxid = i32;
+
+ if (libconfig->setting_lookup_bool(it, "AllowDoram", &i32))
+ entry.allow_doram = (i32 == 0) ? false : true;
+
+ VECTOR_ENSURE(stylist->data[type], 1, 1);
+ VECTOR_PUSH(stylist->data[type], entry);
+ return true;
+}
+
+static bool stylist_validate_requirements(struct map_session_data *sd, int type, int16 idx)
+{
+ struct item it;
+ struct stylist_data_entry *entry;
+
+ nullpo_retr(false, sd);
+ Assert_retr(false, type >= 0 && type < MAX_STYLIST_TYPE);
+ Assert_retr(false, idx >= 0 && idx < VECTOR_LENGTH(stylist->data[type]));
+
+ entry = &VECTOR_INDEX(stylist->data[type], idx);
+
+ if (sd->status.class == JOB_SUMMONER && (entry->allow_doram == false))
+ return false;
+
+ if (entry->id >= 0) {
+ if (entry->zeny != 0) {
+ if (sd->status.zeny < entry->zeny)
+ return false;
+
+ sd->status.zeny -= entry->zeny;
+ clif->updatestatus(sd, SP_ZENY);
+ } else if (entry->itemid != 0) {
+ it.nameid = entry->itemid;
+ it.amount = 1;
+ return script->buildin_delitem_search(sd, &it, false);
+ } else if (entry->boxid != 0) {
+ it.nameid = entry->boxid;
+ it.amount = 1;
+ return script->buildin_delitem_search(sd, &it, false);
+ }
+ return true;
+ }
+ return false;
+}
+
+static void stylist_send_rodexitem(struct map_session_data *sd, int itemid)
+{
+ struct rodex_message msg = { 0 };
+
+ nullpo_retv(sd);
+
+ msg.receiver_id = sd->status.char_id;
+ msg.items[0].item.nameid = itemid;
+ msg.items[0].item.amount = 1;
+ msg.items[0].item.identify = 1;
+ msg.type = MAIL_TYPE_NPC | MAIL_TYPE_ITEM;
+
+ safestrncpy(msg.sender_name, msg_txt(366), NAME_LENGTH);
+ safestrncpy(msg.title, msg_txt(367), RODEX_TITLE_LENGTH);
+ safestrncpy(msg.body, msg_txt(368), MAIL_BODY_LENGTH);
+ msg.send_date = (int)time(NULL);
+ msg.expire_date = (int)time(NULL) + RODEX_EXPIRE;
+
+ intif->rodex_sendmail(&msg);
+}
+
+static void stylist_request_style_change(struct map_session_data *sd, int type, int16 idx, bool isitem)
+{
+ struct stylist_data_entry *entry;
+
+ nullpo_retv(sd);
+ Assert_retv(idx > 0);
+ Assert_retv(type >= 0 && type < MAX_STYLIST_TYPE);
+
+ if ((idx - 1) < VECTOR_LENGTH(stylist->data[type])) {
+ entry = &VECTOR_INDEX(stylist->data[type], idx - 1);
+ if (stylist->validate_requirements(sd, type, idx - 1)) {
+ if (isitem == false)
+ pc->changelook(sd, type, entry->id);
+ else
+ stylist->send_rodexitem(sd, entry->id);
+ }
+ }
+}
+
+static void stylist_vector_init(void)
+{
+ for (int i = 0; i < MAX_STYLIST_TYPE; i++)
+ VECTOR_INIT(stylist->data[i]);
+}
+static void stylist_vector_clear(void)
+{
+ for (int i = 0; i < MAX_STYLIST_TYPE; i++)
+ VECTOR_CLEAR(stylist->data[i]);
+}
+
+static void do_init_stylist(bool minimal)
+{
+ if (minimal)
+ return;
+
+ // Initialize the db
+ stylist->vector_init();
+
+ // Load the db
+ stylist->read_db_libconfig();
+}
+
+static void do_final_stylist(void)
+{
+ // Clear the db
+ stylist->vector_clear();
+}
+
+void stylist_defaults(void)
+{
+ stylist = &stylist_s;
+
+ /* core */
+ stylist->init = do_init_stylist;
+ stylist->final = do_final_stylist;
+ /* */
+ stylist->vector_init = stylist_vector_init;
+ stylist->vector_clear = stylist_vector_clear;
+ /* database */
+ stylist->read_db_libconfig = stylist_read_db_libconfig;
+ stylist->read_db_libconfig_sub = stylist_read_db_libconfig_sub;
+ /* */
+ stylist->request_style_change = stylist_request_style_change;
+ stylist->validate_requirements = stylist_validate_requirements;
+ stylist->send_rodexitem = stylist_send_rodexitem;
+}
diff --git a/src/map/stylist.h b/src/map/stylist.h
new file mode 100644
index 000000000..5bedfefc7
--- /dev/null
+++ b/src/map/stylist.h
@@ -0,0 +1,69 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef MAP_STYLIST_H
+#define MAP_STYLIST_H
+
+#include "common/hercules.h"
+#include "map/map.h" // LOOK_MAX
+
+struct map_session_data;
+
+/* Maximum available types for stylist */
+#ifndef MAX_STYLIST_TYPE
+#define MAX_STYLIST_TYPE LOOK_MAX
+#endif
+
+/* Stylist data [Asheraf/Hercules]*/
+struct stylist_data_entry {
+ int16 id;
+ int32 zeny;
+ int itemid;
+ int boxid;
+ bool allow_doram;
+};
+
+/**
+ * stylist.c Interface
+ **/
+struct stylist_interface {
+ VECTOR_DECL(struct stylist_data_entry) data[MAX_STYLIST_TYPE];
+
+ void (*init) (bool minimal);
+ void (*final) (void);
+
+ void (*vector_init) (void);
+ void (*vector_clear) (void);
+
+ bool (*read_db_libconfig) (void);
+ bool (*read_db_libconfig_sub) (struct config_setting_t *it, int idx, const char *source);
+
+ void (*request_style_change) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+ bool (*validate_requirements) (struct map_session_data *sd, int type, int16 idx);
+ void (*send_rodexitem) (struct map_session_data *sd, int itemid);
+
+};
+
+#ifdef HERCULES_CORE
+void stylist_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct stylist_interface *stylist; ///< Pointer to the stylist interface.
+
+#endif /* MAP_STYLIST_H */
diff --git a/src/map/trade.c b/src/map/trade.c
index d4f846d19..cef14ffe6 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -163,8 +163,8 @@ static void trade_tradeack(struct map_session_data *sd, int type)
}
//Check if you can start trade.
- if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.storage_flag != STORAGE_FLAG_CLOSED
- || tsd->npc_id || tsd->state.vending || tsd->state.buyingstore || tsd->state.storage_flag != STORAGE_FLAG_CLOSED
+ if (sd->npc_id || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->state.storage_flag != STORAGE_FLAG_CLOSED
+ || tsd->npc_id || tsd->state.vending || tsd->state.prevend || tsd->state.buyingstore || tsd->state.storage_flag != STORAGE_FLAG_CLOSED
) {
//Fail
clif->tradestart(sd, 2);
@@ -209,7 +209,7 @@ static int impossible_trade_check(struct map_session_data *sd)
// remove this part: arrows can be trade and equipped
// re-added! [celest]
// remove equipped items (they can not be trade)
- for (i = 0; i < MAX_INVENTORY; i++)
+ for (i = 0; i < sd->status.inventorySize; i++)
if (inventory[i].nameid > 0 && inventory[i].equip && !(inventory[i].equip & EQP_AMMO))
memset(&inventory[i], 0, sizeof(struct item));
@@ -218,7 +218,7 @@ static int impossible_trade_check(struct map_session_data *sd)
if (!sd->deal.item[i].amount)
continue;
index = sd->deal.item[i].index;
- if (index < 0 || index >= MAX_INVENTORY)
+ if (index < 0 || index >= sd->status.inventorySize)
return 1;
if (inventory[index].amount < sd->deal.item[i].amount) {
// if more than the player have -> hack
@@ -281,9 +281,9 @@ static int trade_check(struct map_session_data *sd, struct map_session_data *tsd
return 0; //qty Exploit?
data = itemdb->search(inventory[n].nameid);
- i = MAX_INVENTORY;
+ i = tsd->status.inventorySize;
if (itemdb->isstackable2(data)) { //Stackable item.
- for(i = 0; i < MAX_INVENTORY; i++)
+ for(i = 0; i < tsd->status.inventorySize; i++)
if (inventory2[i].nameid == inventory[n].nameid &&
inventory2[i].card[0] == inventory[n].card[0] && inventory2[i].card[1] == inventory[n].card[1] &&
inventory2[i].card[2] == inventory[n].card[2] && inventory2[i].card[3] == inventory[n].card[3]) {
@@ -295,9 +295,9 @@ static int trade_check(struct map_session_data *sd, struct map_session_data *tsd
}
}
- if (i == MAX_INVENTORY) {// look for an empty slot.
- for(i = 0; i < MAX_INVENTORY && inventory2[i].nameid; i++);
- if (i == MAX_INVENTORY)
+ if (i == tsd->status.inventorySize) {// look for an empty slot.
+ for (i = 0; i < tsd->status.inventorySize && inventory2[i].nameid; i++);
+ if (i == tsd->status.inventorySize)
return 0;
memcpy(&inventory2[i], &inventory[n], sizeof(struct item));
inventory2[i].amount = amount;
@@ -308,15 +308,15 @@ static int trade_check(struct map_session_data *sd, struct map_session_data *tsd
if (!amount)
continue;
n = tsd->deal.item[trade_i].index;
- if (n < 0 || n >= MAX_INVENTORY)
+ if (n < 0 || n >= tsd->status.inventorySize)
return 0;
if (amount > inventory2[n].amount)
return 0;
// search if it's possible to add item (for full inventory)
data = itemdb->search(inventory2[n].nameid);
- i = MAX_INVENTORY;
+ i = sd->status.inventorySize;
if (itemdb->isstackable2(data)) {
- for(i = 0; i < MAX_INVENTORY; i++)
+ for(i = 0; i < sd->status.inventorySize; i++)
if (inventory[i].nameid == inventory2[n].nameid &&
inventory[i].card[0] == inventory2[n].card[0] && inventory[i].card[1] == inventory2[n].card[1] &&
inventory[i].card[2] == inventory2[n].card[2] && inventory[i].card[3] == inventory2[n].card[3]) {
@@ -327,9 +327,9 @@ static int trade_check(struct map_session_data *sd, struct map_session_data *tsd
break;
}
}
- if (i == MAX_INVENTORY) {
- for(i = 0; i < MAX_INVENTORY && inventory[i].nameid; i++);
- if (i == MAX_INVENTORY)
+ if (i == sd->status.inventorySize) {
+ for(i = 0; i < sd->status.inventorySize && inventory[i].nameid; i++);
+ if (i == sd->status.inventorySize)
return 0;
memcpy(&inventory[i], &inventory2[n], sizeof(struct item));
inventory[i].amount = amount;
@@ -369,7 +369,7 @@ static void trade_tradeadditem(struct map_session_data *sd, short index, short a
index -= 2; // 0 is for zeny, 1 is unknown. Gravity, go figure...
//Item checks...
- if( index < 0 || index >= MAX_INVENTORY )
+ if (index < 0 || index >= sd->status.inventorySize)
return;
if( amount < 0 || amount > sd->status.inventory[index].amount )
return;
diff --git a/src/map/unit.c b/src/map/unit.c
index ee856cb76..45cb7dffd 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -918,7 +918,7 @@ static int unit_blown(struct block_list *bl, int dx, int dy, int count, int flag
//Warps a unit/ud to a given map/position.
//In the case of players, pc->setpos is used.
//it respects the no warp flags, so it is safe to call this without doing nowarpto/nowarp checks.
-static int unit_warp(struct block_list *bl, short m, short x, short y, clr_type type)
+static int unit_warp(struct block_list *bl, short m, short x, short y, enum clr_type type)
{
struct unit_data *ud;
nullpo_ret(bl);
@@ -957,7 +957,7 @@ static int unit_warp(struct block_list *bl, short m, short x, short y, clr_type
return 2;
}
- } else if (map->getcell(m, bl, x, y, CELL_CHKNOREACH)) {
+ } else if (bl->type != BL_NPC && map->getcell(m, bl, x, y, CELL_CHKNOREACH)) {
//Invalid target cell
ShowWarning("unit_warp: Specified non-walkable target cell: %d (%s) at [%d,%d]\n", m, map->list[m].name, x,y);
@@ -1090,6 +1090,7 @@ static int unit_can_move(struct block_list *bl)
if (sd && (
pc_issit(sd) ||
sd->state.vending ||
+ sd->state.prevend ||
sd->state.buyingstore ||
sd->block_action.move
))
@@ -2419,7 +2420,7 @@ static int unit_changeviewsize(struct block_list *bl, short size)
* Otherwise it is assumed bl is being warped.
* On-Kill specific stuff is not performed here, look at status->damage for that.
*------------------------------------------*/
-static int unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func)
+static int unit_remove_map(struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func)
{
struct unit_data *ud = unit->bl2ud(bl);
struct status_change *sc = status->get_sc(bl);
@@ -2665,7 +2666,7 @@ static int unit_remove_map(struct block_list *bl, clr_type clrtype, const char *
return 1;
}
-static void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype)
+static void unit_remove_map_pc(struct map_session_data *sd, enum clr_type clrtype)
{
nullpo_retv(sd);
unit->remove_map(&sd->bl,clrtype,ALC_MARK);
@@ -2697,7 +2698,7 @@ static void unit_free_pc(struct map_session_data *sd)
* Function to free all related resources to the bl
* if unit is on map, it is removed using the clrtype specified
*------------------------------------------*/
-static int unit_free(struct block_list *bl, clr_type clrtype)
+static int unit_free(struct block_list *bl, enum clr_type clrtype)
{
struct unit_data *ud = unit->bl2ud( bl );
nullpo_ret(bl);
diff --git a/src/map/unit.h b/src/map/unit.h
index 0c1c2405c..3209351e3 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -44,6 +44,7 @@ enum unit_stopwalking_flag {
struct unit_data {
struct block_list *bl;
+ char title[NAME_LENGTH];
struct walkpath_data walkpath;
struct skill_timerskill *skilltimerskill[MAX_SKILLTIMERSKILL];
struct skill_unit_group *skillunit[MAX_SKILLUNITGROUP];
@@ -61,6 +62,7 @@ struct unit_data {
int chaserange;
bool stepaction; //Action should be executed on step [Playtester]
int steptimer; //Timer that triggers the action [Playtester]
+ int groupId; // id of client side group (works for npc and may be other) [4144]
uint16 stepskill_id,stepskill_lv; //Remembers skill that should be casted on step [Playtester]
int64 attackabletime;
int64 canact_tick;
@@ -116,7 +118,7 @@ struct unit_interface {
int (*setdir) (struct block_list *bl, unsigned char dir);
uint8 (*getdir) (struct block_list *bl);
int (*blown) (struct block_list *bl, int dx, int dy, int count, int flag);
- int (*warp) (struct block_list *bl, short m, short x, short y, clr_type type);
+ int (*warp) (struct block_list *bl, short m, short x, short y, enum clr_type type);
int (*stop_walking) (struct block_list *bl, int type);
int (*skilluse_id) (struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv);
int (*step_timer) (int tid, int64 tick, int id, intptr_t data);
@@ -142,10 +144,10 @@ struct unit_interface {
int (*counttargeted) (struct block_list *bl);
int (*fixdamage) (struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2);
int (*changeviewsize) (struct block_list *bl, short size);
- int (*remove_map) (struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func);
- void (*remove_map_pc) (struct map_session_data *sd, clr_type clrtype);
+ int (*remove_map) (struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func);
+ void (*remove_map_pc) (struct map_session_data *sd, enum clr_type clrtype);
void (*free_pc) (struct map_session_data *sd);
- int (*free) (struct block_list *bl, clr_type clrtype);
+ int (*free) (struct block_list *bl, enum clr_type clrtype);
};
#ifdef HERCULES_CORE
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index 64337d8f4..8e7ed4823 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -41,6 +41,8 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers")
#include "login/lclif.p.h"
#include "login/login.h"
#include "login/loginlog.h"
+#include "login/packets_ac_struct.h"
+#include "login/packets_ca_struct.h"
#elif defined (HPMHOOKING_CHAR)
#define HPM_SERVER_TYPE SERVER_TYPE_CHAR
#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_char.HPMHooksCore.inc"
@@ -104,10 +106,13 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers")
#include "map/pet.h"
#include "map/quest.h"
#include "map/rodex.h"
+#include "map/refine.h"
+#include "map/refine.p.h"
#include "map/script.h"
#include "map/skill.h"
#include "map/status.h"
#include "map/storage.h"
+#include "map/stylist.h"
#include "map/trade.h"
#include "map/unit.h"
#include "common/grfio.h"
diff --git a/src/plugins/HPMHooking.h b/src/plugins/HPMHooking.h
index 44970863c..f94dccac4 100644
--- a/src/plugins/HPMHooking.h
+++ b/src/plugins/HPMHooking.h
@@ -50,11 +50,21 @@ HPExport struct HPMHooking_interface HPMHooking_s;
HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->" #funcname, (hook), HPMi->pid) \
)
+#define addHookPrePriv(ifname, funcname, hook) ( \
+ (void)((HPMHOOK_pre_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \
+ HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->p->" #funcname, (hook), HPMi->pid) \
+ )
+
#define addHookPost(ifname, funcname, hook) ( \
(void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \
HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->" #funcname, (hook), HPMi->pid) \
)
+#define addHookPostPriv(ifname, funcname, hook) ( \
+ (void)((HPMHOOK_post_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \
+ HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->p->" #funcname, (hook), HPMi->pid) \
+ )
+
/* need better names ;/ */
/* will not run the original function after pre-hook processing is complete (other hooks will run) */
#define hookStop() (HPMi->hooking->HookStop(__func__,HPMi->pid))
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index ea1aa85a4..b59d80b9c 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -538,8 +538,8 @@ typedef int (*HPMHOOK_pre_chr_memitemdata_to_sql) (const struct item *items[], i
typedef int (*HPMHOOK_post_chr_memitemdata_to_sql) (int retVal___, const struct item items[], int id, enum inventory_table_type table);
typedef int (*HPMHOOK_pre_chr_mmo_gender) (const struct char_session_data **sd, const struct mmo_charstatus **p, char *sex);
typedef int (*HPMHOOK_post_chr_mmo_gender) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char sex);
-typedef int (*HPMHOOK_pre_chr_mmo_chars_fromsql) (struct char_session_data **sd, uint8 **buf);
-typedef int (*HPMHOOK_post_chr_mmo_chars_fromsql) (int retVal___, struct char_session_data *sd, uint8 *buf);
+typedef int (*HPMHOOK_pre_chr_mmo_chars_fromsql) (struct char_session_data **sd, uint8 **buf, int **count);
+typedef int (*HPMHOOK_post_chr_mmo_chars_fromsql) (int retVal___, struct char_session_data *sd, uint8 *buf, int *count);
typedef int (*HPMHOOK_pre_chr_mmo_char_fromsql) (int *char_id, struct mmo_charstatus **p, bool *load_everything);
typedef int (*HPMHOOK_post_chr_mmo_char_fromsql) (int retVal___, int char_id, struct mmo_charstatus *p, bool load_everything);
typedef int (*HPMHOOK_pre_chr_mmo_char_sql_init) (void);
@@ -552,16 +552,18 @@ typedef bool (*HPMHOOK_pre_chr_name_exists) (const char **name, const char **esc
typedef bool (*HPMHOOK_post_chr_name_exists) (bool retVal___, const char *name, const char *esc_name);
typedef int (*HPMHOOK_pre_chr_check_char_name) (const char **name, const char **esc_name);
typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, const char *name, const char *esc_name);
-typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex);
-typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex);
+typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex);
+typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex);
typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2);
typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2);
typedef int (*HPMHOOK_pre_chr_count_users) (void);
typedef int (*HPMHOOK_post_chr_count_users) (int retVal___);
typedef int (*HPMHOOK_pre_chr_mmo_char_tobuf) (uint8 **buffer, struct mmo_charstatus **p);
typedef int (*HPMHOOK_post_chr_mmo_char_tobuf) (int retVal___, uint8 *buffer, struct mmo_charstatus *p);
-typedef void (*HPMHOOK_pre_chr_mmo_char_send099d) (int *fd, struct char_session_data **sd);
-typedef void (*HPMHOOK_post_chr_mmo_char_send099d) (int fd, struct char_session_data *sd);
+typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int *fd, struct char_session_data **sd);
+typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd);
+typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int *fd, struct char_session_data **sd);
+typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_ban_list) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_chr_mmo_char_send_ban_list) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_slots_info) (int *fd, struct char_session_data **sd);
@@ -1160,12 +1162,12 @@ typedef void (*HPMHOOK_pre_clif_package_announce) (struct map_session_data **sd,
typedef void (*HPMHOOK_post_clif_package_announce) (struct map_session_data *sd, int nameid, int containerid);
typedef void (*HPMHOOK_pre_clif_item_drop_announce) (struct map_session_data **sd, int *nameid, char **monsterName);
typedef void (*HPMHOOK_post_clif_item_drop_announce) (struct map_session_data *sd, int nameid, char *monsterName);
-typedef void (*HPMHOOK_pre_clif_clearunit_single) (int *id, clr_type *type, int *fd);
-typedef void (*HPMHOOK_post_clif_clearunit_single) (int id, clr_type type, int fd);
-typedef void (*HPMHOOK_pre_clif_clearunit_area) (struct block_list **bl, clr_type *type);
-typedef void (*HPMHOOK_post_clif_clearunit_area) (struct block_list *bl, clr_type type);
-typedef void (*HPMHOOK_pre_clif_clearunit_delayed) (struct block_list **bl, clr_type *type, int64 *tick);
-typedef void (*HPMHOOK_post_clif_clearunit_delayed) (struct block_list *bl, clr_type type, int64 tick);
+typedef void (*HPMHOOK_pre_clif_clearunit_single) (int *id, enum clr_type *type, int *fd);
+typedef void (*HPMHOOK_post_clif_clearunit_single) (int id, enum clr_type type, int fd);
+typedef void (*HPMHOOK_pre_clif_clearunit_area) (struct block_list **bl, enum clr_type *type);
+typedef void (*HPMHOOK_post_clif_clearunit_area) (struct block_list *bl, enum clr_type type);
+typedef void (*HPMHOOK_pre_clif_clearunit_delayed) (struct block_list **bl, enum clr_type *type, int64 *tick);
+typedef void (*HPMHOOK_post_clif_clearunit_delayed) (struct block_list *bl, enum clr_type type, int64 tick);
typedef void (*HPMHOOK_pre_clif_walkok) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_walkok) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_move) (struct unit_data **ud);
@@ -1298,8 +1300,10 @@ typedef void (*HPMHOOK_pre_clif_update_rankingpoint) (struct map_session_data **
typedef void (*HPMHOOK_post_clif_update_rankingpoint) (struct map_session_data *sd, enum fame_list_type type, int points);
typedef void (*HPMHOOK_pre_clif_pRanklist) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRanklist) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_hotkeys) (struct map_session_data **sd);
-typedef void (*HPMHOOK_post_clif_hotkeys) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_hotkeys) (struct map_session_data **sd, int *tab);
+typedef void (*HPMHOOK_post_clif_hotkeys) (struct map_session_data *sd, int tab);
+typedef void (*HPMHOOK_pre_clif_hotkeysAll) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_hotkeysAll) (struct map_session_data *sd);
typedef int (*HPMHOOK_pre_clif_insight) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_clif_insight) (int retVal___, struct block_list *bl, va_list ap);
typedef int (*HPMHOOK_pre_clif_outsight) (struct block_list **bl, va_list ap);
@@ -1338,6 +1342,18 @@ 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_inventoryExpansionInfo) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_inventoryExpansionInfo) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_inventoryExpandAck) (struct map_session_data **sd, enum expand_inventory *result, int *itemId);
+typedef void (*HPMHOOK_post_clif_inventoryExpandAck) (struct map_session_data *sd, enum expand_inventory result, int itemId);
+typedef void (*HPMHOOK_pre_clif_inventoryExpandResult) (struct map_session_data **sd, enum expand_inventory_result *result);
+typedef void (*HPMHOOK_post_clif_inventoryExpandResult) (struct map_session_data *sd, enum expand_inventory_result result);
+typedef void (*HPMHOOK_pre_clif_pInventoryExpansion) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pInventoryExpansion) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pInventoryExpansionConfirmed) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pInventoryExpansionConfirmed) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pInventoryExpansionRejected) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pInventoryExpansionRejected) (int fd, struct map_session_data *sd);
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);
@@ -1364,8 +1380,32 @@ typedef void (*HPMHOOK_pre_clif_mvp_noitem) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_mvp_noitem) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_changed_dir) (struct block_list **bl, enum send_target *target);
typedef void (*HPMHOOK_post_clif_changed_dir) (struct block_list *bl, enum send_target target);
-typedef void (*HPMHOOK_pre_clif_charnameack) (int *fd, struct block_list **bl);
-typedef void (*HPMHOOK_post_clif_charnameack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_blname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_blname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_pcname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_pcname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_homname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_homname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_mername_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_mername_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_petname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_petname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_npcname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_npcname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_mobname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_mobname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_mobname_guardian_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_mobname_guardian_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_mobname_additional_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_mobname_additional_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_mobname_normal_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_mobname_normal_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_chatname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_chatname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_elemname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_elemname_ack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_unknownname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_unknownname_ack) (int fd, struct block_list *bl);
typedef void (*HPMHOOK_pre_clif_monster_hp_bar) (struct mob_data **md, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_monster_hp_bar) (struct mob_data *md, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_clif_hpmeter) (struct map_session_data **sd);
@@ -1552,6 +1592,8 @@ typedef void (*HPMHOOK_pre_clif_addchat) (struct chat_data **cd, struct map_sess
typedef void (*HPMHOOK_post_clif_addchat) (struct chat_data *cd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_changechatowner) (struct chat_data **cd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_changechatowner) (struct chat_data *cd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_chatRoleChange) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner);
+typedef void (*HPMHOOK_post_clif_chatRoleChange) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner);
typedef void (*HPMHOOK_pre_clif_clearchat) (struct chat_data **cd, int *fd);
typedef void (*HPMHOOK_post_clif_clearchat) (struct chat_data *cd, int fd);
typedef void (*HPMHOOK_pre_clif_leavechat) (struct chat_data **cd, struct map_session_data **sd, bool *flag);
@@ -1572,6 +1614,8 @@ typedef void (*HPMHOOK_pre_clif_messagecolor_self) (int *fd, uint32 *color, cons
typedef void (*HPMHOOK_post_clif_messagecolor_self) (int fd, uint32 color, const char *msg);
typedef void (*HPMHOOK_pre_clif_messagecolor) (struct block_list **bl, uint32 *color, const char **msg);
typedef void (*HPMHOOK_post_clif_messagecolor) (struct block_list *bl, uint32 color, const char *msg);
+typedef void (*HPMHOOK_pre_clif_serviceMessageColor) (struct map_session_data **sd, uint32 *color, const char **msg);
+typedef void (*HPMHOOK_post_clif_serviceMessageColor) (struct map_session_data *sd, uint32 color, const char *msg);
typedef void (*HPMHOOK_pre_clif_disp_overhead) (struct block_list **bl, const char **mes, enum send_target *target, struct block_list **target_bl);
typedef void (*HPMHOOK_post_clif_disp_overhead) (struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl);
typedef void (*HPMHOOK_pre_clif_notify_playerchat) (struct block_list **bl, const char **mes);
@@ -1602,8 +1646,8 @@ typedef void (*HPMHOOK_pre_clif_wisall) (struct map_session_data **sd, int *type
typedef void (*HPMHOOK_post_clif_wisall) (struct map_session_data *sd, int type, int flag);
typedef void (*HPMHOOK_pre_clif_PMIgnoreList) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_PMIgnoreList) (struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_ShowScript) (struct block_list **bl, const char **message);
-typedef void (*HPMHOOK_post_clif_ShowScript) (struct block_list *bl, const char *message);
+typedef void (*HPMHOOK_pre_clif_ShowScript) (struct block_list **bl, const char **message, enum send_target *target);
+typedef void (*HPMHOOK_post_clif_ShowScript) (struct block_list *bl, const char *message, enum send_target target);
typedef void (*HPMHOOK_pre_clif_traderequest) (struct map_session_data **sd, const char **name);
typedef void (*HPMHOOK_post_clif_traderequest) (struct map_session_data *sd, const char *name);
typedef void (*HPMHOOK_pre_clif_tradestart) (struct map_session_data **sd, uint8 *type);
@@ -2006,8 +2050,10 @@ typedef void (*HPMHOOK_pre_clif_npc_market_purchase_ack) (struct map_session_dat
typedef void (*HPMHOOK_post_clif_npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response);
typedef bool (*HPMHOOK_pre_clif_parse_roulette_db) (void);
typedef bool (*HPMHOOK_post_clif_parse_roulette_db) (bool retVal___);
-typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, int *bonusItemID);
-typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID);
+typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID);
+typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID);
+typedef void (*HPMHOOK_pre_clif_roulette_close) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_roulette_close) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_openmergeitem) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_openmergeitem) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_cancelmergeitem) (int *fd, struct map_session_data **sd);
@@ -2016,6 +2062,8 @@ typedef int (*HPMHOOK_pre_clif_comparemergeitem) (const void **a, const void **b
typedef int (*HPMHOOK_post_clif_comparemergeitem) (int retVal___, const void *a, const void *b);
typedef void (*HPMHOOK_pre_clif_ackmergeitems) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_ackmergeitems) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_mergeitems) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason);
+typedef void (*HPMHOOK_post_clif_mergeitems) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason);
typedef bool (*HPMHOOK_pre_clif_isdisguised) (struct block_list **bl);
typedef bool (*HPMHOOK_post_clif_isdisguised) (bool retVal___, struct block_list *bl);
typedef void (*HPMHOOK_pre_clif_navigate_to) (struct map_session_data **sd, const char **mapname, uint16 *x, uint16 *y, uint8 *flag, bool *hideWindow, uint16 *mob_id);
@@ -2040,8 +2088,10 @@ typedef void (*HPMHOOK_pre_clif_pLoadEndAck) (int *fd, struct map_session_data *
typedef void (*HPMHOOK_post_clif_pLoadEndAck) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pTickSend) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pTickSend) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_pHotkey) (int *fd, struct map_session_data **sd);
-typedef void (*HPMHOOK_post_clif_pHotkey) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pHotkey1) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pHotkey1) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pHotkey2) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pHotkey2) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pProgressbar) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pProgressbar) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pWalkToXY) (int *fd, struct map_session_data **sd);
@@ -2126,8 +2176,14 @@ typedef void (*HPMHOOK_pre_clif_pStatusUp) (int *fd, struct map_session_data **s
typedef void (*HPMHOOK_post_clif_pStatusUp) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pSkillUp) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pSkillUp) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_useSkillToIdReal) (int *fd, struct map_session_data **sd, int *skill_id, int *skill_lv, int *target_id);
+typedef void (*HPMHOOK_post_clif_useSkillToIdReal) (int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id);
typedef void (*HPMHOOK_pre_clif_pUseSkillToId) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pUseSkillToId) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pStartUseSkillToId) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pStartUseSkillToId) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pStopUseSkillToId) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pStopUseSkillToId) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pUseSkillToId_homun) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
typedef void (*HPMHOOK_post_clif_pUseSkillToId_homun) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id);
typedef void (*HPMHOOK_pre_clif_pUseSkillToId_mercenary) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
@@ -2454,6 +2510,8 @@ typedef void (*HPMHOOK_pre_clif_pPartyTick) (int *fd, struct map_session_data **
typedef void (*HPMHOOK_post_clif_pPartyTick) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pGuildInvite2) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pGuildInvite2) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_cashShopBuyAck) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result);
+typedef void (*HPMHOOK_post_clif_cashShopBuyAck) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result);
typedef void (*HPMHOOK_pre_clif_pPartyBookingAddFilter) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pPartyBookingAddFilter) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pPartyBookingSubFilter) (int *fd, struct map_session_data **sd);
@@ -2492,8 +2550,10 @@ typedef void (*HPMHOOK_pre_clif_pNPCMarketPurchase) (int *fd, struct map_session
typedef void (*HPMHOOK_post_clif_pNPCMarketPurchase) (int fd, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_clif_add_item_options) (struct ItemOptions **buf, const struct item **it);
typedef int (*HPMHOOK_post_clif_add_item_options) (int retVal___, struct ItemOptions *buf, const struct item *it);
-typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift) (int *fd, struct map_session_data **sd);
-typedef void (*HPMHOOK_post_clif_pHotkeyRowShift) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift1) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pHotkeyRowShift1) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift2) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pHotkeyRowShift2) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_dressroom_open) (struct map_session_data **sd, int *view);
typedef void (*HPMHOOK_post_clif_dressroom_open) (struct map_session_data *sd, int view);
typedef void (*HPMHOOK_pre_clif_pOneClick_ItemIdentify) (int *fd, struct map_session_data **sd);
@@ -2540,8 +2600,8 @@ typedef void (*HPMHOOK_pre_clif_pRodexOpenMailbox) (int *fd, struct map_session_
typedef void (*HPMHOOK_post_clif_pRodexOpenMailbox) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pRodexCheckName) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexCheckName) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name);
-typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name);
+typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name);
+typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name);
typedef void (*HPMHOOK_pre_clif_pRodexDeleteMail) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexDeleteMail) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_rodex_delete_mail) (struct map_session_data **sd, int8 *opentype, int64 *mail_id);
@@ -2598,24 +2658,12 @@ typedef void (*HPMHOOK_pre_clif_pPrivateAirshipRequest) (int *fd, struct map_ses
typedef void (*HPMHOOK_post_clif_pPrivateAirshipRequest) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_PrivateAirshipResponse) (struct map_session_data **sd, uint32 *flag);
typedef void (*HPMHOOK_post_clif_PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag);
-typedef void (*HPMHOOK_pre_clif_stylist_vector_init) (void);
-typedef void (*HPMHOOK_post_clif_stylist_vector_init) (void);
-typedef void (*HPMHOOK_pre_clif_stylist_vector_clear) (void);
-typedef void (*HPMHOOK_post_clif_stylist_vector_clear) (void);
-typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig) (void);
-typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig) (bool retVal___);
-typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source);
-typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
-typedef bool (*HPMHOOK_pre_clif_style_change_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx);
-typedef bool (*HPMHOOK_post_clif_style_change_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
-typedef void (*HPMHOOK_pre_clif_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid);
-typedef void (*HPMHOOK_post_clif_stylist_send_rodexitem) (struct map_session_data *sd, int itemid);
typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pReqStyleChange2) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pReqStyleChange2) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
-typedef void (*HPMHOOK_post_clif_cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+typedef void (*HPMHOOK_pre_clif_pStyleClose) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pStyleClose) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag);
typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data **sd);
@@ -2630,8 +2678,48 @@ typedef void (*HPMHOOK_pre_clif_camera_showWindow) (struct map_session_data **sd
typedef void (*HPMHOOK_post_clif_camera_showWindow) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_camera_change) (struct map_session_data **sd, float *range, float *rotation, float *latitude, enum send_target *target);
typedef void (*HPMHOOK_post_clif_camera_change) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target);
+typedef void (*HPMHOOK_pre_clif_pCameraInfo) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pCameraInfo) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_item_preview) (struct map_session_data **sd, int *n);
typedef void (*HPMHOOK_post_clif_item_preview) (struct map_session_data *sd, int n);
+typedef bool (*HPMHOOK_pre_clif_enchant_equipment) (struct map_session_data **sd, enum equip_pos *pos, int *cardSlot, int *cardId);
+typedef bool (*HPMHOOK_post_clif_enchant_equipment) (bool retVal___, struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId);
+typedef void (*HPMHOOK_pre_clif_pReqRemainTime) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pReqRemainTime) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_npc_barter_open) (struct map_session_data **sd, struct npc_data **nd);
+typedef void (*HPMHOOK_post_clif_npc_barter_open) (struct map_session_data *sd, struct npc_data *nd);
+typedef void (*HPMHOOK_pre_clif_pNPCBarterClosed) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pNPCBarterClosed) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pNPCBarterPurchase) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pNPCBarterPurchase) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pClientVersion) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pClientVersion) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pPing) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pPing) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_ping) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_ping) (struct map_session_data *sd);
+typedef int (*HPMHOOK_pre_clif_pingTimer) (int *tid, int64 *tick, int *id, intptr_t *data);
+typedef int (*HPMHOOK_post_clif_pingTimer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
+typedef int (*HPMHOOK_pre_clif_pingTimerSub) (struct map_session_data **sd, va_list ap);
+typedef int (*HPMHOOK_post_clif_pingTimerSub) (int retVal___, struct map_session_data *sd, va_list ap);
+typedef void (*HPMHOOK_pre_clif_pResetCooldown) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pResetCooldown) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_loadConfirm) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_loadConfirm) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_send_selforarea) (int *fd, struct block_list **bl, const void **buf, int *len);
+typedef void (*HPMHOOK_post_clif_send_selforarea) (int fd, struct block_list *bl, const void *buf, int len);
+typedef void (*HPMHOOK_pre_clif_OpenRefineryUI) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_OpenRefineryUI) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pAddItemRefineryUI) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pAddItemRefineryUI) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_AddItemRefineryUIAck) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req);
+typedef void (*HPMHOOK_post_clif_AddItemRefineryUIAck) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req);
+typedef void (*HPMHOOK_pre_clif_pRefineryUIClose) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pRefineryUIClose) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pRefineryUIRefine) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pRefineryUIRefine) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_announce_refine_status) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target);
+typedef void (*HPMHOOK_post_clif_announce_refine_status) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
@@ -2896,8 +2984,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2,
typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag);
typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online);
typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online);
-typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login);
-typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login);
+typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login);
+typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login);
typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx);
typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx);
typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos);
@@ -3056,8 +3144,8 @@ typedef void (*HPMHOOK_pre_homun_skillup) (struct homun_data **hd, uint16 *skill
typedef void (*HPMHOOK_post_homun_skillup) (struct homun_data *hd, uint16 skill_id);
typedef bool (*HPMHOOK_pre_homun_levelup) (struct homun_data **hd);
typedef bool (*HPMHOOK_post_homun_levelup) (bool retVal___, struct homun_data *hd);
-typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, short *class_);
-typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, short class_);
+typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, int *class_);
+typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, int class_);
typedef bool (*HPMHOOK_pre_homun_evolve) (struct homun_data **hd);
typedef bool (*HPMHOOK_post_homun_evolve) (bool retVal___, struct homun_data *hd);
typedef bool (*HPMHOOK_pre_homun_mutate) (struct homun_data **hd, int *homun_id);
@@ -3270,8 +3358,8 @@ typedef bool (*HPMHOOK_pre_inter_guild_add_member) (int *guild_id, const struct
typedef bool (*HPMHOOK_post_inter_guild_add_member) (bool retVal___, int guild_id, const struct guild_member *member, int map_fd);
typedef bool (*HPMHOOK_pre_inter_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes, int *map_fd);
typedef bool (*HPMHOOK_post_inter_guild_leave) (bool retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd);
-typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef bool (*HPMHOOK_pre_inter_guild_update_member_info) (int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len);
typedef bool (*HPMHOOK_post_inter_guild_update_member_info) (bool retVal___, int guild_id, int account_id, int char_id, int type, const char *data, int len);
typedef bool (*HPMHOOK_pre_inter_guild_disband) (int *guild_id);
@@ -3464,8 +3552,8 @@ typedef int (*HPMHOOK_pre_inter_pet_delete_) (int *pet_id);
typedef int (*HPMHOOK_post_inter_pet_delete_) (int retVal___, int pet_id);
typedef int (*HPMHOOK_pre_inter_pet_parse_frommap) (int *fd);
typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd);
-typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
-typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
+typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
+typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
typedef struct s_pet* (*HPMHOOK_pre_inter_pet_load) (int *account_id, int *char_id, int *pet_id);
typedef struct s_pet* (*HPMHOOK_post_inter_pet_load) (struct s_pet* retVal___, int account_id, int char_id, int pet_id);
#endif // CHAR_INT_PET_H
@@ -3494,12 +3582,16 @@ typedef int (*HPMHOOK_pre_inter_rodex_fromsql) (int *char_id, int *account_id, i
typedef int (*HPMHOOK_post_inter_rodex_fromsql) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails);
typedef bool (*HPMHOOK_pre_inter_rodex_hasnew) (int *char_id, int *account_id);
typedef bool (*HPMHOOK_post_inter_rodex_hasnew) (bool retVal___, int char_id, int account_id);
-typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, short **target_class, int **target_level);
-typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level);
+typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, int **target_class, int **target_level);
+typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level);
typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg);
typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg);
-typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int64 *mail_id, int8 *flag);
-typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int64 mail_id, int8 flag);
+typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag);
+typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag);
+typedef int64 (*HPMHOOK_pre_inter_rodex_getzeny) (int64 *mail_id);
+typedef int64 (*HPMHOOK_post_inter_rodex_getzeny) (int64 retVal___, int64 mail_id);
+typedef int (*HPMHOOK_pre_inter_rodex_getitems) (int64 *mail_id, struct rodex_item **items);
+typedef int (*HPMHOOK_post_inter_rodex_getitems) (int retVal___, int64 mail_id, struct rodex_item *items);
#endif // CHAR_INT_RODEX_H
#ifdef CHAR_INT_STORAGE_H /* inter_storage */
typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, const struct storage_data **p);
@@ -3526,8 +3618,8 @@ typedef bool (*HPMHOOK_post_inter_storage_retrieve_bound_items) (bool retVal___,
#ifdef MAP_INTIF_H /* intif */
typedef int (*HPMHOOK_pre_intif_parse) (int *fd);
typedef int (*HPMHOOK_post_intif_parse) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
-typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
+typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
+typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
typedef int (*HPMHOOK_pre_intif_broadcast) (const char **mes, int *len, int *type);
typedef int (*HPMHOOK_post_intif_broadcast) (int retVal___, const char *mes, int len, int type);
typedef int (*HPMHOOK_pre_intif_broadcast2) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
@@ -3576,8 +3668,8 @@ typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_me
typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m);
typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes);
typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes);
-typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id);
typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id);
typedef int (*HPMHOOK_pre_intif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len);
@@ -3666,12 +3758,16 @@ typedef int (*HPMHOOK_pre_intif_rodex_requestinbox) (int *char_id, int *account_
typedef int (*HPMHOOK_post_intif_rodex_requestinbox) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id);
typedef int (*HPMHOOK_pre_intif_rodex_checkhasnew) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_intif_rodex_checkhasnew) (int retVal___, struct map_session_data *sd);
-typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (int64 *mail_id, int8 *flag);
-typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, int64 mail_id, int8 flag);
+typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag);
+typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag);
typedef int (*HPMHOOK_pre_intif_rodex_sendmail) (struct rodex_message **msg);
typedef int (*HPMHOOK_post_intif_rodex_sendmail) (int retVal___, struct rodex_message *msg);
typedef int (*HPMHOOK_pre_intif_rodex_checkname) (struct map_session_data **sd, const char **name);
typedef int (*HPMHOOK_post_intif_rodex_checkname) (int retVal___, struct map_session_data *sd, const char *name);
+typedef void (*HPMHOOK_pre_intif_pGetZenyAck) (int *fd);
+typedef void (*HPMHOOK_post_intif_pGetZenyAck) (int fd);
+typedef void (*HPMHOOK_pre_intif_pGetItemsAck) (int *fd);
+typedef void (*HPMHOOK_post_intif_pGetItemsAck) (int fd);
typedef int (*HPMHOOK_pre_intif_clan_kickoffline) (int *clan_id, int *kick_interval);
typedef int (*HPMHOOK_post_intif_clan_kickoffline) (int retVal___, int clan_id, int kick_interval);
typedef int (*HPMHOOK_pre_intif_clan_membercount) (int *clan_id, int *kick_interval);
@@ -4014,6 +4110,8 @@ typedef bool (*HPMHOOK_pre_itemdb_lookup_const) (const struct config_setting_t *
typedef bool (*HPMHOOK_post_itemdb_lookup_const) (bool retVal___, const struct config_setting_t *it, const char *name, int *value);
typedef bool (*HPMHOOK_pre_itemdb_lookup_const_mask) (const struct config_setting_t **it, const char **name, int **value);
typedef bool (*HPMHOOK_post_itemdb_lookup_const_mask) (bool retVal___, const struct config_setting_t *it, const char *name, int *value);
+typedef int (*HPMHOOK_pre_itemdb_addname_sub) (union DBKey *key, struct DBData **data, va_list ap);
+typedef int (*HPMHOOK_post_itemdb_addname_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
#endif // MAP_ITEMDB_H
#ifdef LOGIN_LOGIN_H /* lchrif */
typedef void (*HPMHOOK_pre_lchrif_server_init) (int *id);
@@ -4072,6 +4170,10 @@ typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) (
typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN_OTP) (int *fd, struct login_session_data **sd);
typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (int *fd, struct login_session_data **sd);
+typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_OTP_CODE) (int *fd, struct login_session_data **sd);
+typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_OTP_CODE) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_REQ_HASH) (int *fd, struct login_session_data **sd);
typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_REQ_HASH) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_CHARSERVERCONNECT) (int *fd, struct login_session_data **sd);
@@ -4258,8 +4360,8 @@ typedef char (*HPMHOOK_pre_logs_picktype2char) (e_log_pick_type *type);
typedef char (*HPMHOOK_post_logs_picktype2char) (char retVal___, e_log_pick_type type);
typedef char (*HPMHOOK_pre_logs_chattype2char) (e_log_chat_type *type);
typedef char (*HPMHOOK_post_logs_chattype2char) (char retVal___, e_log_chat_type type);
-typedef bool (*HPMHOOK_pre_logs_should_log_item) (int *nameid, int *amount, int *refine, struct item_data **id);
-typedef bool (*HPMHOOK_post_logs_should_log_item) (bool retVal___, int nameid, int amount, int refine, struct item_data *id);
+typedef bool (*HPMHOOK_pre_logs_should_log_item) (int *nameid, int *amount, int *refine_level, struct item_data **id);
+typedef bool (*HPMHOOK_post_logs_should_log_item) (bool retVal___, int nameid, int amount, int refine_level, struct item_data *id);
#endif // MAP_LOG_H
#ifdef LOGIN_LOGIN_H /* login */
typedef int (*HPMHOOK_pre_login_mmo_auth) (struct login_session_data **sd, bool *isServer);
@@ -4354,6 +4456,8 @@ typedef bool (*HPMHOOK_pre_login_client_login) (int *fd, struct login_session_da
typedef bool (*HPMHOOK_post_login_client_login) (bool retVal___, int fd, struct login_session_data *sd);
typedef bool (*HPMHOOK_pre_login_client_login_otp) (int *fd, struct login_session_data **sd);
typedef bool (*HPMHOOK_post_login_client_login_otp) (bool retVal___, int fd, struct login_session_data *sd);
+typedef void (*HPMHOOK_pre_login_client_login_mobile_otp_request) (int *fd, struct login_session_data **sd);
+typedef void (*HPMHOOK_post_login_client_login_mobile_otp_request) (int fd, struct login_session_data *sd);
typedef void (*HPMHOOK_pre_login_char_server_connection_status) (int *fd, struct login_session_data **sd, uint8 *status);
typedef void (*HPMHOOK_post_login_char_server_connection_status) (int fd, struct login_session_data *sd, uint8 status);
typedef void (*HPMHOOK_pre_login_parse_request_connection) (int *fd, struct login_session_data **sd, const char **ip, uint32 *ipl);
@@ -4718,8 +4822,8 @@ typedef void (*HPMHOOK_pre_map_update_cell_bl) (struct block_list **bl, bool *in
typedef void (*HPMHOOK_post_map_update_cell_bl) (struct block_list *bl, bool increase);
typedef int (*HPMHOOK_pre_map_get_new_bonus_id) (void);
typedef int (*HPMHOOK_post_map_get_new_bonus_id) (int retVal___);
-typedef void (*HPMHOOK_pre_map_add_questinfo) (int *m, struct questinfo **qi);
-typedef void (*HPMHOOK_post_map_add_questinfo) (int m, struct questinfo *qi);
+typedef bool (*HPMHOOK_pre_map_add_questinfo) (int *m, struct npc_data **nd);
+typedef bool (*HPMHOOK_post_map_add_questinfo) (bool retVal___, int m, struct npc_data *nd);
typedef bool (*HPMHOOK_pre_map_remove_questinfo) (int *m, struct npc_data **nd);
typedef bool (*HPMHOOK_post_map_remove_questinfo) (bool retVal___, int m, struct npc_data *nd);
typedef struct map_zone_data* (*HPMHOOK_pre_map_merge_zone) (struct map_zone_data **main, struct map_zone_data **other);
@@ -4838,8 +4942,8 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, c
typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m);
typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes);
typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
-typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id);
typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id);
typedef int (*HPMHOOK_pre_mapif_parse_GuildMessage) (int *fd, int *guild_id, int *account_id, const char **mes, int *len);
@@ -5004,8 +5108,12 @@ typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *rece
typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result);
typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd);
typedef void (*HPMHOOK_post_mapif_parse_rodex_checkname) (int fd);
-typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name);
-typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name);
+typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name);
+typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name);
+typedef void (*HPMHOOK_pre_mapif_rodex_getzenyack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny);
+typedef void (*HPMHOOK_post_mapif_rodex_getzenyack) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny);
+typedef void (*HPMHOOK_pre_mapif_rodex_getitemsack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items);
+typedef void (*HPMHOOK_post_mapif_rodex_getitemsack) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items);
typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag);
typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag);
typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail);
@@ -5282,8 +5390,10 @@ typedef int (*HPMHOOK_pre_mob_ai_lazy) (int *tid, int64 *tick, int *id, intptr_t
typedef int (*HPMHOOK_post_mob_ai_lazy) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_mob_ai_hard) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_mob_ai_hard) (int retVal___, int tid, int64 tick, int id, intptr_t data);
-typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, int *qty, struct item_data **data);
-typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data);
+typedef void (*HPMHOOK_pre_mob_setdropitem_options) (struct item **item, struct optdrop_group **options);
+typedef void (*HPMHOOK_post_mob_setdropitem_options) (struct item *item, struct optdrop_group *options);
+typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data);
+typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data);
typedef struct item_drop* (*HPMHOOK_pre_mob_setlootitem) (struct item **item);
typedef struct item_drop* (*HPMHOOK_post_mob_setlootitem) (struct item_drop* retVal___, struct item *item);
typedef int (*HPMHOOK_pre_mob_delay_item_drop) (int *tid, int64 *tick, int *id, intptr_t *data);
@@ -5348,6 +5458,14 @@ typedef unsigned int (*HPMHOOK_pre_mob_drop_adjust) (int *baserate, int *rate_ad
typedef unsigned int (*HPMHOOK_post_mob_drop_adjust) (unsigned int retVal___, int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max);
typedef void (*HPMHOOK_pre_mob_item_dropratio_adjust) (int *nameid, int *mob_id, int **rate_adjust);
typedef void (*HPMHOOK_post_mob_item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_option) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_option) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_optslot) (struct config_setting_t **optslot, int *n, int *group_id, const char **group);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_optslot) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_group) (struct config_setting_t **group, int *n);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_group) (bool retVal___, struct config_setting_t *group, int n);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_db) (void);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_db) (bool retVal___);
typedef void (*HPMHOOK_pre_mob_readdb) (void);
typedef void (*HPMHOOK_post_mob_readdb) (void);
typedef bool (*HPMHOOK_pre_mob_lookup_const) (const struct config_setting_t **it, const char **name, int **value);
@@ -5368,6 +5486,8 @@ typedef void (*HPMHOOK_pre_mob_read_db_mvpdrops_sub) (struct mob_db **entry, str
typedef void (*HPMHOOK_post_mob_read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t);
typedef uint32 (*HPMHOOK_pre_mob_read_db_mode_sub) (struct mob_db **entry, struct config_setting_t **t);
typedef uint32 (*HPMHOOK_post_mob_read_db_mode_sub) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t);
+typedef struct optdrop_group* (*HPMHOOK_pre_mob_read_db_drops_option) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate);
+typedef struct optdrop_group* (*HPMHOOK_post_mob_read_db_drops_option) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
typedef void (*HPMHOOK_pre_mob_read_db_stats_sub) (struct mob_db **entry, struct config_setting_t **t);
typedef void (*HPMHOOK_post_mob_read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t);
typedef void (*HPMHOOK_pre_mob_name_constants) (void);
@@ -5398,6 +5518,8 @@ typedef int (*HPMHOOK_pre_mob_final_ratio_sub) (union DBKey *key, struct DBData
typedef int (*HPMHOOK_post_mob_final_ratio_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef void (*HPMHOOK_pre_mob_destroy_mob_db) (int *index);
typedef void (*HPMHOOK_post_mob_destroy_mob_db) (int index);
+typedef void (*HPMHOOK_pre_mob_destroy_drop_groups) (void);
+typedef void (*HPMHOOK_post_mob_destroy_drop_groups) (void);
typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig) (const char **filename, bool *ignore_missing);
typedef bool (*HPMHOOK_post_mob_skill_db_libconfig) (bool retVal___, const char *filename, bool ignore_missing);
typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig_sub) (struct config_setting_t **it, int *n);
@@ -5572,8 +5694,8 @@ typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, c
typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath);
typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid);
typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid);
-typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_);
-typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
+typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_);
+typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
typedef struct npc_data* (*HPMHOOK_pre_npc_add_warp) (char **name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y);
typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (struct npc_data* retVal___, char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval);
@@ -5612,8 +5734,8 @@ typedef void (*HPMHOOK_pre_npc_movenpc) (struct npc_data **nd, int16 *x, int16 *
typedef void (*HPMHOOK_post_npc_movenpc) (struct npc_data *nd, int16 x, int16 y);
typedef void (*HPMHOOK_pre_npc_setdisplayname) (struct npc_data **nd, const char **newname);
typedef void (*HPMHOOK_post_npc_setdisplayname) (struct npc_data *nd, const char *newname);
-typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, short *class_);
-typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, short class_);
+typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, int *class_);
+typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, int class_);
typedef int (*HPMHOOK_pre_npc_do_atcmd_event) (struct map_session_data **sd, const char **command, const char **message, const char **eventname);
typedef int (*HPMHOOK_post_npc_do_atcmd_event) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname);
typedef const char* (*HPMHOOK_pre_npc_parse_function) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval);
@@ -5654,20 +5776,32 @@ typedef void (*HPMHOOK_pre_npc_trader_update) (int *master);
typedef void (*HPMHOOK_post_npc_trader_update) (int master);
typedef int (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list);
typedef int (*HPMHOOK_post_npc_market_buylist) (int retVal___, struct map_session_data *sd, struct itemlist *item_list);
+typedef int (*HPMHOOK_pre_npc_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list);
+typedef int (*HPMHOOK_post_npc_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list);
typedef bool (*HPMHOOK_pre_npc_trader_open) (struct map_session_data **sd, struct npc_data **nd);
typedef bool (*HPMHOOK_post_npc_trader_open) (bool retVal___, struct map_session_data *sd, struct npc_data *nd);
typedef void (*HPMHOOK_pre_npc_market_fromsql) (void);
typedef void (*HPMHOOK_post_npc_market_fromsql) (void);
-typedef void (*HPMHOOK_pre_npc_market_tosql) (struct npc_data **nd, unsigned short *index);
-typedef void (*HPMHOOK_post_npc_market_tosql) (struct npc_data *nd, unsigned short index);
-typedef void (*HPMHOOK_pre_npc_market_delfromsql) (struct npc_data **nd, unsigned short *index);
-typedef void (*HPMHOOK_post_npc_market_delfromsql) (struct npc_data *nd, unsigned short index);
-typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, unsigned short *index);
-typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, unsigned short index);
+typedef void (*HPMHOOK_pre_npc_market_tosql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_market_tosql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_market_delfromsql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_market_delfromsql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, int *index);
+typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, int index);
+typedef void (*HPMHOOK_pre_npc_barter_fromsql) (void);
+typedef void (*HPMHOOK_post_npc_barter_fromsql) (void);
+typedef void (*HPMHOOK_pre_npc_barter_tosql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_barter_tosql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_barter_delfromsql) (struct npc_data **nd, int *index);
+typedef void (*HPMHOOK_post_npc_barter_delfromsql) (struct npc_data *nd, int index);
+typedef void (*HPMHOOK_pre_npc_barter_delfromsql_sub) (const char **npcname, int *itemId, int *itemId2, int *amount2);
+typedef void (*HPMHOOK_post_npc_barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2);
typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id);
typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id);
typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd);
typedef void (*HPMHOOK_post_npc_refresh) (struct npc_data *nd);
+typedef void (*HPMHOOK_pre_npc_questinfo_clear) (struct npc_data **nd);
+typedef void (*HPMHOOK_post_npc_questinfo_clear) (struct npc_data *nd);
typedef int (*HPMHOOK_pre_npc_secure_timeout_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
#endif // MAP_NPC_H
@@ -5848,8 +5982,8 @@ typedef int (*HPMHOOK_pre_pc_setrestartvalue) (struct map_session_data **sd, int
typedef int (*HPMHOOK_post_pc_setrestartvalue) (int retVal___, struct map_session_data *sd, int type);
typedef int (*HPMHOOK_pre_pc_makesavestatus) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_makesavestatus) (int retVal___, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_pc_respawn) (struct map_session_data **sd, clr_type *clrtype);
-typedef void (*HPMHOOK_post_pc_respawn) (struct map_session_data *sd, clr_type clrtype);
+typedef void (*HPMHOOK_pre_pc_respawn) (struct map_session_data **sd, enum clr_type *clrtype);
+typedef void (*HPMHOOK_post_pc_respawn) (struct map_session_data *sd, enum clr_type clrtype);
typedef int (*HPMHOOK_pre_pc_setnewpc) (struct map_session_data **sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd);
typedef int (*HPMHOOK_post_pc_setnewpc) (int retVal___, struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd);
typedef bool (*HPMHOOK_pre_pc_authok) (struct map_session_data **sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus **st, bool *changing_mapservers);
@@ -5884,12 +6018,12 @@ typedef int (*HPMHOOK_pre_pc_calc_skilltree_normalize_job) (struct map_session_d
typedef int (*HPMHOOK_post_pc_calc_skilltree_normalize_job) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_clean_skilltree) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_clean_skilltree) (int retVal___, struct map_session_data *sd);
-typedef int (*HPMHOOK_pre_pc_setpos) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype);
-typedef int (*HPMHOOK_post_pc_setpos) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype);
+typedef int (*HPMHOOK_pre_pc_setpos) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, enum clr_type *clrtype);
+typedef int (*HPMHOOK_post_pc_setpos) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype);
typedef int (*HPMHOOK_pre_pc_setsavepoint) (struct map_session_data **sd, short *map_index, int *x, int *y);
typedef int (*HPMHOOK_post_pc_setsavepoint) (int retVal___, struct map_session_data *sd, short map_index, int x, int y);
-typedef int (*HPMHOOK_pre_pc_randomwarp) (struct map_session_data **sd, clr_type *type);
-typedef int (*HPMHOOK_post_pc_randomwarp) (int retVal___, struct map_session_data *sd, clr_type type);
+typedef int (*HPMHOOK_pre_pc_randomwarp) (struct map_session_data **sd, enum clr_type *type);
+typedef int (*HPMHOOK_post_pc_randomwarp) (int retVal___, struct map_session_data *sd, enum clr_type type);
typedef int (*HPMHOOK_pre_pc_memo) (struct map_session_data **sd, int *pos);
typedef int (*HPMHOOK_post_pc_memo) (int retVal___, struct map_session_data *sd, int pos);
typedef int (*HPMHOOK_pre_pc_checkadditem) (struct map_session_data **sd, int *nameid, int *amount);
@@ -6120,10 +6254,10 @@ typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item);
typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item);
-typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int16 *class);
-typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int16 class);
-typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned short *class_, int *sex);
-typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned short class_, int sex);
+typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int *class);
+typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int class);
+typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned int *class_, int *sex);
+typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned int class_, int sex);
typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class);
typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class);
typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val);
@@ -6206,8 +6340,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff) (struct s_addeffect **effect, int *ma
typedef int (*HPMHOOK_post_pc_bonus_addeff) (int retVal___, struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration);
typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill **effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target);
typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target);
-typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate);
-typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
+typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate);
+typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate);
typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src);
typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src);
typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
@@ -6302,6 +6436,8 @@ typedef bool (*HPMHOOK_pre_pc_isDeathPenaltyJob) (uint16 *job);
typedef bool (*HPMHOOK_post_pc_isDeathPenaltyJob) (bool retVal___, uint16 job);
typedef bool (*HPMHOOK_pre_pc_has_second_costume) (struct map_session_data **sd);
typedef bool (*HPMHOOK_post_pc_has_second_costume) (bool retVal___, struct map_session_data *sd);
+typedef bool (*HPMHOOK_pre_pc_expandInventory) (struct map_session_data **sd, int *adjustSize);
+typedef bool (*HPMHOOK_post_pc_expandInventory) (bool retVal___, struct map_session_data *sd, int adjustSize);
#endif // MAP_PC_H
#ifdef MAP_NPC_H /* libpcre */
typedef pcre* (*HPMHOOK_pre_libpcre_compile) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr);
@@ -6362,8 +6498,8 @@ typedef int (*HPMHOOK_pre_pet_catch_process1) (struct map_session_data **sd, int
typedef int (*HPMHOOK_post_pet_catch_process1) (int retVal___, struct map_session_data *sd, int target_class);
typedef int (*HPMHOOK_pre_pet_catch_process2) (struct map_session_data **sd, int *target_id);
typedef int (*HPMHOOK_post_pet_catch_process2) (int retVal___, struct map_session_data *sd, int target_id);
-typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, short *pet_class, int *pet_id);
-typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, short pet_class, int pet_id);
+typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, int *pet_class, int *pet_id);
+typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, int pet_class, int pet_id);
typedef int (*HPMHOOK_pre_pet_unequipitem) (struct map_session_data **sd, struct pet_data **pd);
typedef int (*HPMHOOK_post_pet_unequipitem) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
typedef int (*HPMHOOK_pre_pet_food) (struct map_session_data **sd, struct pet_data **pd);
@@ -6498,9 +6634,41 @@ typedef bool (*HPMHOOK_pre_quest_questinfo_validate_quests) (struct map_session_
typedef bool (*HPMHOOK_post_quest_questinfo_validate_quests) (bool retVal___, struct map_session_data *sd, struct questinfo *qi);
typedef bool (*HPMHOOK_pre_quest_questinfo_validate_mercenary_class) (struct map_session_data **sd, struct questinfo **qi);
typedef bool (*HPMHOOK_post_quest_questinfo_validate_mercenary_class) (bool retVal___, struct map_session_data *sd, struct questinfo *qi);
-typedef void (*HPMHOOK_pre_quest_questinfo_vector_clear) (int *m);
-typedef void (*HPMHOOK_post_quest_questinfo_vector_clear) (int m);
#endif // MAP_QUEST_H
+#ifdef MAP_REFINE_H /* refine */
+typedef int (*HPMHOOK_pre_refine_init) (bool *minimal);
+typedef int (*HPMHOOK_post_refine_init) (int retVal___, bool minimal);
+typedef void (*HPMHOOK_pre_refine_final) (void);
+typedef void (*HPMHOOK_post_refine_final) (void);
+typedef int (*HPMHOOK_pre_refine_get_refine_chance) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type);
+typedef int (*HPMHOOK_post_refine_get_refine_chance) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type);
+typedef int (*HPMHOOK_pre_refine_get_bonus) (enum refine_type *equipment_type, int *refine_level);
+typedef int (*HPMHOOK_post_refine_get_bonus) (int retVal___, enum refine_type equipment_type, int refine_level);
+typedef int (*HPMHOOK_pre_refine_get_randombonus_max) (enum refine_type *equipment_type, int *refine_level);
+typedef int (*HPMHOOK_post_refine_get_randombonus_max) (int retVal___, enum refine_type equipment_type, int refine_level);
+typedef void (*HPMHOOK_pre_refine_refinery_add_item) (struct map_session_data **sd, int *item_index);
+typedef void (*HPMHOOK_post_refine_refinery_add_item) (struct map_session_data *sd, int item_index);
+typedef void (*HPMHOOK_pre_refine_refinery_refine_request) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing);
+typedef void (*HPMHOOK_post_refine_refinery_refine_request) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing);
+#endif // MAP_REFINE_H
+#ifdef MAP_REFINE_P_H /* PRIV__refine */
+typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig_sub) (struct config_setting_t **r, const char **name, const char **source);
+typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig_sub) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
+typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig) (const char **filename);
+typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig) (int retVal___, const char *filename);
+typedef bool (*HPMHOOK_pre_PRIV__refine_announce_behavior_string2enum) (const char **str, unsigned int **result);
+typedef bool (*HPMHOOK_post_PRIV__refine_announce_behavior_string2enum) (bool retVal___, const char *str, unsigned int *result);
+typedef bool (*HPMHOOK_pre_PRIV__refine_failure_behavior_string2enum) (const char **str, enum refine_ui_failure_behavior **result);
+typedef bool (*HPMHOOK_post_PRIV__refine_failure_behavior_string2enum) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result);
+typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_items) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source);
+typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_items) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source);
+typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_sub) (const struct config_setting_t **elem, int *type, const char **name, const char **source);
+typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_sub) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source);
+typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings) (const struct config_setting_t **r, int *type, const char **name, const char **source);
+typedef int (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source);
+typedef bool (*HPMHOOK_pre_PRIV__refine_is_refinable) (struct map_session_data **sd, int *item_index);
+typedef bool (*HPMHOOK_post_PRIV__refine_is_refinable) (bool retVal___, struct map_session_data *sd, int item_index);
+#endif // MAP_REFINE_P_H
#ifdef COMMON_RANDOM_H /* rnd */
typedef void (*HPMHOOK_pre_rnd_init) (void);
typedef void (*HPMHOOK_post_rnd_init) (void);
@@ -6536,8 +6704,8 @@ typedef void (*HPMHOOK_pre_rodex_add_item) (struct map_session_data **sd, int16
typedef void (*HPMHOOK_post_rodex_add_item) (struct map_session_data *sd, int16 idx, int16 amount);
typedef void (*HPMHOOK_pre_rodex_remove_item) (struct map_session_data **sd, int16 *idx, int16 *amount);
typedef void (*HPMHOOK_post_rodex_remove_item) (struct map_session_data *sd, int16 idx, int16 amount);
-typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class);
-typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class);
+typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class);
+typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class);
typedef int (*HPMHOOK_pre_rodex_send_mail) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny);
typedef int (*HPMHOOK_post_rodex_send_mail) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny);
typedef void (*HPMHOOK_pre_rodex_send_mail_result) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result);
@@ -6554,6 +6722,10 @@ typedef void (*HPMHOOK_pre_rodex_delete_mail) (struct map_session_data **sd, int
typedef void (*HPMHOOK_post_rodex_delete_mail) (struct map_session_data *sd, int64 mail_id);
typedef void (*HPMHOOK_pre_rodex_clean) (struct map_session_data **sd, int8 *flag);
typedef void (*HPMHOOK_post_rodex_clean) (struct map_session_data *sd, int8 flag);
+typedef void (*HPMHOOK_pre_rodex_getZenyAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny);
+typedef void (*HPMHOOK_post_rodex_getZenyAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny);
+typedef void (*HPMHOOK_pre_rodex_getItemsAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items);
+typedef void (*HPMHOOK_post_rodex_getItemsAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items);
#endif // MAP_RODEX_H
#ifdef MAP_SCRIPT_H /* script */
typedef void (*HPMHOOK_pre_script_init) (bool *minimal);
@@ -6944,8 +7116,8 @@ typedef bool (*HPMHOOK_pre_searchstore_queryremote) (struct map_session_data **s
typedef bool (*HPMHOOK_post_searchstore_queryremote) (bool retVal___, struct map_session_data *sd, int account_id);
typedef void (*HPMHOOK_pre_searchstore_clearremote) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_searchstore_clearremote) (struct map_session_data *sd);
-typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine, const struct item_option **option);
-typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option);
+typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine_level, const struct item_option **option);
+typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option);
#endif // MAP_SEARCHSTORE_H
#ifdef COMMON_SHOWMSG_H /* showmsg */
typedef void (*HPMHOOK_pre_showmsg_init) (void);
@@ -7482,6 +7654,8 @@ typedef void (*HPMHOOK_pre_sockt_flush) (int *fd);
typedef void (*HPMHOOK_post_sockt_flush) (int fd);
typedef void (*HPMHOOK_pre_sockt_flush_fifos) (void);
typedef void (*HPMHOOK_post_sockt_flush_fifos) (void);
+typedef int (*HPMHOOK_pre_sockt_connect_client) (int *listen_fd);
+typedef int (*HPMHOOK_post_sockt_connect_client) (int retVal___, int listen_fd);
typedef void (*HPMHOOK_pre_sockt_set_nonblocking) (int *fd, unsigned long *yes);
typedef void (*HPMHOOK_post_sockt_set_nonblocking) (int fd, unsigned long yes);
typedef void (*HPMHOOK_pre_sockt_set_defaultparse) (ParseFunc *defaultparse);
@@ -7580,8 +7754,6 @@ typedef int (*HPMHOOK_pre_status_init) (bool *minimal);
typedef int (*HPMHOOK_post_status_init) (int retVal___, bool minimal);
typedef void (*HPMHOOK_pre_status_final) (void);
typedef void (*HPMHOOK_post_status_final) (void);
-typedef int (*HPMHOOK_pre_status_get_refine_chance) (enum refine_type *wlv, int *refine, enum refine_chance_type *type);
-typedef int (*HPMHOOK_post_status_get_refine_chance) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type);
typedef sc_type (*HPMHOOK_pre_status_skill2sc) (int *skill_id);
typedef sc_type (*HPMHOOK_post_status_skill2sc) (sc_type retVal___, int skill_id);
typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc);
@@ -7718,10 +7890,10 @@ typedef defType (*HPMHOOK_pre_status_calc_mdef) (struct block_list **bl, struct
typedef defType (*HPMHOOK_post_status_calc_mdef) (defType retVal___, struct block_list *bl, struct status_change *sc, int mdef, bool viewable);
typedef short (*HPMHOOK_pre_status_calc_mdef2) (struct block_list **bl, struct status_change **sc, int *mdef2, bool *viewable);
typedef short (*HPMHOOK_post_status_calc_mdef2) (short retVal___, struct block_list *bl, struct status_change *sc, int mdef2, bool viewable);
-typedef unsigned short (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable);
-typedef unsigned short (*HPMHOOK_post_status_calc_batk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable);
-typedef unsigned short (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level);
-typedef unsigned short (*HPMHOOK_post_status_base_matk) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int level);
+typedef int (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable);
+typedef int (*HPMHOOK_post_status_calc_batk) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable);
+typedef int (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level);
+typedef int (*HPMHOOK_post_status_base_matk) (int retVal___, struct block_list *bl, const struct status_data *st, int level);
typedef int (*HPMHOOK_pre_status_get_weapon_atk) (struct block_list **src, struct weapon_atk **watk, int *flag);
typedef int (*HPMHOOK_post_status_get_weapon_atk) (int retVal___, struct block_list *src, struct weapon_atk *watk, int flag);
typedef int (*HPMHOOK_pre_status_get_total_mdef) (struct block_list **src);
@@ -7740,8 +7912,8 @@ typedef void (*HPMHOOK_pre_status_initDummyData) (void);
typedef void (*HPMHOOK_post_status_initDummyData) (void);
typedef int (*HPMHOOK_pre_status_base_amotion_pc) (struct map_session_data **sd, struct status_data **st);
typedef int (*HPMHOOK_post_status_base_amotion_pc) (int retVal___, struct map_session_data *sd, struct status_data *st);
-typedef unsigned short (*HPMHOOK_pre_status_base_atk) (const struct block_list **bl, const struct status_data **st);
-typedef unsigned short (*HPMHOOK_post_status_base_atk) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st);
+typedef int (*HPMHOOK_pre_status_base_atk) (const struct block_list **bl, const struct status_data **st);
+typedef int (*HPMHOOK_post_status_base_atk) (int retVal___, const struct block_list *bl, const struct status_data *st);
typedef unsigned int (*HPMHOOK_pre_status_get_base_maxhp) (const struct map_session_data **sd, const struct status_data **st);
typedef unsigned int (*HPMHOOK_post_status_get_base_maxhp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st);
typedef unsigned int (*HPMHOOK_pre_status_get_base_maxsp) (const struct map_session_data **sd, const struct status_data **st);
@@ -7764,18 +7936,18 @@ typedef unsigned short (*HPMHOOK_pre_status_calc_dex) (struct block_list **bl, s
typedef unsigned short (*HPMHOOK_post_status_calc_dex) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int dex);
typedef unsigned short (*HPMHOOK_pre_status_calc_luk) (struct block_list **bl, struct status_change **sc, int *luk);
typedef unsigned short (*HPMHOOK_post_status_calc_luk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int luk);
-typedef unsigned short (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable);
-typedef unsigned short (*HPMHOOK_post_status_calc_watk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable);
-typedef unsigned short (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable);
-typedef unsigned short (*HPMHOOK_post_status_calc_matk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable);
-typedef signed short (*HPMHOOK_pre_status_calc_hit) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable);
-typedef signed short (*HPMHOOK_post_status_calc_hit) (signed short retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable);
-typedef signed short (*HPMHOOK_pre_status_calc_critical) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable);
-typedef signed short (*HPMHOOK_post_status_calc_critical) (signed short retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable);
-typedef signed short (*HPMHOOK_pre_status_calc_flee) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable);
-typedef signed short (*HPMHOOK_post_status_calc_flee) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable);
-typedef signed short (*HPMHOOK_pre_status_calc_flee2) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable);
-typedef signed short (*HPMHOOK_post_status_calc_flee2) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable);
+typedef int (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable);
+typedef int (*HPMHOOK_post_status_calc_watk) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable);
+typedef int (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable);
+typedef int (*HPMHOOK_post_status_calc_matk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable);
+typedef signed int (*HPMHOOK_pre_status_calc_hit) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable);
+typedef signed int (*HPMHOOK_post_status_calc_hit) (signed int retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable);
+typedef signed int (*HPMHOOK_pre_status_calc_critical) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable);
+typedef signed int (*HPMHOOK_post_status_calc_critical) (signed int retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable);
+typedef signed int (*HPMHOOK_pre_status_calc_flee) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable);
+typedef signed int (*HPMHOOK_post_status_calc_flee) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable);
+typedef signed int (*HPMHOOK_pre_status_calc_flee2) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable);
+typedef signed int (*HPMHOOK_post_status_calc_flee2) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable);
typedef unsigned short (*HPMHOOK_pre_status_calc_speed) (struct block_list **bl, struct status_change **sc, int *speed);
typedef unsigned short (*HPMHOOK_post_status_calc_speed) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int speed);
typedef short (*HPMHOOK_pre_status_calc_aspd_rate) (struct block_list **bl, struct status_change **sc, int *aspd_rate);
@@ -7796,8 +7968,8 @@ typedef unsigned char (*HPMHOOK_pre_status_calc_element_lv) (struct block_list *
typedef unsigned char (*HPMHOOK_post_status_calc_element_lv) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int lv);
typedef uint32 (*HPMHOOK_pre_status_calc_mode) (const struct block_list **bl, const struct status_change **sc, uint32 *mode);
typedef uint32 (*HPMHOOK_post_status_calc_mode) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 mode);
-typedef unsigned short (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk);
-typedef unsigned short (*HPMHOOK_post_status_calc_ematk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk);
+typedef int (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk);
+typedef int (*HPMHOOK_post_status_calc_ematk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk);
typedef void (*HPMHOOK_pre_status_calc_bl_main) (struct block_list **bl, int *flag);
typedef void (*HPMHOOK_post_status_calc_bl_main) (struct block_list *bl, int flag);
typedef void (*HPMHOOK_pre_status_display_add) (struct map_session_data **sd, enum sc_type *type, int *dval1, int *dval2, int *dval3);
@@ -7812,10 +7984,6 @@ typedef bool (*HPMHOOK_pre_status_readdb_job2) (char **fields[], int *columns, i
typedef bool (*HPMHOOK_post_status_readdb_job2) (bool retVal___, char *fields[], int columns, int current);
typedef bool (*HPMHOOK_pre_status_readdb_sizefix) (char **fields[], int *columns, int *current);
typedef bool (*HPMHOOK_post_status_readdb_sizefix) (bool retVal___, char *fields[], int columns, int current);
-typedef int (*HPMHOOK_pre_status_readdb_refine_libconfig) (const char **filename);
-typedef int (*HPMHOOK_post_status_readdb_refine_libconfig) (int retVal___, const char *filename);
-typedef int (*HPMHOOK_pre_status_readdb_refine_libconfig_sub) (struct config_setting_t **r, const char **name, const char **source);
-typedef int (*HPMHOOK_post_status_readdb_refine_libconfig_sub) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
typedef bool (*HPMHOOK_pre_status_readdb_scconfig) (char **fields[], int *columns, int *current);
typedef bool (*HPMHOOK_post_status_readdb_scconfig) (bool retVal___, char *fields[], int columns, int current);
typedef void (*HPMHOOK_pre_status_read_job_db) (void);
@@ -7826,10 +7994,10 @@ typedef void (*HPMHOOK_pre_status_set_sc) (uint16 *skill_id, sc_type *sc, int *i
typedef void (*HPMHOOK_post_status_set_sc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag);
typedef void (*HPMHOOK_pre_status_copy) (struct status_data **a, const struct status_data **b);
typedef void (*HPMHOOK_post_status_copy) (struct status_data *a, const struct status_data *b);
-typedef unsigned short (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st);
-typedef unsigned short (*HPMHOOK_post_status_base_matk_min) (unsigned short retVal___, const struct status_data *st);
-typedef unsigned short (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st);
-typedef unsigned short (*HPMHOOK_post_status_base_matk_max) (unsigned short retVal___, const struct status_data *st);
+typedef int (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st);
+typedef int (*HPMHOOK_post_status_base_matk_min) (int retVal___, const struct status_data *st);
+typedef int (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st);
+typedef int (*HPMHOOK_post_status_base_matk_max) (int retVal___, const struct status_data *st);
#endif // MAP_STATUS_H
#ifdef MAP_STORAGE_H /* storage */
typedef void (*HPMHOOK_pre_storage_reconnect) (void);
@@ -7913,6 +8081,26 @@ typedef int (*HPMHOOK_post_strlib_strline_) (int retVal___, const char *str, siz
typedef bool (*HPMHOOK_pre_strlib_bin2hex_) (char **output, const unsigned char **input, size_t *count);
typedef bool (*HPMHOOK_post_strlib_bin2hex_) (bool retVal___, char *output, const unsigned char *input, size_t count);
#endif // COMMON_STRLIB_H
+#ifdef MAP_STYLIST_H /* stylist */
+typedef void (*HPMHOOK_pre_stylist_init) (bool *minimal);
+typedef void (*HPMHOOK_post_stylist_init) (bool minimal);
+typedef void (*HPMHOOK_pre_stylist_final) (void);
+typedef void (*HPMHOOK_post_stylist_final) (void);
+typedef void (*HPMHOOK_pre_stylist_vector_init) (void);
+typedef void (*HPMHOOK_post_stylist_vector_init) (void);
+typedef void (*HPMHOOK_pre_stylist_vector_clear) (void);
+typedef void (*HPMHOOK_post_stylist_vector_clear) (void);
+typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig) (void);
+typedef bool (*HPMHOOK_post_stylist_read_db_libconfig) (bool retVal___);
+typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source);
+typedef bool (*HPMHOOK_post_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
+typedef void (*HPMHOOK_pre_stylist_request_style_change) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
+typedef void (*HPMHOOK_post_stylist_request_style_change) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+typedef bool (*HPMHOOK_pre_stylist_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx);
+typedef bool (*HPMHOOK_post_stylist_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
+typedef void (*HPMHOOK_pre_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid);
+typedef void (*HPMHOOK_post_stylist_send_rodexitem) (struct map_session_data *sd, int itemid);
+#endif // MAP_STYLIST_H
#ifdef COMMON_STRLIB_H /* sv */
typedef int (*HPMHOOK_pre_sv_parse_next) (struct s_svstate **svstate);
typedef int (*HPMHOOK_post_sv_parse_next) (int retVal___, struct s_svstate *svstate);
@@ -8078,8 +8266,8 @@ typedef uint8 (*HPMHOOK_pre_unit_getdir) (struct block_list **bl);
typedef uint8 (*HPMHOOK_post_unit_getdir) (uint8 retVal___, struct block_list *bl);
typedef int (*HPMHOOK_pre_unit_blown) (struct block_list **bl, int *dx, int *dy, int *count, int *flag);
typedef int (*HPMHOOK_post_unit_blown) (int retVal___, struct block_list *bl, int dx, int dy, int count, int flag);
-typedef int (*HPMHOOK_pre_unit_warp) (struct block_list **bl, short *m, short *x, short *y, clr_type *type);
-typedef int (*HPMHOOK_post_unit_warp) (int retVal___, struct block_list *bl, short m, short x, short y, clr_type type);
+typedef int (*HPMHOOK_pre_unit_warp) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type);
+typedef int (*HPMHOOK_post_unit_warp) (int retVal___, struct block_list *bl, short m, short x, short y, enum clr_type type);
typedef int (*HPMHOOK_pre_unit_stop_walking) (struct block_list **bl, int *type);
typedef int (*HPMHOOK_post_unit_stop_walking) (int retVal___, struct block_list *bl, int type);
typedef int (*HPMHOOK_pre_unit_skilluse_id) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv);
@@ -8130,14 +8318,14 @@ typedef int (*HPMHOOK_pre_unit_fixdamage) (struct block_list **src, struct block
typedef int (*HPMHOOK_post_unit_fixdamage) (int retVal___, struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2);
typedef int (*HPMHOOK_pre_unit_changeviewsize) (struct block_list **bl, short *size);
typedef int (*HPMHOOK_post_unit_changeviewsize) (int retVal___, struct block_list *bl, short size);
-typedef int (*HPMHOOK_pre_unit_remove_map) (struct block_list **bl, clr_type *clrtype, const char **file, int *line, const char **func);
-typedef int (*HPMHOOK_post_unit_remove_map) (int retVal___, struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func);
-typedef void (*HPMHOOK_pre_unit_remove_map_pc) (struct map_session_data **sd, clr_type *clrtype);
-typedef void (*HPMHOOK_post_unit_remove_map_pc) (struct map_session_data *sd, clr_type clrtype);
+typedef int (*HPMHOOK_pre_unit_remove_map) (struct block_list **bl, enum clr_type *clrtype, const char **file, int *line, const char **func);
+typedef int (*HPMHOOK_post_unit_remove_map) (int retVal___, struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func);
+typedef void (*HPMHOOK_pre_unit_remove_map_pc) (struct map_session_data **sd, enum clr_type *clrtype);
+typedef void (*HPMHOOK_post_unit_remove_map_pc) (struct map_session_data *sd, enum clr_type clrtype);
typedef void (*HPMHOOK_pre_unit_free_pc) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_unit_free_pc) (struct map_session_data *sd);
-typedef int (*HPMHOOK_pre_unit_free) (struct block_list **bl, clr_type *clrtype);
-typedef int (*HPMHOOK_post_unit_free) (int retVal___, struct block_list *bl, clr_type clrtype);
+typedef int (*HPMHOOK_pre_unit_free) (struct block_list **bl, enum clr_type *clrtype);
+typedef int (*HPMHOOK_post_unit_free) (int retVal___, struct block_list *bl, enum clr_type clrtype);
#endif // MAP_UNIT_H
#ifdef MAP_VENDING_H /* vending */
typedef void (*HPMHOOK_pre_vending_init) (bool *minimal);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index d5babae97..9302a8d19 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -90,8 +90,10 @@ struct {
struct HPMHookPoint *HP_chr_count_users_post;
struct HPMHookPoint *HP_chr_mmo_char_tobuf_pre;
struct HPMHookPoint *HP_chr_mmo_char_tobuf_post;
- struct HPMHookPoint *HP_chr_mmo_char_send099d_pre;
- struct HPMHookPoint *HP_chr_mmo_char_send099d_post;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post;
struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_pre;
struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_post;
struct HPMHookPoint *HP_chr_mmo_char_send_slots_info_pre;
@@ -762,6 +764,10 @@ struct {
struct HPMHookPoint *HP_inter_rodex_savemessage_post;
struct HPMHookPoint *HP_inter_rodex_updatemail_pre;
struct HPMHookPoint *HP_inter_rodex_updatemail_post;
+ struct HPMHookPoint *HP_inter_rodex_getzeny_pre;
+ struct HPMHookPoint *HP_inter_rodex_getzeny_post;
+ struct HPMHookPoint *HP_inter_rodex_getitems_pre;
+ struct HPMHookPoint *HP_inter_rodex_getitems_post;
struct HPMHookPoint *HP_inter_storage_tosql_pre;
struct HPMHookPoint *HP_inter_storage_tosql_post;
struct HPMHookPoint *HP_inter_storage_fromsql_pre;
@@ -1222,6 +1228,10 @@ struct {
struct HPMHookPoint *HP_mapif_parse_rodex_checkname_post;
struct HPMHookPoint *HP_mapif_rodex_checkname_pre;
struct HPMHookPoint *HP_mapif_rodex_checkname_post;
+ struct HPMHookPoint *HP_mapif_rodex_getzenyack_pre;
+ struct HPMHookPoint *HP_mapif_rodex_getzenyack_post;
+ struct HPMHookPoint *HP_mapif_rodex_getitemsack_pre;
+ struct HPMHookPoint *HP_mapif_rodex_getitemsack_post;
struct HPMHookPoint *HP_mapif_load_guild_storage_pre;
struct HPMHookPoint *HP_mapif_load_guild_storage_post;
struct HPMHookPoint *HP_mapif_save_guild_storage_ack_pre;
@@ -1420,6 +1430,8 @@ struct {
struct HPMHookPoint *HP_sockt_flush_post;
struct HPMHookPoint *HP_sockt_flush_fifos_pre;
struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_connect_client_pre;
+ struct HPMHookPoint *HP_sockt_connect_client_post;
struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
struct HPMHookPoint *HP_sockt_set_nonblocking_post;
struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
@@ -1725,8 +1737,10 @@ struct {
int HP_chr_count_users_post;
int HP_chr_mmo_char_tobuf_pre;
int HP_chr_mmo_char_tobuf_post;
- int HP_chr_mmo_char_send099d_pre;
- int HP_chr_mmo_char_send099d_post;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post;
int HP_chr_mmo_char_send_ban_list_pre;
int HP_chr_mmo_char_send_ban_list_post;
int HP_chr_mmo_char_send_slots_info_pre;
@@ -2397,6 +2411,10 @@ struct {
int HP_inter_rodex_savemessage_post;
int HP_inter_rodex_updatemail_pre;
int HP_inter_rodex_updatemail_post;
+ int HP_inter_rodex_getzeny_pre;
+ int HP_inter_rodex_getzeny_post;
+ int HP_inter_rodex_getitems_pre;
+ int HP_inter_rodex_getitems_post;
int HP_inter_storage_tosql_pre;
int HP_inter_storage_tosql_post;
int HP_inter_storage_fromsql_pre;
@@ -2857,6 +2875,10 @@ struct {
int HP_mapif_parse_rodex_checkname_post;
int HP_mapif_rodex_checkname_pre;
int HP_mapif_rodex_checkname_post;
+ int HP_mapif_rodex_getzenyack_pre;
+ int HP_mapif_rodex_getzenyack_post;
+ int HP_mapif_rodex_getitemsack_pre;
+ int HP_mapif_rodex_getitemsack_post;
int HP_mapif_load_guild_storage_pre;
int HP_mapif_load_guild_storage_post;
int HP_mapif_save_guild_storage_ack_pre;
@@ -3055,6 +3077,8 @@ struct {
int HP_sockt_flush_post;
int HP_sockt_flush_fifos_pre;
int HP_sockt_flush_fifos_post;
+ int HP_sockt_connect_client_pre;
+ int HP_sockt_connect_client_post;
int HP_sockt_set_nonblocking_pre;
int HP_sockt_set_nonblocking_post;
int HP_sockt_set_defaultparse_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 55f2df4ce..60162c1a8 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -60,7 +60,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chr->divorce_char_sql, HP_chr_divorce_char_sql) },
{ HP_POP(chr->count_users, HP_chr_count_users) },
{ HP_POP(chr->mmo_char_tobuf, HP_chr_mmo_char_tobuf) },
- { HP_POP(chr->mmo_char_send099d, HP_chr_mmo_char_send099d) },
+ { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE) },
+ { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE_tail, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) },
{ HP_POP(chr->mmo_char_send_ban_list, HP_chr_mmo_char_send_ban_list) },
{ HP_POP(chr->mmo_char_send_slots_info, HP_chr_mmo_char_send_slots_info) },
{ HP_POP(chr->mmo_char_send_characters, HP_chr_mmo_char_send_characters) },
@@ -415,6 +416,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter_rodex->checkname, HP_inter_rodex_checkname) },
{ HP_POP(inter_rodex->savemessage, HP_inter_rodex_savemessage) },
{ HP_POP(inter_rodex->updatemail, HP_inter_rodex_updatemail) },
+ { HP_POP(inter_rodex->getzeny, HP_inter_rodex_getzeny) },
+ { HP_POP(inter_rodex->getitems, HP_inter_rodex_getitems) },
/* inter_storage_interface */
{ HP_POP(inter_storage->tosql, HP_inter_storage_tosql) },
{ HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) },
@@ -649,6 +652,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->rodex_send, HP_mapif_rodex_send) },
{ HP_POP(mapif->parse_rodex_checkname, HP_mapif_parse_rodex_checkname) },
{ HP_POP(mapif->rodex_checkname, HP_mapif_rodex_checkname) },
+ { HP_POP(mapif->rodex_getzenyack, HP_mapif_rodex_getzenyack) },
+ { HP_POP(mapif->rodex_getitemsack, HP_mapif_rodex_getitemsack) },
{ HP_POP(mapif->load_guild_storage, HP_mapif_load_guild_storage) },
{ HP_POP(mapif->save_guild_storage_ack, HP_mapif_save_guild_storage_ack) },
{ HP_POP(mapif->parse_LoadGuildStorage, HP_mapif_parse_LoadGuildStorage) },
@@ -757,6 +762,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
{ HP_POP(sockt->flush, HP_sockt_flush) },
{ HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->connect_client, HP_sockt_connect_client) },
{ HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
{ HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
{ HP_POP(sockt->host2ip, HP_sockt_host2ip) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 5f20fd224..2b7e25e5d 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -609,15 +609,15 @@ int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_chars
}
return retVal___;
}
-int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) {
+int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf, int *count) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_chr_mmo_chars_fromsql_pre > 0) {
- int (*preHookFunc) (struct char_session_data **sd, uint8 **buf);
+ int (*preHookFunc) (struct char_session_data **sd, uint8 **buf, int **count);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &buf);
+ retVal___ = preHookFunc(&sd, &buf, &count);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -625,13 +625,13 @@ int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) {
}
}
{
- retVal___ = HPMHooks.source.chr.mmo_chars_fromsql(sd, buf);
+ retVal___ = HPMHooks.source.chr.mmo_chars_fromsql(sd, buf, count);
}
if (HPMHooks.count.HP_chr_mmo_chars_fromsql_post > 0) {
- int (*postHookFunc) (int retVal___, struct char_session_data *sd, uint8 *buf);
+ int (*postHookFunc) (int retVal___, struct char_session_data *sd, uint8 *buf, int *count);
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, buf);
+ retVal___ = postHookFunc(retVal___, sd, buf, count);
}
}
return retVal___;
@@ -798,11 +798,11 @@ int HP_chr_check_char_name(const char *name, const char *esc_name) {
}
return retVal___;
}
-int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex) {
+int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_chr_make_new_char_sql_pre > 0) {
- int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex);
+ int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func;
@@ -817,7 +817,7 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, in
retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex);
}
if (HPMHooks.count.HP_chr_make_new_char_sql_post > 0) {
- int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex);
+ int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex);
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex);
@@ -906,13 +906,13 @@ int HP_chr_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p) {
}
return retVal___;
}
-void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) {
+void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data *sd) {
int hIndex = 0;
- if (HPMHooks.count.HP_chr_mmo_char_send099d_pre > 0) {
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre > 0) {
void (*preHookFunc) (int *fd, struct char_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre[hIndex].func;
preHookFunc(&fd, &sd);
}
if (*HPMforce_return) {
@@ -921,12 +921,38 @@ void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) {
}
}
{
- HPMHooks.source.chr.mmo_char_send099d(fd, sd);
+ HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE(fd, sd);
}
- if (HPMHooks.count.HP_chr_mmo_char_send099d_post > 0) {
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post > 0) {
void (*postHookFunc) (int fd, struct char_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre > 0) {
+ void (*preHookFunc) (int *fd, struct char_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd);
+ }
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post > 0) {
+ void (*postHookFunc) (int fd, struct char_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post[hIndex].func;
postHookFunc(fd, sd);
}
}
@@ -7005,11 +7031,11 @@ bool HP_inter_guild_leave(int guild_id, int account_id, int char_id, int flag, c
}
return retVal___;
}
-bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int16 class) {
+bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_inter_guild_update_member_info_short_pre > 0) {
- bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
+ bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_pre[hIndex].func;
@@ -7024,7 +7050,7 @@ bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int c
retVal___ = HPMHooks.source.inter_guild.update_member_info_short(guild_id, account_id, char_id, online, lv, class);
}
if (HPMHooks.count.HP_inter_guild_update_member_info_short_post > 0) {
- bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_post[hIndex].func;
retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class);
@@ -9472,11 +9498,11 @@ int HP_inter_pet_parse_frommap(int fd) {
}
return retVal___;
}
-struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) {
+struct s_pet* HP_inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) {
int hIndex = 0;
struct s_pet* retVal___ = NULL;
if (HPMHooks.count.HP_inter_pet_create_pre > 0) {
- struct s_pet* (*preHookFunc) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
+ struct s_pet* (*preHookFunc) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_pet_create_pre[hIndex].func;
@@ -9491,7 +9517,7 @@ struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class,
retVal___ = HPMHooks.source.inter_pet.create(account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
}
if (HPMHooks.count.HP_inter_pet_create_post > 0) {
- struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
+ struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_pet_create_post[hIndex].func;
retVal___ = postHookFunc(retVal___, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
@@ -9824,11 +9850,11 @@ bool HP_inter_rodex_hasnew(int char_id, int account_id) {
}
return retVal___;
}
-bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level) {
+bool HP_inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_inter_rodex_checkname_pre > 0) {
- bool (*preHookFunc) (const char **name, int **target_char_id, short **target_class, int **target_level);
+ bool (*preHookFunc) (const char **name, int **target_char_id, int **target_class, int **target_level);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_rodex_checkname_pre[hIndex].func;
@@ -9843,7 +9869,7 @@ bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *targ
retVal___ = HPMHooks.source.inter_rodex.checkname(name, target_char_id, target_class, target_level);
}
if (HPMHooks.count.HP_inter_rodex_checkname_post > 0) {
- bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level);
+ bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_rodex_checkname_post[hIndex].func;
retVal___ = postHookFunc(retVal___, name, target_char_id, target_class, target_level);
@@ -9878,15 +9904,15 @@ int64 HP_inter_rodex_savemessage(struct rodex_message *msg) {
}
return retVal___;
}
-bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) {
+bool HP_inter_rodex_updatemail(int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_inter_rodex_updatemail_pre > 0) {
- bool (*preHookFunc) (int64 *mail_id, int8 *flag);
+ bool (*preHookFunc) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_pre[hIndex].func;
- retVal___ = preHookFunc(&mail_id, &flag);
+ retVal___ = preHookFunc(&fd, &account_id, &char_id, &mail_id, &opentype, &flag);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -9894,13 +9920,67 @@ bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) {
}
}
{
- retVal___ = HPMHooks.source.inter_rodex.updatemail(mail_id, flag);
+ retVal___ = HPMHooks.source.inter_rodex.updatemail(fd, account_id, char_id, mail_id, opentype, flag);
}
if (HPMHooks.count.HP_inter_rodex_updatemail_post > 0) {
- bool (*postHookFunc) (bool retVal___, int64 mail_id, int8 flag);
+ bool (*postHookFunc) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mail_id, flag);
+ retVal___ = postHookFunc(retVal___, fd, account_id, char_id, mail_id, opentype, flag);
+ }
+ }
+ return retVal___;
+}
+int64 HP_inter_rodex_getzeny(int64 mail_id) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if (HPMHooks.count.HP_inter_rodex_getzeny_pre > 0) {
+ int64 (*preHookFunc) (int64 *mail_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_pre[hIndex].func;
+ retVal___ = preHookFunc(&mail_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_rodex.getzeny(mail_id);
+ }
+ if (HPMHooks.count.HP_inter_rodex_getzeny_post > 0) {
+ int64 (*postHookFunc) (int64 retVal___, int64 mail_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mail_id);
+ }
+ }
+ return retVal___;
+}
+int HP_inter_rodex_getitems(int64 mail_id, struct rodex_item *items) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_inter_rodex_getitems_pre > 0) {
+ int (*preHookFunc) (int64 *mail_id, struct rodex_item **items);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_rodex_getitems_pre[hIndex].func;
+ retVal___ = preHookFunc(&mail_id, &items);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_rodex.getitems(mail_id, items);
+ }
+ if (HPMHooks.count.HP_inter_rodex_getitems_post > 0) {
+ int (*postHookFunc) (int retVal___, int64 mail_id, struct rodex_item *items);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_rodex_getitems_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mail_id, items);
}
}
return retVal___;
@@ -13796,11 +13876,11 @@ int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id,
}
return retVal___;
}
-int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) {
+int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre > 0) {
- int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
+ int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_pre[hIndex].func;
@@ -13815,7 +13895,7 @@ int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_
retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class);
}
if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post > 0) {
- int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_post[hIndex].func;
retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class);
@@ -15995,10 +16075,10 @@ void HP_mapif_parse_rodex_checkname(int fd) {
}
return;
}
-void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) {
+void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name) {
int hIndex = 0;
if (HPMHooks.count.HP_mapif_rodex_checkname_pre > 0) {
- void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name);
+ void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_pre[hIndex].func;
@@ -16013,7 +16093,7 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short
HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name);
}
if (HPMHooks.count.HP_mapif_rodex_checkname_post > 0) {
- void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name);
+ void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_post[hIndex].func;
postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, name);
@@ -16021,6 +16101,58 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short
}
return;
}
+void HP_mapif_rodex_getzenyack(int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_rodex_getzenyack_pre > 0) {
+ void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_pre[hIndex].func;
+ preHookFunc(&fd, &char_id, &mail_id, &opentype, &zeny);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.rodex_getzenyack(fd, char_id, mail_id, opentype, zeny);
+ }
+ if (HPMHooks.count.HP_mapif_rodex_getzenyack_post > 0) {
+ void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_post[hIndex].func;
+ postHookFunc(fd, char_id, mail_id, opentype, zeny);
+ }
+ }
+ return;
+}
+void HP_mapif_rodex_getitemsack(int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_rodex_getitemsack_pre > 0) {
+ void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_pre[hIndex].func;
+ preHookFunc(&fd, &char_id, &mail_id, &opentype, &count, &items);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.rodex_getitemsack(fd, char_id, mail_id, opentype, count, items);
+ }
+ if (HPMHooks.count.HP_mapif_rodex_getitemsack_post > 0) {
+ void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_post[hIndex].func;
+ postHookFunc(fd, char_id, mail_id, opentype, count, items);
+ }
+ }
+ return;
+}
int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) {
int hIndex = 0;
int retVal___ = 0;
@@ -18660,6 +18792,33 @@ void HP_sockt_flush_fifos(void) {
}
return;
}
+int HP_sockt_connect_client(int listen_fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_sockt_connect_client_pre > 0) {
+ int (*preHookFunc) (int *listen_fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&listen_fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.connect_client(listen_fd);
+ }
+ if (HPMHooks.count.HP_sockt_connect_client_post > 0) {
+ int (*postHookFunc) (int retVal___, int listen_fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, listen_fd);
+ }
+ }
+ return retVal___;
+}
void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
int hIndex = 0;
if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) {
diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
index 7fb575afe..973f8aff3 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index 35dea3ce7..ba0fe05c2 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -204,6 +204,10 @@ struct {
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_post;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_pre;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_post;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_pre;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_post;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre;
@@ -436,6 +440,8 @@ struct {
struct HPMHookPoint *HP_login_client_login_post;
struct HPMHookPoint *HP_login_client_login_otp_pre;
struct HPMHookPoint *HP_login_client_login_otp_post;
+ struct HPMHookPoint *HP_login_client_login_mobile_otp_request_pre;
+ struct HPMHookPoint *HP_login_client_login_mobile_otp_request_post;
struct HPMHookPoint *HP_login_char_server_connection_status_pre;
struct HPMHookPoint *HP_login_char_server_connection_status_post;
struct HPMHookPoint *HP_login_parse_request_connection_pre;
@@ -578,6 +584,8 @@ struct {
struct HPMHookPoint *HP_sockt_flush_post;
struct HPMHookPoint *HP_sockt_flush_fifos_pre;
struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_connect_client_pre;
+ struct HPMHookPoint *HP_sockt_connect_client_post;
struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
struct HPMHookPoint *HP_sockt_set_nonblocking_post;
struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
@@ -997,6 +1005,10 @@ struct {
int HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post;
int HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre;
int HP_PRIV__lclif_parse_CA_LOGIN_OTP_post;
+ int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre;
+ int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post;
+ int HP_PRIV__lclif_parse_CA_OTP_CODE_pre;
+ int HP_PRIV__lclif_parse_CA_OTP_CODE_post;
int HP_PRIV__lclif_parse_CA_REQ_HASH_pre;
int HP_PRIV__lclif_parse_CA_REQ_HASH_post;
int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre;
@@ -1229,6 +1241,8 @@ struct {
int HP_login_client_login_post;
int HP_login_client_login_otp_pre;
int HP_login_client_login_otp_post;
+ int HP_login_client_login_mobile_otp_request_pre;
+ int HP_login_client_login_mobile_otp_request_post;
int HP_login_char_server_connection_status_pre;
int HP_login_char_server_connection_status_post;
int HP_login_parse_request_connection_pre;
@@ -1371,6 +1385,8 @@ struct {
int HP_sockt_flush_post;
int HP_sockt_flush_fifos_pre;
int HP_sockt_flush_fifos_post;
+ int HP_sockt_connect_client_pre;
+ int HP_sockt_connect_client_post;
int HP_sockt_set_nonblocking_pre;
int HP_sockt_set_nonblocking_post;
int HP_sockt_set_defaultparse_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index b03162550..1e3548621 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -126,6 +126,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(lclif->p->parse_CA_LOGIN_HAN, HP_PRIV__lclif_parse_CA_LOGIN_HAN) },
{ HP_POP(lclif->p->parse_CA_SSO_LOGIN_REQ, HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) },
{ HP_POP(lclif->p->parse_CA_LOGIN_OTP, HP_PRIV__lclif_parse_CA_LOGIN_OTP) },
+ { HP_POP(lclif->p->parse_CA_ACK_MOBILE_OTP, HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) },
+ { HP_POP(lclif->p->parse_CA_OTP_CODE, HP_PRIV__lclif_parse_CA_OTP_CODE) },
{ HP_POP(lclif->p->parse_CA_REQ_HASH, HP_PRIV__lclif_parse_CA_REQ_HASH) },
{ HP_POP(lclif->p->parse_CA_CHARSERVERCONNECT, HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT) },
/* libconfig_interface */
@@ -244,6 +246,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(login->auth_failed, HP_login_auth_failed) },
{ HP_POP(login->client_login, HP_login_client_login) },
{ HP_POP(login->client_login_otp, HP_login_client_login_otp) },
+ { HP_POP(login->client_login_mobile_otp_request, HP_login_client_login_mobile_otp_request) },
{ HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) },
{ HP_POP(login->parse_request_connection, HP_login_parse_request_connection) },
{ HP_POP(login->config_set_defaults, HP_login_config_set_defaults) },
@@ -323,6 +326,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
{ HP_POP(sockt->flush, HP_sockt_flush) },
{ HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->connect_client, HP_sockt_connect_client) },
{ HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
{ HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
{ HP_POP(sockt->host2ip, HP_sockt_host2ip) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index c4359a2ad..080fb75ff 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -2409,6 +2409,60 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_OTP(int fd, struct login_sess
}
return retVal___;
}
+enum parsefunc_rcode HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_session_data *sd) {
+ int hIndex = 0;
+ enum parsefunc_rcode retVal___ = PACKET_UNKNOWN;
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre > 0) {
+ enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_ACK_MOBILE_OTP(fd, sd);
+ }
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post > 0) {
+ enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fd, sd);
+ }
+ }
+ return retVal___;
+}
+enum parsefunc_rcode HP_PRIV__lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd) {
+ int hIndex = 0;
+ enum parsefunc_rcode retVal___ = PACKET_UNKNOWN;
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre > 0) {
+ enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_OTP_CODE(fd, sd);
+ }
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post > 0) {
+ enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fd, sd);
+ }
+ }
+ return retVal___;
+}
enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) {
int hIndex = 0;
enum parsefunc_rcode retVal___ = PACKET_UNKNOWN;
@@ -5521,6 +5575,32 @@ bool HP_login_client_login_otp(int fd, struct login_session_data *sd) {
}
return retVal___;
}
+void HP_login_client_login_mobile_otp_request(int fd, struct login_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_login_client_login_mobile_otp_request_pre > 0) {
+ void (*preHookFunc) (int *fd, struct login_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.login.client_login_mobile_otp_request(fd, sd);
+ }
+ if (HPMHooks.count.HP_login_client_login_mobile_otp_request_post > 0) {
+ void (*postHookFunc) (int fd, struct login_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) {
int hIndex = 0;
if (HPMHooks.count.HP_login_char_server_connection_status_pre > 0) {
@@ -7415,6 +7495,33 @@ void HP_sockt_flush_fifos(void) {
}
return;
}
+int HP_sockt_connect_client(int listen_fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_sockt_connect_client_pre > 0) {
+ int (*preHookFunc) (int *listen_fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&listen_fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.connect_client(listen_fd);
+ }
+ if (HPMHooks.count.HP_sockt_connect_client_post > 0) {
+ int (*postHookFunc) (int retVal___, int listen_fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, listen_fd);
+ }
+ }
+ return retVal___;
+}
void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
int hIndex = 0;
if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) {
diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
index 552aad578..510cb8bc4 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 4b0054b28..454a5229c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -892,6 +892,8 @@ struct {
struct HPMHookPoint *HP_clif_pRanklist_post;
struct HPMHookPoint *HP_clif_hotkeys_pre;
struct HPMHookPoint *HP_clif_hotkeys_post;
+ struct HPMHookPoint *HP_clif_hotkeysAll_pre;
+ struct HPMHookPoint *HP_clif_hotkeysAll_post;
struct HPMHookPoint *HP_clif_insight_pre;
struct HPMHookPoint *HP_clif_insight_post;
struct HPMHookPoint *HP_clif_outsight_pre;
@@ -930,6 +932,18 @@ struct {
struct HPMHookPoint *HP_clif_cartList_post;
struct HPMHookPoint *HP_clif_cartItems_pre;
struct HPMHookPoint *HP_clif_cartItems_post;
+ struct HPMHookPoint *HP_clif_inventoryExpansionInfo_pre;
+ struct HPMHookPoint *HP_clif_inventoryExpansionInfo_post;
+ struct HPMHookPoint *HP_clif_inventoryExpandAck_pre;
+ struct HPMHookPoint *HP_clif_inventoryExpandAck_post;
+ struct HPMHookPoint *HP_clif_inventoryExpandResult_pre;
+ struct HPMHookPoint *HP_clif_inventoryExpandResult_post;
+ struct HPMHookPoint *HP_clif_pInventoryExpansion_pre;
+ struct HPMHookPoint *HP_clif_pInventoryExpansion_post;
+ struct HPMHookPoint *HP_clif_pInventoryExpansionConfirmed_pre;
+ struct HPMHookPoint *HP_clif_pInventoryExpansionConfirmed_post;
+ struct HPMHookPoint *HP_clif_pInventoryExpansionRejected_pre;
+ struct HPMHookPoint *HP_clif_pInventoryExpansionRejected_post;
struct HPMHookPoint *HP_clif_favorite_item_pre;
struct HPMHookPoint *HP_clif_favorite_item_post;
struct HPMHookPoint *HP_clif_clearcart_pre;
@@ -956,8 +970,32 @@ struct {
struct HPMHookPoint *HP_clif_mvp_noitem_post;
struct HPMHookPoint *HP_clif_changed_dir_pre;
struct HPMHookPoint *HP_clif_changed_dir_post;
- struct HPMHookPoint *HP_clif_charnameack_pre;
- struct HPMHookPoint *HP_clif_charnameack_post;
+ struct HPMHookPoint *HP_clif_blname_ack_pre;
+ struct HPMHookPoint *HP_clif_blname_ack_post;
+ struct HPMHookPoint *HP_clif_pcname_ack_pre;
+ struct HPMHookPoint *HP_clif_pcname_ack_post;
+ struct HPMHookPoint *HP_clif_homname_ack_pre;
+ struct HPMHookPoint *HP_clif_homname_ack_post;
+ struct HPMHookPoint *HP_clif_mername_ack_pre;
+ struct HPMHookPoint *HP_clif_mername_ack_post;
+ struct HPMHookPoint *HP_clif_petname_ack_pre;
+ struct HPMHookPoint *HP_clif_petname_ack_post;
+ struct HPMHookPoint *HP_clif_npcname_ack_pre;
+ struct HPMHookPoint *HP_clif_npcname_ack_post;
+ struct HPMHookPoint *HP_clif_mobname_ack_pre;
+ struct HPMHookPoint *HP_clif_mobname_ack_post;
+ struct HPMHookPoint *HP_clif_mobname_guardian_ack_pre;
+ struct HPMHookPoint *HP_clif_mobname_guardian_ack_post;
+ struct HPMHookPoint *HP_clif_mobname_additional_ack_pre;
+ struct HPMHookPoint *HP_clif_mobname_additional_ack_post;
+ struct HPMHookPoint *HP_clif_mobname_normal_ack_pre;
+ struct HPMHookPoint *HP_clif_mobname_normal_ack_post;
+ struct HPMHookPoint *HP_clif_chatname_ack_pre;
+ struct HPMHookPoint *HP_clif_chatname_ack_post;
+ struct HPMHookPoint *HP_clif_elemname_ack_pre;
+ struct HPMHookPoint *HP_clif_elemname_ack_post;
+ struct HPMHookPoint *HP_clif_unknownname_ack_pre;
+ struct HPMHookPoint *HP_clif_unknownname_ack_post;
struct HPMHookPoint *HP_clif_monster_hp_bar_pre;
struct HPMHookPoint *HP_clif_monster_hp_bar_post;
struct HPMHookPoint *HP_clif_hpmeter_pre;
@@ -1144,6 +1182,8 @@ struct {
struct HPMHookPoint *HP_clif_addchat_post;
struct HPMHookPoint *HP_clif_changechatowner_pre;
struct HPMHookPoint *HP_clif_changechatowner_post;
+ struct HPMHookPoint *HP_clif_chatRoleChange_pre;
+ struct HPMHookPoint *HP_clif_chatRoleChange_post;
struct HPMHookPoint *HP_clif_clearchat_pre;
struct HPMHookPoint *HP_clif_clearchat_post;
struct HPMHookPoint *HP_clif_leavechat_pre;
@@ -1164,6 +1204,8 @@ struct {
struct HPMHookPoint *HP_clif_messagecolor_self_post;
struct HPMHookPoint *HP_clif_messagecolor_pre;
struct HPMHookPoint *HP_clif_messagecolor_post;
+ struct HPMHookPoint *HP_clif_serviceMessageColor_pre;
+ struct HPMHookPoint *HP_clif_serviceMessageColor_post;
struct HPMHookPoint *HP_clif_disp_overhead_pre;
struct HPMHookPoint *HP_clif_disp_overhead_post;
struct HPMHookPoint *HP_clif_notify_playerchat_pre;
@@ -1600,6 +1642,8 @@ struct {
struct HPMHookPoint *HP_clif_parse_roulette_db_post;
struct HPMHookPoint *HP_clif_roulette_generate_ack_pre;
struct HPMHookPoint *HP_clif_roulette_generate_ack_post;
+ struct HPMHookPoint *HP_clif_roulette_close_pre;
+ struct HPMHookPoint *HP_clif_roulette_close_post;
struct HPMHookPoint *HP_clif_openmergeitem_pre;
struct HPMHookPoint *HP_clif_openmergeitem_post;
struct HPMHookPoint *HP_clif_cancelmergeitem_pre;
@@ -1608,6 +1652,8 @@ struct {
struct HPMHookPoint *HP_clif_comparemergeitem_post;
struct HPMHookPoint *HP_clif_ackmergeitems_pre;
struct HPMHookPoint *HP_clif_ackmergeitems_post;
+ struct HPMHookPoint *HP_clif_mergeitems_pre;
+ struct HPMHookPoint *HP_clif_mergeitems_post;
struct HPMHookPoint *HP_clif_isdisguised_pre;
struct HPMHookPoint *HP_clif_isdisguised_post;
struct HPMHookPoint *HP_clif_navigate_to_pre;
@@ -1632,8 +1678,10 @@ struct {
struct HPMHookPoint *HP_clif_pLoadEndAck_post;
struct HPMHookPoint *HP_clif_pTickSend_pre;
struct HPMHookPoint *HP_clif_pTickSend_post;
- struct HPMHookPoint *HP_clif_pHotkey_pre;
- struct HPMHookPoint *HP_clif_pHotkey_post;
+ struct HPMHookPoint *HP_clif_pHotkey1_pre;
+ struct HPMHookPoint *HP_clif_pHotkey1_post;
+ struct HPMHookPoint *HP_clif_pHotkey2_pre;
+ struct HPMHookPoint *HP_clif_pHotkey2_post;
struct HPMHookPoint *HP_clif_pProgressbar_pre;
struct HPMHookPoint *HP_clif_pProgressbar_post;
struct HPMHookPoint *HP_clif_pWalkToXY_pre;
@@ -1718,8 +1766,14 @@ struct {
struct HPMHookPoint *HP_clif_pStatusUp_post;
struct HPMHookPoint *HP_clif_pSkillUp_pre;
struct HPMHookPoint *HP_clif_pSkillUp_post;
+ struct HPMHookPoint *HP_clif_useSkillToIdReal_pre;
+ struct HPMHookPoint *HP_clif_useSkillToIdReal_post;
struct HPMHookPoint *HP_clif_pUseSkillToId_pre;
struct HPMHookPoint *HP_clif_pUseSkillToId_post;
+ struct HPMHookPoint *HP_clif_pStartUseSkillToId_pre;
+ struct HPMHookPoint *HP_clif_pStartUseSkillToId_post;
+ struct HPMHookPoint *HP_clif_pStopUseSkillToId_pre;
+ struct HPMHookPoint *HP_clif_pStopUseSkillToId_post;
struct HPMHookPoint *HP_clif_pUseSkillToId_homun_pre;
struct HPMHookPoint *HP_clif_pUseSkillToId_homun_post;
struct HPMHookPoint *HP_clif_pUseSkillToId_mercenary_pre;
@@ -2046,6 +2100,8 @@ struct {
struct HPMHookPoint *HP_clif_pPartyTick_post;
struct HPMHookPoint *HP_clif_pGuildInvite2_pre;
struct HPMHookPoint *HP_clif_pGuildInvite2_post;
+ struct HPMHookPoint *HP_clif_cashShopBuyAck_pre;
+ struct HPMHookPoint *HP_clif_cashShopBuyAck_post;
struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_pre;
struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_post;
struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_pre;
@@ -2084,8 +2140,10 @@ struct {
struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post;
struct HPMHookPoint *HP_clif_add_item_options_pre;
struct HPMHookPoint *HP_clif_add_item_options_post;
- struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre;
- struct HPMHookPoint *HP_clif_pHotkeyRowShift_post;
+ struct HPMHookPoint *HP_clif_pHotkeyRowShift1_pre;
+ struct HPMHookPoint *HP_clif_pHotkeyRowShift1_post;
+ struct HPMHookPoint *HP_clif_pHotkeyRowShift2_pre;
+ struct HPMHookPoint *HP_clif_pHotkeyRowShift2_post;
struct HPMHookPoint *HP_clif_dressroom_open_pre;
struct HPMHookPoint *HP_clif_dressroom_open_post;
struct HPMHookPoint *HP_clif_pOneClick_ItemIdentify_pre;
@@ -2190,24 +2248,12 @@ struct {
struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_post;
struct HPMHookPoint *HP_clif_PrivateAirshipResponse_pre;
struct HPMHookPoint *HP_clif_PrivateAirshipResponse_post;
- struct HPMHookPoint *HP_clif_stylist_vector_init_pre;
- struct HPMHookPoint *HP_clif_stylist_vector_init_post;
- struct HPMHookPoint *HP_clif_stylist_vector_clear_pre;
- struct HPMHookPoint *HP_clif_stylist_vector_clear_post;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_pre;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_post;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_pre;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_post;
- struct HPMHookPoint *HP_clif_style_change_validate_requirements_pre;
- struct HPMHookPoint *HP_clif_style_change_validate_requirements_post;
- struct HPMHookPoint *HP_clif_stylist_send_rodexitem_pre;
- struct HPMHookPoint *HP_clif_stylist_send_rodexitem_post;
struct HPMHookPoint *HP_clif_pReqStyleChange_pre;
struct HPMHookPoint *HP_clif_pReqStyleChange_post;
struct HPMHookPoint *HP_clif_pReqStyleChange2_pre;
struct HPMHookPoint *HP_clif_pReqStyleChange2_post;
- struct HPMHookPoint *HP_clif_cz_req_style_change_sub_pre;
- struct HPMHookPoint *HP_clif_cz_req_style_change_sub_post;
+ struct HPMHookPoint *HP_clif_pStyleClose_pre;
+ struct HPMHookPoint *HP_clif_pStyleClose_post;
struct HPMHookPoint *HP_clif_style_change_response_pre;
struct HPMHookPoint *HP_clif_style_change_response_post;
struct HPMHookPoint *HP_clif_pPetEvolution_pre;
@@ -2222,8 +2268,48 @@ struct {
struct HPMHookPoint *HP_clif_camera_showWindow_post;
struct HPMHookPoint *HP_clif_camera_change_pre;
struct HPMHookPoint *HP_clif_camera_change_post;
+ struct HPMHookPoint *HP_clif_pCameraInfo_pre;
+ struct HPMHookPoint *HP_clif_pCameraInfo_post;
struct HPMHookPoint *HP_clif_item_preview_pre;
struct HPMHookPoint *HP_clif_item_preview_post;
+ struct HPMHookPoint *HP_clif_enchant_equipment_pre;
+ struct HPMHookPoint *HP_clif_enchant_equipment_post;
+ struct HPMHookPoint *HP_clif_pReqRemainTime_pre;
+ struct HPMHookPoint *HP_clif_pReqRemainTime_post;
+ struct HPMHookPoint *HP_clif_npc_barter_open_pre;
+ struct HPMHookPoint *HP_clif_npc_barter_open_post;
+ struct HPMHookPoint *HP_clif_pNPCBarterClosed_pre;
+ struct HPMHookPoint *HP_clif_pNPCBarterClosed_post;
+ struct HPMHookPoint *HP_clif_pNPCBarterPurchase_pre;
+ struct HPMHookPoint *HP_clif_pNPCBarterPurchase_post;
+ struct HPMHookPoint *HP_clif_pClientVersion_pre;
+ struct HPMHookPoint *HP_clif_pClientVersion_post;
+ struct HPMHookPoint *HP_clif_pPing_pre;
+ struct HPMHookPoint *HP_clif_pPing_post;
+ struct HPMHookPoint *HP_clif_ping_pre;
+ struct HPMHookPoint *HP_clif_ping_post;
+ struct HPMHookPoint *HP_clif_pingTimer_pre;
+ struct HPMHookPoint *HP_clif_pingTimer_post;
+ struct HPMHookPoint *HP_clif_pingTimerSub_pre;
+ struct HPMHookPoint *HP_clif_pingTimerSub_post;
+ struct HPMHookPoint *HP_clif_pResetCooldown_pre;
+ struct HPMHookPoint *HP_clif_pResetCooldown_post;
+ struct HPMHookPoint *HP_clif_loadConfirm_pre;
+ struct HPMHookPoint *HP_clif_loadConfirm_post;
+ struct HPMHookPoint *HP_clif_send_selforarea_pre;
+ struct HPMHookPoint *HP_clif_send_selforarea_post;
+ struct HPMHookPoint *HP_clif_OpenRefineryUI_pre;
+ struct HPMHookPoint *HP_clif_OpenRefineryUI_post;
+ struct HPMHookPoint *HP_clif_pAddItemRefineryUI_pre;
+ struct HPMHookPoint *HP_clif_pAddItemRefineryUI_post;
+ struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_pre;
+ struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_post;
+ struct HPMHookPoint *HP_clif_pRefineryUIClose_pre;
+ struct HPMHookPoint *HP_clif_pRefineryUIClose_post;
+ struct HPMHookPoint *HP_clif_pRefineryUIRefine_pre;
+ struct HPMHookPoint *HP_clif_pRefineryUIRefine_post;
+ struct HPMHookPoint *HP_clif_announce_refine_status_pre;
+ struct HPMHookPoint *HP_clif_announce_refine_status_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -2868,6 +2954,10 @@ struct {
struct HPMHookPoint *HP_intif_rodex_sendmail_post;
struct HPMHookPoint *HP_intif_rodex_checkname_pre;
struct HPMHookPoint *HP_intif_rodex_checkname_post;
+ struct HPMHookPoint *HP_intif_pGetZenyAck_pre;
+ struct HPMHookPoint *HP_intif_pGetZenyAck_post;
+ struct HPMHookPoint *HP_intif_pGetItemsAck_pre;
+ struct HPMHookPoint *HP_intif_pGetItemsAck_post;
struct HPMHookPoint *HP_intif_clan_kickoffline_pre;
struct HPMHookPoint *HP_intif_clan_kickoffline_post;
struct HPMHookPoint *HP_intif_clan_membercount_pre;
@@ -3186,6 +3276,8 @@ struct {
struct HPMHookPoint *HP_itemdb_lookup_const_post;
struct HPMHookPoint *HP_itemdb_lookup_const_mask_pre;
struct HPMHookPoint *HP_itemdb_lookup_const_mask_post;
+ struct HPMHookPoint *HP_itemdb_addname_sub_pre;
+ struct HPMHookPoint *HP_itemdb_addname_sub_post;
struct HPMHookPoint *HP_libconfig_read_pre;
struct HPMHookPoint *HP_libconfig_read_post;
struct HPMHookPoint *HP_libconfig_write_pre;
@@ -3866,6 +3958,8 @@ struct {
struct HPMHookPoint *HP_mob_ai_lazy_post;
struct HPMHookPoint *HP_mob_ai_hard_pre;
struct HPMHookPoint *HP_mob_ai_hard_post;
+ struct HPMHookPoint *HP_mob_setdropitem_options_pre;
+ struct HPMHookPoint *HP_mob_setdropitem_options_post;
struct HPMHookPoint *HP_mob_setdropitem_pre;
struct HPMHookPoint *HP_mob_setdropitem_post;
struct HPMHookPoint *HP_mob_setlootitem_pre;
@@ -3932,6 +4026,14 @@ struct {
struct HPMHookPoint *HP_mob_drop_adjust_post;
struct HPMHookPoint *HP_mob_item_dropratio_adjust_pre;
struct HPMHookPoint *HP_mob_item_dropratio_adjust_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_option_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_option_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_optslot_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_optslot_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_group_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_group_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_db_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_db_post;
struct HPMHookPoint *HP_mob_readdb_pre;
struct HPMHookPoint *HP_mob_readdb_post;
struct HPMHookPoint *HP_mob_lookup_const_pre;
@@ -3952,6 +4054,8 @@ struct {
struct HPMHookPoint *HP_mob_read_db_mvpdrops_sub_post;
struct HPMHookPoint *HP_mob_read_db_mode_sub_pre;
struct HPMHookPoint *HP_mob_read_db_mode_sub_post;
+ struct HPMHookPoint *HP_mob_read_db_drops_option_pre;
+ struct HPMHookPoint *HP_mob_read_db_drops_option_post;
struct HPMHookPoint *HP_mob_read_db_stats_sub_pre;
struct HPMHookPoint *HP_mob_read_db_stats_sub_post;
struct HPMHookPoint *HP_mob_name_constants_pre;
@@ -3982,6 +4086,8 @@ struct {
struct HPMHookPoint *HP_mob_final_ratio_sub_post;
struct HPMHookPoint *HP_mob_destroy_mob_db_pre;
struct HPMHookPoint *HP_mob_destroy_mob_db_post;
+ struct HPMHookPoint *HP_mob_destroy_drop_groups_pre;
+ struct HPMHookPoint *HP_mob_destroy_drop_groups_post;
struct HPMHookPoint *HP_mob_skill_db_libconfig_pre;
struct HPMHookPoint *HP_mob_skill_db_libconfig_post;
struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_pre;
@@ -4232,6 +4338,8 @@ struct {
struct HPMHookPoint *HP_npc_trader_update_post;
struct HPMHookPoint *HP_npc_market_buylist_pre;
struct HPMHookPoint *HP_npc_market_buylist_post;
+ struct HPMHookPoint *HP_npc_barter_buylist_pre;
+ struct HPMHookPoint *HP_npc_barter_buylist_post;
struct HPMHookPoint *HP_npc_trader_open_pre;
struct HPMHookPoint *HP_npc_trader_open_post;
struct HPMHookPoint *HP_npc_market_fromsql_pre;
@@ -4242,10 +4350,20 @@ struct {
struct HPMHookPoint *HP_npc_market_delfromsql_post;
struct HPMHookPoint *HP_npc_market_delfromsql_sub_pre;
struct HPMHookPoint *HP_npc_market_delfromsql_sub_post;
+ struct HPMHookPoint *HP_npc_barter_fromsql_pre;
+ struct HPMHookPoint *HP_npc_barter_fromsql_post;
+ struct HPMHookPoint *HP_npc_barter_tosql_pre;
+ struct HPMHookPoint *HP_npc_barter_tosql_post;
+ struct HPMHookPoint *HP_npc_barter_delfromsql_pre;
+ struct HPMHookPoint *HP_npc_barter_delfromsql_post;
+ struct HPMHookPoint *HP_npc_barter_delfromsql_sub_pre;
+ struct HPMHookPoint *HP_npc_barter_delfromsql_sub_post;
struct HPMHookPoint *HP_npc_db_checkid_pre;
struct HPMHookPoint *HP_npc_db_checkid_post;
struct HPMHookPoint *HP_npc_refresh_pre;
struct HPMHookPoint *HP_npc_refresh_post;
+ struct HPMHookPoint *HP_npc_questinfo_clear_pre;
+ struct HPMHookPoint *HP_npc_questinfo_clear_post;
struct HPMHookPoint *HP_npc_secure_timeout_timer_pre;
struct HPMHookPoint *HP_npc_secure_timeout_timer_post;
struct HPMHookPoint *HP_nullpo_assert_report_pre;
@@ -4868,6 +4986,8 @@ struct {
struct HPMHookPoint *HP_pc_isDeathPenaltyJob_post;
struct HPMHookPoint *HP_pc_has_second_costume_pre;
struct HPMHookPoint *HP_pc_has_second_costume_post;
+ struct HPMHookPoint *HP_pc_expandInventory_pre;
+ struct HPMHookPoint *HP_pc_expandInventory_post;
struct HPMHookPoint *HP_libpcre_compile_pre;
struct HPMHookPoint *HP_libpcre_compile_post;
struct HPMHookPoint *HP_libpcre_study_pre;
@@ -5024,8 +5144,36 @@ struct {
struct HPMHookPoint *HP_quest_questinfo_validate_quests_post;
struct HPMHookPoint *HP_quest_questinfo_validate_mercenary_class_pre;
struct HPMHookPoint *HP_quest_questinfo_validate_mercenary_class_post;
- struct HPMHookPoint *HP_quest_questinfo_vector_clear_pre;
- struct HPMHookPoint *HP_quest_questinfo_vector_clear_post;
+ struct HPMHookPoint *HP_refine_init_pre;
+ struct HPMHookPoint *HP_refine_init_post;
+ struct HPMHookPoint *HP_refine_final_pre;
+ struct HPMHookPoint *HP_refine_final_post;
+ struct HPMHookPoint *HP_refine_get_refine_chance_pre;
+ struct HPMHookPoint *HP_refine_get_refine_chance_post;
+ struct HPMHookPoint *HP_refine_get_bonus_pre;
+ struct HPMHookPoint *HP_refine_get_bonus_post;
+ struct HPMHookPoint *HP_refine_get_randombonus_max_pre;
+ struct HPMHookPoint *HP_refine_get_randombonus_max_post;
+ struct HPMHookPoint *HP_refine_refinery_add_item_pre;
+ struct HPMHookPoint *HP_refine_refinery_add_item_post;
+ struct HPMHookPoint *HP_refine_refinery_refine_request_pre;
+ struct HPMHookPoint *HP_refine_refinery_refine_request_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_post;
+ struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_pre;
+ struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_post;
+ struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_pre;
+ struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_post;
+ struct HPMHookPoint *HP_PRIV__refine_is_refinable_pre;
+ struct HPMHookPoint *HP_PRIV__refine_is_refinable_post;
struct HPMHookPoint *HP_rnd_init_pre;
struct HPMHookPoint *HP_rnd_init_post;
struct HPMHookPoint *HP_rnd_final_pre;
@@ -5076,6 +5224,10 @@ struct {
struct HPMHookPoint *HP_rodex_delete_mail_post;
struct HPMHookPoint *HP_rodex_clean_pre;
struct HPMHookPoint *HP_rodex_clean_post;
+ struct HPMHookPoint *HP_rodex_getZenyAck_pre;
+ struct HPMHookPoint *HP_rodex_getZenyAck_post;
+ struct HPMHookPoint *HP_rodex_getItemsAck_pre;
+ struct HPMHookPoint *HP_rodex_getItemsAck_post;
struct HPMHookPoint *HP_script_init_pre;
struct HPMHookPoint *HP_script_init_post;
struct HPMHookPoint *HP_script_final_pre;
@@ -5994,6 +6146,8 @@ struct {
struct HPMHookPoint *HP_sockt_flush_post;
struct HPMHookPoint *HP_sockt_flush_fifos_pre;
struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_connect_client_pre;
+ struct HPMHookPoint *HP_sockt_connect_client_post;
struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
struct HPMHookPoint *HP_sockt_set_nonblocking_post;
struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
@@ -6088,8 +6242,6 @@ struct {
struct HPMHookPoint *HP_status_init_post;
struct HPMHookPoint *HP_status_final_pre;
struct HPMHookPoint *HP_status_final_post;
- struct HPMHookPoint *HP_status_get_refine_chance_pre;
- struct HPMHookPoint *HP_status_get_refine_chance_post;
struct HPMHookPoint *HP_status_skill2sc_pre;
struct HPMHookPoint *HP_status_skill2sc_post;
struct HPMHookPoint *HP_status_sc2skill_pre;
@@ -6320,10 +6472,6 @@ struct {
struct HPMHookPoint *HP_status_readdb_job2_post;
struct HPMHookPoint *HP_status_readdb_sizefix_pre;
struct HPMHookPoint *HP_status_readdb_sizefix_post;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_pre;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_post;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_pre;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_post;
struct HPMHookPoint *HP_status_readdb_scconfig_pre;
struct HPMHookPoint *HP_status_readdb_scconfig_post;
struct HPMHookPoint *HP_status_read_job_db_pre;
@@ -6414,6 +6562,24 @@ struct {
struct HPMHookPoint *HP_strlib_strline__post;
struct HPMHookPoint *HP_strlib_bin2hex__pre;
struct HPMHookPoint *HP_strlib_bin2hex__post;
+ struct HPMHookPoint *HP_stylist_init_pre;
+ struct HPMHookPoint *HP_stylist_init_post;
+ struct HPMHookPoint *HP_stylist_final_pre;
+ struct HPMHookPoint *HP_stylist_final_post;
+ struct HPMHookPoint *HP_stylist_vector_init_pre;
+ struct HPMHookPoint *HP_stylist_vector_init_post;
+ struct HPMHookPoint *HP_stylist_vector_clear_pre;
+ struct HPMHookPoint *HP_stylist_vector_clear_post;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_pre;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_post;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_pre;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_post;
+ struct HPMHookPoint *HP_stylist_request_style_change_pre;
+ struct HPMHookPoint *HP_stylist_request_style_change_post;
+ struct HPMHookPoint *HP_stylist_validate_requirements_pre;
+ struct HPMHookPoint *HP_stylist_validate_requirements_post;
+ struct HPMHookPoint *HP_stylist_send_rodexitem_pre;
+ struct HPMHookPoint *HP_stylist_send_rodexitem_post;
struct HPMHookPoint *HP_sv_parse_next_pre;
struct HPMHookPoint *HP_sv_parse_next_post;
struct HPMHookPoint *HP_sv_parse_pre;
@@ -7513,6 +7679,8 @@ struct {
int HP_clif_pRanklist_post;
int HP_clif_hotkeys_pre;
int HP_clif_hotkeys_post;
+ int HP_clif_hotkeysAll_pre;
+ int HP_clif_hotkeysAll_post;
int HP_clif_insight_pre;
int HP_clif_insight_post;
int HP_clif_outsight_pre;
@@ -7551,6 +7719,18 @@ struct {
int HP_clif_cartList_post;
int HP_clif_cartItems_pre;
int HP_clif_cartItems_post;
+ int HP_clif_inventoryExpansionInfo_pre;
+ int HP_clif_inventoryExpansionInfo_post;
+ int HP_clif_inventoryExpandAck_pre;
+ int HP_clif_inventoryExpandAck_post;
+ int HP_clif_inventoryExpandResult_pre;
+ int HP_clif_inventoryExpandResult_post;
+ int HP_clif_pInventoryExpansion_pre;
+ int HP_clif_pInventoryExpansion_post;
+ int HP_clif_pInventoryExpansionConfirmed_pre;
+ int HP_clif_pInventoryExpansionConfirmed_post;
+ int HP_clif_pInventoryExpansionRejected_pre;
+ int HP_clif_pInventoryExpansionRejected_post;
int HP_clif_favorite_item_pre;
int HP_clif_favorite_item_post;
int HP_clif_clearcart_pre;
@@ -7577,8 +7757,32 @@ struct {
int HP_clif_mvp_noitem_post;
int HP_clif_changed_dir_pre;
int HP_clif_changed_dir_post;
- int HP_clif_charnameack_pre;
- int HP_clif_charnameack_post;
+ int HP_clif_blname_ack_pre;
+ int HP_clif_blname_ack_post;
+ int HP_clif_pcname_ack_pre;
+ int HP_clif_pcname_ack_post;
+ int HP_clif_homname_ack_pre;
+ int HP_clif_homname_ack_post;
+ int HP_clif_mername_ack_pre;
+ int HP_clif_mername_ack_post;
+ int HP_clif_petname_ack_pre;
+ int HP_clif_petname_ack_post;
+ int HP_clif_npcname_ack_pre;
+ int HP_clif_npcname_ack_post;
+ int HP_clif_mobname_ack_pre;
+ int HP_clif_mobname_ack_post;
+ int HP_clif_mobname_guardian_ack_pre;
+ int HP_clif_mobname_guardian_ack_post;
+ int HP_clif_mobname_additional_ack_pre;
+ int HP_clif_mobname_additional_ack_post;
+ int HP_clif_mobname_normal_ack_pre;
+ int HP_clif_mobname_normal_ack_post;
+ int HP_clif_chatname_ack_pre;
+ int HP_clif_chatname_ack_post;
+ int HP_clif_elemname_ack_pre;
+ int HP_clif_elemname_ack_post;
+ int HP_clif_unknownname_ack_pre;
+ int HP_clif_unknownname_ack_post;
int HP_clif_monster_hp_bar_pre;
int HP_clif_monster_hp_bar_post;
int HP_clif_hpmeter_pre;
@@ -7765,6 +7969,8 @@ struct {
int HP_clif_addchat_post;
int HP_clif_changechatowner_pre;
int HP_clif_changechatowner_post;
+ int HP_clif_chatRoleChange_pre;
+ int HP_clif_chatRoleChange_post;
int HP_clif_clearchat_pre;
int HP_clif_clearchat_post;
int HP_clif_leavechat_pre;
@@ -7785,6 +7991,8 @@ struct {
int HP_clif_messagecolor_self_post;
int HP_clif_messagecolor_pre;
int HP_clif_messagecolor_post;
+ int HP_clif_serviceMessageColor_pre;
+ int HP_clif_serviceMessageColor_post;
int HP_clif_disp_overhead_pre;
int HP_clif_disp_overhead_post;
int HP_clif_notify_playerchat_pre;
@@ -8221,6 +8429,8 @@ struct {
int HP_clif_parse_roulette_db_post;
int HP_clif_roulette_generate_ack_pre;
int HP_clif_roulette_generate_ack_post;
+ int HP_clif_roulette_close_pre;
+ int HP_clif_roulette_close_post;
int HP_clif_openmergeitem_pre;
int HP_clif_openmergeitem_post;
int HP_clif_cancelmergeitem_pre;
@@ -8229,6 +8439,8 @@ struct {
int HP_clif_comparemergeitem_post;
int HP_clif_ackmergeitems_pre;
int HP_clif_ackmergeitems_post;
+ int HP_clif_mergeitems_pre;
+ int HP_clif_mergeitems_post;
int HP_clif_isdisguised_pre;
int HP_clif_isdisguised_post;
int HP_clif_navigate_to_pre;
@@ -8253,8 +8465,10 @@ struct {
int HP_clif_pLoadEndAck_post;
int HP_clif_pTickSend_pre;
int HP_clif_pTickSend_post;
- int HP_clif_pHotkey_pre;
- int HP_clif_pHotkey_post;
+ int HP_clif_pHotkey1_pre;
+ int HP_clif_pHotkey1_post;
+ int HP_clif_pHotkey2_pre;
+ int HP_clif_pHotkey2_post;
int HP_clif_pProgressbar_pre;
int HP_clif_pProgressbar_post;
int HP_clif_pWalkToXY_pre;
@@ -8339,8 +8553,14 @@ struct {
int HP_clif_pStatusUp_post;
int HP_clif_pSkillUp_pre;
int HP_clif_pSkillUp_post;
+ int HP_clif_useSkillToIdReal_pre;
+ int HP_clif_useSkillToIdReal_post;
int HP_clif_pUseSkillToId_pre;
int HP_clif_pUseSkillToId_post;
+ int HP_clif_pStartUseSkillToId_pre;
+ int HP_clif_pStartUseSkillToId_post;
+ int HP_clif_pStopUseSkillToId_pre;
+ int HP_clif_pStopUseSkillToId_post;
int HP_clif_pUseSkillToId_homun_pre;
int HP_clif_pUseSkillToId_homun_post;
int HP_clif_pUseSkillToId_mercenary_pre;
@@ -8667,6 +8887,8 @@ struct {
int HP_clif_pPartyTick_post;
int HP_clif_pGuildInvite2_pre;
int HP_clif_pGuildInvite2_post;
+ int HP_clif_cashShopBuyAck_pre;
+ int HP_clif_cashShopBuyAck_post;
int HP_clif_pPartyBookingAddFilter_pre;
int HP_clif_pPartyBookingAddFilter_post;
int HP_clif_pPartyBookingSubFilter_pre;
@@ -8705,8 +8927,10 @@ struct {
int HP_clif_pNPCMarketPurchase_post;
int HP_clif_add_item_options_pre;
int HP_clif_add_item_options_post;
- int HP_clif_pHotkeyRowShift_pre;
- int HP_clif_pHotkeyRowShift_post;
+ int HP_clif_pHotkeyRowShift1_pre;
+ int HP_clif_pHotkeyRowShift1_post;
+ int HP_clif_pHotkeyRowShift2_pre;
+ int HP_clif_pHotkeyRowShift2_post;
int HP_clif_dressroom_open_pre;
int HP_clif_dressroom_open_post;
int HP_clif_pOneClick_ItemIdentify_pre;
@@ -8811,24 +9035,12 @@ struct {
int HP_clif_pPrivateAirshipRequest_post;
int HP_clif_PrivateAirshipResponse_pre;
int HP_clif_PrivateAirshipResponse_post;
- int HP_clif_stylist_vector_init_pre;
- int HP_clif_stylist_vector_init_post;
- int HP_clif_stylist_vector_clear_pre;
- int HP_clif_stylist_vector_clear_post;
- int HP_clif_stylist_read_db_libconfig_pre;
- int HP_clif_stylist_read_db_libconfig_post;
- int HP_clif_stylist_read_db_libconfig_sub_pre;
- int HP_clif_stylist_read_db_libconfig_sub_post;
- int HP_clif_style_change_validate_requirements_pre;
- int HP_clif_style_change_validate_requirements_post;
- int HP_clif_stylist_send_rodexitem_pre;
- int HP_clif_stylist_send_rodexitem_post;
int HP_clif_pReqStyleChange_pre;
int HP_clif_pReqStyleChange_post;
int HP_clif_pReqStyleChange2_pre;
int HP_clif_pReqStyleChange2_post;
- int HP_clif_cz_req_style_change_sub_pre;
- int HP_clif_cz_req_style_change_sub_post;
+ int HP_clif_pStyleClose_pre;
+ int HP_clif_pStyleClose_post;
int HP_clif_style_change_response_pre;
int HP_clif_style_change_response_post;
int HP_clif_pPetEvolution_pre;
@@ -8843,8 +9055,48 @@ struct {
int HP_clif_camera_showWindow_post;
int HP_clif_camera_change_pre;
int HP_clif_camera_change_post;
+ int HP_clif_pCameraInfo_pre;
+ int HP_clif_pCameraInfo_post;
int HP_clif_item_preview_pre;
int HP_clif_item_preview_post;
+ int HP_clif_enchant_equipment_pre;
+ int HP_clif_enchant_equipment_post;
+ int HP_clif_pReqRemainTime_pre;
+ int HP_clif_pReqRemainTime_post;
+ int HP_clif_npc_barter_open_pre;
+ int HP_clif_npc_barter_open_post;
+ int HP_clif_pNPCBarterClosed_pre;
+ int HP_clif_pNPCBarterClosed_post;
+ int HP_clif_pNPCBarterPurchase_pre;
+ int HP_clif_pNPCBarterPurchase_post;
+ int HP_clif_pClientVersion_pre;
+ int HP_clif_pClientVersion_post;
+ int HP_clif_pPing_pre;
+ int HP_clif_pPing_post;
+ int HP_clif_ping_pre;
+ int HP_clif_ping_post;
+ int HP_clif_pingTimer_pre;
+ int HP_clif_pingTimer_post;
+ int HP_clif_pingTimerSub_pre;
+ int HP_clif_pingTimerSub_post;
+ int HP_clif_pResetCooldown_pre;
+ int HP_clif_pResetCooldown_post;
+ int HP_clif_loadConfirm_pre;
+ int HP_clif_loadConfirm_post;
+ int HP_clif_send_selforarea_pre;
+ int HP_clif_send_selforarea_post;
+ int HP_clif_OpenRefineryUI_pre;
+ int HP_clif_OpenRefineryUI_post;
+ int HP_clif_pAddItemRefineryUI_pre;
+ int HP_clif_pAddItemRefineryUI_post;
+ int HP_clif_AddItemRefineryUIAck_pre;
+ int HP_clif_AddItemRefineryUIAck_post;
+ int HP_clif_pRefineryUIClose_pre;
+ int HP_clif_pRefineryUIClose_post;
+ int HP_clif_pRefineryUIRefine_pre;
+ int HP_clif_pRefineryUIRefine_post;
+ int HP_clif_announce_refine_status_pre;
+ int HP_clif_announce_refine_status_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -9489,6 +9741,10 @@ struct {
int HP_intif_rodex_sendmail_post;
int HP_intif_rodex_checkname_pre;
int HP_intif_rodex_checkname_post;
+ int HP_intif_pGetZenyAck_pre;
+ int HP_intif_pGetZenyAck_post;
+ int HP_intif_pGetItemsAck_pre;
+ int HP_intif_pGetItemsAck_post;
int HP_intif_clan_kickoffline_pre;
int HP_intif_clan_kickoffline_post;
int HP_intif_clan_membercount_pre;
@@ -9807,6 +10063,8 @@ struct {
int HP_itemdb_lookup_const_post;
int HP_itemdb_lookup_const_mask_pre;
int HP_itemdb_lookup_const_mask_post;
+ int HP_itemdb_addname_sub_pre;
+ int HP_itemdb_addname_sub_post;
int HP_libconfig_read_pre;
int HP_libconfig_read_post;
int HP_libconfig_write_pre;
@@ -10487,6 +10745,8 @@ struct {
int HP_mob_ai_lazy_post;
int HP_mob_ai_hard_pre;
int HP_mob_ai_hard_post;
+ int HP_mob_setdropitem_options_pre;
+ int HP_mob_setdropitem_options_post;
int HP_mob_setdropitem_pre;
int HP_mob_setdropitem_post;
int HP_mob_setlootitem_pre;
@@ -10553,6 +10813,14 @@ struct {
int HP_mob_drop_adjust_post;
int HP_mob_item_dropratio_adjust_pre;
int HP_mob_item_dropratio_adjust_post;
+ int HP_mob_read_optdrops_option_pre;
+ int HP_mob_read_optdrops_option_post;
+ int HP_mob_read_optdrops_optslot_pre;
+ int HP_mob_read_optdrops_optslot_post;
+ int HP_mob_read_optdrops_group_pre;
+ int HP_mob_read_optdrops_group_post;
+ int HP_mob_read_optdrops_db_pre;
+ int HP_mob_read_optdrops_db_post;
int HP_mob_readdb_pre;
int HP_mob_readdb_post;
int HP_mob_lookup_const_pre;
@@ -10573,6 +10841,8 @@ struct {
int HP_mob_read_db_mvpdrops_sub_post;
int HP_mob_read_db_mode_sub_pre;
int HP_mob_read_db_mode_sub_post;
+ int HP_mob_read_db_drops_option_pre;
+ int HP_mob_read_db_drops_option_post;
int HP_mob_read_db_stats_sub_pre;
int HP_mob_read_db_stats_sub_post;
int HP_mob_name_constants_pre;
@@ -10603,6 +10873,8 @@ struct {
int HP_mob_final_ratio_sub_post;
int HP_mob_destroy_mob_db_pre;
int HP_mob_destroy_mob_db_post;
+ int HP_mob_destroy_drop_groups_pre;
+ int HP_mob_destroy_drop_groups_post;
int HP_mob_skill_db_libconfig_pre;
int HP_mob_skill_db_libconfig_post;
int HP_mob_skill_db_libconfig_sub_pre;
@@ -10853,6 +11125,8 @@ struct {
int HP_npc_trader_update_post;
int HP_npc_market_buylist_pre;
int HP_npc_market_buylist_post;
+ int HP_npc_barter_buylist_pre;
+ int HP_npc_barter_buylist_post;
int HP_npc_trader_open_pre;
int HP_npc_trader_open_post;
int HP_npc_market_fromsql_pre;
@@ -10863,10 +11137,20 @@ struct {
int HP_npc_market_delfromsql_post;
int HP_npc_market_delfromsql_sub_pre;
int HP_npc_market_delfromsql_sub_post;
+ int HP_npc_barter_fromsql_pre;
+ int HP_npc_barter_fromsql_post;
+ int HP_npc_barter_tosql_pre;
+ int HP_npc_barter_tosql_post;
+ int HP_npc_barter_delfromsql_pre;
+ int HP_npc_barter_delfromsql_post;
+ int HP_npc_barter_delfromsql_sub_pre;
+ int HP_npc_barter_delfromsql_sub_post;
int HP_npc_db_checkid_pre;
int HP_npc_db_checkid_post;
int HP_npc_refresh_pre;
int HP_npc_refresh_post;
+ int HP_npc_questinfo_clear_pre;
+ int HP_npc_questinfo_clear_post;
int HP_npc_secure_timeout_timer_pre;
int HP_npc_secure_timeout_timer_post;
int HP_nullpo_assert_report_pre;
@@ -11489,6 +11773,8 @@ struct {
int HP_pc_isDeathPenaltyJob_post;
int HP_pc_has_second_costume_pre;
int HP_pc_has_second_costume_post;
+ int HP_pc_expandInventory_pre;
+ int HP_pc_expandInventory_post;
int HP_libpcre_compile_pre;
int HP_libpcre_compile_post;
int HP_libpcre_study_pre;
@@ -11645,8 +11931,36 @@ struct {
int HP_quest_questinfo_validate_quests_post;
int HP_quest_questinfo_validate_mercenary_class_pre;
int HP_quest_questinfo_validate_mercenary_class_post;
- int HP_quest_questinfo_vector_clear_pre;
- int HP_quest_questinfo_vector_clear_post;
+ int HP_refine_init_pre;
+ int HP_refine_init_post;
+ int HP_refine_final_pre;
+ int HP_refine_final_post;
+ int HP_refine_get_refine_chance_pre;
+ int HP_refine_get_refine_chance_post;
+ int HP_refine_get_bonus_pre;
+ int HP_refine_get_bonus_post;
+ int HP_refine_get_randombonus_max_pre;
+ int HP_refine_get_randombonus_max_post;
+ int HP_refine_refinery_add_item_pre;
+ int HP_refine_refinery_add_item_post;
+ int HP_refine_refinery_refine_request_pre;
+ int HP_refine_refinery_refine_request_post;
+ int HP_PRIV__refine_readdb_refine_libconfig_sub_pre;
+ int HP_PRIV__refine_readdb_refine_libconfig_sub_post;
+ int HP_PRIV__refine_readdb_refine_libconfig_pre;
+ int HP_PRIV__refine_readdb_refine_libconfig_post;
+ int HP_PRIV__refine_announce_behavior_string2enum_pre;
+ int HP_PRIV__refine_announce_behavior_string2enum_post;
+ int HP_PRIV__refine_failure_behavior_string2enum_pre;
+ int HP_PRIV__refine_failure_behavior_string2enum_post;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_items_pre;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_items_post;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_sub_post;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_pre;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_post;
+ int HP_PRIV__refine_is_refinable_pre;
+ int HP_PRIV__refine_is_refinable_post;
int HP_rnd_init_pre;
int HP_rnd_init_post;
int HP_rnd_final_pre;
@@ -11697,6 +12011,10 @@ struct {
int HP_rodex_delete_mail_post;
int HP_rodex_clean_pre;
int HP_rodex_clean_post;
+ int HP_rodex_getZenyAck_pre;
+ int HP_rodex_getZenyAck_post;
+ int HP_rodex_getItemsAck_pre;
+ int HP_rodex_getItemsAck_post;
int HP_script_init_pre;
int HP_script_init_post;
int HP_script_final_pre;
@@ -12615,6 +12933,8 @@ struct {
int HP_sockt_flush_post;
int HP_sockt_flush_fifos_pre;
int HP_sockt_flush_fifos_post;
+ int HP_sockt_connect_client_pre;
+ int HP_sockt_connect_client_post;
int HP_sockt_set_nonblocking_pre;
int HP_sockt_set_nonblocking_post;
int HP_sockt_set_defaultparse_pre;
@@ -12709,8 +13029,6 @@ struct {
int HP_status_init_post;
int HP_status_final_pre;
int HP_status_final_post;
- int HP_status_get_refine_chance_pre;
- int HP_status_get_refine_chance_post;
int HP_status_skill2sc_pre;
int HP_status_skill2sc_post;
int HP_status_sc2skill_pre;
@@ -12941,10 +13259,6 @@ struct {
int HP_status_readdb_job2_post;
int HP_status_readdb_sizefix_pre;
int HP_status_readdb_sizefix_post;
- int HP_status_readdb_refine_libconfig_pre;
- int HP_status_readdb_refine_libconfig_post;
- int HP_status_readdb_refine_libconfig_sub_pre;
- int HP_status_readdb_refine_libconfig_sub_post;
int HP_status_readdb_scconfig_pre;
int HP_status_readdb_scconfig_post;
int HP_status_read_job_db_pre;
@@ -13035,6 +13349,24 @@ struct {
int HP_strlib_strline__post;
int HP_strlib_bin2hex__pre;
int HP_strlib_bin2hex__post;
+ int HP_stylist_init_pre;
+ int HP_stylist_init_post;
+ int HP_stylist_final_pre;
+ int HP_stylist_final_post;
+ int HP_stylist_vector_init_pre;
+ int HP_stylist_vector_init_post;
+ int HP_stylist_vector_clear_pre;
+ int HP_stylist_vector_clear_post;
+ int HP_stylist_read_db_libconfig_pre;
+ int HP_stylist_read_db_libconfig_post;
+ int HP_stylist_read_db_libconfig_sub_pre;
+ int HP_stylist_read_db_libconfig_sub_post;
+ int HP_stylist_request_style_change_pre;
+ int HP_stylist_request_style_change_post;
+ int HP_stylist_validate_requirements_pre;
+ int HP_stylist_validate_requirements_post;
+ int HP_stylist_send_rodexitem_pre;
+ int HP_stylist_send_rodexitem_post;
int HP_sv_parse_next_pre;
int HP_sv_parse_next_post;
int HP_sv_parse_pre;
@@ -13316,6 +13648,8 @@ struct {
struct pcre_interface libpcre;
struct pet_interface pet;
struct quest_interface quest;
+ struct refine_interface refine;
+ struct refine_interface_private PRIV__refine;
struct rnd_interface rnd;
struct rodex_interface rodex;
struct script_interface script;
@@ -13328,6 +13662,7 @@ struct {
struct storage_interface storage;
struct stringbuf_interface StrBuf;
struct strlib_interface strlib;
+ struct stylist_interface stylist;
struct sv_interface sv;
struct sysinfo_interface sysinfo;
struct thread_interface thread;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index a900af716..da2f81541 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -470,6 +470,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->update_rankingpoint, HP_clif_update_rankingpoint) },
{ HP_POP(clif->pRanklist, HP_clif_pRanklist) },
{ HP_POP(clif->hotkeys, HP_clif_hotkeys) },
+ { HP_POP(clif->hotkeysAll, HP_clif_hotkeysAll) },
{ HP_POP(clif->insight, HP_clif_insight) },
{ HP_POP(clif->outsight, HP_clif_outsight) },
{ HP_POP(clif->skillcastcancel, HP_clif_skillcastcancel) },
@@ -489,6 +490,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->equipItems, HP_clif_equipItems) },
{ HP_POP(clif->cartList, HP_clif_cartList) },
{ HP_POP(clif->cartItems, HP_clif_cartItems) },
+ { HP_POP(clif->inventoryExpansionInfo, HP_clif_inventoryExpansionInfo) },
+ { HP_POP(clif->inventoryExpandAck, HP_clif_inventoryExpandAck) },
+ { HP_POP(clif->inventoryExpandResult, HP_clif_inventoryExpandResult) },
+ { HP_POP(clif->pInventoryExpansion, HP_clif_pInventoryExpansion) },
+ { HP_POP(clif->pInventoryExpansionConfirmed, HP_clif_pInventoryExpansionConfirmed) },
+ { HP_POP(clif->pInventoryExpansionRejected, HP_clif_pInventoryExpansionRejected) },
{ 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) },
@@ -502,7 +509,19 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->mvp_exp, HP_clif_mvp_exp) },
{ HP_POP(clif->mvp_noitem, HP_clif_mvp_noitem) },
{ HP_POP(clif->changed_dir, HP_clif_changed_dir) },
- { HP_POP(clif->charnameack, HP_clif_charnameack) },
+ { HP_POP(clif->blname_ack, HP_clif_blname_ack) },
+ { HP_POP(clif->pcname_ack, HP_clif_pcname_ack) },
+ { HP_POP(clif->homname_ack, HP_clif_homname_ack) },
+ { HP_POP(clif->mername_ack, HP_clif_mername_ack) },
+ { HP_POP(clif->petname_ack, HP_clif_petname_ack) },
+ { HP_POP(clif->npcname_ack, HP_clif_npcname_ack) },
+ { HP_POP(clif->mobname_ack, HP_clif_mobname_ack) },
+ { HP_POP(clif->mobname_guardian_ack, HP_clif_mobname_guardian_ack) },
+ { HP_POP(clif->mobname_additional_ack, HP_clif_mobname_additional_ack) },
+ { HP_POP(clif->mobname_normal_ack, HP_clif_mobname_normal_ack) },
+ { HP_POP(clif->chatname_ack, HP_clif_chatname_ack) },
+ { HP_POP(clif->elemname_ack, HP_clif_elemname_ack) },
+ { HP_POP(clif->unknownname_ack, HP_clif_unknownname_ack) },
{ HP_POP(clif->monster_hp_bar, HP_clif_monster_hp_bar) },
{ HP_POP(clif->hpmeter, HP_clif_hpmeter) },
{ HP_POP(clif->hpmeter_single, HP_clif_hpmeter_single) },
@@ -596,6 +615,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->joinchatok, HP_clif_joinchatok) },
{ HP_POP(clif->addchat, HP_clif_addchat) },
{ HP_POP(clif->changechatowner, HP_clif_changechatowner) },
+ { HP_POP(clif->chatRoleChange, HP_clif_chatRoleChange) },
{ HP_POP(clif->clearchat, HP_clif_clearchat) },
{ HP_POP(clif->leavechat, HP_clif_leavechat) },
{ HP_POP(clif->changechatstatus, HP_clif_changechatstatus) },
@@ -606,6 +626,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->broadcast2, HP_clif_broadcast2) },
{ HP_POP(clif->messagecolor_self, HP_clif_messagecolor_self) },
{ HP_POP(clif->messagecolor, HP_clif_messagecolor) },
+ { HP_POP(clif->serviceMessageColor, HP_clif_serviceMessageColor) },
{ HP_POP(clif->disp_overhead, HP_clif_disp_overhead) },
{ HP_POP(clif->notify_playerchat, HP_clif_notify_playerchat) },
{ HP_POP(clif->msgtable, HP_clif_msgtable) },
@@ -824,10 +845,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) },
{ HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) },
{ HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) },
+ { HP_POP(clif->roulette_close, HP_clif_roulette_close) },
{ HP_POP(clif->openmergeitem, HP_clif_openmergeitem) },
{ HP_POP(clif->cancelmergeitem, HP_clif_cancelmergeitem) },
{ HP_POP(clif->comparemergeitem, HP_clif_comparemergeitem) },
{ HP_POP(clif->ackmergeitems, HP_clif_ackmergeitems) },
+ { HP_POP(clif->mergeitems, HP_clif_mergeitems) },
{ HP_POP(clif->isdisguised, HP_clif_isdisguised) },
{ HP_POP(clif->navigate_to, HP_clif_navigate_to) },
{ HP_POP(clif->bl_type, HP_clif_bl_type) },
@@ -840,7 +863,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) },
{ HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) },
{ HP_POP(clif->pTickSend, HP_clif_pTickSend) },
- { HP_POP(clif->pHotkey, HP_clif_pHotkey) },
+ { HP_POP(clif->pHotkey1, HP_clif_pHotkey1) },
+ { HP_POP(clif->pHotkey2, HP_clif_pHotkey2) },
{ HP_POP(clif->pProgressbar, HP_clif_pProgressbar) },
{ HP_POP(clif->pWalkToXY, HP_clif_pWalkToXY) },
{ HP_POP(clif->pQuitGame, HP_clif_pQuitGame) },
@@ -883,7 +907,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pChangeCart, HP_clif_pChangeCart) },
{ HP_POP(clif->pStatusUp, HP_clif_pStatusUp) },
{ HP_POP(clif->pSkillUp, HP_clif_pSkillUp) },
+ { HP_POP(clif->useSkillToIdReal, HP_clif_useSkillToIdReal) },
{ HP_POP(clif->pUseSkillToId, HP_clif_pUseSkillToId) },
+ { HP_POP(clif->pStartUseSkillToId, HP_clif_pStartUseSkillToId) },
+ { HP_POP(clif->pStopUseSkillToId, HP_clif_pStopUseSkillToId) },
{ HP_POP(clif->pUseSkillToId_homun, HP_clif_pUseSkillToId_homun) },
{ HP_POP(clif->pUseSkillToId_mercenary, HP_clif_pUseSkillToId_mercenary) },
{ HP_POP(clif->pUseSkillToPos, HP_clif_pUseSkillToPos) },
@@ -1047,6 +1074,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pCashShopBuy, HP_clif_pCashShopBuy) },
{ HP_POP(clif->pPartyTick, HP_clif_pPartyTick) },
{ HP_POP(clif->pGuildInvite2, HP_clif_pGuildInvite2) },
+ { HP_POP(clif->cashShopBuyAck, HP_clif_cashShopBuyAck) },
{ HP_POP(clif->pPartyBookingAddFilter, HP_clif_pPartyBookingAddFilter) },
{ HP_POP(clif->pPartyBookingSubFilter, HP_clif_pPartyBookingSubFilter) },
{ HP_POP(clif->pPartyBookingReqVolunteer, HP_clif_pPartyBookingReqVolunteer) },
@@ -1066,7 +1094,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) },
{ HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) },
{ HP_POP(clif->add_item_options, HP_clif_add_item_options) },
- { HP_POP(clif->pHotkeyRowShift, HP_clif_pHotkeyRowShift) },
+ { HP_POP(clif->pHotkeyRowShift1, HP_clif_pHotkeyRowShift1) },
+ { HP_POP(clif->pHotkeyRowShift2, HP_clif_pHotkeyRowShift2) },
{ HP_POP(clif->dressroom_open, HP_clif_dressroom_open) },
{ HP_POP(clif->pOneClick_ItemIdentify, HP_clif_pOneClick_ItemIdentify) },
{ HP_POP(clif->selectcart, HP_clif_selectcart) },
@@ -1119,15 +1148,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->ui_action, HP_clif_ui_action) },
{ HP_POP(clif->pPrivateAirshipRequest, HP_clif_pPrivateAirshipRequest) },
{ HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) },
- { HP_POP(clif->stylist_vector_init, HP_clif_stylist_vector_init) },
- { HP_POP(clif->stylist_vector_clear, HP_clif_stylist_vector_clear) },
- { HP_POP(clif->stylist_read_db_libconfig, HP_clif_stylist_read_db_libconfig) },
- { HP_POP(clif->stylist_read_db_libconfig_sub, HP_clif_stylist_read_db_libconfig_sub) },
- { HP_POP(clif->style_change_validate_requirements, HP_clif_style_change_validate_requirements) },
- { HP_POP(clif->stylist_send_rodexitem, HP_clif_stylist_send_rodexitem) },
{ HP_POP(clif->pReqStyleChange, HP_clif_pReqStyleChange) },
{ HP_POP(clif->pReqStyleChange2, HP_clif_pReqStyleChange2) },
- { HP_POP(clif->cz_req_style_change_sub, HP_clif_cz_req_style_change_sub) },
+ { HP_POP(clif->pStyleClose, HP_clif_pStyleClose) },
{ HP_POP(clif->style_change_response, HP_clif_style_change_response) },
{ HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) },
{ HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) },
@@ -1135,7 +1158,27 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pMemorialDungeonCommand, HP_clif_pMemorialDungeonCommand) },
{ HP_POP(clif->camera_showWindow, HP_clif_camera_showWindow) },
{ HP_POP(clif->camera_change, HP_clif_camera_change) },
+ { HP_POP(clif->pCameraInfo, HP_clif_pCameraInfo) },
{ HP_POP(clif->item_preview, HP_clif_item_preview) },
+ { HP_POP(clif->enchant_equipment, HP_clif_enchant_equipment) },
+ { HP_POP(clif->pReqRemainTime, HP_clif_pReqRemainTime) },
+ { HP_POP(clif->npc_barter_open, HP_clif_npc_barter_open) },
+ { HP_POP(clif->pNPCBarterClosed, HP_clif_pNPCBarterClosed) },
+ { HP_POP(clif->pNPCBarterPurchase, HP_clif_pNPCBarterPurchase) },
+ { HP_POP(clif->pClientVersion, HP_clif_pClientVersion) },
+ { HP_POP(clif->pPing, HP_clif_pPing) },
+ { HP_POP(clif->ping, HP_clif_ping) },
+ { HP_POP(clif->pingTimer, HP_clif_pingTimer) },
+ { HP_POP(clif->pingTimerSub, HP_clif_pingTimerSub) },
+ { HP_POP(clif->pResetCooldown, HP_clif_pResetCooldown) },
+ { HP_POP(clif->loadConfirm, HP_clif_loadConfirm) },
+ { HP_POP(clif->send_selforarea, HP_clif_send_selforarea) },
+ { HP_POP(clif->OpenRefineryUI, HP_clif_OpenRefineryUI) },
+ { HP_POP(clif->pAddItemRefineryUI, HP_clif_pAddItemRefineryUI) },
+ { HP_POP(clif->AddItemRefineryUIAck, HP_clif_AddItemRefineryUIAck) },
+ { HP_POP(clif->pRefineryUIClose, HP_clif_pRefineryUIClose) },
+ { HP_POP(clif->pRefineryUIRefine, HP_clif_pRefineryUIRefine) },
+ { HP_POP(clif->announce_refine_status, HP_clif_announce_refine_status) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -1471,6 +1514,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->rodex_updatemail, HP_intif_rodex_updatemail) },
{ HP_POP(intif->rodex_sendmail, HP_intif_rodex_sendmail) },
{ HP_POP(intif->rodex_checkname, HP_intif_rodex_checkname) },
+ { HP_POP(intif->pGetZenyAck, HP_intif_pGetZenyAck) },
+ { HP_POP(intif->pGetItemsAck, HP_intif_pGetItemsAck) },
{ HP_POP(intif->clan_kickoffline, HP_intif_clan_kickoffline) },
{ HP_POP(intif->clan_membercount, HP_intif_clan_membercount) },
{ HP_POP(intif->request_accinfo, HP_intif_request_accinfo) },
@@ -1632,6 +1677,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) },
{ HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) },
{ HP_POP(itemdb->lookup_const_mask, HP_itemdb_lookup_const_mask) },
+ { HP_POP(itemdb->addname_sub, HP_itemdb_addname_sub) },
/* libconfig_interface */
{ HP_POP(libconfig->read, HP_libconfig_read) },
{ HP_POP(libconfig->write, HP_libconfig_write) },
@@ -1982,6 +2028,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->ai_sub_lazy, HP_mob_ai_sub_lazy) },
{ HP_POP(mob->ai_lazy, HP_mob_ai_lazy) },
{ HP_POP(mob->ai_hard, HP_mob_ai_hard) },
+ { HP_POP(mob->setdropitem_options, HP_mob_setdropitem_options) },
{ HP_POP(mob->setdropitem, HP_mob_setdropitem) },
{ HP_POP(mob->setlootitem, HP_mob_setlootitem) },
{ HP_POP(mob->delay_item_drop, HP_mob_delay_item_drop) },
@@ -2015,6 +2062,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->clone_delete, HP_mob_clone_delete) },
{ HP_POP(mob->drop_adjust, HP_mob_drop_adjust) },
{ HP_POP(mob->item_dropratio_adjust, HP_mob_item_dropratio_adjust) },
+ { HP_POP(mob->read_optdrops_option, HP_mob_read_optdrops_option) },
+ { HP_POP(mob->read_optdrops_optslot, HP_mob_read_optdrops_optslot) },
+ { HP_POP(mob->read_optdrops_group, HP_mob_read_optdrops_group) },
+ { HP_POP(mob->read_optdrops_db, HP_mob_read_optdrops_db) },
{ HP_POP(mob->readdb, HP_mob_readdb) },
{ HP_POP(mob->lookup_const, HP_mob_lookup_const) },
{ HP_POP(mob->get_const, HP_mob_get_const) },
@@ -2025,6 +2076,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->read_db_drops_sub, HP_mob_read_db_drops_sub) },
{ HP_POP(mob->read_db_mvpdrops_sub, HP_mob_read_db_mvpdrops_sub) },
{ HP_POP(mob->read_db_mode_sub, HP_mob_read_db_mode_sub) },
+ { HP_POP(mob->read_db_drops_option, HP_mob_read_db_drops_option) },
{ HP_POP(mob->read_db_stats_sub, HP_mob_read_db_stats_sub) },
{ HP_POP(mob->name_constants, HP_mob_name_constants) },
{ HP_POP(mob->readdb_mobavail, HP_mob_readdb_mobavail) },
@@ -2040,6 +2092,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->set_item_drop_ratio, HP_mob_set_item_drop_ratio) },
{ HP_POP(mob->final_ratio_sub, HP_mob_final_ratio_sub) },
{ HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) },
+ { HP_POP(mob->destroy_drop_groups, HP_mob_destroy_drop_groups) },
{ HP_POP(mob->skill_db_libconfig, HP_mob_skill_db_libconfig) },
{ HP_POP(mob->skill_db_libconfig_sub, HP_mob_skill_db_libconfig_sub) },
{ HP_POP(mob->skill_db_libconfig_sub_skill, HP_mob_skill_db_libconfig_sub_skill) },
@@ -2168,13 +2221,19 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(npc->trader_pay, HP_npc_trader_pay) },
{ HP_POP(npc->trader_update, HP_npc_trader_update) },
{ HP_POP(npc->market_buylist, HP_npc_market_buylist) },
+ { HP_POP(npc->barter_buylist, HP_npc_barter_buylist) },
{ HP_POP(npc->trader_open, HP_npc_trader_open) },
{ HP_POP(npc->market_fromsql, HP_npc_market_fromsql) },
{ HP_POP(npc->market_tosql, HP_npc_market_tosql) },
{ HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) },
{ HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) },
+ { HP_POP(npc->barter_fromsql, HP_npc_barter_fromsql) },
+ { HP_POP(npc->barter_tosql, HP_npc_barter_tosql) },
+ { HP_POP(npc->barter_delfromsql, HP_npc_barter_delfromsql) },
+ { HP_POP(npc->barter_delfromsql_sub, HP_npc_barter_delfromsql_sub) },
{ HP_POP(npc->db_checkid, HP_npc_db_checkid) },
{ HP_POP(npc->refresh, HP_npc_refresh) },
+ { HP_POP(npc->questinfo_clear, HP_npc_questinfo_clear) },
{ HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) },
/* nullpo_interface */
{ HP_POP(nullpo->assert_report, HP_nullpo_assert_report) },
@@ -2492,6 +2551,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->check_basicskill, HP_pc_check_basicskill) },
{ HP_POP(pc->isDeathPenaltyJob, HP_pc_isDeathPenaltyJob) },
{ HP_POP(pc->has_second_costume, HP_pc_has_second_costume) },
+ { HP_POP(pc->expandInventory, HP_pc_expandInventory) },
/* pcre_interface */
{ HP_POP(libpcre->compile, HP_libpcre_compile) },
{ HP_POP(libpcre->study, HP_libpcre_study) },
@@ -2573,7 +2633,23 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(quest->questinfo_validate_homunculus_type, HP_quest_questinfo_validate_homunculus_type) },
{ HP_POP(quest->questinfo_validate_quests, HP_quest_questinfo_validate_quests) },
{ HP_POP(quest->questinfo_validate_mercenary_class, HP_quest_questinfo_validate_mercenary_class) },
- { HP_POP(quest->questinfo_vector_clear, HP_quest_questinfo_vector_clear) },
+/* refine_interface */
+ { HP_POP(refine->init, HP_refine_init) },
+ { HP_POP(refine->final, HP_refine_final) },
+ { HP_POP(refine->get_refine_chance, HP_refine_get_refine_chance) },
+ { HP_POP(refine->get_bonus, HP_refine_get_bonus) },
+ { HP_POP(refine->get_randombonus_max, HP_refine_get_randombonus_max) },
+ { HP_POP(refine->refinery_add_item, HP_refine_refinery_add_item) },
+ { HP_POP(refine->refinery_refine_request, HP_refine_refinery_refine_request) },
+/* refine_interface_private */
+ { HP_POP(refine->p->readdb_refine_libconfig_sub, HP_PRIV__refine_readdb_refine_libconfig_sub) },
+ { HP_POP(refine->p->readdb_refine_libconfig, HP_PRIV__refine_readdb_refine_libconfig) },
+ { HP_POP(refine->p->announce_behavior_string2enum, HP_PRIV__refine_announce_behavior_string2enum) },
+ { HP_POP(refine->p->failure_behavior_string2enum, HP_PRIV__refine_failure_behavior_string2enum) },
+ { HP_POP(refine->p->readdb_refinery_ui_settings_items, HP_PRIV__refine_readdb_refinery_ui_settings_items) },
+ { HP_POP(refine->p->readdb_refinery_ui_settings_sub, HP_PRIV__refine_readdb_refinery_ui_settings_sub) },
+ { HP_POP(refine->p->readdb_refinery_ui_settings, HP_PRIV__refine_readdb_refinery_ui_settings) },
+ { HP_POP(refine->p->is_refinable, HP_PRIV__refine_is_refinable) },
/* rnd_interface */
{ HP_POP(rnd->init, HP_rnd_init) },
{ HP_POP(rnd->final, HP_rnd_final) },
@@ -2601,6 +2677,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(rodex->get_items, HP_rodex_get_items) },
{ HP_POP(rodex->delete_mail, HP_rodex_delete_mail) },
{ HP_POP(rodex->clean, HP_rodex_clean) },
+ { HP_POP(rodex->getZenyAck, HP_rodex_getZenyAck) },
+ { HP_POP(rodex->getItemsAck, HP_rodex_getItemsAck) },
/* script_interface */
{ HP_POP(script->init, HP_script_init) },
{ HP_POP(script->final, HP_script_final) },
@@ -3065,6 +3143,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
{ HP_POP(sockt->flush, HP_sockt_flush) },
{ HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->connect_client, HP_sockt_connect_client) },
{ HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
{ HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
{ HP_POP(sockt->host2ip, HP_sockt_host2ip) },
@@ -3114,7 +3193,6 @@ struct HookingPointData HookingPoints[] = {
/* status_interface */
{ HP_POP(status->init, HP_status_init) },
{ HP_POP(status->final, HP_status_final) },
- { HP_POP(status->get_refine_chance, HP_status_get_refine_chance) },
{ HP_POP(status->skill2sc, HP_status_skill2sc) },
{ HP_POP(status->sc2skill, HP_status_sc2skill) },
{ HP_POP(status->sc2scb_flag, HP_status_sc2scb_flag) },
@@ -3230,8 +3308,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->natural_heal_timer, HP_status_natural_heal_timer) },
{ HP_POP(status->readdb_job2, HP_status_readdb_job2) },
{ HP_POP(status->readdb_sizefix, HP_status_readdb_sizefix) },
- { HP_POP(status->readdb_refine_libconfig, HP_status_readdb_refine_libconfig) },
- { HP_POP(status->readdb_refine_libconfig_sub, HP_status_readdb_refine_libconfig_sub) },
{ HP_POP(status->readdb_scconfig, HP_status_readdb_scconfig) },
{ HP_POP(status->read_job_db, HP_status_read_job_db) },
{ HP_POP(status->read_job_db_sub, HP_status_read_job_db_sub) },
@@ -3280,6 +3356,16 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) },
{ HP_POP(strlib->strline_, HP_strlib_strline_) },
{ HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) },
+/* stylist_interface */
+ { HP_POP(stylist->init, HP_stylist_init) },
+ { HP_POP(stylist->final, HP_stylist_final) },
+ { HP_POP(stylist->vector_init, HP_stylist_vector_init) },
+ { HP_POP(stylist->vector_clear, HP_stylist_vector_clear) },
+ { HP_POP(stylist->read_db_libconfig, HP_stylist_read_db_libconfig) },
+ { HP_POP(stylist->read_db_libconfig_sub, HP_stylist_read_db_libconfig_sub) },
+ { HP_POP(stylist->request_style_change, HP_stylist_request_style_change) },
+ { HP_POP(stylist->validate_requirements, HP_stylist_validate_requirements) },
+ { HP_POP(stylist->send_rodexitem, HP_stylist_send_rodexitem) },
/* sv_interface */
{ HP_POP(sv->parse_next, HP_sv_parse_next) },
{ HP_POP(sv->parse, HP_sv_parse) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index af1f11fe2..b31959ff4 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -9786,10 +9786,10 @@ void HP_clif_item_drop_announce(struct map_session_data *sd, int nameid, char *m
}
return;
}
-void HP_clif_clearunit_single(int id, clr_type type, int fd) {
+void HP_clif_clearunit_single(int id, enum clr_type type, int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_clearunit_single_pre > 0) {
- void (*preHookFunc) (int *id, clr_type *type, int *fd);
+ void (*preHookFunc) (int *id, enum clr_type *type, int *fd);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_single_pre[hIndex].func;
@@ -9804,7 +9804,7 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) {
HPMHooks.source.clif.clearunit_single(id, type, fd);
}
if (HPMHooks.count.HP_clif_clearunit_single_post > 0) {
- void (*postHookFunc) (int id, clr_type type, int fd);
+ void (*postHookFunc) (int id, enum clr_type type, int fd);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_clearunit_single_post[hIndex].func;
postHookFunc(id, type, fd);
@@ -9812,10 +9812,10 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) {
}
return;
}
-void HP_clif_clearunit_area(struct block_list *bl, clr_type type) {
+void HP_clif_clearunit_area(struct block_list *bl, enum clr_type type) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_clearunit_area_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, clr_type *type);
+ void (*preHookFunc) (struct block_list **bl, enum clr_type *type);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_area_pre[hIndex].func;
@@ -9830,7 +9830,7 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) {
HPMHooks.source.clif.clearunit_area(bl, type);
}
if (HPMHooks.count.HP_clif_clearunit_area_post > 0) {
- void (*postHookFunc) (struct block_list *bl, clr_type type);
+ void (*postHookFunc) (struct block_list *bl, enum clr_type type);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_clearunit_area_post[hIndex].func;
postHookFunc(bl, type);
@@ -9838,10 +9838,10 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) {
}
return;
}
-void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) {
+void HP_clif_clearunit_delayed(struct block_list *bl, enum clr_type type, int64 tick) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_clearunit_delayed_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, clr_type *type, int64 *tick);
+ void (*preHookFunc) (struct block_list **bl, enum clr_type *type, int64 *tick);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_pre[hIndex].func;
@@ -9856,7 +9856,7 @@ void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick)
HPMHooks.source.clif.clearunit_delayed(bl, type, tick);
}
if (HPMHooks.count.HP_clif_clearunit_delayed_post > 0) {
- void (*postHookFunc) (struct block_list *bl, clr_type type, int64 tick);
+ void (*postHookFunc) (struct block_list *bl, enum clr_type type, int64 tick);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_post[hIndex].func;
postHookFunc(bl, type, tick);
@@ -11591,14 +11591,14 @@ void HP_clif_pRanklist(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_hotkeys(struct map_session_data *sd) {
+void HP_clif_hotkeys(struct map_session_data *sd, int tab) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_hotkeys_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd);
+ void (*preHookFunc) (struct map_session_data **sd, int *tab);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_hotkeys_pre[hIndex].func;
- preHookFunc(&sd);
+ preHookFunc(&sd, &tab);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -11606,12 +11606,38 @@ void HP_clif_hotkeys(struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.hotkeys(sd);
+ HPMHooks.source.clif.hotkeys(sd, tab);
}
if (HPMHooks.count.HP_clif_hotkeys_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd);
+ void (*postHookFunc) (struct map_session_data *sd, int tab);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_hotkeys_post[hIndex].func;
+ postHookFunc(sd, tab);
+ }
+ }
+ return;
+}
+void HP_clif_hotkeysAll(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_hotkeysAll_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_hotkeysAll_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.hotkeysAll(sd);
+ }
+ if (HPMHooks.count.HP_clif_hotkeysAll_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_hotkeysAll_post[hIndex].func;
postHookFunc(sd);
}
}
@@ -12125,6 +12151,162 @@ void HP_clif_cartItems(struct map_session_data *sd, enum inventory_type type) {
}
return;
}
+void HP_clif_inventoryExpansionInfo(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_inventoryExpansionInfo_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpansionInfo_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_inventoryExpansionInfo_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.inventoryExpansionInfo(sd);
+ }
+ if (HPMHooks.count.HP_clif_inventoryExpansionInfo_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpansionInfo_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_inventoryExpansionInfo_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_inventoryExpandAck(struct map_session_data *sd, enum expand_inventory result, int itemId) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_inventoryExpandAck_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum expand_inventory *result, int *itemId);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_inventoryExpandAck_pre[hIndex].func;
+ preHookFunc(&sd, &result, &itemId);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.inventoryExpandAck(sd, result, itemId);
+ }
+ if (HPMHooks.count.HP_clif_inventoryExpandAck_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum expand_inventory result, int itemId);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_inventoryExpandAck_post[hIndex].func;
+ postHookFunc(sd, result, itemId);
+ }
+ }
+ return;
+}
+void HP_clif_inventoryExpandResult(struct map_session_data *sd, enum expand_inventory_result result) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_inventoryExpandResult_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum expand_inventory_result *result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandResult_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_inventoryExpandResult_pre[hIndex].func;
+ preHookFunc(&sd, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.inventoryExpandResult(sd, result);
+ }
+ if (HPMHooks.count.HP_clif_inventoryExpandResult_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum expand_inventory_result result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandResult_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_inventoryExpandResult_post[hIndex].func;
+ postHookFunc(sd, result);
+ }
+ }
+ return;
+}
+void HP_clif_pInventoryExpansion(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pInventoryExpansion_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansion_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansion_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pInventoryExpansion(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pInventoryExpansion_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansion_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansion_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pInventoryExpansionConfirmed(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionConfirmed_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pInventoryExpansionConfirmed(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionConfirmed_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pInventoryExpansionRejected(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pInventoryExpansionRejected_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionRejected_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionRejected_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pInventoryExpansionRejected(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pInventoryExpansionRejected_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionRejected_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionRejected_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ 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) {
@@ -12463,13 +12645,325 @@ void HP_clif_changed_dir(struct block_list *bl, enum send_target target) {
}
return;
}
-void HP_clif_charnameack(int fd, struct block_list *bl) {
+void HP_clif_blname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_blname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_blname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.blname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_blname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_blname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_pcname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pcname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pcname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pcname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_pcname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pcname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_homname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_homname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_homname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.homname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_homname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_homname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_mername_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_mername_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_mername_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mername_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_mername_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_mername_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_petname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_petname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_petname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.petname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_petname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_petname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_npcname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_npcname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_npcname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.npcname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_npcname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_npcname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_mobname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_mobname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_mobname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mobname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_mobname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_mobname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_mobname_guardian_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_mobname_guardian_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mobname_guardian_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_mobname_guardian_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_mobname_additional_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_mobname_additional_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mobname_additional_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_mobname_additional_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_mobname_normal_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_mobname_normal_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mobname_normal_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_mobname_normal_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_chatname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_chatname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_chatname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chatname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_chatname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_chatname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_elemname_ack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_elemname_ack_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_elemname_ack_pre[hIndex].func;
+ preHookFunc(&fd, &bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.elemname_ack(fd, bl);
+ }
+ if (HPMHooks.count.HP_clif_elemname_ack_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_elemname_ack_post[hIndex].func;
+ postHookFunc(fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_unknownname_ack(int fd, struct block_list *bl) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_charnameack_pre > 0) {
+ if (HPMHooks.count.HP_clif_unknownname_ack_pre > 0) {
void (*preHookFunc) (int *fd, struct block_list **bl);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_charnameack_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_unknownname_ack_pre[hIndex].func;
preHookFunc(&fd, &bl);
}
if (*HPMforce_return) {
@@ -12478,12 +12972,12 @@ void HP_clif_charnameack(int fd, struct block_list *bl) {
}
}
{
- HPMHooks.source.clif.charnameack(fd, bl);
+ HPMHooks.source.clif.unknownname_ack(fd, bl);
}
- if (HPMHooks.count.HP_clif_charnameack_post > 0) {
+ if (HPMHooks.count.HP_clif_unknownname_ack_post > 0) {
void (*postHookFunc) (int fd, struct block_list *bl);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_charnameack_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_unknownname_ack_post[hIndex].func;
postHookFunc(fd, bl);
}
}
@@ -14924,6 +15418,32 @@ void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd)
}
return;
}
+void HP_clif_chatRoleChange(struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_chatRoleChange_pre > 0) {
+ void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_chatRoleChange_pre[hIndex].func;
+ preHookFunc(&cd, &sd, &bl, &isNotOwner);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chatRoleChange(cd, sd, bl, isNotOwner);
+ }
+ if (HPMHooks.count.HP_clif_chatRoleChange_post > 0) {
+ void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_chatRoleChange_post[hIndex].func;
+ postHookFunc(cd, sd, bl, isNotOwner);
+ }
+ }
+ return;
+}
void HP_clif_clearchat(struct chat_data *cd, int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_clearchat_pre > 0) {
@@ -15184,6 +15704,32 @@ void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg)
}
return;
}
+void HP_clif_serviceMessageColor(struct map_session_data *sd, uint32 color, const char *msg) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_serviceMessageColor_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, uint32 *color, const char **msg);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_serviceMessageColor_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_serviceMessageColor_pre[hIndex].func;
+ preHookFunc(&sd, &color, &msg);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.serviceMessageColor(sd, color, msg);
+ }
+ if (HPMHooks.count.HP_clif_serviceMessageColor_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, uint32 color, const char *msg);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_serviceMessageColor_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_serviceMessageColor_post[hIndex].func;
+ postHookFunc(sd, color, msg);
+ }
+ }
+ return;
+}
void HP_clif_disp_overhead(struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_disp_overhead_pre > 0) {
@@ -15576,14 +16122,14 @@ void HP_clif_PMIgnoreList(struct map_session_data *sd) {
}
return;
}
-void HP_clif_ShowScript(struct block_list *bl, const char *message) {
+void HP_clif_ShowScript(struct block_list *bl, const char *message, enum send_target target) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_ShowScript_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, const char **message);
+ void (*preHookFunc) (struct block_list **bl, const char **message, enum send_target *target);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_ShowScript_pre[hIndex].func;
- preHookFunc(&bl, &message);
+ preHookFunc(&bl, &message, &target);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -15591,13 +16137,13 @@ void HP_clif_ShowScript(struct block_list *bl, const char *message) {
}
}
{
- HPMHooks.source.clif.ShowScript(bl, message);
+ HPMHooks.source.clif.ShowScript(bl, message, target);
}
if (HPMHooks.count.HP_clif_ShowScript_post > 0) {
- void (*postHookFunc) (struct block_list *bl, const char *message);
+ void (*postHookFunc) (struct block_list *bl, const char *message, enum send_target target);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_ShowScript_post[hIndex].func;
- postHookFunc(bl, message);
+ postHookFunc(bl, message, target);
}
}
return;
@@ -20841,10 +21387,10 @@ bool HP_clif_parse_roulette_db(void) {
}
return retVal___;
}
-void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID) {
+void HP_clif_roulette_generate_ack(struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_roulette_generate_ack_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, int *bonusItemID);
+ void (*preHookFunc) (struct map_session_data **sd, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_pre[hIndex].func;
@@ -20859,7 +21405,7 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re
HPMHooks.source.clif.roulette_generate_ack(sd, result, stage, prizeIdx, bonusItemID);
}
if (HPMHooks.count.HP_clif_roulette_generate_ack_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, int bonusItemID);
+ void (*postHookFunc) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_post[hIndex].func;
postHookFunc(sd, result, stage, prizeIdx, bonusItemID);
@@ -20867,6 +21413,32 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re
}
return;
}
+void HP_clif_roulette_close(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_roulette_close_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_roulette_close_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.roulette_close(sd);
+ }
+ if (HPMHooks.count.HP_clif_roulette_close_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_roulette_close_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
void HP_clif_openmergeitem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_openmergeitem_pre > 0) {
@@ -20972,6 +21544,32 @@ void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) {
}
return;
}
+void HP_clif_mergeitems(int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_mergeitems_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_mergeitems_pre[hIndex].func;
+ preHookFunc(&fd, &sd, &index, &amount, &reason);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mergeitems(fd, sd, index, amount, reason);
+ }
+ if (HPMHooks.count.HP_clif_mergeitems_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_mergeitems_post[hIndex].func;
+ postHookFunc(fd, sd, index, amount, reason);
+ }
+ }
+ return;
+}
bool HP_clif_isdisguised(struct block_list *bl) {
int hIndex = 0;
bool retVal___ = false;
@@ -21286,13 +21884,13 @@ void HP_clif_pTickSend(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_pHotkey(int fd, struct map_session_data *sd) {
+void HP_clif_pHotkey1(int fd, struct map_session_data *sd) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_pHotkey_pre > 0) {
+ if (HPMHooks.count.HP_clif_pHotkey1_pre > 0) {
void (*preHookFunc) (int *fd, struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_pHotkey_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey1_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pHotkey1_pre[hIndex].func;
preHookFunc(&fd, &sd);
}
if (*HPMforce_return) {
@@ -21301,12 +21899,38 @@ void HP_clif_pHotkey(int fd, struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.pHotkey(fd, sd);
+ HPMHooks.source.clif.pHotkey1(fd, sd);
}
- if (HPMHooks.count.HP_clif_pHotkey_post > 0) {
+ if (HPMHooks.count.HP_clif_pHotkey1_post > 0) {
void (*postHookFunc) (int fd, struct map_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_pHotkey_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey1_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pHotkey1_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHotkey2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pHotkey2_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey2_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pHotkey2_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHotkey2(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pHotkey2_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey2_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pHotkey2_post[hIndex].func;
postHookFunc(fd, sd);
}
}
@@ -22404,6 +23028,32 @@ void HP_clif_pSkillUp(int fd, struct map_session_data *sd) {
}
return;
}
+void HP_clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_useSkillToIdReal_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd, int *skill_id, int *skill_lv, int *target_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useSkillToIdReal_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_useSkillToIdReal_pre[hIndex].func;
+ preHookFunc(&fd, &sd, &skill_id, &skill_lv, &target_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.useSkillToIdReal(fd, sd, skill_id, skill_lv, target_id);
+ }
+ if (HPMHooks.count.HP_clif_useSkillToIdReal_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useSkillToIdReal_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_useSkillToIdReal_post[hIndex].func;
+ postHookFunc(fd, sd, skill_id, skill_lv, target_id);
+ }
+ }
+ return;
+}
void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_pUseSkillToId_pre > 0) {
@@ -22430,6 +23080,58 @@ void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) {
}
return;
}
+void HP_clif_pStartUseSkillToId(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pStartUseSkillToId_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStartUseSkillToId_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pStartUseSkillToId_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pStartUseSkillToId(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pStartUseSkillToId_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStartUseSkillToId_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pStartUseSkillToId_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pStopUseSkillToId(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pStopUseSkillToId_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopUseSkillToId_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pStopUseSkillToId_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pStopUseSkillToId(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pStopUseSkillToId_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopUseSkillToId_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pStopUseSkillToId_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_pUseSkillToId_homun_pre > 0) {
@@ -26668,6 +27370,32 @@ void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) {
}
return;
}
+void HP_clif_cashShopBuyAck(int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_cashShopBuyAck_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_pre[hIndex].func;
+ preHookFunc(&fd, &sd, &itemId, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cashShopBuyAck(fd, sd, itemId, result);
+ }
+ if (HPMHooks.count.HP_clif_cashShopBuyAck_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_post[hIndex].func;
+ postHookFunc(fd, sd, itemId, result);
+ }
+ }
+ return;
+}
void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre > 0) {
@@ -27163,13 +27891,13 @@ int HP_clif_add_item_options(struct ItemOptions *buf, const struct item *it) {
}
return retVal___;
}
-void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) {
+void HP_clif_pHotkeyRowShift1(int fd, struct map_session_data *sd) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_pHotkeyRowShift_pre > 0) {
+ if (HPMHooks.count.HP_clif_pHotkeyRowShift1_pre > 0) {
void (*preHookFunc) (int *fd, struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift1_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift1_pre[hIndex].func;
preHookFunc(&fd, &sd);
}
if (*HPMforce_return) {
@@ -27178,12 +27906,38 @@ void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.pHotkeyRowShift(fd, sd);
+ HPMHooks.source.clif.pHotkeyRowShift1(fd, sd);
}
- if (HPMHooks.count.HP_clif_pHotkeyRowShift_post > 0) {
+ if (HPMHooks.count.HP_clif_pHotkeyRowShift1_post > 0) {
void (*postHookFunc) (int fd, struct map_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift1_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift1_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHotkeyRowShift2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pHotkeyRowShift2_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift2_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift2_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHotkeyRowShift2(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pHotkeyRowShift2_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift2_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift2_post[hIndex].func;
postHookFunc(fd, sd);
}
}
@@ -27788,10 +28542,10 @@ void HP_clif_pRodexCheckName(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name) {
+void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_rodex_checkname_result_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name);
+ void (*preHookFunc) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_pre[hIndex].func;
@@ -27806,7 +28560,7 @@ void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, sh
HPMHooks.source.clif.rodex_checkname_result(sd, char_id, class_, base_level, name);
}
if (HPMHooks.count.HP_clif_rodex_checkname_result_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name);
+ void (*postHookFunc) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_post[hIndex].func;
postHookFunc(sd, char_id, class_, base_level, name);
@@ -28546,165 +29300,6 @@ void HP_clif_PrivateAirshipResponse(struct map_session_data *sd, uint32 flag) {
}
return;
}
-void HP_clif_stylist_vector_init(void) {
- int hIndex = 0;
- if (HPMHooks.count.HP_clif_stylist_vector_init_pre > 0) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_pre[hIndex].func;
- preHookFunc();
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.stylist_vector_init();
- }
- if (HPMHooks.count.HP_clif_stylist_vector_init_post > 0) {
- void (*postHookFunc) (void);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_clif_stylist_vector_clear(void) {
- int hIndex = 0;
- if (HPMHooks.count.HP_clif_stylist_vector_clear_pre > 0) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_pre[hIndex].func;
- preHookFunc();
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.stylist_vector_clear();
- }
- if (HPMHooks.count.HP_clif_stylist_vector_clear_post > 0) {
- void (*postHookFunc) (void);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-bool HP_clif_stylist_read_db_libconfig(void) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre > 0) {
- bool (*preHookFunc) (void);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_pre[hIndex].func;
- retVal___ = preHookFunc();
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig();
- }
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_post > 0) {
- bool (*postHookFunc) (bool retVal___);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
- }
- }
- return retVal___;
-}
-bool HP_clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre > 0) {
- bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_pre[hIndex].func;
- retVal___ = preHookFunc(&it, &idx, &source);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig_sub(it, idx, source);
- }
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, it, idx, source);
- }
- }
- return retVal___;
-}
-bool HP_clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_clif_style_change_validate_requirements_pre > 0) {
- bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &type, &idx);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.style_change_validate_requirements(sd, type, idx);
- }
- if (HPMHooks.count.HP_clif_style_change_validate_requirements_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, type, idx);
- }
- }
- return retVal___;
-}
-void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int itemid) {
- int hIndex = 0;
- if (HPMHooks.count.HP_clif_stylist_send_rodexitem_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *itemid);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_pre[hIndex].func;
- preHookFunc(&sd, &itemid);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.stylist_send_rodexitem(sd, itemid);
- }
- if (HPMHooks.count.HP_clif_stylist_send_rodexitem_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int itemid);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_post[hIndex].func;
- postHookFunc(sd, itemid);
- }
- }
- return;
-}
void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_pReqStyleChange_pre > 0) {
@@ -28757,14 +29352,14 @@ void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem) {
+void HP_clif_pStyleClose(int fd, struct map_session_data *sd) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_cz_req_style_change_sub_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
+ if (HPMHooks.count.HP_clif_pStyleClose_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_pre[hIndex].func;
- preHookFunc(&sd, &type, &idx, &isitem);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pStyleClose_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -28772,13 +29367,13 @@ void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int1
}
}
{
- HPMHooks.source.clif.cz_req_style_change_sub(sd, type, idx, isitem);
+ HPMHooks.source.clif.pStyleClose(fd, sd);
}
- if (HPMHooks.count.HP_clif_cz_req_style_change_sub_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_post[hIndex].func;
- postHookFunc(sd, type, idx, isitem);
+ if (HPMHooks.count.HP_clif_pStyleClose_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pStyleClose_post[hIndex].func;
+ postHookFunc(fd, sd);
}
}
return;
@@ -28965,6 +29560,32 @@ void HP_clif_camera_change(struct map_session_data *sd, float range, float rotat
}
return;
}
+void HP_clif_pCameraInfo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pCameraInfo_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCameraInfo_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pCameraInfo_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCameraInfo(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pCameraInfo_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCameraInfo_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pCameraInfo_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_clif_item_preview(struct map_session_data *sd, int n) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_item_preview_pre > 0) {
@@ -28991,6 +29612,509 @@ void HP_clif_item_preview(struct map_session_data *sd, int n) {
}
return;
}
+bool HP_clif_enchant_equipment(struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_clif_enchant_equipment_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, enum equip_pos *pos, int *cardSlot, int *cardId);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_enchant_equipment_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_enchant_equipment_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &pos, &cardSlot, &cardId);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.enchant_equipment(sd, pos, cardSlot, cardId);
+ }
+ if (HPMHooks.count.HP_clif_enchant_equipment_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_enchant_equipment_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_enchant_equipment_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, pos, cardSlot, cardId);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_pReqRemainTime(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pReqRemainTime_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqRemainTime_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pReqRemainTime_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pReqRemainTime(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pReqRemainTime_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqRemainTime_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pReqRemainTime_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_npc_barter_open(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_npc_barter_open_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_barter_open_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_npc_barter_open_pre[hIndex].func;
+ preHookFunc(&sd, &nd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.npc_barter_open(sd, nd);
+ }
+ if (HPMHooks.count.HP_clif_npc_barter_open_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_barter_open_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_npc_barter_open_post[hIndex].func;
+ postHookFunc(sd, nd);
+ }
+ }
+ return;
+}
+void HP_clif_pNPCBarterClosed(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pNPCBarterClosed_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterClosed_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pNPCBarterClosed_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNPCBarterClosed(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pNPCBarterClosed_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterClosed_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pNPCBarterClosed_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNPCBarterPurchase(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pNPCBarterPurchase_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterPurchase_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pNPCBarterPurchase_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNPCBarterPurchase(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pNPCBarterPurchase_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterPurchase_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pNPCBarterPurchase_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pClientVersion(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pClientVersion_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pClientVersion_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pClientVersion(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pClientVersion_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pClientVersion_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPing(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pPing_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pPing_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPing(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pPing_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pPing_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_ping(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_ping_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_ping_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.ping(sd);
+ }
+ if (HPMHooks.count.HP_clif_ping_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_ping_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_clif_pingTimer(int tid, int64 tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_clif_pingTimer_pre > 0) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pingTimer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.pingTimer(tid, tick, id, data);
+ }
+ if (HPMHooks.count.HP_clif_pingTimer_post > 0) {
+ int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pingTimer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, tid, tick, id, data);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_pingTimerSub(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_clif_pingTimerSub_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd, va_list ap);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_pre; hIndex++) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_pingTimerSub_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.pingTimerSub(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if (HPMHooks.count.HP_clif_pingTimerSub_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_post; hIndex++) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_pingTimerSub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_pResetCooldown(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pResetCooldown_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pResetCooldown_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pResetCooldown(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pResetCooldown_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pResetCooldown_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_loadConfirm(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_loadConfirm_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_loadConfirm_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.loadConfirm(sd);
+ }
+ if (HPMHooks.count.HP_clif_loadConfirm_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_loadConfirm_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_send_selforarea(int fd, struct block_list *bl, const void *buf, int len) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_send_selforarea_pre > 0) {
+ void (*preHookFunc) (int *fd, struct block_list **bl, const void **buf, int *len);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_send_selforarea_pre[hIndex].func;
+ preHookFunc(&fd, &bl, &buf, &len);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.send_selforarea(fd, bl, buf, len);
+ }
+ if (HPMHooks.count.HP_clif_send_selforarea_post > 0) {
+ void (*postHookFunc) (int fd, struct block_list *bl, const void *buf, int len);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_send_selforarea_post[hIndex].func;
+ postHookFunc(fd, bl, buf, len);
+ }
+ }
+ return;
+}
+void HP_clif_OpenRefineryUI(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_OpenRefineryUI_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.OpenRefineryUI(sd);
+ }
+ if (HPMHooks.count.HP_clif_OpenRefineryUI_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAddItemRefineryUI(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pAddItemRefineryUI_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAddItemRefineryUI(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pAddItemRefineryUI_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_AddItemRefineryUIAck(struct map_session_data *sd, int item_index, struct s_refine_requirement *req) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_pre[hIndex].func;
+ preHookFunc(&sd, &item_index, &req);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.AddItemRefineryUIAck(sd, item_index, req);
+ }
+ if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_post[hIndex].func;
+ postHookFunc(sd, item_index, req);
+ }
+ }
+ return;
+}
+void HP_clif_pRefineryUIClose(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pRefineryUIClose_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRefineryUIClose(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pRefineryUIClose_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pRefineryUIRefine(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pRefineryUIRefine_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRefineryUIRefine(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pRefineryUIRefine_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_announce_refine_status(struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_announce_refine_status_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_announce_refine_status_pre[hIndex].func;
+ preHookFunc(&sd, &item_id, &refine_level, &success, &target);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.announce_refine_status(sd, item_id, refine_level, success, target);
+ }
+ if (HPMHooks.count.HP_clif_announce_refine_status_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_announce_refine_status_post[hIndex].func;
+ postHookFunc(sd, item_id, refine_level, success, target);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;
@@ -32195,11 +33319,11 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) {
}
return retVal___;
}
-int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login) {
+int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_guild_recv_memberinfoshort_pre > 0) {
- int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login);
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func;
@@ -32214,7 +33338,7 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int
retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class, last_login);
}
if (HPMHooks.count.HP_guild_recv_memberinfoshort_post > 0) {
- int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login);
+ int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login);
for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func;
retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class, last_login);
@@ -34342,11 +35466,11 @@ bool HP_homun_levelup(struct homun_data *hd) {
}
return retVal___;
}
-int HP_homun_change_class(struct homun_data *hd, short class_) {
+int HP_homun_change_class(struct homun_data *hd, int class_) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_homun_change_class_pre > 0) {
- int (*preHookFunc) (struct homun_data **hd, short *class_);
+ int (*preHookFunc) (struct homun_data **hd, int *class_);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_homun_change_class_pre[hIndex].func;
@@ -34361,7 +35485,7 @@ int HP_homun_change_class(struct homun_data *hd, short class_) {
retVal___ = HPMHooks.source.homun.change_class(hd, class_);
}
if (HPMHooks.count.HP_homun_change_class_post > 0) {
- int (*postHookFunc) (int retVal___, struct homun_data *hd, short class_);
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, int class_);
for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_homun_change_class_post[hIndex].func;
retVal___ = postHookFunc(retVal___, hd, class_);
@@ -35739,11 +36863,11 @@ int HP_intif_parse(int fd) {
}
return retVal___;
}
-int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) {
+int HP_intif_create_pet(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_intif_create_pet_pre > 0) {
- int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
+ int (*preHookFunc) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func;
@@ -35758,7 +36882,7 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l
retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
}
if (HPMHooks.count.HP_intif_create_pet_post > 0) {
- int (*postHookFunc) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
+ int (*postHookFunc) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func;
retVal___ = postHookFunc(retVal___, account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
@@ -36412,11 +37536,11 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co
}
return retVal___;
}
-int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) {
+int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_intif_guild_memberinfoshort_pre > 0) {
- int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func;
@@ -36431,7 +37555,7 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in
retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class);
}
if (HPMHooks.count.HP_intif_guild_memberinfoshort_post > 0) {
- int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_post[hIndex].func;
retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class);
@@ -37625,15 +38749,15 @@ int HP_intif_rodex_checkhasnew(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) {
+int HP_intif_rodex_updatemail(struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_intif_rodex_updatemail_pre > 0) {
- int (*preHookFunc) (int64 *mail_id, int8 *flag);
+ int (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_pre[hIndex].func;
- retVal___ = preHookFunc(&mail_id, &flag);
+ retVal___ = preHookFunc(&sd, &mail_id, &opentype, &flag);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -37641,13 +38765,13 @@ int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) {
}
}
{
- retVal___ = HPMHooks.source.intif.rodex_updatemail(mail_id, flag);
+ retVal___ = HPMHooks.source.intif.rodex_updatemail(sd, mail_id, opentype, flag);
}
if (HPMHooks.count.HP_intif_rodex_updatemail_post > 0) {
- int (*postHookFunc) (int retVal___, int64 mail_id, int8 flag);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mail_id, flag);
+ retVal___ = postHookFunc(retVal___, sd, mail_id, opentype, flag);
}
}
return retVal___;
@@ -37706,6 +38830,58 @@ int HP_intif_rodex_checkname(struct map_session_data *sd, const char *name) {
}
return retVal___;
}
+void HP_intif_pGetZenyAck(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_pGetZenyAck_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGetZenyAck(fd);
+ }
+ if (HPMHooks.count.HP_intif_pGetZenyAck_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGetItemsAck(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_pGetItemsAck_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGetItemsAck(fd);
+ }
+ if (HPMHooks.count.HP_intif_pGetItemsAck_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
int HP_intif_clan_kickoffline(int clan_id, int kick_interval) {
int hIndex = 0;
int retVal___ = 0;
@@ -41926,6 +43102,39 @@ bool HP_itemdb_lookup_const_mask(const struct config_setting_t *it, const char *
}
return retVal___;
}
+int HP_itemdb_addname_sub(union DBKey key, struct DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_itemdb_addname_sub_pre > 0) {
+ int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_addname_sub_pre; hIndex++) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_itemdb_addname_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, &data, ap___copy);
+ va_end(ap___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.itemdb.addname_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if (HPMHooks.count.HP_itemdb_addname_sub_post > 0) {
+ int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_addname_sub_post; hIndex++) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_itemdb_addname_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
/* libconfig_interface */
int HP_libconfig_read(struct config_t *config, FILE *stream) {
int hIndex = 0;
@@ -44303,15 +45512,15 @@ char HP_logs_chattype2char(e_log_chat_type type) {
}
return retVal___;
}
-bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) {
+bool HP_logs_should_log_item(int nameid, int amount, int refine_level, struct item_data *id) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_logs_should_log_item_pre > 0) {
- bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data **id);
+ bool (*preHookFunc) (int *nameid, int *amount, int *refine_level, struct item_data **id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func;
- retVal___ = preHookFunc(&nameid, &amount, &refine, &id);
+ retVal___ = preHookFunc(&nameid, &amount, &refine_level, &id);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -44319,13 +45528,13 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat
}
}
{
- retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id);
+ retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine_level, id);
}
if (HPMHooks.count.HP_logs_should_log_item_post > 0) {
- bool (*postHookFunc) (bool retVal___, int nameid, int amount, int refine, struct item_data *id);
+ bool (*postHookFunc) (bool retVal___, int nameid, int amount, int refine_level, struct item_data *id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_logs_should_log_item_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, nameid, amount, refine, id);
+ retVal___ = postHookFunc(retVal___, nameid, amount, refine_level, id);
}
}
return retVal___;
@@ -48248,31 +49457,32 @@ int HP_map_get_new_bonus_id(void) {
}
return retVal___;
}
-void HP_map_add_questinfo(int m, struct questinfo *qi) {
+bool HP_map_add_questinfo(int m, struct npc_data *nd) {
int hIndex = 0;
+ bool retVal___ = false;
if (HPMHooks.count.HP_map_add_questinfo_pre > 0) {
- void (*preHookFunc) (int *m, struct questinfo **qi);
+ bool (*preHookFunc) (int *m, struct npc_data **nd);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func;
- preHookFunc(&m, &qi);
+ retVal___ = preHookFunc(&m, &nd);
}
if (*HPMforce_return) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.map.add_questinfo(m, qi);
+ retVal___ = HPMHooks.source.map.add_questinfo(m, nd);
}
if (HPMHooks.count.HP_map_add_questinfo_post > 0) {
- void (*postHookFunc) (int m, struct questinfo *qi);
+ bool (*postHookFunc) (bool retVal___, int m, struct npc_data *nd);
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_map_add_questinfo_post[hIndex].func;
- postHookFunc(m, qi);
+ retVal___ = postHookFunc(retVal___, m, nd);
}
}
- return;
+ return retVal___;
}
bool HP_map_remove_questinfo(int m, struct npc_data *nd) {
int hIndex = 0;
@@ -51243,15 +52453,41 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
-struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) {
+void HP_mob_setdropitem_options(struct item *item, struct optdrop_group *options) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mob_setdropitem_options_pre > 0) {
+ void (*preHookFunc) (struct item **item, struct optdrop_group **options);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_setdropitem_options_pre[hIndex].func;
+ preHookFunc(&item, &options);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.setdropitem_options(item, options);
+ }
+ if (HPMHooks.count.HP_mob_setdropitem_options_post > 0) {
+ void (*postHookFunc) (struct item *item, struct optdrop_group *options);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_setdropitem_options_post[hIndex].func;
+ postHookFunc(item, options);
+ }
+ }
+ return;
+}
+struct item_drop* HP_mob_setdropitem(int nameid, struct optdrop_group *options, int qty, struct item_data *data) {
int hIndex = 0;
struct item_drop* retVal___ = NULL;
if (HPMHooks.count.HP_mob_setdropitem_pre > 0) {
- struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data **data);
+ struct item_drop* (*preHookFunc) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func;
- retVal___ = preHookFunc(&nameid, &qty, &data);
+ retVal___ = preHookFunc(&nameid, &options, &qty, &data);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -51259,13 +52495,13 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data
}
}
{
- retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data);
+ retVal___ = HPMHooks.source.mob.setdropitem(nameid, options, qty, data);
}
if (HPMHooks.count.HP_mob_setdropitem_post > 0) {
- struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data);
+ struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, nameid, qty, data);
+ retVal___ = postHookFunc(retVal___, nameid, options, qty, data);
}
}
return retVal___;
@@ -52158,6 +53394,114 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) {
}
return;
}
+bool HP_mob_read_optdrops_option(struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_option_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_pre[hIndex].func;
+ retVal___ = preHookFunc(&option, &entry, &idx, &calc_rate, &slot, &group);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_option(option, entry, idx, calc_rate, slot, group);
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_option_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, option, entry, idx, calc_rate, slot, group);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_optslot_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **optslot, int *n, int *group_id, const char **group);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_pre[hIndex].func;
+ retVal___ = preHookFunc(&optslot, &n, &group_id, &group);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_optslot(optslot, n, group_id, group);
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_optslot_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, optslot, n, group_id, group);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_read_optdrops_group(struct config_setting_t *group, int n) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_group_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **group, int *n);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_pre[hIndex].func;
+ retVal___ = preHookFunc(&group, &n);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_group(group, n);
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_group_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *group, int n);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group, n);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_read_optdrops_db(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_db_pre > 0) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_db();
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_db_post > 0) {
+ bool (*postHookFunc) (bool retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
void HP_mob_readdb(void) {
int hIndex = 0;
if (HPMHooks.count.HP_mob_readdb_pre > 0) {
@@ -52424,6 +53768,33 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t)
}
return retVal___;
}
+struct optdrop_group* HP_mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate) {
+ int hIndex = 0;
+ struct optdrop_group* retVal___ = NULL;
+ if (HPMHooks.count.HP_mob_read_db_drops_option_pre > 0) {
+ struct optdrop_group* (*preHookFunc) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_pre[hIndex].func;
+ retVal___ = preHookFunc(&entry, &item_name, &drop, &drop_rate);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_db_drops_option(entry, item_name, drop, drop_rate);
+ }
+ if (HPMHooks.count.HP_mob_read_db_drops_option_post > 0) {
+ struct optdrop_group* (*postHookFunc) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, entry, item_name, drop, drop_rate);
+ }
+ }
+ return retVal___;
+}
void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) {
int hIndex = 0;
if (HPMHooks.count.HP_mob_read_db_stats_sub_pre > 0) {
@@ -52827,6 +54198,32 @@ void HP_mob_destroy_mob_db(int index) {
}
return;
}
+void HP_mob_destroy_drop_groups(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mob_destroy_drop_groups_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.destroy_drop_groups();
+ }
+ if (HPMHooks.count.HP_mob_destroy_drop_groups_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) {
int hIndex = 0;
bool retVal___ = false;
@@ -55129,11 +56526,11 @@ bool HP_npc_viewisid(const char *viewid) {
}
return retVal___;
}
-struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_) {
+struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) {
int hIndex = 0;
struct npc_data* retVal___ = NULL;
if (HPMHooks.count.HP_npc_create_npc_pre > 0) {
- struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_);
+ struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func;
@@ -55148,7 +56545,7 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y
retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_);
}
if (HPMHooks.count.HP_npc_create_npc_post > 0) {
- struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func;
retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_);
@@ -55669,10 +57066,10 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) {
}
return;
}
-void HP_npc_setclass(struct npc_data *nd, short class_) {
+void HP_npc_setclass(struct npc_data *nd, int class_) {
int hIndex = 0;
if (HPMHooks.count.HP_npc_setclass_pre > 0) {
- void (*preHookFunc) (struct npc_data **nd, short *class_);
+ void (*preHookFunc) (struct npc_data **nd, int *class_);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func;
@@ -55687,7 +57084,7 @@ void HP_npc_setclass(struct npc_data *nd, short class_) {
HPMHooks.source.npc.setclass(nd, class_);
}
if (HPMHooks.count.HP_npc_setclass_post > 0) {
- void (*postHookFunc) (struct npc_data *nd, short class_);
+ void (*postHookFunc) (struct npc_data *nd, int class_);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func;
postHookFunc(nd, class_);
@@ -56239,6 +57636,33 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis
}
return retVal___;
}
+int HP_npc_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_npc_barter_buylist_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd, struct barteritemlist **item_list);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_buylist_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_npc_barter_buylist_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &item_list);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.barter_buylist(sd, item_list);
+ }
+ if (HPMHooks.count.HP_npc_barter_buylist_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_buylist_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_npc_barter_buylist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, item_list);
+ }
+ }
+ return retVal___;
+}
bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) {
int hIndex = 0;
bool retVal___ = false;
@@ -56292,10 +57716,10 @@ void HP_npc_market_fromsql(void) {
}
return;
}
-void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) {
+void HP_npc_market_tosql(struct npc_data *nd, int index) {
int hIndex = 0;
if (HPMHooks.count.HP_npc_market_tosql_pre > 0) {
- void (*preHookFunc) (struct npc_data **nd, unsigned short *index);
+ void (*preHookFunc) (struct npc_data **nd, int *index);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_market_tosql_pre[hIndex].func;
@@ -56310,7 +57734,7 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) {
HPMHooks.source.npc.market_tosql(nd, index);
}
if (HPMHooks.count.HP_npc_market_tosql_post > 0) {
- void (*postHookFunc) (struct npc_data *nd, unsigned short index);
+ void (*postHookFunc) (struct npc_data *nd, int index);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_market_tosql_post[hIndex].func;
postHookFunc(nd, index);
@@ -56318,10 +57742,10 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) {
}
return;
}
-void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
+void HP_npc_market_delfromsql(struct npc_data *nd, int index) {
int hIndex = 0;
if (HPMHooks.count.HP_npc_market_delfromsql_pre > 0) {
- void (*preHookFunc) (struct npc_data **nd, unsigned short *index);
+ void (*preHookFunc) (struct npc_data **nd, int *index);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_pre[hIndex].func;
@@ -56336,7 +57760,7 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
HPMHooks.source.npc.market_delfromsql(nd, index);
}
if (HPMHooks.count.HP_npc_market_delfromsql_post > 0) {
- void (*postHookFunc) (struct npc_data *nd, unsigned short index);
+ void (*postHookFunc) (struct npc_data *nd, int index);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_post[hIndex].func;
postHookFunc(nd, index);
@@ -56344,10 +57768,10 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
}
return;
}
-void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
+void HP_npc_market_delfromsql_sub(const char *npcname, int index) {
int hIndex = 0;
if (HPMHooks.count.HP_npc_market_delfromsql_sub_pre > 0) {
- void (*preHookFunc) (const char **npcname, unsigned short *index);
+ void (*preHookFunc) (const char **npcname, int *index);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func;
@@ -56362,7 +57786,7 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
HPMHooks.source.npc.market_delfromsql_sub(npcname, index);
}
if (HPMHooks.count.HP_npc_market_delfromsql_sub_post > 0) {
- void (*postHookFunc) (const char *npcname, unsigned short index);
+ void (*postHookFunc) (const char *npcname, int index);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func;
postHookFunc(npcname, index);
@@ -56370,6 +57794,110 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
}
return;
}
+void HP_npc_barter_fromsql(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_npc_barter_fromsql_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_fromsql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_npc_barter_fromsql_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.barter_fromsql();
+ }
+ if (HPMHooks.count.HP_npc_barter_fromsql_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_fromsql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_npc_barter_fromsql_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_npc_barter_tosql(struct npc_data *nd, int index) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_npc_barter_tosql_pre > 0) {
+ void (*preHookFunc) (struct npc_data **nd, int *index);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_tosql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_npc_barter_tosql_pre[hIndex].func;
+ preHookFunc(&nd, &index);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.barter_tosql(nd, index);
+ }
+ if (HPMHooks.count.HP_npc_barter_tosql_post > 0) {
+ void (*postHookFunc) (struct npc_data *nd, int index);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_tosql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_npc_barter_tosql_post[hIndex].func;
+ postHookFunc(nd, index);
+ }
+ }
+ return;
+}
+void HP_npc_barter_delfromsql(struct npc_data *nd, int index) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_npc_barter_delfromsql_pre > 0) {
+ void (*preHookFunc) (struct npc_data **nd, int *index);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_pre[hIndex].func;
+ preHookFunc(&nd, &index);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.barter_delfromsql(nd, index);
+ }
+ if (HPMHooks.count.HP_npc_barter_delfromsql_post > 0) {
+ void (*postHookFunc) (struct npc_data *nd, int index);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_post[hIndex].func;
+ postHookFunc(nd, index);
+ }
+ }
+ return;
+}
+void HP_npc_barter_delfromsql_sub(const char *npcname, int itemId, int itemId2, int amount2) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_npc_barter_delfromsql_sub_pre > 0) {
+ void (*preHookFunc) (const char **npcname, int *itemId, int *itemId2, int *amount2);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_sub_pre[hIndex].func;
+ preHookFunc(&npcname, &itemId, &itemId2, &amount2);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.barter_delfromsql_sub(npcname, itemId, itemId2, amount2);
+ }
+ if (HPMHooks.count.HP_npc_barter_delfromsql_sub_post > 0) {
+ void (*postHookFunc) (const char *npcname, int itemId, int itemId2, int amount2);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_sub_post[hIndex].func;
+ postHookFunc(npcname, itemId, itemId2, amount2);
+ }
+ }
+ return;
+}
bool HP_npc_db_checkid(const int id) {
int hIndex = 0;
bool retVal___ = false;
@@ -56423,6 +57951,32 @@ void HP_npc_refresh(struct npc_data *nd) {
}
return;
}
+void HP_npc_questinfo_clear(struct npc_data *nd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_npc_questinfo_clear_pre > 0) {
+ void (*preHookFunc) (struct npc_data **nd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_questinfo_clear_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_npc_questinfo_clear_pre[hIndex].func;
+ preHookFunc(&nd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.questinfo_clear(nd);
+ }
+ if (HPMHooks.count.HP_npc_questinfo_clear_post > 0) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_questinfo_clear_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_npc_questinfo_clear_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
@@ -58696,10 +60250,10 @@ int HP_pc_makesavestatus(struct map_session_data *sd) {
}
return retVal___;
}
-void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) {
+void HP_pc_respawn(struct map_session_data *sd, enum clr_type clrtype) {
int hIndex = 0;
if (HPMHooks.count.HP_pc_respawn_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, clr_type *clrtype);
+ void (*preHookFunc) (struct map_session_data **sd, enum clr_type *clrtype);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func;
@@ -58714,7 +60268,7 @@ void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) {
HPMHooks.source.pc.respawn(sd, clrtype);
}
if (HPMHooks.count.HP_pc_respawn_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, clr_type clrtype);
+ void (*postHookFunc) (struct map_session_data *sd, enum clr_type clrtype);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_respawn_post[hIndex].func;
postHookFunc(sd, clrtype);
@@ -59178,11 +60732,11 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) {
+int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_setpos_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype);
+ int (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, enum clr_type *clrtype);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func;
@@ -59197,7 +60751,7 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i
retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype);
}
if (HPMHooks.count.HP_pc_setpos_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_setpos_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, map_index, x, y, clrtype);
@@ -59232,11 +60786,11 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int
}
return retVal___;
}
-int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) {
+int HP_pc_randomwarp(struct map_session_data *sd, enum clr_type type) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_randomwarp_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, clr_type *type);
+ int (*preHookFunc) (struct map_session_data **sd, enum clr_type *type);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func;
@@ -59251,7 +60805,7 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) {
retVal___ = HPMHooks.source.pc.randomwarp(sd, type);
}
if (HPMHooks.count.HP_pc_randomwarp_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, clr_type type);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum clr_type type);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_randomwarp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, type);
@@ -62348,11 +63902,11 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) {
}
return retVal___;
}
-int HP_pc_jobid2mapid(int16 class) {
+int HP_pc_jobid2mapid(int class) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_jobid2mapid_pre > 0) {
- int (*preHookFunc) (int16 *class);
+ int (*preHookFunc) (int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func;
@@ -62367,7 +63921,7 @@ int HP_pc_jobid2mapid(int16 class) {
retVal___ = HPMHooks.source.pc.jobid2mapid(class);
}
if (HPMHooks.count.HP_pc_jobid2mapid_post > 0) {
- int (*postHookFunc) (int retVal___, int16 class);
+ int (*postHookFunc) (int retVal___, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_jobid2mapid_post[hIndex].func;
retVal___ = postHookFunc(retVal___, class);
@@ -62375,11 +63929,11 @@ int HP_pc_jobid2mapid(int16 class) {
}
return retVal___;
}
-int HP_pc_mapid2jobid(unsigned short class_, int sex) {
+int HP_pc_mapid2jobid(unsigned int class_, int sex) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_mapid2jobid_pre > 0) {
- int (*preHookFunc) (unsigned short *class_, int *sex);
+ int (*preHookFunc) (unsigned int *class_, int *sex);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func;
@@ -62394,7 +63948,7 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) {
retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex);
}
if (HPMHooks.count.HP_pc_mapid2jobid_post > 0) {
- int (*postHookFunc) (int retVal___, unsigned short class_, int sex);
+ int (*postHookFunc) (int retVal___, unsigned int class_, int sex);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func;
retVal___ = postHookFunc(retVal___, class_, sex);
@@ -63504,15 +65058,15 @@ int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum
}
return retVal___;
}
-int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) {
+int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_bonus_item_drop_pre > 0) {
- int (*preHookFunc) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate);
+ int (*preHookFunc) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_pre[hIndex].func;
- retVal___ = preHookFunc(&drop, &max, &id, &group, &race, &rate);
+ retVal___ = preHookFunc(&drop, &max, &id, &is_group, &race, &rate);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -63520,13 +65074,13 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh
}
}
{
- retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate);
+ retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, is_group, race, rate);
}
if (HPMHooks.count.HP_pc_bonus_item_drop_post > 0) {
- int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
+ int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, drop, max, id, group, race, rate);
+ retVal___ = postHookFunc(retVal___, drop, max, id, is_group, race, rate);
}
}
return retVal___;
@@ -64804,6 +66358,33 @@ bool HP_pc_has_second_costume(struct map_session_data *sd) {
}
return retVal___;
}
+bool HP_pc_expandInventory(struct map_session_data *sd, int adjustSize) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_pc_expandInventory_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *adjustSize);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expandInventory_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pc_expandInventory_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &adjustSize);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.expandInventory(sd, adjustSize);
+ }
+ if (HPMHooks.count.HP_pc_expandInventory_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int adjustSize);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expandInventory_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pc_expandInventory_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, adjustSize);
+ }
+ }
+ return retVal___;
+}
/* pcre_interface */
pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) {
int hIndex = 0;
@@ -65559,11 +67140,11 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) {
}
return retVal___;
}
-bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) {
+bool HP_pet_get_egg(int account_id, int pet_class, int pet_id) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_pet_get_egg_pre > 0) {
- bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id);
+ bool (*preHookFunc) (int *account_id, int *pet_class, int *pet_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func;
@@ -65578,7 +67159,7 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) {
retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id);
}
if (HPMHooks.count.HP_pet_get_egg_post > 0) {
- bool (*postHookFunc) (bool retVal___, int account_id, short pet_class, int pet_id);
+ bool (*postHookFunc) (bool retVal___, int account_id, int pet_class, int pet_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func;
retVal___ = postHookFunc(retVal___, account_id, pet_class, pet_id);
@@ -66919,14 +68500,42 @@ bool HP_quest_questinfo_validate_mercenary_class(struct map_session_data *sd, st
}
return retVal___;
}
-void HP_quest_questinfo_vector_clear(int m) {
+/* refine_interface */
+int HP_refine_init(bool minimal) {
int hIndex = 0;
- if (HPMHooks.count.HP_quest_questinfo_vector_clear_pre > 0) {
- void (*preHookFunc) (int *m);
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_init_pre > 0) {
+ int (*preHookFunc) (bool *minimal);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_vector_clear_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_quest_questinfo_vector_clear_pre[hIndex].func;
- preHookFunc(&m);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_init_pre[hIndex].func;
+ retVal___ = preHookFunc(&minimal);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.init(minimal);
+ }
+ if (HPMHooks.count.HP_refine_init_post > 0) {
+ int (*postHookFunc) (int retVal___, bool minimal);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, minimal);
+ }
+ }
+ return retVal___;
+}
+void HP_refine_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_refine_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_final_pre[hIndex].func;
+ preHookFunc();
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -66934,17 +68543,367 @@ void HP_quest_questinfo_vector_clear(int m) {
}
}
{
- HPMHooks.source.quest.questinfo_vector_clear(m);
+ HPMHooks.source.refine.final();
}
- if (HPMHooks.count.HP_quest_questinfo_vector_clear_post > 0) {
- void (*postHookFunc) (int m);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_vector_clear_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_quest_questinfo_vector_clear_post[hIndex].func;
- postHookFunc(m);
+ if (HPMHooks.count.HP_refine_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_final_post[hIndex].func;
+ postHookFunc();
}
}
return;
}
+int HP_refine_get_refine_chance(enum refine_type wlv, int refine_level, enum refine_chance_type type) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_get_refine_chance_pre > 0) {
+ int (*preHookFunc) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_get_refine_chance_pre[hIndex].func;
+ retVal___ = preHookFunc(&wlv, &refine_level, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.get_refine_chance(wlv, refine_level, type);
+ }
+ if (HPMHooks.count.HP_refine_get_refine_chance_post > 0) {
+ int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_get_refine_chance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, wlv, refine_level, type);
+ }
+ }
+ return retVal___;
+}
+int HP_refine_get_bonus(enum refine_type equipment_type, int refine_level) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_get_bonus_pre > 0) {
+ int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_get_bonus_pre[hIndex].func;
+ retVal___ = preHookFunc(&equipment_type, &refine_level);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.get_bonus(equipment_type, refine_level);
+ }
+ if (HPMHooks.count.HP_refine_get_bonus_post > 0) {
+ int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_get_bonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, equipment_type, refine_level);
+ }
+ }
+ return retVal___;
+}
+int HP_refine_get_randombonus_max(enum refine_type equipment_type, int refine_level) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_get_randombonus_max_pre > 0) {
+ int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_pre[hIndex].func;
+ retVal___ = preHookFunc(&equipment_type, &refine_level);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.get_randombonus_max(equipment_type, refine_level);
+ }
+ if (HPMHooks.count.HP_refine_get_randombonus_max_post > 0) {
+ int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, equipment_type, refine_level);
+ }
+ }
+ return retVal___;
+}
+void HP_refine_refinery_add_item(struct map_session_data *sd, int item_index) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_refine_refinery_add_item_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_index);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_refinery_add_item_pre[hIndex].func;
+ preHookFunc(&sd, &item_index);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.refine.refinery_add_item(sd, item_index);
+ }
+ if (HPMHooks.count.HP_refine_refinery_add_item_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_index);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_refinery_add_item_post[hIndex].func;
+ postHookFunc(sd, item_index);
+ }
+ }
+ return;
+}
+void HP_refine_refinery_refine_request(struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_refine_refinery_refine_request_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_pre[hIndex].func;
+ preHookFunc(&sd, &item_index, &material_id, &use_blacksmith_blessing);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.refine.refinery_refine_request(sd, item_index, material_id, use_blacksmith_blessing);
+ }
+ if (HPMHooks.count.HP_refine_refinery_refine_request_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_post[hIndex].func;
+ postHookFunc(sd, item_index, material_id, use_blacksmith_blessing);
+ }
+ }
+ return;
+}
+/* refine_interface_private */
+int HP_PRIV__refine_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre > 0) {
+ int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&r, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig_sub(r, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post > 0) {
+ int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, r, name, source);
+ }
+ }
+ return retVal___;
+}
+int HP_PRIV__refine_readdb_refine_libconfig(const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre > 0) {
+ int (*preHookFunc) (const char **filename);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig(filename);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post > 0) {
+ int (*postHookFunc) (int retVal___, const char *filename);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_announce_behavior_string2enum(const char *str, unsigned int *result) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre > 0) {
+ bool (*preHookFunc) (const char **str, unsigned int **result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_pre[hIndex].func;
+ retVal___ = preHookFunc(&str, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.announce_behavior_string2enum(str, result);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *str, unsigned int *result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, result);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_failure_behavior_string2enum(const char *str, enum refine_ui_failure_behavior *result) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre > 0) {
+ bool (*preHookFunc) (const char **str, enum refine_ui_failure_behavior **result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_pre[hIndex].func;
+ retVal___ = preHookFunc(&str, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.failure_behavior_string2enum(str, result);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, result);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_readdb_refinery_ui_settings_items(const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre[hIndex].func;
+ retVal___ = preHookFunc(&elem, &req, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_items(elem, req, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, elem, req, name, source);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_readdb_refinery_ui_settings_sub(const struct config_setting_t *elem, int type, const char *name, const char *source) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **elem, int *type, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&elem, &type, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_sub(elem, type, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, elem, type, name, source);
+ }
+ }
+ return retVal___;
+}
+int HP_PRIV__refine_readdb_refinery_ui_settings(const struct config_setting_t *r, int type, const char *name, const char *source) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre > 0) {
+ int (*preHookFunc) (const struct config_setting_t **r, int *type, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_pre[hIndex].func;
+ retVal___ = preHookFunc(&r, &type, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings(r, type, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post > 0) {
+ int (*postHookFunc) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, r, type, name, source);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_is_refinable(struct map_session_data *sd, int item_index) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_is_refinable_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *item_index);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &item_index);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.is_refinable(sd, item_index);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_is_refinable_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_index);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, item_index);
+ }
+ }
+ return retVal___;
+}
/* rnd_interface */
void HP_rnd_init(void) {
int hIndex = 0;
@@ -67369,10 +69328,10 @@ void HP_rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amount)
}
return;
}
-void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class) {
+void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class) {
int hIndex = 0;
if (HPMHooks.count.HP_rodex_check_player_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class);
+ void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_rodex_check_player_pre[hIndex].func;
@@ -67387,7 +69346,7 @@ void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *b
HPMHooks.source.rodex.check_player(sd, name, base_level, char_id, class);
}
if (HPMHooks.count.HP_rodex_check_player_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class);
+ void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_rodex_check_player_post[hIndex].func;
postHookFunc(sd, name, base_level, char_id, class);
@@ -67605,6 +69564,58 @@ void HP_rodex_clean(struct map_session_data *sd, int8 flag) {
}
return;
}
+void HP_rodex_getZenyAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_rodex_getZenyAck_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_rodex_getZenyAck_pre[hIndex].func;
+ preHookFunc(&sd, &mail_id, &opentype, &zeny);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.rodex.getZenyAck(sd, mail_id, opentype, zeny);
+ }
+ if (HPMHooks.count.HP_rodex_getZenyAck_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_rodex_getZenyAck_post[hIndex].func;
+ postHookFunc(sd, mail_id, opentype, zeny);
+ }
+ }
+ return;
+}
+void HP_rodex_getItemsAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_rodex_getItemsAck_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_rodex_getItemsAck_pre[hIndex].func;
+ preHookFunc(&sd, &mail_id, &opentype, &count, &items);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.rodex.getItemsAck(sd, mail_id, opentype, count, items);
+ }
+ if (HPMHooks.count.HP_rodex_getItemsAck_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_rodex_getItemsAck_post[hIndex].func;
+ postHookFunc(sd, mail_id, opentype, count, items);
+ }
+ }
+ return;
+}
/* script_interface */
void HP_script_init(bool minimal) {
int hIndex = 0;
@@ -72895,15 +74906,15 @@ void HP_searchstore_clearremote(struct map_session_data *sd) {
}
return;
}
-bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option) {
+bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_searchstore_result_pre > 0) {
- bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine, const struct item_option **option);
+ bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine_level, const struct item_option **option);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine, &option);
+ retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine_level, &option);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -72911,13 +74922,13 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i
}
}
{
- retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option);
+ retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option);
}
if (HPMHooks.count.HP_searchstore_result_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option);
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option);
+ retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option);
}
}
return retVal___;
@@ -80182,6 +82193,33 @@ void HP_sockt_flush_fifos(void) {
}
return;
}
+int HP_sockt_connect_client(int listen_fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_sockt_connect_client_pre > 0) {
+ int (*preHookFunc) (int *listen_fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&listen_fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.connect_client(listen_fd);
+ }
+ if (HPMHooks.count.HP_sockt_connect_client_post > 0) {
+ int (*postHookFunc) (int retVal___, int listen_fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, listen_fd);
+ }
+ }
+ return retVal___;
+}
void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
int hIndex = 0;
if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) {
@@ -81454,33 +83492,6 @@ void HP_status_final(void) {
}
return;
}
-int HP_status_get_refine_chance(enum refine_type wlv, int refine, enum refine_chance_type type) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_status_get_refine_chance_pre > 0) {
- int (*preHookFunc) (enum refine_type *wlv, int *refine, enum refine_chance_type *type);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func;
- retVal___ = preHookFunc(&wlv, &refine, &type);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine, type);
- }
- if (HPMHooks.count.HP_status_get_refine_chance_post > 0) {
- int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, wlv, refine, type);
- }
- }
- return retVal___;
-}
sc_type HP_status_skill2sc(int skill_id) {
int hIndex = 0;
sc_type retVal___ = SC_NONE;
@@ -83313,11 +85324,11 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int
}
return retVal___;
}
-unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) {
+int HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_batk_pre > 0) {
- unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable);
+ int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func;
@@ -83332,7 +85343,7 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *
retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable);
}
if (HPMHooks.count.HP_status_calc_batk_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_batk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, batk, viewable);
@@ -83340,11 +85351,11 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *
}
return retVal___;
}
-unsigned short HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) {
+int HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_base_matk_pre > 0) {
- unsigned short (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level);
+ int (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func;
@@ -83359,7 +85370,7 @@ unsigned short HP_status_base_matk(struct block_list *bl, const struct status_da
retVal___ = HPMHooks.source.status.base_matk(bl, st, level);
}
if (HPMHooks.count.HP_status_base_matk_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int level);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, const struct status_data *st, int level);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, st, level);
@@ -83607,11 +85618,11 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s
}
return retVal___;
}
-unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) {
+int HP_status_base_atk(const struct block_list *bl, const struct status_data *st) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_base_atk_pre > 0) {
- unsigned short (*preHookFunc) (const struct block_list **bl, const struct status_data **st);
+ int (*preHookFunc) (const struct block_list **bl, const struct status_data **st);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func;
@@ -83626,7 +85637,7 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat
retVal___ = HPMHooks.source.status.base_atk(bl, st);
}
if (HPMHooks.count.HP_status_base_atk_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st);
+ int (*postHookFunc) (int retVal___, const struct block_list *bl, const struct status_data *st);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_base_atk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, st);
@@ -83931,11 +85942,11 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s
}
return retVal___;
}
-unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) {
+int HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_watk_pre > 0) {
- unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable);
+ int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func;
@@ -83950,7 +85961,7 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *
retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable);
}
if (HPMHooks.count.HP_status_calc_watk_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_watk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, watk, viewable);
@@ -83958,11 +85969,11 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *
}
return retVal___;
}
-unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) {
+int HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_matk_pre > 0) {
- unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable);
+ int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func;
@@ -83977,7 +85988,7 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *
retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable);
}
if (HPMHooks.count.HP_status_calc_matk_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_matk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, matk, viewable);
@@ -83985,11 +85996,11 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *
}
return retVal___;
}
-signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) {
+signed int HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) {
int hIndex = 0;
- signed short retVal___ = 0;
+ signed int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_hit_pre > 0) {
- signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable);
+ signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func;
@@ -84004,7 +86015,7 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc,
retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable);
}
if (HPMHooks.count.HP_status_calc_hit_post > 0) {
- signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable);
+ signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_hit_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, hit, viewable);
@@ -84012,11 +86023,11 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc,
}
return retVal___;
}
-signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) {
+signed int HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) {
int hIndex = 0;
- signed short retVal___ = 0;
+ signed int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_critical_pre > 0) {
- signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable);
+ signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func;
@@ -84031,7 +86042,7 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change
retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable);
}
if (HPMHooks.count.HP_status_calc_critical_post > 0) {
- signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable);
+ signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_critical_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, critical, viewable);
@@ -84039,11 +86050,11 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change
}
return retVal___;
}
-signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) {
+signed int HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) {
int hIndex = 0;
- signed short retVal___ = 0;
+ signed int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_flee_pre > 0) {
- signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable);
+ signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func;
@@ -84058,7 +86069,7 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc
retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable);
}
if (HPMHooks.count.HP_status_calc_flee_post > 0) {
- signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable);
+ signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_flee_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, flee, viewable);
@@ -84066,11 +86077,11 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc
}
return retVal___;
}
-signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) {
+signed int HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) {
int hIndex = 0;
- signed short retVal___ = 0;
+ signed int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_flee2_pre > 0) {
- signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable);
+ signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func;
@@ -84085,7 +86096,7 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s
retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable);
}
if (HPMHooks.count.HP_status_calc_flee2_post > 0) {
- signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable);
+ signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_flee2_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, flee2, viewable);
@@ -84363,11 +86374,11 @@ uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_chan
}
return retVal___;
}
-unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) {
+int HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_ematk_pre > 0) {
- unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk);
+ int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func;
@@ -84382,7 +86393,7 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change
retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk);
}
if (HPMHooks.count.HP_status_calc_ematk_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int matk);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc, matk);
@@ -84582,60 +86593,6 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) {
}
return retVal___;
}
-int HP_status_readdb_refine_libconfig(const char *filename) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_pre > 0) {
- int (*preHookFunc) (const char **filename);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_pre[hIndex].func;
- retVal___ = preHookFunc(&filename);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.status.readdb_refine_libconfig(filename);
- }
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_post > 0) {
- int (*postHookFunc) (int retVal___, const char *filename);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, filename);
- }
- }
- return retVal___;
-}
-int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre > 0) {
- int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_pre[hIndex].func;
- retVal___ = preHookFunc(&r, &name, &source);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.status.readdb_refine_libconfig_sub(r, name, source);
- }
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post > 0) {
- int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, r, name, source);
- }
- }
- return retVal___;
-}
bool HP_status_readdb_scconfig(char *fields[], int columns, int current) {
int hIndex = 0;
bool retVal___ = false;
@@ -84767,11 +86724,11 @@ void HP_status_copy(struct status_data *a, const struct status_data *b) {
}
return;
}
-unsigned short HP_status_base_matk_min(const struct status_data *st) {
+int HP_status_base_matk_min(const struct status_data *st) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_base_matk_min_pre > 0) {
- unsigned short (*preHookFunc) (const struct status_data **st);
+ int (*preHookFunc) (const struct status_data **st);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_base_matk_min_pre[hIndex].func;
@@ -84786,7 +86743,7 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) {
retVal___ = HPMHooks.source.status.base_matk_min(st);
}
if (HPMHooks.count.HP_status_base_matk_min_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st);
+ int (*postHookFunc) (int retVal___, const struct status_data *st);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_base_matk_min_post[hIndex].func;
retVal___ = postHookFunc(retVal___, st);
@@ -84794,11 +86751,11 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) {
}
return retVal___;
}
-unsigned short HP_status_base_matk_max(const struct status_data *st) {
+int HP_status_base_matk_max(const struct status_data *st) {
int hIndex = 0;
- unsigned short retVal___ = 0;
+ int retVal___ = 0;
if (HPMHooks.count.HP_status_base_matk_max_pre > 0) {
- unsigned short (*preHookFunc) (const struct status_data **st);
+ int (*preHookFunc) (const struct status_data **st);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_base_matk_max_pre[hIndex].func;
@@ -84813,7 +86770,7 @@ unsigned short HP_status_base_matk_max(const struct status_data *st) {
retVal___ = HPMHooks.source.status.base_matk_max(st);
}
if (HPMHooks.count.HP_status_base_matk_max_post > 0) {
- unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st);
+ int (*postHookFunc) (int retVal___, const struct status_data *st);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_base_matk_max_post[hIndex].func;
retVal___ = postHookFunc(retVal___, st);
@@ -85854,6 +87811,244 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count)
}
return retVal___;
}
+/* stylist_interface */
+void HP_stylist_init(bool minimal) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_init_pre > 0) {
+ void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_init_pre[hIndex].func;
+ preHookFunc(&minimal);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.init(minimal);
+ }
+ if (HPMHooks.count.HP_stylist_init_post > 0) {
+ void (*postHookFunc) (bool minimal);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_init_post[hIndex].func;
+ postHookFunc(minimal);
+ }
+ }
+ return;
+}
+void HP_stylist_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.final();
+ }
+ if (HPMHooks.count.HP_stylist_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_stylist_vector_init(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_vector_init_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_vector_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.vector_init();
+ }
+ if (HPMHooks.count.HP_stylist_vector_init_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_vector_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_stylist_vector_clear(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_vector_clear_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_vector_clear_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.vector_clear();
+ }
+ if (HPMHooks.count.HP_stylist_vector_clear_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_vector_clear_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_stylist_read_db_libconfig(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_pre > 0) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.stylist.read_db_libconfig();
+ }
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_post > 0) {
+ bool (*postHookFunc) (bool retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&it, &idx, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.stylist.read_db_libconfig_sub(it, idx, source);
+ }
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, it, idx, source);
+ }
+ }
+ return retVal___;
+}
+void HP_stylist_request_style_change(struct map_session_data *sd, int type, int16 idx, bool isitem) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_request_style_change_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_request_style_change_pre[hIndex].func;
+ preHookFunc(&sd, &type, &idx, &isitem);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.request_style_change(sd, type, idx, isitem);
+ }
+ if (HPMHooks.count.HP_stylist_request_style_change_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_request_style_change_post[hIndex].func;
+ postHookFunc(sd, type, idx, isitem);
+ }
+ }
+ return;
+}
+bool HP_stylist_validate_requirements(struct map_session_data *sd, int type, int16 idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_stylist_validate_requirements_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_validate_requirements_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &type, &idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.stylist.validate_requirements(sd, type, idx);
+ }
+ if (HPMHooks.count.HP_stylist_validate_requirements_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_validate_requirements_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, type, idx);
+ }
+ }
+ return retVal___;
+}
+void HP_stylist_send_rodexitem(struct map_session_data *sd, int itemid) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_send_rodexitem_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *itemid);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_pre[hIndex].func;
+ preHookFunc(&sd, &itemid);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.send_rodexitem(sd, itemid);
+ }
+ if (HPMHooks.count.HP_stylist_send_rodexitem_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int itemid);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_post[hIndex].func;
+ postHookFunc(sd, itemid);
+ }
+ }
+ return;
+}
/* sv_interface */
int HP_sv_parse_next(struct s_svstate *svstate) {
int hIndex = 0;
@@ -87920,11 +90115,11 @@ int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) {
}
return retVal___;
}
-int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type) {
+int HP_unit_warp(struct block_list *bl, short m, short x, short y, enum clr_type type) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_unit_warp_pre > 0) {
- int (*preHookFunc) (struct block_list **bl, short *m, short *x, short *y, clr_type *type);
+ int (*preHookFunc) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_warp_pre[hIndex].func;
@@ -87939,7 +90134,7 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type
retVal___ = HPMHooks.source.unit.warp(bl, m, x, y, type);
}
if (HPMHooks.count.HP_unit_warp_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, short m, short x, short y, clr_type type);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, short m, short x, short y, enum clr_type type);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_warp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, m, x, y, type);
@@ -88619,11 +90814,11 @@ int HP_unit_changeviewsize(struct block_list *bl, short size) {
}
return retVal___;
}
-int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func) {
+int HP_unit_remove_map(struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_unit_remove_map_pre > 0) {
- int (*preHookFunc) (struct block_list **bl, clr_type *clrtype, const char **file, int *line, const char **func);
+ int (*preHookFunc) (struct block_list **bl, enum clr_type *clrtype, const char **file, int *line, const char **func);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_remove_map_pre[hIndex].func;
@@ -88638,7 +90833,7 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file
retVal___ = HPMHooks.source.unit.remove_map(bl, clrtype, file, line, func);
}
if (HPMHooks.count.HP_unit_remove_map_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_remove_map_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, clrtype, file, line, func);
@@ -88646,10 +90841,10 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file
}
return retVal___;
}
-void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) {
+void HP_unit_remove_map_pc(struct map_session_data *sd, enum clr_type clrtype) {
int hIndex = 0;
if (HPMHooks.count.HP_unit_remove_map_pc_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, clr_type *clrtype);
+ void (*preHookFunc) (struct map_session_data **sd, enum clr_type *clrtype);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_remove_map_pc_pre[hIndex].func;
@@ -88664,7 +90859,7 @@ void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) {
HPMHooks.source.unit.remove_map_pc(sd, clrtype);
}
if (HPMHooks.count.HP_unit_remove_map_pc_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, clr_type clrtype);
+ void (*postHookFunc) (struct map_session_data *sd, enum clr_type clrtype);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_remove_map_pc_post[hIndex].func;
postHookFunc(sd, clrtype);
@@ -88698,11 +90893,11 @@ void HP_unit_free_pc(struct map_session_data *sd) {
}
return;
}
-int HP_unit_free(struct block_list *bl, clr_type clrtype) {
+int HP_unit_free(struct block_list *bl, enum clr_type clrtype) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_unit_free_pre > 0) {
- int (*preHookFunc) (struct block_list **bl, clr_type *clrtype);
+ int (*preHookFunc) (struct block_list **bl, enum clr_type *clrtype);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_free_pre[hIndex].func;
@@ -88717,7 +90912,7 @@ int HP_unit_free(struct block_list *bl, clr_type clrtype) {
retVal___ = HPMHooks.source.unit.free(bl, clrtype);
}
if (HPMHooks.count.HP_unit_free_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type clrtype);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, enum clr_type clrtype);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_free_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, clrtype);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index 9d5390bb4..786b60288 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2018 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,6 +73,8 @@ HPMHooks.source.pc = *pc;
HPMHooks.source.libpcre = *libpcre;
HPMHooks.source.pet = *pet;
HPMHooks.source.quest = *quest;
+HPMHooks.source.refine = *refine;
+HPMHooks.source.PRIV__refine = *refine->p;
HPMHooks.source.rnd = *rnd;
HPMHooks.source.rodex = *rodex;
HPMHooks.source.script = *script;
@@ -85,6 +87,7 @@ HPMHooks.source.status = *status;
HPMHooks.source.storage = *storage;
HPMHooks.source.StrBuf = *StrBuf;
HPMHooks.source.strlib = *strlib;
+HPMHooks.source.stylist = *stylist;
HPMHooks.source.sv = *sv;
HPMHooks.source.sysinfo = *sysinfo;
HPMHooks.source.thread = *thread;
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 2ece501b2..159d4e2a6 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -956,6 +956,7 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id)
struct mob_db *md = mob->db(mob_id);
char valname[15];
const char *name = config_setting_name(it);
+ char e_name[NAME_LENGTH*2+1];
nullpo_retr(false, it);
Assert_retr(false, mob_id <= 0 || md != mob->dummy);
@@ -966,7 +967,8 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id)
StrBuf->Printf(&buf, "%d,", mob_id);
// Info
- StrBuf->Printf(&buf, "'%s@%s',", md->name, name);
+ SQL->EscapeString(NULL, e_name, md->name);
+ StrBuf->Printf(&buf, "'%s@%s',", e_name, name);
if (mob->lookup_const(it, "SkillState", &i32) && (i32 < MSS_ANY || i32 > MSS_ANYTARGET)) {
ShowWarning("mob_skill_db_libconfig_sub_skill: Invalid skill state %d for skill '%s' in monster %d, defaulting to MSS_ANY.\n", i32, name, mob_id);
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index b37f7c4f7..da29bd837 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -23,8 +23,11 @@
#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */
#include "common/memmgr.h"
#include "common/mmo.h"
+#include "common/random.h"
#include "common/socket.h"
#include "common/strlib.h"
+#include "login/login.h"
+#include "login/lclif.p.h"
#include "map/clif.h"
#include "map/pc.h"
#include "map/script.h"
@@ -79,13 +82,13 @@ void sample_packet0f3(int fd) {
data->lastMSGPosition.map = sd->status.last_point.map;
data->lastMSGPosition.x = sd->status.last_point.x;
data->lastMSGPosition.y = sd->status.last_point.y;
- data->someNumber = rand()%777;
+ data->someNumber = rnd()%777;
ShowInfo("Created Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
addToSession(sockt->session[fd],data,0,true);
} else {
ShowInfo("Existent Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
- if( rand()%4 == 2 ) {
+ if (rnd()%4 == 2) {
ShowInfo("Removing Appended sockt->session[] data\n");
removeFromSession(sockt->session[fd],0);
}
@@ -98,13 +101,13 @@ void sample_packet0f3(int fd) {
data->lastMSGPosition.map = sd->status.last_point.map;
data->lastMSGPosition.x = sd->status.last_point.x;
data->lastMSGPosition.y = sd->status.last_point.y;
- data->someNumber = rand()%777;
+ data->someNumber = rnd()%777;
ShowInfo("Created Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
addToMSD(sd,data,0,true);
} else {
ShowInfo("Existent Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
- if( rand()%4 == 2 ) {
+ if (rnd()%4 == 2) {
ShowInfo("Removing Appended map_session_data data\n");
removeFromMSD(sd,0);
}
@@ -135,6 +138,19 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int n, int amou
}
return 1;
}
+
+ /**
+ * pre-hook for lclif->p->parse_CA_CONNECT_INFO_CHANGED this is a private interface function and while in source it cannot be used
+ * outside of lclif.c since it's private, plugin can use it and hook to private interface functions if needed
+ * the pre-hook takes this currently unused packet and show a notice whenver a player sends it
+ **/
+enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd) __attribute__((nonnull(2)));
+enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd)
+{
+ ShowNotice("Player (AID: %d) has sent CA_CONNECT_INFO_CHANGED packet\n", (*sd)->account_id);
+ return PACKET_VALID;
+}
+
/*
* Key is the setting name in our example it's 'my_setting' while val is the value of it.
* this way you can manage more than one setting in one function instead of define multiable ones
@@ -211,6 +227,14 @@ HPExport void plugin_init (void) {
/* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */
addHookPost(pc, dropitem, my_pc_dropitem_post);
}
+
+ if (SERVER_TYPE == SERVER_TYPE_LOGIN) {
+ /**
+ * In this example we add a pre-hook to lclif->p->parse_CA_CONNECT_INFO_CHANGED
+ * It's similar to nomral hooks except it have it own hooking macros which ends with Priv
+ **/
+ addHookPrePriv(lclif, parse_CA_CONNECT_INFO_CHANGED, my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre);
+ }
}
/* triggered when server starts loading, before any server-specific data is set */
HPExport void server_preinit(void)
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl
index e5a5c1914..46cae36cb 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -371,7 +371,8 @@ foreach my $file (@files) { # Loop through the xml files
$t = ')(int fd, struct login_session_data *sd)'; # typedef LoginParseFunc
$def =~ s/^LoginParseFunc\s*\*\s*(.*)$/enum parsefunc_rcode(* $1) (int fd, struct login_session_data *sd)/;
}
- next unless ref $t ne 'HASH' and $t =~ /^[^\[]/; # If it's not a string, or if it starts with an array subscript, we can skip it
+ next if ref $t eq 'HASH'; # Skip if it's not a string
+ next if $t =~ /^\)?\[.*\]$/; # Skip arrays or pointers to array
my $if = parse($t, $def);
next unless scalar keys %$if; # If it returns an empty hash reference, an error must've occurred
diff --git a/tools/HPMHookGen/doxygen.conf b/tools/HPMHookGen/doxygen.conf
index ec55967b1..c302f7f2f 100644
--- a/tools/HPMHookGen/doxygen.conf
+++ b/tools/HPMHookGen/doxygen.conf
@@ -269,7 +269,9 @@ INCLUDE_PATH = ../../src \
../../3rdparty
INCLUDE_FILE_PATTERNS =
PREDEFINED = __attribute__(x)= \
- HPMHOOKGEN
+ HPMHOOKGEN \
+ PACKETVER=20031028 \
+ PACKETVER_MAIN_NUM=20031028
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = NO
#---------------------------------------------------------------------------
diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh
index fa7d5be93..22f523bdf 100755
--- a/tools/ci/travis.sh
+++ b/tools/ci/travis.sh
@@ -47,7 +47,8 @@ function aborterror {
function run_server {
echo "Running: $1 --run-once $2"
- $1 --run-once $2 2>runlog.txt
+ rm -rf core* || true
+ CRASH_PLEASE=1 $1 --run-once $2 2>runlog.txt
export errcode=$?
export teststr=$(head -c 10000 runlog.txt)
if [[ -n "${teststr}" ]]; then
@@ -59,12 +60,17 @@ function run_server {
fi
if [ ${errcode} -ne 0 ]; then
echo "server $1 terminated with exit code ${errcode}"
+ COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1)
+ if [[ -f "$COREFILE" ]]; then
+ gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch
+ fi
aborterror "Test failed"
fi
}
function run_test {
echo "Running: test_$1"
+ sysctl -w kernel.core_pattern=core || true
./test_$1 2>runlog.txt
export errcode=$?
export teststr=$(head -c 10000 runlog.txt)
diff --git a/tools/install_mariadb.bat b/tools/install_mariadb.bat
new file mode 100644
index 000000000..cfe2ce3b7
--- /dev/null
+++ b/tools/install_mariadb.bat
@@ -0,0 +1,7 @@
+@echo off
+
+:: this file installs the mariadb service
+
+if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
+mysqld.exe --install "MySQL"
+net start MySQL
diff --git a/tools/itemdbconverter.pl b/tools/itemdbconverter.pl
index 58cb08bc1..fe30ce24e 100755
--- a/tools/itemdbconverter.pl
+++ b/tools/itemdbconverter.pl
@@ -109,9 +109,9 @@ sub parsedb (@) {
(?<eLV>[0-9]*)[^,:]*(?<hasmaxlv>:[\s\t]*(?<eLVmax>[0-9]*))?[^,]*,[\s\t]*
(?<Refineable>[0-9]*)[^,]*,[\s\t]*
(?<View>[0-9]*)[^,]*,[\s\t]*
- {(?<Script>.*)},
- {(?<OnEquip>.*)},
- {(?<OnUnequip>.*)}
+ \{(?<Script>.*)},
+ \{(?<OnEquip>.*)},
+ \{(?<OnUnequip>.*)}
/x ) {
my %cols = map { $_ => $+{$_} } keys %+;
print "/*\n" if $cols{prefix};
diff --git a/tools/setup_mariadb.ps1 b/tools/setup_mariadb.ps1
new file mode 100644
index 000000000..709a5cf93
--- /dev/null
+++ b/tools/setup_mariadb.ps1
@@ -0,0 +1,90 @@
+#Requires -Version 5.1
+
+function Ask-Continue { Write-Output ""; pause; Write-Output "" }
+
+Write-Output "This script will automatically install MariaDB and configure it for you."
+Write-Output "You may interrupt the installation by pressing CTRL+C or closing this window."
+Ask-Continue
+
+if (-Not (Select-String -Quiet -SimpleMatch -Pattern "db_password: ""ragnarok""" -LiteralPath "$PSScriptRoot\..\conf\global\sql_connection.conf")) {
+ Write-Output "WARNING: It seems you already configured the sql connection for your server."
+ Write-Output "If you decide to continue, your settings will be overwritten."
+ Ask-Continue
+}
+
+# step 1: install scoop
+if (-Not (Get-Command scoop -errorAction SilentlyContinue)) {
+ Set-ExecutionPolicy RemoteSigned -scope Process -Force # <= this will trigger a yes/no prompt if not already authorized
+ Invoke-Expression (new-object net.webclient).downloadstring('https://get.scoop.sh')
+ scoop update
+}
+
+# step 2: install mariadb
+if (Test-Path $env:USERPROFILE\scoop\apps\mariadb) {
+ # usually we'd want to capture the output of "scoop list mariadb", but it uses
+ # Write-Host, so we can't, hence why we check manually for the folder
+ Write-Output "WARNING: MariaDB is already installed!"
+ Write-Output "If you decide to continue, your hercules user password will be overwritten."
+ Ask-Continue
+} elseif (Get-Command mysqld -errorAction SilentlyContinue) {
+ Write-Output "ERROR: You already have a MySQL provider installed. To avoid conflict, MariaDB will not be installed."
+ Write-Output "If you wish to continue you will have to uninstall your current MySQL provider."
+ exit 1
+} else {
+ scoop install mariadb
+}
+
+# step 3: add the herc user, set up the new database
+$userpw = -join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_})
+$rootpw = -join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_})
+$maria_job = Start-Process -NoNewWindow -FilePath "mysqld.exe" -ArgumentList "--console" -PassThru -RedirectStandardError "$PSScriptRoot\maria.out"
+
+while (-Not $maria_job.HasExited) {
+ if ($lt -Lt 1 -And (Select-String -Quiet -SimpleMatch -Pattern "ready for connections" -LiteralPath "$PSScriptRoot\maria.out")) {
+@"
+CREATE DATABASE IF NOT EXISTS hercules;
+DROP USER IF EXISTS 'hercules'@'localhost';
+DROP USER IF EXISTS 'hercules'@'127.0.0.1';
+CREATE USER 'hercules'@'localhost' IDENTIFIED BY '$userpw';
+CREATE USER 'hercules'@'127.0.0.1' IDENTIFIED BY '$userpw';
+-- ALTER USER 'root'@'localhost' IDENTIFIED BY '$rootpw';
+GRANT ALTER,CREATE,SELECT,INSERT,UPDATE,DELETE,DROP,INDEX ON `hercules`.* TO 'hercules'@'localhost';
+GRANT ALTER,CREATE,SELECT,INSERT,UPDATE,DELETE,DROP,INDEX ON `hercules`.* TO 'hercules'@'127.0.0.1';
+FLUSH PRIVILEGES;
+USE `hercules`;
+\. $PSScriptRoot\..\sql-files\main.sql
+\. $PSScriptRoot\..\sql-files\logs.sql
+shutdown;
+\q
+"@ | mysql.exe -u root
+ $lt++
+ }
+ Start-Sleep 1
+}
+
+if ($lt -Lt 1) {
+ Write-Output "ERROR: MariaDB could not execute the query."
+ Write-Output "This might happen if your root user already has a password, or if the MySQL service is currently running."
+ $maria_job.close()
+ exit 1
+}
+
+# step 4: finish up
+@"
+sql_connection: {
+ db_username: "hercules"
+ db_password: "$userpw"
+ db_database: "hercules"
+}
+"@ | Out-File -Encoding UTF8 -LiteralPath "$PSScriptRoot\..\conf\global\sql_connection.conf"
+Remove-Item -Force -errorAction SilentlyContinue "$PSScriptRoot\maria.out"
+& "$PSScriptRoot\install_mariadb.bat" # <= we need admin permissions, so we use an external script
+Write-Output "========= ALL DONE ========="
+Write-Output ""
+Write-Output "Your hercules installation is now configured to use MariaDB."
+Write-Output "You can find the password in conf\global\sql_connection.conf."
+Write-Output ""
+Write-Output "If you want to start MariaDB on boot, use services.msc and set ""MySQL"" to Automatic."
+Write-Output ""
+Write-Output "Make sure you set a password for the root user. You can do this from the command line or from HeidiSQL."
+Write-Output "You can obtain HeidiSQL at https://www.microsoft.com/store/productId/9NXPRT2T0ZJF"
diff --git a/vcproj-12/map-server.vcxproj b/vcproj-12/map-server.vcxproj
index 3435ec4b6..34f55be49 100644
--- a/vcproj-12/map-server.vcxproj
+++ b/vcproj-12/map-server.vcxproj
@@ -213,12 +213,15 @@
<ClInclude Include="..\src\config\renewal.h" />
<ClInclude Include="..\src\config\secure.h" />
<ClInclude Include="..\src\config\classes\general.h" />
+ <ClInclude Include="..\src\map\refine.h" />
+ <ClInclude Include="..\src\map\refine.p.h" />
<ClInclude Include="..\src\map\rodex.h" />
<ClInclude Include="..\src\map\script.h" />
<ClInclude Include="..\src\map\searchstore.h" />
<ClInclude Include="..\src\map\skill.h" />
<ClInclude Include="..\src\map\status.h" />
<ClInclude Include="..\src\map\storage.h" />
+ <ClInclude Include="..\src\map\stylist.h" />
<ClInclude Include="..\src\map\trade.h" />
<ClInclude Include="..\src\map\unit.h" />
<ClInclude Include="..\src\map\vending.h" />
@@ -287,12 +290,14 @@
<ClCompile Include="..\src\map\pc_groups.c" />
<ClCompile Include="..\src\map\pet.c" />
<ClCompile Include="..\src\map\quest.c" />
+ <ClCompile Include="..\src\map\refine.c" />
<ClCompile Include="..\src\map\rodex.c" />
<ClCompile Include="..\src\map\script.c" />
<ClCompile Include="..\src\map\searchstore.c" />
<ClCompile Include="..\src\map\skill.c" />
<ClCompile Include="..\src\map\status.c" />
<ClCompile Include="..\src\map\storage.c" />
+ <ClCompile Include="..\src\map\stylist.c" />
<ClCompile Include="..\src\map\trade.c" />
<ClCompile Include="..\src\map\unit.c" />
<ClCompile Include="..\src\map\vending.c" />
diff --git a/vcproj-12/map-server.vcxproj.filters b/vcproj-12/map-server.vcxproj.filters
index 8457ddf5f..aae670525 100644
--- a/vcproj-12/map-server.vcxproj.filters
+++ b/vcproj-12/map-server.vcxproj.filters
@@ -112,6 +112,9 @@
<ClCompile Include="..\src\map\storage.c">
<Filter>map</Filter>
</ClCompile>
+ <ClCompile Include="..\src\map\stylist.c">
+ <Filter>map</Filter>
+ </ClCompile>
<ClCompile Include="..\src\map\trade.c">
<Filter>map</Filter>
</ClCompile>
@@ -217,6 +220,9 @@
<ClCompile Include="..\src\map\rodex.c">
<Filter>map</Filter>
</ClCompile>
+ <ClCompile Include="..\src\map\refine.c">
+ <Filter>map</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\map\achievement.h">
@@ -345,6 +351,9 @@
<ClInclude Include="..\src\map\storage.h">
<Filter>map</Filter>
</ClInclude>
+ <ClInclude Include="..\src\map\stylist.h">
+ <Filter>map</Filter>
+ </ClInclude>
<ClInclude Include="..\src\map\trade.h">
<Filter>map</Filter>
</ClInclude>
@@ -495,6 +504,12 @@
<ClInclude Include="..\src\map\rodex.h">
<Filter>map</Filter>
</ClInclude>
+ <ClInclude Include="..\src\map\refine.p.h">
+ <Filter>map</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\refine.h">
+ <Filter>map</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="common">
diff --git a/vcproj-14/map-server.vcxproj b/vcproj-14/map-server.vcxproj
index fca2a7826..ed91f231d 100644
--- a/vcproj-14/map-server.vcxproj
+++ b/vcproj-14/map-server.vcxproj
@@ -211,12 +211,15 @@
<ClInclude Include="..\src\config\renewal.h" />
<ClInclude Include="..\src\config\secure.h" />
<ClInclude Include="..\src\config\classes\general.h" />
+ <ClInclude Include="..\src\map\refine.h" />
+ <ClInclude Include="..\src\map\refine.p.h" />
<ClInclude Include="..\src\map\rodex.h" />
<ClInclude Include="..\src\map\script.h" />
<ClInclude Include="..\src\map\searchstore.h" />
<ClInclude Include="..\src\map\skill.h" />
<ClInclude Include="..\src\map\status.h" />
<ClInclude Include="..\src\map\storage.h" />
+ <ClInclude Include="..\src\map\stylist.h" />
<ClInclude Include="..\src\map\trade.h" />
<ClInclude Include="..\src\map\unit.h" />
<ClInclude Include="..\src\map\vending.h" />
@@ -285,12 +288,14 @@
<ClCompile Include="..\src\map\pc_groups.c" />
<ClCompile Include="..\src\map\pet.c" />
<ClCompile Include="..\src\map\quest.c" />
+ <ClCompile Include="..\src\map\refine.c" />
<ClCompile Include="..\src\map\rodex.c" />
<ClCompile Include="..\src\map\script.c" />
<ClCompile Include="..\src\map\searchstore.c" />
<ClCompile Include="..\src\map\skill.c" />
<ClCompile Include="..\src\map\status.c" />
<ClCompile Include="..\src\map\storage.c" />
+ <ClCompile Include="..\src\map\stylist.c" />
<ClCompile Include="..\src\map\trade.c" />
<ClCompile Include="..\src\map\unit.c" />
<ClCompile Include="..\src\map\vending.c" />
diff --git a/vcproj-14/map-server.vcxproj.filters b/vcproj-14/map-server.vcxproj.filters
index 49099de50..3f1b6ca4b 100644
--- a/vcproj-14/map-server.vcxproj.filters
+++ b/vcproj-14/map-server.vcxproj.filters
@@ -109,6 +109,9 @@
<ClCompile Include="..\src\map\storage.c">
<Filter>map</Filter>
</ClCompile>
+ <ClCompile Include="..\src\map\stylist.c">
+ <Filter>map</Filter>
+ </ClCompile>
<ClCompile Include="..\src\map\trade.c">
<Filter>map</Filter>
</ClCompile>
@@ -217,6 +220,9 @@
<ClCompile Include="..\src\map\clan.c">
<Filter>map</Filter>
</ClCompile>
+ <ClCompile Include="..\src\map\refine.c">
+ <Filter>map</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\map\achievement.h">
@@ -342,6 +348,9 @@
<ClInclude Include="..\src\map\storage.h">
<Filter>map</Filter>
</ClInclude>
+ <ClInclude Include="..\src\map\stylist.h">
+ <Filter>map</Filter>
+ </ClInclude>
<ClInclude Include="..\src\map\trade.h">
<Filter>map</Filter>
</ClInclude>
@@ -495,6 +504,12 @@
<ClInclude Include="..\src\map\clan.h">
<Filter>map</Filter>
</ClInclude>
+ <ClInclude Include="..\src\map\refine.h">
+ <Filter>map</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\refine.p.h">
+ <Filter>map</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="common">
diff --git a/vcproj-15/char-server.vcxproj b/vcproj-15/char-server.vcxproj
index 253437275..6756fc25e 100644
--- a/vcproj-15/char-server.vcxproj
+++ b/vcproj-15/char-server.vcxproj
@@ -14,7 +14,7 @@
<ProjectGuid>{D356871D-58E1-450B-967A-E4E9646175AF}</ProjectGuid>
<RootNamespace>char-server</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
diff --git a/vcproj-15/login-server.vcxproj b/vcproj-15/login-server.vcxproj
index 9f372373b..f045fa290 100644
--- a/vcproj-15/login-server.vcxproj
+++ b/vcproj-15/login-server.vcxproj
@@ -14,7 +14,7 @@
<ProjectGuid>{D356871D-58E1-450B-967A-E5E9646175AF}</ProjectGuid>
<RootNamespace>login-server</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
diff --git a/vcproj-15/map-server.vcxproj b/vcproj-15/map-server.vcxproj
index ac24ce2a2..8becb90cc 100644
--- a/vcproj-15/map-server.vcxproj
+++ b/vcproj-15/map-server.vcxproj
@@ -14,7 +14,7 @@
<ProjectGuid>{D356871D-58E1-450B-967A-E6E9646175AF}</ProjectGuid>
<RootNamespace>map-server</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -212,12 +212,15 @@
<ClInclude Include="..\src\config\renewal.h" />
<ClInclude Include="..\src\config\secure.h" />
<ClInclude Include="..\src\config\classes\general.h" />
+ <ClInclude Include="..\src\map\refine.h" />
+ <ClInclude Include="..\src\map\refine.p.h" />
<ClInclude Include="..\src\map\rodex.h" />
<ClInclude Include="..\src\map\script.h" />
<ClInclude Include="..\src\map\searchstore.h" />
<ClInclude Include="..\src\map\skill.h" />
<ClInclude Include="..\src\map\status.h" />
<ClInclude Include="..\src\map\storage.h" />
+ <ClInclude Include="..\src\map\stylist.h" />
<ClInclude Include="..\src\map\trade.h" />
<ClInclude Include="..\src\map\unit.h" />
<ClInclude Include="..\src\map\vending.h" />
@@ -286,12 +289,14 @@
<ClCompile Include="..\src\map\pc_groups.c" />
<ClCompile Include="..\src\map\pet.c" />
<ClCompile Include="..\src\map\quest.c" />
+ <ClCompile Include="..\src\map\refine.c" />
<ClCompile Include="..\src\map\rodex.c" />
<ClCompile Include="..\src\map\script.c" />
<ClCompile Include="..\src\map\searchstore.c" />
<ClCompile Include="..\src\map\skill.c" />
<ClCompile Include="..\src\map\status.c" />
<ClCompile Include="..\src\map\storage.c" />
+ <ClCompile Include="..\src\map\stylist.c" />
<ClCompile Include="..\src\map\trade.c" />
<ClCompile Include="..\src\map\unit.c" />
<ClCompile Include="..\src\map\vending.c" />
diff --git a/vcproj-15/map-server.vcxproj.filters b/vcproj-15/map-server.vcxproj.filters
index d616f0cbc..087a700e9 100644
--- a/vcproj-15/map-server.vcxproj.filters
+++ b/vcproj-15/map-server.vcxproj.filters
@@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\src\map\achievement.c">
- <Filter>map</Filter>
+ <Filter>map</Filter>
</ClCompile>
<ClCompile Include="..\src\map\atcommand.c">
<Filter>map</Filter>
@@ -109,6 +109,9 @@
<ClCompile Include="..\src\map\status.c">
<Filter>map</Filter>
</ClCompile>
+ <ClCompile Include="..\src\map\stylist.c">
+ <Filter>map</Filter>
+ </ClCompile>
<ClCompile Include="..\src\map\storage.c">
<Filter>map</Filter>
</ClCompile>
@@ -217,6 +220,9 @@
<ClCompile Include="..\src\map\rodex.c">
<Filter>map</Filter>
</ClCompile>
+ <ClCompile Include="..\src\map\refine.c">
+ <Filter>map</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\map\achievement.h">
@@ -342,6 +348,9 @@
<ClInclude Include="..\src\map\status.h">
<Filter>map</Filter>
</ClInclude>
+ <ClInclude Include="..\src\map\stylist.h">
+ <Filter>map</Filter>
+ </ClInclude>
<ClInclude Include="..\src\map\storage.h">
<Filter>map</Filter>
</ClInclude>
@@ -495,6 +504,12 @@
<ClInclude Include="..\src\map\rodex.h">
<Filter>map</Filter>
</ClInclude>
+ <ClInclude Include="..\src\map\refine.p.h">
+ <Filter>map</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\refine.h">
+ <Filter>map</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="common">
diff --git a/vcproj-15/plugin-HPMHooking_char.vcxproj b/vcproj-15/plugin-HPMHooking_char.vcxproj
index 9632998d4..454276905 100644
--- a/vcproj-15/plugin-HPMHooking_char.vcxproj
+++ b/vcproj-15/plugin-HPMHooking_char.vcxproj
@@ -15,7 +15,7 @@
<RootNamespace>plugin-HPMHooking_char</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-HPMHooking_char</ProjectName>
- <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
diff --git a/vcproj-15/plugin-HPMHooking_login.vcxproj b/vcproj-15/plugin-HPMHooking_login.vcxproj
index e496847c1..98079d2be 100644
--- a/vcproj-15/plugin-HPMHooking_login.vcxproj
+++ b/vcproj-15/plugin-HPMHooking_login.vcxproj
@@ -15,7 +15,7 @@
<RootNamespace>plugin-HPMHooking_login</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-HPMHooking_login</ProjectName>
- <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
diff --git a/vcproj-15/plugin-HPMHooking_map.vcxproj b/vcproj-15/plugin-HPMHooking_map.vcxproj
index 753f1cdbc..c63dcffa4 100644
--- a/vcproj-15/plugin-HPMHooking_map.vcxproj
+++ b/vcproj-15/plugin-HPMHooking_map.vcxproj
@@ -15,7 +15,7 @@
<RootNamespace>plugin-HPMHooking_map</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-HPMHooking_map</ProjectName>
- <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
diff --git a/vcproj-15/plugin-sample.vcxproj b/vcproj-15/plugin-sample.vcxproj
index 85ceb0e43..3a77c655a 100644
--- a/vcproj-15/plugin-sample.vcxproj
+++ b/vcproj-15/plugin-sample.vcxproj
@@ -15,7 +15,7 @@
<RootNamespace>plugin-sample</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-sample</ProjectName>
- <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">