summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-08-07 09:26:17 -0300
committerJesusaves <cpntb1@ymail.com>2020-08-07 09:26:17 -0300
commitc53f8a099151f2e8c26c0ab36f35d34256c0d6cb (patch)
tree0558845f1cb8070f39f9af424c8ffcd930a33b90
parentf18ad8f29090dd7c95b47922aabfb5e5569c7630 (diff)
downloadhercules-c53f8a099151f2e8c26c0ab36f35d34256c0d6cb.tar.gz
hercules-c53f8a099151f2e8c26c0ab36f35d34256c0d6cb.tar.bz2
hercules-c53f8a099151f2e8c26c0ab36f35d34256c0d6cb.tar.xz
hercules-c53f8a099151f2e8c26c0ab36f35d34256c0d6cb.zip
This is Hercules v2019.08.25r12.4+1
-rw-r--r--.appveyor.yml3
-rw-r--r--.travis.yml16
-rw-r--r--CHANGELOG.md28
-rw-r--r--Hercules-16.sln (renamed from Hercules-12.sln)21
-rw-r--r--src/char/int_guild.c1
-rw-r--r--src/char/int_party.c1
-rw-r--r--src/char/inter.c95
-rw-r--r--src/char/inter.h11
-rw-r--r--src/char/mapif.c198
-rw-r--r--src/char/mapif.h13
-rw-r--r--src/common/HPMDataCheck.h7
-rw-r--r--src/common/packets/packets2019_len_main.h54
-rw-r--r--src/common/packets/packets2019_len_re.h54
-rw-r--r--src/common/packets/packets2019_len_zero.h49
-rw-r--r--src/map/atcommand.c10
-rw-r--r--src/map/clif.c883
-rw-r--r--src/map/clif.h24
-rw-r--r--src/map/guild.c22
-rw-r--r--src/map/guild.h1
-rw-r--r--src/map/homunculus.c2
-rw-r--r--src/map/intif.c329
-rw-r--r--src/map/intif.h13
-rw-r--r--src/map/itemdb.c4
-rw-r--r--src/map/messages_main.h94
-rw-r--r--src/map/messages_re.h94
-rw-r--r--src/map/messages_zero.h72
-rw-r--r--src/map/mob.c6
-rw-r--r--src/map/npc.c20
-rw-r--r--src/map/npc.h6
-rw-r--r--src/map/packets_keys_main.h8
-rw-r--r--src/map/packets_keys_zero.h5
-rw-r--r--src/map/packets_shuffle_main.h8
-rw-r--r--src/map/packets_shuffle_re.h8
-rw-r--r--src/map/packets_shuffle_zero.h5
-rw-r--r--src/map/packets_struct.h121
-rw-r--r--src/map/party.c25
-rw-r--r--src/map/party.h1
-rw-r--r--src/map/pc.c56
-rw-r--r--src/map/pc.h5
-rw-r--r--src/map/pet.c2
-rw-r--r--src/map/quest.c2
-rw-r--r--src/map/refine.c2
-rw-r--r--src/map/script.c227
-rw-r--r--src/map/script.h25
-rw-r--r--src/map/status.c4
-rw-r--r--src/map/status.h8
-rw-r--r--src/map/trade.c9
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc82
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc68
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc17
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc463
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc72
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc18
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc513
-rw-r--r--vcproj-16/char-server.vcxproj (renamed from vcproj-12/char-server.vcxproj)9
-rw-r--r--vcproj-16/char-server.vcxproj.filters (renamed from vcproj-12/char-server.vcxproj.filters)0
-rw-r--r--vcproj-16/login-server.vcxproj (renamed from vcproj-12/login-server.vcxproj)9
-rw-r--r--vcproj-16/login-server.vcxproj.filters (renamed from vcproj-12/login-server.vcxproj.filters)0
-rw-r--r--vcproj-16/map-server.vcxproj (renamed from vcproj-12/map-server.vcxproj)9
-rw-r--r--vcproj-16/map-server.vcxproj.filters (renamed from vcproj-12/map-server.vcxproj.filters)0
-rw-r--r--vcproj-16/plugin-HPMHooking_char.vcxproj (renamed from vcproj-12/plugin-HPMHooking_char.vcxproj)7
-rw-r--r--vcproj-16/plugin-HPMHooking_login.vcxproj (renamed from vcproj-12/plugin-HPMHooking_login.vcxproj)7
-rw-r--r--vcproj-16/plugin-HPMHooking_map.vcxproj (renamed from vcproj-12/plugin-HPMHooking_map.vcxproj)7
-rw-r--r--vcproj-16/plugin-sample.vcxproj (renamed from vcproj-12/plugin-sample.vcxproj)7
64 files changed, 1778 insertions, 2162 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index dd63715c8..4b3b03e6a 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -11,10 +11,11 @@ image: Visual Studio 2015
clone_depth: 5
environment:
matrix:
- - HerculesProject: Hercules-12.sln
- HerculesProject: Hercules-14.sln
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
HerculesProject: Hercules-15.sln
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
+ HerculesProject: Hercules-16.sln
services: mysql56
build_script:
- cmd: MSBuild %HerculesProject% /t:map-server,char-server,login-server
diff --git a/.travis.yml b/.travis.yml
index c8c2ab33d..a02f65eeb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,7 @@ matrix:
- compiler: false
include:
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20190724 --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=20190821 --enable-packetver-re --enable-buildbot" HPM="1"
addons:
apt:
sources:
@@ -52,7 +52,7 @@ matrix:
- libxml-sax-perl
- libxml-parser-perl
- compiler: clang
- env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20190724 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20190821 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -72,7 +72,7 @@ matrix:
- gdb
- clang-5.0
- compiler: clang
- env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20190724 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20190821 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -106,11 +106,11 @@ matrix:
- compiler: clang
env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot"
- compiler: gcc
- env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20190724 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20190821 --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=20190724 --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=20190821 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -128,7 +128,7 @@ matrix:
- 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=20190724 --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=20190821 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -146,7 +146,7 @@ matrix:
- gdb
- gcc-6
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20190724 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20190821 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -164,7 +164,7 @@ matrix:
- 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=20190724 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20190821 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3221c8ece..2b52d8dd6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,33 @@ 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.08.25] `August 25 2019`
+
+### Added
+
+- Added/updated packets, encryption keys and message tables for clients up to 2019-08-21. (#2517)
+- Added icons for the elemental resistance status changes (`SC_ARMORPROPERTY`). (#2516)
+- Added Visual Studio 2019 solution. (#2520)
+- Added new NPC ID constants. (#2521)
+
+### Changed
+
+- Converted various packets (`ZC_ADD_SKILL`, `ZC_SKILLINFO_LIST`, `ZC_SKILLINFO_UPDATE2`) into structs and added a new version for `ZC_NPC_MARKET_PURCHASE_RESULT`. (part of #2517)
+- Added missing sanity checks into many clif functions. (#2501)
+- Extended the `getequiprefinerycnt()` command to accept multiple equipment slots at the same time, returning the total refine of them. (#2512)
+- Added the path (relative to the Hercules root) to various database reading status messages. (#2513)
+- Extended `setiteminfo()` and `getiteminfo()` with additional options: `ITEMINFO_ELV_MAX`, `ITEMINFO_DELAY`, `ITEMINFO_DROPEFFECT_MODE`, `ITEMINFO_CLASS_*`, `ITEMINFO_FLAG_*`, `ITEMINFO_STACK_*`, `ITEMINFO_ITEM_USAGE_*`, `ITEMINFO_GM_LV_TRADE_OVERRIDE`. (#2518)
+
+### Fixed
+
+- Fixed packets `ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN` and `ZC_MAKINGITEM_LIST`. (part of #2517)
+- Fixed an overflow in the auto bonus processing function, that made it unable to handle costume/shadow gears. (#2514, issues #1355, #1190, #2451)
+
+### Removed
+
+- Removed Visual Studio 2013 solution. (part of #2520)
+- Removed round-trips to the inter-server for packets related to whisper messages, reports to GMs, GM broadcasts, party, guild and main chat, previously needed for, now unsupported, multi-zone setups. (#2522)
+
### [v2019.07.28] `July 28 2019`
### Added
@@ -860,6 +887,7 @@ 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.08.25]: https://github.com/HerculesWS/Hercules/compare/v2019.07.28...v2019.08.25
[v2019.07.28]: https://github.com/HerculesWS/Hercules/compare/v2019.06.30...v2019.07.28
[v2019.06.30]: https://github.com/HerculesWS/Hercules/compare/v2019.06.02...v2019.06.30
[v2019.06.02]: https://github.com/HerculesWS/Hercules/compare/v2019.05.05+4...v2019.06.02
diff --git a/Hercules-12.sln b/Hercules-16.sln
index c1a78b5ef..b4bece6d9 100644
--- a/Hercules-12.sln
+++ b/Hercules-16.sln
@@ -1,21 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29123.88
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-12\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-16\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-12\login-server.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-16\login-server.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "vcproj-12\map-server.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "vcproj-16\map-server.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-12\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-16\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_map", "vcproj-12\plugin-HPMHooking_map.vcxproj", "{745D4A8C-6A68-4721-A43A-D81BF59860A1}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_map", "vcproj-16\plugin-HPMHooking_map.vcxproj", "{745D4A8C-6A68-4721-A43A-D81BF59860A1}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_char", "vcproj-12\plugin-HPMHooking_char.vcxproj", "{D495824D-24D3-4623-A28C-4CA506084A09}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_char", "vcproj-16\plugin-HPMHooking_char.vcxproj", "{D495824D-24D3-4623-A28C-4CA506084A09}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_login", "vcproj-12\plugin-HPMHooking_login.vcxproj", "{544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_login", "vcproj-16\plugin-HPMHooking_login.vcxproj", "{544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -55,4 +55,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {5DB2664E-B4D7-4FC3-B0E2-F5E7608B9393}
+ EndGlobalSection
EndGlobal
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 8e05c76e2..87cb3bee0 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1612,7 +1612,6 @@ static int inter_guild_parse_frommap(int fd)
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),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;
case 0x303A: mapif->parse_GuildMemberInfoChange(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOL(fd,12), RFIFOW(fd,16), RFIFOP(fd,18), RFIFOW(fd,2)-18); break;
case 0x303B: mapif->parse_GuildPosition(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12)); break;
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 8ee03ecc5..c27d708f2 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -599,7 +599,6 @@ static int inter_party_parse_frommap(int fd)
case 0x3024: mapif->parse_PartyLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
case 0x3025: mapif->parse_PartyChangeMap(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOW(fd,14), RFIFOB(fd,16), RFIFOW(fd,17)); break;
case 0x3026: mapif->parse_BreakParty(fd, RFIFOL(fd,2)); break;
- case 0x3027: mapif->parse_PartyMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
case 0x3029: mapif->parse_PartyLeaderChange(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
default:
return 0;
diff --git a/src/char/inter.c b/src/char/inter.c
index 64c840c16..264327289 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -53,9 +53,6 @@
#include <stdio.h>
#include <stdlib.h>
-#define WISDATA_TTL (60*1000) // Wis data Time To Live (60 seconds)
-#define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis
-
static struct inter_interface inter_s;
struct inter_interface *inter;
@@ -70,10 +67,10 @@ int party_share_level = 10;
// recv. packet list
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-
+ 0, 0, 0, 0, -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,23, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030-
+ -1,10,-1,14, 14,19, 6, 0, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party
+ -1, 6,-1,-1, 55,23, 6, 0, 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]
@@ -82,9 +79,6 @@ static int inter_recv_packet_length[] = {
-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*
-static int wis_dellist[WISDELLIST_MAX], wis_delnum;
-
#define MAX_JOB_NAMES 150
static char *msg_table[MAX_JOB_NAMES]; // messages 550 ~ 699 are job names
@@ -964,7 +958,6 @@ static int inter_init_sql(const char *file)
Sql_ShowDebug(inter->sql_handle);
}
- wis_db = idb_alloc(DB_OPT_RELEASE_DATA);
inter_guild->sql_init();
inter_storage->sql_init();
inter_party->sql_init();
@@ -985,8 +978,6 @@ static int inter_init_sql(const char *file)
// finalize
static void inter_final(void)
{
- wis_db->destroy(wis_db, NULL);
-
inter_guild->sql_final();
inter_storage->sql_final();
inter_party->sql_final();
@@ -1011,77 +1002,6 @@ static int inter_mapif_init(int fd)
//--------------------------------------------------------
-/**
- * Existence check of WISP data
- * @see DBApply
- */
-static int inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list ap)
-{
- int64 tick;
- struct WisData *wd = DB->data2ptr(data);
- nullpo_ret(wd);
- tick = va_arg(ap, int64);
-
- if (DIFF_TICK(tick, wd->tick) > WISDATA_TTL && wis_delnum < WISDELLIST_MAX)
- wis_dellist[wis_delnum++] = wd->id;
-
- return 0;
-}
-
-static int inter_check_ttl_wisdata(void)
-{
- int64 tick = timer->gettick();
- int i;
-
- do {
- wis_delnum = 0;
- wis_db->foreach(wis_db, inter->check_ttl_wisdata_sub, tick);
- for(i = 0; i < wis_delnum; i++) {
- struct WisData *wd = (struct WisData*)idb_get(wis_db, wis_dellist[i]);
- ShowWarning("inter: wis data id=%d time out : from %s to %s\n", wd->id, wd->src, wd->dst);
- // removed. not send information after a timeout. Just no answer for the player
- //mapif->wis_end(wd, 1); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
- idb_remove(wis_db, wd->id);
- }
- } while(wis_delnum >= WISDELLIST_MAX);
-
- return 0;
-}
-
-static struct WisData *inter_add_wisdata(int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len)
-{
- static int wisid = 0;
- struct WisData *wd;
-
- CREATE(wd, struct WisData, 1);
-
- // Whether the failure of previous wisp/page transmission (timeout)
- inter->check_ttl_wisdata();
-
- wd->id = ++wisid;
- wd->fd = fd;
- wd->len = msg_len;
- memcpy(wd->src, src, NAME_LENGTH);
- memcpy(wd->dst, dst, NAME_LENGTH);
- memcpy(wd->msg, msg, wd->len);
- wd->tick = timer->gettick();
- idb_put(wis_db, wd->id, wd);
-
- return wd;
-}
-
-static struct WisData *inter_get_wisdata(int id)
-{
- return idb_get(wis_db, id);
-}
-
-static void inter_remove_wisdata(int id)
-{
- idb_remove(wis_db, id);
-}
-
-//--------------------------------------------------------
-
/// Returns the length of the next complete packet to process,
/// or 0 if no complete packet exists in the queue.
///
@@ -1115,10 +1035,6 @@ static int inter_parse_frommap(int fd)
return 2;
switch(cmd) {
- case 0x3000: mapif->parse_broadcast(fd); break;
- case 0x3001: mapif->parse_WisRequest(fd); break;
- case 0x3002: mapif->parse_WisReply(fd); break;
- case 0x3003: mapif->parse_WisToGM(fd); break;
case 0x3004: mapif->parse_Registry(fd); break;
case 0x3005: mapif->parse_RegistryRequest(fd); break;
case 0x3006: mapif->parse_NameChangeRequest(fd); break;
@@ -1167,8 +1083,6 @@ void inter_defaults(void)
inter->log = inter_log;
inter->init_sql = inter_init_sql;
inter->mapif_init = inter_mapif_init;
- inter->check_ttl_wisdata_sub = inter_check_ttl_wisdata_sub;
- inter->check_ttl_wisdata = inter_check_ttl_wisdata;
inter->check_length = inter_check_length;
inter->parse_frommap = inter_parse_frommap;
inter->final = inter_final;
@@ -1176,7 +1090,4 @@ void inter_defaults(void)
inter->config_read_connection = inter_config_read_connection;
inter->accinfo = inter_accinfo;
inter->accinfo2 = inter_accinfo2;
- inter->add_wisdata = inter_add_wisdata;
- inter->get_wisdata = inter_get_wisdata;
- inter->remove_wisdata = inter_remove_wisdata;
}
diff --git a/src/char/inter.h b/src/char/inter.h
index 94ee3ab60..f97c619c0 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -30,12 +30,6 @@
struct Sql; // common/sql.h
struct config_t; // common/conf.h
-struct WisData {
- int id, fd, count, len;
- int64 tick;
- unsigned char src[24], dst[24], msg[512];
-};
-
/**
* inter interface
**/
@@ -54,8 +48,6 @@ struct inter_interface {
int (*log) (char* fmt, ...);
int (*init_sql) (const char *file);
int (*mapif_init) (int fd);
- int (*check_ttl_wisdata_sub) (union DBKey key, struct DBData *data, va_list ap);
- int (*check_ttl_wisdata) (void);
int (*check_length) (int fd, int length);
int (*parse_frommap) (int fd);
void (*final) (void);
@@ -66,9 +58,6 @@ struct inter_interface {
void (*accinfo2) (bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass,
const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate,
int group_id, int logincount, int state);
- struct WisData *(*add_wisdata) (int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len);
- struct WisData *(*get_wisdata) (int id);
- void (*remove_wisdata) (int id);
};
#ifdef HERCULES_CORE
diff --git a/src/char/mapif.c b/src/char/mapif.c
index 8f213ecb5..29be4eaa2 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -596,22 +596,6 @@ static int mapif_guild_broken(int guild_id, int flag)
return 0;
}
-// Send guild message
-static int mapif_guild_message(int guild_id, int account_id, const char *mes, int len, int sfd)
-{
- unsigned char buf[512];
- nullpo_ret(mes);
- if (len > 500)
- len = 500;
- WBUFW(buf, 0) = 0x3837;
- WBUFW(buf, 2) = len + 12;
- WBUFL(buf, 4) = guild_id;
- WBUFL(buf, 8) = account_id;
- memcpy(WBUFP(buf, 12), mes, len);
- mapif->sendallwos(sfd, buf, len + 12);
- return 0;
-}
-
// Send basic info
static int mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len)
{
@@ -810,12 +794,6 @@ static int mapif_parse_BreakGuild(int fd, int guild_id)
return 0;
}
-// Forward Guild message to others map servers
-static int mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len)
-{
- return mapif->guild_message(guild_id,account_id,mes,len, fd);
-}
-
/**
* Changes basic guild information
* The types are available in mmo.h::guild_basic_info
@@ -1319,20 +1297,6 @@ static int mapif_party_broken(int party_id, int flag)
return 0;
}
-//Remarks in the party
-static int mapif_party_message(int party_id, int account_id, const char *mes, int len, int sfd)
-{
- unsigned char buf[512];
- nullpo_ret(mes);
- WBUFW(buf, 0) = 0x3827;
- WBUFW(buf, 2) = len + 12;
- WBUFL(buf, 4) = party_id;
- WBUFL(buf, 8) = account_id;
- memcpy(WBUFP(buf, 12), mes, len);
- mapif->sendallwos(sfd, buf, len + 12);
- return 0;
-}
-
// Create Party
static int mapif_parse_CreateParty(int fd, const char *name, int item, int item2, const struct party_member *leader)
{
@@ -1408,12 +1372,6 @@ static int mapif_parse_BreakParty(int fd, int party_id)
return 0;
}
-//Party sending the message
-static int mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char *mes, int len)
-{
- return mapif->party_message(party_id, account_id, mes, len, fd);
-}
-
static int mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int char_id)
{
if (!inter_party->change_leader(party_id, account_id, char_id))
@@ -2034,67 +1992,6 @@ static void mapif_parse_accinfo(int fd)
inter->accinfo(u_fd, aid, castergroup, query, fd);
}
-// broadcast sending
-static int mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd)
-{
- unsigned char *buf = (unsigned char*)aMalloc((len)*sizeof(unsigned char));
-
- nullpo_ret(mes);
- Assert_ret(len >= 16);
- WBUFW(buf, 0) = 0x3800;
- WBUFW(buf, 2) = len;
- WBUFL(buf, 4) = fontColor;
- WBUFW(buf, 8) = fontType;
- WBUFW(buf, 10) = fontSize;
- WBUFW(buf, 12) = fontAlign;
- WBUFW(buf, 14) = fontY;
- memcpy(WBUFP(buf, 16), mes, len - 16);
- mapif->sendallwos(sfd, buf, len);
-
- aFree(buf);
- return 0;
-}
-
-// Wis sending
-static int mapif_wis_message(struct WisData *wd)
-{
- unsigned char buf[2048];
- nullpo_ret(wd);
- //if (wd->len > 2047-56) wd->len = 2047-56; //Force it to fit to avoid crashes. [Skotlex]
- if (wd->len < 0)
- wd->len = 0;
- if (wd->len >= (int)sizeof(wd->msg) - 1)
- wd->len = (int)sizeof(wd->msg) - 1;
-
- WBUFW(buf, 0) = 0x3801;
- WBUFW(buf, 2) = 56 + wd->len;
- WBUFL(buf, 4) = wd->id;
- memcpy(WBUFP(buf, 8), wd->src, NAME_LENGTH);
- memcpy(WBUFP(buf, 32), wd->dst, NAME_LENGTH);
- memcpy(WBUFP(buf, 56), wd->msg, wd->len);
- wd->count = mapif->sendall(buf, WBUFW(buf, 2));
-
- return 0;
-}
-
-static void mapif_wis_response(int fd, const unsigned char *src, int flag)
-{
- unsigned char buf[27];
- nullpo_retv(src);
- WBUFW(buf, 0) = 0x3802;
- memcpy(WBUFP(buf, 2), src, 24);
- WBUFB(buf, 26) = flag;
- mapif->send(fd, buf, 27);
-}
-
-// Wis sending result
-static int mapif_wis_end(struct WisData *wd, int flag)
-{
- nullpo_ret(wd);
- mapif->wis_response(wd->fd, wd->src, flag);
- return 0;
-}
-
#if 0
// Account registry transfer to map-server
static void mapif_account_reg(int fd, unsigned char *src)
@@ -2126,89 +2023,6 @@ static int mapif_disconnectplayer(int fd, int account_id, int char_id, int reaso
return 0;
}
-// broadcast sending
-static int mapif_parse_broadcast(int fd)
-{
- mapif->broadcast(RFIFOP(fd, 16), RFIFOW(fd, 2), RFIFOL(fd, 4), RFIFOW(fd, 8), RFIFOW(fd, 10), RFIFOW(fd, 12), RFIFOW(fd, 14), fd);
- return 0;
-}
-
-// Wisp/page request to send
-static int mapif_parse_WisRequest(int fd)
-{
- struct WisData* wd;
- char name[NAME_LENGTH];
- char *data;
- size_t len;
-
- if (fd <= 0) // check if we have a valid fd
- return 0;
-
- if (RFIFOW(fd, 2) - 52 >= sizeof(wd->msg)) {
- ShowWarning("inter: Wis message size too long.\n");
- return 0;
- } else if (RFIFOW(fd, 2) - 52 <= 0) { // normally, impossible, but who knows...
- ShowError("inter: Wis message doesn't exist.\n");
- return 0;
- }
-
- safestrncpy(name, RFIFOP(fd, 28), NAME_LENGTH); //Received name may be too large and not contain \0! [Skotlex]
-
- // search if character exists before to ask all map-servers
- if (!chr->name_exists(name, NULL)) {
- mapif->wis_response(fd, RFIFOP(fd, 4), 1);
- } else {
- // Character exists. So, ask all map-servers
-
- // to be sure of the correct name, rewrite it
- SQL->GetData(inter->sql_handle, 0, &data, &len);
- memset(name, 0, NAME_LENGTH);
- memcpy(name, data, min(len, NAME_LENGTH));
- // if source is destination, don't ask other servers.
- if (strncmp(RFIFOP(fd, 4), name, NAME_LENGTH) == 0) {
- mapif->wis_response(fd, RFIFOP(fd, 4), 1);
- } else {
- wd = inter->add_wisdata(fd, RFIFOP(fd, 4), RFIFOP(fd, 28), RFIFOP(fd, 52), RFIFOW(fd, 2) - 52);
- mapif->wis_message(wd);
- }
- }
-
- SQL->FreeResult(inter->sql_handle);
- return 0;
-}
-
-// Wisp/page transmission result
-static int mapif_parse_WisReply(int fd)
-{
- int id, flag;
- struct WisData *wd;
-
- id = RFIFOL(fd,2);
- flag = RFIFOB(fd,6);
- wd = inter->get_wisdata(id);
- if (wd == NULL)
- return 0; // This wisp was probably suppress before, because it was timeout of because of target was found on another map-server
-
- if ((--wd->count) <= 0 || flag != 1) {
- mapif->wis_end(wd, flag); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
- inter->remove_wisdata(id);
- }
-
- return 0;
-}
-
-// Received wisp message from map-server for ALL gm (just copy the message and resends it to ALL map-servers)
-static int mapif_parse_WisToGM(int fd)
-{
- unsigned char buf[2048]; // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
-
- memcpy(WBUFP(buf,0), RFIFOP(fd,0), RFIFOW(fd,2)); // Message contains the NUL terminator (see intif_wis_message_to_gm())
- WBUFW(buf, 0) = 0x3803;
- mapif->sendall(buf, RFIFOW(fd,2));
-
- return 0;
-}
-
// Save account_reg into sql (type=2)
static int mapif_parse_Registry(int fd)
{
@@ -2532,7 +2346,6 @@ void mapif_defaults(void)
mapif->guild_withdraw = mapif_guild_withdraw;
mapif->guild_memberinfoshort = mapif_guild_memberinfoshort;
mapif->guild_broken = mapif_guild_broken;
- mapif->guild_message = mapif_guild_message;
mapif->guild_basicinfochanged = mapif_guild_basicinfochanged;
mapif->guild_memberinfochanged = mapif_guild_memberinfochanged;
mapif->guild_skillupack = mapif_guild_skillupack;
@@ -2548,7 +2361,6 @@ void mapif_defaults(void)
mapif->parse_GuildLeave = mapif_parse_GuildLeave;
mapif->parse_GuildChangeMemberInfoShort = mapif_parse_GuildChangeMemberInfoShort;
mapif->parse_BreakGuild = mapif_parse_BreakGuild;
- mapif->parse_GuildMessage = mapif_parse_GuildMessage;
mapif->parse_GuildBasicInfoChange = mapif_parse_GuildBasicInfoChange;
mapif->parse_GuildMemberInfoChange = mapif_parse_GuildMemberInfoChange;
mapif->parse_GuildPosition = mapif_parse_GuildPosition;
@@ -2596,7 +2408,6 @@ void mapif_defaults(void)
mapif->party_withdraw = mapif_party_withdraw;
mapif->party_membermoved = mapif_party_membermoved;
mapif->party_broken = mapif_party_broken;
- mapif->party_message = mapif_party_message;
mapif->parse_CreateParty = mapif_parse_CreateParty;
mapif->parse_PartyInfo = mapif_parse_PartyInfo;
mapif->parse_PartyAddMember = mapif_parse_PartyAddMember;
@@ -2604,7 +2415,6 @@ void mapif_defaults(void)
mapif->parse_PartyLeave = mapif_parse_PartyLeave;
mapif->parse_PartyChangeMap = mapif_parse_PartyChangeMap;
mapif->parse_BreakParty = mapif_parse_BreakParty;
- mapif->parse_PartyMessage = mapif_parse_PartyMessage;
mapif->parse_PartyLeaderChange = mapif_parse_PartyLeaderChange;
mapif->pet_created = mapif_pet_created;
mapif->pet_info = mapif_pet_info;
@@ -2644,16 +2454,8 @@ void mapif_defaults(void)
mapif->itembound_ack = mapif_itembound_ack;
mapif->parse_ItemBoundRetrieve = mapif_parse_ItemBoundRetrieve;
mapif->parse_accinfo = mapif_parse_accinfo;
- mapif->broadcast = mapif_broadcast;
- mapif->wis_message = mapif_wis_message;
- mapif->wis_response = mapif_wis_response;
- mapif->wis_end = mapif_wis_end;
mapif->account_reg_reply = mapif_account_reg_reply;
mapif->disconnectplayer = mapif_disconnectplayer;
- mapif->parse_broadcast = mapif_parse_broadcast;
- mapif->parse_WisRequest = mapif_parse_WisRequest;
- mapif->parse_WisReply = mapif_parse_WisReply;
- mapif->parse_WisToGM = mapif_parse_WisToGM;
mapif->parse_Registry = mapif_parse_Registry;
mapif->parse_RegistryRequest = mapif_parse_RegistryRequest;
mapif->namechange_ack = mapif_namechange_ack;
diff --git a/src/char/mapif.h b/src/char/mapif.h
index 71a41f94c..f5b54b6b7 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -23,7 +23,6 @@
#include "common/hercules.h"
#include "common/mmo.h"
-struct WisData;
struct rodex_item;
/**
@@ -71,7 +70,6 @@ struct mapif_interface {
int (*guild_withdraw) (int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes);
int (*guild_memberinfoshort) (struct guild *g, int idx);
int (*guild_broken) (int guild_id, int flag);
- int (*guild_message) (int guild_id, int account_id, const char *mes, int len, int sfd);
int (*guild_basicinfochanged) (int guild_id, int type, const void *data, int len);
int (*guild_memberinfochanged) (int guild_id, int account_id, int char_id, int type, const void *data, int len);
int (*guild_skillupack) (int guild_id, uint16 skill_id, int account_id);
@@ -87,7 +85,6 @@ struct mapif_interface {
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, 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);
int (*parse_GuildMemberInfoChange) (int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len);
int (*parse_GuildPosition) (int fd, int guild_id, int idx, const struct guild_position *p);
@@ -135,7 +132,6 @@ struct mapif_interface {
int (*party_withdraw) (int party_id,int account_id, int char_id);
int (*party_membermoved) (struct party *p, int idx);
int (*party_broken) (int party_id, int flag);
- int (*party_message) (int party_id, int account_id, const char *mes, int len, int sfd);
int (*parse_CreateParty) (int fd, const char *name, int item, int item2, const struct party_member *leader);
void (*parse_PartyInfo) (int fd, int party_id, int char_id);
int (*parse_PartyAddMember) (int fd, int party_id, const struct party_member *member);
@@ -143,7 +139,6 @@ struct mapif_interface {
int (*parse_PartyLeave) (int fd, int party_id, int account_id, int char_id);
int (*parse_PartyChangeMap) (int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv);
int (*parse_BreakParty) (int fd, int party_id);
- int (*parse_PartyMessage) (int fd, int party_id, int account_id, const char *mes, int len);
int (*parse_PartyLeaderChange) (int fd, int party_id, int account_id, int char_id);
int (*pet_created) (int fd, int account_id, struct s_pet *p);
int (*pet_info) (int fd, int account_id, struct s_pet *p);
@@ -182,16 +177,8 @@ struct mapif_interface {
int (*itembound_ack) (int fd, int aid, int guild_id);
void (*parse_ItemBoundRetrieve) (int fd);
void (*parse_accinfo) (int fd);
- int (*broadcast) (const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd);
- int (*wis_message) (struct WisData *wd);
- void (*wis_response) (int fd, const unsigned char *src, int flag);
- int (*wis_end) (struct WisData *wd, int flag);
int (*account_reg_reply) (int fd,int account_id,int char_id, int type);
int (*disconnectplayer) (int fd, int account_id, int char_id, int reason);
- int (*parse_broadcast) (int fd);
- int (*parse_WisRequest) (int fd);
- int (*parse_WisReply) (int fd);
- int (*parse_WisToGM) (int fd);
int (*parse_Registry) (int fd);
int (*parse_RegistryRequest) (int fd);
void (*namechange_ack) (int fd, int account_id, int char_id, int type, int flag, const char *name);
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index d63ed7b99..96fea8fe0 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -52,7 +52,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#define CHAR_GEOIP_H
#endif // CHAR_GEOIP_H
#ifdef CHAR_INTER_H
- { "WisData", sizeof(struct WisData), SERVER_TYPE_CHAR },
{ "inter_interface", sizeof(struct inter_interface), SERVER_TYPE_CHAR },
#else
#define CHAR_INTER_H
@@ -681,6 +680,7 @@ 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_ADD_SKILL", sizeof(struct PACKET_ZC_ADD_SKILL), 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 },
@@ -716,6 +716,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_NOTIFY_UNREADMAIL", sizeof(struct PACKET_ZC_NOTIFY_UNREADMAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_WEAPONITEMLIST", sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub", sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub", sizeof(struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_OPEN_UI", sizeof(struct PACKET_ZC_OPEN_UI), SERVER_TYPE_MAP },
{ "PACKET_ZC_OVERWEIGHT_PERCENT", sizeof(struct PACKET_ZC_OVERWEIGHT_PERCENT), SERVER_TYPE_MAP },
{ "PACKET_ZC_PC_CASH_POINT_ITEMLIST", sizeof(struct PACKET_ZC_PC_CASH_POINT_ITEMLIST), SERVER_TYPE_MAP },
@@ -735,6 +736,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "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 },
+ { "PACKET_ZC_SKILLINFO_LIST", sizeof(struct PACKET_ZC_SKILLINFO_LIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_SKILLINFO_UPDATE2", sizeof(struct PACKET_ZC_SKILLINFO_UPDATE2), SERVER_TYPE_MAP },
{ "PACKET_ZC_SPRITE_CHANGE", sizeof(struct PACKET_ZC_SPRITE_CHANGE), SERVER_TYPE_MAP },
{ "PACKET_ZC_STATUS_CHANGE_ACK", sizeof(struct PACKET_ZC_STATUS_CHANGE_ACK), SERVER_TYPE_MAP },
{ "PACKET_ZC_STYLE_CHANGE_RES", sizeof(struct PACKET_ZC_STYLE_CHANGE_RES), SERVER_TYPE_MAP },
@@ -744,6 +747,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_WARPLIST", sizeof(struct PACKET_ZC_WARPLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_WARPLIST_sub", sizeof(struct PACKET_ZC_WARPLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP },
+ { "SKILLDATA", sizeof(struct SKILLDATA), SERVER_TYPE_MAP },
{ "ZC_INVENTORY_END", sizeof(struct ZC_INVENTORY_END), SERVER_TYPE_MAP },
{ "ZC_INVENTORY_START", sizeof(struct ZC_INVENTORY_START), SERVER_TYPE_MAP },
{ "ZC_PROGRESS_ACTOR", sizeof(struct ZC_PROGRESS_ACTOR), SERVER_TYPE_MAP },
@@ -790,7 +794,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "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_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 },
{ "packet_party_leader_changed", sizeof(struct packet_party_leader_changed), SERVER_TYPE_MAP },
{ "packet_quest_add_header", sizeof(struct packet_quest_add_header), SERVER_TYPE_MAP },
diff --git a/src/common/packets/packets2019_len_main.h b/src/common/packets/packets2019_len_main.h
index bfcb7c159..949aae804 100644
--- a/src/common/packets/packets2019_len_main.h
+++ b/src/common/packets/packets2019_len_main.h
@@ -4312,7 +4312,9 @@ packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
// Packet: 0x0b04
-#if PACKETVER >= 20190605
+#if PACKETVER >= 20190807
+packetLen(0x0b04, 90)
+#elif PACKETVER >= 20190605
packetLen(0x0b04, 72)
#elif PACKETVER >= 20190109
packetLen(0x0b04, 80)
@@ -4521,17 +4523,17 @@ packetLen(0x0b30, -1)
// Packet: 0x0b31
#if PACKETVER >= 20190619
-packetLen(0x0b31, 17)
+packetLen(0x0b31, 17) // ZC_ADD_SKILL
#endif
// Packet: 0x0b32
#if PACKETVER >= 20190619
-packetLen(0x0b32, -1)
+packetLen(0x0b32, -1) // ZC_SKILLINFO_LIST
#endif
// Packet: 0x0b33
#if PACKETVER >= 20190619
-packetLen(0x0b33, 17)
+packetLen(0x0b33, 17) // ZC_SKILLINFO_UPDATE2
#endif
// Packet: 0x0b34
@@ -4662,9 +4664,51 @@ packetLen(0x0b4c, 2)
#endif
// Packet: 0x0b4d
-#if PACKETVER >= 20190724
+#if PACKETVER >= 20190807
+packetLen(0x0b4d, -1)
+#elif PACKETVER >= 20190724
packetLen(0x0b4d, 6)
#endif
+// Packet: 0x0b4e
+#if PACKETVER >= 20190807
+packetLen(0x0b4e, -1)
+#endif
+
+// Packet: 0x0b4f
+#if PACKETVER >= 20190807
+packetLen(0x0b4f, 2)
+#endif
+
+// Packet: 0x0b50
+#if PACKETVER >= 20190807
+packetLen(0x0b50, 2)
+#endif
+
+// Packet: 0x0b51
+#if PACKETVER >= 20190807
+packetLen(0x0b51, 2)
+#endif
+
+// Packet: 0x0b52
+#if PACKETVER >= 20190807
+packetLen(0x0b52, 2)
+#endif
+
+// Packet: 0x0b53
+#if PACKETVER >= 20190821
+packetLen(0x0b53, 52)
+#endif
+
+// Packet: 0x0b54
+#if PACKETVER >= 20190821
+packetLen(0x0b54, 8)
+#endif
+
+// Packet: 0x0b55
+#if PACKETVER >= 20190821
+packetLen(0x0b55, -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
index 33aa7a524..c31a10191 100644
--- a/src/common/packets/packets2019_len_re.h
+++ b/src/common/packets/packets2019_len_re.h
@@ -4318,7 +4318,9 @@ packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
// Packet: 0x0b04
-#if PACKETVER >= 20190605
+#if PACKETVER >= 20190807
+packetLen(0x0b04, 90)
+#elif PACKETVER >= 20190605
packetLen(0x0b04, 72)
#elif PACKETVER >= 20190109
packetLen(0x0b04, 80)
@@ -4533,17 +4535,17 @@ packetLen(0x0b30, -1)
// Packet: 0x0b31
#if PACKETVER >= 20190619
-packetLen(0x0b31, 17)
+packetLen(0x0b31, 17) // ZC_ADD_SKILL
#endif
// Packet: 0x0b32
#if PACKETVER >= 20190619
-packetLen(0x0b32, -1)
+packetLen(0x0b32, -1) // ZC_SKILLINFO_LIST
#endif
// Packet: 0x0b33
#if PACKETVER >= 20190619
-packetLen(0x0b33, 17)
+packetLen(0x0b33, 17) // ZC_SKILLINFO_UPDATE2
#endif
// Packet: 0x0b34
@@ -4674,9 +4676,51 @@ packetLen(0x0b4c, 2)
#endif
// Packet: 0x0b4d
-#if PACKETVER >= 20190724
+#if PACKETVER >= 20190807
+packetLen(0x0b4d, -1)
+#elif PACKETVER >= 20190724
packetLen(0x0b4d, 6)
#endif
+// Packet: 0x0b4e
+#if PACKETVER >= 20190807
+packetLen(0x0b4e, -1)
+#endif
+
+// Packet: 0x0b4f
+#if PACKETVER >= 20190807
+packetLen(0x0b4f, 2)
+#endif
+
+// Packet: 0x0b50
+#if PACKETVER >= 20190807
+packetLen(0x0b50, 2)
+#endif
+
+// Packet: 0x0b51
+#if PACKETVER >= 20190807
+packetLen(0x0b51, 2)
+#endif
+
+// Packet: 0x0b52
+#if PACKETVER >= 20190807
+packetLen(0x0b52, 2)
+#endif
+
+// Packet: 0x0b53
+#if PACKETVER >= 20190821
+packetLen(0x0b53, 52)
+#endif
+
+// Packet: 0x0b54
+#if PACKETVER >= 20190821
+packetLen(0x0b54, 8)
+#endif
+
+// Packet: 0x0b55
+#if PACKETVER >= 20190821
+packetLen(0x0b55, -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
index 7b9310cf2..abe81796c 100644
--- a/src/common/packets/packets2019_len_zero.h
+++ b/src/common/packets/packets2019_len_zero.h
@@ -4312,7 +4312,9 @@ packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
// Packet: 0x0b04
-#if PACKETVER >= 20190605
+#if PACKETVER >= 20190814
+packetLen(0x0b04, 90)
+#elif PACKETVER >= 20190605
packetLen(0x0b04, 72)
#elif PACKETVER >= 20190116
packetLen(0x0b04, 80)
@@ -4513,17 +4515,17 @@ packetLen(0x0b30, -1)
// Packet: 0x0b31
#if PACKETVER >= 20190626
-packetLen(0x0b31, 17)
+packetLen(0x0b31, 17) // ZC_ADD_SKILL
#endif
// Packet: 0x0b32
#if PACKETVER >= 20190626
-packetLen(0x0b32, -1)
+packetLen(0x0b32, -1) // ZC_SKILLINFO_LIST
#endif
// Packet: 0x0b33
#if PACKETVER >= 20190626
-packetLen(0x0b33, 17)
+packetLen(0x0b33, 17) // ZC_SKILLINFO_UPDATE2
#endif
// Packet: 0x0b34
@@ -4654,9 +4656,46 @@ packetLen(0x0b4c, 2)
#endif
// Packet: 0x0b4d
-#if PACKETVER >= 20190724
+#if PACKETVER >= 20190814
+packetLen(0x0b4d, -1)
+#elif PACKETVER >= 20190724
packetLen(0x0b4d, 6)
#endif
+// Packet: 0x0b4e
+#if PACKETVER >= 20190814
+packetLen(0x0b4e, -1)
+#endif
+
+// Packet: 0x0b4f
+#if PACKETVER >= 20190814
+packetLen(0x0b4f, 2)
+#endif
+
+// Packet: 0x0b50
+#if PACKETVER >= 20190814
+packetLen(0x0b50, 2)
+#endif
+
+// Packet: 0x0b51
+#if PACKETVER >= 20190814
+packetLen(0x0b51, 2)
+#endif
+
+// Packet: 0x0b52
+#if PACKETVER >= 20190814
+packetLen(0x0b52, 2)
+#endif
+
+// Packet: 0x0b53
+#if PACKETVER >= 20190814
+packetLen(0x0b53, 52)
+#endif
+
+// Packet: 0x0b54
+#if PACKETVER >= 20190814
+packetLen(0x0b54, 8)
+#endif
+
#endif /* COMMON_PACKETS2019_LEN_ZERO_H */
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 2fac5b4a4..22969606d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1107,8 +1107,10 @@ ACMD(kami)
sscanf(message, "%199[^\n]", atcmd_output);
if (stristr(info->command, "l") != NULL)
clif->broadcast(&sd->bl, atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP);
+ else if (info->command[4] == 'b' || info->command[4] == 'B')
+ clif->broadcast(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, BC_BLUE, ALL_CLIENT);
else
- intif->broadcast(atcmd_output, (int)strlen(atcmd_output) + 1, (*(info->command + 4) == 'b' || *(info->command + 4) == 'B') ? BC_BLUE : BC_YELLOW);
+ clif->broadcast(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, BC_YELLOW, ALL_CLIENT);
} else {
if(!*message || (sscanf(message, "%10u %199[^\n]", &color, atcmd_output) < 2)) {
clif->message(fd, msg_fd(fd,981)); // Please enter color and message (usage: @kamic <color> <message>).
@@ -1119,7 +1121,7 @@ ACMD(kami)
clif->message(fd, msg_fd(fd,982)); // Invalid color.
return false;
}
- intif->broadcast2(atcmd_output, (int)strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0);
+ clif->broadcast2(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0, ALL_CLIENT);
}
return true;
}
@@ -5125,7 +5127,7 @@ ACMD(broadcast)
}
safesnprintf(atcmd_output, sizeof(atcmd_output), "%s: %s", sd->status.name, message);
- intif->broadcast(atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT);
+ clif->broadcast(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT, ALL_CLIENT);
return true;
}
@@ -8263,7 +8265,7 @@ ACMD(request)
}
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,278), message); // (@request): %s
- intif->wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output);
+ pc->wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output);
clif_disp_onlyself(sd, atcmd_output);
clif->message(sd->fd,msg_fd(fd,279)); // @request sent.
return true;
diff --git a/src/map/clif.c b/src/map/clif.c
index 3b7691ae4..1c245ed43 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -92,9 +92,6 @@ static struct packet_itemlist_equip itemlist_equip;
static struct ZC_STORE_ITEMLIST_NORMAL storelist_normal;
static struct ZC_STORE_ITEMLIST_EQUIP storelist_equip;
static struct packet_viewequip_ack viewequip_list;
-#if PACKETVER >= 20131223
-static struct packet_npc_market_result_ack npcmarket_result;
-#endif
// temporart buffer for send big packets
char packet_buf[0xffff];
//#define DUMP_UNKNOWN_PACKET
@@ -5254,58 +5251,79 @@ static int clif_insight(struct block_list *bl, va_list ap)
return 0;
}
+static void clif_playerSkillToPacket(struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill)
+{
+ nullpo_retv(sd);
+ nullpo_retv(skillData);
+ Assert_retv(idx >= 0 && idx < MAX_SKILL_DB);
+
+ int skill_lv = sd->status.skill[idx].lv;
+ skillData->id = skillId;
+ skillData->inf = skill->get_inf(skillId);
+ skillData->level = skill_lv;
+ if (skill_lv > 0) {
+ skillData->sp = skill->get_sp(skillId, skill_lv);
+ skillData->range2 = skill->get_range2(&sd->bl, skillId, skill_lv);
+ } else {
+ skillData->sp = 0;
+ skillData->range2 = 0;
+ }
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+ if (newSkill)
+ skillData->level2 = 0;
+ else
+ skillData->level2 = skill_lv;
+#else
+ safestrncpy(skillData->name, skill->get_name(skillId), NAME_LENGTH);
+#endif
+ if (sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT)
+ skillData->upFlag = (skill_lv < skill->tree_get_max(skillId, sd->status.class)) ? 1 : 0;
+ else
+ skillData->upFlag = 0;
+}
+
/// Updates whole skill tree (ZC_SKILLINFO_LIST).
/// 010f <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B }*
static void clif_skillinfoblock(struct map_session_data *sd)
{
- int fd;
- int i,len,id;
-
nullpo_retv(sd);
- fd=sd->fd;
- if (!fd) return;
+ int fd = sd->fd;
+ if (!fd)
+ return;
+
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_SKILLINFO_LIST) + MAX_SKILL_DB * sizeof(struct SKILLDATA));
+ struct PACKET_ZC_SKILLINFO_LIST *p = WFIFOP(fd, 0);
- WFIFOHEAD(fd, MAX_SKILL_DB * 37 + 4);
- WFIFOW(fd,0) = 0x10f;
- for ( i = 0, len = 4; i < MAX_SKILL_DB; i++) {
- if( (id = sd->status.skill[i].id) != 0 ) {
- int level;
+ p->packetType = HEADER_ZC_SKILLINFO_LIST;
+ int skillIndex = 0;
+ int len = sizeof(struct PACKET_ZC_SKILLINFO_LIST);
+ int i;
+ for (i = 0; i < MAX_SKILL_DB; i++) {
+ int id = sd->status.skill[i].id;
+ if (id != 0) {
// workaround for bugreport:5348
- if (len + 37 > 8192)
+ if (len + sizeof(struct SKILLDATA) > 8192)
break;
- WFIFOW(fd, len) = id;
- WFIFOL(fd, len + 2) = skill->get_inf(id);
- level = sd->status.skill[i].lv;
- WFIFOW(fd, len + 6) = level;
- if (level) {
- WFIFOW(fd, len + 8) = skill->get_sp(id, level);
- WFIFOW(fd, len + 10)= skill->get_range2(&sd->bl, id, level);
- }
- else {
- WFIFOW(fd, len + 8) = 0;
- WFIFOW(fd, len + 10)= 0;
- }
- safestrncpy(WFIFOP(fd,len+12), skill->get_name(id), NAME_LENGTH);
- if(sd->status.skill[i].flag == SKILL_FLAG_PERMANENT)
- WFIFOB(fd,len+36) = (sd->status.skill[i].lv < skill->tree_get_max(id, sd->status.class))? 1:0;
- else
- WFIFOB(fd,len+36) = 0;
- len += 37;
+ clif->playerSkillToPacket(sd, &p->skills[skillIndex], id, i, false);
+ len += sizeof(struct SKILLDATA);
+ skillIndex++;
}
}
- WFIFOW(fd,2)=len;
- WFIFOSET(fd,len);
+ p->packetLength = len;
+ WFIFOSET(fd, len);
// workaround for bugreport:5348; send the remaining skills one by one to bypass packet size limit
- for ( ; i < MAX_SKILL_DB; i++) {
- if( (id = sd->status.skill[i].id) != 0 ) {
+ for (; i < MAX_SKILL_DB; i++) {
+ int id = sd->status.skill[i].id;
+ if (id != 0) {
clif->addskill(sd, id);
clif->skillinfo(sd, id, 0);
}
}
}
+
/**
* Server tells client 'sd' to add skill of id 'id' to it's skill tree (e.g. with Ice Falcion item)
**/
@@ -5314,36 +5332,21 @@ static void clif_skillinfoblock(struct map_session_data *sd)
/// 0111 <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B
static void clif_addskill(struct map_session_data *sd, int id)
{
- int fd, skill_lv, idx = skill->get_index(id);
-
nullpo_retv(sd);
- fd = sd->fd;
- if (!fd) return;
+ int fd = sd->fd;
+ if (!fd)
+ return;
+ int idx = skill->get_index(id);
if (sd->status.skill[idx].id <= 0)
return;
- skill_lv = sd->status.skill[idx].lv;
-
- WFIFOHEAD(fd, packet_len(0x111));
- WFIFOW(fd,0) = 0x111;
- WFIFOW(fd,2) = id;
- WFIFOL(fd,4) = skill->get_inf(id);
- WFIFOW(fd,8) = skill_lv;
- if (skill_lv > 0) {
- WFIFOW(fd,10) = skill->get_sp(id, skill_lv);
- WFIFOW(fd,12) = skill->get_range2(&sd->bl, id, skill_lv);
- } else {
- WFIFOW(fd,10) = 0;
- WFIFOW(fd,12) = 0;
- }
- safestrncpy(WFIFOP(fd,14), skill->get_name(id), NAME_LENGTH);
- if (sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT)
- WFIFOB(fd,38) = (skill_lv < skill->tree_get_max(id, sd->status.class))? 1:0;
- else
- WFIFOB(fd,38) = 0;
- WFIFOSET(fd,packet_len(0x111));
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_ADD_SKILL));
+ struct PACKET_ZC_ADD_SKILL *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_ADD_SKILL;
+ clif->playerSkillToPacket(sd, &p->skill, id, idx, true);
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_ADD_SKILL));
}
/// Deletes a skill from the skill tree (ZC_SKILLINFO_DELETE).
@@ -5396,32 +5399,34 @@ static void clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill
/// 07e1 <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <upgradable>.B
static void clif_skillinfo(struct map_session_data *sd, int skill_id, int inf)
{
+ nullpo_retv(sd);
+
const int fd = sd->fd;
int idx = skill->get_index(skill_id);
- int skill_lv;
-
- nullpo_retv(sd);
Assert_retv(idx >= 0 && idx < MAX_SKILL_DB);
- skill_lv = sd->status.skill[idx].lv;
-
- WFIFOHEAD(fd,packet_len(0x7e1));
- WFIFOW(fd,0) = 0x7e1;
- WFIFOW(fd,2) = skill_id;
- WFIFOL(fd,4) = inf?inf:skill->get_inf(skill_id);
- WFIFOW(fd,8) = skill_lv;
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_SKILLINFO_UPDATE2));
+ struct PACKET_ZC_SKILLINFO_UPDATE2 *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_SKILLINFO_UPDATE2;
+ int skill_lv = sd->status.skill[idx].lv;
+ p->id = skill_id;
+ p->inf = skill->get_inf(skill_id);
+ p->level = skill_lv;
if (skill_lv > 0) {
- WFIFOW(fd,10) = skill->get_sp(skill_id, skill_lv);
- WFIFOW(fd,12) = skill->get_range2(&sd->bl, skill_id, skill_lv);
+ p->sp = skill->get_sp(skill_id, skill_lv);
+ p->range2 = skill->get_range2(&sd->bl, skill_id, skill_lv);
} else {
- WFIFOW(fd,10) = 0;
- WFIFOW(fd,12) = 0;
+ p->sp = 0;
+ p->range2 = 0;
}
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+ p->level2 = skill_lv;
+#endif
if (sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT)
- WFIFOB(fd,14) = (skill_lv < skill->tree_get_max(skill_id, sd->status.class))? 1:0;
+ p->upFlag = (skill_lv < skill->tree_get_max(skill_id, sd->status.class)) ? 1 : 0;
else
- WFIFOB(fd,14) = 0;
- WFIFOSET(fd,packet_len(0x7e1));
+ p->upFlag = 0;
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_SKILLINFO_UPDATE2));
}
/// Notifies clients in area, that an object is about to use a skill.
@@ -5993,7 +5998,7 @@ static void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 s
len = sizeof(struct PACKET_ZC_MAKINGITEM_LIST) + MAX_SKILL_PRODUCE_DB * sizeof(struct PACKET_ZC_MAKINGITEM_LIST_sub);
WFIFOHEAD(fd, len);
p = WFIFOP(fd, 0);
- p->packetType = 0x25a;
+ p->packetType = HEADER_ZC_MAKINGITEM_LIST;
p->makeItem = list_type; // list type
c = 0;
@@ -10980,9 +10985,13 @@ static void clif_parse_progressbar(int fd, struct map_session_data *sd) __attrib
/// 02f1
static void clif_parse_progressbar(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int npc_id = sd->progressbar.npc_id;
+ Assert_retv(npc_id != 0);
- if( timer->gettick() < sd->progressbar.timeout && sd->st )
+ if (timer->gettick() < sd->progressbar.timeout && sd->st)
sd->st->state = END;
sd->progressbar.timeout = sd->state.workinprogress = sd->progressbar.npc_id = 0;
@@ -11007,7 +11016,7 @@ static void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
; //You CAN walk on this OPT1 value.
/*else if( sd->progressbar.npc_id )
clif->progressbar_abort(sd);*/
- else if (pc_cant_act(sd))
+ else if (pc_cant_act(sd) || pc_isvending(sd))
return;
if(sd->sc.data[SC_RUN] || sd->sc.data[SC_WUGDASH])
@@ -11087,13 +11096,13 @@ static void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd)
sc = status->get_sc(bl);
if (sc && sc->option&OPTION_INVISIBLE && !clif->isdisguised(bl) &&
bl->type != BL_NPC && //Skip hidden NPCs which can be seen using Maya Purple
- pc_get_group_level(sd) < battle_config.hack_info_GM_level
+ !pc_has_permission(sd, PC_PERM_RECEIVE_HACK_INFO)
) {
char gm_msg[256];
sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target (id: %d).\n", sd->status.name, sd->status.account_id, id);
ShowWarning(gm_msg);
// information is sent to all online GMs
- intif->wis_message_to_gm(map->wisp_server_name, battle_config.hack_info_GM_level, gm_msg);
+ pc->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, gm_msg);
return;
}
#endif // 0
@@ -11167,7 +11176,10 @@ static void clif_parse_GlobalMessage(int fd, struct map_session_data *sd)
timer->settick(sd->fontcolor_tid, td->tick+5000);
}
- color = channel->config->colors[sd->fontcolor - 1];
+ int fontColor = sd->fontcolor - 1;
+ if (fontColor < 0 || fontColor >= channel->config->colors_count)
+ fontColor = 0;
+ color = channel->config->colors[fontColor];
WFIFOHEAD(fd, outlen + 12);
WFIFOW(fd,0) = 0x2C1;
WFIFOW(fd,2) = outlen + 12;
@@ -11372,10 +11384,10 @@ static void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action
return;
}
- if( pc_cant_act(sd) || pc_issit(sd) || sd->sc.option&OPTION_HIDE )
+ if (pc_cant_act(sd) || pc_issit(sd) || sd->sc.option&OPTION_HIDE || pc_isvending(sd))
return;
- if( sd->sc.option&OPTION_COSTUME )
+ if (sd->sc.option & OPTION_COSTUME)
return;
if (!battle_config.sdelay_attack_enable && pc->checkskill(sd, SA_FREECAST) <= 0 && (skill->get_inf2(sd->ud.skill_id) & (INF2_FREE_CAST_REDUCED | INF2_FREE_CAST_NORMAL)) == 0) {
@@ -11553,8 +11565,8 @@ static void clif_parse_WisMessage(int fd, struct map_session_data *sd)
script->set_var(sd,output,(char *) split_data[i]);
}
- sprintf(output, "%s::OnWhisperGlobal", nd->exname);
- npc->event(sd,output,0); // Calls the NPC label
+ safesnprintf(output, 255, "%s::OnWhisperGlobal", nd->exname);
+ npc->event(sd,output, 0); // Calls the NPC label
return;
}
@@ -11581,12 +11593,8 @@ static void clif_parse_WisMessage(int fd, struct map_session_data *sd)
dstsd = map->nick2sd(target);
if (dstsd == NULL || strcmp(dstsd->status.name, target) != 0) {
- // player is not on this map-server
- // At this point, don't send wisp/page if it's not exactly the same name, because (example)
- // if there are 'Test' player on an other map-server and 'test' player on this map-server,
- // and if we ask for 'Test', we must not contact 'test' player
- // so, we send information to inter-server, which is the only one which decide (and copy correct name).
- intif->wis_message(sd, target, message, (int)strlen(message));
+ // Character not found (or found through partial match).
+ clif->wis_end(sd->fd, 1);
return;
}
@@ -11633,7 +11641,7 @@ static void clif_parse_Broadcast(int fd, struct map_session_data *sd)
char command[sizeof commandname + 2 + CHAT_SIZE_MAX] = ""; // '@' command + ' ' + message + NUL
int len = (int)RFIFOW(fd,2) - 4;
- if (len < 0)
+ if (len <= 0)
return;
sprintf(command, "%c%s ", atcommand->at_symbol, commandname);
@@ -11733,6 +11741,9 @@ static void clif_parse_UseItem(int fd, struct map_session_data *sd)
{
int n;
+ if (pc_isvending(sd))
+ return;
+
if (pc_isdead(sd)) {
clif->clearunit_area(&sd->bl, CLR_DEAD);
return;
@@ -11758,15 +11769,17 @@ static void clif_parse_EquipItem(int fd, struct map_session_data *sd) __attribut
static void clif_parse_EquipItem(int fd, struct map_session_data *sd)
{
const struct packet_equip_item *p = RP2PTR(fd);
- int index = 0;
- if(pc_isdead(sd)) {
+ if (pc_isvending(sd))
+ return;
+
+ if (pc_isdead(sd)) {
clif->clearunit_area(&sd->bl,CLR_DEAD);
return;
}
- index = p->index - 2;
- if (index >= sd->status.inventorySize)
+ int index = p->index - 2;
+ if (index < 0 || index >= sd->status.inventorySize)
return; //Out of bounds check.
if( sd->npc_id ) {
@@ -11777,15 +11790,15 @@ static void clif_parse_EquipItem(int fd, struct map_session_data *sd)
else if ( pc_cant_act2(sd) || sd->state.prerefining )
return;
- if(!sd->status.inventory[index].identify) {
- clif->equipitemack(sd, index, 0, EIA_FAIL);// fail
+ if (!sd->status.inventory[index].identify) {
+ clif->equipitemack(sd, index, 0, EIA_FAIL); // fail
return;
}
- if(!sd->inventory_data[index])
+ if (!sd->inventory_data[index])
return;
- if(sd->inventory_data[index]->type == IT_PETARMOR){
+ if (sd->inventory_data[index]->type == IT_PETARMOR) {
pet->equipitem(sd, index);
return;
}
@@ -11793,7 +11806,7 @@ static void clif_parse_EquipItem(int fd, struct map_session_data *sd)
pc->update_idle_time(sd, BCIDLE_USEITEM);
//Client doesn't send the position for ammo.
- if(sd->inventory_data[index]->type == IT_AMMO)
+ if (sd->inventory_data[index]->type == IT_AMMO)
pc->equipitem(sd, index, EQP_AMMO);
else
pc->equipitem(sd, index, p->wearLocation);
@@ -11806,6 +11819,9 @@ static void clif_parse_UnequipItem(int fd, struct map_session_data *sd)
{
int index;
+ if (pc_isvending(sd))
+ return;
+
if(pc_isdead(sd)) {
clif->clearunit_area(&sd->bl,CLR_DEAD);
return;
@@ -11878,7 +11894,7 @@ static void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd) _
/// 1 = sell
static void clif_parse_NpcBuySellSelected(int fd, struct map_session_data *sd)
{
- if (sd->state.trading)
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
return;
npc->buysellsel(sd, RFIFOL(fd,2), RFIFOB(fd,6));
}
@@ -11914,9 +11930,12 @@ static void clif_parse_NpcBuyListSend(int fd, struct map_session_data *sd) __att
/// 00c8 <packet len>.W { <amount>.W <name id>.W }*
static void clif_parse_NpcBuyListSend(int fd, struct map_session_data *sd)
{
- int n = ((int)RFIFOW(fd, 2) - sizeof(struct PACKET_CZ_PC_PURCHASE_ITEMLIST)) / sizeof(struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub);
- int result;
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_PC_PURCHASE_ITEMLIST *p = RFIFOP(fd, 0);
+ int n = ((int)p->packetLength - sizeof(struct PACKET_CZ_PC_PURCHASE_ITEMLIST)) / sizeof(struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub);
+ int result;
Assert_retv(n >= 0);
@@ -11974,7 +11993,7 @@ static void clif_parse_NpcSellListSend(int fd, struct map_session_data *sd)
Assert_retv(n >= 0);
- if (sd->state.trading || !sd->npc_shopid) {
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd) || !sd->npc_shopid) {
fail = 1;
} else {
struct itemlist item_list = { 0 };
@@ -12009,6 +12028,9 @@ static void clif_parse_CreateChatRoom(int fd, struct map_session_data *sd) __att
/// 1 = public
static void clif_parse_CreateChatRoom(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
@@ -12025,6 +12047,9 @@ static void clif_parse_CreateChatRoom(int fd, struct map_session_data *sd)
password = RFIFOP(fd, 7); //not zero-terminated
title = RFIFOP(fd, 15); // not zero-terminated
+ if (limit < 0)
+ return;
+
if (pc_ismuted(&sd->sc, MANNER_NOROOM))
return;
if(battle_config.basic_skill_check && !pc->check_basicskill(sd, 4)) {
@@ -12051,6 +12076,9 @@ static void clif_parse_ChatAddMember(int fd, struct map_session_data *sd) __attr
/// 00d9 <chat ID>.L <passwd>.8B
static void clif_parse_ChatAddMember(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int chatid = RFIFOL(fd,2);
const char *password = RFIFOP(fd,6); // not zero-terminated
@@ -12065,6 +12093,9 @@ static void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data *sd)
/// 1 = public
static void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
@@ -12077,6 +12108,8 @@ static void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data *sd)
return;
limit = RFIFOW(fd, 4);
+ if (limit < 0)
+ return;
pub = (RFIFOB(fd, 6) != 0);
password = RFIFOP(fd, 7); // not zero-terminated
title = RFIFOP(fd, 15); // not zero-terminated
@@ -12095,6 +12128,9 @@ static void clif_parse_ChangeChatOwner(int fd, struct map_session_data *sd) __at
/// 1 = normal
static void clif_parse_ChangeChatOwner(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
chat->change_owner(sd, RFIFOP(fd,6)); // non null terminated
}
@@ -12103,6 +12139,9 @@ static void clif_parse_KickFromChat(int fd, struct map_session_data *sd) __attri
/// 00e2 <name>.24B
static void clif_parse_KickFromChat(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
chat->kick(sd, RFIFOP(fd,2)); // non null terminated
}
@@ -12111,6 +12150,9 @@ static void clif_parse_ChatLeave(int fd, struct map_session_data *sd) __attribut
/// 00e3
static void clif_parse_ChatLeave(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
chat->leave(sd, false);
}
@@ -12135,9 +12177,10 @@ static void clif_parse_TradeRequest(int fd, struct map_session_data *sd) __attri
/// 00e4 <account id>.L
static void clif_parse_TradeRequest(int fd, struct map_session_data *sd)
{
- struct map_session_data *t_sd;
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
- t_sd = map->id2sd(RFIFOL(fd,2));
+ struct map_session_data *t_sd = map->id2sd(RFIFOL(fd, 2));
if (sd->chat_id == 0 && pc_cant_act(sd))
return; //You can trade while in a chatroom.
@@ -12164,6 +12207,9 @@ static void clif_parse_TradeAck(int fd, struct map_session_data *sd) __attribute
/// 4 = rejected
static void clif_parse_TradeAck(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
trade->ack(sd,RFIFOB(fd,2));
}
@@ -12172,6 +12218,9 @@ static void clif_parse_TradeAddItem(int fd, struct map_session_data *sd) __attri
/// 00e8 <index>.W <amount>.L
static void clif_parse_TradeAddItem(int fd, struct map_session_data *sd)
{
+ if (!sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
short index = RFIFOW(fd,2);
int amount = RFIFOL(fd,4);
@@ -12186,6 +12235,8 @@ static void clif_parse_TradeOk(int fd, struct map_session_data *sd) __attribute_
/// 00eb
static void clif_parse_TradeOk(int fd, struct map_session_data *sd)
{
+ if (pc_isdead(sd) || pc_isvending(sd))
+ return;
trade->ok(sd);
}
@@ -12194,6 +12245,9 @@ static void clif_parse_TradeCancel(int fd, struct map_session_data *sd) __attrib
/// 00ed
static void clif_parse_TradeCancel(int fd, struct map_session_data *sd)
{
+ if (pc_isdead(sd) || pc_isvending(sd))
+ return;
+
trade->cancel(sd);
}
@@ -12202,6 +12256,9 @@ static void clif_parse_TradeCommit(int fd, struct map_session_data *sd) __attrib
/// 00ef
static void clif_parse_TradeCommit(int fd, struct map_session_data *sd)
{
+ if (pc_isdead(sd) || pc_isvending(sd))
+ return;
+
trade->commit(sd);
}
@@ -12764,7 +12821,7 @@ static void clif_parse_ProduceMix(int fd, struct map_session_data *sd)
default:
return;
}
- if (pc_istrading(sd)) {
+ if (pc_istrading(sd) || pc_isdead(sd) || pc_isvending(sd)) {
//Make it fail to avoid shop exploits where you sell something different than you see.
clif->skill_fail(sd, sd->ud.skill_id, USESKILL_FAIL_LEVEL, 0, 0);
clif_menuskill_clear(sd);
@@ -12795,7 +12852,7 @@ static void clif_parse_Cooking(int fd, struct map_session_data *sd)
if (type == 6 && sd->menuskill_id != GN_MIX_COOKING && sd->menuskill_id != GN_S_PHARMACY)
return;
- if (pc_istrading(sd)) {
+ if (pc_istrading(sd) || pc_isdead(sd) || pc_isvending(sd)) {
//Make it fail to avoid shop exploits where you sell something different than you see.
clif->skill_fail(sd, sd->ud.skill_id, USESKILL_FAIL_LEVEL, 0, 0);
clif_menuskill_clear(sd);
@@ -12815,7 +12872,7 @@ static void clif_parse_RepairItem(int fd, struct map_session_data *sd)
if (sd->menuskill_id != BS_REPAIRWEAPON)
return;
- if (pc_istrading(sd)) {
+ if (pc_istrading(sd) || pc_isdead(sd) || pc_isvending(sd)) {
//Make it fail to avoid shop exploits where you sell something different than you see.
clif->skill_fail(sd, sd->ud.skill_id, USESKILL_FAIL_LEVEL, 0, 0);
clif_menuskill_clear(sd);
@@ -12830,19 +12887,17 @@ static void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) __attri
/// 0222 <index>.L
static void clif_parse_WeaponRefine(int fd, struct map_session_data *sd)
{
- int idx;
-
sd->state.prerefining = 0;
if (sd->menuskill_id != WS_WEAPONREFINE) //Packet exploit?
return;
- if (pc_istrading(sd)) {
+ if (pc_istrading(sd) || pc_isdead(sd) || pc_isvending(sd)) {
//Make it fail to avoid shop exploits where you sell something different than you see.
clif->skill_fail(sd, sd->ud.skill_id, USESKILL_FAIL_LEVEL, 0, 0);
clif_menuskill_clear(sd);
return;
}
- idx = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
+ int idx = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
skill->weaponrefine(sd, idx-2);
clif_menuskill_clear(sd);
}
@@ -12857,6 +12912,9 @@ static void clif_parse_NpcSelectMenu(int fd, struct map_session_data *sd) __attr
/// overflows to choice%256.
static void clif_parse_NpcSelectMenu(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int npc_id = RFIFOL(fd,2);
uint8 select = RFIFOB(fd,6);
@@ -12882,6 +12940,9 @@ static void clif_parse_NpcNextClicked(int fd, struct map_session_data *sd) __att
/// 00b9 <npc id>.L
static void clif_parse_NpcNextClicked(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
npc->scriptcont(sd,RFIFOL(fd,2), false);
}
@@ -12890,6 +12951,9 @@ static void clif_parse_NpcAmountInput(int fd, struct map_session_data *sd) __att
/// 0143 <npc id>.L <value>.L
static void clif_parse_NpcAmountInput(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int npcid = RFIFOL(fd,2);
int amount = RFIFOL(fd,6);
@@ -12914,6 +12978,9 @@ static void clif_parse_NpcStringInput(int fd, struct map_session_data *sd) __att
/// 01d5 <packet len>.W <npc id>.L <string>.?B
static void clif_parse_NpcStringInput(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int len = RFIFOW(fd, 2);
// [4144] can't confirm exact client version. At least >= correct for 20150513
#if PACKETVER >= 20151029
@@ -12941,6 +13008,8 @@ static void clif_parse_NpcCloseClicked(int fd, struct map_session_data *sd)
{
if (!sd->npc_id) //Avoid parsing anything when the script was done with. [Skotlex]
return;
+ if (sd->state.trading || pc_isvending(sd))
+ return;
sd->state.dialog = 0;
npc->scriptcont(sd, RFIFOL(fd,2), true);
}
@@ -12952,6 +13021,9 @@ static void clif_parse_ItemIdentify(int fd, struct map_session_data *sd) __attri
/// -1 = cancel
static void clif_parse_ItemIdentify(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
short idx = RFIFOW(fd,2);
if (sd->menuskill_id != MC_IDENTIFY)
@@ -12970,6 +13042,9 @@ static void clif_parse_ItemIdentify(int fd, struct map_session_data *sd)
/// 0A35 <index>.W
static void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int cmd = RFIFOW(fd,0);
short idx = RFIFOW(fd, packet_db[cmd].pos[0]) - 2;
int n;
@@ -12977,7 +13052,7 @@ static void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd
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 &&
+ if ((n = pc->have_magnifier(sd)) != INDEX_NOT_FOUND &&
pc->delitem(sd, n, 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME) == 0)
skill->identify(sd, idx);
}
@@ -12988,7 +13063,7 @@ static void clif_parse_SelectArrow(int fd, struct map_session_data *sd) __attrib
static void clif_parse_SelectArrow(int fd, struct map_session_data *sd)
{
int itemId;
- if (pc_istrading(sd)) {
+ if (pc_istrading(sd) || pc_isdead(sd) || pc_isvending(sd)) {
//Make it fail to avoid shop exploits where you sell something different than you see.
clif->skill_fail(sd, sd->ud.skill_id, USESKILL_FAIL_LEVEL, 0, 0);
clif_menuskill_clear(sd);
@@ -13025,6 +13100,9 @@ static void clif_parse_AutoSpell(int fd, struct map_session_data *sd) __attribut
/// 01ce <skill id>.L
static void clif_parse_AutoSpell(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
uint16 skill_id = RFIFOL(fd,2);
sd->state.workinprogress = 0;
@@ -13044,6 +13122,9 @@ static void clif_parse_UseCard(int fd, struct map_session_data *sd) __attribute_
/// 017a <card index>.W
static void clif_parse_UseCard(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
clif->use_card(sd,RFIFOW(fd,2)-2);
}
@@ -13052,6 +13133,9 @@ static void clif_parse_InsertCard(int fd, struct map_session_data *sd) __attribu
/// 017c <card index>.W <equip index>.W
static void clif_parse_InsertCard(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
pc->insert_card(sd,RFIFOW(fd,2)-2,RFIFOW(fd,4)-2);
}
@@ -13077,6 +13161,9 @@ static void clif_parse_ResetChar(int fd, struct map_session_data *sd) __attribut
/// 1 = skill
static void clif_parse_ResetChar(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
char cmd[15];
if( RFIFOW(fd,2) )
@@ -13262,6 +13349,9 @@ static void clif_parse_CreateParty(int fd, struct map_session_data *sd) __attrib
/// 01e8 <party name>.24B <item pickup rule>.B <item share rule>.B (CZ_MAKE_GROUP2)
static void clif_parse_CreateParty(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
char name[NAME_LENGTH];
safestrncpy(name, RFIFOP(fd,2), NAME_LENGTH);
@@ -13282,6 +13372,9 @@ static void clif_parse_CreateParty(int fd, struct map_session_data *sd)
static void clif_parse_CreateParty2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
char name[NAME_LENGTH];
int item1 = RFIFOB(fd,26);
int item2 = RFIFOB(fd,27);
@@ -13307,6 +13400,9 @@ static void clif_parse_PartyInvite(int fd, struct map_session_data *sd) __attrib
/// 02c4 <char name>.24B (CZ_PARTY_JOIN_REQ)
static void clif_parse_PartyInvite(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *t_sd;
if(map->list[sd->bl.m].flag.partylock) {
@@ -13328,6 +13424,9 @@ static void clif_parse_PartyInvite(int fd, struct map_session_data *sd)
static void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *t_sd;
char name[NAME_LENGTH];
@@ -13358,13 +13457,23 @@ static void clif_parse_ReplyPartyInvite(int fd, struct map_session_data *sd) __a
/// 1 = accept
static void clif_parse_ReplyPartyInvite(int fd, struct map_session_data *sd)
{
- party->reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
+ if (pc_istrading(sd) || pc_isvending(sd)) {
+ party->reply_invite(sd, RFIFOL(fd, 2), 0);
+ return;
+ }
+
+ party->reply_invite(sd, RFIFOL(fd, 2), RFIFOL(fd, 6));
}
static void clif_parse_ReplyPartyInvite2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_ReplyPartyInvite2(int fd, struct map_session_data *sd)
{
- party->reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6));
+ if (pc_istrading(sd) || pc_isvending(sd)) {
+ party->reply_invite(sd, RFIFOL(fd, 2), 0);
+ return;
+ }
+
+ party->reply_invite(sd, RFIFOL(fd, 2), RFIFOB(fd, 6));
}
static void clif_parse_LeaveParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -13372,7 +13481,10 @@ static void clif_parse_LeaveParty(int fd, struct map_session_data *sd) __attribu
/// 0100
static void clif_parse_LeaveParty(int fd, struct map_session_data *sd)
{
- if(map->list[sd->bl.m].flag.partylock) {
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
+ if (map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
@@ -13385,12 +13497,15 @@ static void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) __
/// 0103 <account id>.L <char name>.24B
static void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd)
{
- if(map->list[sd->bl.m].flag.partylock) {
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
+ if (map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map.
return;
}
- party->removemember(sd, RFIFOL(fd,2), RFIFOP(fd,6));
+ party->removemember(sd, RFIFOL(fd, 2), RFIFOP(fd, 6));
}
static void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -13399,6 +13514,9 @@ static void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) __
/// 07d7 <exp share rule>.L <item pickup rule>.B <item share rule>.B (CZ_GROUPINFO_CHANGE_V2)
static void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
struct party_data *p;
int i;
@@ -13451,6 +13569,9 @@ static void clif_parse_PartyChangeLeader(int fd, struct map_session_data *sd) __
/// 07da <account id>.L
static void clif_parse_PartyChangeLeader(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
party->changeleader(sd, map->id2sd(RFIFOL(fd,2)));
}
@@ -13463,6 +13584,9 @@ static void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data *
static void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
short level = RFIFOW(fd,2);
short mapid = RFIFOW(fd,4);
short job[PARTY_BOOKING_JOBS];
@@ -13505,6 +13629,9 @@ static void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data *sd
static void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
short level = RFIFOW(fd,2);
short mapid = RFIFOW(fd,4);
short job = RFIFOW(fd,6);
@@ -13556,7 +13683,10 @@ static void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data *sd
static void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
- if(party->booking_delete(sd))
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
+ if (party->booking_delete(sd))
clif->PartyBookingDeleteAck(sd, 0);
#else
return;
@@ -13592,11 +13722,13 @@ static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd
static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd)
{
#ifndef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
short job[PARTY_BOOKING_JOBS];
- int i;
- for(i=0; i<PARTY_BOOKING_JOBS; i++)
- job[i] = RFIFOW(fd,2+i*2);
+ for (int i = 0; i < PARTY_BOOKING_JOBS; i++)
+ job[i] = RFIFOW(fd, 2 + i * 2);
party->booking_update(sd, job);
#else
@@ -13609,8 +13741,11 @@ static void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd
static void clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad)
{
#ifndef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
int i;
- uint8 buf[38+PARTY_BOOKING_JOBS*2];
+ uint8 buf[38 + PARTY_BOOKING_JOBS * 2];
nullpo_retv(sd);
if(pb_ad == NULL) return;
@@ -13677,7 +13812,10 @@ static void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data *
static void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- short level = RFIFOW(fd,2);
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
+ short level = RFIFOW(fd, 2);
const char *notice = RFIFOP(fd, 4);
party->recruit_register(sd, level, notice);
@@ -13748,6 +13886,9 @@ static void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data *sd
static void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
short level = RFIFOW(fd, 2);
short mapid = RFIFOW(fd, 4);
unsigned long lastindex = RFIFOL(fd, 6);
@@ -13765,7 +13906,10 @@ static void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data *sd
static void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- if(party->booking_delete(sd))
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
+ if (party->booking_delete(sd))
clif->PartyRecruitDeleteAck(sd, 0);
#else
return;
@@ -13801,6 +13945,9 @@ static void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd
static void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
const char *notice = RFIFOP(fd, 2);
party->recruit_update(sd, notice);
@@ -13874,6 +14021,9 @@ static void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_d
static void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
int index = RFIFOL(fd, 2);
clif->PartyBookingAddFilteringList(index, sd);
@@ -13888,6 +14038,9 @@ static void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_d
static void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
int gid = RFIFOL(fd, 2);
clif->PartyBookingSubFilteringList(gid, sd);
@@ -13902,6 +14055,9 @@ static void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data
static void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
int index = RFIFOL(fd, 2);
clif->PartyBookingVolunteerInfo(index, sd);
@@ -13978,6 +14134,9 @@ static void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_da
static void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
unsigned int aid = RFIFOL(fd, 2);
clif->PartyBookingRefuseVolunteer(aid, sd);
@@ -14007,6 +14166,9 @@ static void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_da
static void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
int index = RFIFOL(fd, 2);
clif->PartyBookingCancelVolunteer(index, sd);
@@ -14082,6 +14244,9 @@ static void clif_parse_CloseVending(int fd, struct map_session_data *sd) __attri
/// 012e
static void clif_parse_CloseVending(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isdead(sd))
+ return;
+
vending->close(sd);
}
@@ -14090,6 +14255,9 @@ static void clif_parse_VendingListReq(int fd, struct map_session_data *sd) __att
/// 0130 <account id>.L
static void clif_parse_VendingListReq(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isdead(sd))
+ return;
+
if( sd->npc_id ) {// using an NPC
return;
}
@@ -14101,6 +14269,9 @@ static void clif_parse_PurchaseReq(int fd, struct map_session_data *sd) __attrib
/// 0134 <packet len>.W <account id>.L { <amount>.W <index>.W }*
static void clif_parse_PurchaseReq(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int len = (int)RFIFOW(fd, 2) - 8;
int id;
const uint8 *data;
@@ -14122,6 +14293,9 @@ static void clif_parse_PurchaseReq2(int fd, struct map_session_data *sd) __attri
/// 0801 <packet len>.W <account id>.L <unique id>.L { <amount>.W <index>.W }*
static void clif_parse_PurchaseReq2(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int len = (int)RFIFOW(fd, 2) - 12;
int aid;
int uid;
@@ -14148,25 +14322,25 @@ static void clif_parse_OpenVending(int fd, struct map_session_data *sd) __attrib
/// 1 = open
static void clif_parse_OpenVending(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isdead(sd) || sd->state.vending || sd->state.buyingstore)
+ return;
+
int len = (int)RFIFOW(fd, 2) - 85;
- const char *message;
- bool flag;
- const uint8 *data;
if (len < 0)
return;
- message = RFIFOP(fd,4);
- flag = (RFIFOB(fd,84) != 0) ? true : false;
- data = RFIFOP(fd,85);
+ const char *message = RFIFOP(fd, 4);
+ bool flag = (RFIFOB(fd, 84) != 0) ? true : false;
+ const uint8 *data = RFIFOP(fd, 85);
- if( !flag )
+ if (!flag)
sd->state.prevend = sd->state.workinprogress = 0;
- if(pc_ismuted(&sd->sc, MANNER_NOROOM))
+ if (pc_ismuted(&sd->sc, MANNER_NOROOM))
return;
- if( map->list[sd->bl.m].flag.novending ) {
- clif->message (sd->fd, msg_sd(sd,276)); // "You can't open a shop on this map"
+ if (map->list[sd->bl.m].flag.novending) {
+ clif->message (sd->fd, msg_sd(sd, 276)); // "You can't open a shop on this map"
return;
}
if (map->getcell(sd->bl.m, &sd->bl, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING)) {
@@ -14185,11 +14359,14 @@ static void clif_parse_CreateGuild(int fd, struct map_session_data *sd) __attrib
/// 0165 <char id>.L <guild name>.24B
static void clif_parse_CreateGuild(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
char name[NAME_LENGTH];
safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);
- if(map->list[sd->bl.m].flag.guildlock) {
- clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
+ if (map->list[sd->bl.m].flag.guildlock) {
+ clif->message(fd, msg_fd(fd, 228)); // Guild modification is disabled in this map.
return;
}
@@ -14250,6 +14427,9 @@ static void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *
/// 0161 <packet len>.W { <position id>.L <mode>.L <ranking>.L <pay rate>.L <name>.24B }*
static void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int i;
int count = (RFIFOW(fd, 2) - 4) / 40;
@@ -14267,6 +14447,9 @@ static void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data
/// 0155 <packet len>.W { <account id>.L <char id>.L <position id>.L }*
static void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int i;
int len = RFIFOW(fd, 2);
int count = (len - 4) / 12;
@@ -14432,10 +14615,13 @@ static void clif_parse_GuildChangeEmblem(int fd, struct map_session_data *sd) __
/// 0153 <packet len>.W <emblem data>.?B
static void clif_parse_GuildChangeEmblem(int fd, struct map_session_data *sd)
{
- unsigned int emblem_len = RFIFOW(fd,2)-4;
- const uint8* emblem = RFIFOP(fd,4);
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ unsigned int emblem_len = RFIFOW(fd, 2) - 4;
+ const uint8* emblem = RFIFOP(fd, 4);
- if( !emblem_len || !sd->state.gmaster_flag )
+ if (!emblem_len || !sd->state.gmaster_flag)
return;
if (!clif->validate_emblem(emblem, emblem_len)) {
@@ -14452,7 +14638,10 @@ static void clif_parse_GuildChangeNotice(int fd, struct map_session_data *sd) __
/// 016e <guild id>.L <msg1>.60B <msg2>.120B
static void clif_parse_GuildChangeNotice(int fd, struct map_session_data *sd)
{
- int guild_id = RFIFOL(fd,2);
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ int guild_id = RFIFOL(fd, 2);
char *msg1 = NULL, *msg2 = NULL;
if (!sd->state.gmaster_flag)
@@ -14504,6 +14693,9 @@ static void clif_parse_GuildInvite(int fd, struct map_session_data *sd) __attrib
/// 0168 <account id>.L <inviter account id>.L <inviter char id>.L
static void clif_parse_GuildInvite(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *t_sd = map->id2sd(RFIFOL(fd,2));
if (!clif_sub_guild_invite(fd, sd, t_sd))
@@ -14532,7 +14724,7 @@ static void clif_parse_GuildReplyInvite(int fd, struct map_session_data *sd) __a
/// 1 = accept
static void clif_parse_GuildReplyInvite(int fd, struct map_session_data *sd)
{
- guild->reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
+ guild->reply_invite(sd, RFIFOL(fd, 2), RFIFOL(fd, 6));
}
static void clif_parse_GuildLeave(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -14540,16 +14732,19 @@ static void clif_parse_GuildLeave(int fd, struct map_session_data *sd) __attribu
/// 0159 <guild id>.L <account id>.L <char id>.L <reason>.40B
static void clif_parse_GuildLeave(int fd, struct map_session_data *sd)
{
- if(map->list[sd->bl.m].flag.guildlock) {
- clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ if (map->list[sd->bl.m].flag.guildlock) {
+ clif->message(fd, msg_fd(fd, 228)); // Guild modification is disabled in this map.
return;
}
- if( sd->bg_id ) {
- clif->message(fd, msg_fd(fd,870)); //"You can't leave battleground guilds."
+ if (sd->bg_id) {
+ clif->message(fd, msg_fd(fd, 870)); //"You can't leave battleground guilds."
return;
}
- guild->leave(sd,RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOP(fd,14));
+ guild->leave(sd, RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10), RFIFOP(fd, 14));
}
static void clif_parse_GuildExpulsion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -14557,11 +14752,14 @@ static void clif_parse_GuildExpulsion(int fd, struct map_session_data *sd) __att
/// 015b <guild id>.L <account id>.L <char id>.L <reason>.40B
static void clif_parse_GuildExpulsion(int fd, struct map_session_data *sd)
{
- if( map->list[sd->bl.m].flag.guildlock || sd->bg_id ) {
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ if (map->list[sd->bl.m].flag.guildlock || sd->bg_id) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}
- guild->expulsion(sd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOP(fd,14));
+ guild->expulsion(sd, RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10), RFIFOP(fd, 14));
}
/**
@@ -14594,6 +14792,9 @@ static void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd)
/// 0170 <account id>.L <inviter account id>.L <inviter char id>.L
static void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *t_sd;
if(!sd->state.gmaster_flag)
@@ -14634,6 +14835,9 @@ static void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) __a
/// 1 = Enemy
static void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
if(!sd->state.gmaster_flag)
return;
@@ -14649,6 +14853,9 @@ static void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) __at
/// 0180 <account id>.L
static void clif_parse_GuildOpposition(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *t_sd;
if(!sd->state.gmaster_flag)
@@ -14678,6 +14885,9 @@ static void clif_parse_GuildBreak(int fd, struct map_session_data *sd) __attribu
/// field name and size is same as the one in CH_DELETE_CHAR.
static void clif_parse_GuildBreak(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
char key[40];
if( map->list[sd->bl.m].flag.guildlock ) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
@@ -14701,7 +14911,10 @@ static void clif_parse_PetMenu(int fd, struct map_session_data *sd) __attribute_
/// 4 = unequip accessory
static void clif_parse_PetMenu(int fd, struct map_session_data *sd)
{
- pet->menu(sd,RFIFOB(fd,2));
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ pet->menu(sd, RFIFOB(fd, 2));
}
static void clif_parse_CatchPet(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -14709,7 +14922,10 @@ static void clif_parse_CatchPet(int fd, struct map_session_data *sd) __attribute
/// 019f <id>.L
static void clif_parse_CatchPet(int fd, struct map_session_data *sd)
{
- pet->catch_process2(sd,RFIFOL(fd,2));
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ pet->catch_process2(sd, RFIFOL(fd, 2));
}
static void clif_parse_SelectEgg(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -14717,10 +14933,13 @@ static void clif_parse_SelectEgg(int fd, struct map_session_data *sd) __attribut
/// 01a7 <index>.W
static void clif_parse_SelectEgg(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
if (sd->menuskill_id != SA_TAMINGMONSTER || sd->menuskill_val != -1) {
return;
}
- pet->select_egg(sd,RFIFOW(fd,2)-2);
+ pet->select_egg(sd, RFIFOW(fd, 2) - 2);
clif_menuskill_clear(sd);
}
@@ -14760,6 +14979,9 @@ static void clif_parse_ChangePetName(int fd, struct map_session_data *sd) __attr
/// 01a5 <name>.24B
static void clif_parse_ChangePetName(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
pet->change_name(sd, RFIFOP(fd,2));
}
@@ -14768,6 +14990,9 @@ static void clif_parse_pet_evolution(int fd, struct map_session_data *sd) __attr
/// 09fb <Length>.W <EvolvedPetEggID>.W {<index>.W <amount>.W}*items
static void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_PET_EVOLUTION *p = RP2PTR(fd);
int i = 0, idx, petIndex;
@@ -14956,7 +15181,7 @@ static void clif_parse_GMShift(int fd, struct map_session_data *sd)
{
// FIXME: remove is supposed to receive account name for clients prior 20100803RE
char player_name[NAME_LENGTH];
- char command[NAME_LENGTH+8];
+ char command[NAME_LENGTH + 20];
safestrncpy(player_name, RFIFOP(fd,2), NAME_LENGTH);
@@ -14975,7 +15200,7 @@ static void clif_parse_GMRemove2(int fd, struct map_session_data *sd)
account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
if( (pl_sd = map->id2sd(account_id)) != NULL ) {
- char command[NAME_LENGTH+8];
+ char command[NAME_LENGTH + 20];
sprintf(command, "%cjumpto %s", atcommand->at_symbol, pl_sd->status.name);
atcommand->exec(fd, sd, command, true);
}
@@ -15012,7 +15237,7 @@ static void clif_parse_GMRecall2(int fd, struct map_session_data *sd)
account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
if( (pl_sd = map->id2sd(account_id)) != NULL ) {
- char command[NAME_LENGTH+8];
+ char command[NAME_LENGTH + 20];
sprintf(command, "%crecall %s", atcommand->at_symbol, pl_sd->status.name);
atcommand->exec(fd, sd, command, true);
}
@@ -15343,6 +15568,9 @@ static void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) __att
/// 01e7
static void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
if (sd->state.doridori) return;
switch (sd->job & MAPID_UPPERMASK) {
@@ -15369,6 +15597,9 @@ static void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *s
/// "Help me out~ Please~ T_T"
static void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
/* [Ind/Hercules] */
/* game client is currently broken on this (not sure the packetver range) */
/* it sends the request when the criteria doesn't match (and of course we let it fail) */
@@ -15512,6 +15743,9 @@ static void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) __att
/// 0202 <name>.24B
static void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *f_sd;
int i;
char nick[NAME_LENGTH];
@@ -15633,6 +15867,9 @@ static void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) __
/// 0203 <account id>.L <char id>.L
static void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *f_sd = NULL;
int account_id, char_id;
int i, j;
@@ -15724,7 +15961,7 @@ static void clif_parse_PVPInfo(int fd, struct map_session_data *sd)
/// ranking pointlist { <name>.24B <point>.L }*10
static void clif_ranklist_sub(struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type)
{
-#if !(PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724)
+#if !(PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724)
nullpo_retv(ranks);
struct fame_list* list;
@@ -15759,7 +15996,7 @@ static void clif_ranklist_sub(struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame
static void clif_ranklist_sub2(uint32 *chars, uint32 *points, enum fame_list_type type)
{
-#if PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
+#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
nullpo_retv(chars);
nullpo_retv(points);
@@ -15798,7 +16035,7 @@ static void clif_ranklist(struct map_session_data *sd, enum fame_list_type type)
struct PACKET_ZC_ACK_RANKING *p = WFIFOP(fd, 0);
p->packetType = HEADER_ZC_ACK_RANKING;
p->rankType = type;
-#if PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
+#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
clif->ranklist_sub2(p->chars, p->points, type);
#else
clif->ranklist_sub(p->ranks, type);
@@ -16007,6 +16244,9 @@ static void clif_parse_FeelSaveOk(int fd, struct map_session_data *sd) __attribu
/// 2 = star
static void clif_parse_FeelSaveOk(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int i;
if (sd->menuskill_id != SG_FEEL)
return;
@@ -16048,6 +16288,9 @@ static void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd)
/// 0231 <name>.24B
static void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
homun->change_name(sd, RFIFOP(fd,2));
}
@@ -16056,6 +16299,9 @@ static void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) __at
/// 0234 <id>.L
static void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int id = RFIFOL(fd,2); // Mercenary or Homunculus
struct block_list *bl = NULL;
struct unit_data *ud = NULL;
@@ -16077,6 +16323,9 @@ static void clif_parse_HomMoveTo(int fd, struct map_session_data *sd) __attribut
/// 0232 <id>.L <position data>.3B
static void clif_parse_HomMoveTo(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int id = RFIFOL(fd,2); // Mercenary or Homunculus
struct block_list *bl = NULL;
short x, y;
@@ -16100,6 +16349,9 @@ static void clif_parse_HomAttack(int fd, struct map_session_data *sd) __attribut
/// always 0
static void clif_parse_HomAttack(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct block_list *bl = NULL;
int id = RFIFOL(fd,2),
target_id = RFIFOL(fd,6),
@@ -16126,6 +16378,9 @@ static void clif_parse_HomMenu(int fd, struct map_session_data *sd) __attribute_
/// 2 = delete
static void clif_parse_HomMenu(int fd, struct map_session_data *sd)
{ //[orn]
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int cmd;
cmd = RFIFOW(fd,0);
@@ -16141,6 +16396,11 @@ static void clif_parse_AutoRevive(int fd, struct map_session_data *sd) __attribu
/// 0292
static void clif_parse_AutoRevive(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+ if (!pc_isdead(sd))
+ return;
+
int item_position = pc->search_inventory(sd, ITEMID_TOKEN_OF_SIEGFRIED);
int hpsp = 100;
@@ -16162,7 +16422,7 @@ static void clif_parse_AutoRevive(int fd, struct map_session_data *sd)
else
pc->delitem(sd, item_position, 1, 0, DELITEM_SKILLUSE, LOG_TYPE_CONSUME);
- clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
+ clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION, 4, 1);
}
/// Information about character's status values (ZC_ACK_STATUS_GM).
@@ -16212,6 +16472,9 @@ static void clif_parse_Check(int fd, struct map_session_data *sd) __attribute__(
/// 0213 <char name>.24B
static void clif_parse_Check(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isvending(sd))
+ return;
+
char charname[NAME_LENGTH];
struct map_session_data* pl_sd;
@@ -16374,6 +16637,9 @@ static void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd) __
/// 023f
static void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct mail_data* md = &sd->mail.inbox;
if( md->amount < MAIL_MAX_INBOX && (md->full || sd->mail.changed) )
@@ -16457,6 +16723,9 @@ static void clif_parse_Mail_read(int fd, struct map_session_data *sd) __attribut
/// 0241 <mail id>.L
static void clif_parse_Mail_read(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int mail_id = RFIFOL(fd,2);
if( mail_id <= 0 )
@@ -16472,6 +16741,9 @@ static void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) __att
/// 0244 <mail id>.L
static void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int mail_id = RFIFOL(fd,2);
int i;
@@ -16540,6 +16812,9 @@ static void clif_parse_Mail_delete(int fd, struct map_session_data *sd) __attrib
/// 0243 <mail id>.L
static void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int mail_id = RFIFOL(fd,2);
int i;
@@ -16571,6 +16846,9 @@ static void clif_parse_Mail_return(int fd, struct map_session_data *sd) __attrib
/// 0273 <mail id>.L <receive name>.24B
static void clif_parse_Mail_return(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int mail_id = RFIFOL(fd,2);
int i;
@@ -16595,6 +16873,9 @@ static void clif_parse_Mail_setattach(int fd, struct map_session_data *sd) __att
/// 0247 <index>.W <amount>.L
static void clif_parse_Mail_setattach(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int idx = RFIFOW(fd,2);
int amount = RFIFOL(fd,4);
unsigned char flag;
@@ -16617,6 +16898,9 @@ static void clif_parse_Mail_winopen(int fd, struct map_session_data *sd) __attri
/// 2 = remove zeny
static void clif_parse_Mail_winopen(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int flag = RFIFOW(fd,2);
if (flag == 0 || flag == 1)
@@ -16631,6 +16915,9 @@ static void clif_parse_Mail_send(int fd, struct map_session_data *sd) __attribut
static void clif_parse_Mail_send(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct mail_message msg;
int body_len;
int len = RFIFOW(fd, 2);
@@ -16787,7 +17074,10 @@ static void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd) __
/// ? = junk, uninitialized value (ex. when switching between list filters)
static void clif_parse_Auction_cancelreg(int fd, struct map_session_data *sd)
{
- if( sd->auction.amount > 0 )
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ if (sd->auction.amount > 0)
clif->additem(sd, sd->auction.index, sd->auction.amount, 0);
sd->auction.amount = 0;
@@ -16798,8 +17088,11 @@ static void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) __at
/// 024c <index>.W <count>.L
static void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
{
- int idx = RFIFOW(fd,2) - 2;
- int amount = RFIFOL(fd,4); // Always 1
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ int idx = RFIFOW(fd, 2) - 2;
+ int amount = RFIFOL(fd, 4); // Always 1
struct item_data *item;
if( !battle_config.feature_auction )
@@ -16877,6 +17170,9 @@ static void clif_parse_Auction_register(int fd, struct map_session_data *sd) __a
/// 024d <now money>.L <max money>.L <delete hour>.W
static void clif_parse_Auction_register(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct auction_data auction;
struct item_data *item;
@@ -16972,7 +17268,10 @@ static void clif_parse_Auction_cancel(int fd, struct map_session_data *sd) __att
/// 024e <auction id>.L
static void clif_parse_Auction_cancel(int fd, struct map_session_data *sd)
{
- unsigned int auction_id = RFIFOL(fd,2);
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ unsigned int auction_id = RFIFOL(fd, 2);
intif->Auction_cancel(sd->status.char_id, auction_id);
}
@@ -16982,6 +17281,9 @@ static void clif_parse_Auction_close(int fd, struct map_session_data *sd) __attr
/// 025d <auction id>.L
static void clif_parse_Auction_close(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
unsigned int auction_id = RFIFOL(fd,2);
intif->Auction_close(sd->status.char_id, auction_id);
@@ -16992,8 +17294,11 @@ static void clif_parse_Auction_bid(int fd, struct map_session_data *sd) __attrib
/// 024f <auction id>.L <money>.L
static void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
{
- unsigned int auction_id = RFIFOL(fd,2);
- int bid = RFIFOL(fd,6);
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ unsigned int auction_id = RFIFOL(fd, 2);
+ int bid = RFIFOL(fd, 6);
if( !pc_can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish]
clif->message(sd->fd, msg_sd(sd,246)); // Your GM level doesn't authorize you to perform this action.
@@ -17024,9 +17329,12 @@ static void clif_parse_Auction_search(int fd, struct map_session_data *sd) __att
/// 5 = auction id search
static void clif_parse_Auction_search(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
char search_text[NAME_LENGTH];
- short type = RFIFOW(fd,2), page = RFIFOW(fd,32);
- int price = RFIFOL(fd,4); // FIXME: bug #5071
+ short type = RFIFOW(fd, 2), page = RFIFOW(fd, 32);
+ int price = RFIFOL(fd, 4); // FIXME: bug #5071
if( !battle_config.feature_auction )
return;
@@ -17045,7 +17353,10 @@ static void clif_parse_Auction_buysell(int fd, struct map_session_data *sd) __at
/// 1 = buy (own bids)
static void clif_parse_Auction_buysell(int fd, struct map_session_data *sd)
{
- short type = RFIFOW(fd,2) + 6;
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ short type = RFIFOW(fd, 2) + 6;
if( !battle_config.feature_auction )
return;
@@ -17155,6 +17466,9 @@ static void clif_parse_cashshop_buy(int fd, struct map_session_data *sd) __attri
/// 0288 <packet len>.W <kafra points>.L <count>.W { <amount>.W <name id>.W }.4B*count (PACKETVER >= 20100803)
static void clif_parse_cashshop_buy(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int fail = 0;
const struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM *p = RFIFOP(fd, 0);
@@ -17247,6 +17561,9 @@ static void clif_parse_Adopt_request(int fd, struct map_session_data *sd) __attr
/// 01f9 <account id>.L
static void clif_parse_Adopt_request(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct map_session_data *tsd = map->id2sd(RFIFOL(fd,2)), *p_sd = map->charid2sd(sd->status.partner_id);
if( pc->can_Adopt(sd, p_sd, tsd) ) {
@@ -17263,6 +17580,9 @@ static void clif_parse_Adopt_reply(int fd, struct map_session_data *sd) __attrib
/// 1 = accepted
static void clif_parse_Adopt_reply(int fd, struct map_session_data *sd)
{
+ if (pc_isdead(sd))
+ return;
+
int p1_id = RFIFOL(fd,2);
int p2_id = RFIFOL(fd,6);
int result = RFIFOL(fd,10);
@@ -17330,6 +17650,9 @@ static void clif_parse_ViewPlayerEquip(int fd, struct map_session_data *sd) __at
/// 02d6 <account id>.L
static void clif_parse_ViewPlayerEquip(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int charid = RFIFOL(fd, 2);
struct map_session_data* tsd = map->id2sd(charid);
@@ -17357,6 +17680,9 @@ static void clif_parse_cz_config(int fd, struct map_session_data *sd) __attribut
/// 1 = enabled
static void clif_parse_cz_config(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
enum CZ_CONFIG type = RFIFOL(fd, 2);
int flag = RFIFOL(fd, 6);
@@ -17672,6 +17998,9 @@ static void clif_parse_questStateAck(int fd, struct map_session_data *sd) __attr
/// 02b6 <quest id>.L <active>.B
static void clif_parse_questStateAck(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
quest->update_status(sd, RFIFOL(fd,2), RFIFOB(fd,6)?Q_ACTIVE:Q_INACTIVE);
}
@@ -17891,6 +18220,9 @@ static void clif_parse_mercenary_action(int fd, struct map_session_data *sd) __a
/// 2 = delete
static void clif_parse_mercenary_action(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int option = RFIFOB(fd,2);
if (sd->md == NULL)
return;
@@ -18359,6 +18691,9 @@ static void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *s
/// S 07e4 <length>.w <option>.l <val>.l {<index>.w <amount>.w).4b*
static void clif_parse_ItemListWindowSelected(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int n = ((int)RFIFOW(fd, 2) - 12) / 4;
int type = RFIFOL(fd,4);
int flag = RFIFOL(fd,8); // Button clicked: 0 = Cancel, 1 = OK
@@ -18488,6 +18823,9 @@ static void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data *sd) _
/// 1 = open
static void clif_parse_ReqOpenBuyingStore(int fd, struct map_session_data *sd)
{
+ if (pc_istrading(sd) || pc_isdead(sd))
+ return;
+
const unsigned int blocksize = sizeof(struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub);
const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist;
char storename[MESSAGE_SIZE];
@@ -18651,6 +18989,9 @@ static void clif_buyingstore_disappear_entry_single(struct map_session_data *sd,
/// 0817 <account id>.L
static void clif_parse_ReqClickBuyingStore(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int account_id;
account_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
@@ -18695,6 +19036,9 @@ static void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data *sd)
/// 0819 <packet len>.W <account id>.L <store id>.L { <index>.W <name id>.W <amount>.W }*
static void clif_parse_ReqTradeBuyingStore(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const unsigned int blocksize = sizeof(struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub);
const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist;
int account_id;
@@ -18833,6 +19177,9 @@ static void clif_parse_SearchStoreInfo(int fd, struct map_session_data *sd) __at
/// cannot be searched.
static void clif_parse_SearchStoreInfo(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const unsigned int blocksize = sizeof(struct PACKET_CZ_SEARCH_STORE_INFO_item);
const struct PACKET_CZ_SEARCH_STORE_INFO_item* itemlist;
const struct PACKET_CZ_SEARCH_STORE_INFO_item* cardlist;
@@ -18981,6 +19328,9 @@ static void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data *
/// 0838
static void clif_parse_SearchStoreInfoNextPage(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
searchstore->next(sd);
}
@@ -19019,6 +19369,9 @@ static void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_d
/// 083c <account id>.L <store id>.L <nameid>.W
static void clif_parse_SearchStoreInfoListItemClick(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_SSILIST_ITEM_CLICK *p = RFIFOP(fd, 0);
searchstore->click(sd, p->AID, p->storeId, p->itemId);
}
@@ -19302,8 +19655,10 @@ static void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd) __at
*------------------------------------------*/
static void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
- if( sd->menuskill_id != SC_AUTOSHADOWSPELL )
+ if (sd->menuskill_id != SC_AUTOSHADOWSPELL)
return;
if (pc_istrading(sd) || sd->state.prevend) {
@@ -19349,9 +19704,8 @@ static void clif_parse_MoveItem(int fd, struct map_session_data *sd)
int index;
/* can't move while dead. */
- if(pc_isdead(sd)) {
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
return;
- }
index = RFIFOW(fd,2)-2;
@@ -19502,6 +19856,8 @@ static void clif_parse_dull(int fd, struct map_session_data *sd)
static void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_CashShopOpen(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
if (map->list[sd->bl.m].flag.nocashshop) {
clif->messagecolor_self(fd, COLOR_RED, msg_fd(fd,1489)); //Cash Shop is disabled in this map
@@ -19524,6 +19880,9 @@ static void clif_parse_CashShopClose(int fd, struct map_session_data *sd)
static void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
clif->cashShopSchedule(fd, sd);
}
@@ -19561,6 +19920,9 @@ void clif_cashShopSchedule(int fd, struct map_session_data *sd)
static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int len = RFIFOW(fd, 2);
unsigned short limit, i, j;
unsigned int kafra_pay;
@@ -19681,6 +20043,9 @@ static void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd)
{
// [4144] packet exists only in 2011 and was dropped after
#if PACKETVER >= 20110222 && PACKETVER < 20120000
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
short tab = RFIFOW(fd, 2);
int j;
@@ -19835,6 +20200,9 @@ static void clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEG
static void clif_parse_bgqueue_register(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_bgqueue_register(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct packet_bgqueue_register *p = RP2PTR(fd);
struct bg_arena *arena = NULL;
if( !bg->queue_on ) return; /* temp, until feature is complete */
@@ -19875,6 +20243,9 @@ static void clif_bgqueue_update_info(struct map_session_data *sd, unsigned char
static void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct packet_bgqueue_checkstate *p = RP2PTR(fd);
if (sd->bg_queue.arena && sd->bg_queue.type) {
@@ -19887,6 +20258,9 @@ static void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd)
static void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct packet_bgqueue_revoke_req *p = RP2PTR(fd);
if( sd->bg_queue.arena )
@@ -19898,6 +20272,9 @@ static void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd)
static void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct packet_bgqueue_battlebegin_ack *p = RP2PTR(fd);
struct bg_arena *arena;
@@ -19962,7 +20339,11 @@ static void clif_package_item_announce(struct map_session_data *sd, int nameid,
nullpo_retv(sd);
p.PacketType = package_item_announceType;
- p.PacketLength = 11 + NAME_LENGTH;
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ p.PacketLength = 7 + 4 + 4 + NAME_LENGTH;
+#else
+ p.PacketLength = 7 + 2 + 2 + NAME_LENGTH;
+#endif
p.type = 0x0;
p.ItemID = nameid;
p.len = NAME_LENGTH;
@@ -19970,7 +20351,7 @@ static void clif_package_item_announce(struct map_session_data *sd, int nameid,
p.unknown = 0x2; // some strange byte, IDA shows.. BYTE3(BoxItemIDLength) = 2;
p.BoxItemID = containerid;
- clif->send(&p,sizeof(p), &sd->bl, ALL_CLIENT);
+ clif->send(&p, p.PacketLength, &sd->bl, ALL_CLIENT);
}
/* Made Possible Thanks to Yommy! */
@@ -19988,12 +20369,13 @@ static void clif_item_drop_announce(struct map_session_data *sd, int nameid, cha
if (monsterName == NULL) {
// message: MSG_BROADCASTING_SPECIAL_ITEM_OBTAIN2
p.type = 0x2;
+ p.PacketLength -= NAME_LENGTH;
} else {
// message: MSG_BROADCASTING_SPECIAL_ITEM_OBTAIN
p.type = 0x1;
safestrncpy(p.monsterName, monsterName, sizeof(p.monsterName));
}
- clif->send(&p, sizeof(p), &sd->bl, ALL_CLIENT);
+ clif->send(&p, p.PacketLength, &sd->bl, ALL_CLIENT);
}
/* [Ind/Hercules] special thanks to Yommy~! */
@@ -20053,6 +20435,9 @@ static void clif_cart_additem_ack(struct map_session_data *sd, int flag)
static void clif_parse_BankDeposit(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_BankDeposit(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct packet_banking_deposit_req *p = RP2PTR(fd);
int money;
@@ -20069,6 +20454,9 @@ static void clif_parse_BankDeposit(int fd, struct map_session_data *sd)
static void clif_parse_BankWithdraw(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_BankWithdraw(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct packet_banking_withdraw_req *p = RP2PTR(fd);
int money;
@@ -20086,6 +20474,9 @@ static void clif_parse_BankCheck(int fd, struct map_session_data *sd) __attribut
static void clif_parse_BankCheck(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20130320
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct packet_banking_check p;
p.PacketType = banking_checkType;
@@ -20329,40 +20720,43 @@ 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)
+static void clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response)
{
-#if PACKETVER >= 20131223
- unsigned short c = 0;
-
+#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20130911 || defined(PACKETVER_ZERO)
nullpo_retv(sd);
nullpo_retv(item_list);
- npcmarket_result.PacketType = npcmarketresultackType;
- npcmarket_result.result = response == 0 ? 1 : 0;/* find other values */
+ struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT *p = (struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT *)packet_buf;
+ p->PacketType = HEADER_ZC_NPC_MARKET_PURCHASE_RESULT;
+ p->result = response;
- if (npcmarket_result.result) {
+ unsigned short c = 0;
+ if (response == MARKET_BUY_RESULT_SUCCESS) {
+ int vectorLen = VECTOR_LENGTH(*item_list);
+ int maxCount = (sizeof(packet_buf) - sizeof(struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT)) / sizeof(struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub);
+ if (maxCount > vectorLen)
+ maxCount = vectorLen;
struct npc_data *nd = map->id2nd(sd->npc_shopid);
struct npc_item_list *shop = nd->u.scr.shop->item;
unsigned short shop_size = nd->u.scr.shop->items;
- int i;
- for (i = 0; i < VECTOR_LENGTH(*item_list); i++) {
+ for (int i = 0; i < maxCount; i++) {
const struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i);
int j;
- npcmarket_result.list[i].ITID = entry->id;
- npcmarket_result.list[i].qty = entry->amount;
+ p->list[i].ITID = entry->id;
+ p->list[i].qty = entry->amount;
- ARR_FIND( 0, shop_size, j, entry->id == shop[j].nameid);
+ ARR_FIND(0, shop_size, j, entry->id == shop[j].nameid);
- npcmarket_result.list[i].price = (j != shop_size) ? shop[j].value : 0;
+ p->list[i].price = (j != shop_size) ? shop[j].value : 0;
c++;
}
}
- npcmarket_result.PacketLength = 5 + ( sizeof(npcmarket_result.list[0]) * c );;
+ p->PacketLength = sizeof(struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT) + (sizeof(struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub) * c);
- clif->send(&npcmarket_result,npcmarket_result.PacketLength,&sd->bl,SELF);
+ clif->send(p, p->PacketLength, &sd->bl, SELF);
#endif
}
@@ -20370,8 +20764,10 @@ static void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd) __
static void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20131223
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct packet_npc_market_purchase *p = RP2PTR(fd);
- int response = 0, i;
int count = (p->PacketLength - 4) / sizeof p->list[0];
struct itemlist item_list;
@@ -20380,7 +20776,7 @@ static void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd)
VECTOR_INIT(item_list);
VECTOR_ENSURE(item_list, count, 1);
- for (i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
struct itemlist_entry entry = { 0 };
entry.id = p->list[i].ITID;
@@ -20389,7 +20785,7 @@ static void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd)
VECTOR_PUSH(item_list, entry);
}
- response = npc->market_buylist(sd, &item_list);
+ enum market_buy_result response = npc->market_buylist(sd, &item_list);
clif->npc_market_purchase_ack(sd, &item_list, response);
VECTOR_CLEAR(item_list);
@@ -20414,6 +20810,9 @@ static void clif_parse_RouletteOpen(int fd, struct map_session_data *sd) __attri
static void clif_parse_RouletteOpen(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20140612
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct packet_roulette_open_ack p;
if( !battle_config.feature_roulette ) {
@@ -20439,6 +20838,9 @@ static void clif_parse_RouletteInfo(int fd, struct map_session_data *sd) __attri
static void clif_parse_RouletteInfo(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20140612
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
struct packet_roulette_info_ack p;
unsigned short i, j, count = 0;
@@ -20484,6 +20886,9 @@ static void clif_parse_RouletteClose(int fd, struct map_session_data *sd)
static void clif_parse_RouletteGenerate(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_RouletteGenerate(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
unsigned char result = GENERATE_ROULETTE_SUCCESS;
short stage = sd->roulette.stage;
@@ -20543,6 +20948,8 @@ static void clif_parse_RouletteRecvItem(int fd, struct map_session_data *sd) __a
static void clif_parse_RouletteRecvItem(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20140612
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
struct packet_roulette_itemrecv_ack p;
if( !battle_config.feature_roulette ) {
@@ -21280,6 +21687,9 @@ static void clif_achievement_send_update(int fd, struct map_session_data *sd, co
static void clif_parse_achievement_get_reward(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_achievement_get_reward(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int ach_id = RFIFOL(fd, 2);
const struct achievement_data *ad = NULL;
struct achievement *ach = NULL;
@@ -21322,6 +21732,9 @@ static void clif_achievement_reward_ack(int fd, struct map_session_data *sd, con
static void clif_parse_change_title(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_change_title(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
int title_id = RFIFOL(fd, 2);
if (title_id == sd->status.title_id) { // Same Title
@@ -21369,6 +21782,9 @@ static void clif_change_title_ack(int fd, struct map_session_data *sd, int title
static void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_OPEN_WRITE_MAIL *rPacket = RFIFOP(fd, 0);
int8 result = (rodex->isenabled() == true && sd->npc_id == 0) ? 1 : 0;
@@ -21394,6 +21810,9 @@ static void clif_rodex_open_write_mail(int fd, const char *receiver_name, int8 r
static void clif_parse_rodex_add_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_add_item(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_ADD_ITEM_TO_MAIL *rPacket = RFIFOP(fd, 0);
int16 idx = rPacket->index - 2;
@@ -21447,6 +21866,9 @@ static void clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, i
static void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL *rPacket = RFIFOP(fd, 0);
int16 idx = rPacket->index - 2;
@@ -21519,6 +21941,9 @@ static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id
static void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_SEND_MAIL *rPacket = RFIFOP(fd, 0);
int8 result;
@@ -21749,6 +22174,9 @@ static void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 op
static void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_NEXT_MAIL_LIST *packet = RFIFOP(fd, 0);
rodex->next_page(sd, packet->opentype, packet->Lower_MailID);
@@ -21757,6 +22185,9 @@ static void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd)
static void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_READ_MAIL *rPacket = RFIFOP(fd, 0);
rodex->read_mail(sd, rPacket->MailID);
@@ -21826,6 +22257,9 @@ static void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, str
static void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_DELETE_MAIL *rPacket = RFIFOP(fd, 0);
rodex->delete_mail(sd, rPacket->MailID);
@@ -21853,6 +22287,9 @@ static void clif_rodex_delete_mail(struct map_session_data *sd, int8 opentype, i
static void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_ZENY_FROM_MAIL *rPacket = RFIFOP(fd, 0);
rodex->get_zeny(sd, rPacket->opentype, rPacket->MailID);
@@ -21881,6 +22318,9 @@ static void clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype,
static void clif_parse_rodex_request_items(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_request_items(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_ITEM_FROM_MAIL *rPacket = RFIFOP(fd, 0);
rodex->get_items(sd, rPacket->opentype, rPacket->MailID);
@@ -21920,6 +22360,9 @@ static void clif_rodex_icon(int fd, bool show)
static void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_REFRESH_MAIL_LIST *packet = RFIFOP(fd, 0);
#if PACKETVER >= 20170419
rodex->refresh(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID);
@@ -21931,6 +22374,9 @@ static void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *s
static void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_OPEN_MAIL *packet = RFIFOP(fd, 0);
#if PACKETVER >= 20170419
rodex->open(sd, RODEX_OPENTYPE_UNSET, packet->char_Upper_MailID);
@@ -21943,6 +22389,9 @@ static void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd)
static void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
rodex->clean(sd, 0);
intif->rodex_checkhasnew(sd);
}
@@ -21950,6 +22399,9 @@ static void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd)
static void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
rodex->clean(sd, 1);
}
@@ -22108,8 +22560,10 @@ static time_t clif_attendance_getendtime(void)
static void clif_parse_open_ui_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_open_ui_request(int fd, struct map_session_data *sd)
{
- const struct PACKET_CZ_OPEN_UI *p = RP2PTR(fd);
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+ const struct PACKET_CZ_OPEN_UI *p = RP2PTR(fd);
clif->open_ui(sd, p->UIType);
}
@@ -22180,6 +22634,8 @@ static void clif_parse_attendance_reward_request(int fd, struct map_session_data
static void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd)
{
#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
struct rodex_message msg = { 0 };
struct attendance_entry *entry;
@@ -22261,6 +22717,9 @@ static void clif_parse_private_airship_request(int fd, struct map_session_data *
static void clif_parse_private_airship_request(int fd, struct map_session_data *sd)
{
#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620 || defined(PACKETVER_ZERO)
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
char evname[EVENT_NAME_LENGTH];
struct event_data *ev = NULL;
const struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST *p = RP2PTR(fd);
@@ -22302,6 +22761,9 @@ static void clif_private_airship_response(struct map_session_data *sd, uint32 fl
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)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_STYLE_CHANGE *p = RP2PTR(fd);
if (p->HeadStyle > 0)
@@ -22323,6 +22785,9 @@ static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
static void clif_parse_cz_req_style_change2(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_cz_req_style_change2(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_REQ_STYLE_CHANGE2 *p = RP2PTR(fd);
if (p->HeadStyle > 0)
@@ -22385,6 +22850,9 @@ static void clif_parse_changeDress(int fd, struct map_session_data *sd) __attrib
/// 0ae8 <packet len>.W
static void clif_parse_changeDress(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const char commandname[] = "changedress";
char command[sizeof commandname + 3] = ""; // '@' command + ' ' + NUL
@@ -22409,6 +22877,9 @@ static void clif_party_dead_notification(struct map_session_data *sd)
static void clif_parse_memorial_dungeon_command(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_memorial_dungeon_command(int fd, struct map_session_data *sd)
{
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_MEMORIALDUNGEON_COMMAND *p = RP2PTR(fd);
switch (p->command) {
@@ -22449,6 +22920,9 @@ static void clif_parse_cameraInfo(int fd, struct map_session_data *sd) __attribu
static void clif_parse_cameraInfo(int fd, struct map_session_data *sd)
{
#if PACKETVER >= 20160525
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
const struct PACKET_CZ_CAMERA_INFO *const p = RFIFOP(fd, 0);
char command[100];
if (p->action == 1) {
@@ -22537,6 +23011,9 @@ static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd) __
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
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
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;
@@ -22640,6 +23117,9 @@ static void clif_parse_AddItemRefineryUI(int fd, struct map_session_data *sd) __
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 (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
if (battle_config.enable_refinery_ui == 0)
return;
@@ -22681,6 +23161,9 @@ static void clif_parse_RefineryUIRefine(int fd, struct map_session_data *sd) __a
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 (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
if (battle_config.enable_refinery_ui == 0)
return;
@@ -22693,6 +23176,9 @@ static void clif_parse_RefineryUIClose(int fd, struct map_session_data *sd) __at
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 (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
if (battle_config.enable_refinery_ui == 0)
return;
@@ -23378,6 +23864,7 @@ void clif_defaults(void)
clif->skillinfo = clif_skillinfo;
clif->addskill = clif_addskill;
clif->deleteskill = clif_deleteskill;
+ clif->playerSkillToPacket = clif_playerSkillToPacket;
/* party-specific */
clif->party_created = clif_party_created;
clif->party_member_info = clif_party_member_info;
diff --git a/src/map/clif.h b/src/map/clif.h
index ca7ae35b0..07d2ef4a8 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -57,6 +57,7 @@ struct view_data;
struct achievement_data; // map/achievement.h
struct s_refine_requirement;
struct PACKET_ZC_ACK_RANKING_sub;
+struct SKILLDATA;
enum clif_messages;
enum rodex_add_item;
@@ -698,6 +699,26 @@ enum expand_inventory_result {
EXPAND_INVENTORY_RESULT_MAX_SIZE = 4
};
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+enum market_buy_result {
+ MARKET_BUY_RESULT_ERROR = 0xffff, // -1
+ MARKET_BUY_RESULT_SUCCESS = 0,
+ MARKET_BUY_RESULT_NO_ZENY = 1,
+ MARKET_BUY_RESULT_OVER_WEIGHT = 2,
+ MARKET_BUY_RESULT_OUT_OF_SPACE = 3,
+ MARKET_BUY_RESULT_AMOUNT_TOO_BIG = 9
+};
+#else
+enum market_buy_result {
+ MARKET_BUY_RESULT_ERROR = 0,
+ MARKET_BUY_RESULT_SUCCESS = 1,
+ MARKET_BUY_RESULT_NO_ZENY = 0,
+ MARKET_BUY_RESULT_OVER_WEIGHT = 0,
+ MARKET_BUY_RESULT_OUT_OF_SPACE = 0,
+ MARKET_BUY_RESULT_AMOUNT_TOO_BIG = 0
+};
+#endif
+
/**
* Clif.c Interface
**/
@@ -1068,6 +1089,7 @@ struct clif_interface {
void (*skillinfo) (struct map_session_data *sd,int skill_id, int inf);
void (*addskill) (struct map_session_data *sd, int id);
void (*deleteskill) (struct map_session_data *sd, int id);
+ void (*playerSkillToPacket) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill);
/* party-specific */
void (*party_created) (struct map_session_data *sd,int result);
void (*party_member_info) (struct party_data *p, struct map_session_data *sd);
@@ -1264,7 +1286,7 @@ struct clif_interface {
int (*delay_damage_sub) (int tid, int64 tick, int id, intptr_t data);
/* NPC Market */
void (*npc_market_open) (struct map_session_data *sd, struct npc_data *nd);
- void (*npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response);
+ void (*npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response);
/* */
bool (*parse_roulette_db) (void);
void (*roulette_generate_ack) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID);
diff --git a/src/map/guild.c b/src/map/guild.c
index aadb55c78..415a46db5 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1137,13 +1137,14 @@ static int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id,
*---------------------------------------------------*/
static int guild_send_message(struct map_session_data *sd, const char *mes)
{
- int len = (int)strlen(mes);
nullpo_ret(sd);
- if (sd->status.guild_id == 0)
+ if (sd->status.guild_id == 0 || sd->guild == NULL)
return 0;
- intif->guild_message(sd->status.guild_id, sd->status.account_id, mes, len);
- guild->recv_message(sd->status.guild_id, sd->status.account_id, mes, len);
+
+ int len = (int)strlen(mes);
+
+ clif->guild_message(sd->guild, sd->status.account_id, mes, len);
// Chat logging type 'G' / Guild Chat
logs->chat(LOG_CHAT_GUILD, sd->status.guild_id, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes);
@@ -1152,18 +1153,6 @@ static int guild_send_message(struct map_session_data *sd, const char *mes)
}
/*====================================================
- * Guild receive a message, will be displayed to whole member
- *---------------------------------------------------*/
-static int guild_recv_message(int guild_id, int account_id, const char *mes, int len)
-{
- struct guild *g;
- if( (g=guild->search(guild_id))==NULL)
- return 0;
- clif->guild_message(g,account_id,mes,len);
- return 0;
-}
-
-/*====================================================
* Member changing position in guild
*---------------------------------------------------*/
static int guild_change_memberposition(int guild_id, int account_id, int char_id, short idx)
@@ -2480,7 +2469,6 @@ void guild_defaults(void)
guild->change_emblem = guild_change_emblem;
guild->emblem_changed = guild_emblem_changed;
guild->send_message = guild_send_message;
- guild->recv_message = guild_recv_message;
guild->send_dot_remove = guild_send_dot_remove;
guild->skillupack = guild_skillupack;
guild->dobreak = guild_break;
diff --git a/src/map/guild.h b/src/map/guild.h
index 40209b988..d0374103f 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -136,7 +136,6 @@ struct guild_interface {
int (*change_emblem) (struct map_session_data *sd,int len,const char *data);
int (*emblem_changed) (int len,int guild_id,int emblem_id,const char *data);
int (*send_message) (struct map_session_data *sd, const char *mes);
- int (*recv_message) (int guild_id,int account_id,const char *mes,int len);
int (*send_dot_remove) (struct map_session_data *sd);
int (*skillupack) (int guild_id,uint16 skill_id,int account_id);
int (*dobreak) (struct map_session_data *sd, const char *name);
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index d3e815872..31744f479 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -1375,7 +1375,7 @@ static void homunculus_exp_db_read(void)
homun->dbs->exptable[MAX_LEVEL - 1] = 0;
}
fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' levels in '"CL_WHITE"%s"CL_RESET"'.\n", j, filename[i]);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' levels in '"CL_WHITE"%s/%s"CL_RESET"'.\n", j, map->db_path, filename[i]);
}
}
diff --git a/src/map/intif.c b/src/map/intif.c
index e25f56b63..5a62f9644 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -153,158 +153,6 @@ static int intif_rename(struct map_session_data *sd, int type, const char *name)
return 0;
}
-// GM Send a message
-static int intif_broadcast(const char *mes, int len, int type)
-{
- int lp = (type&BC_COLOR_MASK) ? 4 : 0;
-
- nullpo_ret(mes);
- Assert_ret(len < 32000);
- // Send to the local players
- clif->broadcast(NULL, mes, len, type, ALL_CLIENT);
-
- if (intif->CheckForCharServer())
- return 0;
-
- if (chrif->other_mapserver_count < 1)
- return 0; //No need to send.
-
- WFIFOHEAD(inter_fd, 16 + lp + len);
- WFIFOW(inter_fd,0) = 0x3000;
- WFIFOW(inter_fd,2) = 16 + lp + len;
- WFIFOL(inter_fd,4) = 0xFF000000; // 0xFF000000 color signals standard broadcast
- WFIFOW(inter_fd,8) = 0; // fontType not used with standard broadcast
- WFIFOW(inter_fd,10) = 0; // fontSize not used with standard broadcast
- WFIFOW(inter_fd,12) = 0; // fontAlign not used with standard broadcast
- WFIFOW(inter_fd,14) = 0; // fontY not used with standard broadcast
- if (type&BC_BLUE)
- WFIFOL(inter_fd,16) = 0x65756c62; //If there's "blue" at the beginning of the message, game client will display it in blue instead of yellow.
- else if (type&BC_WOE)
- WFIFOL(inter_fd,16) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'.
- memcpy(WFIFOP(inter_fd,16 + lp), mes, len);
- WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
- return 0;
-}
-
-static int intif_broadcast2(const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY)
-{
- nullpo_ret(mes);
- Assert_ret(len < 32000);
- // Send to the local players
- clif->broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT);
-
- if (intif->CheckForCharServer())
- return 0;
-
- if (chrif->other_mapserver_count < 1)
- return 0; //No need to send.
-
- WFIFOHEAD(inter_fd, 16 + len);
- WFIFOW(inter_fd,0) = 0x3000;
- WFIFOW(inter_fd,2) = 16 + len;
- WFIFOL(inter_fd,4) = fontColor;
- WFIFOW(inter_fd,8) = fontType;
- WFIFOW(inter_fd,10) = fontSize;
- WFIFOW(inter_fd,12) = fontAlign;
- WFIFOW(inter_fd,14) = fontY;
- memcpy(WFIFOP(inter_fd,16), mes, len);
- WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
- return 0;
-}
-
-/// send a message using the main chat system
-/// <sd> the source of message
-/// <message> the message that was sent
-static int intif_main_message(struct map_session_data *sd, const char *message)
-{
- char output[256];
-
- nullpo_ret(sd);
- nullpo_ret(message);
-
- // format the message for main broadcasting
- snprintf( output, sizeof(output), msg_txt(386), sd->status.name, message );
-
- // send the message using the inter-server broadcast service
- intif->broadcast2(output, (int)strlen(output) + 1, 0xFE000000, 0, 0, 0, 0);
-
- // log the chat message
- logs->chat( LOG_CHAT_MAINCHAT, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message );
-
- return 0;
-}
-
-// The transmission of Wisp/Page to inter-server (player not found on this server)
-static int intif_wis_message(struct map_session_data *sd, const char *nick, const char *mes, int mes_len)
-{
- if (intif->CheckForCharServer())
- return 0;
- nullpo_ret(sd);
- nullpo_ret(nick);
- nullpo_ret(mes);
-
- if (chrif->other_mapserver_count < 1) {
- //Character not found.
- clif->wis_end(sd->fd, 1);
- return 0;
- }
-
- WFIFOHEAD(inter_fd,mes_len + 52);
- WFIFOW(inter_fd,0) = 0x3001;
- WFIFOW(inter_fd,2) = mes_len + 52;
- memcpy(WFIFOP(inter_fd,4), sd->status.name, NAME_LENGTH);
- memcpy(WFIFOP(inter_fd,4+NAME_LENGTH), nick, NAME_LENGTH);
- memcpy(WFIFOP(inter_fd,4+2*NAME_LENGTH), mes, mes_len);
- WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
-
- if (battle_config.etc_log)
- ShowInfo("intif_wis_message from %s to %s (message: '%s')\n", sd->status.name, nick, mes);
-
- return 0;
-}
-
-// The reply of Wisp/page
-static int intif_wis_replay(int id, int flag)
-{
- if (intif->CheckForCharServer())
- return 0;
- WFIFOHEAD(inter_fd,7);
- WFIFOW(inter_fd,0) = 0x3002;
- WFIFOL(inter_fd,2) = id;
- WFIFOB(inter_fd,6) = flag; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
- WFIFOSET(inter_fd,7);
-
- if (battle_config.etc_log)
- ShowInfo("intif_wis_replay: id: %d, flag:%d\n", id, flag);
-
- return 0;
-}
-
-// The transmission of GM only Wisp/Page from server to inter-server
-static int intif_wis_message_to_gm(char *wisp_name, int permission, char *mes)
-{
- int mes_len;
- if (intif->CheckForCharServer())
- return 0;
- nullpo_ret(wisp_name);
- nullpo_ret(mes);
- mes_len = (int)strlen(mes) + 1; // + null
- Assert_ret(mes_len > 0 && mes_len <= INT16_MAX - 32);
-
- WFIFOHEAD(inter_fd, mes_len + 32);
- WFIFOW(inter_fd,0) = 0x3003;
- WFIFOW(inter_fd,2) = mes_len + 32;
- memcpy(WFIFOP(inter_fd,4), wisp_name, NAME_LENGTH);
- WFIFOL(inter_fd,4+NAME_LENGTH) = permission;
- memcpy(WFIFOP(inter_fd,8+NAME_LENGTH), mes, mes_len);
- WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
-
- if (battle_config.etc_log)
- ShowNotice("intif_wis_message_to_gm: from: '%s', required permission: %d, message: '%s'.\n", wisp_name, permission, mes);
-
- return 0;
-}
-
//Request for saving registry values.
static int intif_saveregistry(struct map_session_data *sd)
{
@@ -714,27 +562,6 @@ static int intif_break_party(int party_id)
return 0;
}
-// Sending party chat
-static int intif_party_message(int party_id, int account_id, const char *mes, int len)
-{
- if (intif->CheckForCharServer())
- return 0;
-
- if (chrif->other_mapserver_count < 1)
- return 0; //No need to send.
-
- nullpo_ret(mes);
- Assert_ret(len > 0 && len < 32000);
- WFIFOHEAD(inter_fd,len + 12);
- WFIFOW(inter_fd,0)=0x3027;
- WFIFOW(inter_fd,2)=len+12;
- WFIFOL(inter_fd,4)=party_id;
- WFIFOL(inter_fd,8)=account_id;
- memcpy(WFIFOP(inter_fd,12),mes,len);
- WFIFOSET(inter_fd,len+12);
- return 0;
-}
-
// Request a new leader for party
static int intif_party_leaderchange(int party_id, int account_id, int char_id)
{
@@ -931,28 +758,6 @@ static int intif_guild_break(int guild_id)
return 0;
}
-// Send a guild message
-static int intif_guild_message(int guild_id, int account_id, const char *mes, int len)
-{
- if (intif->CheckForCharServer())
- return 0;
-
- if (chrif->other_mapserver_count < 1)
- return 0; //No need to send.
-
- nullpo_ret(mes);
- Assert_ret(len > 0 && len < 32000);
- WFIFOHEAD(inter_fd, len + 12);
- WFIFOW(inter_fd,0)=0x3037;
- WFIFOW(inter_fd,2)=len+12;
- WFIFOL(inter_fd,4)=guild_id;
- WFIFOL(inter_fd,8)=account_id;
- memcpy(WFIFOP(inter_fd,12),mes,len);
- WFIFOSET(inter_fd,len+12);
-
- return 0;
-}
-
/**
* Requests to change a basic guild information, it is parsed via mapif_parse_GuildBasicInfoChange
* To see the information types that can be changed see mmo.h::guild_basic_info
@@ -1166,98 +971,6 @@ static int intif_homunculus_requestdelete(int homun_id)
//-----------------------------------------------------------------
// Packets receive from inter server
-// Wisp/Page reception // rewritten by [Yor]
-static void intif_parse_WisMessage(int fd)
-{
- struct map_session_data* sd;
- const char *wisp_source;
- char name[NAME_LENGTH];
- int id, i;
-
- id=RFIFOL(fd,4);
-
- safestrncpy(name, RFIFOP(fd,32), NAME_LENGTH);
- sd = map->nick2sd(name);
- if(sd == NULL || strcmp(sd->status.name, name) != 0) {
- //Not found
- intif_wis_replay(id,1);
- return;
- }
- if(sd->state.ignoreAll) {
- intif_wis_replay(id, 2);
- return;
- }
- wisp_source = RFIFOP(fd,8); // speed up [Yor]
- for(i=0; i < MAX_IGNORE_LIST &&
- sd->ignore[i].name[0] != '\0' &&
- strcmp(sd->ignore[i].name, wisp_source) != 0
- ; i++);
-
- if (i < MAX_IGNORE_LIST && sd->ignore[i].name[0] != '\0') {
- //Ignored
- intif_wis_replay(id, 2);
- return;
- }
- //Success to send whisper.
- clif->wis_message(sd->fd, wisp_source, RFIFOP(fd,56),RFIFOW(fd,2)-57);
- intif_wis_replay(id,0); // success
-}
-
-// Wisp/page transmission result reception
-static void intif_parse_WisEnd(int fd)
-{
- struct map_session_data* sd;
- const char *playername = RFIFOP(fd, 2);
-
- if (battle_config.etc_log)
- ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", playername, RFIFOB(fd,26)); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
- sd = map->nick2sd(playername);
- if (sd != NULL)
- clif->wis_end(sd->fd, RFIFOB(fd,26));
-
- return;
-}
-
-static int intif_parse_WisToGM_sub(struct map_session_data *sd, va_list va)
-{
- int permission = va_arg(va, int);
- char *wisp_name;
- char *message;
- int len;
-
- nullpo_ret(sd);
- if (!pc_has_permission(sd, permission))
- return 0;
- wisp_name = va_arg(va, char*);
- message = va_arg(va, char*);
- len = va_arg(va, int);
- clif->wis_message(sd->fd, wisp_name, message, len);
- return 1;
-}
-
-// Received wisp message from map-server via char-server for ALL gm
-// 0x3003/0x3803 <packet_len>.w <wispname>.24B <permission>.l <message>.?B
-static void intif_parse_WisToGM(int fd)
-{
- int permission, mes_len;
- char Wisp_name[NAME_LENGTH];
- char mbuf[255] = { 0 };
- char *message;
-
- mes_len = RFIFOW(fd,2) - 33; // Length not including the NUL terminator
- Assert_retv(mes_len > 0 && mes_len < 32000);
- message = (mes_len >= 255 ? aMalloc(mes_len + 1) : mbuf);
-
- permission = RFIFOL(fd,28);
- safestrncpy(Wisp_name, RFIFOP(fd,4), NAME_LENGTH);
- safestrncpy(message, RFIFOP(fd,32), mes_len + 1);
- // information is sent to all online GM
- map->foreachpc(intif->pWisToGM_sub, permission, Wisp_name, message, mes_len);
-
- if (message != mbuf)
- aFree(message);
-}
-
// Request player registre
static void intif_parse_Registers(int fd)
{
@@ -1464,12 +1177,6 @@ static void intif_parse_PartyMove(int fd)
party->recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
}
-// ACK party messages
-static void intif_parse_PartyMessage(int fd)
-{
- party->recv_message(RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12);
-}
-
// ACK guild creation
static void intif_parse_GuildCreated(int fd)
{
@@ -1619,12 +1326,6 @@ static void intif_parse_GuildEmblem(int fd)
guild->emblem_changed(RFIFOW(fd,2)-12, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12));
}
-// ACK guild message
-static void intif_parse_GuildMessage(int fd)
-{
- guild->recv_message(RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12);
-}
-
// Reply guild castle data request
static void intif_parse_GuildCastleDataLoad(int fd)
{
@@ -2915,15 +2616,6 @@ static int intif_parse(int fd)
}
// Processing branch
switch(cmd){
- case 0x3800:
- if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
- clif->broadcast(NULL, RFIFOP(fd,16), packet_len-16, BC_DEFAULT, ALL_CLIENT);
- else //Color announce.
- clif->broadcast2(NULL, RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT);
- break;
- case 0x3801: intif->pWisMessage(fd); break;
- case 0x3802: intif->pWisEnd(fd); break;
- case 0x3803: intif->pWisToGM(fd); break;
case 0x3804: intif->pRegisters(fd); break;
case 0x3805: intif->pAccountStorage(fd); break;
case 0x3806: intif->pChangeNameOk(fd); break;
@@ -2939,14 +2631,12 @@ static int intif_parse(int fd)
case 0x3824: intif->pPartyMemberWithdraw(fd); break;
case 0x3825: intif->pPartyMove(fd); break;
case 0x3826: intif->pPartyBroken(fd); break;
- case 0x3827: intif->pPartyMessage(fd); break;
case 0x3830: intif->pGuildCreated(fd); break;
case 0x3831: intif->pGuildInfo(fd); break;
case 0x3832: intif->pGuildMemberAdded(fd); break;
case 0x3834: intif->pGuildMemberWithdraw(fd); break;
case 0x3835: intif->pGuildMemberInfoShort(fd); break;
case 0x3836: intif->pGuildBroken(fd); break;
- case 0x3837: intif->pGuildMessage(fd); break;
case 0x3839: intif->pGuildBasicInfoChanged(fd); break;
case 0x383a: intif->pGuildMemberInfoChanged(fd); break;
case 0x383b: intif->pGuildPosition(fd); break;
@@ -3028,10 +2718,10 @@ static int intif_parse(int fd)
void intif_defaults(void)
{
const int packet_len_table [INTIF_PACKET_LEN_TABLE_SIZE] = {
- -1,-1,27,-1, -1,-1,37,-1, 7, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
+ 0, 0, 0, 0, -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,25, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
+ 39,-1,15,15, 14,19, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
+ 10,-1,15, 0, 79,25, 7, 0, 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]
@@ -3048,11 +2738,6 @@ void intif_defaults(void)
/* funcs */
intif->parse = intif_parse;
intif->create_pet = intif_create_pet;
- intif->broadcast = intif_broadcast;
- intif->broadcast2 = intif_broadcast2;
- intif->main_message = intif_main_message;
- intif->wis_message = intif_wis_message;
- intif->wis_message_to_gm = intif_wis_message_to_gm;
intif->saveregistry = intif_saveregistry;
intif->request_registry = intif_request_registry;
intif->request_account_storage = intif_request_account_storage;
@@ -3066,7 +2751,6 @@ void intif_defaults(void)
intif->party_leave = intif_party_leave;
intif->party_changemap = intif_party_changemap;
intif->break_party = intif_break_party;
- intif->party_message = intif_party_message;
intif->party_leaderchange = intif_party_leaderchange;
intif->guild_create = intif_guild_create;
intif->guild_request_info = intif_guild_request_info;
@@ -3074,7 +2758,6 @@ void intif_defaults(void)
intif->guild_leave = intif_guild_leave;
intif->guild_memberinfoshort = intif_guild_memberinfoshort;
intif->guild_break = intif_guild_break;
- intif->guild_message = intif_guild_message;
intif->guild_change_gm = intif_guild_change_gm;
intif->guild_change_basicinfo = intif_guild_change_basicinfo;
intif->guild_change_memberinfo = intif_guild_change_memberinfo;
@@ -3138,10 +2821,6 @@ void intif_defaults(void)
intif->achievements_request = intif_achievements_request;
intif->achievements_save = intif_achievements_save;
/* parse functions */
- intif->pWisMessage = intif_parse_WisMessage;
- intif->pWisEnd = intif_parse_WisEnd;
- intif->pWisToGM_sub = intif_parse_WisToGM_sub;
- intif->pWisToGM = intif_parse_WisToGM;
intif->pRegisters = intif_parse_Registers;
intif->pChangeNameOk = intif_parse_ChangeNameOk;
intif->pMessageToFD = intif_parse_MessageToFD;
@@ -3156,14 +2835,12 @@ void intif_defaults(void)
intif->pPartyMemberWithdraw = intif_parse_PartyMemberWithdraw;
intif->pPartyMove = intif_parse_PartyMove;
intif->pPartyBroken = intif_parse_PartyBroken;
- intif->pPartyMessage = intif_parse_PartyMessage;
intif->pGuildCreated = intif_parse_GuildCreated;
intif->pGuildInfo = intif_parse_GuildInfo;
intif->pGuildMemberAdded = intif_parse_GuildMemberAdded;
intif->pGuildMemberWithdraw = intif_parse_GuildMemberWithdraw;
intif->pGuildMemberInfoShort = intif_parse_GuildMemberInfoShort;
intif->pGuildBroken = intif_parse_GuildBroken;
- intif->pGuildMessage = intif_parse_GuildMessage;
intif->pGuildBasicInfoChanged = intif_parse_GuildBasicInfoChanged;
intif->pGuildMemberInfoChanged = intif_parse_GuildMemberInfoChanged;
intif->pGuildPosition = intif_parse_GuildPosition;
diff --git a/src/map/intif.h b/src/map/intif.h
index 8df669217..ffac4a1c9 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -60,11 +60,6 @@ struct intif_interface {
int (*parse) (int fd);
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);
- int (*main_message) (struct map_session_data* sd, const char* message);
- int (*wis_message) (struct map_session_data *sd, const char *nick, const char *mes, int mes_len);
- int (*wis_message_to_gm) (char *Wisp_name, int permission, char *mes);
int (*saveregistry) (struct map_session_data *sd);
int (*request_registry) (struct map_session_data *sd, int flag);
void (*request_account_storage) (const struct map_session_data *sd);
@@ -78,7 +73,6 @@ struct intif_interface {
int (*party_leave) (int party_id,int account_id, int char_id);
int (*party_changemap) (struct map_session_data *sd, int online);
int (*break_party) (int party_id);
- int (*party_message) (int party_id, int account_id, const char *mes,int len);
int (*party_leaderchange) (int party_id,int account_id,int char_id);
int (*guild_create) (const char *name, const struct guild_member *master);
int (*guild_request_info) (int guild_id);
@@ -86,7 +80,6 @@ struct intif_interface {
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, 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);
int (*guild_change_basicinfo) (int guild_id, int type, const void *data, int len);
int (*guild_change_memberinfo) (int guild_id, int account_id, int char_id, int type, const void *data, int len);
@@ -151,10 +144,6 @@ struct intif_interface {
void(*achievements_request) (struct map_session_data *sd);
void(*achievements_save) (struct map_session_data *sd);
/* */
- void (*pWisMessage) (int fd);
- void (*pWisEnd) (int fd);
- int (*pWisToGM_sub) (struct map_session_data* sd,va_list va);
- void (*pWisToGM) (int fd);
void (*pRegisters) (int fd);
void (*pAccountStorage) (int fd);
void (*pChangeNameOk) (int fd);
@@ -169,14 +158,12 @@ struct intif_interface {
void (*pPartyMemberWithdraw) (int fd);
void (*pPartyMove) (int fd);
void (*pPartyBroken) (int fd);
- void (*pPartyMessage) (int fd);
void (*pGuildCreated) (int fd);
void (*pGuildInfo) (int fd);
void (*pGuildMemberAdded) (int fd);
void (*pGuildMemberWithdraw) (int fd);
void (*pGuildMemberInfoShort) (int fd);
void (*pGuildBroken) (int fd);
- void (*pGuildMessage) (int fd);
void (*pGuildBasicInfoChanged) (int fd);
void (*pGuildMemberInfoChanged) (int fd);
void (*pGuildPosition) (int fd);
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 8caf88a4e..5c56794d8 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1655,7 +1655,7 @@ static void itemdb_read_combos(void)
count++;
}
fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%"PRIu32""CL_RESET"' entries in '"CL_WHITE"item_combo_db"CL_RESET"'.\n", count);
+ ShowStatus("Done reading '"CL_WHITE"%"PRIu32""CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, DBPATH"item_combo_db.txt");
return;
}
@@ -2407,7 +2407,7 @@ static int itemdb_readdb_libconfig(const char *filename)
}
db_destroy(duplicate_db);
libconfig->destroy(&item_db_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath);
return count;
}
diff --git a/src/map/messages_main.h b/src/map/messages_main.h
index 4f75d5071..bc5bcf55d 100644
--- a/src/map/messages_main.h
+++ b/src/map/messages_main.h
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20190724
+Latest version: 20190821
*/
enum clif_messages {
@@ -21783,6 +21783,98 @@ AP가 부족합니다.
*/
MSG_ID_E3B = 0xe3b,
#endif
+#if PACKETVER >= 20190731
+/*20190731 to latest
+제련도가 높아서 조합할 수 없습니다.
+*/
+ MSG_ID_E3C = 0xe3c,
+/*20190731 to latest
+제련도가 조합에 필요한 요구치보다 높습니다.
+*/
+ MSG_ID_E3D = 0xe3d,
+/*20190731 to latest
+'카드가 끼워져있거나 인챈트 되어 있습니다.
+*/
+ MSG_ID_E3E = 0xe3e,
+/*20190731 to latest
+∞
+*/
+ MSG_ID_E3F = 0xe3f,
+/*20190731 to latest
+Z
+*/
+ MSG_ID_E40 = 0xe40,
+/*20190731 to latest
+Total : %s Zeny
+*/
+ MSG_ID_E41 = 0xe41,
+#endif
+#if PACKETVER >= 20190821
+/*20190821 to latest
+계정한정판매 등록창
+*/
+ MSG_ID_E42 = 0xe42,
+/*20190821 to latest
+아이템 DB명
+Item DB Name
+*/
+ MSG_ID_E43 = 0xe43,
+/*20190821 to latest
+아이템 DB번호
+Item DB Number
+*/
+ MSG_ID_E44 = 0xe44,
+/*20190821 to latest
+판매 갯수
+Number of Sale
+*/
+ MSG_ID_E45 = 0xe45,
+/*20190821 to latest
+판매 시작시간
+Sale Start Time
+*/
+ MSG_ID_E46 = 0xe46,
+/*20190821 to latest
+판매 종료시간
+*/
+ MSG_ID_E47 = 0xe47,
+/*20190821 to latest
+계정 한정
+*/
+ MSG_ID_E48 = 0xe48,
+/*20190821 to latest
+판매기간 : %d월 %d일 %d시 %d분
+*/
+ MSG_ID_E49 = 0xe49,
+/*20190821 to latest
+구입가능 %d개
+*/
+ MSG_ID_E4A = 0xe4a,
+/*20190821 to latest
+%d개 한정
+*/
+ MSG_ID_E4B = 0xe4b,
+/*20190821 to latest
+>> ItemName : %s / 수량 : %d / 판매기간 : %d월:%d일:%d시:%d분 ~ %d월:%d일:%d시:%d분
+*/
+ MSG_ID_E4C = 0xe4c,
+/*20190821 to latest
+Sold Out
+*/
+ MSG_ID_E4D = 0xe4d,
+/*20190821 to latest
+[%s]은(는) 현재 소환할 수 없는 지역에 있습니다.
+*/
+ MSG_ID_E4E = 0xe4e,
+/*20190821 to latest
+~ %d월 %d일 %d시 %d분
+*/
+ MSG_ID_E4F = 0xe4f,
+/*20190821 to latest
+상품을 더이상 추가할 수 없습니다
+*/
+ MSG_ID_E50 = 0xe50,
+#endif
};
#endif /* MAP_MESSAGES_MAIN_H */
diff --git a/src/map/messages_re.h b/src/map/messages_re.h
index 6a20844e4..efebecdb2 100644
--- a/src/map/messages_re.h
+++ b/src/map/messages_re.h
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20190717
+Latest version: 20190821
*/
enum clif_messages {
@@ -21262,6 +21262,98 @@ AP가 부족합니다.
*/
MSG_ID_E3B = 0xe3b,
#endif
+#if PACKETVER >= 20190731
+/*20190731 to latest
+제련도가 높아서 조합할 수 없습니다.
+*/
+ MSG_ID_E3C = 0xe3c,
+/*20190731 to latest
+제련도가 조합에 필요한 요구치보다 높습니다.
+*/
+ MSG_ID_E3D = 0xe3d,
+/*20190731 to latest
+'카드가 끼워져있거나 인챈트 되어 있습니다.
+*/
+ MSG_ID_E3E = 0xe3e,
+/*20190731 to latest
+∞
+*/
+ MSG_ID_E3F = 0xe3f,
+/*20190731 to latest
+Z
+*/
+ MSG_ID_E40 = 0xe40,
+/*20190731 to latest
+Total : %s Zeny
+*/
+ MSG_ID_E41 = 0xe41,
+#endif
+#if PACKETVER >= 20190821
+/*20190821 to latest
+계정한정판매 등록창
+*/
+ MSG_ID_E42 = 0xe42,
+/*20190821 to latest
+아이템 DB명
+Item DB Name
+*/
+ MSG_ID_E43 = 0xe43,
+/*20190821 to latest
+아이템 DB번호
+Item DB Number
+*/
+ MSG_ID_E44 = 0xe44,
+/*20190821 to latest
+판매 갯수
+Number of Sale
+*/
+ MSG_ID_E45 = 0xe45,
+/*20190821 to latest
+판매 시작시간
+Sale Start Time
+*/
+ MSG_ID_E46 = 0xe46,
+/*20190821 to latest
+판매 종료시간
+*/
+ MSG_ID_E47 = 0xe47,
+/*20190821 to latest
+계정 한정
+*/
+ MSG_ID_E48 = 0xe48,
+/*20190821 to latest
+판매기간 : %d월 %d일 %d시 %d분
+*/
+ MSG_ID_E49 = 0xe49,
+/*20190821 to latest
+구입가능 %d개
+*/
+ MSG_ID_E4A = 0xe4a,
+/*20190821 to latest
+%d개 한정
+*/
+ MSG_ID_E4B = 0xe4b,
+/*20190821 to latest
+>> ItemName : %s / 수량 : %d / 판매기간 : %d월:%d일:%d시:%d분 ~ %d월:%d일:%d시:%d분
+*/
+ MSG_ID_E4C = 0xe4c,
+/*20190821 to latest
+Sold Out
+*/
+ MSG_ID_E4D = 0xe4d,
+/*20190821 to latest
+[%s]은(는) 현재 소환할 수 없는 지역에 있습니다.
+*/
+ MSG_ID_E4E = 0xe4e,
+/*20190821 to latest
+~ %d월 %d일 %d시 %d분
+*/
+ MSG_ID_E4F = 0xe4f,
+/*20190821 to latest
+상품을 더이상 추가할 수 없습니다
+*/
+ MSG_ID_E50 = 0xe50,
+#endif
};
#endif /* MAP_MESSAGES_RE_H */
diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h
index b9ddb229c..344dbb29e 100644
--- a/src/map/messages_zero.h
+++ b/src/map/messages_zero.h
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20190724
+Latest version: 20190814
*/
enum clif_messages {
@@ -17877,6 +17877,76 @@ AP가 부족합니다.
*/
MSG_ID_E3E = 0xe3e,
#endif
+#if PACKETVER >= 20190814
+/*20190814 to latest
+∞
+*/
+ MSG_ID_E3F = 0xe3f,
+/*20190814 to latest
+Z
+*/
+ MSG_ID_E40 = 0xe40,
+/*20190814 to latest
+Total : %s Zeny
+*/
+ MSG_ID_E41 = 0xe41,
+/*20190814 to latest
+계정한정판매 등록창
+*/
+ MSG_ID_E42 = 0xe42,
+/*20190814 to latest
+아이템 DB명
+Item DB Name
+*/
+ MSG_ID_E43 = 0xe43,
+/*20190814 to latest
+아이템 DB번호
+Item DB Number
+*/
+ MSG_ID_E44 = 0xe44,
+/*20190814 to latest
+판매 갯수
+Number of Sale
+*/
+ MSG_ID_E45 = 0xe45,
+/*20190814 to latest
+판매 시작시간
+Sale Start Time
+*/
+ MSG_ID_E46 = 0xe46,
+/*20190814 to latest
+판매 종료시간
+*/
+ MSG_ID_E47 = 0xe47,
+/*20190814 to latest
+계정 한정
+*/
+ MSG_ID_E48 = 0xe48,
+/*20190814 to latest
+판매기간 : %d월 %d일 ~ %d월 %d일
+*/
+ MSG_ID_E49 = 0xe49,
+/*20190814 to latest
+구입가능 %d개
+*/
+ MSG_ID_E4A = 0xe4a,
+/*20190814 to latest
+%d개 한정
+*/
+ MSG_ID_E4B = 0xe4b,
+/*20190814 to latest
+>> ItemName : %s / 수량 : %d / 판매기간 : %d월:%d일:%d시:%d분 ~ %d월:%d일:%d시:%d분
+*/
+ MSG_ID_E4C = 0xe4c,
+/*20190814 to latest
+Sold Out
+*/
+ MSG_ID_E4D = 0xe4d,
+/*20190814 to latest
+[%s]은(는) 현재 소환할 수 없는 지역에 있습니다.
+*/
+ MSG_ID_E4E = 0xe4e,
+#endif
};
#endif /* MAP_MESSAGES_ZERO_H */
diff --git a/src/map/mob.c b/src/map/mob.c
index 283bec25a..bad3f7eb8 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -4959,7 +4959,7 @@ static int mob_read_libconfig(const char *filename, bool ignore_missing)
}
}
libconfig->destroy(&mob_db_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath);
return count;
}
@@ -5082,7 +5082,7 @@ static int mob_read_randommonster(void)
summon[i].qty = 1;
}
fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%u"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",count,mobfile[i]);
+ ShowStatus("Done reading '"CL_WHITE"%u"CL_RESET"' entries in '"CL_WHITE"%s/%s"CL_RESET"'.\n",count, map->db_path, mobfile[i]);
}
return 0;
}
@@ -5199,7 +5199,7 @@ static void mob_readchatdb(void)
count++;
}
fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%"PRIu32""CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, arc);
+ ShowStatus("Done reading '"CL_WHITE"%"PRIu32""CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath);
}
/*==========================================
diff --git a/src/map/npc.c b/src/map/npc.c
index 84d292415..1c5c72af9 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2115,7 +2115,7 @@ static int npc_buylist(struct map_session_data *sd, struct itemlist *item_list)
/**
* Processes incoming npc market purchase list
**/
-static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list)
+static enum market_buy_result npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list)
{
struct npc_data* nd;
struct npc_item_list *shop = NULL;
@@ -2129,7 +2129,7 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
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_MARKET)
- return 1;
+ return MARKET_BUY_RESULT_ERROR;
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
@@ -2149,18 +2149,18 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
entry->id == itemdb_viewid(shop[j].nameid) //item_avail replacement
);
if (j == shop_size) /* TODO find official response for this */
- return 1; // no such item in shop
+ return MARKET_BUY_RESULT_ERROR; // no such item in shop
entry->id = shop[j].nameid; //item_avail replacement
if (entry->amount > (int)shop[j].qty)
- return 1;
+ return MARKET_BUY_RESULT_AMOUNT_TOO_BIG;
value = shop[j].value;
npc_market_qty[i] = j;
if (!itemdb->exists(entry->id)) /* TODO find official response for this */
- return 1; // item no longer in itemdb
+ return MARKET_BUY_RESULT_ERROR; // item no longer in itemdb
if (!itemdb->isstackable(entry->id) && entry->amount > 1) {
//Exploit? You can't buy more than 1 of equipment types o.O
@@ -2187,13 +2187,13 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
}
if (z > sd->status.zeny) /* TODO find official response for this */
- return 1; // Not enough Zeny
+ return MARKET_BUY_RESULT_NO_ZENY; // Not enough Zeny
if( w + sd->weight > sd->max_weight ) /* TODO find official response for this */
- return 1; // Too heavy
+ return MARKET_BUY_RESULT_OVER_WEIGHT; // Too heavy
if( pc->inventoryblank(sd) < new_ ) /* TODO find official response for this */
- return 1; // Not enough space to store items
+ return MARKET_BUY_RESULT_OUT_OF_SPACE; // Not enough space to store items
pc->payzeny(sd,(int)z,LOG_TYPE_NPC, NULL);
@@ -2203,7 +2203,7 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
j = npc_market_qty[i];
if (entry->amount > (int)shop[j].qty) /* wohoo someone tampered with the packet. */
- return 1;
+ return MARKET_BUY_RESULT_AMOUNT_TOO_BIG;
shop[j].qty -= entry->amount;
@@ -2224,7 +2224,7 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
if (nd->master_nd != NULL) // TMW2 Script-based shops.
return npc->buylist_sub(sd, item_list, nd->master_nd);
- return 0;
+ return MARKET_BUY_RESULT_SUCCESS;
}
/**
diff --git a/src/map/npc.h b/src/map/npc.h
index 2819cbd87..5ff63532d 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -34,6 +34,8 @@ struct hplugin_data_store;
struct itemlist; // map/itemdb.h
struct view_data;
+enum market_buy_result;
+
enum npc_parse_options {
NPO_NONE = 0x0,
NPO_ONINIT = 0x1,
@@ -149,7 +151,7 @@ enum actor_classes {
#define MAX_NPC_CLASS 1000
// New NPC range
#define MAX_NPC_CLASS2_START 10001
-#define MAX_NPC_CLASS2_END 10310
+#define MAX_NPC_CLASS2_END 10344
//Script NPC events.
enum npce_event {
@@ -310,7 +312,7 @@ struct npc_interface {
void (*trader_count_funds) (struct npc_data *nd, struct map_session_data *sd);
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);
+ enum market_buy_result (*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);
diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h
index 601c7dc86..565835cd7 100644
--- a/src/map/packets_keys_main.h
+++ b/src/map/packets_keys_main.h
@@ -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, 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, 2019-06-05JRagexeRE, 2019-06-05KRagexe, 2019-06-05LRagexeRE, 2019-06-05fRagexe, 2019-06-05hRagexeRE, 2019-06-19bRagexe, 2019-06-19cRagexeRE, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-06-26bRagexeRE, 2019-07-03aRagexe, 2019-07-03bRagexeRE, 2019-07-17aRagexe, 2019-07-17cRagexeRE, 2019-07-17dRagexe, 2019-07-17dRagexeRE, 2019-07-24aRagexe, 2019-07-24bRagexeRE
+// 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, 2019-06-05JRagexeRE, 2019-06-05KRagexe, 2019-06-05LRagexeRE, 2019-06-05fRagexe, 2019-06-05hRagexeRE, 2019-06-19bRagexe, 2019-06-19cRagexeRE, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-06-26bRagexeRE, 2019-07-03aRagexe, 2019-07-03bRagexeRE, 2019-07-17aRagexe, 2019-07-17cRagexeRE, 2019-07-17dRagexe, 2019-07-17dRagexeRE, 2019-07-24aRagexe, 2019-07-24bRagexeRE, 2019-07-31bRagexe, 2019-07-31bRagexeRE, 2019-08-02aRagexe, 2019-08-02aRagexeRE, 2019-08-07aRagexe, 2019-08-07dRagexeRE, 2019-08-21aRagexe, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE
#if PACKETVER == 20101123 || \
PACKETVER == 20101124 || \
PACKETVER == 20101125 || \
@@ -158,7 +158,11 @@
PACKETVER == 20190626 || \
PACKETVER == 20190703 || \
PACKETVER == 20190717 || \
- PACKETVER >= 20190724
+ PACKETVER == 20190724 || \
+ PACKETVER == 20190731 || \
+ PACKETVER == 20190802 || \
+ PACKETVER == 20190807 || \
+ PACKETVER >= 20190821
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h
index 8eea0214c..0e70ef641 100644
--- a/src/map/packets_keys_zero.h
+++ b/src/map/packets_keys_zero.h
@@ -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, 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, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_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, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero, 2019-08-14_3aRagexe_zero
#if PACKETVER == 20171018 || \
PACKETVER == 20171019 || \
PACKETVER == 20171023 || \
@@ -90,7 +90,8 @@
PACKETVER == 20190709 || \
PACKETVER == 20190710 || \
PACKETVER == 20190717 || \
- PACKETVER >= 20190724
+ PACKETVER == 20190724 || \
+ PACKETVER >= 20190814
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h
index 1fef4cd25..082c940c9 100644
--- a/src/map/packets_shuffle_main.h
+++ b/src/map/packets_shuffle_main.h
@@ -9727,7 +9727,7 @@
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, 2019-06-05fRagexe, 2019-06-05KRagexe, 2019-06-19bRagexe, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-07-03aRagexe, 2019-07-17aRagexe, 2019-07-17dRagexe, 2019-07-24aRagexe
+// 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, 2019-06-05fRagexe, 2019-06-05KRagexe, 2019-06-19bRagexe, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-07-03aRagexe, 2019-07-17aRagexe, 2019-07-17dRagexe, 2019-07-24aRagexe, 2019-07-31bRagexe, 2019-08-02aRagexe, 2019-08-07aRagexe, 2019-08-21aRagexe
#if PACKETVER == 20181121 || \
PACKETVER == 20181128 || \
PACKETVER == 20181205 || \
@@ -9757,7 +9757,11 @@
PACKETVER == 20190619 || \
PACKETVER == 20190703 || \
PACKETVER == 20190717 || \
- PACKETVER >= 20190724
+ PACKETVER == 20190724 || \
+ PACKETVER == 20190731 || \
+ PACKETVER == 20190802 || \
+ PACKETVER == 20190807 || \
+ PACKETVER >= 20190821
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_re.h b/src/map/packets_shuffle_re.h
index ce789b837..044788301 100644
--- a/src/map/packets_shuffle_re.h
+++ b/src/map/packets_shuffle_re.h
@@ -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-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, 2019-06-05hRagexeRE, 2019-06-05JRagexeRE, 2019-06-05LRagexeRE, 2019-06-19cRagexeRE, 2019-06-26bRagexeRE, 2019-07-03bRagexeRE, 2019-07-17cRagexeRE, 2019-07-17dRagexeRE, 2019-07-24bRagexeRE
+// 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, 2019-06-05hRagexeRE, 2019-06-05JRagexeRE, 2019-06-05LRagexeRE, 2019-06-19cRagexeRE, 2019-06-26bRagexeRE, 2019-07-03bRagexeRE, 2019-07-17cRagexeRE, 2019-07-17dRagexeRE, 2019-07-24bRagexeRE, 2019-07-31bRagexeRE, 2019-08-02aRagexeRE, 2019-08-07dRagexeRE, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE
#if PACKETVER == 20180704 || \
PACKETVER == 20180711 || \
PACKETVER == 20180718 || \
@@ -9707,7 +9707,11 @@
PACKETVER == 20190626 || \
PACKETVER == 20190703 || \
PACKETVER == 20190717 || \
- PACKETVER >= 20190724
+ PACKETVER == 20190724 || \
+ PACKETVER == 20190731 || \
+ PACKETVER == 20190802 || \
+ PACKETVER == 20190807 || \
+ PACKETVER >= 20190821
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 6e42253fe..109dadaba 100644
--- a/src/map/packets_shuffle_zero.h
+++ b/src/map/packets_shuffle_zero.h
@@ -742,7 +742,7 @@
packet(0x0968,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
#endif
-// 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, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_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, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero, 2019-08-14_3aRagexe_zero
#if PACKETVER == 20181114 || \
PACKETVER == 20181120 || \
PACKETVER == 20181128 || \
@@ -770,7 +770,8 @@
PACKETVER == 20190709 || \
PACKETVER == 20190710 || \
PACKETVER == 20190717 || \
- PACKETVER >= 20190724
+ PACKETVER == 20190724 || \
+ PACKETVER >= 20190814
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 59f148c94..d12dc14d4 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -300,7 +300,6 @@ enum packet_headers {
notifybindonequip = 0x2d3,
monsterhpType = 0x977,
maptypeproperty2Type = 0x99b,
- npcmarketresultackType = 0x9d7,
#if PACKETVER >= 20131223 // version probably can be 20131030 [4144]
wisendType = 0x9df,
#else
@@ -1362,22 +1361,6 @@ struct packet_npc_market_purchase {
} list[]; // Note: We assume this should be <= MAX_INVENTORY (since you can't hold more than MAX_INVENTORY items thus cant buy that many at once).
} __attribute__((packed));
-struct packet_npc_market_result_ack {
- int16 PacketType;
- int16 PacketLength;
- uint8 result;
- struct {
-#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));
-
#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 {
@@ -2726,13 +2709,10 @@ struct PACKET_ZC_MAKINGITEM_LIST_sub {
struct PACKET_ZC_MAKINGITEM_LIST {
int16 packetType;
int16 packetLength;
-#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
- uint32 makeItem;
-#else
uint16 makeItem;
-#endif
struct PACKET_ZC_MAKINGITEM_LIST_sub items[];
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_MAKINGITEM_LIST, 0x025a);
struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub {
uint32 price;
@@ -3480,7 +3460,7 @@ struct PACKET_ZC_REFINE_STATUS {
DEFINE_PACKET_HEADER(ZC_REFINE_STATUS, 0x0ada);
#endif
-#if PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
+#if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
struct PACKET_ZC_ACK_RANKING_sub {
char name[NAME_LENGTH];
uint32 points;
@@ -3533,6 +3513,103 @@ struct PACKET_ZC_HAT_EFFECT {
DEFINE_PACKET_HEADER(ZC_HAT_EFFECT, 0x0a3b);
#endif
+// [4144] this struct updated not in all packets in client
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+struct SKILLDATA {
+ uint16 id;
+ int inf;
+ uint16 level;
+ uint16 sp;
+ uint16 range2;
+ uint8 upFlag;
+ uint16 level2;
+} __attribute__((packed));
+#else
+struct SKILLDATA {
+ uint16 id;
+ int inf;
+ uint16 level;
+ uint16 sp;
+ uint16 range2;
+ char name[NAME_LENGTH];
+ uint8 upFlag;
+} __attribute__((packed));
+#endif
+
+struct PACKET_ZC_ADD_SKILL {
+ int16 packetType;
+ struct SKILLDATA skill;
+} __attribute__((packed));
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0b31);
+#else
+DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0111);
+#endif
+
+struct PACKET_ZC_SKILLINFO_LIST {
+ int16 packetType;
+ int16 packetLength;
+ struct SKILLDATA skills[];
+} __attribute__((packed));
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x0b32);
+#else
+DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x010f);
+#endif
+
+#if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+struct PACKET_ZC_SKILLINFO_UPDATE2 {
+ int16 packetType;
+ uint16 id;
+ int inf;
+ uint16 level;
+ uint16 sp;
+ uint16 range2;
+ uint8 upFlag;
+ uint16 level2;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x0b33);
+#else
+struct PACKET_ZC_SKILLINFO_UPDATE2 {
+ int16 packetType;
+ uint16 id;
+ int inf;
+ uint16 level;
+ uint16 sp;
+ uint16 range2;
+ uint8 upFlag;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x07e1);
+#endif
+
+struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 ITID;
+#else
+ uint16 ITID;
+#endif
+ uint16 qty;
+ uint32 price;
+} __attribute__((packed));
+
+#if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
+struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
+ int16 PacketType;
+ int16 PacketLength;
+ uint16 result;
+ struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x0b4e);
+#elif PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20130911 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
+ int16 PacketType;
+ int16 PacketLength;
+ uint8 result;
+ struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x09d7);
+#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 dc330d92d..9fbe915f3 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -886,17 +886,20 @@ static int party_send_logout(struct map_session_data *sd)
static int party_send_message(struct map_session_data *sd, const char *mes)
{
- int len;
-
nullpo_ret(sd);
nullpo_ret(mes);
- len = (int)strlen(mes);
-
if (sd->status.party_id == 0)
return 0;
- intif->party_message(sd->status.party_id, sd->status.account_id, mes, len);
- party->recv_message(sd->status.party_id, sd->status.account_id, mes, len);
+
+ struct party_data *p = party->search(sd->status.party_id);
+
+ if (p == NULL)
+ return 0;
+
+ int len = (int)strlen(mes);
+
+ clif->party_message(p, sd->status.account_id, mes, len);
// Chat logging type 'P' / Party Chat
logs->chat(LOG_CHAT_PARTY, sd->status.party_id, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes);
@@ -904,15 +907,6 @@ static int party_send_message(struct map_session_data *sd, const char *mes)
return 0;
}
-static int party_recv_message(int party_id, int account_id, const char *mes, int len)
-{
- struct party_data *p;
- if( (p=party->search(party_id))==NULL)
- return 0;
- clif->party_message(p,account_id,mes,len);
- return 0;
-}
-
static int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv)
{
struct party_data *p;
@@ -1532,7 +1526,6 @@ void party_defaults(void)
party->send_levelup = party_send_levelup;
party->send_logout = party_send_logout;
party->send_message = party_send_message;
- party->recv_message = party_recv_message;
party->skill_check = party_skill_check;
party->send_xy_clear = party_send_xy_clear;
party->exp_share = party_exp_share;
diff --git a/src/map/party.h b/src/map/party.h
index 28e16dff7..1831da414 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -118,7 +118,6 @@ struct party_interface {
void (*send_levelup) (struct map_session_data *sd);
int (*send_logout) (struct map_session_data *sd);
int (*send_message) (struct map_session_data *sd, const char *mes);
- int (*recv_message) (int party_id,int account_id,const char *mes,int len);
int (*skill_check) (struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv);
int (*send_xy_clear) (struct party_data *p);
int (*exp_share) (struct party_data *p,struct block_list *src,unsigned int base_exp,unsigned int job_exp,int zeny);
diff --git a/src/map/pc.c b/src/map/pc.c
index 84d49e1db..24f71f47b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2268,7 +2268,7 @@ static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, int id,
return 1;
}
-static int pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short flag, const char *other_script, unsigned short pos, bool onskill)
+static int pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short flag, const char *other_script, unsigned int pos, bool onskill)
{
int i;
@@ -10990,7 +10990,7 @@ static int map_day_timer(int tid, int64 tick, int id, intptr_t data)
map->night_flag = 0; // 0=day, 1=night [Yor]
map->foreachpc(pc->daynight_timer_sub);
safestrncpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60), sizeof(tmp_soutput)); // The day has arrived!
- intif->broadcast(tmp_soutput, (int)strlen(tmp_soutput) + 1, BC_DEFAULT);
+ clif->broadcast(NULL, tmp_soutput, (int)strlen(tmp_soutput) + 1, BC_DEFAULT, ALL_CLIENT);
return 0;
}
@@ -11011,7 +11011,7 @@ static int map_night_timer(int tid, int64 tick, int id, intptr_t data)
map->night_flag = 1; // 0=day, 1=night [Yor]
map->foreachpc(pc->daynight_timer_sub);
safestrncpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59), sizeof(tmp_soutput)); // The night has fallen...
- intif->broadcast(tmp_soutput, (int)strlen(tmp_soutput) + 1, BC_DEFAULT);
+ clif->broadcast(NULL, tmp_soutput, (int)strlen(tmp_soutput) + 1, BC_DEFAULT, ALL_CLIENT);
return 0;
}
@@ -12311,6 +12311,54 @@ static void pc_check_supernovice_call(struct map_session_data *sd, const char *m
}
}
+/**
+ * Sends a message t all online GMs having the specified permission.
+ *
+ * @param sender_name Sender character name.
+ * @param permission The required permission to receive this message.
+ * @param message The message body.
+ *
+ * @return The amount of characters the message was delivered to.
+ */
+// The transmission of GM only Wisp/Page from server to inter-server
+static int pc_wis_message_to_gm(const char *sender_name, int permission, const char *message)
+{
+ nullpo_ret(sender_name);
+ nullpo_ret(message);
+ int mes_len = (int)strlen(message) + 1; // + null
+ int count = 0;
+
+ // information is sent to all online GM
+ map->foreachpc(pc->wis_message_to_gm_sub, permission, sender_name, message, mes_len, &count);
+
+ return count;
+}
+
+/**
+ * Helper function for pc_wis_message_to_gm().
+ */
+static int pc_wis_message_to_gm_sub(struct map_session_data *sd, va_list va)
+{
+ nullpo_ret(sd);
+
+ int permission = va_arg(va, int);
+ if (!pc_has_permission(sd, permission))
+ return 0;
+
+ const char *sender_name = va_arg(va, const char *);
+ const char *message = va_arg(va, const char *);
+ int len = va_arg(va, int);
+ int *count = va_arg(va, int *);
+
+ nullpo_ret(sender_name);
+ nullpo_ret(message);
+ nullpo_ret(count);
+
+ clif->wis_message(sd->fd, sender_name, message, len);
+ ++*count;
+ return 1;
+}
+
static void pc_update_job_and_level(struct map_session_data *sd)
{
nullpo_retv(sd);
@@ -12758,6 +12806,8 @@ void pc_defaults(void)
pc->check_supernovice_call = pc_check_supernovice_call;
pc->process_chat_message = pc_process_chat_message;
+ pc->wis_message_to_gm = pc_wis_message_to_gm;
+ pc->wis_message_to_gm_sub = pc_wis_message_to_gm_sub;
/**
* Autotrade persistency [Ind/Hercules <3]
diff --git a/src/map/pc.h b/src/map/pc.h
index 7c89f7f32..8df02a891 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -675,6 +675,7 @@ END_ZEROED_BLOCK;
#define pc_iscloaking(sd) ( !((sd)->sc.option&OPTION_CHASEWALK) && ((sd)->sc.option&OPTION_CLOAK) )
#define pc_ischasewalk(sd) ( (sd)->sc.option&OPTION_CHASEWALK )
#define pc_ismuted(sc,type) ( (sc)->data[SC_NOCHAT] && (sc)->data[SC_NOCHAT]->val1&(type) )
+#define pc_isvending(sd) ((sd)->state.vending || (sd)->state.prevend || (sd)->state.buyingstore)
#ifdef NEW_CARTS
#define pc_iscarton(sd) ( (sd)->sc.data[SC_PUSH_CART] )
@@ -963,7 +964,7 @@ END_ZEROED_BLOCK; /* End */
int (*updateweightstatus) (struct map_session_data *sd);
- int (*addautobonus) (struct s_autobonus *bonus,char max,const char *bonus_script,short rate,unsigned int dur,short atk_type,const char *o_script,unsigned short pos,bool onskill);
+ int (*addautobonus) (struct s_autobonus *bonus,char max,const char *bonus_script,short rate,unsigned int dur,short atk_type,const char *o_script,unsigned int pos,bool onskill);
int (*exeautobonus) (struct map_session_data* sd,struct s_autobonus *bonus);
int (*endautobonus) (int tid, int64 tick, int id, intptr_t data);
int (*delautobonus) (struct map_session_data* sd,struct s_autobonus *bonus,char max,bool restore);
@@ -1185,6 +1186,8 @@ END_ZEROED_BLOCK; /* End */
int (*have_magnifier) (struct map_session_data *sd);
bool (*process_chat_message) (struct map_session_data *sd, const char *message);
+ int (*wis_message_to_gm) (const char *sender_name, int permission, const char *message);
+ int (*wis_message_to_gm_sub) (struct map_session_data *sd, va_list va);
void (*check_supernovice_call) (struct map_session_data *sd, const char *message);
bool (*check_basicskill) (struct map_session_data *sd, int level);
bool (*isDeathPenaltyJob) (uint16 job);
diff --git a/src/map/pet.c b/src/map/pet.c
index ce26b6cb1..b2b6d96f8 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1321,7 +1321,7 @@ static int pet_read_db_libconfig(const char *filename, bool ignore_missing)
count++;
}
libconfig->destroy(&pet_db_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath);
return count;
}
diff --git a/src/map/quest.c b/src/map/quest.c
index 9540b411d..38ac88eea 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -585,7 +585,7 @@ static int quest_read_db(void)
count++;
}
libconfig->destroy(&quest_db_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath);
return count;
}
diff --git a/src/map/refine.c b/src/map/refine.c
index 4fe6e73c4..29d81c9b8 100644
--- a/src/map/refine.c
+++ b/src/map/refine.c
@@ -624,7 +624,7 @@ static int refine_readdb_refine_libconfig(const char *filename)
}
}
libconfig->destroy(&refine_db_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath);
return count;
}
diff --git a/src/map/script.c b/src/map/script.c
index 3747abd6e..779b22d80 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9536,27 +9536,29 @@ static BUILDIN(getequipisidentify)
}
/*==========================================
- * Get the item refined value at pos
- * return (npc)
- * x : refine amount
- * 0 : false (not refined)
+ * Get the total refine amount of equip at given pos
+ * return total refine amount
*------------------------------------------*/
static BUILDIN(getequiprefinerycnt)
{
- int i = -1,num;
- struct map_session_data *sd;
+ int total_refine = 0;
+ struct map_session_data* sd = script->rid2sd(st);
- num = script_getnum(st,2);
- sd = script->rid2sd(st);
- if( sd == NULL )
- return true;
+ if (sd != NULL)
+ {
+ int count = script_lastdata(st);
+ int script_equip_size = ARRAYLENGTH(script->equip);
+ for (int n = 2; n <= count; n++) {
+ int i = -1;
+ int num = script_getnum(st, n);
+ if (num > 0 && num <= script_equip_size)
+ i = pc->checkequip(sd, script->equip[num - 1]);
- if (num > 0 && num <= ARRAYLENGTH(script->equip))
- i=pc->checkequip(sd,script->equip[num-1]);
- if(i >= 0)
- script_pushint(st,sd->status.inventory[i].refine);
- else
- script_pushint(st,0);
+ if (i >= 0)
+ total_refine += sd->status.inventory[i].refine;
+ }
+ }
+ script_pushint(st, total_refine);
return true;
}
@@ -11912,12 +11914,12 @@ static BUILDIN(announce)
int fontAlign = script_hasdata(st,7) ? script_getnum(st,7) : 0; // default fontAlign
int fontY = script_hasdata(st,8) ? script_getnum(st,8) : 0; // default fontY
size_t len = strlen(mes);
+ send_target target = ALL_CLIENT;
+ struct block_list *bl = NULL;
Assert_retr(false, len < INT_MAX);
if( flag&(BC_TARGET_MASK|BC_SOURCE_MASK) ) {
// Broadcast source or broadcast region defined
- send_target target;
- struct block_list *bl = NULL;
if (flag&BC_NPC) {
// If bc_npc flag is set, use NPC as broadcast source
bl = map->id2bl(st->oid);
@@ -11935,17 +11937,13 @@ static BUILDIN(announce)
case BC_SELF: target = SELF; break;
default: target = ALL_CLIENT; break; // BC_ALL
}
-
- if (fontColor)
- clif->broadcast2(bl, mes, (int)len+1, (unsigned int)strtoul(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, target);
- else
- clif->broadcast(bl, mes, (int)len+1, flag&BC_COLOR_MASK, target);
- } else {
- if (fontColor)
- intif->broadcast2(mes, (int)len+1, (unsigned int)strtoul(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY);
- else
- intif->broadcast(mes, (int)len+1, flag&BC_COLOR_MASK);
}
+
+ if (fontColor)
+ clif->broadcast2(bl, mes, (int)len+1, (unsigned int)strtoul(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, target);
+ else
+ clif->broadcast(bl, mes, (int)len+1, flag&BC_COLOR_MASK, target);
+
return true;
}
/*==========================================
@@ -14586,6 +14584,82 @@ static BUILDIN(getiteminfo)
case ITEMINFO_TRADE:
script_pushint(st, it->flag.trade_restriction);
break;
+ case ITEMINFO_ELV_MAX:
+ script_pushint(st, it->elvmax);
+ break;
+ case ITEMINFO_DROPEFFECT_MODE:
+ script_pushint(st, it->dropeffectmode);
+ break;
+ case ITEMINFO_DELAY:
+ script_pushint(st, it->delay);
+ break;
+ case ITEMINFO_CLASS_BASE_1:
+ script_pushint(st, it->class_base[0]);
+ break;
+ case ITEMINFO_CLASS_BASE_2:
+ script_pushint(st, it->class_base[1]);
+ break;
+ case ITEMINFO_CLASS_BASE_3:
+ script_pushint(st, it->class_base[2]);
+ break;
+ case ITEMINFO_CLASS_UPPER:
+ script_pushint(st, it->class_upper);
+ break;
+ case ITEMINFO_FLAG_NO_REFINE:
+ script_pushint(st, it->flag.no_refine);
+ break;
+ case ITEMINFO_FLAG_DELAY_CONSUME:
+ script_pushint(st, it->flag.delay_consume);
+ break;
+ case ITEMINFO_FLAG_AUTOEQUIP:
+ script_pushint(st, it->flag.autoequip);
+ break;
+ case ITEMINFO_FLAG_AUTO_FAVORITE:
+ script_pushint(st, it->flag.auto_favorite);
+ break;
+ case ITEMINFO_FLAG_BUYINGSTORE:
+ script_pushint(st, it->flag.buyingstore);
+ break;
+ case ITEMINFO_FLAG_BINDONEQUIP:
+ script_pushint(st, it->flag.bindonequip);
+ break;
+ case ITEMINFO_FLAG_KEEPAFTERUSE:
+ script_pushint(st, it->flag.keepafteruse);
+ break;
+ case ITEMINFO_FLAG_FORCE_SERIAL:
+ script_pushint(st, it->flag.force_serial);
+ break;
+ case ITEMINFO_FLAG_NO_OPTIONS:
+ script_pushint(st, it->flag.no_options);
+ break;
+ case ITEMINFO_FLAG_DROP_ANNOUNCE:
+ script_pushint(st, it->flag.drop_announce);
+ break;
+ case ITEMINFO_FLAG_SHOWDROPEFFECT:
+ script_pushint(st, it->flag.showdropeffect);
+ break;
+ case ITEMINFO_STACK_AMOUNT:
+ script_pushint(st, it->stack.amount);
+ break;
+ case ITEMINFO_STACK_FLAG:
+ {
+ int stack_flag = 0;
+ if (it->stack.inventory != 0) stack_flag |= 1;
+ if (it->stack.cart != 0) stack_flag |= 2;
+ if (it->stack.storage != 0) stack_flag |= 4;
+ if (it->stack.guildstorage != 0) stack_flag |= 8;
+ script_pushint(st, stack_flag);
+ }
+ break;
+ case ITEMINFO_ITEM_USAGE_FLAG:
+ script_pushint(st, it->item_usage.flag);
+ break;
+ case ITEMINFO_ITEM_USAGE_OVERRIDE:
+ script_pushint(st, it->item_usage.override);
+ break;
+ case ITEMINFO_GM_LV_TRADE_OVERRIDE:
+ script_pushint(st, it->gm_lv_trade_override);
+ break;
default:
ShowError("buildin_getiteminfo: Invalid item type %d.\n", n);
script_pushint(st,-1);
@@ -14855,6 +14929,78 @@ static BUILDIN(setiteminfo)
case ITEMINFO_TRADE:
it->flag.trade_restriction = value;
break;
+ case ITEMINFO_ELV_MAX:
+ it->elvmax = cap_value(value, 0, MAX_LEVEL);
+ break;
+ case ITEMINFO_DROPEFFECT_MODE:
+ it->dropeffectmode = value;
+ break;
+ case ITEMINFO_DELAY:
+ it->delay = value;
+ break;
+ case ITEMINFO_CLASS_BASE_1:
+ it->class_base[0] = value;
+ break;
+ case ITEMINFO_CLASS_BASE_2:
+ it->class_base[1] = value;
+ break;
+ case ITEMINFO_CLASS_BASE_3:
+ it->class_base[2] = value;
+ break;
+ case ITEMINFO_CLASS_UPPER:
+ it->class_upper = value;
+ break;
+ case ITEMINFO_FLAG_NO_REFINE:
+ it->flag.no_refine = cap_value(value, 0, MAX_REFINE);
+ break;
+ case ITEMINFO_FLAG_DELAY_CONSUME:
+ it->flag.delay_consume = value;
+ break;
+ case ITEMINFO_FLAG_AUTOEQUIP:
+ it->flag.autoequip = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_AUTO_FAVORITE:
+ it->flag.auto_favorite = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_BUYINGSTORE:
+ it->flag.buyingstore = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_BINDONEQUIP:
+ it->flag.bindonequip = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_KEEPAFTERUSE:
+ it->flag.keepafteruse = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_FORCE_SERIAL:
+ it->flag.force_serial = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_NO_OPTIONS:
+ it->flag.no_options = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_DROP_ANNOUNCE:
+ it->flag.drop_announce = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_FLAG_SHOWDROPEFFECT:
+ it->flag.showdropeffect = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_STACK_AMOUNT:
+ it->stack.amount = cap_value(value, 0, USHRT_MAX);
+ break;
+ case ITEMINFO_STACK_FLAG:
+ it->stack.inventory = ((value & 1) != 0);
+ it->stack.cart = ((value & 2) != 0);
+ it->stack.storage = ((value & 4) != 0);
+ it->stack.guildstorage = ((value & 8) != 0);
+ break;
+ case ITEMINFO_ITEM_USAGE_FLAG:
+ it->item_usage.flag = cap_value(value, 0, 1);
+ break;
+ case ITEMINFO_ITEM_USAGE_OVERRIDE:
+ it->item_usage.override = value;
+ break;
+ case ITEMINFO_GM_LV_TRADE_OVERRIDE:
+ it->gm_lv_trade_override = value;
+ break;
default:
ShowError("buildin_setiteminfo: invalid type %d.\n", n);
script_pushint(st,-1);
@@ -25839,7 +25985,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(getequipisequiped,"i"),
BUILDIN_DEF(getequipisenableref,"i"),
BUILDIN_DEF(getequipisidentify,"i"),
- BUILDIN_DEF(getequiprefinerycnt,"i"),
+ BUILDIN_DEF(getequiprefinerycnt,"i*"),
BUILDIN_DEF(getequipweaponlv,"i"),
BUILDIN_DEF(getequippercentrefinery,"i?"),
BUILDIN_DEF(successrefitem,"i?"),
@@ -26694,6 +26840,29 @@ static void script_hardcoded_constants(void)
script->set_constant("ITEMINFO_MATK", ITEMINFO_MATK, false, false);
script->set_constant("ITEMINFO_VIEWSPRITE", ITEMINFO_VIEWSPRITE, false, false);
script->set_constant("ITEMINFO_TRADE", ITEMINFO_TRADE, false, false);
+ script->set_constant("ITEMINFO_ELV_MAX", ITEMINFO_ELV_MAX, false, false);
+ script->set_constant("ITEMINFO_DROPEFFECT_MODE", ITEMINFO_DROPEFFECT_MODE, false, false);
+ script->set_constant("ITEMINFO_DELAY", ITEMINFO_DELAY, false, false);
+ script->set_constant("ITEMINFO_CLASS_BASE_1", ITEMINFO_CLASS_BASE_1, false, false);
+ script->set_constant("ITEMINFO_CLASS_BASE_2", ITEMINFO_CLASS_BASE_2, false, false);
+ script->set_constant("ITEMINFO_CLASS_BASE_3", ITEMINFO_CLASS_BASE_3, false, false);
+ script->set_constant("ITEMINFO_CLASS_UPPER", ITEMINFO_CLASS_UPPER, false, false);
+ script->set_constant("ITEMINFO_FLAG_NO_REFINE", ITEMINFO_FLAG_NO_REFINE, false, false);
+ script->set_constant("ITEMINFO_FLAG_DELAY_CONSUME", ITEMINFO_FLAG_DELAY_CONSUME, false, false);
+ script->set_constant("ITEMINFO_FLAG_AUTOEQUIP", ITEMINFO_FLAG_AUTOEQUIP, false, false);
+ script->set_constant("ITEMINFO_FLAG_AUTO_FAVORITE", ITEMINFO_FLAG_AUTO_FAVORITE, false, false);
+ script->set_constant("ITEMINFO_FLAG_BUYINGSTORE", ITEMINFO_FLAG_BUYINGSTORE, false, false);
+ script->set_constant("ITEMINFO_FLAG_BINDONEQUIP", ITEMINFO_FLAG_BINDONEQUIP, false, false);
+ script->set_constant("ITEMINFO_FLAG_KEEPAFTERUSE", ITEMINFO_FLAG_KEEPAFTERUSE, false, false);
+ script->set_constant("ITEMINFO_FLAG_FORCE_SERIAL", ITEMINFO_FLAG_FORCE_SERIAL, false, false);
+ script->set_constant("ITEMINFO_FLAG_NO_OPTIONS", ITEMINFO_FLAG_NO_OPTIONS, false, false);
+ script->set_constant("ITEMINFO_FLAG_DROP_ANNOUNCE", ITEMINFO_FLAG_DROP_ANNOUNCE, false, false);
+ script->set_constant("ITEMINFO_FLAG_SHOWDROPEFFECT", ITEMINFO_FLAG_SHOWDROPEFFECT, false, false);
+ script->set_constant("ITEMINFO_STACK_AMOUNT", ITEMINFO_STACK_AMOUNT, false, false);
+ script->set_constant("ITEMINFO_STACK_FLAG", ITEMINFO_STACK_FLAG, false, false);
+ script->set_constant("ITEMINFO_ITEM_USAGE_FLAG", ITEMINFO_ITEM_USAGE_FLAG, false, false);
+ script->set_constant("ITEMINFO_ITEM_USAGE_OVERRIDE", ITEMINFO_ITEM_USAGE_OVERRIDE, false, false);
+ script->set_constant("ITEMINFO_GM_LV_TRADE_OVERRIDE", ITEMINFO_GM_LV_TRADE_OVERRIDE, false, false);
script->constdb_comment("getmercinfo options");
script->set_constant("MERCINFO_ID,", MERCINFO_ID, false, false);
diff --git a/src/map/script.h b/src/map/script.h
index 84a8e3b6e..5dc480a15 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -460,7 +460,30 @@ enum script_iteminfo_types {
ITEMINFO_MATK,
ITEMINFO_VIEWSPRITE,
ITEMINFO_TRADE,
-
+ ITEMINFO_ELV_MAX,
+ ITEMINFO_DROPEFFECT_MODE,
+ ITEMINFO_DELAY,
+ ITEMINFO_CLASS_BASE_1,
+ ITEMINFO_CLASS_BASE_2,
+ ITEMINFO_CLASS_BASE_3,
+ ITEMINFO_CLASS_UPPER,
+ // ITEMINFO_FLAG_AVAILABLE,
+ ITEMINFO_FLAG_NO_REFINE,
+ ITEMINFO_FLAG_DELAY_CONSUME,
+ ITEMINFO_FLAG_AUTOEQUIP,
+ ITEMINFO_FLAG_AUTO_FAVORITE,
+ ITEMINFO_FLAG_BUYINGSTORE,
+ ITEMINFO_FLAG_BINDONEQUIP,
+ ITEMINFO_FLAG_KEEPAFTERUSE,
+ ITEMINFO_FLAG_FORCE_SERIAL,
+ ITEMINFO_FLAG_NO_OPTIONS,
+ ITEMINFO_FLAG_DROP_ANNOUNCE,
+ ITEMINFO_FLAG_SHOWDROPEFFECT,
+ ITEMINFO_STACK_AMOUNT,
+ ITEMINFO_STACK_FLAG,
+ ITEMINFO_ITEM_USAGE_FLAG,
+ ITEMINFO_ITEM_USAGE_OVERRIDE,
+ ITEMINFO_GM_LV_TRADE_OVERRIDE,
ITEMINFO_MAX
};
diff --git a/src/map/status.c b/src/map/status.c
index 9a235e5e3..dedfff49e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8859,7 +8859,9 @@ static int status_change_start(struct block_list *src, struct block_list *bl, en
case SC_KAIZEL:
val2 = 10*val1; //% of life to be revived with
break;
- // case SC_ARMORPROPERTY:
+ case SC_ARMORPROPERTY:
+ clif->status_change(bl, (val1 > 0 ? SI_RESIST_PROPERTY_WATER : (val2 > 0 ? SI_RESIST_PROPERTY_GROUND : (val3 > 0 ? SI_RESIST_PROPERTY_FIRE : (val4 > 0 ? SI_RESIST_PROPERTY_WIND : SI_BLANK)))), 1, tick, 0, 0, 0);
+ break;
// case SC_ARMOR_RESIST:
// Mod your resistance against elements:
// val1 = water | val2 = earth | val3 = fire | val4 = wind
diff --git a/src/map/status.h b/src/map/status.h
index 853a7a1a6..dc7629dea 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1772,10 +1772,10 @@ enum si_type {
//SI_ATTACK_PROPERTY_TELEKINESIS = 905,
//SI_ATTACK_PROPERTY_UNDEAD = 906,
//SI_RESIST_PROPERTY_NOTHING = 907,
- //SI_RESIST_PROPERTY_WATER = 908,
- //SI_RESIST_PROPERTY_GROUND = 909,
- //SI_RESIST_PROPERTY_FIRE = 910,
- //SI_RESIST_PROPERTY_WIND = 911,
+ SI_RESIST_PROPERTY_WATER = 908,
+ SI_RESIST_PROPERTY_GROUND = 909,
+ SI_RESIST_PROPERTY_FIRE = 910,
+ SI_RESIST_PROPERTY_WIND = 911,
//SI_RESIST_PROPERTY_POISON = 912,
//SI_RESIST_PROPERTY_SAINT = 913,
//SI_RESIST_PROPERTY_DARKNESS = 914,
diff --git a/src/map/trade.c b/src/map/trade.c
index cef14ffe6..ff5c04fc3 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -50,6 +50,9 @@ static void trade_traderequest(struct map_session_data *sd, struct map_session_d
{
nullpo_retv(sd);
+ if (sd == target_sd)
+ return;
+
if (map->list[sd->bl.m].flag.notrade) {
clif->message (sd->fd, msg_sd(sd,272)); // You can't trade in this map
return;
@@ -223,9 +226,9 @@ static int impossible_trade_check(struct map_session_data *sd)
if (inventory[index].amount < sd->deal.item[i].amount) {
// if more than the player have -> hack
snprintf(message_to_gm, sizeof(message_to_gm), msg_txt(538), sd->status.name, sd->status.account_id); // Hack on trade: character '%s' (account: %d) try to trade more items that he has.
- intif->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm);
+ pc->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm);
snprintf(message_to_gm, sizeof(message_to_gm), msg_txt(539), inventory[index].amount, inventory[index].nameid, sd->deal.item[i].amount); // This player has %d of a kind of item (id: %d), and try to trade %d of them.
- intif->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm);
+ pc->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm);
// if we block people
if (battle_config.ban_hack_trade < 0) {
chrif->char_ask_name(-1, sd->status.name, CHAR_ASK_NAME_BLOCK, 0, 0, 0, 0, 0, 0);
@@ -242,7 +245,7 @@ static int impossible_trade_check(struct map_session_data *sd)
// message about the ban
safestrncpy(message_to_gm, msg_txt(508), sizeof(message_to_gm)); // This player hasn't been banned (Ban option is disabled).
- intif->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm);
+ pc->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm);
return 1;
}
inventory[index].amount -= sd->deal.item[i].amount; // remove item from inventory
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 24958711e..b218988b6 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1712,6 +1712,8 @@ typedef void (*HPMHOOK_pre_clif_addskill) (struct map_session_data **sd, int *id
typedef void (*HPMHOOK_post_clif_addskill) (struct map_session_data *sd, int id);
typedef void (*HPMHOOK_pre_clif_deleteskill) (struct map_session_data **sd, int *id);
typedef void (*HPMHOOK_post_clif_deleteskill) (struct map_session_data *sd, int id);
+typedef void (*HPMHOOK_pre_clif_playerSkillToPacket) (struct map_session_data **sd, struct SKILLDATA **skillData, int *skillId, int *idx, bool *newSkill);
+typedef void (*HPMHOOK_post_clif_playerSkillToPacket) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill);
typedef void (*HPMHOOK_pre_clif_party_created) (struct map_session_data **sd, int *result);
typedef void (*HPMHOOK_post_clif_party_created) (struct map_session_data *sd, int result);
typedef void (*HPMHOOK_pre_clif_party_member_info) (struct party_data **p, struct map_session_data **sd);
@@ -2050,8 +2052,8 @@ typedef int (*HPMHOOK_pre_clif_delay_damage_sub) (int *tid, int64 *tick, int *id
typedef int (*HPMHOOK_post_clif_delay_damage_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef void (*HPMHOOK_pre_clif_npc_market_open) (struct map_session_data **sd, struct npc_data **nd);
typedef void (*HPMHOOK_post_clif_npc_market_open) (struct map_session_data *sd, struct npc_data *nd);
-typedef void (*HPMHOOK_pre_clif_npc_market_purchase_ack) (struct map_session_data **sd, const struct itemlist **item_list, unsigned char *response);
-typedef void (*HPMHOOK_post_clif_npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response);
+typedef void (*HPMHOOK_pre_clif_npc_market_purchase_ack) (struct map_session_data **sd, const struct itemlist **item_list, enum market_buy_result *response);
+typedef void (*HPMHOOK_post_clif_npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result 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, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID);
@@ -3008,8 +3010,6 @@ typedef int (*HPMHOOK_pre_guild_emblem_changed) (int *len, int *guild_id, int *e
typedef int (*HPMHOOK_post_guild_emblem_changed) (int retVal___, int len, int guild_id, int emblem_id, const char *data);
typedef int (*HPMHOOK_pre_guild_send_message) (struct map_session_data **sd, const char **mes);
typedef int (*HPMHOOK_post_guild_send_message) (int retVal___, struct map_session_data *sd, const char *mes);
-typedef int (*HPMHOOK_pre_guild_recv_message) (int *guild_id, int *account_id, const char **mes, int *len);
-typedef int (*HPMHOOK_post_guild_recv_message) (int retVal___, int guild_id, int account_id, const char *mes, int len);
typedef int (*HPMHOOK_pre_guild_send_dot_remove) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_guild_send_dot_remove) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_guild_skillupack) (int *guild_id, uint16 *skill_id, int *account_id);
@@ -3428,10 +3428,6 @@ typedef int (*HPMHOOK_pre_inter_init_sql) (const char **file);
typedef int (*HPMHOOK_post_inter_init_sql) (int retVal___, const char *file);
typedef int (*HPMHOOK_pre_inter_mapif_init) (int *fd);
typedef int (*HPMHOOK_post_inter_mapif_init) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_inter_check_ttl_wisdata_sub) (union DBKey *key, struct DBData **data, va_list ap);
-typedef int (*HPMHOOK_post_inter_check_ttl_wisdata_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
-typedef int (*HPMHOOK_pre_inter_check_ttl_wisdata) (void);
-typedef int (*HPMHOOK_post_inter_check_ttl_wisdata) (int retVal___);
typedef int (*HPMHOOK_pre_inter_check_length) (int *fd, int *length);
typedef int (*HPMHOOK_post_inter_check_length) (int retVal___, int fd, int length);
typedef int (*HPMHOOK_pre_inter_parse_frommap) (int *fd);
@@ -3448,12 +3444,6 @@ typedef void (*HPMHOOK_pre_inter_accinfo) (int *u_fd, int *aid, int *castergroup
typedef void (*HPMHOOK_post_inter_accinfo) (int u_fd, int aid, int castergroup, const char *query, int map_fd);
typedef void (*HPMHOOK_pre_inter_accinfo2) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char **userid, const char **user_pass, const char **email, const char **last_ip, const char **lastlogin, const char **pin_code, const char **birthdate, int *group_id, int *logincount, int *state);
typedef void (*HPMHOOK_post_inter_accinfo2) (bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state);
-typedef struct WisData* (*HPMHOOK_pre_inter_add_wisdata) (int *fd, const unsigned char **src, const unsigned char **dst, const unsigned char **msg, int *msg_len);
-typedef struct WisData* (*HPMHOOK_post_inter_add_wisdata) (struct WisData* retVal___, int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len);
-typedef struct WisData* (*HPMHOOK_pre_inter_get_wisdata) (int *id);
-typedef struct WisData* (*HPMHOOK_post_inter_get_wisdata) (struct WisData* retVal___, int id);
-typedef void (*HPMHOOK_pre_inter_remove_wisdata) (int *id);
-typedef void (*HPMHOOK_post_inter_remove_wisdata) (int id);
#endif // CHAR_INTER_H
#ifdef CHAR_INT_MAIL_H /* inter_mail */
typedef int (*HPMHOOK_pre_inter_mail_sql_init) (void);
@@ -3626,16 +3616,6 @@ 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, 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);
-typedef int (*HPMHOOK_post_intif_broadcast2) (int retVal___, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY);
-typedef int (*HPMHOOK_pre_intif_main_message) (struct map_session_data **sd, const char **message);
-typedef int (*HPMHOOK_post_intif_main_message) (int retVal___, struct map_session_data *sd, const char *message);
-typedef int (*HPMHOOK_pre_intif_wis_message) (struct map_session_data **sd, const char **nick, const char **mes, int *mes_len);
-typedef int (*HPMHOOK_post_intif_wis_message) (int retVal___, struct map_session_data *sd, const char *nick, const char *mes, int mes_len);
-typedef int (*HPMHOOK_pre_intif_wis_message_to_gm) (char **Wisp_name, int *permission, char **mes);
-typedef int (*HPMHOOK_post_intif_wis_message_to_gm) (int retVal___, char *Wisp_name, int permission, char *mes);
typedef int (*HPMHOOK_pre_intif_saveregistry) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_intif_saveregistry) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_intif_request_registry) (struct map_session_data **sd, int *flag);
@@ -3662,8 +3642,6 @@ typedef int (*HPMHOOK_pre_intif_party_changemap) (struct map_session_data **sd,
typedef int (*HPMHOOK_post_intif_party_changemap) (int retVal___, struct map_session_data *sd, int online);
typedef int (*HPMHOOK_pre_intif_break_party) (int *party_id);
typedef int (*HPMHOOK_post_intif_break_party) (int retVal___, int party_id);
-typedef int (*HPMHOOK_pre_intif_party_message) (int *party_id, int *account_id, const char **mes, int *len);
-typedef int (*HPMHOOK_post_intif_party_message) (int retVal___, int party_id, int account_id, const char *mes, int len);
typedef int (*HPMHOOK_pre_intif_party_leaderchange) (int *party_id, int *account_id, int *char_id);
typedef int (*HPMHOOK_post_intif_party_leaderchange) (int retVal___, int party_id, int account_id, int char_id);
typedef int (*HPMHOOK_pre_intif_guild_create) (const char **name, const struct guild_member **master);
@@ -3678,8 +3656,6 @@ typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *acco
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);
-typedef int (*HPMHOOK_post_intif_guild_message) (int retVal___, int guild_id, int account_id, const char *mes, int len);
typedef int (*HPMHOOK_pre_intif_guild_change_gm) (int *guild_id, const char **name, int *len);
typedef int (*HPMHOOK_post_intif_guild_change_gm) (int retVal___, int guild_id, const char *name, int len);
typedef int (*HPMHOOK_pre_intif_guild_change_basicinfo) (int *guild_id, int *type, const void **data, int *len);
@@ -3786,14 +3762,6 @@ typedef void (*HPMHOOK_pre_intif_achievements_request) (struct map_session_data
typedef void (*HPMHOOK_post_intif_achievements_request) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_intif_achievements_save) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_intif_achievements_save) (struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_intif_pWisMessage) (int *fd);
-typedef void (*HPMHOOK_post_intif_pWisMessage) (int fd);
-typedef void (*HPMHOOK_pre_intif_pWisEnd) (int *fd);
-typedef void (*HPMHOOK_post_intif_pWisEnd) (int fd);
-typedef int (*HPMHOOK_pre_intif_pWisToGM_sub) (struct map_session_data **sd, va_list va);
-typedef int (*HPMHOOK_post_intif_pWisToGM_sub) (int retVal___, struct map_session_data *sd, va_list va);
-typedef void (*HPMHOOK_pre_intif_pWisToGM) (int *fd);
-typedef void (*HPMHOOK_post_intif_pWisToGM) (int fd);
typedef void (*HPMHOOK_pre_intif_pRegisters) (int *fd);
typedef void (*HPMHOOK_post_intif_pRegisters) (int fd);
typedef void (*HPMHOOK_pre_intif_pAccountStorage) (int *fd);
@@ -3822,8 +3790,6 @@ typedef void (*HPMHOOK_pre_intif_pPartyMove) (int *fd);
typedef void (*HPMHOOK_post_intif_pPartyMove) (int fd);
typedef void (*HPMHOOK_pre_intif_pPartyBroken) (int *fd);
typedef void (*HPMHOOK_post_intif_pPartyBroken) (int fd);
-typedef void (*HPMHOOK_pre_intif_pPartyMessage) (int *fd);
-typedef void (*HPMHOOK_post_intif_pPartyMessage) (int fd);
typedef void (*HPMHOOK_pre_intif_pGuildCreated) (int *fd);
typedef void (*HPMHOOK_post_intif_pGuildCreated) (int fd);
typedef void (*HPMHOOK_pre_intif_pGuildInfo) (int *fd);
@@ -3836,8 +3802,6 @@ typedef void (*HPMHOOK_pre_intif_pGuildMemberInfoShort) (int *fd);
typedef void (*HPMHOOK_post_intif_pGuildMemberInfoShort) (int fd);
typedef void (*HPMHOOK_pre_intif_pGuildBroken) (int *fd);
typedef void (*HPMHOOK_post_intif_pGuildBroken) (int fd);
-typedef void (*HPMHOOK_pre_intif_pGuildMessage) (int *fd);
-typedef void (*HPMHOOK_post_intif_pGuildMessage) (int fd);
typedef void (*HPMHOOK_pre_intif_pGuildBasicInfoChanged) (int *fd);
typedef void (*HPMHOOK_post_intif_pGuildBasicInfoChanged) (int fd);
typedef void (*HPMHOOK_pre_intif_pGuildMemberInfoChanged) (int *fd);
@@ -4920,8 +4884,6 @@ typedef int (*HPMHOOK_pre_mapif_guild_memberinfoshort) (struct guild **g, int *i
typedef int (*HPMHOOK_post_mapif_guild_memberinfoshort) (int retVal___, struct guild *g, int idx);
typedef int (*HPMHOOK_pre_mapif_guild_broken) (int *guild_id, int *flag);
typedef int (*HPMHOOK_post_mapif_guild_broken) (int retVal___, int guild_id, int flag);
-typedef int (*HPMHOOK_pre_mapif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len, int *sfd);
-typedef int (*HPMHOOK_post_mapif_guild_message) (int retVal___, int guild_id, int account_id, const char *mes, int len, int sfd);
typedef int (*HPMHOOK_pre_mapif_guild_basicinfochanged) (int *guild_id, int *type, const void **data, int *len);
typedef int (*HPMHOOK_post_mapif_guild_basicinfochanged) (int retVal___, int guild_id, int type, const void *data, int len);
typedef int (*HPMHOOK_pre_mapif_guild_memberinfochanged) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len);
@@ -4952,8 +4914,6 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int
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);
-typedef int (*HPMHOOK_post_mapif_parse_GuildMessage) (int retVal___, int fd, int guild_id, int account_id, const char *mes, int len);
typedef int (*HPMHOOK_pre_mapif_parse_GuildBasicInfoChange) (int *fd, int *guild_id, int *type, const void **data, int *len);
typedef int (*HPMHOOK_post_mapif_parse_GuildBasicInfoChange) (int retVal___, int fd, int guild_id, int type, const void *data, int len);
typedef int (*HPMHOOK_pre_mapif_parse_GuildMemberInfoChange) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len);
@@ -5048,8 +5008,6 @@ typedef int (*HPMHOOK_pre_mapif_party_membermoved) (struct party **p, int *idx);
typedef int (*HPMHOOK_post_mapif_party_membermoved) (int retVal___, struct party *p, int idx);
typedef int (*HPMHOOK_pre_mapif_party_broken) (int *party_id, int *flag);
typedef int (*HPMHOOK_post_mapif_party_broken) (int retVal___, int party_id, int flag);
-typedef int (*HPMHOOK_pre_mapif_party_message) (int *party_id, int *account_id, const char **mes, int *len, int *sfd);
-typedef int (*HPMHOOK_post_mapif_party_message) (int retVal___, int party_id, int account_id, const char *mes, int len, int sfd);
typedef int (*HPMHOOK_pre_mapif_parse_CreateParty) (int *fd, const char **name, int *item, int *item2, const struct party_member **leader);
typedef int (*HPMHOOK_post_mapif_parse_CreateParty) (int retVal___, int fd, const char *name, int item, int item2, const struct party_member *leader);
typedef void (*HPMHOOK_pre_mapif_parse_PartyInfo) (int *fd, int *party_id, int *char_id);
@@ -5064,8 +5022,6 @@ typedef int (*HPMHOOK_pre_mapif_parse_PartyChangeMap) (int *fd, int *party_id, i
typedef int (*HPMHOOK_post_mapif_parse_PartyChangeMap) (int retVal___, int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv);
typedef int (*HPMHOOK_pre_mapif_parse_BreakParty) (int *fd, int *party_id);
typedef int (*HPMHOOK_post_mapif_parse_BreakParty) (int retVal___, int fd, int party_id);
-typedef int (*HPMHOOK_pre_mapif_parse_PartyMessage) (int *fd, int *party_id, int *account_id, const char **mes, int *len);
-typedef int (*HPMHOOK_post_mapif_parse_PartyMessage) (int retVal___, int fd, int party_id, int account_id, const char *mes, int len);
typedef int (*HPMHOOK_pre_mapif_parse_PartyLeaderChange) (int *fd, int *party_id, int *account_id, int *char_id);
typedef int (*HPMHOOK_post_mapif_parse_PartyLeaderChange) (int retVal___, int fd, int party_id, int account_id, int char_id);
typedef int (*HPMHOOK_pre_mapif_pet_created) (int *fd, int *account_id, struct s_pet **p);
@@ -5142,26 +5098,10 @@ typedef void (*HPMHOOK_pre_mapif_parse_ItemBoundRetrieve) (int *fd);
typedef void (*HPMHOOK_post_mapif_parse_ItemBoundRetrieve) (int fd);
typedef void (*HPMHOOK_pre_mapif_parse_accinfo) (int *fd);
typedef void (*HPMHOOK_post_mapif_parse_accinfo) (int fd);
-typedef int (*HPMHOOK_pre_mapif_broadcast) (const unsigned char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd);
-typedef int (*HPMHOOK_post_mapif_broadcast) (int retVal___, const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd);
-typedef int (*HPMHOOK_pre_mapif_wis_message) (struct WisData **wd);
-typedef int (*HPMHOOK_post_mapif_wis_message) (int retVal___, struct WisData *wd);
-typedef void (*HPMHOOK_pre_mapif_wis_response) (int *fd, const unsigned char **src, int *flag);
-typedef void (*HPMHOOK_post_mapif_wis_response) (int fd, const unsigned char *src, int flag);
-typedef int (*HPMHOOK_pre_mapif_wis_end) (struct WisData **wd, int *flag);
-typedef int (*HPMHOOK_post_mapif_wis_end) (int retVal___, struct WisData *wd, int flag);
typedef int (*HPMHOOK_pre_mapif_account_reg_reply) (int *fd, int *account_id, int *char_id, int *type);
typedef int (*HPMHOOK_post_mapif_account_reg_reply) (int retVal___, int fd, int account_id, int char_id, int type);
typedef int (*HPMHOOK_pre_mapif_disconnectplayer) (int *fd, int *account_id, int *char_id, int *reason);
typedef int (*HPMHOOK_post_mapif_disconnectplayer) (int retVal___, int fd, int account_id, int char_id, int reason);
-typedef int (*HPMHOOK_pre_mapif_parse_broadcast) (int *fd);
-typedef int (*HPMHOOK_post_mapif_parse_broadcast) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_mapif_parse_WisRequest) (int *fd);
-typedef int (*HPMHOOK_post_mapif_parse_WisRequest) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_mapif_parse_WisReply) (int *fd);
-typedef int (*HPMHOOK_post_mapif_parse_WisReply) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_mapif_parse_WisToGM) (int *fd);
-typedef int (*HPMHOOK_post_mapif_parse_WisToGM) (int retVal___, int fd);
typedef int (*HPMHOOK_pre_mapif_parse_Registry) (int *fd);
typedef int (*HPMHOOK_post_mapif_parse_Registry) (int retVal___, int fd);
typedef int (*HPMHOOK_pre_mapif_parse_RegistryRequest) (int *fd);
@@ -5782,8 +5722,8 @@ typedef bool (*HPMHOOK_pre_npc_trader_pay) (struct npc_data **nd, struct map_ses
typedef bool (*HPMHOOK_post_npc_trader_pay) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int price, int points);
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 enum market_buy_result (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list);
+typedef enum market_buy_result (*HPMHOOK_post_npc_market_buylist) (enum market_buy_result 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);
@@ -5882,8 +5822,6 @@ typedef int (*HPMHOOK_pre_party_send_logout) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_party_send_logout) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_party_send_message) (struct map_session_data **sd, const char **mes);
typedef int (*HPMHOOK_post_party_send_message) (int retVal___, struct map_session_data *sd, const char *mes);
-typedef int (*HPMHOOK_pre_party_recv_message) (int *party_id, int *account_id, const char **mes, int *len);
-typedef int (*HPMHOOK_post_party_recv_message) (int retVal___, int party_id, int account_id, const char *mes, int len);
typedef int (*HPMHOOK_pre_party_skill_check) (struct map_session_data **sd, int *party_id, uint16 *skill_id, uint16 *skill_lv);
typedef int (*HPMHOOK_post_party_skill_check) (int retVal___, struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv);
typedef int (*HPMHOOK_pre_party_send_xy_clear) (struct party_data **p);
@@ -6074,8 +6012,8 @@ typedef bool (*HPMHOOK_pre_pc_adoption) (struct map_session_data **p1_sd, struct
typedef bool (*HPMHOOK_post_pc_adoption) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
typedef int (*HPMHOOK_pre_pc_updateweightstatus) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_updateweightstatus) (int retVal___, struct map_session_data *sd);
-typedef int (*HPMHOOK_pre_pc_addautobonus) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned short *pos, bool *onskill);
-typedef int (*HPMHOOK_post_pc_addautobonus) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill);
+typedef int (*HPMHOOK_pre_pc_addautobonus) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned int *pos, bool *onskill);
+typedef int (*HPMHOOK_post_pc_addautobonus) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill);
typedef int (*HPMHOOK_pre_pc_exeautobonus) (struct map_session_data **sd, struct s_autobonus **bonus);
typedef int (*HPMHOOK_post_pc_exeautobonus) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus);
typedef int (*HPMHOOK_pre_pc_endautobonus) (int *tid, int64 *tick, int *id, intptr_t *data);
@@ -6436,6 +6374,10 @@ typedef int (*HPMHOOK_pre_pc_have_magnifier) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_have_magnifier) (int retVal___, struct map_session_data *sd);
typedef bool (*HPMHOOK_pre_pc_process_chat_message) (struct map_session_data **sd, const char **message);
typedef bool (*HPMHOOK_post_pc_process_chat_message) (bool retVal___, struct map_session_data *sd, const char *message);
+typedef int (*HPMHOOK_pre_pc_wis_message_to_gm) (const char **sender_name, int *permission, const char **message);
+typedef int (*HPMHOOK_post_pc_wis_message_to_gm) (int retVal___, const char *sender_name, int permission, const char *message);
+typedef int (*HPMHOOK_pre_pc_wis_message_to_gm_sub) (struct map_session_data **sd, va_list va);
+typedef int (*HPMHOOK_post_pc_wis_message_to_gm_sub) (int retVal___, struct map_session_data *sd, va_list va);
typedef void (*HPMHOOK_pre_pc_check_supernovice_call) (struct map_session_data **sd, const char **message);
typedef void (*HPMHOOK_post_pc_check_supernovice_call) (struct map_session_data *sd, const char *message);
typedef bool (*HPMHOOK_pre_pc_check_basicskill) (struct map_session_data **sd, int *level);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 9302a8d19..a5f65654e 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -610,10 +610,6 @@ struct {
struct HPMHookPoint *HP_inter_init_sql_post;
struct HPMHookPoint *HP_inter_mapif_init_pre;
struct HPMHookPoint *HP_inter_mapif_init_post;
- struct HPMHookPoint *HP_inter_check_ttl_wisdata_sub_pre;
- struct HPMHookPoint *HP_inter_check_ttl_wisdata_sub_post;
- struct HPMHookPoint *HP_inter_check_ttl_wisdata_pre;
- struct HPMHookPoint *HP_inter_check_ttl_wisdata_post;
struct HPMHookPoint *HP_inter_check_length_pre;
struct HPMHookPoint *HP_inter_check_length_post;
struct HPMHookPoint *HP_inter_parse_frommap_pre;
@@ -630,12 +626,6 @@ struct {
struct HPMHookPoint *HP_inter_accinfo_post;
struct HPMHookPoint *HP_inter_accinfo2_pre;
struct HPMHookPoint *HP_inter_accinfo2_post;
- struct HPMHookPoint *HP_inter_add_wisdata_pre;
- struct HPMHookPoint *HP_inter_add_wisdata_post;
- struct HPMHookPoint *HP_inter_get_wisdata_pre;
- struct HPMHookPoint *HP_inter_get_wisdata_post;
- struct HPMHookPoint *HP_inter_remove_wisdata_pre;
- struct HPMHookPoint *HP_inter_remove_wisdata_post;
struct HPMHookPoint *HP_inter_mail_sql_init_pre;
struct HPMHookPoint *HP_inter_mail_sql_init_post;
struct HPMHookPoint *HP_inter_mail_sql_final_pre;
@@ -1032,8 +1022,6 @@ struct {
struct HPMHookPoint *HP_mapif_guild_memberinfoshort_post;
struct HPMHookPoint *HP_mapif_guild_broken_pre;
struct HPMHookPoint *HP_mapif_guild_broken_post;
- struct HPMHookPoint *HP_mapif_guild_message_pre;
- struct HPMHookPoint *HP_mapif_guild_message_post;
struct HPMHookPoint *HP_mapif_guild_basicinfochanged_pre;
struct HPMHookPoint *HP_mapif_guild_basicinfochanged_post;
struct HPMHookPoint *HP_mapif_guild_memberinfochanged_pre;
@@ -1064,8 +1052,6 @@ struct {
struct HPMHookPoint *HP_mapif_parse_GuildChangeMemberInfoShort_post;
struct HPMHookPoint *HP_mapif_parse_BreakGuild_pre;
struct HPMHookPoint *HP_mapif_parse_BreakGuild_post;
- struct HPMHookPoint *HP_mapif_parse_GuildMessage_pre;
- struct HPMHookPoint *HP_mapif_parse_GuildMessage_post;
struct HPMHookPoint *HP_mapif_parse_GuildBasicInfoChange_pre;
struct HPMHookPoint *HP_mapif_parse_GuildBasicInfoChange_post;
struct HPMHookPoint *HP_mapif_parse_GuildMemberInfoChange_pre;
@@ -1160,8 +1146,6 @@ struct {
struct HPMHookPoint *HP_mapif_party_membermoved_post;
struct HPMHookPoint *HP_mapif_party_broken_pre;
struct HPMHookPoint *HP_mapif_party_broken_post;
- struct HPMHookPoint *HP_mapif_party_message_pre;
- struct HPMHookPoint *HP_mapif_party_message_post;
struct HPMHookPoint *HP_mapif_parse_CreateParty_pre;
struct HPMHookPoint *HP_mapif_parse_CreateParty_post;
struct HPMHookPoint *HP_mapif_parse_PartyInfo_pre;
@@ -1176,8 +1160,6 @@ struct {
struct HPMHookPoint *HP_mapif_parse_PartyChangeMap_post;
struct HPMHookPoint *HP_mapif_parse_BreakParty_pre;
struct HPMHookPoint *HP_mapif_parse_BreakParty_post;
- struct HPMHookPoint *HP_mapif_parse_PartyMessage_pre;
- struct HPMHookPoint *HP_mapif_parse_PartyMessage_post;
struct HPMHookPoint *HP_mapif_parse_PartyLeaderChange_pre;
struct HPMHookPoint *HP_mapif_parse_PartyLeaderChange_post;
struct HPMHookPoint *HP_mapif_pet_created_pre;
@@ -1254,26 +1236,10 @@ struct {
struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_post;
struct HPMHookPoint *HP_mapif_parse_accinfo_pre;
struct HPMHookPoint *HP_mapif_parse_accinfo_post;
- struct HPMHookPoint *HP_mapif_broadcast_pre;
- struct HPMHookPoint *HP_mapif_broadcast_post;
- struct HPMHookPoint *HP_mapif_wis_message_pre;
- struct HPMHookPoint *HP_mapif_wis_message_post;
- struct HPMHookPoint *HP_mapif_wis_response_pre;
- struct HPMHookPoint *HP_mapif_wis_response_post;
- struct HPMHookPoint *HP_mapif_wis_end_pre;
- struct HPMHookPoint *HP_mapif_wis_end_post;
struct HPMHookPoint *HP_mapif_account_reg_reply_pre;
struct HPMHookPoint *HP_mapif_account_reg_reply_post;
struct HPMHookPoint *HP_mapif_disconnectplayer_pre;
struct HPMHookPoint *HP_mapif_disconnectplayer_post;
- struct HPMHookPoint *HP_mapif_parse_broadcast_pre;
- struct HPMHookPoint *HP_mapif_parse_broadcast_post;
- struct HPMHookPoint *HP_mapif_parse_WisRequest_pre;
- struct HPMHookPoint *HP_mapif_parse_WisRequest_post;
- struct HPMHookPoint *HP_mapif_parse_WisReply_pre;
- struct HPMHookPoint *HP_mapif_parse_WisReply_post;
- struct HPMHookPoint *HP_mapif_parse_WisToGM_pre;
- struct HPMHookPoint *HP_mapif_parse_WisToGM_post;
struct HPMHookPoint *HP_mapif_parse_Registry_pre;
struct HPMHookPoint *HP_mapif_parse_Registry_post;
struct HPMHookPoint *HP_mapif_parse_RegistryRequest_pre;
@@ -2257,10 +2223,6 @@ struct {
int HP_inter_init_sql_post;
int HP_inter_mapif_init_pre;
int HP_inter_mapif_init_post;
- int HP_inter_check_ttl_wisdata_sub_pre;
- int HP_inter_check_ttl_wisdata_sub_post;
- int HP_inter_check_ttl_wisdata_pre;
- int HP_inter_check_ttl_wisdata_post;
int HP_inter_check_length_pre;
int HP_inter_check_length_post;
int HP_inter_parse_frommap_pre;
@@ -2277,12 +2239,6 @@ struct {
int HP_inter_accinfo_post;
int HP_inter_accinfo2_pre;
int HP_inter_accinfo2_post;
- int HP_inter_add_wisdata_pre;
- int HP_inter_add_wisdata_post;
- int HP_inter_get_wisdata_pre;
- int HP_inter_get_wisdata_post;
- int HP_inter_remove_wisdata_pre;
- int HP_inter_remove_wisdata_post;
int HP_inter_mail_sql_init_pre;
int HP_inter_mail_sql_init_post;
int HP_inter_mail_sql_final_pre;
@@ -2679,8 +2635,6 @@ struct {
int HP_mapif_guild_memberinfoshort_post;
int HP_mapif_guild_broken_pre;
int HP_mapif_guild_broken_post;
- int HP_mapif_guild_message_pre;
- int HP_mapif_guild_message_post;
int HP_mapif_guild_basicinfochanged_pre;
int HP_mapif_guild_basicinfochanged_post;
int HP_mapif_guild_memberinfochanged_pre;
@@ -2711,8 +2665,6 @@ struct {
int HP_mapif_parse_GuildChangeMemberInfoShort_post;
int HP_mapif_parse_BreakGuild_pre;
int HP_mapif_parse_BreakGuild_post;
- int HP_mapif_parse_GuildMessage_pre;
- int HP_mapif_parse_GuildMessage_post;
int HP_mapif_parse_GuildBasicInfoChange_pre;
int HP_mapif_parse_GuildBasicInfoChange_post;
int HP_mapif_parse_GuildMemberInfoChange_pre;
@@ -2807,8 +2759,6 @@ struct {
int HP_mapif_party_membermoved_post;
int HP_mapif_party_broken_pre;
int HP_mapif_party_broken_post;
- int HP_mapif_party_message_pre;
- int HP_mapif_party_message_post;
int HP_mapif_parse_CreateParty_pre;
int HP_mapif_parse_CreateParty_post;
int HP_mapif_parse_PartyInfo_pre;
@@ -2823,8 +2773,6 @@ struct {
int HP_mapif_parse_PartyChangeMap_post;
int HP_mapif_parse_BreakParty_pre;
int HP_mapif_parse_BreakParty_post;
- int HP_mapif_parse_PartyMessage_pre;
- int HP_mapif_parse_PartyMessage_post;
int HP_mapif_parse_PartyLeaderChange_pre;
int HP_mapif_parse_PartyLeaderChange_post;
int HP_mapif_pet_created_pre;
@@ -2901,26 +2849,10 @@ struct {
int HP_mapif_parse_ItemBoundRetrieve_post;
int HP_mapif_parse_accinfo_pre;
int HP_mapif_parse_accinfo_post;
- int HP_mapif_broadcast_pre;
- int HP_mapif_broadcast_post;
- int HP_mapif_wis_message_pre;
- int HP_mapif_wis_message_post;
- int HP_mapif_wis_response_pre;
- int HP_mapif_wis_response_post;
- int HP_mapif_wis_end_pre;
- int HP_mapif_wis_end_post;
int HP_mapif_account_reg_reply_pre;
int HP_mapif_account_reg_reply_post;
int HP_mapif_disconnectplayer_pre;
int HP_mapif_disconnectplayer_post;
- int HP_mapif_parse_broadcast_pre;
- int HP_mapif_parse_broadcast_post;
- int HP_mapif_parse_WisRequest_pre;
- int HP_mapif_parse_WisRequest_post;
- int HP_mapif_parse_WisReply_pre;
- int HP_mapif_parse_WisReply_post;
- int HP_mapif_parse_WisToGM_pre;
- int HP_mapif_parse_WisToGM_post;
int HP_mapif_parse_Registry_pre;
int HP_mapif_parse_Registry_post;
int HP_mapif_parse_RegistryRequest_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 60162c1a8..efd72b670 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -333,8 +333,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter->vlog, HP_inter_vlog) },
{ HP_POP(inter->init_sql, HP_inter_init_sql) },
{ HP_POP(inter->mapif_init, HP_inter_mapif_init) },
- { HP_POP(inter->check_ttl_wisdata_sub, HP_inter_check_ttl_wisdata_sub) },
- { HP_POP(inter->check_ttl_wisdata, HP_inter_check_ttl_wisdata) },
{ HP_POP(inter->check_length, HP_inter_check_length) },
{ HP_POP(inter->parse_frommap, HP_inter_parse_frommap) },
{ HP_POP(inter->final, HP_inter_final) },
@@ -343,9 +341,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter->config_read_connection, HP_inter_config_read_connection) },
{ HP_POP(inter->accinfo, HP_inter_accinfo) },
{ HP_POP(inter->accinfo2, HP_inter_accinfo2) },
- { HP_POP(inter->add_wisdata, HP_inter_add_wisdata) },
- { HP_POP(inter->get_wisdata, HP_inter_get_wisdata) },
- { HP_POP(inter->remove_wisdata, HP_inter_remove_wisdata) },
/* inter_mail_interface */
{ HP_POP(inter_mail->sql_init, HP_inter_mail_sql_init) },
{ HP_POP(inter_mail->sql_final, HP_inter_mail_sql_final) },
@@ -554,7 +549,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->guild_withdraw, HP_mapif_guild_withdraw) },
{ HP_POP(mapif->guild_memberinfoshort, HP_mapif_guild_memberinfoshort) },
{ HP_POP(mapif->guild_broken, HP_mapif_guild_broken) },
- { HP_POP(mapif->guild_message, HP_mapif_guild_message) },
{ HP_POP(mapif->guild_basicinfochanged, HP_mapif_guild_basicinfochanged) },
{ HP_POP(mapif->guild_memberinfochanged, HP_mapif_guild_memberinfochanged) },
{ HP_POP(mapif->guild_skillupack, HP_mapif_guild_skillupack) },
@@ -570,7 +564,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->parse_GuildLeave, HP_mapif_parse_GuildLeave) },
{ HP_POP(mapif->parse_GuildChangeMemberInfoShort, HP_mapif_parse_GuildChangeMemberInfoShort) },
{ HP_POP(mapif->parse_BreakGuild, HP_mapif_parse_BreakGuild) },
- { HP_POP(mapif->parse_GuildMessage, HP_mapif_parse_GuildMessage) },
{ HP_POP(mapif->parse_GuildBasicInfoChange, HP_mapif_parse_GuildBasicInfoChange) },
{ HP_POP(mapif->parse_GuildMemberInfoChange, HP_mapif_parse_GuildMemberInfoChange) },
{ HP_POP(mapif->parse_GuildPosition, HP_mapif_parse_GuildPosition) },
@@ -618,7 +611,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->party_withdraw, HP_mapif_party_withdraw) },
{ HP_POP(mapif->party_membermoved, HP_mapif_party_membermoved) },
{ HP_POP(mapif->party_broken, HP_mapif_party_broken) },
- { HP_POP(mapif->party_message, HP_mapif_party_message) },
{ HP_POP(mapif->parse_CreateParty, HP_mapif_parse_CreateParty) },
{ HP_POP(mapif->parse_PartyInfo, HP_mapif_parse_PartyInfo) },
{ HP_POP(mapif->parse_PartyAddMember, HP_mapif_parse_PartyAddMember) },
@@ -626,7 +618,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->parse_PartyLeave, HP_mapif_parse_PartyLeave) },
{ HP_POP(mapif->parse_PartyChangeMap, HP_mapif_parse_PartyChangeMap) },
{ HP_POP(mapif->parse_BreakParty, HP_mapif_parse_BreakParty) },
- { HP_POP(mapif->parse_PartyMessage, HP_mapif_parse_PartyMessage) },
{ HP_POP(mapif->parse_PartyLeaderChange, HP_mapif_parse_PartyLeaderChange) },
{ HP_POP(mapif->pet_created, HP_mapif_pet_created) },
{ HP_POP(mapif->pet_info, HP_mapif_pet_info) },
@@ -665,16 +656,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->itembound_ack, HP_mapif_itembound_ack) },
{ HP_POP(mapif->parse_ItemBoundRetrieve, HP_mapif_parse_ItemBoundRetrieve) },
{ HP_POP(mapif->parse_accinfo, HP_mapif_parse_accinfo) },
- { HP_POP(mapif->broadcast, HP_mapif_broadcast) },
- { HP_POP(mapif->wis_message, HP_mapif_wis_message) },
- { HP_POP(mapif->wis_response, HP_mapif_wis_response) },
- { HP_POP(mapif->wis_end, HP_mapif_wis_end) },
{ HP_POP(mapif->account_reg_reply, HP_mapif_account_reg_reply) },
{ HP_POP(mapif->disconnectplayer, HP_mapif_disconnectplayer) },
- { HP_POP(mapif->parse_broadcast, HP_mapif_parse_broadcast) },
- { HP_POP(mapif->parse_WisRequest, HP_mapif_parse_WisRequest) },
- { HP_POP(mapif->parse_WisReply, HP_mapif_parse_WisReply) },
- { HP_POP(mapif->parse_WisToGM, HP_mapif_parse_WisToGM) },
{ HP_POP(mapif->parse_Registry, HP_mapif_parse_Registry) },
{ HP_POP(mapif->parse_RegistryRequest, HP_mapif_parse_RegistryRequest) },
{ HP_POP(mapif->namechange_ack, HP_mapif_namechange_ack) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 2b7e25e5d..7ce54d288 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -7851,66 +7851,6 @@ int HP_inter_mapif_init(int fd) {
}
return retVal___;
}
-int HP_inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list ap) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre > 0) {
- int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre; hIndex++) {
- va_list ap___copy; va_copy(ap___copy, ap);
- preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_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.inter.check_ttl_wisdata_sub(key, data, ap___copy);
- va_end(ap___copy);
- }
- if (HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post > 0) {
- int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post; hIndex++) {
- va_list ap___copy; va_copy(ap___copy, ap);
- postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, key, data, ap___copy);
- va_end(ap___copy);
- }
- }
- return retVal___;
-}
-int HP_inter_check_ttl_wisdata(void) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_inter_check_ttl_wisdata_pre > 0) {
- int (*preHookFunc) (void);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_pre[hIndex].func;
- retVal___ = preHookFunc();
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.inter.check_ttl_wisdata();
- }
- if (HPMHooks.count.HP_inter_check_ttl_wisdata_post > 0) {
- int (*postHookFunc) (int retVal___);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
- }
- }
- return retVal___;
-}
int HP_inter_check_length(int fd, int length) {
int hIndex = 0;
int retVal___ = 0;
@@ -8124,86 +8064,6 @@ void HP_inter_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int accoun
}
return;
}
-struct WisData* HP_inter_add_wisdata(int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len) {
- int hIndex = 0;
- struct WisData* retVal___ = NULL;
- if (HPMHooks.count.HP_inter_add_wisdata_pre > 0) {
- struct WisData* (*preHookFunc) (int *fd, const unsigned char **src, const unsigned char **dst, const unsigned char **msg, int *msg_len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_add_wisdata_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_inter_add_wisdata_pre[hIndex].func;
- retVal___ = preHookFunc(&fd, &src, &dst, &msg, &msg_len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.inter.add_wisdata(fd, src, dst, msg, msg_len);
- }
- if (HPMHooks.count.HP_inter_add_wisdata_post > 0) {
- struct WisData* (*postHookFunc) (struct WisData* retVal___, int fd, const unsigned char *src, const unsigned char *dst, const unsigned char *msg, int msg_len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_add_wisdata_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_inter_add_wisdata_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd, src, dst, msg, msg_len);
- }
- }
- return retVal___;
-}
-struct WisData* HP_inter_get_wisdata(int id) {
- int hIndex = 0;
- struct WisData* retVal___ = NULL;
- if (HPMHooks.count.HP_inter_get_wisdata_pre > 0) {
- struct WisData* (*preHookFunc) (int *id);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_get_wisdata_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_inter_get_wisdata_pre[hIndex].func;
- retVal___ = preHookFunc(&id);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.inter.get_wisdata(id);
- }
- if (HPMHooks.count.HP_inter_get_wisdata_post > 0) {
- struct WisData* (*postHookFunc) (struct WisData* retVal___, int id);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_get_wisdata_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_inter_get_wisdata_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, id);
- }
- }
- return retVal___;
-}
-void HP_inter_remove_wisdata(int id) {
- int hIndex = 0;
- if (HPMHooks.count.HP_inter_remove_wisdata_pre > 0) {
- void (*preHookFunc) (int *id);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_remove_wisdata_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_inter_remove_wisdata_pre[hIndex].func;
- preHookFunc(&id);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.inter.remove_wisdata(id);
- }
- if (HPMHooks.count.HP_inter_remove_wisdata_post > 0) {
- void (*postHookFunc) (int id);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_remove_wisdata_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_inter_remove_wisdata_post[hIndex].func;
- postHookFunc(id);
- }
- }
- return;
-}
/* inter_mail_interface */
int HP_inter_mail_sql_init(void) {
int hIndex = 0;
@@ -13498,33 +13358,6 @@ int HP_mapif_guild_broken(int guild_id, int flag) {
}
return retVal___;
}
-int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int len, int sfd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_guild_message_pre > 0) {
- int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len, int *sfd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_guild_message_pre[hIndex].func;
- retVal___ = preHookFunc(&guild_id, &account_id, &mes, &len, &sfd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.guild_message(guild_id, account_id, mes, len, sfd);
- }
- if (HPMHooks.count.HP_mapif_guild_message_post > 0) {
- int (*postHookFunc) (int retVal___, int guild_id, int account_id, const char *mes, int len, int sfd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_guild_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, guild_id, account_id, mes, len, sfd);
- }
- }
- return retVal___;
-}
int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len) {
int hIndex = 0;
int retVal___ = 0;
@@ -13930,33 +13763,6 @@ int HP_mapif_parse_BreakGuild(int fd, int guild_id) {
}
return retVal___;
}
-int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_parse_GuildMessage_pre > 0) {
- int (*preHookFunc) (int *fd, int *guild_id, int *account_id, const char **mes, int *len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_pre[hIndex].func;
- retVal___ = preHookFunc(&fd, &guild_id, &account_id, &mes, &len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.parse_GuildMessage(fd, guild_id, account_id, mes, len);
- }
- if (HPMHooks.count.HP_mapif_parse_GuildMessage_post > 0) {
- int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, const char *mes, int len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, mes, len);
- }
- }
- return retVal___;
-}
int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len) {
int hIndex = 0;
int retVal___ = 0;
@@ -15195,33 +15001,6 @@ int HP_mapif_party_broken(int party_id, int flag) {
}
return retVal___;
}
-int HP_mapif_party_message(int party_id, int account_id, const char *mes, int len, int sfd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_party_message_pre > 0) {
- int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len, int *sfd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_party_message_pre[hIndex].func;
- retVal___ = preHookFunc(&party_id, &account_id, &mes, &len, &sfd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.party_message(party_id, account_id, mes, len, sfd);
- }
- if (HPMHooks.count.HP_mapif_party_message_post > 0) {
- int (*postHookFunc) (int retVal___, int party_id, int account_id, const char *mes, int len, int sfd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_party_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, party_id, account_id, mes, len, sfd);
- }
- }
- return retVal___;
-}
int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, const struct party_member *leader) {
int hIndex = 0;
int retVal___ = 0;
@@ -15410,33 +15189,6 @@ int HP_mapif_parse_BreakParty(int fd, int party_id) {
}
return retVal___;
}
-int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char *mes, int len) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_parse_PartyMessage_pre > 0) {
- int (*preHookFunc) (int *fd, int *party_id, int *account_id, const char **mes, int *len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_pre[hIndex].func;
- retVal___ = preHookFunc(&fd, &party_id, &account_id, &mes, &len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.parse_PartyMessage(fd, party_id, account_id, mes, len);
- }
- if (HPMHooks.count.HP_mapif_parse_PartyMessage_post > 0) {
- int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, const char *mes, int len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd, party_id, account_id, mes, len);
- }
- }
- return retVal___;
-}
int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int char_id) {
int hIndex = 0;
int retVal___ = 0;
@@ -16447,113 +16199,6 @@ void HP_mapif_parse_accinfo(int fd) {
}
return;
}
-int HP_mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_broadcast_pre > 0) {
- int (*preHookFunc) (const unsigned char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_broadcast_pre[hIndex].func;
- retVal___ = preHookFunc(&mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.broadcast(mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd);
- }
- if (HPMHooks.count.HP_mapif_broadcast_post > 0) {
- int (*postHookFunc) (int retVal___, const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_broadcast_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd);
- }
- }
- return retVal___;
-}
-int HP_mapif_wis_message(struct WisData *wd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_wis_message_pre > 0) {
- int (*preHookFunc) (struct WisData **wd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_wis_message_pre[hIndex].func;
- retVal___ = preHookFunc(&wd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.wis_message(wd);
- }
- if (HPMHooks.count.HP_mapif_wis_message_post > 0) {
- int (*postHookFunc) (int retVal___, struct WisData *wd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_wis_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, wd);
- }
- }
- return retVal___;
-}
-void HP_mapif_wis_response(int fd, const unsigned char *src, int flag) {
- int hIndex = 0;
- if (HPMHooks.count.HP_mapif_wis_response_pre > 0) {
- void (*preHookFunc) (int *fd, const unsigned char **src, int *flag);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_wis_response_pre[hIndex].func;
- preHookFunc(&fd, &src, &flag);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.mapif.wis_response(fd, src, flag);
- }
- if (HPMHooks.count.HP_mapif_wis_response_post > 0) {
- void (*postHookFunc) (int fd, const unsigned char *src, int flag);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_wis_response_post[hIndex].func;
- postHookFunc(fd, src, flag);
- }
- }
- return;
-}
-int HP_mapif_wis_end(struct WisData *wd, int flag) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_wis_end_pre > 0) {
- int (*preHookFunc) (struct WisData **wd, int *flag);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_wis_end_pre[hIndex].func;
- retVal___ = preHookFunc(&wd, &flag);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.wis_end(wd, flag);
- }
- if (HPMHooks.count.HP_mapif_wis_end_post > 0) {
- int (*postHookFunc) (int retVal___, struct WisData *wd, int flag);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_wis_end_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, wd, flag);
- }
- }
- return retVal___;
-}
int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) {
int hIndex = 0;
int retVal___ = 0;
@@ -16608,114 +16253,6 @@ int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) {
}
return retVal___;
}
-int HP_mapif_parse_broadcast(int fd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_parse_broadcast_pre > 0) {
- int (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_pre[hIndex].func;
- retVal___ = preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.parse_broadcast(fd);
- }
- if (HPMHooks.count.HP_mapif_parse_broadcast_post > 0) {
- int (*postHookFunc) (int retVal___, int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd);
- }
- }
- return retVal___;
-}
-int HP_mapif_parse_WisRequest(int fd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_parse_WisRequest_pre > 0) {
- int (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_pre[hIndex].func;
- retVal___ = preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.parse_WisRequest(fd);
- }
- if (HPMHooks.count.HP_mapif_parse_WisRequest_post > 0) {
- int (*postHookFunc) (int retVal___, int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd);
- }
- }
- return retVal___;
-}
-int HP_mapif_parse_WisReply(int fd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_parse_WisReply_pre > 0) {
- int (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_pre[hIndex].func;
- retVal___ = preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.parse_WisReply(fd);
- }
- if (HPMHooks.count.HP_mapif_parse_WisReply_post > 0) {
- int (*postHookFunc) (int retVal___, int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd);
- }
- }
- return retVal___;
-}
-int HP_mapif_parse_WisToGM(int fd) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_mapif_parse_WisToGM_pre > 0) {
- int (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_pre[hIndex].func;
- retVal___ = preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mapif.parse_WisToGM(fd);
- }
- if (HPMHooks.count.HP_mapif_parse_WisToGM_post > 0) {
- int (*postHookFunc) (int retVal___, int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd);
- }
- }
- return retVal___;
-}
int HP_mapif_parse_Registry(int fd) {
int hIndex = 0;
int retVal___ = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index ad49bacb4..2faafacc5 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1302,6 +1302,8 @@ struct {
struct HPMHookPoint *HP_clif_addskill_post;
struct HPMHookPoint *HP_clif_deleteskill_pre;
struct HPMHookPoint *HP_clif_deleteskill_post;
+ struct HPMHookPoint *HP_clif_playerSkillToPacket_pre;
+ struct HPMHookPoint *HP_clif_playerSkillToPacket_post;
struct HPMHookPoint *HP_clif_party_created_pre;
struct HPMHookPoint *HP_clif_party_created_post;
struct HPMHookPoint *HP_clif_party_member_info_pre;
@@ -2572,8 +2574,6 @@ struct {
struct HPMHookPoint *HP_guild_emblem_changed_post;
struct HPMHookPoint *HP_guild_send_message_pre;
struct HPMHookPoint *HP_guild_send_message_post;
- struct HPMHookPoint *HP_guild_recv_message_pre;
- struct HPMHookPoint *HP_guild_recv_message_post;
struct HPMHookPoint *HP_guild_send_dot_remove_pre;
struct HPMHookPoint *HP_guild_send_dot_remove_post;
struct HPMHookPoint *HP_guild_skillupack_pre;
@@ -2816,16 +2816,6 @@ struct {
struct HPMHookPoint *HP_intif_parse_post;
struct HPMHookPoint *HP_intif_create_pet_pre;
struct HPMHookPoint *HP_intif_create_pet_post;
- struct HPMHookPoint *HP_intif_broadcast_pre;
- struct HPMHookPoint *HP_intif_broadcast_post;
- struct HPMHookPoint *HP_intif_broadcast2_pre;
- struct HPMHookPoint *HP_intif_broadcast2_post;
- struct HPMHookPoint *HP_intif_main_message_pre;
- struct HPMHookPoint *HP_intif_main_message_post;
- struct HPMHookPoint *HP_intif_wis_message_pre;
- struct HPMHookPoint *HP_intif_wis_message_post;
- struct HPMHookPoint *HP_intif_wis_message_to_gm_pre;
- struct HPMHookPoint *HP_intif_wis_message_to_gm_post;
struct HPMHookPoint *HP_intif_saveregistry_pre;
struct HPMHookPoint *HP_intif_saveregistry_post;
struct HPMHookPoint *HP_intif_request_registry_pre;
@@ -2852,8 +2842,6 @@ struct {
struct HPMHookPoint *HP_intif_party_changemap_post;
struct HPMHookPoint *HP_intif_break_party_pre;
struct HPMHookPoint *HP_intif_break_party_post;
- struct HPMHookPoint *HP_intif_party_message_pre;
- struct HPMHookPoint *HP_intif_party_message_post;
struct HPMHookPoint *HP_intif_party_leaderchange_pre;
struct HPMHookPoint *HP_intif_party_leaderchange_post;
struct HPMHookPoint *HP_intif_guild_create_pre;
@@ -2868,8 +2856,6 @@ struct {
struct HPMHookPoint *HP_intif_guild_memberinfoshort_post;
struct HPMHookPoint *HP_intif_guild_break_pre;
struct HPMHookPoint *HP_intif_guild_break_post;
- struct HPMHookPoint *HP_intif_guild_message_pre;
- struct HPMHookPoint *HP_intif_guild_message_post;
struct HPMHookPoint *HP_intif_guild_change_gm_pre;
struct HPMHookPoint *HP_intif_guild_change_gm_post;
struct HPMHookPoint *HP_intif_guild_change_basicinfo_pre;
@@ -2976,14 +2962,6 @@ struct {
struct HPMHookPoint *HP_intif_achievements_request_post;
struct HPMHookPoint *HP_intif_achievements_save_pre;
struct HPMHookPoint *HP_intif_achievements_save_post;
- struct HPMHookPoint *HP_intif_pWisMessage_pre;
- struct HPMHookPoint *HP_intif_pWisMessage_post;
- struct HPMHookPoint *HP_intif_pWisEnd_pre;
- struct HPMHookPoint *HP_intif_pWisEnd_post;
- struct HPMHookPoint *HP_intif_pWisToGM_sub_pre;
- struct HPMHookPoint *HP_intif_pWisToGM_sub_post;
- struct HPMHookPoint *HP_intif_pWisToGM_pre;
- struct HPMHookPoint *HP_intif_pWisToGM_post;
struct HPMHookPoint *HP_intif_pRegisters_pre;
struct HPMHookPoint *HP_intif_pRegisters_post;
struct HPMHookPoint *HP_intif_pAccountStorage_pre;
@@ -3012,8 +2990,6 @@ struct {
struct HPMHookPoint *HP_intif_pPartyMove_post;
struct HPMHookPoint *HP_intif_pPartyBroken_pre;
struct HPMHookPoint *HP_intif_pPartyBroken_post;
- struct HPMHookPoint *HP_intif_pPartyMessage_pre;
- struct HPMHookPoint *HP_intif_pPartyMessage_post;
struct HPMHookPoint *HP_intif_pGuildCreated_pre;
struct HPMHookPoint *HP_intif_pGuildCreated_post;
struct HPMHookPoint *HP_intif_pGuildInfo_pre;
@@ -3026,8 +3002,6 @@ struct {
struct HPMHookPoint *HP_intif_pGuildMemberInfoShort_post;
struct HPMHookPoint *HP_intif_pGuildBroken_pre;
struct HPMHookPoint *HP_intif_pGuildBroken_post;
- struct HPMHookPoint *HP_intif_pGuildMessage_pre;
- struct HPMHookPoint *HP_intif_pGuildMessage_post;
struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_pre;
struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_post;
struct HPMHookPoint *HP_intif_pGuildMemberInfoChanged_pre;
@@ -4438,8 +4412,6 @@ struct {
struct HPMHookPoint *HP_party_send_logout_post;
struct HPMHookPoint *HP_party_send_message_pre;
struct HPMHookPoint *HP_party_send_message_post;
- struct HPMHookPoint *HP_party_recv_message_pre;
- struct HPMHookPoint *HP_party_recv_message_post;
struct HPMHookPoint *HP_party_skill_check_pre;
struct HPMHookPoint *HP_party_skill_check_post;
struct HPMHookPoint *HP_party_send_xy_clear_pre;
@@ -4986,6 +4958,10 @@ struct {
struct HPMHookPoint *HP_pc_have_magnifier_post;
struct HPMHookPoint *HP_pc_process_chat_message_pre;
struct HPMHookPoint *HP_pc_process_chat_message_post;
+ struct HPMHookPoint *HP_pc_wis_message_to_gm_pre;
+ struct HPMHookPoint *HP_pc_wis_message_to_gm_post;
+ struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_pre;
+ struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_post;
struct HPMHookPoint *HP_pc_check_supernovice_call_pre;
struct HPMHookPoint *HP_pc_check_supernovice_call_post;
struct HPMHookPoint *HP_pc_check_basicskill_pre;
@@ -8097,6 +8073,8 @@ struct {
int HP_clif_addskill_post;
int HP_clif_deleteskill_pre;
int HP_clif_deleteskill_post;
+ int HP_clif_playerSkillToPacket_pre;
+ int HP_clif_playerSkillToPacket_post;
int HP_clif_party_created_pre;
int HP_clif_party_created_post;
int HP_clif_party_member_info_pre;
@@ -9367,8 +9345,6 @@ struct {
int HP_guild_emblem_changed_post;
int HP_guild_send_message_pre;
int HP_guild_send_message_post;
- int HP_guild_recv_message_pre;
- int HP_guild_recv_message_post;
int HP_guild_send_dot_remove_pre;
int HP_guild_send_dot_remove_post;
int HP_guild_skillupack_pre;
@@ -9611,16 +9587,6 @@ struct {
int HP_intif_parse_post;
int HP_intif_create_pet_pre;
int HP_intif_create_pet_post;
- int HP_intif_broadcast_pre;
- int HP_intif_broadcast_post;
- int HP_intif_broadcast2_pre;
- int HP_intif_broadcast2_post;
- int HP_intif_main_message_pre;
- int HP_intif_main_message_post;
- int HP_intif_wis_message_pre;
- int HP_intif_wis_message_post;
- int HP_intif_wis_message_to_gm_pre;
- int HP_intif_wis_message_to_gm_post;
int HP_intif_saveregistry_pre;
int HP_intif_saveregistry_post;
int HP_intif_request_registry_pre;
@@ -9647,8 +9613,6 @@ struct {
int HP_intif_party_changemap_post;
int HP_intif_break_party_pre;
int HP_intif_break_party_post;
- int HP_intif_party_message_pre;
- int HP_intif_party_message_post;
int HP_intif_party_leaderchange_pre;
int HP_intif_party_leaderchange_post;
int HP_intif_guild_create_pre;
@@ -9663,8 +9627,6 @@ struct {
int HP_intif_guild_memberinfoshort_post;
int HP_intif_guild_break_pre;
int HP_intif_guild_break_post;
- int HP_intif_guild_message_pre;
- int HP_intif_guild_message_post;
int HP_intif_guild_change_gm_pre;
int HP_intif_guild_change_gm_post;
int HP_intif_guild_change_basicinfo_pre;
@@ -9771,14 +9733,6 @@ struct {
int HP_intif_achievements_request_post;
int HP_intif_achievements_save_pre;
int HP_intif_achievements_save_post;
- int HP_intif_pWisMessage_pre;
- int HP_intif_pWisMessage_post;
- int HP_intif_pWisEnd_pre;
- int HP_intif_pWisEnd_post;
- int HP_intif_pWisToGM_sub_pre;
- int HP_intif_pWisToGM_sub_post;
- int HP_intif_pWisToGM_pre;
- int HP_intif_pWisToGM_post;
int HP_intif_pRegisters_pre;
int HP_intif_pRegisters_post;
int HP_intif_pAccountStorage_pre;
@@ -9807,8 +9761,6 @@ struct {
int HP_intif_pPartyMove_post;
int HP_intif_pPartyBroken_pre;
int HP_intif_pPartyBroken_post;
- int HP_intif_pPartyMessage_pre;
- int HP_intif_pPartyMessage_post;
int HP_intif_pGuildCreated_pre;
int HP_intif_pGuildCreated_post;
int HP_intif_pGuildInfo_pre;
@@ -9821,8 +9773,6 @@ struct {
int HP_intif_pGuildMemberInfoShort_post;
int HP_intif_pGuildBroken_pre;
int HP_intif_pGuildBroken_post;
- int HP_intif_pGuildMessage_pre;
- int HP_intif_pGuildMessage_post;
int HP_intif_pGuildBasicInfoChanged_pre;
int HP_intif_pGuildBasicInfoChanged_post;
int HP_intif_pGuildMemberInfoChanged_pre;
@@ -11233,8 +11183,6 @@ struct {
int HP_party_send_logout_post;
int HP_party_send_message_pre;
int HP_party_send_message_post;
- int HP_party_recv_message_pre;
- int HP_party_recv_message_post;
int HP_party_skill_check_pre;
int HP_party_skill_check_post;
int HP_party_send_xy_clear_pre;
@@ -11781,6 +11729,10 @@ struct {
int HP_pc_have_magnifier_post;
int HP_pc_process_chat_message_pre;
int HP_pc_process_chat_message_post;
+ int HP_pc_wis_message_to_gm_pre;
+ int HP_pc_wis_message_to_gm_post;
+ int HP_pc_wis_message_to_gm_sub_pre;
+ int HP_pc_wis_message_to_gm_sub_post;
int HP_pc_check_supernovice_call_pre;
int HP_pc_check_supernovice_call_post;
int HP_pc_check_basicskill_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 474bcfb14..cfc6984dc 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -675,6 +675,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->skillinfo, HP_clif_skillinfo) },
{ HP_POP(clif->addskill, HP_clif_addskill) },
{ HP_POP(clif->deleteskill, HP_clif_deleteskill) },
+ { HP_POP(clif->playerSkillToPacket, HP_clif_playerSkillToPacket) },
{ HP_POP(clif->party_created, HP_clif_party_created) },
{ HP_POP(clif->party_member_info, HP_clif_party_member_info) },
{ HP_POP(clif->party_info, HP_clif_party_info) },
@@ -1319,7 +1320,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(guild->change_emblem, HP_guild_change_emblem) },
{ HP_POP(guild->emblem_changed, HP_guild_emblem_changed) },
{ HP_POP(guild->send_message, HP_guild_send_message) },
- { HP_POP(guild->recv_message, HP_guild_recv_message) },
{ HP_POP(guild->send_dot_remove, HP_guild_send_dot_remove) },
{ HP_POP(guild->skillupack, HP_guild_skillupack) },
{ HP_POP(guild->dobreak, HP_guild_dobreak) },
@@ -1445,11 +1445,6 @@ struct HookingPointData HookingPoints[] = {
/* intif_interface */
{ HP_POP(intif->parse, HP_intif_parse) },
{ HP_POP(intif->create_pet, HP_intif_create_pet) },
- { HP_POP(intif->broadcast, HP_intif_broadcast) },
- { HP_POP(intif->broadcast2, HP_intif_broadcast2) },
- { HP_POP(intif->main_message, HP_intif_main_message) },
- { HP_POP(intif->wis_message, HP_intif_wis_message) },
- { HP_POP(intif->wis_message_to_gm, HP_intif_wis_message_to_gm) },
{ HP_POP(intif->saveregistry, HP_intif_saveregistry) },
{ HP_POP(intif->request_registry, HP_intif_request_registry) },
{ HP_POP(intif->request_account_storage, HP_intif_request_account_storage) },
@@ -1463,7 +1458,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->party_leave, HP_intif_party_leave) },
{ HP_POP(intif->party_changemap, HP_intif_party_changemap) },
{ HP_POP(intif->break_party, HP_intif_break_party) },
- { HP_POP(intif->party_message, HP_intif_party_message) },
{ HP_POP(intif->party_leaderchange, HP_intif_party_leaderchange) },
{ HP_POP(intif->guild_create, HP_intif_guild_create) },
{ HP_POP(intif->guild_request_info, HP_intif_guild_request_info) },
@@ -1471,7 +1465,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->guild_leave, HP_intif_guild_leave) },
{ HP_POP(intif->guild_memberinfoshort, HP_intif_guild_memberinfoshort) },
{ HP_POP(intif->guild_break, HP_intif_guild_break) },
- { HP_POP(intif->guild_message, HP_intif_guild_message) },
{ HP_POP(intif->guild_change_gm, HP_intif_guild_change_gm) },
{ HP_POP(intif->guild_change_basicinfo, HP_intif_guild_change_basicinfo) },
{ HP_POP(intif->guild_change_memberinfo, HP_intif_guild_change_memberinfo) },
@@ -1525,10 +1518,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->CheckForCharServer, HP_intif_CheckForCharServer) },
{ HP_POP(intif->achievements_request, HP_intif_achievements_request) },
{ HP_POP(intif->achievements_save, HP_intif_achievements_save) },
- { HP_POP(intif->pWisMessage, HP_intif_pWisMessage) },
- { HP_POP(intif->pWisEnd, HP_intif_pWisEnd) },
- { HP_POP(intif->pWisToGM_sub, HP_intif_pWisToGM_sub) },
- { HP_POP(intif->pWisToGM, HP_intif_pWisToGM) },
{ HP_POP(intif->pRegisters, HP_intif_pRegisters) },
{ HP_POP(intif->pAccountStorage, HP_intif_pAccountStorage) },
{ HP_POP(intif->pChangeNameOk, HP_intif_pChangeNameOk) },
@@ -1543,14 +1532,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->pPartyMemberWithdraw, HP_intif_pPartyMemberWithdraw) },
{ HP_POP(intif->pPartyMove, HP_intif_pPartyMove) },
{ HP_POP(intif->pPartyBroken, HP_intif_pPartyBroken) },
- { HP_POP(intif->pPartyMessage, HP_intif_pPartyMessage) },
{ HP_POP(intif->pGuildCreated, HP_intif_pGuildCreated) },
{ HP_POP(intif->pGuildInfo, HP_intif_pGuildInfo) },
{ HP_POP(intif->pGuildMemberAdded, HP_intif_pGuildMemberAdded) },
{ HP_POP(intif->pGuildMemberWithdraw, HP_intif_pGuildMemberWithdraw) },
{ HP_POP(intif->pGuildMemberInfoShort, HP_intif_pGuildMemberInfoShort) },
{ HP_POP(intif->pGuildBroken, HP_intif_pGuildBroken) },
- { HP_POP(intif->pGuildMessage, HP_intif_pGuildMessage) },
{ HP_POP(intif->pGuildBasicInfoChanged, HP_intif_pGuildBasicInfoChanged) },
{ HP_POP(intif->pGuildMemberInfoChanged, HP_intif_pGuildMemberInfoChanged) },
{ HP_POP(intif->pGuildPosition, HP_intif_pGuildPosition) },
@@ -2274,7 +2261,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(party->send_levelup, HP_party_send_levelup) },
{ HP_POP(party->send_logout, HP_party_send_logout) },
{ HP_POP(party->send_message, HP_party_send_message) },
- { HP_POP(party->recv_message, HP_party_recv_message) },
{ HP_POP(party->skill_check, HP_party_skill_check) },
{ HP_POP(party->send_xy_clear, HP_party_send_xy_clear) },
{ HP_POP(party->exp_share, HP_party_exp_share) },
@@ -2551,6 +2537,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->update_idle_time, HP_pc_update_idle_time) },
{ HP_POP(pc->have_magnifier, HP_pc_have_magnifier) },
{ HP_POP(pc->process_chat_message, HP_pc_process_chat_message) },
+ { HP_POP(pc->wis_message_to_gm, HP_pc_wis_message_to_gm) },
+ { HP_POP(pc->wis_message_to_gm_sub, HP_pc_wis_message_to_gm_sub) },
{ HP_POP(pc->check_supernovice_call, HP_pc_check_supernovice_call) },
{ HP_POP(pc->check_basicskill, HP_pc_check_basicskill) },
{ HP_POP(pc->isDeathPenaltyJob, HP_pc_isDeathPenaltyJob) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 8817c34cc..f74e08187 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -16980,6 +16980,32 @@ void HP_clif_deleteskill(struct map_session_data *sd, int id) {
}
return;
}
+void HP_clif_playerSkillToPacket(struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_playerSkillToPacket_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct SKILLDATA **skillData, int *skillId, int *idx, bool *newSkill);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_pre[hIndex].func;
+ preHookFunc(&sd, &skillData, &skillId, &idx, &newSkill);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.playerSkillToPacket(sd, skillData, skillId, idx, newSkill);
+ }
+ if (HPMHooks.count.HP_clif_playerSkillToPacket_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_post[hIndex].func;
+ postHookFunc(sd, skillData, skillId, idx, newSkill);
+ }
+ }
+ return;
+}
void HP_clif_party_created(struct map_session_data *sd, int result) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_party_created_pre > 0) {
@@ -21386,10 +21412,10 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
}
return;
}
-void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response) {
+void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_npc_market_purchase_ack_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, unsigned char *response);
+ void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, enum market_buy_result *response);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_pre[hIndex].func;
@@ -21404,7 +21430,7 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct i
HPMHooks.source.clif.npc_market_purchase_ack(sd, item_list, response);
}
if (HPMHooks.count.HP_clif_npc_market_purchase_ack_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response);
+ void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_post[hIndex].func;
postHookFunc(sd, item_list, response);
@@ -33641,33 +33667,6 @@ int HP_guild_send_message(struct map_session_data *sd, const char *mes) {
}
return retVal___;
}
-int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_guild_recv_message_pre > 0) {
- int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_guild_recv_message_pre[hIndex].func;
- retVal___ = preHookFunc(&guild_id, &account_id, &mes, &len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.guild.recv_message(guild_id, account_id, mes, len);
- }
- if (HPMHooks.count.HP_guild_recv_message_post > 0) {
- int (*postHookFunc) (int retVal___, int guild_id, int account_id, const char *mes, int len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_guild_recv_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, guild_id, account_id, mes, len);
- }
- }
- return retVal___;
-}
int HP_guild_send_dot_remove(struct map_session_data *sd) {
int hIndex = 0;
int retVal___ = 0;
@@ -36969,141 +36968,6 @@ int HP_intif_create_pet(int account_id, int char_id, int pet_type, int pet_lv, i
}
return retVal___;
}
-int HP_intif_broadcast(const char *mes, int len, int type) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_broadcast_pre > 0) {
- int (*preHookFunc) (const char **mes, int *len, int *type);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_broadcast_pre[hIndex].func;
- retVal___ = preHookFunc(&mes, &len, &type);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.intif.broadcast(mes, len, type);
- }
- if (HPMHooks.count.HP_intif_broadcast_post > 0) {
- int (*postHookFunc) (int retVal___, const char *mes, int len, int type);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_broadcast_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mes, len, type);
- }
- }
- return retVal___;
-}
-int HP_intif_broadcast2(const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_broadcast2_pre > 0) {
- int (*preHookFunc) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_broadcast2_pre[hIndex].func;
- retVal___ = preHookFunc(&mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.intif.broadcast2(mes, len, fontColor, fontType, fontSize, fontAlign, fontY);
- }
- if (HPMHooks.count.HP_intif_broadcast2_post > 0) {
- int (*postHookFunc) (int retVal___, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_broadcast2_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mes, len, fontColor, fontType, fontSize, fontAlign, fontY);
- }
- }
- return retVal___;
-}
-int HP_intif_main_message(struct map_session_data *sd, const char *message) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_main_message_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, const char **message);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_main_message_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &message);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.intif.main_message(sd, message);
- }
- if (HPMHooks.count.HP_intif_main_message_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *message);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_main_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, message);
- }
- }
- return retVal___;
-}
-int HP_intif_wis_message(struct map_session_data *sd, const char *nick, const char *mes, int mes_len) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_wis_message_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, const char **nick, const char **mes, int *mes_len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_wis_message_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &nick, &mes, &mes_len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.intif.wis_message(sd, nick, mes, mes_len);
- }
- if (HPMHooks.count.HP_intif_wis_message_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *nick, const char *mes, int mes_len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_wis_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, nick, mes, mes_len);
- }
- }
- return retVal___;
-}
-int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_wis_message_to_gm_pre > 0) {
- int (*preHookFunc) (char **Wisp_name, int *permission, char **mes);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_pre[hIndex].func;
- retVal___ = preHookFunc(&Wisp_name, &permission, &mes);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.intif.wis_message_to_gm(Wisp_name, permission, mes);
- }
- if (HPMHooks.count.HP_intif_wis_message_to_gm_post > 0) {
- int (*postHookFunc) (int retVal___, char *Wisp_name, int permission, char *mes);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, Wisp_name, permission, mes);
- }
- }
- return retVal___;
-}
int HP_intif_saveregistry(struct map_session_data *sd) {
int hIndex = 0;
int retVal___ = 0;
@@ -37453,33 +37317,6 @@ int HP_intif_break_party(int party_id) {
}
return retVal___;
}
-int HP_intif_party_message(int party_id, int account_id, const char *mes, int len) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_party_message_pre > 0) {
- int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_party_message_pre[hIndex].func;
- retVal___ = preHookFunc(&party_id, &account_id, &mes, &len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.intif.party_message(party_id, account_id, mes, len);
- }
- if (HPMHooks.count.HP_intif_party_message_post > 0) {
- int (*postHookFunc) (int retVal___, int party_id, int account_id, const char *mes, int len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_party_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, party_id, account_id, mes, len);
- }
- }
- return retVal___;
-}
int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) {
int hIndex = 0;
int retVal___ = 0;
@@ -37669,33 +37506,6 @@ int HP_intif_guild_break(int guild_id) {
}
return retVal___;
}
-int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int len) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_guild_message_pre > 0) {
- int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_guild_message_pre[hIndex].func;
- retVal___ = preHookFunc(&guild_id, &account_id, &mes, &len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.intif.guild_message(guild_id, account_id, mes, len);
- }
- if (HPMHooks.count.HP_intif_guild_message_post > 0) {
- int (*postHookFunc) (int retVal___, int guild_id, int account_id, const char *mes, int len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_guild_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, guild_id, account_id, mes, len);
- }
- }
- return retVal___;
-}
int HP_intif_guild_change_gm(int guild_id, const char *name, int len) {
int hIndex = 0;
int retVal___ = 0;
@@ -39120,117 +38930,6 @@ void HP_intif_achievements_save(struct map_session_data *sd) {
}
return;
}
-void HP_intif_pWisMessage(int fd) {
- int hIndex = 0;
- if (HPMHooks.count.HP_intif_pWisMessage_pre > 0) {
- void (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_pWisMessage_pre[hIndex].func;
- preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.intif.pWisMessage(fd);
- }
- if (HPMHooks.count.HP_intif_pWisMessage_post > 0) {
- void (*postHookFunc) (int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_pWisMessage_post[hIndex].func;
- postHookFunc(fd);
- }
- }
- return;
-}
-void HP_intif_pWisEnd(int fd) {
- int hIndex = 0;
- if (HPMHooks.count.HP_intif_pWisEnd_pre > 0) {
- void (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_pWisEnd_pre[hIndex].func;
- preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.intif.pWisEnd(fd);
- }
- if (HPMHooks.count.HP_intif_pWisEnd_post > 0) {
- void (*postHookFunc) (int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_pWisEnd_post[hIndex].func;
- postHookFunc(fd);
- }
- }
- return;
-}
-int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_intif_pWisToGM_sub_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, va_list va);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_pre; hIndex++) {
- va_list va___copy; va_copy(va___copy, va);
- preHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, va___copy);
- va_end(va___copy);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- va_list va___copy; va_copy(va___copy, va);
- retVal___ = HPMHooks.source.intif.pWisToGM_sub(sd, va___copy);
- va_end(va___copy);
- }
- if (HPMHooks.count.HP_intif_pWisToGM_sub_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_post; hIndex++) {
- va_list va___copy; va_copy(va___copy, va);
- postHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, va___copy);
- va_end(va___copy);
- }
- }
- return retVal___;
-}
-void HP_intif_pWisToGM(int fd) {
- int hIndex = 0;
- if (HPMHooks.count.HP_intif_pWisToGM_pre > 0) {
- void (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_pWisToGM_pre[hIndex].func;
- preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.intif.pWisToGM(fd);
- }
- if (HPMHooks.count.HP_intif_pWisToGM_post > 0) {
- void (*postHookFunc) (int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_pWisToGM_post[hIndex].func;
- postHookFunc(fd);
- }
- }
- return;
-}
void HP_intif_pRegisters(int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_pRegisters_pre > 0) {
@@ -39595,32 +39294,6 @@ void HP_intif_pPartyBroken(int fd) {
}
return;
}
-void HP_intif_pPartyMessage(int fd) {
- int hIndex = 0;
- if (HPMHooks.count.HP_intif_pPartyMessage_pre > 0) {
- void (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_pPartyMessage_pre[hIndex].func;
- preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.intif.pPartyMessage(fd);
- }
- if (HPMHooks.count.HP_intif_pPartyMessage_post > 0) {
- void (*postHookFunc) (int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_pPartyMessage_post[hIndex].func;
- postHookFunc(fd);
- }
- }
- return;
-}
void HP_intif_pGuildCreated(int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_pGuildCreated_pre > 0) {
@@ -39777,32 +39450,6 @@ void HP_intif_pGuildBroken(int fd) {
}
return;
}
-void HP_intif_pGuildMessage(int fd) {
- int hIndex = 0;
- if (HPMHooks.count.HP_intif_pGuildMessage_pre > 0) {
- void (*preHookFunc) (int *fd);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_intif_pGuildMessage_pre[hIndex].func;
- preHookFunc(&fd);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.intif.pGuildMessage(fd);
- }
- if (HPMHooks.count.HP_intif_pGuildMessage_post > 0) {
- void (*postHookFunc) (int fd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_intif_pGuildMessage_post[hIndex].func;
- postHookFunc(fd);
- }
- }
- return;
-}
void HP_intif_pGuildBasicInfoChanged(int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre > 0) {
@@ -57721,11 +57368,12 @@ void HP_npc_trader_update(int master) {
}
return;
}
-int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) {
+enum market_buy_result HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) {
+/* Unknown return type 'enum market_buy_result'. Initializing to '0'. */
int hIndex = 0;
- int retVal___ = 0;
+ enum market_buy_result retVal___ = 0;
if (HPMHooks.count.HP_npc_market_buylist_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list);
+ enum market_buy_result (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func;
@@ -57740,7 +57388,7 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis
retVal___ = HPMHooks.source.npc.market_buylist(sd, item_list);
}
if (HPMHooks.count.HP_npc_market_buylist_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list);
+ enum market_buy_result (*postHookFunc) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, item_list);
@@ -58971,33 +58619,6 @@ int HP_party_send_message(struct map_session_data *sd, const char *mes) {
}
return retVal___;
}
-int HP_party_recv_message(int party_id, int account_id, const char *mes, int len) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_party_recv_message_pre > 0) {
- int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_party_recv_message_pre[hIndex].func;
- retVal___ = preHookFunc(&party_id, &account_id, &mes, &len);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.party.recv_message(party_id, account_id, mes, len);
- }
- if (HPMHooks.count.HP_party_recv_message_post > 0) {
- int (*postHookFunc) (int retVal___, int party_id, int account_id, const char *mes, int len);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_party_recv_message_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, party_id, account_id, mes, len);
- }
- }
- return retVal___;
-}
int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) {
int hIndex = 0;
int retVal___ = 0;
@@ -61492,11 +61113,11 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill) {
+int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_addautobonus_pre > 0) {
- int (*preHookFunc) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned short *pos, bool *onskill);
+ int (*preHookFunc) (struct s_autobonus **bonus, char *max, const char **bonus_script, short *rate, unsigned int *dur, short *atk_type, const char **o_script, unsigned int *pos, bool *onskill);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func;
@@ -61511,7 +61132,7 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc
retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill);
}
if (HPMHooks.count.HP_pc_addautobonus_post > 0) {
- int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill);
+ int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned int pos, bool onskill);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_addautobonus_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill);
@@ -66363,6 +65984,66 @@ bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message
}
return retVal___;
}
+int HP_pc_wis_message_to_gm(const char *sender_name, int permission, const char *message) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_pc_wis_message_to_gm_pre > 0) {
+ int (*preHookFunc) (const char **sender_name, int *permission, const char **message);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_pre[hIndex].func;
+ retVal___ = preHookFunc(&sender_name, &permission, &message);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.wis_message_to_gm(sender_name, permission, message);
+ }
+ if (HPMHooks.count.HP_pc_wis_message_to_gm_post > 0) {
+ int (*postHookFunc) (int retVal___, const char *sender_name, int permission, const char *message);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sender_name, permission, message);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_wis_message_to_gm_sub(struct map_session_data *sd, va_list va) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd, va_list va);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre; hIndex++) {
+ va_list va___copy; va_copy(va___copy, va);
+ preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, va___copy);
+ va_end(va___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list va___copy; va_copy(va___copy, va);
+ retVal___ = HPMHooks.source.pc.wis_message_to_gm_sub(sd, va___copy);
+ va_end(va___copy);
+ }
+ if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_post; hIndex++) {
+ va_list va___copy; va_copy(va___copy, va);
+ postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, va___copy);
+ va_end(va___copy);
+ }
+ }
+ return retVal___;
+}
void HP_pc_check_supernovice_call(struct map_session_data *sd, const char *message) {
int hIndex = 0;
if (HPMHooks.count.HP_pc_check_supernovice_call_pre > 0) {
diff --git a/vcproj-12/char-server.vcxproj b/vcproj-16/char-server.vcxproj
index 284f38239..fd53a34ad 100644
--- a/vcproj-12/char-server.vcxproj
+++ b/vcproj-16/char-server.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -14,18 +14,19 @@
<ProjectGuid>{D356871D-58E1-450B-967A-E4E9646175AF}</ProjectGuid>
<RootNamespace>char-server</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -76,7 +77,6 @@
<AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
@@ -115,7 +115,6 @@
<AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
diff --git a/vcproj-12/char-server.vcxproj.filters b/vcproj-16/char-server.vcxproj.filters
index ab023a77f..ab023a77f 100644
--- a/vcproj-12/char-server.vcxproj.filters
+++ b/vcproj-16/char-server.vcxproj.filters
diff --git a/vcproj-12/login-server.vcxproj b/vcproj-16/login-server.vcxproj
index 325fe53c8..b5137bf29 100644
--- a/vcproj-12/login-server.vcxproj
+++ b/vcproj-16/login-server.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -14,18 +14,19 @@
<ProjectGuid>{D356871D-58E1-450B-967A-E5E9646175AF}</ProjectGuid>
<RootNamespace>login-server</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -76,7 +77,6 @@
<AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
@@ -119,7 +119,6 @@
<AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
diff --git a/vcproj-12/login-server.vcxproj.filters b/vcproj-16/login-server.vcxproj.filters
index 301950f0d..301950f0d 100644
--- a/vcproj-12/login-server.vcxproj.filters
+++ b/vcproj-16/login-server.vcxproj.filters
diff --git a/vcproj-12/map-server.vcxproj b/vcproj-16/map-server.vcxproj
index 34f55be49..8d84af347 100644
--- a/vcproj-12/map-server.vcxproj
+++ b/vcproj-16/map-server.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -14,18 +14,19 @@
<ProjectGuid>{D356871D-58E1-450B-967A-E6E9646175AF}</ProjectGuid>
<RootNamespace>map-server</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -75,7 +76,6 @@
<AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
@@ -114,7 +114,6 @@
<AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
diff --git a/vcproj-12/map-server.vcxproj.filters b/vcproj-16/map-server.vcxproj.filters
index aae670525..aae670525 100644
--- a/vcproj-12/map-server.vcxproj.filters
+++ b/vcproj-16/map-server.vcxproj.filters
diff --git a/vcproj-12/plugin-HPMHooking_char.vcxproj b/vcproj-16/plugin-HPMHooking_char.vcxproj
index 016d85c6f..22cd0ea42 100644
--- a/vcproj-12/plugin-HPMHooking_char.vcxproj
+++ b/vcproj-16/plugin-HPMHooking_char.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -15,17 +15,18 @@
<RootNamespace>plugin-HPMHooking_char</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-HPMHooking_char</ProjectName>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/vcproj-12/plugin-HPMHooking_login.vcxproj b/vcproj-16/plugin-HPMHooking_login.vcxproj
index 2b8f56cbf..9e3c872c6 100644
--- a/vcproj-12/plugin-HPMHooking_login.vcxproj
+++ b/vcproj-16/plugin-HPMHooking_login.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -15,17 +15,18 @@
<RootNamespace>plugin-HPMHooking_login</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-HPMHooking_login</ProjectName>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/vcproj-12/plugin-HPMHooking_map.vcxproj b/vcproj-16/plugin-HPMHooking_map.vcxproj
index 0fca64016..a4616b15e 100644
--- a/vcproj-12/plugin-HPMHooking_map.vcxproj
+++ b/vcproj-16/plugin-HPMHooking_map.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -15,17 +15,18 @@
<RootNamespace>plugin-HPMHooking_map</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-HPMHooking_map</ProjectName>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/vcproj-12/plugin-sample.vcxproj b/vcproj-16/plugin-sample.vcxproj
index ea269b1e7..c78972666 100644
--- a/vcproj-12/plugin-sample.vcxproj
+++ b/vcproj-16/plugin-sample.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -15,17 +15,18 @@
<RootNamespace>plugin-sample</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>plugin-sample</ProjectName>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
+ <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">