summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt20
-rw-r--r--src/char/CMakeLists.txt62
-rw-r--r--src/char/Makefile.in13
-rw-r--r--src/char/char.c127
-rw-r--r--src/char/char.h7
-rw-r--r--src/char/int_auction.c33
-rw-r--r--src/char/int_auction.h6
-rw-r--r--src/char/int_elemental.c22
-rw-r--r--src/char/int_elemental.h8
-rw-r--r--src/char/int_guild.c84
-rw-r--r--src/char/int_guild.h9
-rw-r--r--src/char/int_homun.c25
-rw-r--r--src/char/int_homun.h8
-rw-r--r--src/char/int_mail.c24
-rw-r--r--src/char/int_mail.h9
-rw-r--r--src/char/int_mercenary.c22
-rw-r--r--src/char/int_mercenary.h10
-rw-r--r--src/char/int_party.c35
-rw-r--r--src/char/int_party.h10
-rw-r--r--src/char/int_pet.c62
-rw-r--r--src/char/int_pet.h6
-rw-r--r--src/char/int_quest.c24
-rw-r--r--src/char/int_quest.h6
-rw-r--r--src/char/int_storage.c22
-rw-r--r--src/char/int_storage.h6
-rw-r--r--src/char/inter.c201
-rw-r--r--src/char/inter.h24
-rw-r--r--src/char/pincode.c13
-rw-r--r--src/char/pincode.h6
-rw-r--r--src/common/CMakeLists.txt170
-rw-r--r--src/common/HPM.c42
-rw-r--r--src/common/HPM.h14
-rw-r--r--src/common/HPMDataCheck.h144
-rw-r--r--src/common/HPMi.h36
-rw-r--r--src/common/Makefile.in32
-rw-r--r--src/common/atomic.h20
-rw-r--r--src/common/cbasetypes.h46
-rw-r--r--src/common/conf.c3
-rw-r--r--src/common/conf.h9
-rw-r--r--src/common/console.c238
-rw-r--r--src/common/console.h33
-rw-r--r--src/common/core.c203
-rw-r--r--src/common/core.h21
-rw-r--r--src/common/db.c188
-rw-r--r--src/common/db.h61
-rw-r--r--src/common/des.c7
-rw-r--r--src/common/des.h7
-rw-r--r--src/common/ers.c64
-rw-r--r--src/common/ers.h36
-rw-r--r--src/common/evdp.h168
-rw-r--r--src/common/evdp_epoll.c232
-rw-r--r--src/common/grfio.c29
-rw-r--r--src/common/grfio.h6
-rw-r--r--src/common/malloc.c69
-rw-r--r--src/common/malloc.h6
-rw-r--r--src/common/mapindex.c17
-rw-r--r--src/common/mapindex.h6
-rw-r--r--src/common/md5calc.c8
-rw-r--r--src/common/md5calc.h6
-rw-r--r--src/common/mempool.c568
-rw-r--r--src/common/mempool.h100
-rw-r--r--src/common/mmo.h157
-rw-r--r--src/common/mutex.c30
-rw-r--r--src/common/mutex.h79
-rw-r--r--src/common/netbuffer.c221
-rw-r--r--src/common/netbuffer.h81
-rw-r--r--src/common/network.c1061
-rw-r--r--src/common/network.h189
-rw-r--r--src/common/nullpo.c8
-rw-r--r--src/common/nullpo.h6
-rw-r--r--src/common/raconf.c583
-rw-r--r--src/common/raconf.h59
-rw-r--r--src/common/random.c19
-rw-r--r--src/common/random.h6
-rw-r--r--src/common/showmsg.c87
-rw-r--r--src/common/showmsg.h35
-rw-r--r--src/common/socket.c96
-rw-r--r--src/common/socket.h22
-rw-r--r--src/common/spinlock.h33
-rw-r--r--src/common/sql.c27
-rw-r--r--src/common/sql.h21
-rw-r--r--src/common/strlib.c59
-rw-r--r--src/common/strlib.h34
-rw-r--r--src/common/sysinfo.c1061
-rw-r--r--src/common/sysinfo.h51
-rw-r--r--src/common/thread.c129
-rw-r--r--src/common/thread.h79
-rw-r--r--src/common/timer.c43
-rw-r--r--src/common/timer.h10
-rw-r--r--src/common/utils.c94
-rw-r--r--src/common/utils.h19
-rw-r--r--src/common/winapi.h4
-rw-r--r--src/config/classes/general.h6
-rw-r--r--src/config/const.h23
-rw-r--r--src/config/core.h14
-rw-r--r--src/config/renewal.h19
-rw-r--r--src/config/secure.h8
-rw-r--r--src/login/CMakeLists.txt12
-rw-r--r--src/login/Makefile.in13
-rw-r--r--src/login/account.h9
-rw-r--r--src/login/account_sql.c19
-rw-r--r--src/login/ipban.h6
-rw-r--r--src/login/ipban_sql.c14
-rw-r--r--src/login/login.c60
-rw-r--r--src/login/login.h10
-rw-r--r--src/login/loginlog.h8
-rw-r--r--src/login/loginlog_sql.c11
-rw-r--r--src/login/sql/CMakeLists.txt39
-rw-r--r--src/map/CMakeLists.txt12
-rw-r--r--src/map/HPMmap.c42
-rw-r--r--src/map/HPMmap.h6
-rw-r--r--src/map/Makefile.in13
-rw-r--r--src/map/atcommand.c511
-rw-r--r--src/map/atcommand.h8
-rw-r--r--src/map/battle.c285
-rw-r--r--src/map/battle.h37
-rw-r--r--src/map/battleground.c37
-rw-r--r--src/map/battleground.h8
-rw-r--r--src/map/buyingstore.c17
-rw-r--r--src/map/buyingstore.h11
-rw-r--r--src/map/chat.c31
-rw-r--r--src/map/chat.h15
-rw-r--r--src/map/chrif.c65
-rw-r--r--src/map/chrif.h14
-rw-r--r--src/map/clif.c323
-rw-r--r--src/map/clif.h36
-rw-r--r--src/map/date.c6
-rw-r--r--src/map/date.h8
-rw-r--r--src/map/duel.c14
-rw-r--r--src/map/duel.h12
-rw-r--r--src/map/elemental.c60
-rw-r--r--src/map/elemental.h9
-rw-r--r--src/map/guild.c139
-rw-r--r--src/map/guild.h34
-rw-r--r--src/map/homunculus.c79
-rw-r--r--src/map/homunculus.h10
-rw-r--r--src/map/instance.c34
-rw-r--r--src/map/instance.h9
-rw-r--r--src/map/intif.c93
-rw-r--r--src/map/intif.h23
-rw-r--r--src/map/irc-bot.c22
-rw-r--r--src/map/irc-bot.h8
-rw-r--r--src/map/itemdb.c562
-rw-r--r--src/map/itemdb.h58
-rw-r--r--src/map/log.c23
-rw-r--r--src/map/log.h11
-rw-r--r--src/map/mail.c16
-rw-r--r--src/map/mail.h12
-rw-r--r--src/map/map.c225
-rw-r--r--src/map/map.h46
-rw-r--r--src/map/mapreg.h6
-rw-r--r--src/map/mapreg_sql.c14
-rw-r--r--src/map/mercenary.c56
-rw-r--r--src/map/mercenary.h9
-rw-r--r--src/map/mob.c217
-rw-r--r--src/map/mob.h21
-rw-r--r--src/map/npc.c560
-rw-r--r--src/map/npc.h30
-rw-r--r--src/map/npc_chat.c65
-rw-r--r--src/map/packets.h240
-rw-r--r--src/map/packets_struct.h11
-rw-r--r--src/map/party.c49
-rw-r--r--src/map/party.h15
-rw-r--r--src/map/path.c21
-rw-r--r--src/map/path.h7
-rw-r--r--src/map/pc.c257
-rw-r--r--src/map/pc.h51
-rw-r--r--src/map/pc_groups.c16
-rw-r--r--src/map/pc_groups.h10
-rw-r--r--src/map/pet.c133
-rw-r--r--src/map/pet.h18
-rw-r--r--src/map/quest.c45
-rw-r--r--src/map/quest.h10
-rw-r--r--src/map/script.c449
-rw-r--r--src/map/script.h22
-rw-r--r--src/map/searchstore.c11
-rw-r--r--src/map/searchstore.h12
-rw-r--r--src/map/skill.c659
-rw-r--r--src/map/skill.h179
-rw-r--r--src/map/sql/CMakeLists.txt118
-rw-r--r--src/map/status.c486
-rw-r--r--src/map/status.h1615
-rw-r--r--src/map/storage.c47
-rw-r--r--src/map/storage.h13
-rw-r--r--src/map/trade.c52
-rw-r--r--src/map/trade.h6
-rw-r--r--src/map/unit.c271
-rw-r--r--src/map/unit.h22
-rw-r--r--src/map/vending.c29
-rw-r--r--src/map/vending.h11
-rw-r--r--src/plugins/CMakeLists.txt36
-rw-r--r--src/plugins/HPMHooking.c53
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc76
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc19
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc3187
-rw-r--r--src/plugins/Makefile.in7
-rw-r--r--src/plugins/db2sql.c274
-rw-r--r--src/plugins/dbghelpplug.c192
-rw-r--r--src/plugins/sample.c10
-rw-r--r--src/test/Makefile.in29
-rw-r--r--src/test/test_spinlock.c21
-rw-r--r--src/tool/CMakeLists.txt45
-rw-r--r--src/tool/Makefile.in33
-rw-r--r--src/tool/mapcache.c73
204 files changed, 11121 insertions, 9948 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644
index 0c120f99a..000000000
--- a/src/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# setup and static libraries
-#
-add_subdirectory( common )
-if( HAVE_common_sql )
- option( BUILD_SQL_SERVERS "build sql server executables" ON )
-else()
- message( STATUS "Disabled sql server targets (requires common_sql)" )
-endif()
-
-
-#
-# targets
-#
-add_subdirectory( login )
-add_subdirectory( char )
-add_subdirectory( map )
-add_subdirectory( tool )
-add_subdirectory( plugins )
diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt
deleted file mode 100644
index 9413ff303..000000000
--- a/src/char/CMakeLists.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-
-#
-# setup
-#
-set( SQL_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
-
-
-#
-# char sql
-#
-if( BUILD_SQL_SERVERS )
-message( STATUS "Creating target char-server" )
-set( SQL_CHAR_HEADERS
- "${CMAKE_CURRENT_SOURCE_DIR}/char.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_auction.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_elemental.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_mail.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_mercenary.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_party.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_quest.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/inter.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/pincode.h"
- )
-set( SQL_CHAR_SOURCES
- "${CMAKE_CURRENT_SOURCE_DIR}/char.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_auction.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_elemental.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_mail.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_mercenary.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_party.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_quest.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/inter.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/pincode.c"
- )
-set( DEPENDENCIES common_sql )
-set( LIBRARIES ${GLOBAL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" )
-set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} )
-source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
-source_group( char FILES ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} )
-include_directories( ${INCLUDE_DIRS} )
-add_executable( char-server ${SOURCE_FILES} )
-add_dependencies( char-server ${DEPENDENCIES} )
-target_link_libraries( char-server ${LIBRARIES} ${DEPENDENCIES} )
-set_target_properties( char-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server" GROUP Runtime )
- install( TARGETS char-server
- DESTINATION "."
- COMPONENT Runtime_charserver_sql )
-endif( INSTALL_COMPONENT_RUNTIME )
-message( STATUS "Creating target char-server - done" )
-endif( BUILD_SQL_SERVERS )
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index ab1e7c234..59dc56076 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -1,9 +1,14 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
+# @configure_input@
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -27,7 +32,7 @@ CHAR_H = char.h inter.h int_auction.h int_elemental.h int_guild.h int_homun.h \
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ)
+ CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
else
CHAR_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -66,6 +71,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/char/Makefile
+$(SYSINFO_INC): $(CHAR_C) $(CHAR_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
@@ -89,7 +98,7 @@ char-server: ../../char-server@EXEEXT@
obj_sql/%.o: %.c $(CHAR_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_sql
@echo " CC $<"
- @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/char/char.c b/src/char/char.c
index 1820c4b0c..fe17fd14f 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2,7 +2,30 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "../config/core.h" // CONSOLE_INPUT
+#include "char.h"
+
+#include <signal.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+
+#include "int_elemental.h"
+#include "int_guild.h"
+#include "int_homun.h"
+#include "int_mercenary.h"
+#include "int_party.h"
+#include "int_storage.h"
+#include "inter.h"
+#include "pincode.h"
+#include "../common/HPM.h"
#include "../common/cbasetypes.h"
+#include "../common/console.h"
#include "../common/core.h"
#include "../common/db.h"
#include "../common/malloc.h"
@@ -13,25 +36,6 @@
#include "../common/strlib.h"
#include "../common/timer.h"
#include "../common/utils.h"
-#include "../common/console.h"
-#include "../common/HPM.h"
-#include "int_guild.h"
-#include "int_homun.h"
-#include "int_mercenary.h"
-#include "int_elemental.h"
-#include "int_party.h"
-#include "int_storage.h"
-#include "char.h"
-#include "inter.h"
-#include "pincode.h"
-
-#include <sys/types.h>
-#include <time.h>
-#include <signal.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
// private declarations
#define CHAR_CONF_NAME "conf/char-server.conf"
@@ -114,7 +118,7 @@ bool char_new = true;
int char_new_display = 0;
bool name_ignoring_case = false; // Allow or not identical name for characters but with a different case by [Yor]
-int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
+int char_name_option = 0; // Option to know which letters/symbols are authorized in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
char unknown_char_name[NAME_LENGTH] = "Unknown"; // Name to use when the requested name cannot be determined
#define TRIM_CHARS "\255\xA0\032\t\x0A\x0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) in a character name. by [Yor]
@@ -122,8 +126,8 @@ char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) i
int char_del_level = 0; //From which level u can delete character [Lupus]
int char_del_delay = 86400;
-int log_char = 1; // loggin char or not [devil]
-int log_inter = 1; // loggin inter or not [devil]
+int log_char = 1; // logging char or not [devil]
+int log_inter = 1; // logging inter or not [devil]
int char_aegis_delete = 0; // Verify if char is in guild/party or char and reacts as Aegis does (doesn't allow deletion), see char_delete2_req for more information
@@ -469,7 +473,8 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus* p)
(p->ele_id != cp->ele_id) || (p->shield != cp->shield) || (p->head_top != cp->head_top) ||
(p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) || (p->delete_date != cp->delete_date) ||
(p->rename != cp->rename) || (p->slotchange != cp->slotchange) || (p->robe != cp->robe) ||
- (p->show_equip != cp->show_equip) || (p->allow_party != cp->allow_party) || (p->font != cp->font)
+ (p->show_equip != cp->show_equip) || (p->allow_party != cp->allow_party) || (p->font != cp->font) ||
+ (p->uniqueitem_counter != cp->uniqueitem_counter )
) { //Save status
unsigned int opt = 0;
@@ -485,7 +490,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus* p)
"`option`='%d',`party_id`='%d',`guild_id`='%d',`pet_id`='%d',`homun_id`='%d',`elemental_id`='%d',"
"`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d',"
"`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d', `rename`='%d',"
- "`delete_date`='%lu',`robe`='%d',`slotchange`='%d', `char_opt`='%u', `font`='%u'"
+ "`delete_date`='%lu',`robe`='%d',`slotchange`='%d', `char_opt`='%u', `font`='%u', `uniqueitem_counter` ='%u'"
" WHERE `account_id`='%d' AND `char_id` = '%d'",
char_db, p->base_level, p->job_level,
p->base_exp, p->job_exp, p->zeny,
@@ -496,7 +501,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus* p)
mapindex_id2name(p->last_point.map), p->last_point.x, p->last_point.y,
mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y, p->rename,
(unsigned long)p->delete_date, // FIXME: platform-dependent size
- p->robe,p->slotchange,opt,p->font,
+ p->robe,p->slotchange,opt,p->font,p->uniqueitem_counter,
p->account_id, p->char_id) )
{
Sql_ShowDebug(sql_handle);
@@ -792,7 +797,7 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit
StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `bound`='%d'",
tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound);
for( j = 0; j < MAX_SLOTS; ++j )for( j = 0; j < MAX_SLOTS; ++j )
- StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]);
+ StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]);
StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id);
if( SQL_ERROR == SQL->QueryStr(sql_handle, StrBuf->Value(&buf)) )
@@ -841,10 +846,7 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit
for( j = 0; j < MAX_SLOTS; ++j )
StrBuf->Printf(&buf, ", '%d'", items[i].card[j]);
StrBuf->AppendStr(&buf, ")");
-
- updateLastUid(items[i].unique_id); // Unique Non Stackable Item ID
}
- dbUpdateUid(sql_handle); // Unique Non Stackable Item ID
if( found && SQL_ERROR == SQL->QueryStr(sql_handle, StrBuf->Value(&buf)) )
{
@@ -982,10 +984,7 @@ int inventory_to_sql(const struct item items[], int max, int id) {
for( j = 0; j < MAX_SLOTS; ++j )
StrBuf->Printf(&buf, ", '%d'", items[i].card[j]);
StrBuf->AppendStr(&buf, ")");
-
- updateLastUid(items[i].unique_id);// Unique Non Stackable Item ID
}
- dbUpdateUid(sql_handle);
if( found && SQL_ERROR == SQL->QueryStr(sql_handle, StrBuf->Value(&buf)) ) {
Sql_ShowDebug(sql_handle);
@@ -1130,7 +1129,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
"`status_point`,`skill_point`,`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`homun_id`,`elemental_id`,`hair`,"
"`hair_color`,`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`last_x`,`last_y`,"
"`save_map`,`save_x`,`save_y`,`partner_id`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`robe`,`slotchange`,"
- "`char_opt`,`font`"
+ "`char_opt`,`font`,`uniqueitem_counter`"
" FROM `%s` WHERE `char_id`=? LIMIT 1", char_db)
|| SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|| SQL_ERROR == SQL->StmtExecute(stmt)
@@ -1189,6 +1188,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 52, SQLDT_USHORT, &p->slotchange, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 53, SQLDT_UINT, &opt, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 54, SQLDT_UCHAR, &p->font, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 55, SQLDT_UINT, &p->uniqueitem_counter, 0, NULL, NULL)
)
{
SqlStmt_ShowDebug(stmt);
@@ -1387,7 +1387,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
if( SQL_SUCCESS == SQL->StmtNextRow(stmt) )
strcat(t_msg, " accdata");
- if (save_log) ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfuly!
+ if (save_log) ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfully!
SQL->StmtFree(stmt);
StrBuf->Destroy(&buf);
@@ -1413,7 +1413,7 @@ int mmo_char_sql_init(void)
//and send the loginserver the new state....
// Force all users offline in sql when starting char-server
- // (useful when servers crashs and don't clean the database)
+ // (useful when servers crashes and don't clean the database)
set_all_offline_sql();
return 0;
@@ -1468,7 +1468,7 @@ bool char_slotchange(struct char_session_data *sd, int fd, unsigned short from,
}
//-----------------------------------
-// Function to change chararcter's names
+// Function to change character's names
//-----------------------------------
int rename_char_sql(struct char_session_data *sd, int char_id)
{
@@ -1540,9 +1540,9 @@ int check_char_name(char * name, char * esc_name)
if( strcmpi(name, wisp_server_name) == 0 )
return -1; // nick reserved for internal server messages
- // Check Authorised letters/symbols in the name of the character
+ // Check Authorized letters/symbols in the name of the character
if( char_name_option == 1 )
- { // only letters/symbols in char_name_letters are authorised
+ { // only letters/symbols in char_name_letters are authorized
for( i = 0; i < NAME_LENGTH && name[i]; i++ )
if( strchr(char_name_letters, name[i]) == NULL )
return -2;
@@ -1576,7 +1576,7 @@ int check_char_name(char * name, char * esc_name)
* -1: 'Charname already exists'
* -2: 'Char creation denied'/ Unknown error
* -3: 'You are underaged'
- * -4: 'You are not elegible to open the Character Slot.'
+ * -4: 'You are not eligible to open the Character Slot.'
* -5: 'Symbols in Character Names are forbidden'
* char_id: Success
**/
@@ -1674,7 +1674,7 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag
{
if( SQL_ERROR == SQL->Query(sql_handle,
"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `identify`) VALUES ('%d', '%d', '%d', '%d')",
- inventory_db, char_id, start_items[k], 1, 1)
+ inventory_db, char_id, start_items[k], 1, 1)
)
Sql_ShowDebug(sql_handle);
}
@@ -1780,7 +1780,7 @@ int delete_char_sql(int char_id)
/* delete char's pet */
//Delete the hatched pet if you have one...
- if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d' AND `incuvate` = '0'", pet_db, char_id) )
+ if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d' AND `incubate` = '0'", pet_db, char_id) )
Sql_ShowDebug(sql_handle);
//Delete all pets that are stored in eggs (inventory + cart)
@@ -2048,7 +2048,7 @@ int mmo_char_send006b(int fd, struct char_session_data* sd)
int j, offset = 0;
#if PACKETVER >= 20100413
offset += 3;
-#endif
+#endif
if (save_log)
ShowInfo("Loading Char Data ("CL_BOLD"%d"CL_RESET")\n",sd->account_id);
@@ -2202,7 +2202,7 @@ void mapif_server_reset(int id);
void loginif_reset(void)
{
int id;
- // TODO kick everyone out and reset everything or wait for connect and try to reaquire locks [FlavioJS]
+ // TODO kick everyone out and reset everything or wait for connect and try to reacquire locks [FlavioJS]
for( id = 0; id < ARRAYLENGTH(server); ++id )
mapif_server_reset(id);
flush_fifos();
@@ -2286,7 +2286,7 @@ int parse_fromlogin(int fd) {
switch( command ) {
- // acknowledgement of connect-to-loginserver request
+ // acknowledgment of connect-to-loginserver request
case 0x2711:
if (RFIFOREST(fd) < 3)
return 0;
@@ -2306,7 +2306,7 @@ int parse_fromlogin(int fd) {
RFIFOSKIP(fd,3);
break;
- // acknowledgement of account authentication request
+ // acknowledgment of account authentication request
case 0x2713:
if (RFIFOREST(fd) < 33)
return 0;
@@ -2526,7 +2526,7 @@ int parse_fromlogin(int fd) {
unsigned char buf[11];
WBUFW(buf,0) = 0x2b14;
WBUFL(buf,2) = RFIFOL(fd,2);
- WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of statut, 1: ban
+ WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of status, 1: ban
WBUFL(buf,7) = RFIFOL(fd,7); // status or final date of a banishment
mapif_sendall(buf, 11);
}
@@ -3161,7 +3161,7 @@ int parse_frommap(int fd)
memcpy(&char_dat, RFIFOP(fd,13), sizeof(struct mmo_charstatus));
mmo_char_tosql(cid, &char_dat);
} else { //This may be valid on char-server reconnection, when re-sending characters that already logged off.
- ShowError("parse_from_map (save-char): Received data for non-existant/offline character (%d:%d).\n", aid, cid);
+ ShowError("parse_from_map (save-char): Received data for non-existing/offline character (%d:%d).\n", aid, cid);
set_char_online(id, cid, aid);
}
@@ -3978,7 +3978,7 @@ static void char_delete2_req(int fd, struct char_session_data* sd)
// see issue: 7338
if( char_aegis_delete )
{
- if( SQL_SUCCESS != SQL->Query(sql_handle, "SELECT `party_id`, `guild_id` FROM `%s` WHERE `char_id`='%d'", char_db, char_id)
+ if( SQL_SUCCESS != SQL->Query(sql_handle, "SELECT `party_id`, `guild_id` FROM `%s` WHERE `char_id`='%d'", char_db, char_id)
|| SQL_SUCCESS != SQL->NextRow(sql_handle)
)
{
@@ -4174,7 +4174,7 @@ int parse_char(int fd)
ShowInfo("request connect - account_id:%d/login_id1:%d/login_id2:%d\n", account_id, login_id1, login_id2);
if (sd) {
- //Received again auth packet for already authentified account?? Discard it.
+ //Received again auth packet for already authenticated account?? Discard it.
//TODO: Perhaps log this as a hack attempt?
//TODO: and perhaps send back a reply?
break;
@@ -4201,7 +4201,7 @@ int parse_char(int fd)
break;
}
- // search authentification
+ // search authentication
node = (struct auth_node*)idb_get(auth_db, account_id);
if( node != NULL &&
node->account_id == account_id &&
@@ -4232,7 +4232,7 @@ int parse_char(int fd)
{// authentication not found (coming from login server)
if (login_fd > 0) { // don't send request if no login-server
WFIFOHEAD(login_fd,23);
- WFIFOW(login_fd,0) = 0x2712; // ask login-server to authentify an account
+ WFIFOW(login_fd,0) = 0x2712; // ask login-server to authenticate an account
WFIFOL(login_fd,2) = sd->account_id;
WFIFOL(login_fd,6) = sd->login_id1;
WFIFOL(login_fd,10) = sd->login_id2;
@@ -4268,7 +4268,7 @@ int parse_char(int fd)
#if PACKETVER >= 20110309
if( *pincode->enabled ){ // hack check
- struct online_char_data* character;
+ struct online_char_data* character;
character = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
if( character && character->pincode_enable == -1){
WFIFOHEAD(fd,3);
@@ -4317,7 +4317,7 @@ int parse_char(int fd)
break;
}
- /* set char as online prior to loading its data so 3rd party applications will realise the sql data is not reliable */
+ /* set char as online prior to loading its data so 3rd party applications will realize the sql data is not reliable */
set_char_online(-2,char_id,sd->account_id);
if( !mmo_char_fromsql(char_id, &char_dat, true) ) { /* failed? set it back offline */
set_char_offline(char_id, sd->account_id);
@@ -4459,13 +4459,13 @@ int parse_char(int fd)
WFIFOW(fd,0) = 0x6e;
/* Others I found [Ind] */
/* 0x02 = Symbols in Character Names are forbidden */
- /* 0x03 = You are not elegible to open the Character Slot. */
+ /* 0x03 = You are not eligible to open the Character Slot. */
/* 0x0B = This service is only available for premium users. */
switch (result) {
case -1: WFIFOB(fd,2) = 0x00; break; // 'Charname already exists'
case -2: WFIFOB(fd,2) = 0xFF; break; // 'Char creation denied'
case -3: WFIFOB(fd,2) = 0x01; break; // 'You are underaged'
- case -4: WFIFOB(fd,2) = 0x03; break; // 'You are not elegible to open the Character Slot.'
+ case -4: WFIFOB(fd,2) = 0x03; break; // 'You are not eligible to open the Character Slot.'
case -5: WFIFOB(fd,2) = 0x02; break; // 'Symbols in Character Names are forbidden'
default:
@@ -4508,7 +4508,7 @@ int parse_char(int fd)
int i;
#if PACKETVER >= 20110309
if( *pincode->enabled ){ // hack check
- struct online_char_data* character;
+ struct online_char_data* character;
character = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
if( character && character->pincode_enable == -1 ){
WFIFOHEAD(fd,3);
@@ -4641,7 +4641,7 @@ int parse_char(int fd)
//Confirm change name.
// 0x28f <char_id>.L
case 0x28f:
- // 0: Sucessfull
+ // 0: Successful
// 1: This character's name has already been changed. You cannot change a character's name more than once.
// 2: User information is not correct.
// 3: You have failed to change this character's name.
@@ -4746,7 +4746,7 @@ int parse_char(int fd)
RFIFOSKIP(fd,60);
}
- return 0; // avoid processing of followup packets here
+ return 0; // avoid processing of follow-up packets here
// checks the entered pin
case 0x8b8:
@@ -5006,8 +5006,8 @@ static int online_data_cleanup(int tid, int64 tick, int id, intptr_t data) {
}
//----------------------------------
-// Reading Lan Support configuration
-// Rewrote: Anvanced subnet check [LuzZza]
+// Reading LAN Support configuration
+// Rewrote: Advanced subnet check [LuzZza]
//----------------------------------
int char_lan_config_read(const char *lancfgName)
{
@@ -5340,7 +5340,7 @@ int char_config_read(const char* cfgName)
return 0;
}
-void do_final(void) {
+int do_final(void) {
int i;
ShowStatus("Terminating...\n");
@@ -5377,6 +5377,7 @@ void do_final(void) {
aFree(server[i].map);
ShowStatus("Finished.\n");
+ return EXIT_SUCCESS;
}
//------------------------------
@@ -5478,7 +5479,7 @@ int do_init(int argc, char **argv) {
timer->add_func_list(online_data_cleanup, "online_data_cleanup");
timer->add_interval(timer->gettick() + 1000, online_data_cleanup, 0, 0, 600 * 1000);
- //Cleaning the tables for NULL entrys @ startup [Sirius]
+ //Cleaning the tables for NULL entries @ startup [Sirius]
//Chardb clean
if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '0'", char_db) )
Sql_ShowDebug(sql_handle);
@@ -5500,7 +5501,7 @@ int do_init(int argc, char **argv) {
Sql_HerculesUpdateCheck(sql_handle);
#ifdef CONSOLE_INPUT
- console->setSQL(sql_handle);
+ console->input->setSQL(sql_handle);
#endif
ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port);
diff --git a/src/char/char.h b/src/char/char.h
index 2928929de..5a70d2ca7 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -2,10 +2,9 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_CHAR_H_
-#define _COMMON_CHAR_H_
+#ifndef COMMON_CHAR_H
+#define COMMON_CHAR_H
-#include "../config/core.h"
#include "../common/core.h" // CORE_ST_LAST
#include "../common/db.h"
@@ -124,4 +123,4 @@ void global_accreg_to_login_start (int account_id, int char_id);
void global_accreg_to_login_send (void);
void global_accreg_to_login_add (const char *key, unsigned int index, intptr_t val, bool is_string);
-#endif /* _COMMON_CHAR_H_ */
+#endif /* COMMON_CHAR_H */
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index 47f3421c3..8cd870647 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -2,22 +2,25 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/malloc.h"
+#define HERCULES_CORE
+
+#include "int_auction.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "char.h"
+#include "int_mail.h"
+#include "inter.h"
#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
#include "../common/socket.h"
-#include "../common/strlib.h"
#include "../common/sql.h"
+#include "../common/strlib.h"
#include "../common/timer.h"
-#include "char.h"
-#include "inter.h"
-#include "int_mail.h"
-#include "int_auction.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data*
@@ -90,10 +93,6 @@ unsigned int auction_create(struct auction_data *auction)
for( j = 0; j < MAX_SLOTS; j++ )
StrBuf->Printf(&buf, ",'%d'", auction->item.card[j]);
StrBuf->AppendStr(&buf, ")");
-
- //Unique Non Stackable Item ID
- updateLastUid(auction->item.unique_id);
- dbUpdateUid(sql_handle);
stmt = SQL->StmtMalloc(sql_handle);
if( SQL_SUCCESS != SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
@@ -231,7 +230,7 @@ void inter_auctions_fromsql(void)
if( auction->timestamp > now )
endtick = ((int64)(auction->timestamp - now) * 1000) + tick;
else
- endtick = tick + 10000; // 10 Second's to process ended auctions
+ endtick = tick + 10000; // 10 seconds to process ended auctions
auction->auction_end_timer = timer->add(endtick, auction_end_timer, auction->auction_id, 0);
idb_put(auction_db_, auction->auction_id, auction);
@@ -269,7 +268,7 @@ static void mapif_parse_Auction_requestlist(int fd)
for( auction = dbi_first(iter); dbi_exists(iter); auction = dbi_next(iter) )
{
- if( (type == 0 && auction->type != IT_ARMOR && auction->type != IT_PETARMOR) ||
+ if( (type == 0 && auction->type != IT_ARMOR && auction->type != IT_PETARMOR) ||
(type == 1 && auction->type != IT_WEAPON) ||
(type == 2 && auction->type != IT_CARD) ||
(type == 3 && auction->type != IT_ETC) ||
diff --git a/src/char/int_auction.h b/src/char/int_auction.h
index f10794f73..17fd75a58 100644
--- a/src/char/int_auction.h
+++ b/src/char/int_auction.h
@@ -1,12 +1,12 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_AUCTION_H_
-#define _CHAR_INT_AUCTION_H_
+#ifndef CHAR_INT_AUCTION_H
+#define CHAR_INT_AUCTION_H
int inter_auction_parse_frommap(int fd);
int inter_auction_sql_init(void);
void inter_auction_sql_final(void);
-#endif /* _CHAR_INT_AUCTION_H_ */
+#endif /* CHAR_INT_AUCTION_H */
diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c
index ed0c2a9ed..3a36e75a2 100644
--- a/src/char/int_elemental.c
+++ b/src/char/int_elemental.c
@@ -2,20 +2,24 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/utils.h"
-#include "../common/sql.h"
-#include "char.h"
-#include "inter.h"
+#define HERCULES_CORE
+
+#include "int_elemental.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "char.h"
+#include "inter.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/sql.h"
+#include "../common/strlib.h"
+#include "../common/utils.h"
+
bool mapif_elemental_save(struct s_elemental* ele) {
bool flag = true;
diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h
index c90891fc4..e28cfedea 100644
--- a/src/char/int_elemental.h
+++ b/src/char/int_elemental.h
@@ -1,10 +1,10 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_ELEMENTAL_H_
-#define _CHAR_INT_ELEMENTAL_H_
+#ifndef CHAR_INT_ELEMENTAL_H
+#define CHAR_INT_ELEMENTAL_H
-struct s_elemental;
+#include "../common/cbasetypes.h"
void inter_elemental_sql_init(void);
void inter_elemental_sql_final(void);
@@ -12,4 +12,4 @@ int inter_elemental_parse_frommap(int fd);
bool mapif_elemental_delete(int ele_id);
-#endif /* _CHAR_INT_ELEMENTAL_H_ */
+#endif /* CHAR_INT_ELEMENTAL_H */
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 28b803027..a6fcfe48c 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -2,21 +2,25 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "../config/core.h" // DBPATH
+#include "int_guild.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "char.h"
+#include "inter.h"
#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/malloc.h"
-#include "../common/socket.h"
#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
+#include "../common/socket.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "char.h"
-#include "inter.h"
-#include "int_guild.h"
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
#define GS_MEMBER_UNMODIFIED 0x00
#define GS_MEMBER_MODIFIED 0x01
@@ -113,7 +117,7 @@ int inter_guild_tosql(struct guild *g,int flag)
// GS_EXPULSION `guild_expulsion` (`guild_id`,`account_id`,`name`,`mes`)
// GS_SKILL `guild_skill` (`guild_id`,`id`,`lv`)
- // temporary storage for str convertion. They must be twice the size of the
+ // temporary storage for str conversion. They must be twice the size of the
// original string to ensure no overflows will occur. [Skotlex]
char t_info[256];
char esc_name[NAME_LENGTH*2+1];
@@ -832,7 +836,7 @@ int guild_calcinfo(struct guild *g)
// Save next exp step
g->next_exp = nextexp;
- // Set the max number of members, Guild Extention skill - currently adds 6 to max per skill lv.
+ // Set the max number of members, Guild Extension skill - currently adds 6 to max per skill lv.
g->max_member = 16 + guild_checkskill(g, GD_EXTENSION) * 6;
if(g->max_member > MAX_GUILD)
{
@@ -1138,8 +1142,8 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member
mapif_guild_created(fd,account_id,NULL);
return 0;
}
- // Check Authorised letters/symbols in the name of the character
- if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised
+ // Check Authorized letters/symbols in the name of the character
+ if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized
for (i = 0; i < NAME_LENGTH && name[i]; i++)
if (strchr(char_name_letters, name[i]) == NULL) {
mapif_guild_created(fd,account_id,NULL);
@@ -1208,7 +1212,7 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member
// Return guild info to client
int mapif_parse_GuildInfo(int fd,int guild_id)
{
- struct guild * g = inter_guild_fromsql(guild_id); //We use this because on start-up the info of castle-owned guilds is requied. [Skotlex]
+ struct guild * g = inter_guild_fromsql(guild_id); //We use this because on start-up the info of castle-owned guilds is required. [Skotlex]
if(g)
{
if (!guild_calcinfo(g))
@@ -1421,29 +1425,61 @@ int mapif_parse_GuildMessage(int fd,int guild_id,int account_id,char *mes,int le
return mapif_guild_message(guild_id,account_id,mes,len, fd);
}
-// Modification of the guild
+/**
+ * Changes basic guild information
+ * The types are available in mmo.h::guild_basic_info
+ **/
int mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len) {
struct guild *g;
- short value = *((const int16 *)data);
+ struct guild_skill gd_skill;
+ short value;
g = inter_guild_fromsql(guild_id);
- if(g==NULL)
+
+ if( g == NULL )
return 0;
switch(type) {
+ case GBI_EXP:
+ value = *((const int16 *)data);
+ if( value < 0 && abs(value) > g->exp )
+ return 0;
+ g->exp += value;
+ guild_calcinfo(g);
+ break;
+
case GBI_GUILDLV:
+ value = *((const int16 *)data);
if (value > 0 && g->guild_lv + value <= MAX_GUILDLEVEL) {
g->guild_lv += value;
g->skill_point += value;
} else if (value < 0 && g->guild_lv + value >= 1)
g->guild_lv += value;
- mapif_guild_info(-1,g);
- g->save_flag |= GS_LEVEL;
- return 0;
- default:
- ShowError("int_guild: GuildBasicInfoChange: Unknown type %d\n",type);
break;
+
+ case GBI_SKILLPOINT:
+ value = *((const int16 *)data);
+ if( g->skill_point+value < 0 )
+ return 0;
+ g->skill_point += value;
+ break;
+
+ case GBI_SKILLLV:
+ gd_skill = *((const struct guild_skill*)data);
+ memcpy(&(g->skill[(gd_skill.id - GD_SKILLBASE)]), &gd_skill, sizeof(gd_skill));
+ if( !guild_calcinfo(g) )
+ mapif_guild_info(-1,g);
+ g->save_flag |= GS_SKILL;
+ mapif_guild_skillupack(g->guild_id, gd_skill.id, 0);
+ break;
+
+ default:
+ ShowError("int_guild: GuildBasicInfoChange: Unknown type %d, see mmo.h::guild_basic_info for more information\n",type);
+ return 0;
}
- mapif_guild_basicinfochanged(guild_id,type,data,len);
+ mapif_guild_info(-1,g);
+ g->save_flag |= GS_LEVEL;
+ // Information is already sent in mapif_guild_info
+ //mapif_guild_basicinfochanged(guild_id,type,data,len);
return 0;
}
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index 4eb7d310b..bc457d86b 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_GUILD_H_
-#define _CHAR_INT_GUILD_H_
+#ifndef CHAR_INT_GUILD_H
+#define CHAR_INT_GUILD_H
enum {
GS_BASIC = 0x0001,
@@ -20,9 +20,6 @@ enum {
GS_REMOVE = 0x8000,
};
-struct guild;
-struct guild_castle;
-
int inter_guild_parse_frommap(int fd);
int inter_guild_sql_init(void);
void inter_guild_sql_final(void);
@@ -34,4 +31,4 @@ int inter_guild_charname_changed(int guild_id,int account_id, int char_id, char
int inter_guild_CharOnline(int char_id, int guild_id);
int inter_guild_CharOffline(int char_id, int guild_id);
-#endif /* _CHAR_INT_GUILD_H_ */
+#endif /* CHAR_INT_GUILD_H */
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index 143277f05..acde9eb38 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -2,20 +2,23 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/utils.h"
-#include "../common/sql.h"
-#include "char.h"
-#include "inter.h"
+#define HERCULES_CORE
+
+#include "int_homun.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "char.h"
+#include "inter.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/sql.h"
+#include "../common/strlib.h"
+#include "../common/utils.h"
int inter_homunculus_sql_init(void)
{
@@ -245,9 +248,9 @@ bool mapif_homunculus_rename(char *name)
{
int i;
- // Check Authorised letters/symbols in the name of the homun
+ // Check Authorized letters/symbols in the name of the homun
if( char_name_option == 1 )
- {// only letters/symbols in char_name_letters are authorised
+ {// only letters/symbols in char_name_letters are authorized
for( i = 0; i < NAME_LENGTH && name[i]; i++ )
if( strchr(char_name_letters, name[i]) == NULL )
return false;
diff --git a/src/char/int_homun.h b/src/char/int_homun.h
index 561dc848f..6fa4f9dc7 100644
--- a/src/char/int_homun.h
+++ b/src/char/int_homun.h
@@ -1,8 +1,10 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_HOMUN_H_
-#define _CHAR_INT_HOMUN_H_
+#ifndef CHAR_INT_HOMUN_H
+#define CHAR_INT_HOMUN_H
+
+#include "../common/cbasetypes.h"
struct s_homunculus;
@@ -15,4 +17,4 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd);
bool mapif_homunculus_delete(int homun_id);
bool mapif_homunculus_rename(char *name);
-#endif /* _CHAR_INT_HOMUN_H_ */
+#endif /* CHAR_INT_HOMUN_H */
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index b69824d4b..86a36d59f 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -2,19 +2,23 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
+#define HERCULES_CORE
+
+#include "int_mail.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "char.h"
+#include "inter.h"
#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
#include "../common/socket.h"
-#include "../common/strlib.h"
#include "../common/sql.h"
+#include "../common/strlib.h"
#include "../common/timer.h"
-#include "char.h"
-#include "inter.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
static int mail_fromsql(int char_id, struct mail_data* md)
{
@@ -117,10 +121,6 @@ int mail_savemessage(struct mail_message* msg)
for (j = 0; j < MAX_SLOTS; j++)
StrBuf->Printf(&buf, ", '%d'", msg->item.card[j]);
StrBuf->AppendStr(&buf, ")");
-
- //Unique Non Stackable Item ID
- updateLastUid(msg->item.unique_id);
- dbUpdateUid(sql_handle);
// prepare and execute query
stmt = SQL->StmtMalloc(sql_handle);
diff --git a/src/char/int_mail.h b/src/char/int_mail.h
index 7c06cdc1f..8800061d7 100644
--- a/src/char/int_mail.h
+++ b/src/char/int_mail.h
@@ -1,8 +1,11 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_MAIL_H_
-#define _CHAR_INT_MAIL_H_
+#ifndef CHAR_INT_MAIL_H
+#define CHAR_INT_MAIL_H
+
+struct item;
+struct mail_message;
int inter_mail_parse_frommap(int fd);
void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item);
@@ -13,4 +16,4 @@ void inter_mail_sql_final(void);
int mail_savemessage(struct mail_message* msg);
void mapif_Mail_new(struct mail_message *msg);
-#endif /* _CHAR_INT_MAIL_H_ */
+#endif /* CHAR_INT_MAIL_H */
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c
index aecb3844a..1dffb656c 100644
--- a/src/char/int_mercenary.c
+++ b/src/char/int_mercenary.c
@@ -2,20 +2,24 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/utils.h"
-#include "../common/sql.h"
-#include "char.h"
-#include "inter.h"
+#define HERCULES_CORE
+
+#include "int_mercenary.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "char.h"
+#include "inter.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/sql.h"
+#include "../common/strlib.h"
+#include "../common/utils.h"
+
bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status)
{
char* data;
diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h
index b614b8cf7..b03c20de3 100644
--- a/src/char/int_mercenary.h
+++ b/src/char/int_mercenary.h
@@ -1,10 +1,12 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_MERCENARY_H_
-#define _CHAR_INT_MERCENARY_H_
+#ifndef CHAR_INT_MERCENARY_H
+#define CHAR_INT_MERCENARY_H
-struct s_mercenary;
+#include "../common/cbasetypes.h"
+
+struct mmo_charstatus;
int inter_mercenary_sql_init(void);
void inter_mercenary_sql_final(void);
@@ -17,4 +19,4 @@ bool mercenary_owner_delete(int char_id);
bool mapif_mercenary_delete(int merc_id);
-#endif /* _CHAR_INT_MERCENARY_H_ */
+#endif /* CHAR_INT_MERCENARY_H */
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 7c328c452..a8722fbe3 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -2,23 +2,26 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "../common/socket.h"
-#include "../common/showmsg.h"
-#include "../common/mapindex.h"
-#include "../common/sql.h"
-#include "char.h"
-#include "inter.h"
+#define HERCULES_CORE
+
#include "int_party.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "char.h"
+#include "inter.h"
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/mapindex.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/sql.h"
+#include "../common/strlib.h"
+
struct party_data {
struct party party;
unsigned int min_lv, max_lv;
@@ -472,8 +475,8 @@ int mapif_parse_CreateParty(int fd, char *name, int item, int item2, struct part
mapif_party_created(fd,leader->account_id,leader->char_id,NULL);
return 0;
}
- // Check Authorised letters/symbols in the name of the character
- if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised
+ // Check Authorized letters/symbols in the name of the character
+ if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized
for (i = 0; i < NAME_LENGTH && name[i]; i++)
if (strchr(char_name_letters, name[i]) == NULL) {
if( name[i] == '"' ) { /* client-special-char */
@@ -649,7 +652,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id
if (p == NULL)
return 0;
- for(i = 0; i < MAX_PARTY &&
+ for(i = 0; i < MAX_PARTY &&
(p->party.member[i].account_id != account_id ||
p->party.member[i].char_id != char_id); i++);
@@ -663,7 +666,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id
else
p->party.count--;
// Even share check situations: Family state (always breaks)
- // character logging on/off is max/min level (update level range)
+ // character logging on/off is max/min level (update level range)
// or character logging on/off has a different level (update level range using new level)
if (p->family ||
(p->party.member[i].lv <= p->min_lv || p->party.member[i].lv >= p->max_lv) ||
@@ -728,7 +731,7 @@ int mapif_parse_PartyLeaderChange(int fd,int party_id,int account_id,int char_id
for (i = 0; i < MAX_PARTY; i++)
{
- if(p->party.member[i].leader)
+ if(p->party.member[i].leader)
p->party.member[i].leader = 0;
if(p->party.member[i].account_id == account_id &&
p->party.member[i].char_id == char_id)
diff --git a/src/char/int_party.h b/src/char/int_party.h
index 84f00635a..2b24b1d1a 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -1,12 +1,12 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_PARTY_H_
-#define _CHAR_INT_PARTY_H_
+#ifndef CHAR_INT_PARTY_H
+#define CHAR_INT_PARTY_H
//Party Flags on what to save/delete.
enum {
- PS_CREATE = 0x01, //Create a new party entry (index holds leader's info)
+ PS_CREATE = 0x01, //Create a new party entry (index holds leader's info)
PS_BASIC = 0x02, //Update basic party info.
PS_LEADER = 0x04, //Update party's leader
PS_ADDMEMBER = 0x08, //Specify new party member (index specifies which party member)
@@ -14,8 +14,6 @@ enum {
PS_BREAK = 0x20, //Specify that this party must be deleted.
};
-struct party;
-
int inter_party_parse_frommap(int fd);
int inter_party_sql_init(void);
void inter_party_sql_final(void);
@@ -23,4 +21,4 @@ int inter_party_leave(int party_id,int account_id, int char_id);
int inter_party_CharOnline(int char_id, int party_id);
int inter_party_CharOffline(int char_id, int party_id);
-#endif /* _CHAR_INT_PARTY_H_ */
+#endif /* CHAR_INT_PARTY_H */
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 2867aed77..0f7c683f8 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -2,26 +2,30 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/malloc.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/showmsg.h"
-#include "../common/utils.h"
-#include "../common/sql.h"
-#include "char.h"
-#include "inter.h"
+#define HERCULES_CORE
+
+#include "int_pet.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "char.h"
+#include "inter.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/sql.h"
+#include "../common/strlib.h"
+#include "../common/utils.h"
+
struct s_pet *pet_pt;
//---------------------------------------------------------
int inter_pet_tosql(int pet_id, struct s_pet* p)
{
- //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`)
+ //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate`)
char esc_name[NAME_LENGTH*2+1];// escaped pet name
SQL->EscapeStringLen(sql_handle, esc_name, p->name, strnlen(p->name, NAME_LENGTH));
@@ -31,10 +35,10 @@ int inter_pet_tosql(int pet_id, struct s_pet* p)
if( pet_id == -1 )
{// New pet.
if( SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s` "
- "(`class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`) "
+ "(`class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate`) "
"VALUES ('%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
pet_db, p->class_, esc_name, p->account_id, p->char_id, p->level, p->egg_id,
- p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate) )
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incubate) )
{
Sql_ShowDebug(sql_handle);
return 0;
@@ -43,9 +47,9 @@ int inter_pet_tosql(int pet_id, struct s_pet* p)
}
else
{// Update pet.
- if( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `class`='%d',`name`='%s',`account_id`='%d',`char_id`='%d',`level`='%d',`egg_id`='%d',`equip`='%d',`intimate`='%d',`hungry`='%d',`rename_flag`='%d',`incuvate`='%d' WHERE `pet_id`='%d'",
+ if( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `class`='%d',`name`='%s',`account_id`='%d',`char_id`='%d',`level`='%d',`egg_id`='%d',`equip`='%d',`intimate`='%d',`hungry`='%d',`rename_flag`='%d',`incubate`='%d' WHERE `pet_id`='%d'",
pet_db, p->class_, esc_name, p->account_id, p->char_id, p->level, p->egg_id,
- p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate, p->pet_id) )
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incubate, p->pet_id) )
{
Sql_ShowDebug(sql_handle);
return 0;
@@ -67,9 +71,9 @@ int inter_pet_fromsql(int pet_id, struct s_pet* p)
#endif
memset(p, 0, sizeof(struct s_pet));
- //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`)
+ //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate`)
- if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate` FROM `%s` WHERE `pet_id`='%d'", pet_db, pet_id) )
+ if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate` FROM `%s` WHERE `pet_id`='%d'", pet_db, pet_id) )
{
Sql_ShowDebug(sql_handle);
return 0;
@@ -88,7 +92,7 @@ int inter_pet_fromsql(int pet_id, struct s_pet* p)
SQL->GetData(sql_handle, 8, &data, NULL); p->intimate = atoi(data);
SQL->GetData(sql_handle, 9, &data, NULL); p->hungry = atoi(data);
SQL->GetData(sql_handle, 10, &data, NULL); p->rename_flag = atoi(data);
- SQL->GetData(sql_handle, 11, &data, NULL); p->incuvate = atoi(data);
+ SQL->GetData(sql_handle, 11, &data, NULL); p->incubate = atoi(data);
SQL->FreeResult(sql_handle);
@@ -122,18 +126,18 @@ int inter_pet_delete(int pet_id){
//------------------------------------------------------
int mapif_pet_created(int fd, int account_id, struct s_pet *p)
{
- WFIFOHEAD(fd, 11);
- WFIFOW(fd, 0) =0x3880;
- WFIFOL(fd, 2) =account_id;
+ WFIFOHEAD(fd, 12);
+ WFIFOW(fd, 0) = 0x3880;
+ WFIFOL(fd, 2) = account_id;
if(p!=NULL){
- WFIFOB(fd, 6)=0;
- WFIFOL(fd, 7) =p->pet_id;
+ WFIFOW(fd, 6) = p->class_;
+ WFIFOL(fd, 8) = p->pet_id;
ShowInfo("int_pet: created pet %d - %s\n", p->pet_id, p->name);
}else{
- WFIFOB(fd, 6)=1;
- WFIFOL(fd, 7)=0;
+ WFIFOB(fd, 6) = 0;
+ WFIFOL(fd, 8) = 0;
}
- WFIFOSET(fd, 11);
+ WFIFOSET(fd, 12);
return 0;
}
@@ -182,11 +186,11 @@ int mapif_delete_pet_ack(int fd, int flag){
}
int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id,
- short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name)
+ short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name)
{
memset(pet_pt, 0, sizeof(struct s_pet));
safestrncpy(pet_pt->name, pet_name, NAME_LENGTH);
- if(incuvate == 1)
+ if(incubate == 1)
pet_pt->account_id = pet_pt->char_id = 0;
else {
pet_pt->account_id = account_id;
@@ -199,7 +203,7 @@ int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short
pet_pt->intimate = intimate;
pet_pt->hungry = hungry;
pet_pt->rename_flag = rename_flag;
- pet_pt->incuvate = incuvate;
+ pet_pt->incubate = incubate;
if(pet_pt->hungry < 0)
pet_pt->hungry = 0;
@@ -225,7 +229,7 @@ int mapif_load_pet(int fd, int account_id, int char_id, int pet_id){
inter_pet_fromsql(pet_id, pet_pt);
if(pet_pt!=NULL) {
- if(pet_pt->incuvate == 1) {
+ if(pet_pt->incubate == 1) {
pet_pt->account_id = pet_pt->char_id = 0;
mapif_pet_info(fd, account_id, pet_pt);
}
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index a16cb7a37..52642fc54 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_PET_H_
-#define _CHAR_INT_PET_H_
+#ifndef CHAR_INT_PET_H
+#define CHAR_INT_PET_H
struct s_pet;
@@ -18,4 +18,4 @@ int inter_pet_sql_init(void);
//Exported for use in the TXT-SQL converter.
int inter_pet_tosql(int pet_id, struct s_pet *p);
-#endif /* _CHAR_INT_PET_H_ */
+#endif /* CHAR_INT_PET_H */
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index 061dd89d9..d4155b0d6 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -2,23 +2,25 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
+#define HERCULES_CORE
+
+#include "int_quest.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "char.h"
+#include "inter.h"
#include "../common/db.h"
#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
#include "../common/socket.h"
-#include "../common/strlib.h"
#include "../common/sql.h"
+#include "../common/strlib.h"
#include "../common/timer.h"
-#include "char.h"
-#include "inter.h"
-#include "int_quest.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
/**
* Loads the entire questlog for a character.
*
@@ -195,7 +197,7 @@ int mapif_parse_quest_save(int fd) {
if (j < old_n) {
// Update existing quests
- // Only states and counts are changable.
+ // Only states and counts are changeable.
ARR_FIND( 0, MAX_QUEST_OBJECTIVES, k, new_qd[i].count[k] != old_qd[j].count[k] );
if (k != MAX_QUEST_OBJECTIVES || new_qd[i].state != old_qd[j].state)
success &= mapif_quest_update(char_id, new_qd[i]);
diff --git a/src/char/int_quest.h b/src/char/int_quest.h
index 6267c74ad..f0dd370ea 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -1,10 +1,10 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_QUEST_H_
-#define _CHAR_QUEST_H_
+#ifndef CHAR_QUEST_H
+#define CHAR_QUEST_H
int inter_quest_parse_frommap(int fd);
-#endif /* _CHAR_QUEST_H_ */
+#endif /* CHAR_QUEST_H */
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 966e61bb3..bf7b76da0 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -2,19 +2,23 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h" // StringBuf
-#include "../common/sql.h"
-#include "char.h"
-#include "inter.h"
+#define HERCULES_CORE
+
+#include "../config/core.h" // GP_BOUND_ITEMS
+#include "int_storage.h"
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
+#include "char.h"
+#include "inter.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/sql.h"
+#include "../common/strlib.h" // StringBuf
#define STORAGE_MEMINC 16
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
index 1693499a5..1cef94d98 100644
--- a/src/char/int_storage.h
+++ b/src/char/int_storage.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_STORAGE_H_
-#define _CHAR_INT_STORAGE_H_
+#ifndef CHAR_INT_STORAGE_H
+#define CHAR_INT_STORAGE_H
struct storage_data;
struct guild_storage;
@@ -19,4 +19,4 @@ int storage_fromsql(int account_id, struct storage_data* p);
int storage_tosql(int account_id,struct storage_data *p);
int guild_storage_tosql(int guild_id, struct guild_storage *p);
-#endif /* _CHAR_INT_STORAGE_H_ */
+#endif /* CHAR_INT_STORAGE_H */
diff --git a/src/char/inter.c b/src/char/inter.c
index 059c33784..c2d8de37a 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -2,32 +2,34 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "char.h"
+#define HERCULES_CORE
+
#include "inter.h"
-#include "int_party.h"
-#include "int_guild.h"
-#include "int_storage.h"
-#include "int_pet.h"
-#include "int_homun.h"
-#include "int_mercenary.h"
-#include "int_mail.h"
-#include "int_auction.h"
-#include "int_quest.h"
-#include "int_elemental.h"
+#include <errno.h>
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
-
+#include <string.h>
#include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool]
+#include "char.h"
+#include "int_auction.h"
+#include "int_elemental.h"
+#include "int_guild.h"
+#include "int_homun.h"
+#include "int_mail.h"
+#include "int_mercenary.h"
+#include "int_party.h"
+#include "int_pet.h"
+#include "int_quest.h"
+#include "int_storage.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.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
@@ -370,7 +372,11 @@ const char* job_name(int class_) {
}
/* [Dekamaster/Nightroad] */
-const char * geoip_countryname[253] = {"Unknown","Asia/Pacific Region","Europe","Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Netherlands Antilles",
+#define GEOIP_MAX_COUNTRIES 255
+#define GEOIP_STRUCTURE_INFO_MAX_SIZE 20
+#define GEOIP_COUNTRY_BEGIN 16776960
+
+const char * geoip_countryname[GEOIP_MAX_COUNTRIES] = {"Unknown","Asia/Pacific Region","Europe","Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Netherlands Antilles",
"Angola","Antarctica","Argentina","American Samoa","Austria","Australia","Aruba","Azerbaijan","Bosnia and Herzegovina","Barbados",
"Bangladesh","Belgium","Burkina Faso","Bulgaria","Bahrain","Burundi","Benin","Bermuda","Brunei Darussalam","Bolivia",
"Brazil","Bahamas","Bhutan","Bouvet Island","Botswana","Belarus","Belize","Canada","Cocos (Keeling) Islands","Congo, The Democratic Republic of the",
@@ -395,17 +401,15 @@ const char * geoip_countryname[253] = {"Unknown","Asia/Pacific Region","Europe",
"Tanzania, United Republic of","Ukraine","Uganda","United States Minor Outlying Islands","United States","Uruguay","Uzbekistan","Holy See (Vatican City State)","Saint Vincent and the Grenadines","Venezuela",
"Virgin Islands, British","Virgin Islands, U.S.","Vietnam","Vanuatu","Wallis and Futuna","Samoa","Yemen","Mayotte","Serbia","South Africa",
"Zambia","Montenegro","Zimbabwe","Anonymous Proxy","Satellite Provider","Other","Aland Islands","Guernsey","Isle of Man","Jersey",
- "Saint Barthelemy","Saint Martin"};
-unsigned char *geoip_cache;
-void geoip_readdb(void){
- struct stat bufa;
- FILE *db=fopen("./db/GeoIP.dat","rb");
- fstat(fileno(db), &bufa);
- geoip_cache = (unsigned char *) malloc(sizeof(unsigned char) * bufa.st_size);
- if(fread(geoip_cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size) { ShowError("geoip_cache reading didn't read all elements \n"); }
- fclose(db);
- ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n");
-}
+ "Saint Barthelemy", "Saint Martin", "Bonaire, Saint Eustatius and Saba", "South Sudan"};
+/**
+ * GeoIP information
+ **/
+struct s_geoip {
+ unsigned char *cache; // GeoIP.dat information see geoip_init()
+ bool active;
+} geoip;
+
/* [Dekamaster/Nightroad] */
/* WHY NOT A DBMAP: There are millions of entries in GeoIP and it has its own algorithm to go quickly through them, a DBMap wouldn't be efficient */
const char* geoip_getcountry(uint32 ipnum){
@@ -414,8 +418,11 @@ const char* geoip_getcountry(uint32 ipnum){
const unsigned char *buf;
unsigned int offset = 0;
+ if( geoip.active == false )
+ return geoip_countryname[0];
+
for (depth = 31; depth >= 0; depth--) {
- buf = geoip_cache + (long)6 *offset;
+ buf = geoip.cache + (long)6 *offset;
if (ipnum & (1 << depth)) {
/* Take the right-hand branch */
x = (buf[3*1 + 0] << (0*8))
@@ -427,16 +434,100 @@ const char* geoip_getcountry(uint32 ipnum){
+ (buf[3*0 + 1] << (1*8))
+ (buf[3*0 + 2] << (2*8));
}
- if (x >= 16776960) {
- x=x-16776960;
+ if (x >= GEOIP_COUNTRY_BEGIN) {
+ x = x-GEOIP_COUNTRY_BEGIN;
+
+ if( x > GEOIP_MAX_COUNTRIES )
+ return geoip_countryname[0];
+
return geoip_countryname[x];
}
offset = x;
}
+ ShowError("geoip_getcountry(): Error traversing database for ipnum %d\n", ipnum);
+ ShowWarning("geoip_getcountry(): Possible database corruption!\n");
+
return geoip_countryname[0];
}
/**
+ * Disables GeoIP
+ * frees geoip.cache
+ **/
+void geoip_final(bool shutdown) {
+ if (geoip.cache) {
+ aFree(geoip.cache);
+ geoip.cache = NULL;
+ }
+
+ if (geoip.active) {
+ if (!shutdown)
+ ShowStatus("GeoIP "CL_RED"disabled"CL_RESET".\n");
+ geoip.active = false;
+ }
+}
+
+/**
+ * Reads GeoIP database and stores it into memory
+ * geoip.cache should be freed after use!
+ * http://dev.maxmind.com/geoip/legacy/geolite/
+ **/
+void geoip_init(void) {
+ int i, fno;
+ char db_type = 1;
+ unsigned char delim[3];
+ struct stat bufa;
+ FILE *db;
+
+ geoip.active = true;
+
+ db = fopen("./db/GeoIP.dat","rb");
+ if( db == NULL ) {
+ ShowError("geoip_readdb: Error reading GeoIP.dat!\n");
+ geoip_final(false);
+ return;
+ }
+ fno = fileno(db);
+ if( fstat(fno, &bufa) < 0 ) {
+ ShowError("geoip_readdb: Error stating GeoIP.dat! Error %d\n", errno);
+ geoip_final(false);
+ return;
+ }
+ geoip.cache = aMalloc( (sizeof(geoip.cache) * bufa.st_size) );
+ if( fread(geoip.cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size ) {
+ ShowError("geoip_cache: Couldn't read all elements!\n");
+ fclose(db);
+ geoip_final(false);
+ return;
+ }
+
+ // Search database type
+ fseek(db, -3l, SEEK_END);
+ for( i = 0; i < GEOIP_STRUCTURE_INFO_MAX_SIZE; i++ ) {
+ fread(delim, sizeof(delim[0]), 3, db);
+ if( delim[0] == 255 && delim[1] == 255 && delim[2] == 255 ) {
+ fread(&db_type, sizeof(db_type), 1, db);
+ break;
+ } else {
+ fseek(db, -4l, SEEK_CUR);
+ }
+ }
+
+ fclose(db);
+
+ if( db_type != 1 ) {
+ if( db_type )
+ ShowError("geoip_init(): Database type is not supported %d!\n", db_type);
+ else
+ ShowError("geoip_init(): GeoIP is corrupted!\n");
+
+ geoip_final(false);
+ return;
+ }
+ ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n");
+}
+
+/**
* Argument-list version of inter_msg_to_fd
* @see inter_msg_to_fd
*/
@@ -498,7 +589,7 @@ void mapif_parse_accinfo(int fd) {
inter_msg_to_fd(fd, u_fd, aid, "No matches were found for your criteria, '%s'",query);
} else {
Sql_ShowDebug(sql_handle);
- inter_msg_to_fd(fd, u_fd, aid, "An error occured, bother your admin about it.");
+ inter_msg_to_fd(fd, u_fd, aid, "An error occurred, bother your admin about it.");
}
SQL->FreeResult(sql_handle);
return;
@@ -567,7 +658,7 @@ void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int acc
if (SQL->NumRows(sql_handle) == 0) {
inter_msg_to_fd(map_fd, u_fd, u_aid, "This account doesn't have characters.");
} else {
- inter_msg_to_fd(map_fd, u_fd, u_aid, "An error occured, bother your admin about it.");
+ inter_msg_to_fd(map_fd, u_fd, u_aid, "An error occurred, bother your admin about it.");
Sql_ShowDebug(sql_handle);
}
} else {
@@ -934,7 +1025,7 @@ int inter_init_sql(const char *file)
inter_mail_sql_init();
inter_auction_sql_init();
- geoip_readdb();
+ geoip_init();
msg_config_read("conf/messages.conf", false);
return 0;
}
@@ -954,6 +1045,7 @@ void inter_final(void)
inter_mail_sql_final();
inter_auction_sql_final();
+ geoip_final(true);
do_final_msg();
return;
}
@@ -1073,7 +1165,7 @@ int check_ttl_wisdata(void)
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 wisper, 1: target character is not loged in?, 2: ignored by target
+ //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);
@@ -1107,7 +1199,7 @@ int mapif_parse_WisRequest(int fd)
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) { // normaly, impossible, but who knows...
+ } else if (RFIFOW(fd,2)-52 <= 0) { // normally, impossible, but who knows...
ShowError("inter: Wis message doesn't exist.\n");
return 0;
}
@@ -1124,7 +1216,7 @@ int mapif_parse_WisRequest(int fd)
unsigned char buf[27];
WBUFW(buf, 0) = 0x3802;
memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH);
- WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ WBUFB(buf,26) = 1; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
mapif_send(fd, buf, 27);
}
else
@@ -1139,7 +1231,7 @@ int mapif_parse_WisRequest(int fd)
uint8 buf[27];
WBUFW(buf, 0) = 0x3802;
memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH);
- WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ WBUFB(buf,26) = 1; // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
mapif_send(fd, buf, 27);
}
else
@@ -1180,7 +1272,7 @@ int mapif_parse_WisReply(int fd)
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 wisper, 1: target character is not loged in?, 2: ignored by target
+ mapif_wis_end(wd, flag); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
idb_remove(wis_db, id);
}
@@ -1284,8 +1376,8 @@ int mapif_parse_NameChangeRequest(int fd)
type = RFIFOB(fd,10);
name = (char*)RFIFOP(fd,11);
- // Check Authorised letters/symbols in the name
- if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised
+ // Check Authorized letters/symbols in the name
+ if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorized
for (i = 0; i < NAME_LENGTH && name[i]; i++)
if (strchr(char_name_letters, name[i]) == NULL) {
mapif_namechange_ack(fd, account_id, char_id, type, 0, name);
@@ -1372,23 +1464,4 @@ int inter_parse_frommap(int fd)
return 1;
}
-uint64 inter_chk_lastuid(int8 flag, uint64 value){
- static uint64 last_updt_uid = 0;
- static int8 update = 0;
- if(flag)
- {
- if(last_updt_uid < value){
- last_updt_uid = value;
- update = 1;
- }
-
- return 0;
- }else if(update)
- {
- update = 0;
- return last_updt_uid;
- }
- return 0;
-}
-
diff --git a/src/char/inter.h b/src/char/inter.h
index b484a1610..ab2478ae6 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -2,12 +2,13 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CHAR_INTER_H_
-#define _CHAR_INTER_H_
+#ifndef CHAR_INTER_H
+#define CHAR_INTER_H
-struct accreg;
-#include "../common/sql.h"
#include "char.h"
+#include "../common/sql.h"
+
+struct accreg;
int inter_init_sql(const char *file);
void inter_final(void);
@@ -29,17 +30,4 @@ extern Sql* lsql_handle;
int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type);
-uint64 inter_chk_lastuid(int8 flag, uint64 value);
-#ifdef NSI_UNIQUE_ID
- #define updateLastUid(val_) inter_chk_lastuid(1, (val_))
- #define dbUpdateUid(handler_) do { \
- uint64 unique_id_ = inter_chk_lastuid(0, 0); \
- if (unique_id_ && SQL_ERROR == SQL->Query((handler_), "UPDATE `%s` SET `value`='%"PRIu64"' WHERE `varname`='unique_id'", interreg_db, unique_id_)) \
- Sql_ShowDebug(handler_);\
- } while(0)
-#else
- #define dbUpdateUid(handler_)
- #define updateLastUid(val_)
-#endif
-
-#endif /* _CHAR_INTER_H_ */
+#endif /* CHAR_INTER_H */
diff --git a/src/char/pincode.c b/src/char/pincode.c
index d51953448..18ad0ffc8 100644
--- a/src/char/pincode.c
+++ b/src/char/pincode.c
@@ -2,16 +2,19 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "pincode.h"
+
+#include <stdlib.h>
+
+#include "char.h"
#include "../common/cbasetypes.h"
#include "../common/mmo.h"
#include "../common/random.h"
#include "../common/showmsg.h"
#include "../common/socket.h"
#include "../common/strlib.h"
-#include "char.h"
-#include "pincode.h"
-
-#include <stdlib.h>
int enabled = PINCODE_OK;
int changetime = 0;
@@ -30,7 +33,7 @@ void pincode_handle ( int fd, struct char_session_data* sd ) {
}
if( strlen(sd->pincode) == 4 ){
- if( *pincode->changetime && time(NULL) > (sd->pincode_change+*pincode->changetime) ){ // User hasnt changed his PIN code for a long time
+ if( *pincode->changetime && time(NULL) > (sd->pincode_change+*pincode->changetime) ){ // User hasn't changed his PIN code for a long time
pincode->sendstate( fd, sd, PINCODE_EXPIRED );
} else { // Ask user for his PIN code
pincode->sendstate( fd, sd, PINCODE_ASK );
diff --git a/src/char/pincode.h b/src/char/pincode.h
index 3b71eec7c..1ed05095e 100644
--- a/src/char/pincode.h
+++ b/src/char/pincode.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CHAR_PINCODE_H_
-#define _CHAR_PINCODE_H_
+#ifndef CHAR_PINCODE_H
+#define CHAR_PINCODE_H
#include "char.h"
@@ -40,4 +40,4 @@ struct pincode_interface *pincode;
void pincode_defaults(void);
-#endif /* _CHAR_PINCODE_H_ */
+#endif /* CHAR_PINCODE_H */
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
deleted file mode 100644
index dbc30734c..000000000
--- a/src/common/CMakeLists.txt
+++ /dev/null
@@ -1,170 +0,0 @@
-
-#
-# Create svnversion.h
-#
-message( STATUS "Creating svnversion.h" )
-if( SVNVERSION )
- file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
- "#ifndef SVNVERSION\n#define SVNVERSION ${SVNVERSION}\n#endif\n" )
-else()
- file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h "" )
-endif()
-set( GLOBAL_INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "" )
-set( SVNVERSION ${SVNVERSION}
- CACHE STRING "SVN version of the source code" )
-if( INSTALL_COMPONENT_DEVELOPMENT )
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
- DESTINATION "src/common"
- COMPONENT Development_base )
-endif( INSTALL_COMPONENT_DEVELOPMENT )
-message( STATUS "Creating svnversion.h - done" )
-
-
-#####################################################################
-# setup
-#
-set( COMMON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
- CACHE PATH "common source directory" )
-mark_as_advanced( COMMON_SOURCE_DIR )
-
-set( COMMON_ALL_HEADERS
- "${CMAKE_CURRENT_BINARY_DIR}/svnversion.h"
- "${COMMON_SOURCE_DIR}/cbasetypes.h"
- "${COMMON_SOURCE_DIR}/mmo.h"
- )
-
-set( COMMON_MINI_HEADERS
- ${COMMON_ALL_HEADERS}
- "${COMMON_SOURCE_DIR}/core.h"
- "${COMMON_SOURCE_DIR}/console.h"
- "${COMMON_SOURCE_DIR}/malloc.h"
- "${COMMON_SOURCE_DIR}/showmsg.h"
- "${COMMON_SOURCE_DIR}/strlib.h"
- ${LIBCONFIG_HEADERS} # needed by showmsg.h
- CACHE INTERNAL "" )
-set( COMMON_MINI_SOURCES
- "${COMMON_SOURCE_DIR}/core.c"
- "${COMMON_SOURCE_DIR}/console.c"
- "${COMMON_SOURCE_DIR}/malloc.c"
- "${COMMON_SOURCE_DIR}/showmsg.c"
- "${COMMON_SOURCE_DIR}/strlib.c"
- ${LIBCONFIG_SOURCES} # needed by showmsg.c
- CACHE INTERNAL "" )
-set( COMMON_MINI_INCLUDE_DIRS ${LIBCONFIG_INCLUDE_DIRS} CACHE INTERNAL "" )
-set( COMMON_MINI_DEFINITIONS "-DMINICORE ${LIBCONFIG_DEFINITIONS}" CACHE INTERNAL "" )
-
-
-#
-# common_base
-#
-if( WITH_ZLIB )
-message( STATUS "Creating target common_base" )
-set( COMMON_BASE_HEADERS
- ${COMMON_ALL_HEADERS}
- "${COMMON_SOURCE_DIR}/conf.h"
- "${COMMON_SOURCE_DIR}/core.h"
- "${COMMON_SOURCE_DIR}/console.h"
- "${COMMON_SOURCE_DIR}/db.h"
- "${COMMON_SOURCE_DIR}/des.h"
- "${COMMON_SOURCE_DIR}/ers.h"
- "${COMMON_SOURCE_DIR}/grfio.h"
- "${COMMON_SOURCE_DIR}/HPM.h"
- "${COMMON_SOURCE_DIR}/HPMi.h"
- "${COMMON_SOURCE_DIR}/malloc.h"
- "${COMMON_SOURCE_DIR}/mapindex.h"
- "${COMMON_SOURCE_DIR}/md5calc.h"
- "${COMMON_SOURCE_DIR}/nullpo.h"
- "${COMMON_SOURCE_DIR}/random.h"
- "${COMMON_SOURCE_DIR}/showmsg.h"
- "${COMMON_SOURCE_DIR}/socket.h"
- "${COMMON_SOURCE_DIR}/strlib.h"
- "${COMMON_SOURCE_DIR}/timer.h"
- "${COMMON_SOURCE_DIR}/utils.h"
- "${COMMON_SOURCE_DIR}/atomic.h"
- "${COMMON_SOURCE_DIR}/spinlock.h"
- "${COMMON_SOURCE_DIR}/thread.h"
- "${COMMON_SOURCE_DIR}/mutex.h"
- "${COMMON_SOURCE_DIR}/raconf.h"
- "${COMMON_SOURCE_DIR}/mempool.h"
- ${LIBCONFIG_HEADERS} # needed by conf.h/showmsg.h
- CACHE INTERNAL "common_base headers" )
-set( COMMON_BASE_SOURCES
- "${COMMON_SOURCE_DIR}/conf.c"
- "${COMMON_SOURCE_DIR}/core.c"
- "${COMMON_SOURCE_DIR}/console.c"
- "${COMMON_SOURCE_DIR}/db.c"
- "${COMMON_SOURCE_DIR}/des.c"
- "${COMMON_SOURCE_DIR}/ers.c"
- "${COMMON_SOURCE_DIR}/grfio.c"
- "${COMMON_SOURCE_DIR}/HPM.c"
- "${COMMON_SOURCE_DIR}/malloc.c"
- "${COMMON_SOURCE_DIR}/mapindex.c"
- "${COMMON_SOURCE_DIR}/md5calc.c"
- "${COMMON_SOURCE_DIR}/nullpo.c"
- "${COMMON_SOURCE_DIR}/random.c"
- "${COMMON_SOURCE_DIR}/showmsg.c"
- "${COMMON_SOURCE_DIR}/socket.c"
- "${COMMON_SOURCE_DIR}/strlib.c"
- "${COMMON_SOURCE_DIR}/timer.c"
- "${COMMON_SOURCE_DIR}/utils.c"
- "${COMMON_SOURCE_DIR}/thread.c"
- "${COMMON_SOURCE_DIR}/mutex.c"
- "${COMMON_SOURCE_DIR}/mempool.c"
- "${COMMON_SOURCE_DIR}/raconf.c"
- ${LIBCONFIG_SOURCES} # needed by conf.c/showmsg.c
- CACHE INTERNAL "common_base sources" )
-set( COMMON_BASE_INCLUDE_DIRS
- ${LIBCONFIG_INCLUDE_DIRS}
- CACHE INTERNAL "common_base include dirs" )
-set( COMMON_BASE_DEFINITIONS
- ${LIBCONFIG_DEFINITIONS}
- CACHE INTERNAL "common_base definitions" )
-set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MT19937AR_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" )
-set( SOURCE_FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} )
-source_group( mt19937ar FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} )
-source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} )
-add_library( common_base ${SOURCE_FILES} )
-target_link_libraries( common_base ${LIBRARIES} )
-set_target_properties( common_base PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-include_directories( ${INCLUDE_DIRS} )
-set( HAVE_common_base ON CACHE INTERNAL "" )
-set( TARGET_LIST ${TARGET_LIST} common_base CACHE INTERNAL "" )
-message( STATUS "Creating target common_base - done" )
-else()
-message( STATUS "Skipping target common_base (requires ZLIB)" )
-unset( HAVE_common_base CACHE )
-endif()
-
-
-#
-# common_sql
-#
-if( HAVE_common_base AND WITH_MYSQL )
-message( STATUS "Creating target common_sql" )
-set( COMMON_SQL_HEADERS
- ${COMMON_ALL_HEADERS}
- "${CMAKE_CURRENT_SOURCE_DIR}/sql.h"
- CACHE INTERNAL "common_sql headers" )
-set( COMMON_SQL_SOURCES
- "${CMAKE_CURRENT_SOURCE_DIR}/sql.c"
- CACHE INTERNAL "common_sql sources" )
-set( DEPENDENCIES common_base )
-set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS}" )
-set( SOURCE_FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} )
-source_group( common FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} )
-add_library( common_sql ${SOURCE_FILES} )
-add_dependencies( common_sql ${DEPENDENCIES} )
-target_link_libraries( common_sql ${LIBRARIES} ${DEPENDENCIES} )
-set_target_properties( common_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-include_directories( ${INCLUDE_DIRS} )
-set( HAVE_common_sql ON CACHE INTERNAL "" )
-set( TARGET_LIST ${TARGET_LIST} common_sql CACHE INTERNAL "" )
-message( STATUS "Creating target common_sql - done" )
-else()
-message( STATUS "Skipping target common_sql (requires common_base and MYSQL)" )
-unset( HAVE_common_sql CACHE )
-endif()
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 971eb83bd..f39954175 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -1,25 +1,31 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
+#define HERCULES_CORE
+
+#include "../config/core.h" // CONSOLE_INPUT
+#include "HPM.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
+#include "../common/conf.h"
+#include "../common/console.h"
#include "../common/core.h"
#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
#include "../common/socket.h"
+#include "../common/sql.h"
+#include "../common/strlib.h"
+#include "../common/sysinfo.h"
#include "../common/timer.h"
-#include "../common/conf.h"
#include "../common/utils.h"
-#include "../common/console.h"
-#include "../common/strlib.h"
-#include "../common/sql.h"
-#include "HPM.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#ifndef WIN32
-#include <unistd.h>
+# include <unistd.h>
#endif
struct malloc_interface iMalloc_HPM;
@@ -404,7 +410,7 @@ void hplugins_addToHPData(enum HPluginDataTypes type, unsigned int pluginID, voi
*(action.hdatac) += 1;
RECREATE(*(action.HPDataSRCPtr),struct HPluginData *,*(action.hdatac));
- /* RECREATE modified the addresss */
+ /* RECREATE modified the address */
HPDataSRC = *(action.HPDataSRCPtr);
HPDataSRC[*(action.hdatac) - 1] = HPData;
}
@@ -499,7 +505,7 @@ bool hplugins_addpacket(unsigned short cmd, short length,void (*receive) (int fd
return true;
}
-/*
+/*
0 = unknown
1 = OK
2 = incomplete
@@ -572,7 +578,7 @@ void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char
char* HPM_astrdup(const char *p, const char *file, int line, const char *func) {
return iMalloc->astrdup(p,HPM_file2ptr(file),line,func);
}
-/* todo: add ability for tracking using pID for the upcoming runtime load/unload support. */
+/* TODO: add ability for tracking using pID for the upcoming runtime load/unload support. */
bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) {
if( !HPM->hooking ) {
ShowError("HPM:AddHook Fail! '%s' tried to hook to '%s' but HPMHooking is disabled!\n",HPM->pid2name(pID),target);
@@ -629,7 +635,7 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, void (*func)
CREATE(data, struct HPMArgData, 1);
- data->pluginID = pluginID;
+ data->pluginID = pluginID;
data->name = aStrdup(name);
data->func = func;
data->help = help;
@@ -685,7 +691,7 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po
void hplugins_share_defaults(void) {
/* console */
#ifdef CONSOLE_INPUT
- HPM->share(console->addCommand,"addCPCommand");
+ HPM->share(console->input->addCommand,"addCPCommand");
#endif
/* our own */
HPM->share(hplugins_addpacket,"addPacket");
@@ -703,8 +709,6 @@ void hplugins_share_defaults(void) {
HPM->share(&arg_c,"arg_c");
HPM->share(SERVER_NAME,"SERVER_NAME");
HPM->share(&SERVER_TYPE,"SERVER_TYPE");
- HPM->share((void*)get_svn_revision,"get_svn_revision");
- HPM->share((void*)get_git_hash,"get_git_hash");
HPM->share(DB, "DB");
HPM->share(HPMiMalloc, "iMalloc");
/* socket */
@@ -719,6 +723,8 @@ void hplugins_share_defaults(void) {
HPM->share(timer,"timer");
/* libconfig */
HPM->share(libconfig,"libconfig");
+ /* sysinfo */
+ HPM->share(sysinfo,"sysinfo");
}
void hpm_init(void) {
@@ -754,7 +760,7 @@ void hpm_init(void) {
HPM->symbol_defaults();
#ifdef CONSOLE_INPUT
- console->addCommand("plugins",CPCMD_A(plugins));
+ console->input->addCommand("plugins",CPCMD_A(plugins));
#endif
return;
}
diff --git a/src/common/HPM.h b/src/common/HPM.h
index b466cb4f3..fe8d45066 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -1,11 +1,15 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_HPM_H_
-#define _COMMON_HPM_H_
+#ifndef COMMON_HPM_H
+#define COMMON_HPM_H
+
+#ifndef HERCULES_CORE
+#error You should never include HPM.h from a plugin.
+#endif
-#include "../common/cbasetypes.h"
#include "../common/HPMi.h"
+#include "../common/cbasetypes.h"
#ifdef WIN32
#ifndef WIN32_LEAN_AND_MEAN
@@ -20,7 +24,7 @@
#define DLL HINSTANCE
#else // ! WIN32
#include <dlfcn.h>
- #ifdef RTLD_DEEPBIND // Certain linux ditributions require this, but it's not available everywhere
+ #ifdef RTLD_DEEPBIND // Certain linux distributions require this, but it's not available everywhere
#define plugin_open(x) dlopen((x),RTLD_NOW|RTLD_DEEPBIND)
#else // ! RTLD_DEEPBIND
#define plugin_open(x) dlopen((x),RTLD_NOW)
@@ -154,4 +158,4 @@ struct HPM_interface *HPM;
void hpm_defaults(void);
-#endif /* _COMMON_HPM_H_ */
+#endif /* COMMON_HPM_H */
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 6eef028b2..79ec36472 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -3,134 +3,140 @@
//
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
-#ifndef _HPM_DATA_CHECK_H_
-#define _HPM_DATA_CHECK_H_
+#ifndef HPM_DATA_CHECK_H
+#define HPM_DATA_CHECK_H
HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
- #ifdef _COMMON_CONF_H_
+ #ifdef COMMON_CONF_H
{ "libconfig_interface", sizeof(struct libconfig_interface) },
#else
- #define _COMMON_CONF_H_
- #endif // _COMMON_CONF_H_
- #ifdef _COMMON_DB_H_
+ #define COMMON_CONF_H
+ #endif // COMMON_CONF_H
+ #ifdef COMMON_DB_H
{ "DBData", sizeof(struct DBData) },
{ "DBIterator", sizeof(struct DBIterator) },
{ "DBMap", sizeof(struct DBMap) },
#else
- #define _COMMON_DB_H_
- #endif // _COMMON_DB_H_
- #ifdef _COMMON_DES_H_
+ #define COMMON_DB_H
+ #endif // COMMON_DB_H
+ #ifdef COMMON_DES_H
{ "BIT64", sizeof(struct BIT64) },
#else
- #define _COMMON_DES_H_
- #endif // _COMMON_DES_H_
- #ifdef _COMMON_ERS_H_
+ #define COMMON_DES_H
+ #endif // COMMON_DES_H
+ #ifdef COMMON_ERS_H
{ "eri", sizeof(struct eri) },
#else
- #define _COMMON_ERS_H_
- #endif // _COMMON_ERS_H_
- #ifdef _COMMON_MAPINDEX_H_
+ #define COMMON_ERS_H
+ #endif // COMMON_ERS_H
+ #ifdef COMMON_MAPINDEX_H
{ "mapindex_interface", sizeof(struct mapindex_interface) },
#else
- #define _COMMON_MAPINDEX_H_
- #endif // _COMMON_MAPINDEX_H_
- #ifdef _COMMON_MMO_H_
+ #define COMMON_MAPINDEX_H
+ #endif // COMMON_MAPINDEX_H
+ #ifdef COMMON_MMO_H
{ "quest", sizeof(struct quest) },
#else
- #define _COMMON_MMO_H_
- #endif // _COMMON_MMO_H_
- #ifdef _COMMON_SOCKET_H_
+ #define COMMON_MMO_H
+ #endif // COMMON_MMO_H
+ #ifdef COMMON_SOCKET_H
{ "socket_interface", sizeof(struct socket_interface) },
#else
- #define _COMMON_SOCKET_H_
- #endif // _COMMON_SOCKET_H_
- #ifdef _COMMON_STRLIB_H_
+ #define COMMON_SOCKET_H
+ #endif // COMMON_SOCKET_H
+ #ifdef COMMON_STRLIB_H
{ "StringBuf", sizeof(struct StringBuf) },
{ "s_svstate", sizeof(struct s_svstate) },
#else
- #define _COMMON_STRLIB_H_
- #endif // _COMMON_STRLIB_H_
- #ifdef _MAP_ATCOMMAND_H_
+ #define COMMON_STRLIB_H
+ #endif // COMMON_STRLIB_H
+ #ifdef COMMON_SYSINFO_H
+ { "sysinfo_interface", sizeof(struct sysinfo_interface) },
+ #else
+ #define COMMON_SYSINFO_H
+ #endif // COMMON_SYSINFO_H
+ #ifdef MAP_ATCOMMAND_H
{ "AliasInfo", sizeof(struct AliasInfo) },
{ "atcommand_interface", sizeof(struct atcommand_interface) },
#else
- #define _MAP_ATCOMMAND_H_
- #endif // _MAP_ATCOMMAND_H_
- #ifdef _MAP_BATTLE_H_
+ #define MAP_ATCOMMAND_H
+ #endif // MAP_ATCOMMAND_H
+ #ifdef MAP_BATTLE_H
{ "Damage", sizeof(struct Damage) },
{ "battle_interface", sizeof(struct battle_interface) },
#else
- #define _MAP_BATTLE_H_
- #endif // _MAP_BATTLE_H_
- #ifdef _MAP_BUYINGSTORE_H_
+ #define MAP_BATTLE_H
+ #endif // MAP_BATTLE_H
+ #ifdef MAP_BUYINGSTORE_H
{ "buyingstore_interface", sizeof(struct buyingstore_interface) },
{ "s_buyingstore_item", sizeof(struct s_buyingstore_item) },
#else
- #define _MAP_BUYINGSTORE_H_
- #endif // _MAP_BUYINGSTORE_H_
- #ifdef _MAP_CHRIF_H_
+ #define MAP_BUYINGSTORE_H
+ #endif // MAP_BUYINGSTORE_H
+ #ifdef MAP_CHRIF_H
{ "auth_node", sizeof(struct auth_node) },
#else
- #define _MAP_CHRIF_H_
- #endif // _MAP_CHRIF_H_
- #ifdef _MAP_CLIF_H_
+ #define MAP_CHRIF_H
+ #endif // MAP_CHRIF_H
+ #ifdef MAP_CLIF_H
{ "clif_interface", sizeof(struct clif_interface) },
#else
- #define _MAP_CLIF_H_
- #endif // _MAP_CLIF_H_
- #ifdef _MAP_ELEMENTAL_H_
+ #define MAP_CLIF_H
+ #endif // MAP_CLIF_H
+ #ifdef MAP_ELEMENTAL_H
{ "elemental_skill", sizeof(struct elemental_skill) },
#else
- #define _MAP_ELEMENTAL_H_
- #endif // _MAP_ELEMENTAL_H_
- #ifdef _MAP_GUILD_H_
+ #define MAP_ELEMENTAL_H
+ #endif // MAP_ELEMENTAL_H
+ #ifdef MAP_GUILD_H
{ "eventlist", sizeof(struct eventlist) },
+ { "guardian_data", sizeof(struct guardian_data) },
#else
- #define _MAP_GUILD_H_
- #endif // _MAP_GUILD_H_
- #ifdef _MAP_MAPREG_H_
+ #define MAP_GUILD_H
+ #endif // MAP_GUILD_H
+ #ifdef MAP_MAPREG_H
{ "mapreg_save", sizeof(struct mapreg_save) },
#else
- #define _MAP_MAPREG_H_
- #endif // _MAP_MAPREG_H_
- #ifdef _MAP_MAP_H_
+ #define MAP_MAPREG_H
+ #endif // MAP_MAPREG_H
+ #ifdef MAP_MAP_H
{ "map_data_other_server", sizeof(struct map_data_other_server) },
#else
- #define _MAP_MAP_H_
- #endif // _MAP_MAP_H_
- #ifdef _MAP_PACKETS_STRUCT_H_
+ #define MAP_MAP_H
+ #endif // MAP_MAP_H
+ #ifdef MAP_PACKETS_STRUCT_H
{ "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO) },
#else
- #define _MAP_PACKETS_STRUCT_H_
- #endif // _MAP_PACKETS_STRUCT_H_
- #ifdef _MAP_PC_H_
+ #define MAP_PACKETS_STRUCT_H
+ #endif // MAP_PACKETS_STRUCT_H
+ #ifdef MAP_PC_H
{ "autotrade_vending", sizeof(struct autotrade_vending) },
{ "item_cd", sizeof(struct item_cd) },
#else
- #define _MAP_PC_H_
- #endif // _MAP_PC_H_
- #ifdef _MAP_SCRIPT_H_
+ #define MAP_PC_H
+ #endif // MAP_PC_H
+ #ifdef MAP_SCRIPT_H
{ "Script_Config", sizeof(struct Script_Config) },
{ "reg_db", sizeof(struct reg_db) },
{ "script_interface", sizeof(struct script_interface) },
#else
- #define _MAP_SCRIPT_H_
- #endif // _MAP_SCRIPT_H_
- #ifdef _MAP_SEARCHSTORE_H_
+ #define MAP_SCRIPT_H
+ #endif // MAP_SCRIPT_H
+ #ifdef MAP_SEARCHSTORE_H
{ "searchstore_interface", sizeof(struct searchstore_interface) },
#else
- #define _MAP_SEARCHSTORE_H_
- #endif // _MAP_SEARCHSTORE_H_
- #ifdef _MAP_SKILL_H_
+ #define MAP_SEARCHSTORE_H
+ #endif // MAP_SEARCHSTORE_H
+ #ifdef MAP_SKILL_H
{ "skill_cd", sizeof(struct skill_cd) },
{ "skill_condition", sizeof(struct skill_condition) },
{ "skill_interface", sizeof(struct skill_interface) },
{ "skill_unit_save", sizeof(struct skill_unit_save) },
#else
- #define _MAP_SKILL_H_
- #endif // _MAP_SKILL_H_
+ #define MAP_SKILL_H
+ #endif // MAP_SKILL_H
};
HPExport unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck);
-#endif /* _HPM_DATA_CHECK_H_ */
+#endif /* HPM_DATA_CHECK_H */
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 95037fd14..478cfbdd9 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -1,12 +1,12 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_HPMI_H_
-#define _COMMON_HPMI_H_
+#ifndef COMMON_HPMI_H
+#define COMMON_HPMI_H
#include "../common/cbasetypes.h"
-#include "../common/core.h"
#include "../common/console.h"
+#include "../common/core.h"
#include "../common/sql.h"
struct script_state;
@@ -20,18 +20,6 @@ struct map_session_data;
#define HPExport
#endif
-#ifndef _COMMON_SHOWMSG_H_
- HPExport void (*ShowMessage) (const char *, ...);
- HPExport void (*ShowStatus) (const char *, ...);
- HPExport void (*ShowSQL) (const char *, ...);
- HPExport void (*ShowInfo) (const char *, ...);
- HPExport void (*ShowNotice) (const char *, ...);
- HPExport void (*ShowWarning) (const char *, ...);
- HPExport void (*ShowDebug) (const char *, ...);
- HPExport void (*ShowError) (const char *, ...);
- HPExport void (*ShowFatalError) (const char *, ...);
-#endif
-
/* after */
#include "../common/showmsg.h"
@@ -67,13 +55,13 @@ enum hp_event_types {
};
enum HPluginPacketHookingPoints {
- hpClif_Parse, /* map-server (client-map) */
- hpChrif_Parse, /* map-server (char-map) */
- hpParse_FromMap, /* char-server (map-char) */
- hpParse_FromLogin, /* char-server (login-char) */
- hpParse_Char, /* char-server (client-char) */
- hpParse_FromChar, /* login-server (char-login) */
- hpParse_Login, /* login-server (client-login) */
+ hpClif_Parse, ///< map-server (client-map)
+ hpChrif_Parse, ///< map-server (char-map)
+ hpParse_FromMap, ///< char-server (map-char)
+ hpParse_FromLogin, ///< char-server (login-char)
+ hpParse_Char, ///< char-server (client-char)
+ hpParse_FromChar, ///< login-server (char-login)
+ hpParse_Login, ///< login-server (client-login)
/* */
hpPHP_MAX,
};
@@ -192,8 +180,8 @@ HPExport struct HPMi_interface {
/* pc group permission */
void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask);
} HPMi_s;
-#ifndef _COMMON_HPM_H_
+#ifndef HERCULES_CORE
HPExport struct HPMi_interface *HPMi;
#endif
-#endif /* _COMMON_HPMI_H_ */
+#endif /* COMMON_HPMI_H */
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index 7bb9ae630..5dfdd35bd 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -1,3 +1,7 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
+# @configure_input@
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
@@ -15,8 +19,8 @@ MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
MT19937AR_INCLUDE = -I$(MT19937AR_D)
COMMON_SHARED_C = conf.c db.c des.c ers.c grfio.c HPM.c mapindex.c md5calc.c \
- mutex.c nullpo.c random.c showmsg.c strlib.c thread.c \
- timer.c utils.c
+ mutex.c nullpo.c random.c showmsg.c strlib.c sysinfo.c \
+ thread.c timer.c utils.c
COMMON_C = $(COMMON_SHARED_C)
COMMON_SHARED_OBJ = $(patsubst %.c,%.o,$(COMMON_SHARED_C))
COMMON_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \
@@ -27,11 +31,12 @@ COMMON_C += console.c core.c malloc.c socket.c
COMMON_H = atomic.h cbasetypes.h conf.h console.h core.h db.h des.h ers.h \
grfio.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h mmo.h mutex.h \
nullpo.h random.h showmsg.h socket.h spinlock.h sql.h strlib.h \
- thread.h timer.h utils.h winapi.h
+ sysinfo.h thread.h timer.h utils.h winapi.h
COMMON_SQL_OBJ = obj_sql/sql.o
COMMON_SQL_H = sql.h
COMMON_C += sql.c
+SYSINFO_INC = sysinfo.inc
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
@@ -54,7 +59,7 @@ sql: $(SQL_DEPENDS)
buildclean:
@echo " CLEAN common (build temp files)"
- @rm -rf *.o obj_all obj_sql
+ @rm -rf *.o obj_all obj_sql sysinfo.inc
clean: buildclean
@echo " CLEAN common"
@@ -71,6 +76,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/common/Makefile
+$(SYSINFO_INC): $(COMMON_C) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
@@ -103,18 +112,19 @@ common_mini: $(COMMON_MINI_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) obj_all/common
common_sql: $(COMMON_SQL_OBJ) obj_sql/common_sql.a Makefile
-obj_all/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_all
- @echo " CC $<"
- @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+obj_all/sysinfo.o: sysinfo.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) $(SYSINFO_INC) | obj_all
-obj_all/mini%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_all
+obj_all/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | $(SYSINFO_INC) obj_all
@echo " CC $<"
- @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
-obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H) $(CONFIG_H) $(LIBCONFIG_H) | obj_sql
+obj_all/mini%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | $(SYSINFO_INC) obj_all
@echo " CC $<"
- @$(CC) @CFLAGS@ $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H) $(CONFIG_H) $(LIBCONFIG_H) | $(SYSINFO_INC) obj_sql
+ @echo " CC $<"
+ @$(CC) @CFLAGS@ @DEFS@ $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(MT19937AR_OBJ):
diff --git a/src/common/atomic.h b/src/common/atomic.h
index 8c01943e7..e73b1c464 100644
--- a/src/common/atomic.h
+++ b/src/common/atomic.h
@@ -1,19 +1,19 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_ATOMIC_H_
-#define _COMMON_ATOMIC_H_
+#ifndef COMMON_ATOMIC_H
+#define COMMON_ATOMIC_H
-// Atomic Operations
+// Atomic Operations
// (Interlocked CompareExchange, Add .. and so on ..)
-//
+//
// Implementation varies / depends on:
// - Architecture
// - Compiler
// - Operating System
//
-// our Abstraction is fully API-Compatible to Microsofts implementation @ NT5.0+
-//
+// our Abstraction is fully API-Compatible to Microsoft's implementation @ NT5.0+
+//
#include "../common/cbasetypes.h"
#if defined(_MSC_VER)
@@ -23,7 +23,7 @@
#if _MSC_VER < 1800
#if !defined(_M_X64)
-// When compiling for windows 32bit, the 8byte interlocked operations are not provided by microsoft
+// When compiling for windows 32bit, the 8byte interlocked operations are not provided by Microsoft
// (because they need at least i586 so its not generic enough.. ... )
forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch, int64 _cmp){
_asm{
@@ -36,7 +36,7 @@ forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch,
mov ecx,4[edi];
mov esi,dest;
- lock CMPXCHG8B [esi];
+ lock CMPXCHG8B [esi];
}
}
@@ -143,7 +143,7 @@ static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){
}//end: InterlockedExchange()
-#endif //endif compiler decission
+#endif //endif compiler decision
-#endif /* _COMMON_ATOMIC_H_ */
+#endif /* COMMON_ATOMIC_H */
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index f44e80413..6ca67382f 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -1,5 +1,5 @@
-#ifndef _COMMON_CBASETYPES_H_
-#define _COMMON_CBASETYPES_H_
+#ifndef COMMON_CBASETYPES_H
+#define COMMON_CBASETYPES_H
/* +--------+-----------+--------+---------+
* | ILP32 | LP64 | ILP64 | (LL)P64 |
@@ -94,12 +94,6 @@
// portable printf/scanf format macros and integer definitions
// NOTE: Visual C++ uses <inttypes.h> and <stdint.h> provided in /3rdparty
//////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-#define __STDC_CONSTANT_MACROS
-#define __STDC_FORMAT_MACROS
-#define __STDC_LIMIT_MACROS
-#endif
-
#include <inttypes.h>
#include <stdint.h>
#include <limits.h>
@@ -280,11 +274,6 @@ typedef uintptr_t uintptr;
#endif
-/////////////////////////////
-// for those still not building c++
-#ifndef __cplusplus
-//////////////////////////////
-
// boolean types for C
#if !defined(_MSC_VER) || _MSC_VER >= 1800
// MSVC doesn't have stdbool.h yet as of Visual Studio 2012 (MSVC version 17.00)
@@ -302,10 +291,6 @@ typedef char bool;
#define __bool_true_false_are_defined
#endif // __bool_true_false_are_defined
-//////////////////////////////
-#endif // not __cplusplus
-//////////////////////////////
-
//////////////////////////////////////////////////////////////////////////
// macro tools
@@ -313,7 +298,7 @@ typedef char bool;
#undef swap
#endif
// hmm only ints?
-//#define swap(a,b) { int temp=a; a=b; b=temp;}
+//#define swap(a,b) { int temp=a; a=b; b=temp;}
// if using macros then something that is type independent
//#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b)))
// Avoid "value computed is not used" warning and generates the same assembly code
@@ -421,26 +406,11 @@ typedef char bool;
#define EXPAND_AND_QUOTE(x) QUOTE(x)
-//////////////////////////////////////////////////////////////////////////
-// Set a pointer variable to a pointer value.
-#ifdef __cplusplus
-template <typename T1, typename T2>
-void SET_POINTER(T1*&var, T2* p)
-{
- var = static_cast<T1*>(p);
-}
-template <typename T1, typename T2>
-void SET_FUNCPOINTER(T1& var, T2 p)
-{
- char ASSERT_POINTERSIZE[sizeof(T1) == sizeof(void*) && sizeof(T2) == sizeof(void*)?1:-1];// 1 if true, -1 if false
- union{ T1 out; T2 in; } tmp;// /!\ WARNING casting a pointer to a function pointer is against the C++ standard
- tmp.in = p;
- var = tmp.out;
-}
+/* pointer size fix which fixes several gcc warnings */
+#ifdef __64BIT__
+ #define h64BPTRSIZE(y) ((intptr)(y))
#else
-#define SET_POINTER(var,p) ((var) = (p))
-#define SET_FUNCPOINTER(var,p) ((var) = (p))
+ #define h64BPTRSIZE(y) (y)
#endif
-
-#endif /* _COMMON_CBASETYPES_H_ */
+#endif /* COMMON_CBASETYPES_H */
diff --git a/src/common/conf.c b/src/common/conf.c
index b816b2f7f..46a034497 100644
--- a/src/common/conf.c
+++ b/src/common/conf.c
@@ -2,7 +2,10 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
#include "conf.h"
+
#include "../../3rdparty/libconfig/libconfig.h"
#include "../common/showmsg.h" // ShowError
diff --git a/src/common/conf.h b/src/common/conf.h
index 9aff3df47..c232a035c 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -2,14 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_CONF_H_
-#define _COMMON_CONF_H_
+#ifndef COMMON_CONF_H
+#define COMMON_CONF_H
#include "../common/cbasetypes.h"
+
#include "../../3rdparty/libconfig/libconfig.h"
/**
- * The libconfig interface -- specially for plugins, but we enforce it throughought the core to be consistent
+ * The libconfig interface -- specially for plugins, but we enforce it throughout the core to be consistent
**/
struct libconfig_interface {
int (*read) (config_t *config, FILE *stream);
@@ -94,4 +95,4 @@ struct libconfig_interface *libconfig;
void libconfig_defaults(void);
-#endif // _COMMON_CONF_H_
+#endif // COMMON_CONF_H
diff --git a/src/common/console.c b/src/common/console.c
index ec228b563..6a82db555 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -2,47 +2,51 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "../config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT
+#include "console.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
#include "../common/core.h"
-#include "../config/core.h"
-#include "console.h"
+#include "../common/showmsg.h"
+#include "../common/sysinfo.h"
#ifndef MINICORE
- #include "../common/ers.h"
- #include "../common/malloc.h"
- #include "../common/atomic.h"
- #include "../common/spinlock.h"
- #include "../common/thread.h"
- #include "../common/mutex.h"
- #include "../common/timer.h"
- #include "../common/strlib.h"
- #include "../common/sql.h"
+# include "../common/atomic.h"
+# include "../common/ers.h"
+# include "../common/malloc.h"
+# include "../common/mutex.h"
+# include "../common/spinlock.h"
+# include "../common/sql.h"
+# include "../common/strlib.h"
+# include "../common/thread.h"
+# include "../common/timer.h"
#endif
-#include <stdio.h>
-#include <stdlib.h>
#if !defined(WIN32)
- #include <unistd.h>
- #include <sys/time.h>
+# include <sys/time.h>
+# include <unistd.h>
#else
- #include "../common/winapi.h" // Console close event handling
+# include "../common/winapi.h" // Console close event handling
+# ifdef CONSOLE_INPUT
+# include <conio.h> /* _kbhit() */
+# endif
#endif
+struct console_interface console_s;
#ifdef CONSOLE_INPUT
- #if defined(WIN32)
- #include <conio.h> /* _kbhit() */
- #endif
+struct console_input_interface console_input_s;
#endif
-struct console_interface console_s;
-
/*======================================
* CORE : Display title
*--------------------------------------*/
void display_title(void) {
- const char* svn = get_svn_revision();
- const char* git = get_git_hash();
+ const char *vcstype = sysinfo->vcstype();
ShowMessage("\n");
ShowMessage(""CL_BG_RED""CL_BT_WHITE" "CL_CLL""CL_NORMAL"\n");
@@ -57,10 +61,13 @@ void display_title(void) {
ShowMessage(""CL_BG_RED""CL_BT_WHITE" http://hercules.ws/board/ "CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_BG_RED""CL_BT_WHITE" "CL_CLL""CL_NORMAL"\n");
- if( git[0] != HERC_UNKNOWN_VER )
- ShowInfo("Git Hash: '"CL_WHITE"%s"CL_RESET"'\n", git);
- else if( svn[0] != HERC_UNKNOWN_VER )
- ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'\n", svn);
+ ShowInfo("Hercules %d-bit for %s\n", sysinfo->is64bit() ? 64 : 32, sysinfo->platform());
+ ShowInfo("%s revision (src): '"CL_WHITE"%s"CL_RESET"'\n", vcstype, sysinfo->vcsrevision_src());
+ ShowInfo("%s revision (scripts): '"CL_WHITE"%s"CL_RESET"'\n", vcstype, sysinfo->vcsrevision_scripts());
+ ShowInfo("OS version: '"CL_WHITE"%s"CL_RESET" [%s]'\n", sysinfo->osversion(), sysinfo->arch());
+ ShowInfo("CPU: '"CL_WHITE"%s [%d]"CL_RESET"'\n", sysinfo->cpu(), sysinfo->cpucores());
+ ShowInfo("Compiled with %s\n", sysinfo->compiler());
+ ShowInfo("Compile Flags: %s\n", sysinfo->cflags());
}
#ifdef CONSOLE_INPUT
#if defined(WIN32)
@@ -113,12 +120,12 @@ CPCMD_C(mem_report,server) {
**/
CPCMD(help) {
unsigned int i = 0;
- for ( i = 0; i < console->cmd_list_count; i++ ) {
- if( console->cmd_list[i]->next_count ) {
- ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->cmd_list[i]->cmd);
- console->parse_list_subs(console->cmd_list[i],2);
+ for ( i = 0; i < console->input->cmd_list_count; i++ ) {
+ if( console->input->cmd_list[i]->next_count ) {
+ ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",console->input->cmd_list[i]->cmd);
+ console->input->parse_list_subs(console->input->cmd_list[i],2);
} else {
- ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->cmd_list[i]->cmd);
+ ShowInfo("- '"CL_WHITE"%s"CL_RESET"'\n",console->input->cmd_list[i]->cmd);
}
}
}
@@ -141,7 +148,7 @@ CPCMD_C(skip,update) {
ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n");
return;
}
- Sql_HerculesUpdateSkip(console->SQL, line);
+ Sql_HerculesUpdateSkip(console->input->SQL, line);
}
/**
@@ -203,7 +210,7 @@ void console_load_defaults(void) {
unsigned int i, len = ARRAYLENGTH(default_list);
struct CParseEntry *cmd;
- RECREATE(console->cmds,struct CParseEntry *, len);
+ RECREATE(console->input->cmds,struct CParseEntry *, len);
for(i = 0; i < len; i++) {
CREATE(cmd, struct CParseEntry, 1);
@@ -217,12 +224,12 @@ void console_load_defaults(void) {
cmd->next_count = 0;
- console->cmd_count++;
- console->cmds[i] = cmd;
+ console->input->cmd_count++;
+ console->input->cmds[i] = cmd;
default_list[i].self = cmd;
if( !default_list[i].connect ) {
- RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count);
- console->cmd_list[console->cmd_list_count - 1] = cmd;
+ RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count);
+ console->input->cmd_list[console->input->cmd_list_count - 1] = cmd;
}
}
@@ -230,11 +237,11 @@ void console_load_defaults(void) {
unsigned int k;
if( !default_list[i].connect )
continue;
- for(k = 0; k < console->cmd_count; k++) {
- if( strcmpi(default_list[i].connect,console->cmds[k]->cmd) == 0 ) {
+ for(k = 0; k < console->input->cmd_count; k++) {
+ if( strcmpi(default_list[i].connect,console->input->cmds[k]->cmd) == 0 ) {
cmd = default_list[i].self;
- RECREATE(console->cmds[k]->u.next, struct CParseEntry *, ++console->cmds[k]->next_count);
- console->cmds[k]->u.next[console->cmds[k]->next_count - 1] = cmd;
+ RECREATE(console->input->cmds[k]->u.next, struct CParseEntry *, ++console->input->cmds[k]->next_count);
+ console->input->cmds[k]->u.next[console->input->cmds[k]->next_count - 1] = cmd;
break;
}
}
@@ -253,23 +260,23 @@ void console_parse_create(char *name, CParseFunc func) {
safestrncpy(sublist, name, CP_CMD_LENGTH * 5);
tok = strtok(sublist,":");
- for ( i = 0; i < console->cmd_list_count; i++ ) {
- if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 )
+ for ( i = 0; i < console->input->cmd_list_count; i++ ) {
+ if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 )
break;
}
- if( i == console->cmd_list_count ) {
- RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count);
+ if( i == console->input->cmd_list_count ) {
+ RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count);
CREATE(cmd, struct CParseEntry, 1);
safestrncpy(cmd->cmd, tok, CP_CMD_LENGTH);
cmd->next_count = 0;
- console->cmds[console->cmd_count - 1] = cmd;
- RECREATE(console->cmd_list,struct CParseEntry *, ++console->cmd_list_count);
- console->cmd_list[console->cmd_list_count - 1] = cmd;
- i = console->cmd_list_count - 1;
+ console->input->cmds[console->input->cmd_count - 1] = cmd;
+ RECREATE(console->input->cmd_list,struct CParseEntry *, ++console->input->cmd_list_count);
+ console->input->cmd_list[console->input->cmd_list_count - 1] = cmd;
+ i = console->input->cmd_list_count - 1;
}
- cmd = console->cmd_list[i];
+ cmd = console->input->cmd_list[i];
while( ( tok = strtok(NULL, ":") ) != NULL ) {
for(i = 0; i < cmd->next_count; i++) {
@@ -278,13 +285,13 @@ void console_parse_create(char *name, CParseFunc func) {
}
if ( i == cmd->next_count ) {
- RECREATE(console->cmds,struct CParseEntry *, ++console->cmd_count);
- CREATE(console->cmds[console->cmd_count-1], struct CParseEntry, 1);
- safestrncpy(console->cmds[console->cmd_count-1]->cmd, tok, CP_CMD_LENGTH);
- console->cmds[console->cmd_count-1]->next_count = 0;
+ RECREATE(console->input->cmds,struct CParseEntry *, ++console->input->cmd_count);
+ CREATE(console->input->cmds[console->input->cmd_count-1], struct CParseEntry, 1);
+ safestrncpy(console->input->cmds[console->input->cmd_count-1]->cmd, tok, CP_CMD_LENGTH);
+ console->input->cmds[console->input->cmd_count-1]->next_count = 0;
RECREATE(cmd->u.next, struct CParseEntry *, ++cmd->next_count);
- cmd->u.next[cmd->next_count - 1] = console->cmds[console->cmd_count-1];
- cmd = console->cmds[console->cmd_count-1];
+ cmd->u.next[cmd->next_count - 1] = console->input->cmds[console->input->cmd_count-1];
+ cmd = console->input->cmds[console->input->cmd_count-1];
continue;
}
@@ -299,7 +306,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) {
memset(msg, '-', depth);
snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd);
ShowInfo("%s subs\n",msg);
- console->parse_list_subs(cmd->u.next[i],depth + 1);
+ console->input->parse_list_subs(cmd->u.next[i],depth + 1);
} else {
memset(msg, '-', depth);
snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd);
@@ -317,21 +324,21 @@ void console_parse_sub(char *line) {
memcpy(bline, line, 200);
tok = strtok(line, " ");
- for ( i = 0; i < console->cmd_list_count; i++ ) {
- if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 )
+ for ( i = 0; i < console->input->cmd_list_count; i++ ) {
+ if( strcmpi(tok,console->input->cmd_list[i]->cmd) == 0 )
break;
}
- if( i == console->cmd_list_count ) {
+ if( i == console->input->cmd_list_count ) {
ShowError("'"CL_WHITE"%s"CL_RESET"' is not a known command, type '"CL_WHITE"help"CL_RESET"' to list all commands\n",line);
return;
}
- cmd = console->cmd_list[i];
+ cmd = console->input->cmd_list[i];
len += snprintf(sublist,CP_CMD_LENGTH * 5,"%s", cmd->cmd) + 1;
- if( cmd->next_count == 0 && console->cmd_list[i]->u.func ) {
+ if( cmd->next_count == 0 && console->input->cmd_list[i]->u.func ) {
char *r = NULL;
if( (tok = strtok(NULL, " ")) ) {
r = bline;
@@ -348,7 +355,7 @@ void console_parse_sub(char *line) {
if( strcmpi("help",tok) == 0 ) {
if( cmd->next_count ) {
ShowInfo("- '"CL_WHITE"%s"CL_RESET"' subs\n",sublist);
- console->parse_list_subs(cmd,2);
+ console->input->parse_list_subs(cmd,2);
} else {
ShowError("'"CL_WHITE"%s"CL_RESET"' doesn't possess any subcommands\n",sublist);
}
@@ -389,95 +396,95 @@ void console_parse(char* line) {
}
void *cThread_main(void *x) {
- while( console->ptstate ) {/* loopx */
- if( console->key_pressed() ) {
+ while( console->input->ptstate ) {/* loopx */
+ if( console->input->key_pressed() ) {
char input[MAX_CONSOLE_INPUT];
- console->parse(input);
+ console->input->parse(input);
if( input[0] != '\0' ) {/* did we get something? */
- EnterSpinLock(&console->ptlock);
+ EnterSpinLock(&console->input->ptlock);
if( cinput.count == CONSOLE_PARSE_SIZE ) {
- LeaveSpinLock(&console->ptlock);
+ LeaveSpinLock(&console->input->ptlock);
continue;/* drop */
}
safestrncpy(cinput.queue[cinput.count++],input,MAX_CONSOLE_INPUT);
- LeaveSpinLock(&console->ptlock);
+ LeaveSpinLock(&console->input->ptlock);
}
}
- ramutex_lock( console->ptmutex );
- racond_wait( console->ptcond, console->ptmutex, -1 );
- ramutex_unlock( console->ptmutex );
+ ramutex_lock( console->input->ptmutex );
+ racond_wait( console->input->ptcond, console->input->ptmutex, -1 );
+ ramutex_unlock( console->input->ptmutex );
}
return NULL;
}
int console_parse_timer(int tid, int64 tick, int id, intptr_t data) {
int i;
- EnterSpinLock(&console->ptlock);
+ EnterSpinLock(&console->input->ptlock);
for(i = 0; i < cinput.count; i++) {
- console->parse_sub(cinput.queue[i]);
+ console->input->parse_sub(cinput.queue[i]);
}
cinput.count = 0;
- LeaveSpinLock(&console->ptlock);
- racond_signal(console->ptcond);
+ LeaveSpinLock(&console->input->ptlock);
+ racond_signal(console->input->ptcond);
return 0;
}
void console_parse_final(void) {
- if( console->ptstate ) {
- InterlockedDecrement(&console->ptstate);
- racond_signal(console->ptcond);
+ if( console->input->ptstate ) {
+ InterlockedDecrement(&console->input->ptstate);
+ racond_signal(console->input->ptcond);
/* wait for thread to close */
- rathread_wait(console->pthread, NULL);
+ rathread_wait(console->input->pthread, NULL);
- racond_destroy(console->ptcond);
- ramutex_destroy(console->ptmutex);
+ racond_destroy(console->input->ptcond);
+ ramutex_destroy(console->input->ptmutex);
}
}
void console_parse_init(void) {
cinput.count = 0;
- console->ptstate = 1;
+ console->input->ptstate = 1;
- InitializeSpinLock(&console->ptlock);
+ InitializeSpinLock(&console->input->ptlock);
- console->ptmutex = ramutex_create();
- console->ptcond = racond_create();
+ console->input->ptmutex = ramutex_create();
+ console->input->ptcond = racond_create();
- if( (console->pthread = rathread_create(console->pthread_main, NULL)) == NULL ){
+ if( (console->input->pthread = rathread_create(console->input->pthread_main, NULL)) == NULL ){
ShowFatalError("console_parse_init: failed to spawn console_parse thread.\n");
exit(EXIT_FAILURE);
}
- timer->add_func_list(console->parse_timer, "console_parse_timer");
- timer->add_interval(timer->gettick() + 1000, console->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */
+ timer->add_func_list(console->input->parse_timer, "console_parse_timer");
+ timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */
}
void console_setSQL(Sql *SQL_handle) {
- console->SQL = SQL_handle;
+ console->input->SQL = SQL_handle;
}
#endif /* CONSOLE_INPUT */
void console_init (void) {
#ifdef CONSOLE_INPUT
- console->cmd_count = console->cmd_list_count = 0;
- console->load_defaults();
- console->parse_init();
+ console->input->cmd_count = console->input->cmd_list_count = 0;
+ console->input->load_defaults();
+ console->input->parse_init();
#endif
}
void console_final(void) {
#ifdef CONSOLE_INPUT
unsigned int i;
- console->parse_final();
- for( i = 0; i < console->cmd_count; i++ ) {
- if( console->cmds[i]->next_count )
- aFree(console->cmds[i]->u.next);
- aFree(console->cmds[i]);
+ console->input->parse_final();
+ for( i = 0; i < console->input->cmd_count; i++ ) {
+ if( console->input->cmds[i]->next_count )
+ aFree(console->input->cmds[i]->u.next);
+ aFree(console->input->cmds[i]);
}
- aFree(console->cmds);
- aFree(console->cmd_list);
+ aFree(console->input->cmds);
+ aFree(console->input->cmd_list);
#endif
}
void console_defaults(void) {
@@ -486,17 +493,20 @@ void console_defaults(void) {
console->final = console_final;
console->display_title = display_title;
#ifdef CONSOLE_INPUT
- console->parse_init = console_parse_init;
- console->parse_final = console_parse_final;
- console->parse_timer = console_parse_timer;
- console->pthread_main = cThread_main;
- console->parse = console_parse;
- console->parse_sub = console_parse_sub;
- console->key_pressed = console_parse_key_pressed;
- console->load_defaults = console_load_defaults;
- console->parse_list_subs = console_parse_list_subs;
- console->addCommand = console_parse_create;
- console->setSQL = console_setSQL;
- console->SQL = NULL;
+ console->input = &console_input_s;
+ console->input->parse_init = console_parse_init;
+ console->input->parse_final = console_parse_final;
+ console->input->parse_timer = console_parse_timer;
+ console->input->pthread_main = cThread_main;
+ console->input->parse = console_parse;
+ console->input->parse_sub = console_parse_sub;
+ console->input->key_pressed = console_parse_key_pressed;
+ console->input->load_defaults = console_load_defaults;
+ console->input->parse_list_subs = console_parse_list_subs;
+ console->input->addCommand = console_parse_create;
+ console->input->setSQL = console_setSQL;
+ console->input->SQL = NULL;
+#else
+ console->input = NULL;
#endif
}
diff --git a/src/common/console.h b/src/common/console.h
index bd1de4cbf..062d48bbe 100644
--- a/src/common/console.h
+++ b/src/common/console.h
@@ -1,14 +1,16 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_CONSOLE_H_
-#define _COMMON_CONSOLE_H_
+#ifndef COMMON_CONSOLE_H
+#define COMMON_CONSOLE_H
-#include "../common/thread.h"
+#include "../config/core.h" // MAX_CONSOLE_INPUT
+
+#include "../common/cbasetypes.h"
#include "../common/mutex.h"
#include "../common/spinlock.h"
#include "../common/sql.h"
-#include "../config/core.h"
+#include "../common/thread.h"
/**
* Queue Max
@@ -47,17 +49,14 @@ struct {
unsigned short count;
} cinput;
-struct console_interface {
- void (*init) (void);
- void (*final) (void);
- void (*display_title) (void);
#ifdef CONSOLE_INPUT
+struct console_input_interface {
/* vars */
SPIN_LOCK ptlock;/* parse thread lock */
- rAthread pthread;/* parse thread */
+ rAthread *pthread;/* parse thread */
volatile int32 ptstate;/* parse thread state */
- ramutex ptmutex;/* parse thread mutex */
- racond ptcond;/* parse thread cond */
+ ramutex *ptmutex;/* parse thread mutex */
+ racond *ptcond;/* parse thread cond */
/* */
struct CParseEntry **cmd_list;
struct CParseEntry **cmds;
@@ -77,11 +76,21 @@ struct console_interface {
void (*parse_list_subs) (struct CParseEntry *cmd, unsigned char depth);
void (*addCommand) (char *name, CParseFunc func);
void (*setSQL) (Sql *SQL_handle);
+};
+#else
+struct console_input_interface;
#endif
+
+struct console_interface {
+ void (*init) (void);
+ void (*final) (void);
+ void (*display_title) (void);
+
+ struct console_input_interface *input;
};
struct console_interface *console;
void console_defaults(void);
-#endif /* _COMMON_CONSOLE_H_ */
+#endif /* COMMON_CONSOLE_H */
diff --git a/src/common/core.c b/src/common/core.c
index c6075da40..99dbc36ec 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -2,35 +2,41 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
+#define HERCULES_CORE
+
+#include "../config/core.h"
#include "core.h"
+
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/cbasetypes.h"
#include "../common/console.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/sysinfo.h"
#ifndef MINICORE
- #include "../common/db.h"
- #include "../common/socket.h"
- #include "../common/timer.h"
- #include "../common/thread.h"
- #include "../common/sql.h"
- #include "../config/core.h"
- #include "../common/HPM.h"
- #include "../common/utils.h"
- #include "../common/conf.h"
- #include "../common/ers.h"
+# include "../common/HPM.h"
+# include "../common/conf.h"
+# include "../common/db.h"
+# include "../common/ers.h"
+# include "../common/socket.h"
+# include "../common/sql.h"
+# include "../common/thread.h"
+# include "../common/timer.h"
+# include "../common/utils.h"
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
#ifndef _WIN32
-#include <unistd.h>
+# include <unistd.h>
#else
-#include "../common/winapi.h" // Console close event handling
+# include "../common/winapi.h" // Console close event handling
#endif
/// Called when a terminate signal is received.
@@ -78,7 +84,7 @@ sigfunc *compat_signal(int signo, sigfunc *func) {
*--------------------------------------*/
#ifdef _WIN32
static BOOL WINAPI console_handler(DWORD c_event) {
- switch(c_event) {
+ switch(c_event) {
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
@@ -89,11 +95,11 @@ static BOOL WINAPI console_handler(DWORD c_event) {
break;
default:
return FALSE;
- }
- return TRUE;
+ }
+ return TRUE;
}
-static void cevents_init() {
+static void cevents_init(void) {
if (SetConsoleCtrlHandler(console_handler,TRUE)==FALSE)
ShowWarning ("Unable to install the console handler!\n");
}
@@ -152,134 +158,21 @@ void signals_init (void) {
}
#endif
-const char* get_svn_revision(void) {
- static char svn_version_buffer[16] = "";
- FILE *fp;
-
- if( svn_version_buffer[0] != '\0' )
- return svn_version_buffer;
-
- // subversion 1.7 uses a sqlite3 database
- // FIXME this is hackish at best...
- // - ignores database file structure
- // - assumes the data in NODES.dav_cache column ends with "!svn/ver/<revision>/<path>)"
- // - since it's a cache column, the data might not even exist
- if( (fp = fopen(".svn"PATHSEP_STR"wc.db", "rb")) != NULL || (fp = fopen(".."PATHSEP_STR".svn"PATHSEP_STR"wc.db", "rb")) != NULL )
- {
- #ifndef SVNNODEPATH
- //not sure how to handle branches, so i'll leave this overridable define until a better solution comes up
- #define SVNNODEPATH trunk
- #endif
- const char* prefix = "!svn/ver/";
- const char* postfix = "/"EXPAND_AND_QUOTE(SVNNODEPATH)")"; // there should exist only 1 entry like this
- size_t prefix_len = strlen(prefix);
- size_t postfix_len = strlen(postfix);
- size_t i,j,len;
- char* buffer;
-
- // read file to buffer
- fseek(fp, 0, SEEK_END);
- len = ftell(fp);
- buffer = (char*)aMalloc(len + 1);
- fseek(fp, 0, SEEK_SET);
- len = fread(buffer, 1, len, fp);
- buffer[len] = '\0';
- fclose(fp);
-
- // parse buffer
- for( i = prefix_len + 1; i + postfix_len <= len; ++i ) {
- if( buffer[i] != postfix[0] || memcmp(buffer + i, postfix, postfix_len) != 0 )
- continue; // postfix missmatch
- for( j = i; j > 0; --j ) {// skip digits
- if( !ISDIGIT(buffer[j - 1]) )
- break;
- }
- if( memcmp(buffer + j - prefix_len, prefix, prefix_len) != 0 )
- continue; // prefix missmatch
- // done
- snprintf(svn_version_buffer, sizeof(svn_version_buffer), "%d", atoi(buffer + j));
- break;
- }
- aFree(buffer);
-
- if( svn_version_buffer[0] != '\0' )
- return svn_version_buffer;
- }
-
- // subversion 1.6 and older?
- if ((fp = fopen(".svn/entries", "r")) != NULL) {
- char line[1024];
- int rev;
- // Check the version
- if (fgets(line, sizeof(line), fp)) {
- if(!ISDIGIT(line[0])) {
- // XML File format
- while (fgets(line,sizeof(line),fp))
- if (strstr(line,"revision=")) break;
- if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
- snprintf(svn_version_buffer, sizeof(svn_version_buffer), "%d", rev);
- }
- } else {
- // Bin File format
- if ( fgets(line, sizeof(line), fp) == NULL ) { printf("Can't get bin name\n"); } // Get the name
- if ( fgets(line, sizeof(line), fp) == NULL ) { printf("Can't get entries kind\n"); } // Get the entries kind
- if(fgets(line, sizeof(line), fp)) { // Get the rev numver
- snprintf(svn_version_buffer, sizeof(svn_version_buffer), "%d", atoi(line));
- }
- }
- }
- fclose(fp);
-
- if( svn_version_buffer[0] != '\0' )
- return svn_version_buffer;
- }
-
- // fallback
- svn_version_buffer[0] = HERC_UNKNOWN_VER;
- return svn_version_buffer;
-}
-/* whats our origin */
-#define GIT_ORIGIN "refs/remotes/origin/master"
-/* Grabs the hash from the last time the user updated his working copy (last pull) */
-const char *get_git_hash (void) {
- static char HerculesGitHash[41] = "";//Sha(40) + 1
- FILE *fp;
-
- if( HerculesGitHash[0] != '\0' )
- return HerculesGitHash;
-
- if ( (fp = fopen (".git/"GIT_ORIGIN, "r")) != NULL) {
- char line[64];
- char *rev = malloc (sizeof (char) * 50);
-
- if (fgets (line, sizeof (line), fp) && sscanf (line, "%50s", rev))
- snprintf (HerculesGitHash, sizeof (HerculesGitHash), "%s", rev);
-
- free (rev);
- fclose (fp);
- } else {
- HerculesGitHash[0] = HERC_UNKNOWN_VER;
- }
-
- if (! (*HerculesGitHash)) {
- HerculesGitHash[0] = HERC_UNKNOWN_VER;
- }
-
- return HerculesGitHash;
-}
-// Warning if executed as superuser (root)
+/**
+ * Warns the user if executed as superuser (root)
+ */
void usercheck(void) {
-#ifndef _WIN32
- if (geteuid() == 0) {
- ShowWarning ("You are running Hercules with root privileges, it is not necessary.\n");
- }
-#endif
+ if (sysinfo->is_superuser()) {
+ ShowWarning("You are running Hercules with root privileges, it is not necessary.\n");
+ }
}
+
void core_defaults(void) {
#ifndef MINICORE
hpm_defaults();
HCache_defaults();
#endif
+ sysinfo_defaults();
console_defaults();
strlib_defaults();
malloc_defaults();
@@ -295,6 +188,7 @@ void core_defaults(void) {
* CORE : MAINROUTINE
*--------------------------------------*/
int main (int argc, char **argv) {
+ int retval = EXIT_SUCCESS;
{// initialize program arguments
char *p1 = SERVER_NAME = argv[0];
char *p2 = p1;
@@ -318,16 +212,18 @@ int main (int argc, char **argv) {
iMalloc->init();// needed for Show* in display_title() [FlavioJS]
+ sysinfo->init();
+
if (!(msg_silent&0x1))
console->display_title();
-
-#ifdef MINICORE // minimalist Core
+
usercheck();
+
+#ifdef MINICORE // minimalist Core
do_init(argc,argv);
do_final();
#else// not MINICORE
set_server_type();
- usercheck();
Sql_Init();
rathread_init();
@@ -348,10 +244,8 @@ int main (int argc, char **argv) {
HCache->init();
-#ifndef MINICORE
HPM->init();
-#endif
-
+
sockt->init();
do_init(argc,argv);
@@ -365,18 +259,17 @@ int main (int argc, char **argv) {
console->final();
- do_final();
-#ifndef MINICORE
+ retval = do_final();
HPM->final();
-#endif
timer->final();
sockt->final();
DB->final();
rathread_final();
ers_final();
#endif
+ //sysinfo->final(); Called by iMalloc->final()
iMalloc->final();
- return 0;
+ return retval;
}
diff --git a/src/common/core.h b/src/common/core.h
index 72f956e1d..a8337e1b9 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -2,16 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_CORE_H_
-#define _COMMON_CORE_H_
+#ifndef COMMON_CORE_H
+#define COMMON_CORE_H
#include "../common/db.h"
#include "../common/mmo.h"
-#include "../config/core.h"
/* so that developers with --enable-debug can raise signals from any section of the code they'd like */
#ifdef DEBUG
- #include <signal.h>
+# include <signal.h>
#endif
extern int arg_c;
@@ -24,20 +23,18 @@ extern int runflag;
extern char *SERVER_NAME;
enum server_types {
- SERVER_TYPE_UNKNOWN = 0x0,
- SERVER_TYPE_LOGIN = 0x1,
- SERVER_TYPE_CHAR = 0x2,
- SERVER_TYPE_MAP = 0x4,
+ SERVER_TYPE_UNKNOWN = 0x0,
+ SERVER_TYPE_LOGIN = 0x1,
+ SERVER_TYPE_CHAR = 0x2,
+ SERVER_TYPE_MAP = 0x4,
};
enum server_types SERVER_TYPE;
-const char *get_svn_revision(void);
-const char *get_git_hash (void);
extern int do_init(int,char**);
extern void set_server_type(void);
extern void do_abort(void);
-extern void do_final(void);
+extern int do_final(void);
/// The main loop continues until runflag is CORE_ST_STOP
enum E_CORE_ST {
@@ -50,4 +47,4 @@ enum E_CORE_ST {
/// If NULL, runflag is set to CORE_ST_STOP instead.
extern void (*shutdown_callback)(void);
-#endif /* _COMMON_CORE_H_ */
+#endif /* COMMON_CORE_H */
diff --git a/src/common/db.c b/src/common/db.c
index 8d6b08815..f414ca04d 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -3,7 +3,7 @@
* For more information, see LICENCE in the main folder
*
* This file is separated in five sections:
- * (1) Private typedefs, enums, structures, defines and gblobal variables
+ * (1) Private typedefs, enums, structures, defines and global variables
* (2) Private functions
* (3) Protected functions used internally
* (4) Protected functions used in the interface of the database
@@ -67,14 +67,18 @@
* @encoding US-ASCII
* @see #db.h
\*****************************************************************************/
+
+#define HERCULES_CORE
+
+#include "db.h"
+
#include <stdio.h>
#include <stdlib.h>
-#include "db.h"
-#include "../common/mmo.h"
+#include "../common/ers.h"
#include "../common/malloc.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
-#include "../common/ers.h"
#include "../common/strlib.h"
/*****************************************************************************\
@@ -85,15 +89,15 @@
* DBNColor - Enumeration of colors of the nodes. *
* DBNode - Structure of a node in RED-BLACK trees. *
* struct db_free - Structure that holds a deleted node to be freed. *
- * DBMap_impl - Struture of the database. *
+ * DBMap_impl - Structure of the database. *
* stats - Statistics about the database system. *
\*****************************************************************************/
/**
- * If defined statistics about database nodes, database creating/destruction
- * and function usage are keept and displayed when finalizing the database
+ * If defined statistics about database nodes, database creating/destruction
+ * and function usage are kept and displayed when finalizing the database
* system.
- * WARNING: This adds overhead to every database operation (not shure how much).
+ * WARNING: This adds overhead to every database operation (not sure how much).
* @private
* @see #DBStats
* @see #stats
@@ -141,7 +145,7 @@ typedef struct dbn {
// Other
node_color color;
unsigned deleted : 1;
-} *DBNode;
+} DBNode;
/**
* Structure that holds a deleted node.
@@ -151,8 +155,8 @@ typedef struct dbn {
* @see DBMap_impl#free_list
*/
struct db_free {
- DBNode node;
- DBNode *root;
+ DBNode *node;
+ DBNode **root;
};
/**
@@ -189,12 +193,12 @@ typedef struct DBMap_impl {
unsigned int free_max;
unsigned int free_lock;
// Other
- ERS nodes;
+ ERS *nodes;
DBComparator cmp;
DBHasher hash;
DBReleaser release;
- DBNode ht[HASH_SIZE];
- DBNode cache;
+ DBNode *ht[HASH_SIZE];
+ DBNode *cache;
DBType type;
DBOptions options;
uint32 item_count;
@@ -218,7 +222,7 @@ typedef struct DBIterator_impl {
struct DBIterator vtable;
DBMap_impl* db;
int ht_index;
- DBNode node;
+ DBNode *node;
} DBIterator_impl;
#if defined(DB_ENABLE_STATS)
@@ -326,7 +330,7 @@ static struct db_stats {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0
};
-#define DB_COUNTSTAT(token) do { if (stats. ## token != UINT32_MAX) ++stats. ## token ; } while(0)
+#define DB_COUNTSTAT(token) do { if ((stats.token) != UINT32_MAX) ++(stats.token); } while(0)
#else /* !defined(DB_ENABLE_STATS) */
#define DB_COUNTSTAT(token)
#endif /* !defined(DB_ENABLE_STATS) */
@@ -357,12 +361,12 @@ struct eri *db_alloc_ers;
* @param node Node to be rotated
* @param root Pointer to the root of the tree
* @private
- * @see #db_rebalance(DBNode,DBNode *)
- * @see #db_rebalance_erase(DBNode,DBNode *)
+ * @see #db_rebalance(DBNode *,DBNode **)
+ * @see #db_rebalance_erase(DBNode *,DBNode **)
*/
-static void db_rotate_left(DBNode node, DBNode *root)
+static void db_rotate_left(DBNode *node, DBNode **root)
{
- DBNode y = node->right;
+ DBNode *y = node->right;
DB_COUNTSTAT(db_rotate_left);
// put the left of y at the right of node
@@ -388,12 +392,12 @@ static void db_rotate_left(DBNode node, DBNode *root)
* @param node Node to be rotated
* @param root Pointer to the root of the tree
* @private
- * @see #db_rebalance(DBNode,DBNode *)
- * @see #db_rebalance_erase(DBNode,DBNode *)
+ * @see #db_rebalance(DBNode *,DBNode **)
+ * @see #db_rebalance_erase(DBNode *,DBNode **)
*/
-static void db_rotate_right(DBNode node, DBNode *root)
+static void db_rotate_right(DBNode *node, DBNode **root)
{
- DBNode y = node->left;
+ DBNode *y = node->left;
DB_COUNTSTAT(db_rotate_right);
// put the right of y at the left of node
@@ -420,13 +424,13 @@ static void db_rotate_right(DBNode node, DBNode *root)
* @param node Node to be rebalanced
* @param root Pointer to the root of the tree
* @private
- * @see #db_rotate_left(DBNode,DBNode *)
- * @see #db_rotate_right(DBNode,DBNode *)
+ * @see #db_rotate_left(DBNode *,DBNode **)
+ * @see #db_rotate_right(DBNode *,DBNode **)
* @see #db_obj_put(DBMap*,DBKey,DBData)
*/
-static void db_rebalance(DBNode node, DBNode *root)
+static void db_rebalance(DBNode *node, DBNode **root)
{
- DBNode y;
+ DBNode *y;
DB_COUNTSTAT(db_rebalance);
// Restore the RED-BLACK properties
@@ -482,16 +486,16 @@ static void db_rebalance(DBNode node, DBNode *root)
* @param node Node to be erased from the tree
* @param root Root of the tree
* @private
- * @see #db_rotate_left(DBNode,DBNode *)
- * @see #db_rotate_right(DBNode,DBNode *)
+ * @see #db_rotate_left(DBNode *,DBNode **)
+ * @see #db_rotate_right(DBNode *,DBNode **)
* @see #db_free_unlock(DBMap_impl*)
*/
-static void db_rebalance_erase(DBNode node, DBNode *root)
+static void db_rebalance_erase(DBNode *node, DBNode **root)
{
- DBNode y = node;
- DBNode x = NULL;
- DBNode x_parent = NULL;
- DBNode w;
+ DBNode *y = node;
+ DBNode *x = NULL;
+ DBNode *x_parent = NULL;
+ DBNode *w;
DB_COUNTSTAT(db_rebalance_erase);
// Select where to change the tree
@@ -507,7 +511,7 @@ static void db_rebalance_erase(DBNode node, DBNode *root)
}
// Remove the node from the tree
- if (y != node) { // both childs existed
+ if (y != node) { // both child existed
// put the left of 'node' in the left of 'y'
node->left->parent = y;
y->left = node->left;
@@ -518,7 +522,7 @@ static void db_rebalance_erase(DBNode node, DBNode *root)
x_parent = y->parent;
if (x) x->parent = y->parent;
y->parent->left = x;
- // put the right of 'node' in 'y'
+ // put the right of 'node' in 'y'
y->right = node->right;
node->right->parent = y;
// 'y' is a direct child of 'node'
@@ -646,8 +650,8 @@ static int db_is_key_null(DBType type, DBKey key)
* @param key Key to be duplicated
* @param Duplicated key
* @private
- * @see #db_free_add(DBMap_impl*,DBNode,DBNode *)
- * @see #db_free_remove(DBMap_impl*,DBNode)
+ * @see #db_free_add(DBMap_impl*,DBNode *,DBNode **)
+ * @see #db_free_remove(DBMap_impl*,DBNode *)
* @see #db_obj_put(DBMap*,DBKey,void *)
* @see #db_dup_key_free(DBMap_impl*,DBKey)
*/
@@ -706,9 +710,9 @@ static void db_dup_key_free(DBMap_impl* db, DBKey key)
* @see DBMap_impl#free_count
* @see DBMap_impl#free_max
* @see #db_obj_remove(DBMap*,DBKey)
- * @see #db_free_remove(DBMap_impl*,DBNode)
+ * @see #db_free_remove(DBMap_impl*,DBNode *)
*/
-static void db_free_add(DBMap_impl* db, DBNode node, DBNode *root)
+static void db_free_add(DBMap_impl* db, DBNode *node, DBNode **root)
{
DBKey old_key;
@@ -755,9 +759,9 @@ static void db_free_add(DBMap_impl* db, DBNode node, DBNode *root)
* @see DBMap_impl#free_list
* @see DBMap_impl#free_count
* @see #db_obj_put(DBMap*,DBKey,DBData)
- * @see #db_free_add(DBMap_impl*,DBNode*,DBNode)
+ * @see #db_free_add(DBMap_impl*,DBNode**,DBNode*)
*/
-static void db_free_remove(DBMap_impl* db, DBNode node)
+static void db_free_remove(DBMap_impl* db, DBNode *node)
{
unsigned int i;
@@ -806,7 +810,7 @@ static void db_free_lock(DBMap_impl* db)
* @param db Target database
* @private
* @see DBMap_impl#free_lock
- * @see #db_free_dbn(DBNode)
+ * @see #db_free_dbn(DBNode*)
* @see #db_lock(DBMap_impl*)
*/
static void db_free_unlock(DBMap_impl* db)
@@ -1151,7 +1155,10 @@ static void db_release_data(DBKey key, DBData data, DBRelease which)
{
(void)key;//not used
DB_COUNTSTAT(db_release_data);
- if (which&DB_RELEASE_DATA && data.type == DB_DATA_PTR) aFree(data.u.ptr);
+ if (which&DB_RELEASE_DATA && data.type == DB_DATA_PTR) {
+ aFree(data.u.ptr);
+ data.u.ptr = NULL;
+ }
}
/**
@@ -1170,7 +1177,10 @@ static void db_release_both(DBKey key, DBData data, DBRelease which)
{
DB_COUNTSTAT(db_release_both);
if (which&DB_RELEASE_KEY) aFree((char*)key.str); // needs to be a pointer
- if (which&DB_RELEASE_DATA && data.type == DB_DATA_PTR) aFree(data.u.ptr);
+ if (which&DB_RELEASE_DATA && data.type == DB_DATA_PTR) {
+ aFree(data.u.ptr);
+ data.u.ptr = NULL;
+ }
}
/*****************************************************************************\
@@ -1263,8 +1273,8 @@ DBData* dbit_obj_last(DBIterator* self, DBKey* out_key)
DBData* dbit_obj_next(DBIterator* self, DBKey* out_key)
{
DBIterator_impl* it = (DBIterator_impl*)self;
- DBNode node;
- DBNode parent;
+ DBNode *node;
+ DBNode *parent;
struct dbn fake;
DB_COUNTSTAT(dbit_next);
@@ -1339,8 +1349,8 @@ DBData* dbit_obj_next(DBIterator* self, DBKey* out_key)
DBData* dbit_obj_prev(DBIterator* self, DBKey* out_key)
{
DBIterator_impl* it = (DBIterator_impl*)self;
- DBNode node;
- DBNode parent;
+ DBNode *node;
+ DBNode *parent;
struct dbn fake;
DB_COUNTSTAT(dbit_prev);
@@ -1405,7 +1415,7 @@ DBData* dbit_obj_prev(DBIterator* self, DBKey* out_key)
/**
* Returns true if the fetched entry exists.
- * The databases entries might have NULL data, so use this to to test if
+ * The databases entries might have NULL data, so use this to to test if
* the iterator is done.
* @param self Iterator
* @return true if the entry exists
@@ -1422,9 +1432,9 @@ bool dbit_obj_exists(DBIterator* self)
/**
* Removes the current entry from the database.
- * NOTE: {@link DBIterator#exists} will return false until another entry
+ * NOTE: {@link DBIterator#exists} will return false until another entry
* is fetched
- * Puts data of the removed entry in out_data, if out_data is not NULL.
+ * Puts data of the removed entry in out_data, if out_data is not NULL (unless data has been released)
* @param self Iterator
* @param out_data Data of the removed entry.
* @return 1 if entry was removed, 0 otherwise
@@ -1435,7 +1445,7 @@ bool dbit_obj_exists(DBIterator* self)
int dbit_obj_remove(DBIterator* self, DBData *out_data)
{
DBIterator_impl* it = (DBIterator_impl*)self;
- DBNode node;
+ DBNode *node;
int retval = 0;
DB_COUNTSTAT(dbit_remove);
@@ -1445,10 +1455,10 @@ int dbit_obj_remove(DBIterator* self, DBData *out_data)
DBMap_impl* db = it->db;
if( db->cache == node )
db->cache = NULL;
+ db->release(node->key, node->data, DB_RELEASE_DATA);
if( out_data )
memcpy(out_data, &node->data, sizeof(DBData));
retval = 1;
- db->release(node->key, node->data, DB_RELEASE_DATA);
db_free_add(db, node, &db->ht[it->ht_index]);
}
return retval;
@@ -1473,7 +1483,7 @@ void dbit_obj_destroy(DBIterator* self)
/**
* Returns a new iterator for this database.
* The iterator keeps the database locked until it is destroyed.
- * The database will keep functioning normally but will only free internal
+ * The database will keep functioning normally but will only free internal
* memory when unlocked, so destroy the iterator as soon as possible.
* @param self Database
* @return New iterator
@@ -1514,7 +1524,7 @@ static DBIterator* db_obj_iterator(DBMap* self)
static bool db_obj_exists(DBMap* self, DBKey key)
{
DBMap_impl* db = (DBMap_impl*)self;
- DBNode node;
+ DBNode *node;
int c;
bool found = false;
@@ -1565,7 +1575,7 @@ static bool db_obj_exists(DBMap* self, DBKey key)
static DBData* db_obj_get(DBMap* self, DBKey key)
{
DBMap_impl* db = (DBMap_impl*)self;
- DBNode node;
+ DBNode *node;
int c;
DBData *data = NULL;
@@ -1611,7 +1621,7 @@ static DBData* db_obj_get(DBMap* self, DBKey key)
* It puts a maximum of <code>max</code> entries into <code>buf</code>.
* If <code>buf</code> is NULL, it only counts the matches.
* Returns the number of entries that matched.
- * NOTE: if the value returned is greater than <code>max</code>, only the
+ * NOTE: if the value returned is greater than <code>max</code>, only the
* first <code>max</code> entries found are put into the buffer.
* @param self Interface of the database
* @param buf Buffer to put the data of the matched entries
@@ -1626,8 +1636,8 @@ static unsigned int db_obj_vgetall(DBMap* self, DBData **buf, unsigned int max,
{
DBMap_impl* db = (DBMap_impl*)self;
unsigned int i;
- DBNode node;
- DBNode parent;
+ DBNode *node;
+ DBNode *parent;
unsigned int ret = 0;
DB_COUNTSTAT(db_vgetall);
@@ -1682,7 +1692,7 @@ static unsigned int db_obj_vgetall(DBMap* self, DBData **buf, unsigned int max,
* It puts a maximum of <code>max</code> entries into <code>buf</code>.
* If <code>buf</code> is NULL, it only counts the matches.
* Returns the number of entries that matched.
- * NOTE: if the value returned is greater than <code>max</code>, only the
+ * NOTE: if the value returned is greater than <code>max</code>, only the
* first <code>max</code> entries found are put into the buffer.
* @param self Interface of the database
* @param buf Buffer to put the data of the matched entries
@@ -1710,7 +1720,7 @@ static unsigned int db_obj_getall(DBMap* self, DBData **buf, unsigned int max, D
/**
* Get the data of the entry identified by the key.
- * If the entry does not exist, an entry is added with the data returned by
+ * If the entry does not exist, an entry is added with the data returned by
* <code>create</code>.
* @param self Interface of the database
* @param key Key that identifies the entry
@@ -1723,8 +1733,8 @@ static unsigned int db_obj_getall(DBMap* self, DBData **buf, unsigned int max, D
static DBData* db_obj_vensure(DBMap* self, DBKey key, DBCreateData create, va_list args)
{
DBMap_impl* db = (DBMap_impl*)self;
- DBNode node;
- DBNode parent = NULL;
+ DBNode *node;
+ DBNode *parent = NULL;
unsigned int hash;
int c = 0;
DBData *data = NULL;
@@ -1809,7 +1819,7 @@ static DBData* db_obj_vensure(DBMap* self, DBKey key, DBCreateData create, va_li
/**
* Just calls {@link DBMap#vensure}.
* Get the data of the entry identified by the key.
- * If the entry does not exist, an entry is added with the data returned by
+ * If the entry does not exist, an entry is added with the data returned by
* <code>create</code>.
* @param self Interface of the database
* @param key Key that identifies the entry
@@ -1836,7 +1846,7 @@ static DBData* db_obj_ensure(DBMap* self, DBKey key, DBCreateData create, ...)
/**
* Put the data identified by the key in the database.
- * Puts the previous data in out_data, if out_data is not NULL.
+ * Puts the previous data in out_data, if out_data is not NULL. (unless data has been released)
* NOTE: Uses the new key, the old one is released.
* @param self Interface of the database
* @param key Key that identifies the data
@@ -1852,8 +1862,8 @@ static DBData* db_obj_ensure(DBMap* self, DBKey key, DBCreateData create, ...)
static int db_obj_put(DBMap* self, DBKey key, DBData data, DBData *out_data)
{
DBMap_impl* db = (DBMap_impl*)self;
- DBNode node;
- DBNode parent = NULL;
+ DBNode *node;
+ DBNode *parent = NULL;
int c = 0, retval = 0;
unsigned int hash;
@@ -1889,9 +1899,9 @@ static int db_obj_put(DBMap* self, DBKey key, DBData data, DBData *out_data)
if (node->deleted) {
db_free_remove(db, node);
} else {
+ db->release(node->key, node->data, DB_RELEASE_BOTH);
if (out_data)
memcpy(out_data, &node->data, sizeof(*out_data));
- db->release(node->key, node->data, DB_RELEASE_BOTH);
retval = 1;
}
break;
@@ -1944,20 +1954,20 @@ static int db_obj_put(DBMap* self, DBKey key, DBData data, DBData *out_data)
/**
* Remove an entry from the database.
- * Puts the previous data in out_data, if out_data is not NULL.
- * NOTE: The key (of the database) is released in {@link #db_free_add(DBMap_impl*,DBNode,DBNode *)}.
+ * Puts the previous data in out_data, if out_data is not NULL. (unless data has been released)
+ * NOTE: The key (of the database) is released in {@link #db_free_add(DBMap_impl*,DBNode*,DBNode **)}.
* @param self Interface of the database
* @param key Key that identifies the entry
* @param out_data Previous data if the entry exists
* @return 1 if if the entry already exists, 0 otherwise
* @protected
- * @see #db_free_add(DBMap_impl*,DBNode,DBNode *)
+ * @see #db_free_add(DBMap_impl*,DBNode*,DBNode **)
* @see DBMap#remove
*/
static int db_obj_remove(DBMap* self, DBKey key, DBData *out_data)
{
DBMap_impl* db = (DBMap_impl*)self;
- DBNode node;
+ DBNode *node;
unsigned int hash;
int c = 0, retval = 0;
@@ -1982,10 +1992,10 @@ static int db_obj_remove(DBMap* self, DBKey key, DBData *out_data)
if (!(node->deleted)) {
if (db->cache == node)
db->cache = NULL;
+ db->release(node->key, node->data, DB_RELEASE_DATA);
if (out_data)
memcpy(out_data, &node->data, sizeof(*out_data));
retval = 1;
- db->release(node->key, node->data, DB_RELEASE_DATA);
db_free_add(db, node, &db->ht[hash]);
}
break;
@@ -2014,8 +2024,8 @@ static int db_obj_vforeach(DBMap* self, DBApply func, va_list args)
DBMap_impl* db = (DBMap_impl*)self;
unsigned int i;
int sum = 0;
- DBNode node;
- DBNode parent;
+ DBNode *node;
+ DBNode *parent;
DB_COUNTSTAT(db_vforeach);
if (db == NULL) return 0; // nullpo candidate
@@ -2062,7 +2072,7 @@ static int db_obj_vforeach(DBMap* self, DBApply func, va_list args)
* Apply <code>func</code> to every entry in the database.
* Returns the sum of values returned by func.
* @param self Interface of the database
- * @param func Function to be applyed
+ * @param func Function to be applied
* @param ... Extra arguments for func
* @return Sum of the values returned by func
* @protected
@@ -2100,8 +2110,8 @@ static int db_obj_vclear(DBMap* self, DBApply func, va_list args)
DBMap_impl* db = (DBMap_impl*)self;
int sum = 0;
unsigned int i;
- DBNode node;
- DBNode parent;
+ DBNode *node;
+ DBNode *parent;
DB_COUNTSTAT(db_vclear);
if (db == NULL) return 0; // nullpo candidate
@@ -2159,7 +2169,7 @@ static int db_obj_vclear(DBMap* self, DBApply func, va_list args)
* Before deleting an entry, func is applied to it.
* Releases the key and the data.
* Returns the sum of values returned by func, if it exists.
- * NOTE: This locks the database globally. Any attempt to insert or remove
+ * NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted (except for clearing).
* @param self Interface of the database
* @param func Function to be applied to every entry before deleting
@@ -2187,7 +2197,7 @@ static int db_obj_clear(DBMap* self, DBApply func, ...)
* Finalize the database, feeing all the memory it uses.
* Before deleting an entry, func is applied to it.
* Returns the sum of values returned by func, if it exists.
- * NOTE: This locks the database globally. Any attempt to insert or remove
+ * NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted (except for clearing).
* @param self Interface of the database
* @param func Function to be applied to every entry before deleting
@@ -2242,7 +2252,7 @@ static int db_obj_vdestroy(DBMap* self, DBApply func, va_list args)
* Before deleting an entry, func is applied to it.
* Releases the key and the data.
* Returns the sum of values returned by func, if it exists.
- * NOTE: This locks the database globally. Any attempt to insert or remove
+ * NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted.
* @param self Database
* @param func Function to be applied to every entry before deleting
@@ -2341,7 +2351,7 @@ static DBOptions db_obj_options(DBMap* self)
* db_default_cmp - Get the default comparator for a type of database.
* db_default_hash - Get the default hasher for a type of database.
* db_default_release - Get the default releaser for a type of database with the specified options.
- * db_custom_release - Get a releaser that behaves a certains way.
+ * db_custom_release - Get a releaser that behaves a certain way.
* db_alloc - Allocate a new database.
* db_i2key - Manual cast from 'int' to 'DBKey'.
* db_ui2key - Manual cast from 'unsigned int' to 'DBKey'.
@@ -2444,7 +2454,7 @@ DBHasher db_default_hash(DBType type)
}
/**
- * Returns the default releaser for the specified type of database with the
+ * Returns the default releaser for the specified type of database with the
* specified options.
* NOTE: the options are fixed with {@link #db_fix_options(DBType,DBOptions)}
* before choosing the releaser.
@@ -2505,7 +2515,7 @@ DBReleaser db_custom_release(DBRelease which)
* @param line Line of the file where the database is being allocated
* @param type Type of database
* @param options Options of the database
- * @param maxlen Maximum length of the string to be used as key in string
+ * @param maxlen Maximum length of the string to be used as key in string
* databases. If 0, the maximum number of maxlen is used (64K).
* @return The interface of the database
* @public
@@ -2776,15 +2786,15 @@ void db_final(void)
"DB_INT : allocated %10u, destroyed %10u\n"
"DB_UINT : allocated %10u, destroyed %10u\n"
"DB_STRING : allocated %10u, destroyed %10u\n"
- "DB_ISTRING : allocated %10u, destroyed %10u\n",
+ "DB_ISTRING : allocated %10u, destroyed %10u\n"
"DB_INT64 : allocated %10u, destroyed %10u\n"
- "DB_UINT64 : allocated %10u, destroyed %10u\n"
+ "DB_UINT64 : allocated %10u, destroyed %10u\n",
stats.db_int_alloc, stats.db_int_destroy,
stats.db_uint_alloc, stats.db_uint_destroy,
stats.db_string_alloc, stats.db_string_destroy,
stats.db_istring_alloc, stats.db_istring_destroy,
stats.db_int64_alloc, stats.db_int64_destroy,
- stats.db_uint64_alloc, stats.db_uint64_destroy,);
+ stats.db_uint64_alloc, stats.db_uint64_destroy);
ShowInfo(CL_WHITE"Database function counters"CL_RESET":\n"
"db_rotate_left %10u, db_rotate_right %10u,\n"
"db_rebalance %10u, db_rebalance_erase %10u,\n"
diff --git a/src/common/db.h b/src/common/db.h
index 67abe6f19..bf59e37d6 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -39,12 +39,13 @@
* @encoding US-ASCII *
* @see common#db.c *
\*****************************************************************************/
-#ifndef _COMMON_DB_H_
-#define _COMMON_DB_H_
+#ifndef COMMON_DB_H
+#define COMMON_DB_H
-#include "../common/cbasetypes.h"
#include <stdarg.h>
+#include "../common/cbasetypes.h"
+
/*****************************************************************************\
* (1) Section with public typedefs, enums, unions, structures and defines. *
* DBRelease - Enumeration of release options. *
@@ -78,7 +79,7 @@ typedef enum DBRelease {
/**
* Supported types of database.
- * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the
+ * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the
* types of databases.
* @param DB_INT Uses int's for keys
* @param DB_UINT Uses unsigned int's for keys
@@ -105,17 +106,17 @@ typedef enum DBType {
} DBType;
/**
- * Bitfield of options that define the behaviour of the database.
- * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the
+ * Bitfield of options that define the behavior of the database.
+ * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the
* types of databases.
* @param DB_OPT_BASE Base options: does not duplicate keys, releases nothing
* and does not allow NULL keys or NULL data.
- * @param DB_OPT_DUP_KEY Duplicates the keys internally. If DB_OPT_RELEASE_KEY
+ * @param DB_OPT_DUP_KEY Duplicates the keys internally. If DB_OPT_RELEASE_KEY
* is defined, the real key is freed as soon as the entry is added.
* @param DB_OPT_RELEASE_KEY Releases the key.
- * @param DB_OPT_RELEASE_DATA Releases the data whenever an entry is removed
+ * @param DB_OPT_RELEASE_DATA Releases the data whenever an entry is removed
* from the database.
- * WARNING: for funtions that return the data (like DBMap::remove),
+ * WARNING: for functions that return the data (like DBMap::remove),
* a dangling pointer will be returned.
* @param DB_OPT_RELEASE_BOTH Releases both key and data.
* @param DB_OPT_ALLOW_NULL_KEY Allow NULL keys in the database.
@@ -187,7 +188,7 @@ typedef struct DBData {
} DBData;
/**
- * Format of functions that create the data for the key when the entry doesn't
+ * Format of functions that create the data for the key when the entry doesn't
* exist in the database yet.
* @param key Key of the database entry
* @param args Extra arguments of the function
@@ -199,9 +200,9 @@ typedef struct DBData {
typedef DBData (*DBCreateData)(DBKey key, va_list args);
/**
- * Format of functions to be applied to an unspecified quantity of entries of
+ * Format of functions to be applied to an unspecified quantity of entries of
* a database.
- * Any function that applies this function to the database will return the sum
+ * Any function that applies this function to the database will return the sum
* of values returned by this function.
* @param key Key of the database entry
* @param data Data of the database entry
@@ -279,7 +280,7 @@ typedef struct DBMap DBMap;
* Database iterator.
* Supports forward iteration, backward iteration and removing entries from the database.
* The iterator is initially positioned before the first entry of the database.
- * While the iterator exists the database is locked internally, so invoke
+ * While the iterator exists the database is locked internally, so invoke
* {@link DBIterator#destroy} as soon as possible.
* @public
* @see #DBMap
@@ -333,7 +334,7 @@ struct DBIterator
/**
* Returns true if the fetched entry exists.
- * The databases entries might have NULL data, so use this to to test if
+ * The databases entries might have NULL data, so use this to to test if
* the iterator is done.
* @param self Iterator
* @return true is the entry exists
@@ -343,7 +344,7 @@ struct DBIterator
/**
* Removes the current entry from the database.
- * NOTE: {@link DBIterator#exists} will return false until another entry
+ * NOTE: {@link DBIterator#exists} will return false until another entry
* is fetched
* Puts data of the removed entry in out_data, if out_data is not NULL.
* @param self Iterator
@@ -364,7 +365,7 @@ struct DBIterator
};
/**
- * Public interface of a database. Only contains funtions.
+ * Public interface of a database. Only contains functions.
* All the functions take the interface as the first argument.
* @public
* @see #db_alloc(const char*,int,DBType,DBOptions,unsigned short)
@@ -374,7 +375,7 @@ struct DBMap {
/**
* Returns a new iterator for this database.
* The iterator keeps the database locked until it is destroyed.
- * The database will keep functioning normally but will only free internal
+ * The database will keep functioning normally but will only free internal
* memory when unlocked, so destroy the iterator as soon as possible.
* @param self Database
* @return New iterator
@@ -406,7 +407,7 @@ struct DBMap {
* It puts a maximum of <code>max</code> entries into <code>buf</code>.
* If <code>buf</code> is NULL, it only counts the matches.
* Returns the number of entries that matched.
- * NOTE: if the value returned is greater than <code>max</code>, only the
+ * NOTE: if the value returned is greater than <code>max</code>, only the
* first <code>max</code> entries found are put into the buffer.
* @param self Database
* @param buf Buffer to put the data of the matched entries
@@ -424,7 +425,7 @@ struct DBMap {
* It puts a maximum of <code>max</code> entries into <code>buf</code>.
* If <code>buf</code> is NULL, it only counts the matches.
* Returns the number of entries that matched.
- * NOTE: if the value returned is greater than <code>max</code>, only the
+ * NOTE: if the value returned is greater than <code>max</code>, only the
* first <code>max</code> entries found are put into the buffer.
* @param self Database
* @param buf Buffer to put the data of the matched entries
@@ -440,7 +441,7 @@ struct DBMap {
/**
* Just calls {@link DBMap#vensure}.
* Get the data of the entry identified by the key.
- * If the entry does not exist, an entry is added with the data returned by
+ * If the entry does not exist, an entry is added with the data returned by
* <code>create</code>.
* @param self Database
* @param key Key that identifies the entry
@@ -454,7 +455,7 @@ struct DBMap {
/**
* Get the data of the entry identified by the key.
- * If the entry does not exist, an entry is added with the data returned by
+ * If the entry does not exist, an entry is added with the data returned by
* <code>create</code>.
* @param self Database
* @param key Key that identifies the entry
@@ -551,7 +552,7 @@ struct DBMap {
* Before deleting an entry, func is applied to it.
* Releases the key and the data.
* Returns the sum of values returned by func, if it exists.
- * NOTE: This locks the database globally. Any attempt to insert or remove
+ * NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted (except for clearing).
* @param self Database
* @param func Function to be applied to every entry before deleting
@@ -566,7 +567,7 @@ struct DBMap {
* Finalize the database, feeing all the memory it uses.
* Before deleting an entry, func is applied to it.
* Returns the sum of values returned by func, if it exists.
- * NOTE: This locks the database globally. Any attempt to insert or remove
+ * NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted (except for clearing).
* @param self Database
* @param func Function to be applied to every entry before deleting
@@ -758,7 +759,7 @@ DBComparator (*default_cmp) (DBType type);
DBHasher (*default_hash) (DBType type);
/**
- * Returns the default releaser for the specified type of database with the
+ * Returns the default releaser for the specified type of database with the
* specified options.
* NOTE: the options are fixed by {@link #db_fix_options(DBType,DBOptions)}
* before choosing the releaser
@@ -787,7 +788,7 @@ DBReleaser (*custom_release) (DBRelease which);
/**
* Allocate a new database of the specified type.
- * It uses the default comparator, hasher and releaser of the specified
+ * It uses the default comparator, hasher and releaser of the specified
* database type and fixed options.
* NOTE: the options are fixed by {@link #db_fix_options(DBType,DBOptions)}
* before creating the database.
@@ -795,7 +796,7 @@ DBReleaser (*custom_release) (DBRelease which);
* @param line Line of the file where the database is being allocated
* @param type Type of database
* @param options Options of the database
- * @param maxlen Maximum length of the string to be used as key in string
+ * @param maxlen Maximum length of the string to be used as key in string
* databases. If 0, the maximum number of maxlen is used (64K).
* @return The interface of the database
* @public
@@ -1137,8 +1138,8 @@ void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...);
do{ \
if( (__n) > VECTOR_CAPACITY(__vec) ) \
{ /* increase size */ \
- if( VECTOR_CAPACITY(__vec) == 0 ) SET_POINTER(VECTOR_DATA(__vec), aMalloc((__n)*sizeof(VECTOR_FIRST(__vec)))); /* allocate new */ \
- else SET_POINTER(VECTOR_DATA(__vec), aRealloc(VECTOR_DATA(__vec),(__n)*sizeof(VECTOR_FIRST(__vec)))); /* reallocate */ \
+ if( VECTOR_CAPACITY(__vec) == 0 ) VECTOR_DATA(__vec) = aMalloc((__n)*sizeof(VECTOR_FIRST(__vec))); /* allocate new */ \
+ else VECTOR_DATA(__vec) = aRealloc(VECTOR_DATA(__vec),(__n)*sizeof(VECTOR_FIRST(__vec))); /* reallocate */ \
memset(VECTOR_DATA(__vec)+VECTOR_LENGTH(__vec), 0, (VECTOR_CAPACITY(__vec)-VECTOR_LENGTH(__vec))*sizeof(VECTOR_FIRST(__vec))); /* clear new data */ \
VECTOR_CAPACITY(__vec) = (__n); /* update capacity */ \
} \
@@ -1150,7 +1151,7 @@ void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...);
} \
else if( (__n) < VECTOR_CAPACITY(__vec) ) \
{ /* reduce size */ \
- SET_POINTER(VECTOR_DATA(__vec), aRealloc(VECTOR_DATA(__vec),(__n)*sizeof(VECTOR_FIRST(__vec)))); /* reallocate */ \
+ VECTOR_DATA(__vec) = aRealloc(VECTOR_DATA(__vec),(__n)*sizeof(VECTOR_FIRST(__vec))); /* reallocate */ \
VECTOR_CAPACITY(__vec) = (__n); /* update capacity */ \
if( VECTOR_LENGTH(__vec) > (__n) ) VECTOR_LENGTH(__vec) = (__n); /* update length */ \
} \
@@ -1548,4 +1549,4 @@ void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...);
-#endif /* _COMMON_DB_H_ */
+#endif /* COMMON_DB_H */
diff --git a/src/common/des.c b/src/common/des.c
index ed6d098dc..7f952be76 100644
--- a/src/common/des.c
+++ b/src/common/des.c
@@ -1,8 +1,11 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#include "../common/cbasetypes.h"
-#include "../common/des.h"
+#define HERCULES_CORE
+
+#include "des.h"
+
+#include "../common/cbasetypes.h"
/// DES (Data Encryption Standard) algorithm, modified version.
/// @see http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=5099.
diff --git a/src/common/des.h b/src/common/des.h
index 3f55448ba..2c7190f23 100644
--- a/src/common/des.h
+++ b/src/common/des.h
@@ -1,8 +1,9 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_DES_H_
-#define _COMMON_DES_H_
+#ifndef COMMON_DES_H
+#define COMMON_DES_H
+#include "../common/cbasetypes.h"
/// One 64-bit block.
typedef struct BIT64 { uint8_t b[8]; } BIT64;
@@ -12,4 +13,4 @@ void des_decrypt_block(BIT64* block);
void des_decrypt(unsigned char* data, size_t size);
-#endif // _COMMON_DES_H_
+#endif // COMMON_DES_H
diff --git a/src/common/ers.c b/src/common/ers.c
index 5a3d7314a..c8a11d2a9 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -13,16 +13,16 @@
* If it has reusable entries (freed entry), it uses one. *
* So no assumption should be made about the data of the entry. *
* Entries should be freed in the manager they where allocated from. *
- * Failure to do so can lead to unexpected behaviours. *
+ * Failure to do so can lead to unexpected behaviors. *
* *
* <H2>Advantages:</H2> *
* - The same manager is used for entries of the same size. *
* So entries freed in one instance of the manager can be used by other *
* instances of the manager. *
* - Much less memory allocation/deallocation - program will be faster. *
- * - Avoids memory fragmentaion - program will run better for longer. *
+ * - Avoids memory fragmentation - program will run better for longer. *
* *
- * <H2>Disavantages:</H2> *
+ * <H2>Disadvantages:</H2> *
* - Unused entries are almost inevitable - memory being wasted. *
* - A manager will only auto-destroy when all of its instances are *
* destroyed so memory will usually only be recovered near the end. *
@@ -39,14 +39,18 @@
* @encoding US-ASCII *
* @see common#ers.h *
\*****************************************************************************/
+
+#define HERCULES_CORE
+
+#include "ers.h"
+
#include <stdlib.h>
#include <string.h>
#include "../common/cbasetypes.h"
#include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree
-#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL
#include "../common/nullpo.h"
-#include "ers.h"
+#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL
#ifndef DISABLE_ERS
@@ -74,7 +78,7 @@ typedef struct ers_cache
// Memory blocks array
unsigned char **Blocks;
- // Max number of blocks
+ // Max number of blocks
unsigned int Max;
// Free objects count
@@ -100,7 +104,7 @@ struct ers_instance_t {
// Interface to ERS
struct eri VTable;
- // Name, used for debbuging purpouses
+ // Name, used for debugging purposes
char *Name;
// Misc options
@@ -181,31 +185,24 @@ static void ers_free_cache(ers_cache_t *cache, bool remove)
aFree(cache);
}
-static void *ers_obj_alloc_entry(ERS self)
+static void *ers_obj_alloc_entry(ERS *self)
{
struct ers_instance_t *instance = (struct ers_instance_t *)self;
void *ret;
- if (instance == NULL)
- {
+ if (instance == NULL) {
ShowError("ers_obj_alloc_entry: NULL object, aborting entry freeing.\n");
return NULL;
}
- if (instance->Cache->ReuseList != NULL)
- {
+ if (instance->Cache->ReuseList != NULL) {
ret = (void *)((unsigned char *)instance->Cache->ReuseList + sizeof(struct ers_list));
instance->Cache->ReuseList = instance->Cache->ReuseList->Next;
- }
- else if (instance->Cache->Free > 0)
- {
+ } else if (instance->Cache->Free > 0) {
instance->Cache->Free--;
ret = &instance->Cache->Blocks[instance->Cache->Used - 1][instance->Cache->Free * instance->Cache->ObjectSize + sizeof(struct ers_list)];
- }
- else
- {
- if (instance->Cache->Used == instance->Cache->Max)
- {
+ } else {
+ if (instance->Cache->Used == instance->Cache->Max) {
instance->Cache->Max = (instance->Cache->Max * 4) + 3;
RECREATE(instance->Cache->Blocks, unsigned char *, instance->Cache->Max);
}
@@ -228,18 +225,15 @@ static void *ers_obj_alloc_entry(ERS self)
return ret;
}
-static void ers_obj_free_entry(ERS self, void *entry)
+static void ers_obj_free_entry(ERS *self, void *entry)
{
struct ers_instance_t *instance = (struct ers_instance_t *)self;
struct ers_list *reuse = (struct ers_list *)((unsigned char *)entry - sizeof(struct ers_list));
- if (instance == NULL)
- {
+ if (instance == NULL) {
ShowError("ers_obj_free_entry: NULL object, aborting entry freeing.\n");
return;
- }
- else if (entry == NULL)
- {
+ } else if (entry == NULL) {
ShowError("ers_obj_free_entry: NULL entry, nothing to free.\n");
return;
}
@@ -253,25 +247,23 @@ static void ers_obj_free_entry(ERS self, void *entry)
instance->Cache->UsedObjs--;
}
-static size_t ers_obj_entry_size(ERS self)
+static size_t ers_obj_entry_size(ERS *self)
{
struct ers_instance_t *instance = (struct ers_instance_t *)self;
- if (instance == NULL)
- {
+ if (instance == NULL) {
ShowError("ers_obj_entry_size: NULL object, aborting entry freeing.\n");
return 0;
- }
+ }
return instance->Cache->ObjectSize;
}
-static void ers_obj_destroy(ERS self)
+static void ers_obj_destroy(ERS *self)
{
struct ers_instance_t *instance = (struct ers_instance_t *)self;
- if (instance == NULL)
- {
+ if (instance == NULL) {
ShowError("ers_obj_destroy: NULL object, aborting entry freeing.\n");
return;
}
@@ -297,7 +289,7 @@ static void ers_obj_destroy(ERS self)
aFree(instance);
}
-void ers_cache_size(ERS self, unsigned int new_size) {
+void ers_cache_size(ERS *self, unsigned int new_size) {
struct ers_instance_t *instance = (struct ers_instance_t *)self;
nullpo_retv(instance);
@@ -310,7 +302,7 @@ void ers_cache_size(ERS self, unsigned int new_size) {
}
-ERS ers_new(uint32 size, char *name, enum ERSOptions options)
+ERS *ers_new(uint32 size, char *name, enum ERSOptions options)
{
struct ers_instance_t *instance;
CREATE(instance,struct ers_instance_t, 1);
@@ -395,7 +387,7 @@ void ers_final(void) {
while( instance ) {
next = instance->Next;
- ers_obj_destroy((ERS)instance);
+ ers_obj_destroy((ERS*)instance);
instance = next;
}
}
diff --git a/src/common/ers.h b/src/common/ers.h
index 23a996923..904f7fb81 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -13,16 +13,16 @@
* If it has reusable entries (freed entry), it uses one. *
* So no assumption should be made about the data of the entry. *
* Entries should be freed in the manager they where allocated from. *
- * Failure to do so can lead to unexpected behaviours. *
+ * Failure to do so can lead to unexpected behaviors. *
* *
* <H2>Advantages:</H2> *
* - The same manager is used for entries of the same size. *
* So entries freed in one instance of the manager can be used by other *
* instances of the manager. *
* - Much less memory allocation/deallocation - program will be faster. *
- * - Avoids memory fragmentaion - program will run better for longer. *
+ * - Avoids memory fragmentation - program will run better for longer. *
* *
- * <H2>Disavantages:</H2> *
+ * <H2>Disadvantages:</H2> *
* - Unused entries are almost inevitable - memory being wasted. *
* - A manager will only auto-destroy when all of its instances are *
* destroyed so memory will usually only be recovered near the end. *
@@ -37,8 +37,8 @@
* @author Flavio @ Amazon Project *
* @encoding US-ASCII *
\*****************************************************************************/
-#ifndef _COMMON_ERS_H_
-#define _COMMON_ERS_H_
+#ifndef COMMON_ERS_H
+#define COMMON_ERS_H
#include "../common/cbasetypes.h"
@@ -49,13 +49,13 @@
* ERS - Entry manager. *
* ers_new - Allocate an instance of an entry manager. *
* ers_report - Print a report about the current state. *
- * ers_final - Clears the remainder of the manangers. *
+ * ers_final - Clears the remainder of the managers. *
\*****************************************************************************/
/**
* Define this to disable the Entry Reusage System.
* All code except the typedef of ERInterface will be disabled.
- * To allow a smooth transition,
+ * To allow a smooth transition,
*/
//#define DISABLE_ERS
@@ -63,8 +63,8 @@
* Entries are aligned to ERS_ALIGNED bytes in the blocks of entries.
* By default it aligns to one byte, using the "natural order" of the entries.
* This should NEVER be set to zero or less.
- * If greater than one, some memory can be wasted. This should never be needed
- * but is here just in case some aligment issues arise.
+ * If greater than one, some memory can be wasted. This should never be needed
+ * but is here just in case some alignment issues arise.
*/
#ifndef ERS_ALIGNED
# define ERS_ALIGNED 1
@@ -102,7 +102,7 @@ typedef struct eri {
/**
* Free an entry allocated from this manager.
* WARNING: Does not check if the entry was allocated by this manager.
- * Freeing such an entry can lead to unexpected behaviour.
+ * Freeing such an entry can lead to unexpected behavior.
* @param self Interface of the entry manager
* @param entry Entry to be freed
*/
@@ -118,7 +118,7 @@ typedef struct eri {
/**
* Destroy this instance of the manager.
* The manager is actually only destroyed when all the instances are destroyed.
- * When destroying the manager a warning is shown if the manager has
+ * When destroying the manager a warning is shown if the manager has
* missing/extra entries.
* @param self Interface of the entry manager
*/
@@ -126,7 +126,7 @@ typedef struct eri {
/* */
void (*chunk_size) (struct eri *self, unsigned int new_size);
-} *ERS;
+} ERS;
#ifdef DISABLE_ERS
// Use memory manager to allocate/free and disable other interface functions
@@ -140,7 +140,7 @@ typedef struct eri {
# define ers_report()
# define ers_final()
#else /* not DISABLE_ERS */
-// These defines should be used to allow the code to keep working whenever
+// These defines should be used to allow the code to keep working whenever
// the system is disabled
# define ers_alloc(obj,type) ((type *)(obj)->alloc(obj))
# define ers_free(obj,entry) ((obj)->free((obj),(entry)))
@@ -151,14 +151,14 @@ typedef struct eri {
/**
* Get a new instance of the manager that handles the specified entry size.
* Size has to greater than 0.
- * If the specified size is smaller than a pointer, the size of a pointer is
+ * If the specified size is smaller than a pointer, the size of a pointer is
* used instead.
- * It's also aligned to ERS_ALIGNED bytes, so the smallest multiple of
+ * It's also aligned to ERS_ALIGNED bytes, so the smallest multiple of
* ERS_ALIGNED that is greater or equal to size is what's actually used.
* @param The requested size of the entry in bytes
* @return Interface of the object
*/
-ERS ers_new(uint32 size, char *name, enum ERSOptions options);
+ERS *ers_new(uint32 size, char *name, enum ERSOptions options);
/**
* Print a report about the current state of the Entry Reusage System.
@@ -170,9 +170,9 @@ ERS ers_new(uint32 size, char *name, enum ERSOptions options);
void ers_report(void);
/**
- * Clears the remainder of the manangers
+ * Clears the remainder of the managers
**/
void ers_final(void);
#endif /* DISABLE_ERS / not DISABLE_ERS */
-#endif /* _COMMON_ERS_H_ */
+#endif /* COMMON_ERS_H */
diff --git a/src/common/evdp.h b/src/common/evdp.h
deleted file mode 100644
index bc3454686..000000000
--- a/src/common/evdp.h
+++ /dev/null
@@ -1,168 +0,0 @@
-#ifndef _rA_EVDP_H_
-#define _rA_EVDP_H_
-
-#include "../common/cbasetypes.h"
-
-typedef struct EVDP_DATA EVDP_DATA;
-
-
-//#idef EVDP_EPOLL
-#include <sys/epoll.h>
-struct EVDP_DATA{
- struct epoll_event ev_data;
- bool ev_added;
-};
-//#endif
-
-
-enum EVDP_EVENTFLAGS{
- EVDP_EVENT_IN = 1, // Incomming data
- EVDP_EVENT_OUT = 2, // Connection accepts writing.
- EVDP_EVENT_HUP = 4 // Connection Closed.
-};
-
-typedef struct EVDP_EVENT{
- int32 events; // due to performance reasons, this should be the first member.
- int32 fd; // Connection Identifier
-} EVDP_EVENT;
-
-
-
-/**
- * Network Event Dispatcher Initialization / Finalization routines
- */
-void evdp_init();
-void evdp_final();
-
-
-/**
- * Will Wait for events.
- *
- * @param *out_ev pointer to array in size at least of max_events.
- * @param max_events max no of events to report with this call (coalesc)
- * @param timeout_ticks max time to wait in ticks (milliseconds)
- *
- * @Note:
- * The function will block until an event has occured on one of the monitored connections
- * or the timeout of timeout_ticks has passed by.
- * Upon successfull call (changed connections) this function will write the connection
- * Identifier & event to the out_fds array.
- *
- * @return 0 -> Timeout, > 0 no of changed connections.
- */
-int32 evdp_wait(EVDP_EVENT *out_fds, int32 max_events, int32 timeout_ticks);
-
-
-/**
- * Applys the given mask on the given connection.
- *
- * @param fd connection identifier
- * @param *ep event data pointer for the connection
- * @param mask new event mask we're monitoring for.
- */
-//void evdp_apply(int32 fd, EVDP_DATA *ep, int32 mask);
-
-
-/**
- * Adds a connection (listner) to the event notification system.
- *
- * @param fd connection identifier
- * @param *ep event data pointer for the connection
- *
- * @note:
- * Listener type sockets are edge triggered, (see epoll manual for more information)
- * - This basicaly means that youll receive one event, adn you have to accept until accept returns an error (nothing to accept)
- *
- * MONITORS by default: IN
- *
- * @return success indicator.
- */
-bool evdp_addlistener(int32 fd, EVDP_DATA *ep);
-
-/**
- * Adds a connection (client connectioN) to the event notification system
- *
- * @param fd connection identifier
- * @param *ep event data pointr for the connection
- *
- * @note:
- *
- * MONITORS by default: IN, HUP
- *
- * @return success indicator.
- */
-bool evdp_addclient(int32 fd, EVDP_DATA *ep);
-
-/**
- * Adds a connection (pending / outgoing connection!) to the event notification system.
- *
- * @param fd connection identifier
- * @param *ep event data pointer for the conneciton.
- *
- * @note:
- * Outgoing connection type sockets are getting monitored for connection established
- * successfull
- * - if the connection has been established - we're generitng a writable notification .. (send)
- * this is typical for BSD / posix conform network stacks.
- * - Additinionally its edge triggered.
- *
- * @see evdp_outgoingconnection_established
- *
- *
- * @return success indicator
- */
-bool evdp_addconnecting(int32 fd, EVDP_DATA *ep);
-
-/**
- * Adds an outgoing connection to the normal event notification system after it has been successfully established.
- *
- * @param fd connection identifier
- * @param *ep event data pointer for the conneciton.
-
- * @note
- * after this call, its handled like a normal "client" connection (incomming)
- *
- * @rturn success indicator
- */
-bool evdp_outgoingconnection_established(int32 fd, EVDP_DATA *ep);
-
-/**
- * Marks a connection to be monitored for writable.
- *
- * @param fd connection identifier
- * @param *ep event data pointer for the connection
- *
- * @note:
- * the connection must be already added (as client or listener)
- *
- *
- * @return sucess indicator
- */
-bool evdp_writable_add(int32 fd, EVDP_DATA *ep);
-
-/**
- * Removes the connection from writable notification monitoring
- *
- * @param fd connection identifier
- * @param *ep event data pointr for the connection
- *
- */
-void evdp_writable_remove(int32 fd, EVDP_DATA *ep);
-
-/**
- * Removes an connectio from the event notification system.
- *
- * @param fd connection iditentfir
- * @param *ep event data pointer for th connection
- *
- *
- * @note:
- * this will also clear the given EVENT_DATA block
- * so the connection slot is in an "initial" blank status / ready to get reused.
- *
- */
-void evdp_remove(int32 fd, EVDP_DATA *ep);
-
-
-
-#endif
diff --git a/src/common/evdp_epoll.c b/src/common/evdp_epoll.c
deleted file mode 100644
index 0357dfc66..000000000
--- a/src/common/evdp_epoll.c
+++ /dev/null
@@ -1,232 +0,0 @@
-//
-// Event Dispatcher Abstraction for EPOLL
-//
-// Author: Florian Wilkemeyer <fw@f-ws.de>
-//
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-//
-//
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <sys/epoll.h>
-#include <sys/fcntl.h>
-#include <sys/socket.h>
-
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
-#include "../common/evdp.h"
-
-
-#define EPOLL_MAX_PER_CYCLE 10 // Max Events to coalesc. per cycle.
-
-
-static int epoll_fd = -1;
-
-
-void evdp_init(){
-
- epoll_fd = epoll_create( EPOLL_MAX_PER_CYCLE );
- if(epoll_fd == -1){
- ShowFatalError("evdp [EPOLL]: Cannot create event dispatcher (errno: %u / %s)\n", errno, strerror(errno) );
- exit(1);
- }
-
-}//end: evdp_init()
-
-
-void evdp_final(){
-
- if(epoll_fd != -1){
- close(epoll_fd);
- epoll_fd = -1;
- }
-
-}//end: evdp_final()
-
-
-int32 evdp_wait(EVDP_EVENT *out_fds, int32 max_events, int32 timeout_ticks){
- struct epoll_event l_events[EPOLL_MAX_PER_CYCLE];
- register struct epoll_event *ev;
- register int nfds, n;
-
- if(max_events > EPOLL_MAX_PER_CYCLE)
- max_events = EPOLL_MAX_PER_CYCLE;
-
- nfds = epoll_wait( epoll_fd, l_events, max_events, timeout_ticks);
- if(nfds == -1){
- // @TODO: check if core is in shutdown mode. if - ignroe error.
-
- ShowFatalError("evdp [EPOLL]: epoll_wait returned bad / unexpected status (errno: %u / %s)\n", errno, strerror(errno));
- exit(1); //..
- }
-
- // Loop thru all events and copy it to the local ra evdp_event.. struct.
- for(n = 0; n < nfds; n++){
- ev = &l_events[n];
-
- out_fds->fd = ev->data.fd;
- out_fds->events = 0; // clear
-
- if(ev->events & EPOLLHUP)
- out_fds->events |= EVDP_EVENT_HUP;
-
- if(ev->events & EPOLLIN)
- out_fds->events |= EVDP_EVENT_IN;
-
- if(ev->events & EPOLLOUT)
- out_fds->events |= EVDP_EVENT_OUT;
-
- out_fds++;
- }
-
- return nfds; // 0 on timeout or > 0 ..
-}//end: evdp_wait()
-
-
-void evdp_remove(int32 fd, EVDP_DATA *ep){
-
- if(ep->ev_added == true){
-
- if( epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &ep->ev_data) != 0){
- ShowError("evdp [EPOLL]: evdp_remove - epoll_ctl (EPOLL_CTL_DEL) failed! fd #%u (errno %u / %s)\n", fd, errno, strerror(errno));
- }
-
- ep->ev_data.events = 0; // clear struct.
- ep->ev_data.data.fd = -1; // .. clear struct ..
-
- ep->ev_added = false; // not added!
- }
-
-
-}//end: evdp_remove()
-
-
-bool evdp_addlistener(int32 fd, EVDP_DATA *ep){
-
- ep->ev_data.events = EPOLLET|EPOLLIN;
- ep->ev_data.data.fd = fd;
-
- // No check here for 'added ?'
- // listeners cannot be added twice.
- //
- if( epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ep->ev_data) != 0 ){
- ShowError("evdp [EPOLL]: evdp_addlistener - epoll_ctl (EPOLL_CTL_ADD) faield! fd #%u (errno %u / %s)\n", fd, errno, strerror(errno));
- ep->ev_data.events = 0;
- ep->ev_data.data.fd = -1;
- return false;
- }
-
- ep->ev_added = true;
-
- return true;
-}//end: evdp_addlistener()
-
-
-bool evdp_addclient(int32 fd, EVDP_DATA *ep){
-
- ep->ev_data.events = EPOLLIN | EPOLLHUP;
- ep->ev_data.data.fd = fd;
-
- // No check for "added?" here,
- // this function only gets called upon accpept.
- //
-
- if( epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ep->ev_data) != 0){
- ShowError("evdp [EPOLL]: evdp_addclient - epoll_ctl (EPOLL_CTL_ADD) failed! fd #%u (errno %u / %s)\n", fd, errno, strerror(errno));
- ep->ev_data.events = 0;
- ep->ev_data.data.fd = -1;
- return false;
- }
-
- ep->ev_added = true;
-
- return true;
-}//end: evdp_addclient()
-
-
-bool evdp_addconnecting(int32 fd, EVDP_DATA *ep){
-
- ep->ev_data.events = EPOLLET | EPOLLOUT | EPOLLHUP;
- ep->ev_data.data.fd = fd;
-
- if( epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ep->ev_data) != 0){
- ShowError("evdp [EPOLL]: evdp_addconnecting - epoll_ctl (EPOLL_CTL_ADD) failed! fd #%u (errno %u / %s)\n", fd, errno, strerror(errno));
- ep->ev_data.events = 0;
- ep->ev_data.data.fd = -1;
- }
-
- ep->ev_added = true;
-
- return true;
-}//end: evdp_addconnecting()
-
-
-bool evdp_outgoingconnection_established(int32 fd, EVDP_DATA *ep){
- int32 saved_mask;
-
- if(ep->ev_added != true){
- // !
- ShowError("evdp [EPOLL]: evdp_outgoingconnection_established fd #%u is not added to event dispatcher! invalid call.\n", fd);
- return false;
- }
-
- saved_mask = ep->ev_data.events;
-
- ep->ev_data.events = EPOLLIN | EPOLLHUP;
-
- if( epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &ep->ev_data) != 0){
- ep->ev_data.events = saved_mask; // restore old mask.
- ShowError("evdp [EPOLL]: evdp_outgoingconnection_established - epoll_ctl (EPOLL_CTL_MOD) failed! fd #%u (errno %u / %s)\n", fd, errno, strerror(errno));
- return false;
- }
-
- return true;
-}//end: evdp_outgoingconnection_established()
-
-
-bool evdp_writable_add(int32 fd, EVDP_DATA *ep){
-
- if(ep->ev_added != true){
- ShowError("evdp [EPOLL]: evdp_writable_add - tried to add not added fd #%u\n",fd);
- return false;
- }
-
- if(! (ep->ev_data.events & EPOLLOUT) ){ //
-
- ep->ev_data.events |= EPOLLOUT;
- if( epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &ep->ev_data) != 0 ){
- ShowError("evdp [EPOLL]: evdp_writable_add - epoll_ctl (EPOLL_CTL_MOD) failed! fd #%u (errno: %u / %s)\n", fd, errno, strerror(errno));
- ep->ev_data.events &= ~EPOLLOUT; // remove from local flagmask due to failed syscall.
- return false;
- }
- }
-
- return true;
-}//end: evdp_writable_add()
-
-
-void evdp_writable_remove(int32 fd, EVDP_DATA *ep){
-
- if(ep->ev_added != true){
- ShowError("evdp [EPOLL]: evdp_writable_remove - tried to remove not added fd #%u\n", fd);
- return;
- }
-
- if( ep->ev_data.events & EPOLLOUT ){
-
- ep->ev_data.events &= ~EPOLLOUT;
- if( epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &ep->ev_data) != 0){
- ShowError("evdp [EPOLL]: evdp_writable_remove - epoll_ctl (EPOLL_CTL_MOD) failed! fd #%u (errno %u / %s)\n", fd, errno, strerror(errno));
- ep->ev_data.events |= EPOLLOUT; // add back to local flagmask because of failed syscall.
- return;
- }
- }
-
- return;
-}//end: evdp_writable_remove()
diff --git a/src/common/grfio.c b/src/common/grfio.c
index bde0ed720..6e628a512 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -2,13 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/des.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/nullpo.h"
+#define HERCULES_CORE
+
#include "grfio.h"
#include <stdio.h>
@@ -17,10 +12,18 @@
#include <sys/stat.h>
#include <zlib.h>
+#include "../common/cbasetypes.h"
+#include "../common/des.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/utils.h"
+
//----------------------------
// file entry table struct
//----------------------------
-typedef struct _FILELIST {
+typedef struct FILELIST {
int srclen; ///< compressed size
int srclen_aligned;
int declen; ///< original size
@@ -415,7 +418,7 @@ void* grfio_reads(const char* fname, int* size)
declen = (int)ftell(in);
fseek(in,0,SEEK_SET);
buf2 = (unsigned char *)aMalloc(declen+1); // +1 for resnametable zero-termination
- if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname);
+ if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occurred in fread grfio_reads, fname=%s \n",fname);
fclose(in);
if( size )
@@ -437,7 +440,7 @@ void* grfio_reads(const char* fname, int* size)
int fsize = entry->srclen_aligned;
unsigned char *buf = (unsigned char *)aMalloc(fsize);
fseek(in, entry->srcpos, 0);
- if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occured in fread in grfio_reads, grfname=%s\n",grfname);
+ if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occurred in fread in grfio_reads, grfname=%s\n",grfname);
fclose(in);
buf2 = (unsigned char *)aMalloc(entry->declen+1); // +1 for resnametable zero-termination
@@ -580,7 +583,7 @@ static int grfio_entryread(const char* grfname, int gentry)
unsigned char *rBuf;
uLongf rSize, eSize;
- if(fread(eheader,1,8,fp) != 8) ShowError("An error occured in fread while reading eheader buffer\n");
+ if(fread(eheader,1,8,fp) != 8) ShowError("An error occurred in fread while reading header buffer\n");
rSize = getlong(eheader); // Read Size
eSize = getlong(eheader+4); // Extend Size
@@ -592,7 +595,7 @@ static int grfio_entryread(const char* grfname, int gentry)
rBuf = (unsigned char *)aMalloc(rSize); // Get a Read Size
grf_filelist = (unsigned char *)aMalloc(eSize); // Get a Extend Size
- if(fread(rBuf,1,rSize,fp) != rSize) ShowError("An error occured in fread \n");
+ if(fread(rBuf,1,rSize,fp) != rSize) ShowError("An error occurred in fread \n");
fclose(fp);
decode_zip(grf_filelist, &eSize, rBuf, rSize); // Decode function
aFree(rBuf);
@@ -824,7 +827,7 @@ void grfio_init(const char* fname)
if( grf_num == 0 )
ShowInfo("No GRF loaded, using default data directory\n");
- // Unneccessary area release of filelist
+ // Unnecessary area release of filelist
filelist_compact();
// Resource check
diff --git a/src/common/grfio.h b/src/common/grfio.h
index 4f5d0d6bc..15659c17c 100644
--- a/src/common/grfio.h
+++ b/src/common/grfio.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_GRFIO_H_
-#define _COMMON_GRFIO_H_
+#ifndef COMMON_GRFIO_H
+#define COMMON_GRFIO_H
void grfio_init(const char* fname);
void grfio_final(void);
@@ -14,4 +14,4 @@ unsigned long grfio_crc32(const unsigned char *buf, unsigned int len);
int decode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen);
int encode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen);
-#endif /* _COMMON_GRFIO_H_ */
+#endif /* COMMON_GRFIO_H */
diff --git a/src/common/malloc.c b/src/common/malloc.c
index f7f108304..3c9fa9c54 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -2,22 +2,26 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/malloc.h"
-#include "../common/core.h"
-#include "../common/showmsg.h"
+#define HERCULES_CORE
+
+#include "malloc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include "../common/core.h"
+#include "../common/showmsg.h"
+#include "../common/sysinfo.h"
+
struct malloc_interface iMalloc_s;
////////////// Memory Libraries //////////////////
#if defined(MEMWATCH)
-# include <string.h>
+# include <string.h>
# include "memwatch.h"
# define MALLOC(n,file,line,func) mwMalloc((n),(file),(line))
# define CALLOC(m,n,file,line,func) mwCalloc((m),(n),(file),(line))
@@ -231,14 +235,13 @@ static size_t hash2size( unsigned short hash )
}
}
-void* _mmalloc(size_t size, const char *file, int line, const char *func )
-{
+void *mmalloc_(size_t size, const char *file, int line, const char *func) {
struct block *block;
short size_hash = size2hash( size );
struct unit_head *head;
if (((long) size) < 0) {
- ShowError("_mmalloc: %d\n", size);
+ ShowError("mmalloc_: %d\n", size);
return NULL;
}
@@ -337,15 +340,13 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
return (char *)head + sizeof(struct unit_head) - sizeof(long);
}
-void* _mcalloc(size_t num, size_t size, const char *file, int line, const char *func )
-{
+void *mcalloc_(size_t num, size_t size, const char *file, int line, const char *func) {
void *p = iMalloc->malloc(num * size,file,line,func);
memset(p,0,num * size);
return p;
}
-void* _mrealloc(void *memblock, size_t size, const char *file, int line, const char *func )
-{
+void *mrealloc_(void *memblock, size_t size, const char *file, int line, const char *func) {
size_t old_size;
if(memblock == NULL) {
return iMalloc->malloc(size,file,line,func);
@@ -369,8 +370,8 @@ void* _mrealloc(void *memblock, size_t size, const char *file, int line, const c
}
}
-/* a _mrealloc clone with the difference it 'z'eroes the newly created memory */
-void* _mreallocz(void *memblock, size_t size, const char *file, int line, const char *func ) {
+/* a mrealloc_ clone with the difference it 'z'eroes the newly created memory */
+void *mreallocz_(void *memblock, size_t size, const char *file, int line, const char *func) {
size_t old_size;
void *p = NULL;
@@ -400,8 +401,7 @@ void* _mreallocz(void *memblock, size_t size, const char *file, int line, const
}
-char* _mstrdup(const char *p, const char *file, int line, const char *func )
-{
+char *mstrdup_(const char *p, const char *file, int line, const char *func) {
if(p == NULL) {
return NULL;
} else {
@@ -412,12 +412,11 @@ char* _mstrdup(const char *p, const char *file, int line, const char *func )
}
}
-void _mfree(void *ptr, const char *file, int line, const char *func )
-{
+void mfree_(void *ptr, const char *file, int line, const char *func) {
struct unit_head *head;
if (ptr == NULL)
- return;
+ return;
head = (struct unit_head *)((char *)ptr - sizeof(struct unit_head) + sizeof(long));
if(head->size == 0) {
@@ -569,22 +568,18 @@ size_t memmgr_usage (void)
static char memmer_logfile[128];
static FILE *log_fp;
-static void memmgr_log (char *buf)
-{
+static void memmgr_log(char *buf, char *vcsinfo) {
if( !log_fp ) {
time_t raw;
struct tm* t;
- const char* svn = get_svn_revision();
- const char* git = get_git_hash();
log_fp = fopen(memmer_logfile,"at");
if (!log_fp) log_fp = stdout;
time(&raw);
t = localtime(&raw);
- fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (rev %s).\n",
- (t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec,
- git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown");
+ fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (%s).\n",
+ (t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, vcsinfo);
}
fprintf(log_fp, "%s", buf);
return;
@@ -641,10 +636,12 @@ static void memmgr_final (void)
{
struct block *block = block_first;
struct unit_head_large *large = unit_head_large_first;
-
+ char vcsinfo[256];
#ifdef LOG_MEMMGR
int count = 0;
#endif /* LOG_MEMMGR */
+ snprintf(vcsinfo, sizeof(vcsinfo), "%s rev '%s'", sysinfo->vcstype(), sysinfo->vcsrevision_src()); // Cache VCS info before we free() it
+ sysinfo->final();
while (block) {
if (block->unit_used) {
@@ -658,7 +655,7 @@ static void memmgr_final (void)
sprintf (buf,
"%04d : %s line %d size %lu address 0x%p\n", ++count,
head->file, head->line, (unsigned long)head->size, ptr);
- memmgr_log (buf);
+ memmgr_log(buf, vcsinfo);
#endif /* LOG_MEMMGR */
// get block pointer and free it [celest]
iMalloc->free(ptr, ALC_MARK);
@@ -675,7 +672,7 @@ static void memmgr_final (void)
sprintf (buf,
"%04d : %s line %d size %lu address 0x%p\n", ++count,
large->unit_head.file, large->unit_head.line, (unsigned long)large->size, &large->unit_head.checksum);
- memmgr_log (buf);
+ memmgr_log(buf, vcsinfo);
#endif /* LOG_MEMMGR */
large2 = large->next;
FREE(large,file,line,func);
@@ -775,7 +772,7 @@ static void memmgr_init (void)
{
#ifdef LOG_MEMMGR
sprintf(memmer_logfile, "log/%s.leaks", SERVER_NAME);
- ShowStatus("Memory manager initialised: "CL_WHITE"%s"CL_RESET"\n", memmer_logfile);
+ ShowStatus("Memory manager initialized: "CL_WHITE"%s"CL_RESET"\n", memmer_logfile);
memset(hash_unfill, 0, sizeof(hash_unfill));
#endif /* LOG_MEMMGR */
}
@@ -783,7 +780,7 @@ static void memmgr_init (void)
/*======================================
-* Initialise
+* Initialize
*--------------------------------------
*/
@@ -850,12 +847,12 @@ void malloc_defaults(void) {
// Athena's built-in Memory Manager
#ifdef USE_MEMMGR
- iMalloc->malloc = _mmalloc;
- iMalloc->calloc = _mcalloc;
- iMalloc->realloc = _mrealloc;
- iMalloc->reallocz= _mreallocz;
- iMalloc->astrdup = _mstrdup;
- iMalloc->free = _mfree;
+ iMalloc->malloc = mmalloc_;
+ iMalloc->calloc = mcalloc_;
+ iMalloc->realloc = mrealloc_;
+ iMalloc->reallocz= mreallocz_;
+ iMalloc->astrdup = mstrdup_;
+ iMalloc->free = mfree_;
#else
iMalloc->malloc = aMalloc_;
iMalloc->calloc = aCalloc_;
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 7309bb0f7..8dace2d68 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_MALLOC_H_
-#define _COMMON_MALLOC_H_
+#ifndef COMMON_MALLOC_H
+#define COMMON_MALLOC_H
#include "../common/cbasetypes.h"
@@ -88,4 +88,4 @@ struct malloc_interface {
void memmgr_report (int extra);
struct malloc_interface *iMalloc;
-#endif /* _COMMON_MALLOC_H_ */
+#endif /* COMMON_MALLOC_H */
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 3128a3cb0..644f2f619 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -2,16 +2,19 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "../common/db.h"
+#define HERCULES_CORE
+
#include "mapindex.h"
-#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
/* mapindex.c interface source */
struct mapindex_interface mapindex_s;
@@ -67,7 +70,7 @@ const char* mapindex_getmapname_ext(const char* string, char* output) {
}
/// Adds a map to the specified index
-/// Returns 1 if successful, 0 oherwise
+/// Returns 1 if successful, 0 otherwise
int mapindex_addmap(int index, const char* name) {
char map_name[MAP_NAME_LENGTH];
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index fa9b9e920..446a2422d 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_MAPINDEX_H_
-#define _COMMON_MAPINDEX_H_
+#ifndef COMMON_MAPINDEX_H
+#define COMMON_MAPINDEX_H
#include "../common/db.h"
#include "../common/mmo.h"
@@ -90,4 +90,4 @@ struct mapindex_interface *mapindex;
void mapindex_defaults(void);
-#endif /* _COMMON_MAPINDEX_H_ */
+#endif /* COMMON_MAPINDEX_H */
diff --git a/src/common/md5calc.c b/src/common/md5calc.c
index 05fde42cc..e7b506e27 100644
--- a/src/common/md5calc.c
+++ b/src/common/md5calc.c
@@ -6,11 +6,15 @@
*
***********************************************************/
-#include "../common/random.h"
+#define HERCULES_CORE
+
#include "md5calc.h"
-#include <string.h>
+
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+
+#include "../common/random.h"
#ifndef UINT_MAX
#define UINT_MAX 4294967295U
diff --git a/src/common/md5calc.h b/src/common/md5calc.h
index d0caf6787..740e2edcc 100644
--- a/src/common/md5calc.h
+++ b/src/common/md5calc.h
@@ -1,8 +1,8 @@
-#ifndef _COMMON_MD5CALC_H_
-#define _COMMON_MD5CALC_H_
+#ifndef COMMON_MD5CALC_H
+#define COMMON_MD5CALC_H
void MD5_String(const char * string, char * output);
void MD5_Binary(const char * string, unsigned char * output);
void MD5_Salt(unsigned int len, char * output);
-#endif /* _COMMON_MD5CALC_H_ */
+#endif /* COMMON_MD5CALC_H */
diff --git a/src/common/mempool.c b/src/common/mempool.c
deleted file mode 100644
index 4559d8f2a..000000000
--- a/src/common/mempool.c
+++ /dev/null
@@ -1,568 +0,0 @@
-
-//
-// Memory Pool Implementation (Threadsafe)
-//
-//
-// Author: Florian Wilkemeyer <fw@f-ws.de>
-//
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-//
-//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#ifdef WIN32
-#include "../common/winapi.h"
-#else
-#include <unistd.h>
-#endif
-
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
-#include "../common/mempool.h"
-#include "../common/atomic.h"
-#include "../common/spinlock.h"
-#include "../common/thread.h"
-#include "../common/malloc.h"
-#include "../common/mutex.h"
-
-#define ALIGN16 ra_align(16)
-#define ALIGN_TO(x, a) ((x) + ( (a) - ( (x) % (a)) ) )
-#define ALIGN_TO_16(x) ALIGN_TO((x), 16)
-
-#undef MEMPOOL_DEBUG
-#define MEMPOOLASSERT
-
-
-#define NODE_TO_DATA(x) ( ((char*)(x)) + sizeof(struct node) )
-#define DATA_TO_NODE(x) ( (struct node*)(((char*)(x)) - sizeof(struct node)) )
-struct ra_align(16) node{
- void *next;
- void *segment;
-#ifdef MEMPOOLASSERT
- bool used;
- uint64 magic;
- #define NODE_MAGIC 0xBEEF00EAEACAFE07ll
-#endif
-};
-
-
-// The Pointer to this struct is the base address of the segment itself.
-struct pool_segment{
- mempool pool; // pool, this segment belongs to
- struct pool_segment *next;
- int64 num_nodes_total;
- int64 num_bytes;
-};
-
-
-struct mempool{
- // Settings
- char *name;
- uint64 elem_size;
- uint64 elem_realloc_step;
- int64 elem_realloc_thresh;
-
- // Callbacks that get called for every node that gets allocated
- // Example usage: initialization of mutex/lock for each node.
- memPoolOnNodeAllocationProc onalloc;
- memPoolOnNodeDeallocationProc ondealloc;
-
- // Locks
- SPIN_LOCK segmentLock;
- SPIN_LOCK nodeLock;
-
-
- // Internal
- struct pool_segment *segments;
- struct node *free_list;
-
- volatile int64 num_nodes_total;
- volatile int64 num_nodes_free;
-
- volatile int64 num_segments;
- volatile int64 num_bytes_total;
-
- volatile int64 peak_nodes_used; // Peak Node Usage
- volatile int64 num_realloc_events; // Number of reallocations done. (allocate additional nodes)
-
- // list (used for global management such as allocator..)
- struct mempool *next;
-} ra_align(8); // Dont touch the alignment, otherwise interlocked functions are broken ..
-
-
-///
-// Implementation:
-//
-static void segment_allocate_add(mempool p, uint64 count);
-
-static SPIN_LOCK l_mempoolListLock;
-static mempool l_mempoolList = NULL;
-static rAthread l_async_thread = NULL;
-static ramutex l_async_lock = NULL;
-static racond l_async_cond = NULL;
-static volatile int32 l_async_terminate = 0;
-
-static void *mempool_async_allocator(void *x){
- mempool p;
-
-
- while(1){
- if(l_async_terminate > 0)
- break;
-
- EnterSpinLock(&l_mempoolListLock);
-
- for(p = l_mempoolList; p != NULL; p = p->next){
-
- if(p->num_nodes_free < p->elem_realloc_thresh){
- // add new segment.
- segment_allocate_add(p, p->elem_realloc_step);
- // increase stats counter
- InterlockedIncrement64(&p->num_realloc_events);
- }
-
- }
-
- LeaveSpinLock(&l_mempoolListLock);
-
- ramutex_lock( l_async_lock );
- racond_wait( l_async_cond, l_async_lock, -1 );
- ramutex_unlock( l_async_lock );
- }
-
-
- return NULL;
-}//end: mempool_async_allocator()
-
-
-void mempool_init(){
-
- if( rand()%2 + 1 )
- return;
-
- if(sizeof(struct node)%16 != 0 ){
- ShowFatalError("mempool_init: struct node alignment failure. %u != multiple of 16\n", sizeof(struct node));
- exit(EXIT_FAILURE);
- }
-
- // Global List start
- InitializeSpinLock(&l_mempoolListLock);
- l_mempoolList = NULL;
-
- // Initialize mutex + stuff needed for async allocator worker.
- l_async_terminate = 0;
- l_async_lock = ramutex_create();
- l_async_cond = racond_create();
-
- l_async_thread = rathread_createEx(mempool_async_allocator, NULL, 1024*1024, RAT_PRIO_NORMAL);
- if(l_async_thread == NULL){
- ShowFatalError("mempool_init: cannot spawn Async Allocator Thread.\n");
- exit(EXIT_FAILURE);
- }
-
-}//end: mempool_init()
-
-
-void mempool_final(){
- mempool p, pn;
-
- if( rand()%2 + 1 )
- return;
-
- ShowStatus("Mempool: Terminating async. allocation worker and remaining pools.\n");
-
- // Terminate worker / wait until its terminated.
- InterlockedIncrement(&l_async_terminate);
- racond_signal(l_async_cond);
- rathread_wait(l_async_thread, NULL);
-
- // Destroy cond var and mutex.
- racond_destroy( l_async_cond );
- ramutex_destroy( l_async_lock );
-
- // Free remaining mempools
- // ((bugged code! this should halppen, every mempool should
- // be freed by the subsystem that has allocated it.)
- //
- EnterSpinLock(&l_mempoolListLock);
- p = l_mempoolList;
- while(1){
- if(p == NULL)
- break;
-
- pn = p->next;
-
- ShowWarning("Mempool [%s] was not properly destroyed - forcing destroy.\n", p->name);
- mempool_destroy(p);
-
- p = pn;
- }
- LeaveSpinLock(&l_mempoolListLock);
-
-}//end: mempool_final()
-
-
-static void segment_allocate_add(mempool p, uint64 count){
-
- // Required Memory:
- // sz( segment )
- // count * sz( real_node_size )
- //
- // where real node size is:
- // ALIGN_TO_16( sz( node ) ) + p->elem_size
- // so the nodes usable address is nodebase + ALIGN_TO_16(sz(node))
- //
- size_t total_sz;
- struct pool_segment *seg = NULL;
- struct node *nodeList = NULL;
- struct node *node = NULL;
- char *ptr = NULL;
- uint64 i;
-
- total_sz = ALIGN_TO_16( sizeof(struct pool_segment) )
- + ( (size_t)count * (sizeof(struct node) + (size_t)p->elem_size) ) ;
-
-#ifdef MEMPOOL_DEBUG
- ShowDebug("Mempool [%s] Segment AllocateAdd (num: %u, total size: %0.2fMiB)\n", p->name, count, (float)total_sz/1024.f/1024.f);
-#endif
-
- // allocate! (spin forever until weve got the memory.)
- i=0;
- while(1){
- ptr = (char*)aMalloc(total_sz);
- if(ptr != NULL) break;
-
- i++; // increase failcount.
- if(!(i & 7)){
- ShowWarning("Mempool [%s] Segment AllocateAdd => System seems to be Out of Memory (%0.2f MiB). Try #%u\n", (float)total_sz/1024.f/1024.f, i);
-#ifdef WIN32
- Sleep(1000);
-#else
- sleep(1);
-#endif
- }else{
- rathread_yield(); /// allow/force vuln. ctxswitch
- }
- }//endwhile: allocation spinloop.
-
- // Clear Memory.
- memset(ptr, 0x00, total_sz);
-
- // Initialize segment struct.
- seg = (struct pool_segment*)ptr;
- ptr += ALIGN_TO_16(sizeof(struct pool_segment));
-
- seg->pool = p;
- seg->num_nodes_total = count;
- seg->num_bytes = total_sz;
-
-
- // Initialze nodes!
- nodeList = NULL;
- for(i = 0; i < count; i++){
- node = (struct node*)ptr;
- ptr += sizeof(struct node);
- ptr += p->elem_size;
-
- node->segment = seg;
-#ifdef MEMPOOLASSERT
- node->used = false;
- node->magic = NODE_MAGIC;
-#endif
-
- if(p->onalloc != NULL) p->onalloc( NODE_TO_DATA(node) );
-
- node->next = nodeList;
- nodeList = node;
- }
-
-
-
- // Link in Segment.
- EnterSpinLock(&p->segmentLock);
- seg->next = p->segments;
- p->segments = seg;
- LeaveSpinLock(&p->segmentLock);
-
- // Link in Nodes
- EnterSpinLock(&p->nodeLock);
- nodeList->next = p->free_list;
- p->free_list = nodeList;
- LeaveSpinLock(&p->nodeLock);
-
-
- // Increase Stats:
- InterlockedExchangeAdd64(&p->num_nodes_total, count);
- InterlockedExchangeAdd64(&p->num_nodes_free, count);
- InterlockedIncrement64(&p->num_segments);
- InterlockedExchangeAdd64(&p->num_bytes_total, total_sz);
-
-}//end: segment_allocate_add()
-
-
-mempool mempool_create(const char *name,
- uint64 elem_size,
- uint64 initial_count,
- uint64 realloc_count,
- memPoolOnNodeAllocationProc onNodeAlloc,
- memPoolOnNodeDeallocationProc onNodeDealloc){
- //..
- uint64 realloc_thresh;
- mempool pool;
- pool = (mempool)aCalloc( 1, sizeof(struct mempool) );
-
- if(pool == NULL){
- ShowFatalError("mempool_create: Failed to allocate %u bytes memory.\n", sizeof(struct mempool) );
- exit(EXIT_FAILURE);
- }
-
- // Check minimum initial count / realloc count requirements.
- if(initial_count < 50)
- initial_count = 50;
- if(realloc_count < 50)
- realloc_count = 50;
-
- // Set Reallocation threshold to 5% of realloc_count, at least 10.
- realloc_thresh = (realloc_count/100)*5; //
- if(realloc_thresh < 10)
- realloc_thresh = 10;
-
- // Initialize members..
- pool->name = aStrdup(name);
- pool->elem_size = ALIGN_TO_16(elem_size);
- pool->elem_realloc_step = realloc_count;
- pool->elem_realloc_thresh = realloc_thresh;
- pool->onalloc = onNodeAlloc;
- pool->ondealloc = onNodeDealloc;
-
- InitializeSpinLock(&pool->segmentLock);
- InitializeSpinLock(&pool->nodeLock);
-
- // Initial Statistic values:
- pool->num_nodes_total = 0;
- pool->num_nodes_free = 0;
- pool->num_segments = 0;
- pool->num_bytes_total = 0;
- pool->peak_nodes_used = 0;
- pool->num_realloc_events = 0;
-
- //
-#ifdef MEMPOOL_DEBUG
- ShowDebug("Mempool [%s] Init (ElemSize: %u, Initial Count: %u, Realloc Count: %u)\n", pool->name, pool->elem_size, initial_count, pool->elem_realloc_step);
-#endif
-
- // Allocate first segment directly :)
- segment_allocate_add(pool, initial_count);
-
-
- // Add Pool to the global pool list
- EnterSpinLock(&l_mempoolListLock);
- pool->next = l_mempoolList;
- l_mempoolList = pool;
- LeaveSpinLock(&l_mempoolListLock);
-
-
- return pool;
-}//end: mempool_create()
-
-
-void mempool_destroy(mempool p){
- struct pool_segment *seg, *segnext;
- struct node *niter;
- mempool piter, pprev;
- char *ptr;
- int64 i;
-
-#ifdef MEMPOOL_DEBUG
- ShowDebug("Mempool [%s] Destroy\n", p->name);
-#endif
-
- // Unlink from global list.
- EnterSpinLock(&l_mempoolListLock);
- piter = l_mempoolList;
- pprev = l_mempoolList;
- while(1){
- if(piter == NULL)
- break;
-
-
- if(piter == p){
- // unlink from list,
- //
- if(pprev == l_mempoolList){
- // this (p) is list begin. so set next as head.
- l_mempoolList = p->next;
- }else{
- // replace prevs next wuth our next.
- pprev->next = p->next;
- }
- break;
- }
-
- pprev = piter;
- piter = piter->next;
- }
-
- p->next = NULL;
- LeaveSpinLock(&l_mempoolListLock);
-
-
- // Get both locks.
- EnterSpinLock(&p->segmentLock);
- EnterSpinLock(&p->nodeLock);
-
-
- if(p->num_nodes_free != p->num_nodes_total)
- ShowWarning("Mempool [%s] Destroy - %u nodes are not freed properly!\n", p->name, (p->num_nodes_total - p->num_nodes_free) );
-
- // Free All Segments (this will also free all nodes)
- // The segment pointer is the base pointer to the whole segment.
- seg = p->segments;
- while(1){
- if(seg == NULL)
- break;
-
- segnext = seg->next;
-
- // ..
- if(p->ondealloc != NULL){
- // walk over the segment, and call dealloc callback!
- ptr = (char*)seg;
- ptr += ALIGN_TO_16(sizeof(struct pool_segment));
- for(i = 0; i < seg->num_nodes_total; i++){
- niter = (struct node*)ptr;
- ptr += sizeof(struct node);
- ptr += p->elem_size;
-#ifdef MEMPOOLASSERT
- if(niter->magic != NODE_MAGIC){
- ShowError("Mempool [%s] Destroy - walk over segment - node %p invalid magic!\n", p->name, niter);
- continue;
- }
-#endif
-
- p->ondealloc( NODE_TO_DATA(niter) );
-
-
- }
- }//endif: ondealloc callback?
-
- // simple ..
- aFree(seg);
-
- seg = segnext;
- }
-
- // Clear node ptr
- p->free_list = NULL;
- InterlockedExchange64(&p->num_nodes_free, 0);
- InterlockedExchange64(&p->num_nodes_total, 0);
- InterlockedExchange64(&p->num_segments, 0);
- InterlockedExchange64(&p->num_bytes_total, 0);
-
- LeaveSpinLock(&p->nodeLock);
- LeaveSpinLock(&p->segmentLock);
-
- // Free pool itself :D
- aFree(p->name);
- aFree(p);
-
-}//end: mempool_destroy()
-
-
-void *mempool_node_get(mempool p){
- struct node *node;
- int64 num_used;
-
- if(p->num_nodes_free < p->elem_realloc_thresh)
- racond_signal(l_async_cond);
-
- while(1){
-
- EnterSpinLock(&p->nodeLock);
-
- node = p->free_list;
- if(node != NULL)
- p->free_list = node->next;
-
- LeaveSpinLock(&p->nodeLock);
-
- if(node != NULL)
- break;
-
- rathread_yield();
- }
-
- InterlockedDecrement64(&p->num_nodes_free);
-
- // Update peak value
- num_used = (p->num_nodes_total - p->num_nodes_free);
- if(num_used > p->peak_nodes_used){
- InterlockedExchange64(&p->peak_nodes_used, num_used);
- }
-
-#ifdef MEMPOOLASSERT
- node->used = true;
-#endif
-
- return NODE_TO_DATA(node);
-}//end: mempool_node_get()
-
-
-void mempool_node_put(mempool p, void *data){
- struct node *node;
-
- node = DATA_TO_NODE(data);
-#ifdef MEMPOOLASSERT
- if(node->magic != NODE_MAGIC){
- ShowError("Mempool [%s] node_put failed, given address (%p) has invalid magic.\n", p->name, data);
- return; // lost,
- }
-
- {
- struct pool_segment *node_seg = node->segment;
- if(node_seg->pool != p){
- ShowError("Mempool [%s] node_put faild, given node (data address %p) doesnt belongs to this pool. ( Node Origin is [%s] )\n", p->name, data, node_seg->pool);
- return;
- }
- }
-
- // reset used flag.
- node->used = false;
-#endif
-
- //
- EnterSpinLock(&p->nodeLock);
- node->next = p->free_list;
- p->free_list = node;
- LeaveSpinLock(&p->nodeLock);
-
- InterlockedIncrement64(&p->num_nodes_free);
-
-}//end: mempool_node_put()
-
-
-mempool_stats mempool_get_stats(mempool pool){
- mempool_stats stats;
-
- // initialize all with zeros
- memset(&stats, 0x00, sizeof(mempool_stats));
-
- stats.num_nodes_total = pool->num_nodes_total;
- stats.num_nodes_free = pool->num_nodes_free;
- stats.num_nodes_used = (stats.num_nodes_total - stats.num_nodes_free);
- stats.num_segments = pool->num_segments;
- stats.num_realloc_events= pool->num_realloc_events;
- stats.peak_nodes_used = pool->peak_nodes_used;
- stats.num_bytes_total = pool->num_bytes_total;
-
- // Pushing such a large block over the stack as return value isnt nice
- // but lazy :) and should be okay in this case (Stats / Debug..)
- // if you dont like it - feel free and refactor it.
- return stats;
-}//end: mempool_get_stats()
-
diff --git a/src/common/mempool.h b/src/common/mempool.h
deleted file mode 100644
index aeaebe7fe..000000000
--- a/src/common/mempool.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef _rA_MEMPOOL_H_
-#define _rA_MEMPOOL_H_
-
-#include "../common/cbasetypes.h"
-
-typedef struct mempool *mempool;
-
-typedef void (*memPoolOnNodeAllocationProc)(void *ptr);
-typedef void (*memPoolOnNodeDeallocationProc)(void *ptr);
-
-typedef struct mempool_stats{
- int64 num_nodes_total;
- int64 num_nodes_free;
- int64 num_nodes_used;
-
- int64 num_segments;
- int64 num_realloc_events;
-
- int64 peak_nodes_used;
-
- int64 num_bytes_total;
-} mempool_stats;
-
-
-//
-void mempool_init();
-void mempool_final();
-
-
-/**
- * Creates a new Mempool
- *
- * @param name - Name of the pool (used for debug / error messages)
- * @param elem_size - size of each element
- * @param initial_count - preallocation count
- * @param realloc_count - #no of nodes being allocated when pool is running empty.
- * @param onNodeAlloc - Node Allocation callback (see @note!)
- * @param onNodeDealloc - Node Deallocation callback (see @note!)
- *
- * @note:
- * The onNode(De)alloc callbacks are only called once during segment allocation
- * (pool initialization / rallocation )
- * you can use this callbacks for example to initlaize a mutex or somethingelse
- * you definitly need during runtime
- *
- * @return not NULL
- */
-mempool mempool_create(const char *name,
- uint64 elem_size,
- uint64 initial_count,
- uint64 realloc_count,
-
- memPoolOnNodeAllocationProc onNodeAlloc,
- memPoolOnNodeDeallocationProc onNodeDealloc);
-
-
-/**
- * Destroys a Mempool
- *
- * @param pool - the mempool to destroy
- *
- * @note:
- * Everything gets deallocated, regardless if everything was freed properly!
- * So you have to ensure that all references are cleared properly!
- */
-void mempool_destroy(mempool pool);
-
-
-/**
- * Gets a new / empty node from the given mempool.
- *
- * @param pool - the pool to get an empty node from.
- *
- * @return Address of empty Node
- */
-void *mempool_node_get(mempool pool);
-
-
-/**
- * Returns the given node to the given mempool
- *
- * @param pool - the pool to put the node, to
- * @param node - the node to return
- */
-void mempool_node_put(mempool pool, void *node);
-
-
-/**
- * Returns Statistics for the given mempool
- *
- * @param pool - the pool to get thats for
- *
- * @note: i dont like pushing masses of values over the stack, too - but its lazy and okay for stats. (blacksirius)
- *
- * @return stats struct
- */
-mempool_stats mempool_get_stats(mempool pool);
-
-
-#endif
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 476d12d3f..feeb06524 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -2,13 +2,14 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_MMO_H_
-#define _COMMON_MMO_H_
+#ifndef COMMON_MMO_H
+#define COMMON_MMO_H
-#include "cbasetypes.h"
-#include "../common/db.h"
#include <time.h>
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+
// server->client protocol version
// 0 - pre-?
// 1 - ? - 0x196
@@ -25,7 +26,7 @@
// 20071106 - 2007-11-06aSakexe+ - 0x78, 0x7c, 0x22c
// 20080102 - 2008-01-02aSakexe+ - 0x2ec, 0x2ed , 0x2ee
// 20081126 - 2008-11-26aSakexe+ - 0x1a2
-// 20090408 - 2009-04-08aSakexe+ - 0x44a (dont use as it overlaps with RE client packets)
+// 20090408 - 2009-04-08aSakexe+ - 0x44a (don't use as it overlaps with RE client packets)
// 20080827 - 2008-08-27aRagexeRE+ - First RE Client
// 20081217 - 2008-12-17aRagexeRE+ - 0x6d (Note: This one still use old Char Info Packet Structure)
// 20081218 - 2008-12-17bRagexeRE+ - 0x6d (Note: From this one client use new Char Info Packet Structure)
@@ -60,7 +61,7 @@
// Client support for experimental RagexeRE UI present in 2012-04-10 and 2012-04-18
#if defined(PACKETVER_RE) && ( PACKETVER == 20120410 || PACKETVER == 20120418 )
-#define PARTY_RECRUIT
+#define PARTY_RECRUIT
#endif // PACKETVER_RE && (PACKETVER == 20120410 || PACKETVER == 10120418)
// Comment the following line to disable sc_data saving. [Skotlex]
@@ -83,6 +84,14 @@
#endif // 20090603
#endif // 20070227
+/* Feb 1st 2012 */
+#if PACKETVER >= 20120201
+# define NEW_CARTS
+# define MAX_CARTS 9
+#else
+# define MAX_CARTS 5
+#endif
+
#define MAX_INVENTORY 100
//Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well.
#define MAX_CHARS 9
@@ -96,13 +105,13 @@
//Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default )
#define MAX_BANK_ZENY 2100000000
+#define MAX_LEVEL 175
#define MAX_FAME 1000000000
#define MAX_CART 100
#define MAX_SKILL 1478
#define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID
-//Update this max as necessary. 55 is the value needed for Super Baby currently
-//Raised to 84 since Expanded Super Novice needs it.
-#define MAX_SKILL_TREE 84
+// Update this max as necessary. 86 is the value needed for Expanded Super Novice.
+#define MAX_SKILL_TREE 86
#define DEFAULT_WALK_SPEED 150
#define MIN_WALK_SPEED 20 /* below 20 clips animation */
#define MAX_WALK_SPEED 1000
@@ -110,14 +119,14 @@
#define MAX_GUILD_STORAGE 600
#define MAX_PARTY 12
#define MAX_GUILD (16+10*6) // Increased max guild members +6 per 1 extension levels [Lupus]
-#define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
+#define MAX_GUILDPOSITION 20 // Increased max guild positions to accommodate for all members [Valaris] (removed) [PoW]
#define MAX_GUILDEXPULSION 32
#define MAX_GUILDALLIANCE 16
-#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
+#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
#define MAX_GUILDLEVEL 50
#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
-#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
+#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
// for produce
#define MIN_ATTRIBUTE 0
@@ -158,7 +167,7 @@
// Base Homun skill.
#define HM_SKILLBASE 8001
#define MAX_HOMUNSKILL 43
-#define MAX_HOMUNCULUS_CLASS 52 // [orn] Increased to 60 from 16 to allow new Homun-S.
+#define MAX_HOMUNCULUS_CLASS 52 // [orn] Increased to 60 from 16 to allow new Homun-S.
#define HM_CLASS_BASE 6001
#define HM_CLASS_MAX (HM_CLASS_BASE+MAX_HOMUNCULUS_CLASS-1)
@@ -266,17 +275,17 @@ enum e_skill_flag
SKILL_FLAG_PERMANENT,
SKILL_FLAG_TEMPORARY,
SKILL_FLAG_PLAGIARIZED,
- SKILL_FLAG_UNUSED, /* needed to maintain the order since the values are saved, can be renamed and used if a new flag is necessary */
- SKILL_FLAG_PERM_GRANTED, // Permanent, granted through someway (e.g. script).
+ SKILL_FLAG_UNUSED, ///< needed to maintain the order since the values are saved, can be renamed and used if a new flag is necessary
+ SKILL_FLAG_PERM_GRANTED, ///< Permanent, granted through someway (e.g. script).
/* */
/* MUST be the last, because with it the flag value stores a dynamic value (flag+lv) */
SKILL_FLAG_REPLACED_LV_0, // Temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
};
enum e_mmo_charstatus_opt {
- OPT_NONE = 0x0,
- OPT_SHOW_EQUIP = 0x1,
- OPT_ALLOW_PARTY = 0x2,
+ OPT_NONE = 0x0,
+ OPT_SHOW_EQUIP = 0x1,
+ OPT_ALLOW_PARTY = 0x2,
};
enum e_item_bound_type {
@@ -342,17 +351,17 @@ struct s_pet {
short hungry;//pet hungry
char name[NAME_LENGTH];
char rename_flag;
- char incuvate;
+ char incubate;
};
-struct s_homunculus { //[orn]
+struct s_homunculus { //[orn]
char name[NAME_LENGTH];
int hom_id;
int char_id;
short class_;
short prev_class;
int hp,max_hp,sp,max_sp;
- unsigned int intimacy; //[orn]
+ unsigned int intimacy;
short hunger;
struct s_skill hskill[MAX_HOMUNSKILL]; //albator
short skillpts;
@@ -461,6 +470,8 @@ struct mmo_charstatus {
unsigned short mod_exp,mod_drop,mod_death;
unsigned char font;
+
+ uint32 uniqueitem_counter;
};
typedef enum mail_status {
@@ -527,7 +538,7 @@ struct party {
unsigned char count; //Count of online characters.
unsigned exp : 1,
item : 2; //&1: Party-Share (round-robin), &2: pickup style: shared.
- struct party_member member[MAX_PARTY];
+ struct party_member member[MAX_PARTY];
};
struct map_session_data;
@@ -630,15 +641,25 @@ enum fame_list_type {
RANKTYPE_PK = 3, //Not supported yet
};
-enum { //Change Guild Infos
- GBI_EXP =1, // Guild Experience (EXP)
- GBI_GUILDLV, // Guild level
- GBI_SKILLPOINT, // Guild skillpoints
- GBI_SKILLLV, // Guild skill_lv ?? seem unused
+/**
+ * Guild Basic Information
+ * It is used to request changes via intif_guild_change_basicinfo in map-server and to
+ * signalize changes made in char-server via mapif_parse_GuildMemberInfoChange
+ **/
+enum guild_basic_info {
+ GBI_EXP = 1, ///< Guild Experience (EXP)
+ GBI_GUILDLV, ///< Guild level
+ GBI_SKILLPOINT, ///< Guild skillpoints
+
+ /**
+ * Changes a skill level, struct guild_skill should be sent.
+ * All checks regarding max skill level should be done in _map-server_
+ **/
+ GBI_SKILLLV, ///< Guild skill_lv
};
enum { //Change Member Infos
- GMI_POSITION =0,
+ GMI_POSITION = 0,
GMI_EXP,
GMI_HAIR,
GMI_HAIR_COLOR,
@@ -835,50 +856,50 @@ enum {
};
enum weapon_type {
- W_FIST, //Bare hands
- W_DAGGER, //1
- W_1HSWORD, //2
- W_2HSWORD, //3
- W_1HSPEAR, //4
- W_2HSPEAR, //5
- W_1HAXE, //6
- W_2HAXE, //7
- W_MACE, //8
- W_2HMACE, //9 (unused)
- W_STAFF, //10
- W_BOW, //11
- W_KNUCKLE, //12
- W_MUSICAL, //13
- W_WHIP, //14
- W_BOOK, //15
- W_KATAR, //16
- W_REVOLVER, //17
- W_RIFLE, //18
- W_GATLING, //19
- W_SHOTGUN, //20
- W_GRENADE, //21
- W_HUUMA, //22
- W_2HSTAFF, //23
+ W_FIST, ///< Bare hands
+ W_DAGGER, //1
+ W_1HSWORD, //2
+ W_2HSWORD, //3
+ W_1HSPEAR, //4
+ W_2HSPEAR, //5
+ W_1HAXE, //6
+ W_2HAXE, //7
+ W_MACE, //8
+ W_2HMACE, //9 (unused)
+ W_STAFF, //10
+ W_BOW, //11
+ W_KNUCKLE, //12
+ W_MUSICAL, //13
+ W_WHIP, //14
+ W_BOOK, //15
+ W_KATAR, //16
+ W_REVOLVER, //17
+ W_RIFLE, //18
+ W_GATLING, //19
+ W_SHOTGUN, //20
+ W_GRENADE, //21
+ W_HUUMA, //22
+ W_2HSTAFF, //23
MAX_WEAPON_TYPE,
// dual-wield constants
- W_DOUBLE_DD, // 2 daggers
- W_DOUBLE_SS, // 2 swords
- W_DOUBLE_AA, // 2 axes
- W_DOUBLE_DS, // dagger + sword
- W_DOUBLE_DA, // dagger + axe
- W_DOUBLE_SA, // sword + axe
+ W_DOUBLE_DD, ///< 2 daggers
+ W_DOUBLE_SS, ///< 2 swords
+ W_DOUBLE_AA, ///< 2 axes
+ W_DOUBLE_DS, ///< dagger + sword
+ W_DOUBLE_DA, ///< dagger + axe
+ W_DOUBLE_SA, ///< sword + axe
};
enum ammo_type {
- A_ARROW = 1,
- A_DAGGER, //2
- A_BULLET, //3
- A_SHELL, //4
- A_GRENADE, //5
- A_SHURIKEN, //6
- A_KUNAI, //7
- A_CANNONBALL, //8
- A_THROWWEAPON //9
+ A_ARROW = 1,
+ A_DAGGER, //2
+ A_BULLET, //3
+ A_SHELL, //4
+ A_GRENADE, //5
+ A_SHURIKEN, //6
+ A_KUNAI, //7
+ A_CANNONBALL, //8
+ A_THROWWEAPON, //9
};
enum e_char_server_type {
@@ -911,4 +932,4 @@ enum e_pc_reg_loading {
#error MAX_ZENY is too big
#endif
-#endif /* _COMMON_MMO_H_ */
+#endif /* COMMON_MMO_H */
diff --git a/src/common/mutex.c b/src/common/mutex.c
index 0668dbc41..ea3e0f8ce 100644
--- a/src/common/mutex.c
+++ b/src/common/mutex.c
@@ -1,6 +1,12 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
+#define HERCULES_CORE
+
+#include "mutex.h"
+
+#include "../common/cbasetypes.h" // for WIN32
+
#ifdef WIN32
#include "../common/winapi.h"
#else
@@ -9,11 +15,9 @@
#include <sys/time.h>
#endif
-#include "../common/cbasetypes.h"
#include "../common/malloc.h"
#include "../common/showmsg.h"
#include "../common/timer.h"
-#include "../common/mutex.h"
struct ramutex{
#ifdef WIN32
@@ -46,7 +50,7 @@ struct racond{
//
-ramutex ramutex_create(){
+ramutex *ramutex_create(void) {
struct ramutex *m;
m = (struct ramutex*)aMalloc( sizeof(struct ramutex) );
@@ -65,7 +69,7 @@ ramutex ramutex_create(){
}//end: ramutex_create()
-void ramutex_destroy( ramutex m ){
+void ramutex_destroy(ramutex *m) {
#ifdef WIN32
DeleteCriticalSection(&m->hMutex);
@@ -78,7 +82,7 @@ void ramutex_destroy( ramutex m ){
}//end: ramutex_destroy()
-void ramutex_lock( ramutex m ){
+void ramutex_lock(ramutex *m) {
#ifdef WIN32
EnterCriticalSection(&m->hMutex);
@@ -88,7 +92,7 @@ void ramutex_lock( ramutex m ){
}//end: ramutex_lock
-bool ramutex_trylock( ramutex m ){
+bool ramutex_trylock(ramutex *m) {
#ifdef WIN32
if(TryEnterCriticalSection(&m->hMutex) == TRUE)
return true;
@@ -103,7 +107,7 @@ bool ramutex_trylock( ramutex m ){
}//end: ramutex_trylock()
-void ramutex_unlock( ramutex m ){
+void ramutex_unlock(ramutex *m) {
#ifdef WIN32
LeaveCriticalSection(&m->hMutex);
#else
@@ -116,11 +120,11 @@ void ramutex_unlock( ramutex m ){
///////////////
// Condition Variables
-//
+//
// Implementation:
//
-racond racond_create(){
+racond *racond_create(void) {
struct racond *c;
c = (struct racond*)aMalloc( sizeof(struct racond) );
@@ -142,7 +146,7 @@ racond racond_create(){
}//end: racond_create()
-void racond_destroy( racond c ){
+void racond_destroy(racond *c) {
#ifdef WIN32
CloseHandle( c->events[ EVENT_COND_SIGNAL ] );
CloseHandle( c->events[ EVENT_COND_BROADCAST ] );
@@ -155,7 +159,7 @@ void racond_destroy( racond c ){
}//end: racond_destroy()
-void racond_wait( racond c, ramutex m, sysint timeout_ticks){
+void racond_wait(racond *c, ramutex *m, sysint timeout_ticks) {
#ifdef WIN32
register DWORD ms;
int result;
@@ -213,7 +217,7 @@ void racond_wait( racond c, ramutex m, sysint timeout_ticks){
}//end: racond_wait()
-void racond_signal( racond c ){
+void racond_signal(racond *c) {
#ifdef WIN32
// bool has_waiters = false;
// EnterCriticalSection(&c->waiters_lock);
@@ -229,7 +233,7 @@ void racond_signal( racond c ){
}//end: racond_signal()
-void racond_broadcast( racond c ){
+void racond_broadcast(racond *c) {
#ifdef WIN32
// bool has_waiters = false;
// EnterCriticalSection(&c->waiters_lock);
diff --git a/src/common/mutex.h b/src/common/mutex.h
index eeb24e6ff..d298c05af 100644
--- a/src/common/mutex.h
+++ b/src/common/mutex.h
@@ -1,92 +1,93 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// For more information, see LICENCE in the main folder
-#ifndef _COMMON_MUTEX_H_
-#define _COMMON_MUTEX_H_
+#ifndef COMMON_MUTEX_H
+#define COMMON_MUTEX_H
+#include "../common/cbasetypes.h"
-typedef struct ramutex *ramutex; // Mutex
-typedef struct racond *racond; // Condition Var
+typedef struct ramutex ramutex; // Mutex
+typedef struct racond racond; // Condition Var
/**
- * Creates a Mutex
+ * Creates a Mutex
*
* @return not NULL
*/
-ramutex ramutex_create();
+ramutex *ramutex_create();
-/**
+/**
* Destroys a Mutex
- *
+ *
* @param m - the mutex to destroy
*/
-void ramutex_destroy( ramutex m );
+void ramutex_destroy(ramutex *m);
-/**
+/**
* Gets a lock
*
* @param m - the mutex to lock
*/
-void ramutex_lock( ramutex m);
+void ramutex_lock(ramutex *m);
-/**
+/**
* Trys to get the Lock
- *
+ *
* @param m - the mutex try to lock
- *
+ *
* @return boolean (true = got the lock)
*/
-bool ramutex_trylock( ramutex m );
+bool ramutex_trylock(ramutex *m);
-/**
+/**
* Unlocks a mutex
*
* @param m - the mutex to unlock
*/
-void ramutex_unlock( ramutex m);
+void ramutex_unlock(ramutex *m);
-/**
+/**
* Creates a Condition variable
*
* @return not NULL
*/
-racond racond_create();
+racond *racond_create();
-/**
+/**
* Destroy a Condition variable
*
- * @param c - the condition varaible to destroy
+ * @param c - the condition variable to destroy
*/
-void racond_destroy( racond c );
+void racond_destroy(racond *c);
/**
- * Waits Until state is signalled
- *
- * @param c - the condition var to wait for signalled state
- * @param m - the mutex used for syncronization
+ * Waits Until state is signaled
+ *
+ * @param c - the condition var to wait for signaled state
+ * @param m - the mutex used for synchronization
* @param timeout_ticks - timeout in ticks ( -1 = INFINITE )
*/
-void racond_wait( racond c, ramutex m, sysint timeout_ticks);
+void racond_wait(racond *c, ramutex *m, sysint timeout_ticks);
-/**
- * Sets the given condition var to signalled state
+/**
+ * Sets the given condition var to signaled state
*
- * @param c - condition var to set in signalled state.
+ * @param c - condition var to set in signaled state.
*
* @note:
* Only one waiter gets notified.
*/
-void racond_signal( racond c );
+void racond_signal(racond *c);
-/**
- * Sets notifys all waiting threads thats signalled.
- * @param c - condition var to set in signalled state
- *
+/**
+ * Sets notifies all waiting threads thats signaled.
+ * @param c - condition var to set in signaled state
+ *
* @note:
* All Waiters getting notified.
- */
-void racond_broadcast( racond c );
+ */
+void racond_broadcast(racond *c);
-#endif /* _COMMON_MUTEX_H_ */
+#endif /* COMMON_MUTEX_H */
diff --git a/src/common/netbuffer.c b/src/common/netbuffer.c
deleted file mode 100644
index 60a299aa9..000000000
--- a/src/common/netbuffer.c
+++ /dev/null
@@ -1,221 +0,0 @@
-
-//
-// Network Buffer Subsystem (iobuffer)
-//
-//
-// Author: Florian Wilkemeyer <fw@f-ws.de>
-//
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-//
-//
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "../common/cbasetypes.h"
-#include "../common/atomic.h"
-#include "../common/mempool.h"
-#include "../common/showmsg.h"
-#include "../common/raconf.h"
-#include "../common/thread.h"
-#include "../common/malloc.h"
-#include "../common/core.h"
-
-#include "../common/netbuffer.h"
-
-
-//
-// Buffers are available in the following sizes:
-// 48, 192, 2048, 8192
-// 65536 (inter server connects may use it for charstatus struct..)
-//
-
-
-///
-// Implementation:
-//
-static volatile int32 l_nEmergencyAllocations = 0; // stats.
-static sysint l_nPools = 0;
-static sysint *l_poolElemSize = NULL;
-static mempool *l_pool = NULL;
-
-
-void netbuffer_init(){
- char localsection[32];
- raconf conf;
- sysint i;
-
- // Initialize Statistic counters:
- l_nEmergencyAllocations = 0;
-
- // Set localsection name according to running serverype.
- switch(SERVER_TYPE){
- case SERVER_TYPE_LOGIN: strcpy(localsection, "login-netbuffer"); break;
- case SERVER_TYPE_CHAR: strcpy(localsection, "char-netbuffer"); break;
- //case ATHENA_SERVER_INTER: strcpy(localsection, "inter-netbuffer"); break;
- case SERVER_TYPE_MAP: strcpy(localsection, "map-netbuffer"); break;
- default: strcpy(localsection, "unsupported_type"); break;
- }
-
-
- conf = raconf_parse("conf/network.conf");
- if(conf == NULL){
- ShowFatalError("Failed to Parse required Configuration (conf/network.conf)");
- exit(EXIT_FAILURE);
- }
-
- // Get Values from config file
- l_nPools = (sysint)raconf_getintEx(conf, localsection, "netbuffer", "num", 0);
- if(l_nPools == 0){
- ShowFatalError("Netbuffer (network.conf) failure - requires at least 1 Pool.\n");
- exit(EXIT_FAILURE);
- }
-
- // Allocate arrays.
- l_poolElemSize = (sysint*)aCalloc( l_nPools, sizeof(sysint) );
- l_pool = (mempool*)aCalloc( l_nPools, sizeof(mempool) );
-
-
- for(i = 0; i < l_nPools; i++){
- int64 num_prealloc, num_realloc;
- char key[32];
-
- sprintf(key, "pool_%u_size", (uint32)i+1);
- l_poolElemSize[i] = (sysint)raconf_getintEx(conf, localsection, "netbuffer", key, 4096);
- if(l_poolElemSize[i] < 32){
- ShowWarning("Netbuffer (network.conf) failure - minimum allowed buffer size is 32 byte) - fixed.\n");
- l_poolElemSize[i] = 32;
- }
-
- sprintf(key, "pool_%u_prealloc", (uint32)i+1);
- num_prealloc = raconf_getintEx(conf, localsection, "netbuffer", key, 150);
-
- sprintf(key, "pool_%u_realloc_step", (uint32)i+1);
- num_realloc = raconf_getintEx(conf, localsection, "netbuffer", key, 100);
-
- // Create Pool!
- sprintf(key, "Netbuffer %u", (uint32)l_poolElemSize[i]); // name.
-
- // Info
- ShowInfo("NetBuffer: Creating Pool %u (Prealloc: %u, Realloc Step: %u) - %0.2f MiB\n", l_poolElemSize[i], num_prealloc, num_realloc, (float)((sizeof(struct netbuf) + l_poolElemSize[i] - 32)* num_prealloc)/1024.0f/1024.0f);
-
- //
- // Size Calculation:
- // struct netbuf + requested buffer size - 32 (because the struct already contains 32 byte buffer space at the end of struct)
- l_pool[i] = mempool_create(key, (sizeof(struct netbuf) + l_poolElemSize[i] - 32), num_prealloc, num_realloc, NULL, NULL);
- if(l_pool[i] == NULL){
- ShowFatalError("Netbuffer: cannot create Pool for %u byte buffers.\n", l_poolElemSize[i]);
- // @leak: clean everything :D
- exit(EXIT_FAILURE);
- }
-
- }//
-
-
- raconf_destroy(conf);
-
-}//end: netbuffer_init()
-
-
-void netbuffer_final(){
- sysint i;
-
- if(l_nPools > 0){
- /// .. finalize mempools
- for(i = 0; i < l_nPools; i++){
- mempool_stats stats = mempool_get_stats(l_pool[i]);
-
- ShowInfo("Netbuffer: Freeing Pool %u (Peak Usage: %u, Realloc Events: %u)\n", l_poolElemSize[i], stats.peak_nodes_used, stats.num_realloc_events);
-
- mempool_destroy(l_pool[i]);
- }
-
- if(l_nEmergencyAllocations > 0){
- ShowWarning("Netbuffer: did %u Emergency Allocations, please tune your network.conf!\n", l_nEmergencyAllocations);
- l_nEmergencyAllocations = 0;
- }
-
- aFree(l_poolElemSize); l_poolElemSize = NULL;
- aFree(l_pool); l_pool = NULL;
- l_nPools = 0;
- }
-
-
-}//end: netbuffer_final()
-
-
-netbuf netbuffer_get( sysint sz ){
- sysint i;
- netbuf nb = NULL;
-
- // Search an appropriate pool
- for(i = 0; i < l_nPools; i++){
- if(sz <= l_poolElemSize[i]){
- // match
-
- nb = (netbuf)mempool_node_get(l_pool[i]);
- nb->pool = i;
-
- break;
- }
- }
-
- // No Bufferpool found that mets there quirements?.. (thats bad..)
- if(nb == NULL){
- ShowWarning("Netbuffer: get(%u): => no appropriate pool found - emergency allocation required.\n", sz);
- ShowWarning("Please reconfigure your network.conf!");
-
- InterlockedIncrement(&l_nEmergencyAllocations);
-
- // .. better to check (netbuf struct provides 32 byte bufferspace itself.
- if(sz < 32) sz = 32;
-
- // allocate memory using malloc ..
- while(1){
- nb = (netbuf) aMalloc( (sizeof(struct netbuf) + sz - 32) );
- if(nb != NULL){
- memset(nb, 0x00, (sizeof(struct netbuf) + sz - 32) ); // zero memory! (to enforce commit @ os.)
- nb->pool = -1; // emergency alloc.
- break;
- }
-
- rathread_yield();
- }// spin allocation.
-
- }
-
-
- nb->refcnt = 1; // Initial refcount is 1
-
- return nb;
-}//end: netbuffer_get()
-
-
-void netbuffer_put( netbuf nb ){
-
- // Decrement reference counter, if > 0 do nothing :)
- if( InterlockedDecrement(&nb->refcnt) > 0 )
- return;
-
- // Is this buffer an emergency allocated buffer?
- if(nb->pool == -1){
- aFree(nb);
- return;
- }
-
-
- // Otherwise its a normal mempool based buffer
- // return it to the according mempool:
- mempool_node_put( l_pool[nb->pool], nb);
-
-
-}//end: netbuffer_put()
-
-
-void netbuffer_incref( netbuf nb ){
-
- InterlockedIncrement(&nb->refcnt);
-
-}//end: netbuf_incref()
diff --git a/src/common/netbuffer.h b/src/common/netbuffer.h
deleted file mode 100644
index 6ddecfdd9..000000000
--- a/src/common/netbuffer.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
-#ifndef _rA_NETBUFFER_H_
-#define _rA_NETBUFFER_H_
-
-#include "../common/cbasetypes.h"
-
-typedef struct netbuf{
- sysint pool; // The pool ID this buffer belongs to,
- // is set to -1 if its an emergency allocated buffer
-
- struct netbuf *next; // Used by Network system.
-
- volatile int32 refcnt; // Internal Refcount, it gets lowered every call to netbuffer_put,
- // if its getting zero, the buffer will returned back to the pool
- // and can be reused.
-
- int32 dataPos; // Current Offset
- // Used only for Reading (recv job)
- // write cases are using the sessions local datapos member due to
- // shared write buffer support.
-
- int32 dataLen; // read buffer case:
- // The length expected to read to.
- // when this->dataPos == dateLen, read job has been completed.
- // write buffer case:
- // The lngth of data in te buffer
- // when s->dataPos == dataLen, write job has been completed
- //
- // Note:
- // leftBytes = (dateLen - dataPos)
- //
- // Due to shared buffer support
- // dataPos gets not used in write case (each connection has its local offset)
- //
-
- // The Bufferspace itself.
- char buf[32];
-} *netbuf;
-
-
-void netbuffer_init();
-void netbuffer_final();
-
-/**
- * Gets a netbuffer that has atleast (sz) byes space.
- *
- * @note: The netbuffer system guarantees that youll always recevie a buffer.
- * no check for null is required!
- *
- * @param sz - minimum size needed.
- *
- * @return pointer to netbuf struct
- */
-netbuf netbuffer_get( sysint sz );
-
-
-/**
- * Returns the given netbuffer (decreases refcount, if its 0 - the buffer will get returned to the pool)
- *
- * @param buf - the buffer to return
- */
-void netbuffer_put( netbuf buf );
-
-
-/**
- * Increases the Refcount on the given buffer
- * (used for areasends .. etc)
- *
- */
-void netbuffer_incref( netbuf buf );
-
-
-// Some Useful macros
-#define NBUFP(netbuf,pos) (((uint8*)((netbuf)->buf)) + (pos))
-#define NBUFB(netbuf,pos) (*(uint8*)(((netbuf)->buf) + (pos)))
-#define NBUFW(netbuf,pos) (*(uint16*)(((netbuf)->buf) + (pos)))
-#define NBUFL(netbuf,pos) (*(uint32*)(((netbuf)->buf) + (pos)))
-
-#endif
diff --git a/src/common/network.c b/src/common/network.c
deleted file mode 100644
index a40cbd602..000000000
--- a/src/common/network.c
+++ /dev/null
@@ -1,1061 +0,0 @@
-//
-// Network Subsystem (previously known as socket system)
-//
-// Author: Florian Wilkemeyer <fw@f-ws.de>
-//
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-//
-//
-//#ifdef HAVE_ACCETP4
-#define _GNU_SOURCE
-//#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-
-
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
-#include "../common/timer.h"
-#include "../common/evdp.h"
-#include "../common/netbuffer.h"
-
-#include "../common/network.h"
-
-#define ENABLE_IPV6
-#define HAVE_ACCEPT4
-#define EVENTS_PER_CYCLE 10
-#define PARANOID_CHECKS
-
-// Local Vars (settings..)
-static int l_ListenBacklog = 64;
-
-//
-// Global Session Array (previously exported as session[]
-//
-SESSION g_Session[MAXCONN];
-
-
-//
-static bool onSend(int32 fd);
-
-
-#define _network_free_netbuf_async( buf ) add_timer( 0, _network_async_free_netbuf_proc, 0, (intptr_t)(buf))
-static int _network_async_free_netbuf_proc(int tid, unsigned int tick, int id, intptr_t data){
- // netbuf is in data
- netbuffer_put( (netbuf)data );
-
- return 0;
-}//end: _network_async_free_netbuf_proc()
-
-
-
-void network_init(){
- SESSION *s;
- int32 i;
-
- memset(g_Session, 0x00, (sizeof(SESSION) * MAXCONN) );
-
- for(i = 0; i < MAXCONN; i++){
- s = &g_Session[i];
-
- s->type = NST_FREE;
- s->disconnect_in_progress = false;
-
- }
-
- // Initialize the correspondig event dispatcher
- evdp_init();
-
- //
- add_timer_func_list(_network_async_free_netbuf_proc, "_network_async_free_netbuf_proc");
-
-}//end: network_init()
-
-
-void network_final(){
-
- // @TODO:
- // .. disconnect and cleanup everything!
-
- evdp_final();
-
-}//end: network_final()
-
-
-void network_do(){
- struct EVDP_EVENT l_events[EVENTS_PER_CYCLE];
- register struct EVDP_EVENT *ev;
- register int n, nfds;
- register SESSION *s;
-
- nfds = evdp_wait( l_events, EVENTS_PER_CYCLE, 1000); // @TODO: timer_getnext()
-
- for(n = 0; n < nfds; n++){
- ev = &l_events[n];
- s = &g_Session[ ev->fd ];
-
- if(ev->events & EVDP_EVENT_HUP){
- network_disconnect( ev->fd );
- continue; // no further event processing.
- }// endif vent is HUP (disconnect)
-
-
- if(ev->events & EVDP_EVENT_IN){
-
- if(s->onRecv != NULL){
- if( false == s->onRecv(ev->fd) ){
- network_disconnect(ev->fd);
- continue; // ..
- }
- }else{
- ShowError("network_do: fd #%u has no onRecv proc set. - disconnecting\n", ev->fd);
- network_disconnect(ev->fd);
- continue;
- }
-
- }// endif event is IN (recv)
-
-
- if(ev->events & EVDP_EVENT_OUT){
- if(s->onSend != NULL){
- if( false == s->onSend(ev->fd) ){
- network_disconnect(ev->fd);
- continue;
- }
- }else{
- ShowError("network_do: fd #%u has no onSend proc set. - disconnecting\n", ev->fd);
- network_disconnect(ev->fd);
- continue;
- }
- }// endif event is OUT (send)
-
- }//endfor
-
-}//end: network_do()
-
-
-static bool _setnonblock(int32 fd){
- int flags = fcntl(fd, F_GETFL, 0);
- if(fcntl(fd, F_SETFL, flags | O_NONBLOCK) != 0)
- return false;
-
- return true;
-}//end: _setnonblock()
-
-
-static bool _network_accept(int32 fd){
- SESSION *listener = &g_Session[fd];
- SESSION *s;
- union{
- struct sockaddr_in v4;
-#ifdef ENABLE_IPV6
- struct sockaddr_in6 v6;
-#endif
- } _addr;
- int newfd;
- socklen_t addrlen;
- struct sockaddr *addr;
-
- // Accept until OS returns - nothing to accept anymore
- // - this is required due to our EVDP abstraction. (which handles on listening sockets similar to epoll's EPOLLET flag.)
- while(1){
-#ifdef ENABLE_IPV6
- if(listener->v6 == true){
- addrlen = sizeof(_addr.v6);
- addr = (struct sockaddr*)&_addr.v6;
- }else{
-#endif
- addrlen = sizeof(_addr.v4);
- addr = (struct sockaddr*)&_addr.v4;
-#ifdef ENABLE_IPV6
- }
-#endif
-
-#ifdef HAVE_ACCEPT4
- newfd = accept4(fd, addr, &addrlen, SOCK_NONBLOCK);
-#else
- newfd = accept(fd, addr, &addrlen);
-#endif
-
- if(newfd == -1){
- if(errno == EAGAIN || errno == EWOULDBLOCK)
- break; // this is fully valid & whished., se explaination on top of while(1)
-
- // Otherwis .. we have serious problems :( seems tahat our listner has gone away..
- // @TODO handle this ..
- ShowError("_network_accept: accept() returned error. closing listener. (errno: %u / %s)\n", errno, strerror(errno));
-
- return false; // will call disconnect after return.
- //break;
- }
-
-#ifndef HAVE_ACCEPT4 // no accept4 means, we have to set nonblock by ourself. ..
- if(_setnonblock(newfd) == false){
- ShowError("_network_accept: failed to set newly accepted connection nonblocking (errno: %u / %s). - disconnecting.\n", errno, strerror(errno));
- close(newfd);
- continue;
- }
-#endif
-
- // Check connection limits.
- if(newfd >= MAXCONN){
- ShowError("_network_accept: failed to accept connection - MAXCONN (%u) exceeded.\n", MAXCONN);
- close(newfd);
- continue; // we have to loop over the events (and disconnect them too ..) but otherwise we would leak event notifications.
- }
-
-
- // Create new Session.
- s = &g_Session[newfd];
- s->type = NST_CLIENT;
-
- // The new connection inherits listenr's handlers.
- s->onDisconnect = listener->onDisconnect;
- s->onConnect = listener->onConnect; // maybe useless but .. fear the future .. :~
-
- // Register the new connection @ EVDP
- if( evdp_addclient(newfd, &s->evdp_data) == false){
- ShowError("_network_accept: failed to accept connection - event subsystem returned an error.\n");
- close(newfd);
- s->type = NST_FREE;
- }
-
- // Call the onConnect handler on the listener.
- if( listener->onConnect(newfd) == false ){
- // Resfused by onConnect handler..
- evdp_remove(newfd, &s->evdp_data);
-
- close(newfd);
- s->type = NST_FREE;
-
- s->data = NULL; // be on the safe side ~ !
- continue;
- }
-
-
- }
-
- return true;
-}//end: _network_accept()
-
-
-void network_disconnect(int32 fd){
- SESSION *s = &g_Session[fd];
- netbuf b, bn;
-
- // Prevent recursive calls
- // by wrong implemented on disconnect handlers.. and such..
- if(s->disconnect_in_progress == true)
- return;
-
- s->disconnect_in_progress = true;
-
-
- // Disconnect Todo:
- // - Call onDisconnect Handler
- // - Release all Assigned buffers.
- // - remove from event system (notifications)
- // - cleanup session structure
- // - close connection.
- //
-
- if(s->onDisconnect != NULL &&
- s->type != NST_LISTENER){
-
- s->onDisconnect( fd );
- }
-
- // Read Buffer
- if(s->read.buf != NULL){
- netbuffer_put(s->read.buf);
- s->read.buf = NULL;
- }
-
- // Write Buffer(s)
- b = s->write.buf;
- while(1){
- if(b == NULL) break;
-
- bn = b->next;
-
- netbuffer_put(b);
-
- b = bn;
- }
- s->write.buf = NULL;
- s->write.buf_last = NULL;
-
- s->write.n_outstanding = 0;
- s->write.max_outstanding = 0;
-
-
- // Remove from event system.
- evdp_remove(fd, &s->evdp_data);
-
- // Cleanup Session Structure.
- s->type = NST_FREE;
- s->data = NULL; // no application level data assigned
- s->disconnect_in_progress = false;
-
-
- // Close connection
- close(fd);
-
-}//end: network_disconnect()
-
-
-int32 network_addlistener(bool v6, const char *addr, uint16 port){
- SESSION *s;
- int optval, fd;
-
-#if !defined(ENABLE_IPV6)
- if(v6 == true){
- ShowError("network_addlistener(%c, '%s', %u): this release has no IPV6 support.\n", (v6==true?'t':'f'), addr, port);
- return -1;
- }
-#endif
-
-
-#ifdef ENABLE_IPV6
- if(v6 == true)
- fd = socket(AF_INET6, SOCK_STREAM, 0);
- else
-#endif
- fd = socket(AF_INET, SOCK_STREAM, 0);
-
- // Error?
- if(fd == -1){
- ShowError("network_addlistener(%c, '%s', %u): socket() failed (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- return -1;
- }
-
- // Too many connections?
- if(fd >= MAXCONN){
- ShowError("network_addlistener(%c, '%s', %u): cannot create listener, exceeds more than supported connections (%u).\n", (v6==true?'t':'f'), addr, port, MAXCONN);
- close(fd);
- return -1;
- }
-
-
- s = &g_Session[fd];
- if(s->type != NST_FREE){ // additional checks.. :)
- ShowError("network_addlistener(%c, '%s', %u): failed, got fd #%u which is already in use in local session table?!\n", (v6==true?'t':'f'), addr, port, fd);
- close(fd);
- return -1;
- }
-
-
- // Fill ip addr structs
-#ifdef ENABLE_IPV6
- if(v6 == true){
- memset(&s->addr.v6, 0x00, sizeof(s->addr.v6));
- s->addr.v6.sin6_family = AF_INET6;
- s->addr.v6.sin6_port = htons(port);
- if(inet_pton(AF_INET6, addr, &s->addr.v6.sin6_addr) != 1){
- ShowError("network_addlistener(%c, '%s', %u): failed to parse the given IPV6 address.\n", (v6==true?'t':'f'), addr, port);
- close(fd);
- return -1;
- }
-
- }else{
-#endif
- memset(&s->addr.v4, 0x00, sizeof(s->addr.v4));
- s->addr.v4.sin_family = AF_INET;
- s->addr.v4.sin_port = htons(port);
- s->addr.v4.sin_addr.s_addr = inet_addr(addr);
-#ifdef ENABLE_IPV6
- }
-#endif
-
-
- // if OS has support for SO_REUSEADDR, apply the flag
- // so the address could be used when there're still time_wait sockets outstanding from previous application run.
-#ifdef SO_REUSEADDR
- optval=1;
- setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval));
-#endif
-
- // Bind
-#ifdef ENABLE_IPV6
- if(v6 == true){
- if( bind(fd, (struct sockaddr*)&s->addr.v6, sizeof(s->addr.v6)) == -1) {
- ShowError("network_addlistener(%c, '%s', %u): bind failed (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- close(fd);
- return -1;
- }
- }else{
-#endif
- if( bind(fd, (struct sockaddr*)&s->addr.v4, sizeof(s->addr.v4)) == -1) {
- ShowError("network_addlistener(%c, '%s', %u): bind failed (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- close(fd);
- return -1;
- }
-#ifdef ENABLE_IPV6
- }
-#endif
-
- if( listen(fd, l_ListenBacklog) == -1){
- ShowError("network_addlistener(%c, '%s', %u): listen failed (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- close(fd);
- return -1;
- }
-
-
- // Set to nonblock!
- if(_setnonblock(fd) == false){
- ShowError("network_addlistener(%c, '%s', %u): cannot set to nonblock (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- close(fd);
- return -1;
- }
-
-
- // Rgister @ evdp.
- if( evdp_addlistener(fd, &s->evdp_data) != true){
- ShowError("network_addlistener(%c, '%s', %u): eventdispatcher subsystem returned an error.\n", (v6==true?'t':'f'), addr, port);
- close(fd);
- return -1;
- }
-
-
- // Apply flags on Session array for this conneciton.
- if(v6 == true) s->v6 = true;
- else s->v6 = false;
-
- s->type = NST_LISTENER;
- s->onRecv = _network_accept;
-
- ShowStatus("Added Listener on '%s':%u\n", addr, port, (v6==true ? "(ipv6)":"(ipv4)") );
-
- return fd;
-}//end: network_addlistener()
-
-
-static bool _network_connect_establishedHandler(int32 fd){
- register SESSION *s = &g_Session[fd];
- int val;
- socklen_t val_len;
-
- if(s->type == NST_FREE)
- return true; // due to multiple non coalesced event notifications
- // this can happen .. when a previous handled event has already disconnected the connection
- // within the same cycle..
-
- val = -1;
- val_len = sizeof(val);
- getsockopt(fd, SOL_SOCKET, SO_ERROR, &val, &val_len);
-
- if(val != 0){
- // :( .. cleanup session..
- s->type = NST_FREE;
- s->onSend = NULL;
- s->onConnect = NULL;
- s->onDisconnect = NULL;
-
- evdp_remove(fd, &s->evdp_data);
- close(fd);
-
- return true; // we CANT return false,
- // becuase the normal disconnect procedure would execute the ondisconnect handler, which we dont want .. in this case.
- }else{
- // ok
- if(s->onConnect(fd) == false) {
- // onConnect handler has refused the connection ..
- // cleanup .. and ok
- s->type = NST_FREE;
- s->onSend = NULL;
- s->onConnect = NULL;
- s->onDisconnect = NULL;
-
- evdp_remove(fd, &s->evdp_data);
- close(fd);
-
- return true; // we dnot want the ondisconnect handler to be executed, so its okay to handle this by ourself.
- }
-
- // connection established !
- //
- if( evdp_outgoingconnection_established(fd, &s->evdp_data) == false ){
- return false; // we want the normal disconnect procedure.. with call to ondisconnect handler.
- }
-
- s->onSend = NULL;
-
- ShowStatus("#%u connection successfull!\n", fd);
- }
-
- return true;
-}//end: _network_connect_establishedHandler()
-
-
-int32 network_connect(bool v6,
- const char *addr,
- uint16 port,
- const char *from_addr,
- uint16 from_port,
- bool (*onConnectionEstablishedHandler)(int32 fd),
- void (*onConnectionLooseHandler)(int32 fd)
-){
- register SESSION *s;
- int32 fd, optval, ret;
- struct sockaddr_in ip4;
-#ifdef ENABLE_IPV6
- struct sockaddr_in6 ip6;
-#endif
-
-#ifdef ENABLE_IPV6
- if(v6 == true)
- fd = socket(AF_INET6, SOCK_STREAM, 0);
- else
-#endif
- fd = socket(AF_INET, SOCK_STREAM, 0);
-
-#ifndef ENABLE_IPV6
- // check..
- if(v6 == true){
- ShowError("network_connect(%c, '%s', %u...): tried to create an ipv6 connection, IPV6 is not supported in this release.\n", (v6==true?'t':'f'), addr, port);
- return -1;
- }
-#endif
-
- // check connection limits.
- if(fd >= MAXCONN){
- ShowError("network_connect(%c, '%s', %u...): cannot create new connection, exceeeds more than supported connections (%u)\n", (v6==true?'t':'f'), addr, port );
- close(fd);
- return -1;
- }
-
-
- // Originating IP/Port pair given ?
- if(from_addr != NULL && *from_addr != 0){
- //..
- #ifdef SO_REUSEADDR
- optval=1;
- setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval));
- #endif
-
- #ifdef ENABLE_IPV6
- if(v6 == true){
- memset(&ip6, 0x00, sizeof(ip6));
- ip6.sin6_family = AF_INET6;
- ip6.sin6_port = htons(from_port);
-
- if(inet_pton(AF_INET6, from_addr, &ip6.sin6_addr) != 1){
- ShowError("network_connect(%c, '%s', %u...): cannot parse originating (from) IPV6 address (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- close(fd);
- return -1;
- }
-
- ret = bind(fd, (struct sockaddr*)&ip6, sizeof(ip6));
- }else{
- #endif
- memset(&ip4, 0x00, sizeof(ip4));
-
- ip4.sin_family = AF_INET;
- ip4.sin_port = htons(from_port);
- ip4.sin_addr.s_addr = inet_addr(from_addr);
- ret = bind(fd, (struct sockaddr*)&ip4, sizeof(ip4));
- #ifdef ENABLE_IPV6
- }
- #endif
-
- }
-
-
- // Set non block
- if(_setnonblock(fd) == false){
- ShowError("network_connect(%c, '%s', %u...): cannot set socket to nonblocking (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- close(fd);
- return -1;
- }
-
-
- // Create ip addr block to connect to ..
-#ifdef ENABLE_IPV6
- if(v6 == true){
- memset(&ip6, 0x00, sizeof(ip6));
- ip6.sin6_family = AF_INET6;
- ip6.sin6_port = htons(port);
-
- if(inet_pton(AF_INET6, addr, &ip6.sin6_addr) != 1){
- ShowError("network_connect(%c, '%s', %u...): cannot parse destination IPV6 address (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
- close(fd);
- return -1;
- }
-
- }else{
-#endif
- memset(&ip4, 0x00, sizeof(ip4));
-
- ip4.sin_family = AF_INET;
- ip4.sin_port = htons(port);
- ip4.sin_addr.s_addr = inet_addr(addr);
-#ifdef ENABLE_IPV6
- }
-#endif
-
-
- // Assign Session..
- s = &g_Session[fd];
- s->type = NST_OUTGOING;
- s->v6 = v6;
- s->onConnect = onConnectionEstablishedHandler;
- s->onDisconnect = onConnectionLooseHandler;
- s->onRecv = NULL;
- s->onSend = _network_connect_establishedHandler;
-#ifdef ENABLE_IPV6
- if(v6 == true)
- memcpy(&s->addr.v6, &ip6, sizeof(ip6));
- else
-#endif
- memcpy(&s->addr.v4, &ip4, sizeof(ip4));
-
- // Register @ EVDP. as outgoing (see doc of the function)
- if(evdp_addconnecting(fd, &s->evdp_data) == false){
- ShowError("network_connect(%c, '%s', %u...): eventdispatcher subsystem returned an error.\n", (v6==true?'t':'f'), addr, port);
-
- // cleanup session x.x..
- s->type = NST_FREE;
- s->onConnect = NULL;
- s->onDisconnect = NULL;
- s->onSend = NULL;
-
- // close, return error code.
- close(fd);
- return -1;
- }
-
-
-#ifdef ENABLE_IPV6
- if(v6 == true)
- ret = connect(fd, (struct sockaddr*)&ip6, sizeof(ip6));
- else
-#endif
- ret = connect(fd, (struct sockaddr*)&ip4, sizeof(ip4));
-
-
- //
- if(ret != 0 && errno != EINPROGRESS){
- ShowWarning("network_connect(%c, '%s', %u...): connection failed (errno: %u / %s)\n", (v6==true?'t':'f'), addr, port, errno, strerror(errno));
-
- // Cleanup session ..
- s->type = NST_FREE;
- s->onConnect = NULL;
- s->onDisconnect = NULL;
- s->onSend = NULL;
-
- // .. remove from evdp and close fd.
- evdp_remove(fd, &s->evdp_data);
- close(fd);
- return -1;
- }
-
-
- // ! The Info Message :~D
- ShowStatus("network_connect fd#%u (%s:%u) in progress.. \n", fd, addr, port);
-
-return fd;
-}//end: network_connect()
-
-
-static bool _onSend(int32 fd){
- register SESSION *s = &g_Session[fd];
- register netbuf buf, buf_next;
- register uint32 szNeeded;
- register int wLen;
-
- if(s->type == NST_FREE)
- return true; // Possible due to multipl non coalsced event notifications
- // so onSend gets called after disconnect caused by an previous vent.
- // we can ignore the call to onSend, then.
-
- buf = s->write.buf;
- while(1){
- if(buf == NULL)
- break;
-
- buf_next = buf->next;
-
-
- szNeeded = (buf->dataLen - s->write.dataPos); // using th session-local .dataPos member, due to shared write buffer support.
-
- // try to write.
- wLen = write(fd, &buf->buf[s->write.dataPos], szNeeded);
- if(wLen == 0){
- return false; // eof.
- }else if(wLen == -1){
- if(errno == EAGAIN || errno == EWOULDBLOCK)
- return true; // dont disconnect / try again later.
-
- // all other errors. .
- return false;
- }
-
- // Wrote data.. =>
- szNeeded -= wLen;
- if(szNeeded > 0){
- // still data left ..
- //
- s->write.dataPos += wLen; // fix offset.
- return true;
- }else{
- // this buffer has been written successfully
- // could be returned to pool.
- netbuffer_put(buf);
- s->write.n_outstanding--; // When threadsafe -> Interlocked here.
- s->write.dataPos = 0;
- }
-
-
- buf = buf_next;
- }
-
- // okay,
- // reaching this part means:
- // while interrupted by break -
- // which means all buffers are written, nothing left
- //
-
- s->write.buf_last = NULL;
- s->write.buf = NULL;
- s->write.n_outstanding = 0;
- s->write.dataPos = 0;
-
- // Remove from event dispatcher (write notification)
- //
- evdp_writable_remove(fd, &s->evdp_data);
-
- return true;
-}//end: _onSend()
-
-
-static bool _onRORecv(int32 fd){
- register SESSION *s = &g_Session[fd];
- register uint32 szNeeded;
- register char *p;
- register int rLen;
-
- if(s->type == NST_FREE)
- return true; // Possible due to multiple non coalesced events by evdp.
- // simply ignore this call returning positive result.
-
- // Initialize p and szNeeded depending on change
- //
- switch(s->read.state){
- case NRS_WAITOP:
- szNeeded = s->read.head_left;
- p = ((char*)&s->read.head[0]) + (2-szNeeded);
- break;
-
- case NRS_WAITLEN:
- szNeeded = s->read.head_left;
- p = ((char*)&s->read.head[1]) + (2-szNeeded);
- break;
-
- case NRS_WAITDATA:{
- register netbuf buf = s->read.buf;
-
- szNeeded = (buf->dataLen - buf->dataPos);
- p = (char*)&buf->buf[ buf->dataPos ];
- }
- break;
-
- default:
- // .. the impossible gets possible ..
- ShowError("_onRORecv: fd #%u has unknown read.state (%d) - disconnecting\n", fd, s->read.state);
- return false;
- break;
- }
-
-
- //
-
- rLen = read(fd, p, szNeeded);
- if(rLen == 0){
- // eof..
- return false;
- }else if(rLen == -1){
-
- if(errno == EAGAIN || errno == EWOULDBLOCK){
- // try again later .. (this case shouldnt happen, because we're event trigered.. but .. sometimes it happens :)
- return true;
- }
-
- // an additional interesting case would be
- // EINTR, this 'could' be handled .. but:
- // posix says that its possible that data gets currupted during irq
- // or data gor read and not reported.., so we'd have a data loss..
- // (which shouldnt happen with stream based protocols such as tcp)
- // its better to disonnect the client in that case.
-
- return false;
- }
-
- //
- // Got Data:
- // next action also depends on current state ..
- //
- szNeeded -= rLen;
- switch(s->read.state){
- case NRS_WAITOP:
-
- if(szNeeded > 0){
- // still data missing ..
- s->read.head_left = szNeeded;
- return true; // wait for completion.
- }else{
- // complete ..
- // next state depends on packet type.
-
- s->read.head[1] = ((uint16*)s->netparser_data)[ s->read.head[0] ]; // store lenght of packet by opcode head[0] to head[1]
-
- if(s->read.head[1] == ROPACKET_UNKNOWN){
- // unknown packet - disconnect
- ShowWarning("_onRORecv: fd #%u got unlnown packet 0x%04x - disconnecting.\n", fd, s->read.head[0]);
- return false;
- }
- else if(s->read.head[1] == ROPACKET_DYNLEN){
- // dynamic length
- // next state: requrie len.
- s->read.state = NRS_WAITLEN;
- s->read.head_left = 2;
- return true; //
- }
- else if(s->read.head[1] == 2){
- // packet has no data (only opcode)
- register netbuf buf = netbuffer_get(2); // :D whoohoo its giant!
-
- NBUFW(buf, 0) = s->read.head[0]; // store opcode @ packet begin.
- buf->dataPos = 2;
- buf->dataLen = 2;
- buf->next = NULL;
-
- // Back to initial state -> Need opcode.
- s->read.state = NRS_WAITOP;
- s->read.head_left = 2;
- s->read.buf = NULL;
-
- // Call completion routine here.
- s->onPacketComplete(fd, s->read.head[0], 2, buf);
-
- return true; // done :)
- }
- else{
- // paket needs .. data ..
- register netbuf buf = netbuffer_get( s->read.head[1] );
-
- NBUFW(buf, 0) = s->read.head[0]; // store opcode @ packet begin.
- buf->dataPos = 2;
- buf->dataLen = s->read.head[1];
- buf->next = NULL;
-
- // attach buffer.
- s->read.buf = buf;
-
- // set state:
- s->read.state = NRS_WAITDATA;
-
- return true;
- }
-
- }//endif: szNeeded > 0 (opcode read completed?)
-
- break;
-
-
- case NRS_WAITLEN:
-
- if(szNeeded > 0){
- // incomplete ..
- s->read.head_left = szNeeded;
- return true;
- }else{
-
- if(s->read.head[1] == 4){
- // packet has no data (only opcode + length)
- register netbuf buf = netbuffer_get( 4 );
-
- NBUFL(buf, 0) = *((uint32*)&s->read.head[0]); // copy Opcode + length to netbuffer using MOVL
- buf->dataPos = 4;
- buf->dataLen = 4;
- buf->next = NULL;
-
- // set initial state (need opcode)
- s->read.state = NRS_WAITOP;
- s->read.head_left = 2;
- s->read.buf = NULL;
-
- // call completion routine.
- s->onPacketComplete(fd, s->read.head[0], 4, buf);
-
- return true;
- }
- else if(s->read.head[1] < 4){
- // invalid header.
- ShowWarning("_onRORecv: fd #%u invalid header - got packet 0x%04x, reported length < 4 - INVALID - disconnecting\n", fd, s->read.head[0]);
- return false;
- }
- else{
- // Data needed
- // next state -> waitdata!
- register netbuf buf = netbuffer_get( s->read.head[1] );
-
- NBUFL(buf, 0) = *((uint32*)&s->read.head[0]); // copy Opcode + length to netbuffer using MOVL
- buf->dataPos = 4;
- buf->dataLen = s->read.head[1];
- buf->next = NULL;
-
- // attach to session:
- s->read.buf = buf;
- s->read.state = NRS_WAITDATA;
-
- return true;
- }
-
- }//endif: szNeeded > 0 (length read complete?)
-
- break;
-
-
- case NRS_WAITDATA:
-
- if(szNeeded == 0){
- // Packet finished!
- // compltion.
- register netbuf buf = s->read.buf;
-
- // set initial state.
- s->read.state = NRS_WAITOP;
- s->read.head_left = 2;
- s->read.buf = NULL;
-
- // Call completion routine.
- s->onPacketComplete(fd, NBUFW(buf, 0), buf->dataLen, buf);
-
- return true;
- }else{
- // still data needed
- s->read.buf->dataPos += rLen;
-
- return true;
- }
- break;
-
-
- //
- default:
- ShowError("_onRORecv: fd #%u has unknown read.state (%d) [2] - disconnecting\n", fd, s->read.state);
- return false;
- break;
- }
-
-
- return false;
-}//end: _onRORecv()
-
-
-void network_send(int32 fd, netbuf buf){
- register SESSION *s = &g_Session[fd];
-
-#ifdef PARANOID_CHECKS
- if(fd >= MAXCONN){
- ShowError("network_send: tried to attach buffer to connection idientifer #%u which is out of bounds.\n", fd);
- _network_free_netbuf_async(buf);
- return;
- }
-#endif
-
-
- if(s->type == NST_FREE)
- return;
-
- // Check Max Outstanding buffers limit.
- if( (s->write.max_outstanding > 0) &&
- (s->write.n_outstanding >= s->write.max_outstanding) ){
-
- ShowWarning("network_send: fd #%u max Outstanding buffers exceeded. - disconnecting.\n", fd);
- network_disconnect(fd);
- //
- _network_free_netbuf_async(buf);
- return;
- }
-
-
- // Attach to the end:
- buf->next = NULL;
- if(s->write.buf_last != NULL){
- s->write.buf_last->next = buf;
- s->write.buf_last = buf;
-
- }else{
- // currently no buffer attached.
- s->write.buf = s->write.buf_last = buf;
-
- // register @ evdp for writable notification.
- evdp_writable_add(fd, &s->evdp_data); //
- }
-
-
- //
- s->write.n_outstanding++;
-
-}//end: network_send()
-
-
-void network_parser_set_ro(int32 fd,
- int16 *packetlentable,
- void (*onPacketCompleteProc)(int32 fd, uint16 op, uint16 len, netbuf buf)
- ){
- register SESSION *s = &g_Session[fd];
- register netbuf b, nb; // used for potential free attached buffers.
-
- if(s->type == NST_FREE)
- return;
-
- s->onPacketComplete = onPacketCompleteProc;
-
- s->onRecv = _onRORecv; // ..
- s->onSend = _onSend; // Using the normal generic netbuf based send function.
-
- s->netparser_data = packetlentable;
-
- // Initial State -> Need Packet OPCode.
- s->read.state = NRS_WAITOP;
- s->read.head_left = 2;
-
-
- // Detach (if..) all buffers.
- if(s->read.buf != NULL){
- _network_free_netbuf_async(s->read.buf); //
- s->read.buf = NULL;
- }
-
- if(s->write.buf != NULL){
- b = s->write.buf;
- while(1){
- nb = b->next;
-
- _network_free_netbuf_async(b);
-
- b = nb;
- }
-
- s->write.buf = NULL;
- s->write.buf_last = NULL;
- s->write.n_outstanding = 0;
- }
-
- // not changing any limits on outstanding ..
- //
-
-}//end: network_parser_set_ro()
diff --git a/src/common/network.h b/src/common/network.h
deleted file mode 100644
index d7b463a2f..000000000
--- a/src/common/network.h
+++ /dev/null
@@ -1,189 +0,0 @@
-#ifndef _rA_NETWORK_H_
-#define _rA_NETWORK_H_
-
-#include <netinet/in.h>
-#include "../common/cbasetypes.h"
-#include "../common/netbuffer.h"
-#include "../common/evdp.h"
-
-#ifndef MAXCONN
-#define MAXCONN 16384
-#endif
-
-
-typedef struct SESSION{
- EVDP_DATA evdp_data; // Must be always the frist member! (some evdp's may rely on this fact)
-
- // Connection Type
- enum{ NST_FREE=0, NST_LISTENER = 1, NST_CLIENT=2, NST_OUTGOING=3} type;
-
- // Flags / Settings.
- bool v6; // is v6?
- bool disconnect_in_progress; // To prevent stack overflows / recursive calls.
-
-
- union{ // union to save memory.
- struct sockaddr_in v4;
- struct sockaddr_in6 v6;
- }addr;
-
-
- // "lowlevel" Handlers
- // (Implemented by the protocol specific parser)
- //
- bool (*onRecv)(int32 fd); // return false = disconnect
- bool (*onSend)(int32 fd); // return false = disconnect
-
- // Event Handlers for LISTENER type sockets
- //
- // onConnect gets Called when a connection has been
- // successfully accepted.
- // Session entry is available in this Handler!
- // A returncode of false will reejct the connection (disconnect)
- // Note: When rejecting a connection in onConnect by returning false
- // The onDisconnect handler wont get called!
- // Note: the onConnect Handler is also responsible for setting
- // the appropriate netparser (which implements onRecv/onSend..) [protocol specific]
- //
- // onDisconnect gets called when a connection gets disconnected
- // (by peer as well as by core)
- //
- bool (*onConnect)(int32 fd); // return false = disconnect (wont accept)
- void (*onDisconnect)(int32 fd);
-
-
- //
- // Parser specific data
- //
- void *netparser_data; // incase of RO Packet Parser, pointer to packet len table (uint16array)
- void (*onPacketComplete)(int32 fd, uint16 op, uint16 len, netbuf buf);
-
-
- //
- // Buffers
- //
- struct{
- enum NETREADSTATE { NRS_WAITOP = 0, NRS_WAITLEN = 1, NRS_WAITDATA = 2} state;
-
- uint32 head_left;
- uint16 head[2];
-
- netbuf buf;
- } read;
-
- struct{
- uint32 max_outstanding;
- uint32 n_outstanding;
-
- uint32 dataPos;
-
- netbuf buf, buf_last;
- } write;
-
- // Application Level data Pointer
- // (required for backward compatibility with previous athena socket system.)
- void *data;
-
-} SESSION;
-
-
-/**
- * Subsystem Initialization / Finalization.
- *
- */
-void network_init();
-void network_final();
-
-
-/**
- * Will do the net work :) ..
- */
-void network_do();
-
-
-/**
- * Adds a new listner.
- *
- * @param v6 v6 listner?
- * @param *addr the address to listen on.
- * @param port port to listen on
- *
- * @return -1 on error otherwise the identifier of the new listener.
- */
-int32 network_addlistener(bool v6, const char *addr, uint16 port);
-
-
-/**
- * Tries to establish an outgoing connection.
- *
- * @param v6 operate with IPv6 addresses?
- * @param addr the address to connect to
- * @param port the port to connect to
- * @param from_addr the address to connect from (local source / optional if auto -> NULL)
- * @param from_port the port to connect from (local source / optional if auto -> 0)
- * @param onConnectionEstablishedHandler callback that gets called when the connection is established.
- * @param onConnectionLooseHandler callback that gets called when the connection gets disconnected (or the connection couldnt be established)
- *
- * @return -1 on error otherwise the identifier of the new connection
- */
-int32 network_connect(bool v6,
- const char *addr,
- uint16 port,
- const char *from_addr,
- uint16 from_port,
- bool (*onConnectionEstablishedHandler)(int32 fd),
- void (*onConnectionLooseHandler)(int32 fd)
-);
-
-
-
-/**
- * Disconnects the given connection
- *
- * @param fd connection identifier.
- *
- * @Note:
- * - onDisconnect callback gets called!
- * - cleares (returns) all assigned buffers
- *
- */
-void network_disconnect(int32 fd);
-
-
-/**
- * Attach's a netbuffer at the end of sending queue to the given connection
- *
- * @param fd connection identifier
- * @param buf netbuffer to attach.
- */
-void network_send(int32 fd, netbuf buf);
-
-
-/**
- * Sets the parser to RO Protocol like Packet Parser.
- *
- * @param fd connection identifier
- * @param *packetlentable pointer to array of uint16 in size of UINT16_MAX,
- * @param onComplteProc callback for packet completion.
- *
- * @note:
- * PacketLen Table Fromat:
- * each element's offsets represents th ro opcode.
- * value is length.
- * a length of 0 means the packet is dynamic.
- * a length of UINT16_MAX means the packet is unknown.
- *
- * Static Packets must contain their hader in len so (0x64 == 55 ..)
- *
- */
-void network_parser_set_ro(int32 fd,
- int16 *packetlentable,
- void (*onPacketCompleteProc)(int32 fd, uint16 op, uint16 len, netbuf buf)
- );
-#define ROPACKET_UNKNOWN UINT16_MAX
-#define ROPACKET_DYNLEN 0
-
-
-
-
-#endif
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index 1cb471aff..a3471b00d 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -2,15 +2,19 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "nullpo.h"
+
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
-#include "../common/nullpo.h"
+
#include "../common/showmsg.h"
/**
* Reports failed assertions or NULL pointers
- *
+ *
* @param file Source file where the error was detected
* @param line Line
* @param func Function
diff --git a/src/common/nullpo.h b/src/common/nullpo.h
index fb1cf0feb..581252cca 100644
--- a/src/common/nullpo.h
+++ b/src/common/nullpo.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_NULLPO_H_
-#define _COMMON_NULLPO_H_
+#ifndef COMMON_NULLPO_H
+#define COMMON_NULLPO_H
#include "../common/cbasetypes.h"
@@ -125,4 +125,4 @@
void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title);
-#endif /* _COMMON_NULLPO_H_ */
+#endif /* COMMON_NULLPO_H */
diff --git a/src/common/raconf.c b/src/common/raconf.c
deleted file mode 100644
index abeed444b..000000000
--- a/src/common/raconf.c
+++ /dev/null
@@ -1,583 +0,0 @@
-//
-// Athena style config parser
-// (would be better to have "one" implementation instead of .. 4 :)
-//
-//
-// Author: Florian Wilkemeyer <fw@f-ws.de>
-//
-// Copyright (c) RAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-//
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-
-#include "../common/raconf.h"
-
-#define SECTION_LEN 32
-#define VARNAME_LEN 64
-
-struct raconf {
- DBMap *db;
-};
-
-
-struct conf_value{
- int64 intval;
- bool bval;
- double floatval;
- size_t strval_len; // not includung \0
- char strval[16];
-};
-
-
-
-static struct conf_value *makeValue(const char *key, char *val, size_t val_len){
- struct conf_value *v;
-/* size_t sz;
-
- sz = sizeof(struct conf_value);
- if(val_len >= sizeof(v->strval))
- sz += (val_len - sizeof(v->strval) + 1);*/
-
- v = (struct conf_value*)aCalloc(1, sizeof(struct conf_value));
- if(v == NULL){
- ShowFatalError("raconf: makeValue => Out of Memory while allocating new node.\n");
- return NULL;
- }
-
- memcpy(v->strval, val, val_len);
- v->strval[val_len+1] = '\0';
- v->strval_len = val_len;
-
-
- // Parse boolean value:
- if((val_len == 4) && (strncmpi("true", val, 4) == 0))
- v->bval = true;
- else if((val_len == 3) && (strncmpi("yes", val, 3) == 0))
- v->bval = true;
- else if((val_len == 3) && (strncmpi("oui", val, 3) == 0))
- v->bval = true;
- else if((val_len == 2) && (strncmpi("si", val, 2) == 0))
- v->bval = true;
- else if((val_len == 2) && (strncmpi("ja", val, 2) == 0))
- v->bval = true;
- else if((val_len == 1) && (*val == '1'))
- v->bval = true;
- else if((val_len == 5) && (strncmpi("false", val, 5) == 0))
- v->bval = false;
- else if((val_len == 2) && (strncmpi("no", val, 2) == 0))
- v->bval = false;
- else if((val_len == 3) && (strncmpi("non", val, 3) == 0))
- v->bval = false;
- else if((val_len == 2) && (strncmpi("no", val, 2) == 0))
- v->bval = false;
- else if((val_len == 4) && (strncmpi("nein", val, 4) == 0))
- v->bval = false;
- else if((val_len == 1) && (*val == '0'))
- v->bval = false;
- else
- v->bval = false; // assume false.
-
- // Parse number
- // Supported formats:
- // prefix: 0x hex .
- // postix: h for hex
- // b for bin (dual)
- if( (val_len >= 1 && (val[val_len] == 'h')) || (val_len >= 2 && (val[0] == '0' && val[1] == 'x')) ){//HEX!
- if(val[val_len] == 'h'){
- val[val_len]= '\0';
- v->intval = strtoull(val, NULL, 16);
- val[val_len] = 'h';
- }else
- v->intval = strtoull(&val[2], NULL, 16);
- }else if( val_len >= 1 && (val[val_len] == 'b') ){ //BIN
- val[val_len] = '\0';
- v->intval = strtoull(val, NULL, 2);
- val[val_len] = 'b';
- }else if( *val >='0' && *val <= '9'){ // begins with normal digit, so assume its dec.
- // is it float?
- bool is_float = false;
- char *p;
-
- for(p = val; *p != '\0'; p++){
- if(*p == '.'){
- v->floatval = strtod(val, NULL);
- v->intval = (int64) v->floatval;
- is_float = true;
- break;
- }
- }
-
- if(is_float == false){
- v->intval = strtoull(val, NULL, 10);
- v->floatval = (double) v->intval;
- }
- }else{
- // Everything else: lets use boolean for fallback
- if(v->bval == true)
- v->intval = 1;
- else
- v->intval = 0;
- }
-
- return v;
-}//end: makeValue()
-
-
-static bool configParse(raconf inst, const char *fileName){
- FILE *fp;
- char line[4096];
- char currentSection[SECTION_LEN];
- char *p;
- char c;
- int linecnt;
- size_t linelen;
- size_t currentSection_len;
-
- fp = fopen(fileName, "r");
- if(fp == NULL){
- ShowError("configParse: cannot open '%s' for reading.\n", fileName);
- return false;
- }
-
-
- // Start with empty section:
- currentSection[0] = '\0';
- currentSection_len = 0;
-
- //
- linecnt = 0;
- while(1){
- linecnt++;
-
- if(fgets(line, sizeof(line), fp) != line)
- break;
-
- linelen = strlen(line);
- p = line;
-
- // Skip whitespaces from beginning (space and tab)
- _line_begin_skip_whities:
- c = *p;
- if(c == ' ' || c == '\t'){
- p++;
- linelen--;
- goto _line_begin_skip_whities;
- }
-
- // Remove linebreaks as (cr or lf) and whitespaces from line end!
- _line_end_skip_whities_and_breaks:
- c = p[linelen-1];
- if(c == '\r' || c == '\n' || c == ' ' || c == '\t'){
- p[--linelen] = '\0';
- goto _line_end_skip_whities_and_breaks;
- }
-
- // Empty line?
- // or line starts with comment (commented out)?
- if(linelen == 0 || (p[0] == '/' && p[1] == '/') || p[0] == ';')
- continue;
-
- // Variable names can contain:
- // A-Za-z-_.0-9
- //
- // Sections start with [ .. ] (INI Style)
- //
- c = *p;
-
- // check what we have.. :)
- if(c == '['){ // got section!
- // Got Section!
- // Search for ]
- char *start = (p+1);
-
- while(1){
- ++p;
- c = *p;
-
- if(c == '\0'){
- ShowError("Syntax Error: unterminated Section name in %s:%u (expected ']')\n", fileName, linecnt);
- fclose(fp);
- return false;
- }else if(c == ']'){ // closing backet (section name termination)
- if( (p - start + 1) > (sizeof(currentSection) ) ){
- ShowError("Syntax Error: Section name in %s:%u is too large (max Supported length: %u chars)\n", fileName, linecnt, sizeof(currentSection)-1);
- fclose(fp);
- return false;
- }
-
- // Set section!
- *p = '\0'; // add termination here.
- memcpy(currentSection, start, (p-start)+1 ); // we'll copy \0, too! (we replaced the ] backet with \0.)
- currentSection_len = (p-start);
-
- break;
-
- }else if( (c >= '0' && c <= '9') || (c == '-') || (c == ' ') || (c == '_') || (c == '.') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ){
- // skip .. (allowed char / specifier)
- continue;
- }else{
- ShowError("Syntax Error: Invalid Character '%c' in %s:%u (offset %u) for Section name.\n", c, fileName, linecnt, (p-line));
- fclose(fp);
- return false;
- }
-
- }//endwhile: parse section name
-
-
- }else if( (c >= '0' && c <= '9') || (c == '-') || (c == '_') || (c == '.') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ){
- // Got variable!
- // Search for '=' or ':' wich termiantes the name
- char *start = p;
- char *valuestart = NULL;
- size_t start_len;
-
- while(1){
- ++p;
- c = *p;
-
- if(c == '\0'){
- ShowError("Syntax Error: unterminated Variable name in %s:%u\n", fileName, linecnt);
- fclose(fp);
- return false;
- }else if( (c == '=') || (c == ':') ){
- // got name termination
-
- *p = '\0'; // Terminate it so (start) will hold the pointer to the name.
-
- break;
-
- }else if( (c >= '0' && c <= '9') || (c == '-') || (c == '_') || (c == '.') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ){
- // skip .. allowed char
- continue;
- }else{
- ShowError("Syntax Error: Invalid Character '%c' in %s:%u (offset %u) for Variable name.\n", c, fileName, linecnt, (p-line));
- fclose(fp);
- return false;
- }
-
- }//endwhile: parse var name
-
- start_len = (p-start);
- if(start_len >= VARNAME_LEN){
- ShowError("%s:%u Variable length exceeds limit of %u Characters.\n", fileName, linecnt, VARNAME_LEN-1);
- fclose(fp);
- return false;
- }else if(start_len == 0){
- ShowError("%s:%u Empty Variable name is not allowed.\n", fileName, linecnt);
- fclose(fp);
- return false;
- }
-
-
- valuestart = (p+1);
-
-
- // Skip whitespace from begin of value (tab and space)
- _skip_value_begin_whities:
- c = *valuestart;
- if(c == ' ' || c == '\t'){
- valuestart++;
- goto _skip_value_begin_whities;
- }
-
- // Scan for value termination,
- // wich can be \0 or comment start (// or ; (INI) )
- //
- p = valuestart;
- while(1){
- c = *p;
- if(c == '\0'){
- // Terminated by line end.
- break;
- }else if(c == '/' && p[1] == '/'){
- // terminated by c++ style comment.
- *p = '\0';
- break;
- }else if(c == ';'){
- // terminated by ini style comment.
- *p = '\0';
- break;
- }
-
- p++;
- }//endwhile: search var value end.
-
-
- // Strip whitespaces from end of value.
- if(valuestart != p){ // not empty!
- p--;
- _strip_value_end_whities:
- c = *p;
- if(c == ' ' || c == '\t'){
- *p = '\0';
- p--;
- goto _strip_value_end_whities;
- }
- p++;
- }
-
-
- // Buildin Hook:
- if( stricmp(start, "import") == 0){
- if( configParse(inst, valuestart) != true){
- ShowError("%s:%u - Import of '%s' failed!\n", fileName, linecnt, valuestart);
- }
- }else{
- // put it to db.
- struct conf_value *v, *o;
- char key[ (SECTION_LEN+VARNAME_LEN+1+1) ]; //+1 for delimiter, +1 for termination.
- size_t section_len;
-
- if(*currentSection == '\0'){ // empty / none
- strncpy(key, "<unnamed>",9);
- section_len = 9;
- }else{
- strncpy(key, currentSection, currentSection_len);
- section_len = currentSection_len;
- }
-
- key[section_len] = '.'; // Delim
-
- strncpy(&key[section_len+1], start, start_len);
-
- key[section_len + start_len + 1] = '\0';
-
-
- v = makeValue(key, valuestart, (p-valuestart) );
-
- // Try to get the old one before
- o = strdb_get(inst->db, key);
- if(o != NULL){
- strdb_remove(inst->db, key);
- aFree(o); //
- }
-
- strdb_put( inst->db, key, v);
- }
-
-
- }else{
- ShowError("Syntax Error: unexpected Character '%c' in %s:%u (offset %u)\n", c, fileName, linecnt, (p-line) );
- fclose(fp);
- return false;
- }
-
-
-
- }
-
-
-
- fclose(fp);
- return true;
-}//end: configParse()
-
-
-#define MAKEKEY(dest, section, key) do { \
- size_t section_len_, key_len_; \
- if((section) == NULL || *(section) == '\0'){ \
- strncpy((dest), "<unnamed>", 9); \
- section_len_ = 9; \
- } else { \
- section_len_ = strlen(section); \
- strncpy((dest), (section), section_len_); \
- } \
- (dest)[section_len_] = '.'; \
- key_len_ = strlen(key); \
- strncpy(&(dest)[section_len_+1], (key), key_len_); \
- (dest)[section_len_ + key_len_ + 1] = '\0'; \
-} while(0)
-
-
-raconf raconf_parse(const char *file_name){
- struct raconf *rc;
-
- rc = aCalloc(1, sizeof(struct raconf) );
- if(rc == NULL){
- ShowFatalError("raconf_parse: failed to allocate memory for new handle\n");
- return NULL;
- }
-
- rc->db = strdb_alloc(DB_OPT_BASE | DB_OPT_DUP_KEY, 98);
- //
-
- if(configParse(rc, file_name) != true){
- ShowError("Failed to Parse Configuration file '%s'\n", file_name);
- }
-
- return rc;
-}//end: raconf_parse()
-
-
-void raconf_destroy(raconf rc){
- DBIterator *iter;
- struct conf_value *v;
-
- // Clear all entrys in db.
- iter = db_iterator(rc->db);
- for( v = (struct conf_value*)dbi_first(iter); dbi_exists(iter); v = (struct conf_value*)dbi_next(iter) ){
- aFree(v);
- }
- dbi_destroy(iter);
-
- db_destroy(rc->db);
-
- aFree(rc);
-
-}//end: raconf_destroy()
-
-bool raconf_getbool(raconf rc, const char *section, const char *key, bool _default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
-
- v = strdb_get(rc->db, keystr);
- if(v == NULL)
- return _default;
- else
- return v->bval;
-}//end: raconf_getbool()
-
-
-float raconf_getfloat(raconf rc,const char *section, const char *key, float _default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
-
- v = strdb_get(rc->db, keystr);
- if(v == NULL)
- return _default;
- else
- return (float)v->floatval;
-}//end: raconf_getfloat()
-
-
-int64 raconf_getint(raconf rc, const char *section, const char *key, int64 _default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
-
- v = strdb_get(rc->db, keystr);
- if(v == NULL)
- return _default;
- else
- return v->intval;
-
-}//end: raconf_getint()
-
-
-const char* raconf_getstr(raconf rc, const char *section, const char *key, const char *_default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
-
- v = strdb_get(rc->db, keystr);
- if(v == NULL)
- return _default;
- else
- return v->strval;
-}//end: raconf_getstr()
-
-
-bool raconf_getboolEx(raconf rc, const char *section, const char *fallback_section, const char *key, bool _default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
-
- MAKEKEY(keystr, fallback_section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
- return _default;
- }else{
- return v->bval;
- }
-
- }else{
- return v->bval;
- }
-}//end: raconf_getboolEx()
-
-
-float raconf_getfloatEx(raconf rc,const char *section, const char *fallback_section, const char *key, float _default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
-
- MAKEKEY(keystr, fallback_section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
- return _default;
- }else{
- return (float)v->floatval;
- }
-
- }else{
- return (float)v->floatval;
- }
-
-}//end: raconf_getfloatEx()
-
-
-int64 raconf_getintEx(raconf rc, const char *section, const char *fallback_section, const char *key, int64 _default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
-
- MAKEKEY(keystr, fallback_section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
- return _default;
- }else{
- return v->intval;
- }
-
- }else{
- return v->intval;
- }
-
-}//end: raconf_getintEx()
-
-
-const char* raconf_getstrEx(raconf rc, const char *section, const char *fallback_section, const char *key, const char *_default){
- char keystr[SECTION_LEN + VARNAME_LEN + 1 + 1];
- struct conf_value *v;
-
- MAKEKEY(keystr, section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
-
- MAKEKEY(keystr, fallback_section, key);
- v = strdb_get(rc->db, keystr);
- if(v == NULL){
- return _default;
- }else{
- return v->strval;
- }
-
- }else{
- return v->strval;
- }
-
-}//end: raconf_getstrEx()
diff --git a/src/common/raconf.h b/src/common/raconf.h
deleted file mode 100644
index 68a2b51b2..000000000
--- a/src/common/raconf.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
-#ifndef _rA_CONF_H_
-#define _rA_CONF_H_
-
-#include "../common/cbasetypes.h"
-
-// rAthena generic configuration file parser
-//
-// Config file Syntax is athena style
-// extended with ini style support (including sections)
-//
-// Comments are started with // or ; (ini style)
-//
-
-typedef struct raconf *raconf;
-
-
-/**
- * Parses a rAthna Configuration file
- *
- * @param file_name path to the file to parse
- *
- * @returns not NULL incase of success
- */
-raconf raconf_parse(const char *file_name);
-
-
-/**
- * Frees a Handle received from raconf_parse
- *
- * @param rc - the handle to free
- */
-void raconf_destroy(raconf rc);
-
-
-/**
- * Gets the value for Section / Key pair, if key not exists returns _default!
- *
- */
-bool raconf_getbool(raconf rc, const char *section, const char *key, bool _default);
-float raconf_getfloat(raconf rc,const char *section, const char *key, float _default);
-int64 raconf_getint(raconf rc, const char *section, const char *key, int64 _default);
-const char* raconf_getstr(raconf rc, const char *section, const char *key, const char *_default);
-
-/**
- * Gets the value for Section / Key pair, but has fallback section option if not found in section,
- * if not found in both - default gets returned.
- *
- */
-bool raconf_getboolEx(raconf rc, const char *section, const char *fallback_section, const char *key, bool _default);
-float raconf_getfloatEx(raconf rc,const char *section, const char *fallback_section, const char *key, float _default);
-int64 raconf_getintEx(raconf rc, const char *section, const char *fallback_section, const char *key, int64 _default);
-const char* raconf_getstrEx(raconf rc, const char *section, const char *fallback_section, const char *key, const char *_default);
-
-
-
-#endif
diff --git a/src/common/random.c b/src/common/random.c
index e46c52cad..88d5748cf 100644
--- a/src/common/random.c
+++ b/src/common/random.c
@@ -1,17 +1,24 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
+#define HERCULES_CORE
+
+#include "random.h"
+
+#include <time.h> // time
+
+#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53
+
+#include "../common/cbasetypes.h" // for WIN32
#include "../common/showmsg.h"
#include "../common/timer.h" // gettick
-#include "random.h"
+
#if defined(WIN32)
- #include "../common/winapi.h"
+# include "../common/winapi.h"
#elif defined(HAVE_GETPID) || defined(HAVE_GETTID)
- #include <sys/types.h>
- #include <unistd.h>
+# include <sys/types.h>
+# include <unistd.h>
#endif
-#include <time.h> // time
-#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53
/// Initializes the random number generator with an appropriate seed.
diff --git a/src/common/random.h b/src/common/random.h
index ab83fb4d4..15d7f8ab1 100644
--- a/src/common/random.h
+++ b/src/common/random.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_RANDOM_H_
-#define _COMMON_RANDOM_H_
+#ifndef COMMON_RANDOM_H
+#define COMMON_RANDOM_H
#include "../common/cbasetypes.h"
@@ -15,4 +15,4 @@ int32 rnd_value(int32 min, int32 max);// [min, max]
double rnd_uniform(void);// [0.0, 1.0)
double rnd_uniform53(void);// [0.0, 1.0)
-#endif /* _COMMON_RANDOM_H_ */
+#endif /* COMMON_RANDOM_H */
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 14342fe5e..b9bcef9b2 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -2,23 +2,26 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/strlib.h" // StringBuf
+#define HERCULES_CORE
+
#include "showmsg.h"
-#include "core.h" //[Ind] - For SERVER_TYPE
+#include <stdarg.h>
#include <stdio.h>
+#include <stdlib.h> // atexit
#include <string.h>
-#include <stdarg.h>
#include <time.h>
-#include <stdlib.h> // atexit
#include "../../3rdparty/libconfig/libconfig.h"
+#include "../common/cbasetypes.h"
+#include "../common/core.h" //[Ind] - For SERVER_TYPE
+#include "../common/strlib.h" // StringBuf
+
#ifdef WIN32
-#include "../common/winapi.h"
+# include "../common/winapi.h"
#else // not WIN32
-#include <unistd.h>
+# include <unistd.h>
#endif // WIN32
#if defined(DEBUGLOGMAP)
@@ -85,10 +88,10 @@ int console_msg_log = 0;//[Ind] msg error logging
// XXX adapted from eApp (comments are left untouched) [flaviojs]
///////////////////////////////////////////////////////////////////////////////
-// ansi compatible printf with control sequence parser for windows
+// ANSI compatible printf with control sequence parser for windows
// fast hack, handle with care, not everything implemented
//
-// \033[#;...;#m - Set Graphics Rendition (SGR)
+// \033[#;...;#m - Set Graphics Rendition (SGR)
//
// printf("\x1b[1;31;40m"); // Bright red on black
// printf("\x1b[3;33;45m"); // Blinking yellow on magenta (blink not implemented)
@@ -107,19 +110,19 @@ int console_msg_log = 0;//[Ind] msg error logging
// 8 - Concealed (invisible)
//
// \033[#A - Cursor Up (CUU)
-// Moves the cursor up by the specified number of lines without changing columns.
+// Moves the cursor up by the specified number of lines without changing columns.
// If the cursor is already on the top line, this sequence is ignored. \e[A is equivalent to \e[1A.
//
// \033[#B - Cursor Down (CUD)
-// Moves the cursor down by the specified number of lines without changing columns.
+// Moves the cursor down by the specified number of lines without changing columns.
// If the cursor is already on the bottom line, this sequence is ignored. \e[B is equivalent to \e[1B.
//
// \033[#C - Cursor Forward (CUF)
-// Moves the cursor forward by the specified number of columns without changing lines.
+// Moves the cursor forward by the specified number of columns without changing lines.
// If the cursor is already in the rightmost column, this sequence is ignored. \e[C is equivalent to \e[1C.
//
// \033[#D - Cursor Backward (CUB)
-// Moves the cursor back by the specified number of columns without changing lines.
+// Moves the cursor back by the specified number of columns without changing lines.
// If the cursor is already in the leftmost column, this sequence is ignored. \e[D is equivalent to \e[1D.
//
// \033[#E - Cursor Next Line (CNL)
@@ -132,19 +135,19 @@ int console_msg_log = 0;//[Ind] msg error logging
// Moves the cursor to indicated column in current row. \e[G is equivalent to \e[1G.
//
// \033[#;#H - Cursor Position (CUP)
-// Moves the cursor to the specified position. The first # specifies the line number,
-// the second # specifies the column. If you do not specify a position, the cursor moves to the home position:
+// Moves the cursor to the specified position. The first # specifies the line number,
+// the second # specifies the column. If you do not specify a position, the cursor moves to the home position:
// the upper-left corner of the screen (line 1, column 1).
//
// \033[#;#f - Horizontal & Vertical Position
// (same as \033[#;#H)
//
// \033[s - Save Cursor Position (SCP)
-// The current cursor position is saved.
+// The current cursor position is saved.
//
// \033[u - Restore cursor position (RCP)
// Restores the cursor position saved with the (SCP) sequence \033[s.
-// (addition, restore to 0,0 if nothinh was saved before)
+// (addition, restore to 0,0 if nothing was saved before)
//
// \033[#J - Erase Display (ED)
@@ -210,7 +213,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
WriteFile(handle, p, (DWORD)(q-p), &written, 0);
if( q[1]!='[' )
- { // write the escape char (whatever purpose it has)
+ { // write the escape char (whatever purpose it has)
if(0==WriteConsole(handle, q, 1, &written, 0) )
WriteFile(handle,q, 1, &written, 0);
p=q+1; //and start searching again
@@ -230,7 +233,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
q=q+2;
for(;;)
{
- if( ISDIGIT(*q) )
+ if( ISDIGIT(*q) )
{ // add number to number array, only accept 2digits, shift out the rest
// so // \033[123456789m will become \033[89m
numbers[numpoint] = (numbers[numpoint]<<4) | (*q-'0');
@@ -279,7 +282,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
}
//case '2': // not existing
//case '3': // blinking (not implemented)
- //case '4': // unterline (not implemented)
+ //case '4': // underline (not implemented)
//case '6': // not existing
//case '8': // concealed (not implemented)
//case '9': // not existing
@@ -347,12 +350,12 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
else if(num==2)
{ // Number of chars on screen.
cnt = info.dwSize.X * info.dwSize.Y;
- SetConsoleCursorPosition(handle, origin);
+ SetConsoleCursorPosition(handle, origin);
}
else// 0 and default
{ // number of chars from cursor to end
origin = info.dwCursorPosition;
- cnt = info.dwSize.X * (info.dwSize.Y - info.dwCursorPosition.Y) - info.dwCursorPosition.X;
+ cnt = info.dwSize.X * (info.dwSize.Y - info.dwCursorPosition.Y) - info.dwCursorPosition.X;
}
FillConsoleOutputAttribute(handle, info.wAttributes, cnt, origin, &tmp);
FillConsoleOutputCharacter(handle, ' ', cnt, origin, &tmp);
@@ -386,7 +389,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
else if( *q == 'H' || *q == 'f' )
{ // \033[#;#H - Cursor Position (CUP)
// \033[#;#f - Horizontal & Vertical Position
- // The first # specifies the line number, the second # specifies the column.
+ // The first # specifies the line number, the second # specifies the column.
// The default for both is 1
info.dwCursorPosition.X = (numbers[numpoint])?(numbers[numpoint]>>4)*10+((numbers[numpoint]&0x0F)-1):0;
info.dwCursorPosition.Y = (numpoint && numbers[numpoint-1])?(numbers[numpoint-1]>>4)*10+((numbers[numpoint-1]&0x0F)-1):0;
@@ -483,7 +486,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
--q;
}
// skip the sequencer and search again
- p = q+1;
+ p = q+1;
break;
}// end while
}
@@ -539,7 +542,7 @@ int VFPRINTF(FILE *file, const char *fmt, va_list argptr)
{ // find the escape character
fprintf(file, "%.*s", (int)(q-p), p); // write up to the escape
if( q[1]!='[' )
- { // write the escape char (whatever purpose it has)
+ { // write the escape char (whatever purpose it has)
fprintf(file, "%.*s", 1, q);
p=q+1; //and start searching again
}
@@ -552,7 +555,7 @@ int VFPRINTF(FILE *file, const char *fmt, va_list argptr)
q=q+2;
while(1)
{
- if( ISDIGIT(*q) )
+ if( ISDIGIT(*q) )
{
++q;
// and next character
@@ -621,7 +624,7 @@ int VFPRINTF(FILE *file, const char *fmt, va_list argptr)
--q;
}
// skip the sequencer and search again
- p = q+1;
+ p = q+1;
break;
}// end while
}
@@ -651,7 +654,7 @@ int FPRINTF(FILE *file, const char *fmt, ...)
char timestamp_format[20] = ""; //For displaying Timestamps
-int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
+int vShowMessage_(enum msg_type flag, const char *string, va_list ap)
{
va_list apcopy;
char prefix[100];
@@ -660,7 +663,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
#endif
if (!string || *string == '\0') {
- ShowError("Empty string passed to _vShowMessage().\n");
+ ShowError("Empty string passed to vShowMessage_().\n");
return 1;
}
if(
@@ -731,7 +734,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
strcat(prefix,CL_RED"[Fatal Error]"CL_RESET":");
break;
default:
- ShowError("In function _vShowMessage() -> Invalid flag passed.\n");
+ ShowError("In function vShowMessage_() -> Invalid flag passed.\n");
return 1;
}
@@ -779,12 +782,12 @@ void ClearScreen(void)
ShowMessage(CL_CLS); // to prevent empty string passed messages
#endif
}
-int _ShowMessage(enum msg_type flag, const char *string, ...)
+int ShowMessage_(enum msg_type flag, const char *string, ...)
{
int ret;
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(flag, string, ap);
+ ret = vShowMessage_(flag, string, ap);
va_end(ap);
return ret;
}
@@ -793,37 +796,37 @@ int _ShowMessage(enum msg_type flag, const char *string, ...)
void ShowMessage(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_NONE, string, ap);
+ vShowMessage_(MSG_NONE, string, ap);
va_end(ap);
}
void ShowStatus(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_STATUS, string, ap);
+ vShowMessage_(MSG_STATUS, string, ap);
va_end(ap);
}
void ShowSQL(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_SQL, string, ap);
+ vShowMessage_(MSG_SQL, string, ap);
va_end(ap);
}
void ShowInfo(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_INFORMATION, string, ap);
+ vShowMessage_(MSG_INFORMATION, string, ap);
va_end(ap);
}
void ShowNotice(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_NOTICE, string, ap);
+ vShowMessage_(MSG_NOTICE, string, ap);
va_end(ap);
}
void ShowWarning(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_WARNING, string, ap);
+ vShowMessage_(MSG_WARNING, string, ap);
va_end(ap);
}
void ShowConfigWarning(config_setting_t *config, const char *string, ...)
@@ -834,25 +837,25 @@ void ShowConfigWarning(config_setting_t *config, const char *string, ...)
StrBuf->AppendStr(&buf, string);
StrBuf->Printf(&buf, " (%s:%d)\n", config_setting_source_file(config), config_setting_source_line(config));
va_start(ap, string);
- _vShowMessage(MSG_WARNING, StrBuf->Value(&buf), ap);
+ vShowMessage_(MSG_WARNING, StrBuf->Value(&buf), ap);
va_end(ap);
StrBuf->Destroy(&buf);
}
void ShowDebug(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_DEBUG, string, ap);
+ vShowMessage_(MSG_DEBUG, string, ap);
va_end(ap);
}
void ShowError(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_ERROR, string, ap);
+ vShowMessage_(MSG_ERROR, string, ap);
va_end(ap);
}
void ShowFatalError(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_FATALERROR, string, ap);
+ vShowMessage_(MSG_FATALERROR, string, ap);
va_end(ap);
}
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 49fbc34fb..83eb0ad89 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -2,15 +2,17 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SHOWMSG_H_
-#define _COMMON_SHOWMSG_H_
-
-#ifndef _COMMON_HPMI_H_
- #include "../../3rdparty/libconfig/libconfig.h"
-#endif
+#ifndef COMMON_SHOWMSG_H
+#define COMMON_SHOWMSG_H
#include <stdarg.h>
+#ifdef HERCULES_CORE
+# include "../../3rdparty/libconfig/libconfig.h"
+#else
+# include "../common/HPMi.h"
+#endif
+
// for help with the console colors look here:
// http://www.edoceo.com/liberum/?doc=printf-with-color
// some code explanation (used here):
@@ -70,9 +72,9 @@
#define CL_XXBL "\033[0;44m" // default on blue
#define CL_PASS "\033[0;32;42m" // green on green
-#define CL_SPACE " " // space aquivalent of the print messages
+#define CL_SPACE " " // space equivalent of the print messages
-extern int stdout_with_ansisequence; //If the color ansi sequences are to be used. [flaviojs]
+extern int stdout_with_ansisequence; //If the color ANSI sequences are to be used. [flaviojs]
extern int msg_silent; //Specifies how silent the console is. [Skotlex]
extern int console_msg_log; //Specifies what error messages to log. [Ind]
extern char timestamp_format[20]; //For displaying Timestamps [Skotlex]
@@ -90,7 +92,7 @@ enum msg_type {
};
extern void ClearScreen(void);
-#ifndef _COMMON_HPMI_H_
+#ifdef HERCULES_CORE
extern void ShowMessage(const char *, ...);
extern void ShowStatus(const char *, ...);
extern void ShowSQL(const char *, ...);
@@ -101,7 +103,18 @@ extern void ClearScreen(void);
extern void ShowError(const char *, ...);
extern void ShowFatalError(const char *, ...);
extern void ShowConfigWarning(config_setting_t *config, const char *string, ...);
+#else
+ HPExport void (*ShowMessage) (const char *, ...);
+ HPExport void (*ShowStatus) (const char *, ...);
+ HPExport void (*ShowSQL) (const char *, ...);
+ HPExport void (*ShowInfo) (const char *, ...);
+ HPExport void (*ShowNotice) (const char *, ...);
+ HPExport void (*ShowWarning) (const char *, ...);
+ HPExport void (*ShowDebug) (const char *, ...);
+ HPExport void (*ShowError) (const char *, ...);
+ HPExport void (*ShowFatalError) (const char *, ...);
#endif
-extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap);
-#endif /* _COMMON_SHOWMSG_H_ */
+extern int vShowMessage_(enum msg_type flag, const char *string, va_list ap);
+
+#endif /* COMMON_SHOWMSG_H */
diff --git a/src/common/socket.c b/src/common/socket.c
index 35d350e95..85f0aa0ce 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -2,48 +2,50 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/timer.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../config/core.h"
-#include "../common/HPM.h"
-
-#define _H_SOCKET_C_
+#define HERCULES_CORE
+#include "../config/core.h" // SHOW_SERVER_STATS
+#define H_SOCKET_C
#include "socket.h"
+#undef H_SOCKET_C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+
#ifdef WIN32
- #include "../common/winapi.h"
+# include "../common/winapi.h"
#else
- #include <errno.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/tcp.h>
- #include <net/if.h>
- #include <unistd.h>
- #include <sys/time.h>
- #include <sys/ioctl.h>
- #include <netdb.h>
- #include <arpa/inet.h>
-
- #ifndef SIOCGIFCONF
- #include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
- #endif
- #ifndef FIONBIO
- #include <sys/filio.h> // FIONBIO on Solaris [FlavioJS]
- #endif
-
- #ifdef HAVE_SETRLIMIT
- #include <sys/resource.h>
- #endif
+# include <arpa/inet.h>
+# include <errno.h>
+# include <net/if.h>
+# include <netdb.h>
+# include <netinet/in.h>
+# include <netinet/tcp.h>
+# include <sys/ioctl.h>
+# include <sys/socket.h>
+# include <sys/time.h>
+# include <unistd.h>
+
+# ifndef SIOCGIFCONF
+# include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
+# endif
+# ifndef FIONBIO
+# include <sys/filio.h> // FIONBIO on Solaris [FlavioJS]
+# endif
+
+# ifdef HAVE_SETRLIMIT
+# include <sys/resource.h>
+# endif
#endif
/**
@@ -62,7 +64,7 @@ struct socket_interface sockt_s;
/////////////////////////////////////////////////////////////////////
#if defined(WIN32)
/////////////////////////////////////////////////////////////////////
-// windows portability layer
+// windows portability layer
typedef int socklen_t;
@@ -108,7 +110,7 @@ int sock2fd(SOCKET s)
/// Inserts the socket into the global array of sockets.
/// Returns a new fd associated with the socket.
-/// If there are too many sockets it closes the socket, sets an error and
+/// If there are too many sockets it closes the socket, sets an error and
// returns -1 instead.
/// Since fd 0 is reserved, it returns values in the range [1,FD_SETSIZE[.
///
@@ -291,8 +293,8 @@ void set_defaultparse(ParseFunc defaultparse)
*--------------------------------------*/
void set_nonblocking(int fd, unsigned long yes)
{
- // FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s.
- // The argp parameter is zero if nonblocking is to be disabled.
+ // FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s.
+ // The argp parameter is zero if nonblocking is to be disabled.
if( sIoctl(fd, FIONBIO, &yes) != 0 )
ShowError("set_nonblocking: Failed to set socket #%d to non-blocking mode (%s) - Please report this!!!\n", fd, error_msg());
}
@@ -358,7 +360,7 @@ int recv_to_fifo(int fd)
len = sRecv(fd, (char *) session[fd]->rdata + session[fd]->rdata_size, (int)RFIFOSPACE(fd), 0);
if( len == SOCKET_ERROR )
- {//An exception has occured
+ {//An exception has occurred
if( sErrno != S_EWOULDBLOCK ) {
//ShowDebug("recv_to_fifo: %s, closing connection #%d\n", error_msg(), fd);
set_eof(fd);
@@ -398,7 +400,7 @@ int send_from_fifo(int fd)
len = sSend(fd, (const char *) session[fd]->wdata, (int)session[fd]->wdata_size, MSG_NOSIGNAL);
if( len == SOCKET_ERROR )
- {//An exception has occured
+ {//An exception has occurred
if( sErrno != S_EWOULDBLOCK ) {
//ShowDebug("send_from_fifo: %s, ending connection #%d\n", error_msg(), fd);
#ifdef SHOW_SERVER_STATS
@@ -843,7 +845,7 @@ int do_sockets(int next)
session[i]->func_send(i);
if(session[i]->flag.eof) //func_send can't free a session, this is safe.
- { //Finally, even if there is no data to parse, connections signalled eof should be closed, so we call parse_func [Skotlex]
+ { //Finally, even if there is no data to parse, connections signaled eof should be closed, so we call parse_func [Skotlex]
session[i]->func_parse(i); //This should close the session immediately.
}
}
@@ -907,20 +909,20 @@ int do_sockets(int next)
//////////////////////////////
// IP rules and DDoS protection
-typedef struct _connect_history {
- struct _connect_history* next;
+typedef struct connect_history {
+ struct connect_history* next;
uint32 ip;
int64 tick;
int count;
unsigned ddos : 1;
} ConnectHistory;
-typedef struct _access_control {
+typedef struct access_control {
uint32 ip;
uint32 mask;
} AccessControl;
-enum _aco {
+enum aco {
ACO_DENY_ALLOW,
ACO_ALLOW_DENY,
ACO_MUTUAL_FAILURE
@@ -1232,7 +1234,7 @@ void socket_final(void)
if(session[i])
sockt->close(i);
- // session[0] ‚̃_ƒ~[ƒf[ƒ^‚ðíœ
+ // session[0]
aFree(session[0]->rdata);
aFree(session[0]->wdata);
aFree(session[0]);
@@ -1362,7 +1364,7 @@ void socket_init(void)
}
}
#elif defined(HAVE_SETRLIMIT) && !defined(CYGWIN)
- // NOTE: getrlimit and setrlimit have bogus behaviour in cygwin.
+ // NOTE: getrlimit and setrlimit have bogus behavior in cygwin.
// "Number of fds is virtually unlimited in cygwin" (sys/param.h)
{// set socket limit to FD_SETSIZE
struct rlimit rlp;
@@ -1403,7 +1405,7 @@ void socket_init(void)
socket_config_read(SOCKET_CONF_FILENAME);
- // initialise last send-receive tick
+ // initialize last send-receive tick
sockt->last_tick = time(NULL);
// session[0] is now currently used for disconnected sessions of the map server, and as such,
@@ -1456,7 +1458,7 @@ uint32 str2ip(const char* ip_str)
}
// Reorders bytes from network to little endian (Windows).
-// Neccessary for sending port numbers to the RO client until Gravity notices that they forgot ntohs() calls.
+// Necessary for sending port numbers to the RO client until Gravity notices that they forgot ntohs() calls.
uint16 ntows(uint16 netshort)
{
return ((netshort & 0xFF) << 8) | ((netshort & 0xFF00) >> 8);
diff --git a/src/common/socket.h b/src/common/socket.h
index ca9141716..42b0efe3b 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -2,22 +2,22 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SOCKET_H_
-#define _COMMON_SOCKET_H_
+#ifndef COMMON_SOCKET_H
+#define COMMON_SOCKET_H
+
+#include <time.h>
#include "../common/cbasetypes.h"
#ifdef WIN32
- #include "../common/winapi.h"
+# include "../common/winapi.h"
typedef long in_addr_t;
#else
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
+# include <netinet/in.h>
+# include <sys/socket.h>
+# include <sys/types.h>
#endif
-#include <time.h>
-
struct HPluginData;
#define FIFOSIZE_SERVERLINK 256*1024
@@ -174,7 +174,7 @@ struct socket_interface *sockt;
void socket_defaults(void);
/* the purpose of these macros is simply to not make calling them be an annoyance */
-#ifndef _H_SOCKET_C_
+#ifndef H_SOCKET_C
#define make_listen_bind(ip, port) ( sockt->make_listen_bind(ip, port) )
#define make_connection(ip, port, opt) ( sockt->make_connection(ip, port, opt) )
#define realloc_fifo(fd, rfifo_size, wfifo_size) ( sockt->realloc_fifo(fd, rfifo_size, wfifo_size) )
@@ -194,6 +194,6 @@ void socket_defaults(void);
#define ntows(netshort) ( sockt->ntows(netshort) )
#define getips(ips, max) ( sockt->getips(ips, max) )
#define set_eof(fd) ( sockt->set_eof(fd) )
-#endif /* _H_SOCKET_C_ */
+#endif /* H_SOCKET_C */
-#endif /* _COMMON_SOCKET_H_ */
+#endif /* COMMON_SOCKET_H */
diff --git a/src/common/spinlock.h b/src/common/spinlock.h
index 29fbb355b..bde36b8e5 100644
--- a/src/common/spinlock.h
+++ b/src/common/spinlock.h
@@ -1,11 +1,10 @@
-#pragma once
-#ifndef _COMMON_SPINLOCK_H_
-#define _COMMON_SPINLOCK_H_
+#ifndef COMMON_SPINLOCK_H
+#define COMMON_SPINLOCK_H
//
// CAS based Spinlock Implementation
//
-// CamelCase names are choosen to be consistent with microsofts winapi
+// CamelCase names are chosen to be consistent with Microsoft's WinAPI
// which implements CriticalSection by this naming...
//
// Author: Florian Wilkemeyer <fw@f-ws.de>
@@ -15,39 +14,39 @@
//
//
+#include "../common/atomic.h"
+#include "../common/cbasetypes.h"
+#include "../common/thread.h"
+
#ifdef WIN32
#include "../common/winapi.h"
#endif
-#include "../common/cbasetypes.h"
-#include "../common/atomic.h"
-#include "../common/thread.h"
-
#ifdef WIN32
typedef struct __declspec( align(64) ) SPIN_LOCK{
volatile LONG lock;
volatile LONG nest;
volatile LONG sync_lock;
-} SPIN_LOCK, *PSPIN_LOCK;
+} SPIN_LOCK;
#else
typedef struct SPIN_LOCK{
volatile int32 lock;
volatile int32 nest; // nesting level.
volatile int32 sync_lock;
-} __attribute__((aligned(64))) SPIN_LOCK, *PSPIN_LOCK;
+} __attribute__((aligned(64))) SPIN_LOCK;
#endif
-static forceinline void InitializeSpinLock(PSPIN_LOCK lck){
+static forceinline void InitializeSpinLock(SPIN_LOCK *lck){
lck->lock = 0;
lck->nest = 0;
lck->sync_lock = 0;
}
-static forceinline void FinalizeSpinLock(PSPIN_LOCK lck){
+static forceinline void FinalizeSpinLock(SPIN_LOCK *lck){
return;
}
@@ -55,10 +54,10 @@ static forceinline void FinalizeSpinLock(PSPIN_LOCK lck){
#define getsynclock(l) do { if(InterlockedCompareExchange((l), 1, 0) == 0) break; rathread_yield(); } while(/*always*/1)
#define dropsynclock(l) do { InterlockedExchange((l), 0); } while(0)
-static forceinline void EnterSpinLock(PSPIN_LOCK lck){
+static forceinline void EnterSpinLock(SPIN_LOCK *lck){
int tid = rathread_get_tid();
- // Get Sync Lock && Check if the requester thread already owns the lock.
+ // Get Sync Lock && Check if the requester thread already owns the lock.
// if it owns, increase nesting level
getsynclock(&lck->sync_lock);
if(InterlockedCompareExchange(&lck->lock, tid, tid) == tid){
@@ -70,7 +69,7 @@ static forceinline void EnterSpinLock(PSPIN_LOCK lck){
dropsynclock(&lck->sync_lock);
- // Spin until we've got it !
+ // Spin until we've got it !
while(1){
if(InterlockedCompareExchange(&lck->lock, tid, 0) == 0){
@@ -85,7 +84,7 @@ static forceinline void EnterSpinLock(PSPIN_LOCK lck){
}
-static forceinline void LeaveSpinLock(PSPIN_LOCK lck){
+static forceinline void LeaveSpinLock(SPIN_LOCK *lck){
int tid = rathread_get_tid();
getsynclock(&lck->sync_lock);
@@ -101,4 +100,4 @@ static forceinline void LeaveSpinLock(PSPIN_LOCK lck){
-#endif /* _COMMON_SPINLOCK_H_ */
+#endif /* COMMON_SPINLOCK_H */
diff --git a/src/common/sql.c b/src/common/sql.c
index 79ccc8e92..a562478ea 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -2,19 +2,23 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "sql.h"
+
+#include <stdlib.h> // strtoul
+#include <string.h> // strlen/strnlen/memcpy/memset
+
#include "../common/cbasetypes.h"
#include "../common/malloc.h"
#include "../common/showmsg.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "sql.h"
#ifdef WIN32
-#include "../common/winapi.h"
+# include "../common/winapi.h" // Needed before mysql.h
#endif
#include <mysql.h>
-#include <string.h>// strlen/strnlen/memcpy/memset
-#include <stdlib.h>// strtoul
void hercules_mysql_error_handler(unsigned int ecode);
@@ -34,7 +38,7 @@ struct Sql {
// Column length receiver.
-// Takes care of the possible size missmatch between uint32 and unsigned long.
+// Takes care of the possible size mismatch between uint32 and unsigned long.
struct s_column_length {
uint32* out_length;
unsigned long length;
@@ -398,8 +402,7 @@ void Sql_ShowDebug_(Sql* self, const char* debug_file, const unsigned long debug
/// Frees a Sql handle returned by Sql_Malloc.
-void Sql_Free(Sql* self)
-{
+void Sql_Free(Sql* self) {
if( self )
{
SQL->FreeResult(self);
@@ -545,7 +548,7 @@ static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_ty
SHOW_DEBUG_OF(MYSQL_TYPE_NULL);
#undef SHOW_DEBUG_TYPE_OF
}
- ShowDebug("%stype=%s%s, length=%d%s\n", prefix, sign, type_string, length, length_postfix);
+ ShowDebug("%stype=%s%s, length=%d%s\n", prefix, sign, type_string, length, length_postfix);
}
@@ -566,7 +569,7 @@ static void SqlStmt_P_ShowDebugTruncatedColumn(SqlStmt* self, size_t i)
Sql_P_ShowDebugMysqlFieldInfo("data - ", field->type, field->flags&UNSIGNED_FLAG, self->column_lengths[i].length, "");
column = &self->columns[i];
if( column->buffer_type == MYSQL_TYPE_STRING )
- Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, "+1(nul-terminator)");
+ Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, "+1(null-terminator)");
else
Sql_P_ShowDebugMysqlFieldInfo("buffer - ", column->buffer_type, column->is_unsigned, column->buffer_length, "");
mysql_free_result(meta);
@@ -762,10 +765,10 @@ int SqlStmt_BindColumn(SqlStmt* self, size_t idx, enum SqlDataType buffer_type,
{
if( buffer_len < 1 )
{
- ShowDebug("SqlStmt_BindColumn: buffer_len(%d) is too small, no room for the nul-terminator\n", buffer_len);
+ ShowDebug("SqlStmt_BindColumn: buffer_len(%d) is too small, no room for the null-terminator\n", buffer_len);
return SQL_ERROR;
}
- --buffer_len;// nul-terminator
+ --buffer_len;// null-terminator
}
if( !self->bind_columns )
{// initialize the bindings
@@ -888,7 +891,7 @@ int SqlStmt_NextRow(SqlStmt* self)
if( self->column_lengths[i].out_length )
*self->column_lengths[i].out_length = (uint32)length;
if( column->buffer_type == MYSQL_TYPE_STRING )
- {// clear unused part of the string/enum buffer (and nul-terminate)
+ {// clear unused part of the string/enum buffer (and null-terminate)
memset((char*)column->buffer + length, 0, column->buffer_length - length + 1);
}
else if( column->buffer_type == MYSQL_TYPE_BLOB && length < column->buffer_length )
diff --git a/src/common/sql.h b/src/common/sql.h
index 1fb436853..f9593978c 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -2,13 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SQL_H_
-#define _COMMON_SQL_H_
+#ifndef COMMON_SQL_H
+#define COMMON_SQL_H
-#include "../common/cbasetypes.h"
#include <stdarg.h>// va_list
-
+#include "../common/cbasetypes.h"
// Return codes
#define SQL_ERROR (-1)
@@ -148,10 +147,10 @@ struct sql_interface {
///////////////////////////////////////////////////////////////////////////////
// Prepared Statements
///////////////////////////////////////////////////////////////////////////////
- // Parameters are placed in the statement by embedding question mark ('?')
+ // Parameters are placed in the statement by embedding question mark ('?')
// characters into the query at the appropriate positions.
// The markers are legal only in places where they represent data.
- // The markers cannot be inside quotes. Quotes will be added automatically
+ // The markers cannot be inside quotes. Quotes will be added automatically
// when they are required.
//
// example queries with parameters:
@@ -167,7 +166,7 @@ struct sql_interface {
/// It uses the connection of the parent Sql handle.
/// Queries in Sql and SqlStmt are independent and don't affect each other.
///
- /// @return SqlStmt handle or NULL if an error occured
+ /// @return SqlStmt handle or NULL if an error occurred
struct SqlStmt* (*StmtMalloc)(Sql* sql);
@@ -199,7 +198,7 @@ struct sql_interface {
/// Returns the number of parameters in the prepared statement.
///
- /// @return Number or paramenters
+ /// @return Number or parameters
size_t (*StmtNumParams)(SqlStmt* self);
@@ -237,8 +236,8 @@ struct sql_interface {
/// Binds the result of a column to a buffer.
/// The buffer will be filled with data when the next row is fetched.
- /// For string/enum buffer types there has to be enough space for the data
- /// and the nul-terminator (an extra byte).
+ /// For string/enum buffer types there has to be enough space for the data
+ /// and the null-terminator (an extra byte).
///
/// @return SQL_SUCCESS or SQL_ERROR
int (*StmtBindColumn)(SqlStmt* self, size_t idx, SqlDataType buffer_type, void* buffer, size_t buffer_len, uint32* out_length, int8* out_is_null);
@@ -292,4 +291,4 @@ void Sql_HerculesUpdateSkip(Sql* self,const char *filename);
void Sql_Init(void);
-#endif /* _COMMON_SQL_H_ */
+#endif /* COMMON_SQL_H */
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 361595b07..e2382e6fc 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -2,16 +2,19 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#define STRLIB_C
+#define HERCULES_CORE
+
+#define H_STRLIB_C
#include "strlib.h"
+#undef H_STRLIB_C
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
#define J_MAX_MALLOC_SIZE 65535
@@ -144,15 +147,15 @@ char* trim(char* str)
if( start == end )
*str = '\0';// empty string
else
- {// move string with nul terminator
+ {// move string with null-terminator
str[end] = '\0';
memmove(str,str+start,end-start+1);
}
return str;
}
-// Converts one or more consecutive occurences of the delimiters into a single space
-// and removes such occurences from the beginning and end of string
+// Converts one or more consecutive occurrences of the delimiters into a single space
+// and removes such occurrences from the beginning and end of string
// NOTE: make sure the string is not const!!
char* normalize_name(char* str,const char* delims)
{
@@ -189,7 +192,7 @@ char* normalize_name(char* str,const char* delims)
return str;
}
-//stristr: Case insensitive version of strstr, code taken from
+//stristr: Case insensitive version of strstr, code taken from
//http://www.daniweb.com/code/snippet313.html, Dave Sinkula
//
const char* stristr(const char* haystack, const char* needle)
@@ -221,7 +224,7 @@ const char* stristr(const char* haystack, const char* needle)
}
#ifdef __WIN32
-char* _strtok_r(char *s1, const char *s2, char **lasts) {
+char* strtok_r_(char *s1, const char *s2, char **lasts) {
char *ret;
if (s1 == NULL)
@@ -355,18 +358,18 @@ int config_switch(const char* str) {
return (int)strtol(str, NULL, 0);
}
-/// strncpy that always nul-terminates the string
+/// strncpy that always null-terminates the string
char* safestrncpy(char* dst, const char* src, size_t n)
{
if( n > 0 )
{
char* d = dst;
const char* s = src;
- d[--n] = '\0';/* nul-terminate string */
+ d[--n] = '\0';/* null-terminate string */
for( ; n > 0; --n )
{
if( (*d++ = *s++) == '\0' )
- {/* nul-pad remaining bytes */
+ {/* null-pad remaining bytes */
while( --n > 0 )
*d++ = '\0';
break;
@@ -382,12 +385,12 @@ size_t safestrnlen(const char* string, size_t maxlen)
return ( string != NULL ) ? strnlen(string, maxlen) : 0;
}
-/// Works like snprintf, but always nul-terminates the buffer.
-/// Returns the size of the string (without nul-terminator)
+/// Works like snprintf, but always null-terminates the buffer.
+/// Returns the size of the string (without null-terminator)
/// or -1 if the buffer is too small.
///
/// @param buf Target buffer
-/// @param sz Size of the buffer (including nul-terminator)
+/// @param sz Size of the buffer (including null-terminator)
/// @param fmt Format string
/// @param ... Format arguments
/// @return The size of the string or -1 if the buffer is too small
@@ -401,7 +404,7 @@ int safesnprintf(char* buf, size_t sz, const char* fmt, ...)
va_end(ap);
if( ret < 0 || (size_t)ret >= sz )
{// overflow
- buf[sz-1] = '\0';// always nul-terminate
+ buf[sz-1] = '\0';// always null-terminate
return -1;
}
return ret;
@@ -615,21 +618,21 @@ int sv_parse_next(struct s_svstate* svstate)
/// out_pos[0] and out_pos[1] are the start and end of line.
/// Other position pairs are the start and end of fields.
/// Returns the number of fields found or -1 if an error occurs.
-///
+///
/// out_pos can be NULL.
/// If a line terminator is found, the end position is placed there.
-/// out_pos[2] and out_pos[3] for the first field, out_pos[4] and out_pos[5]
+/// out_pos[2] and out_pos[3] for the first field, out_pos[4] and out_pos[5]
/// for the seconds field and so on.
/// Unfilled positions are set to -1.
-///
+///
/// @param str String to parse
/// @param len Length of the string
/// @param startoff Where to start parsing
/// @param delim Field delimiter
/// @param out_pos Array of resulting positions
/// @param npos Size of the pos array
-/// @param opt Options that determine the parsing behaviour
-/// @return Number of fields found in the string or -1 if an error occured
+/// @param opt Options that determine the parsing behavior
+/// @return Number of fields found in the string or -1 if an error occurred
int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, int npos, enum e_svopt opt) {
struct s_svstate svstate;
int count;
@@ -663,21 +666,21 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i
/// WARNING: this function modifies the input string
/// Starts splitting at startoff and fills the out_fields array.
/// out_fields[0] is the start of the next line.
-/// Other entries are the start of fields (nul-teminated).
+/// Other entries are the start of fields (null-terminated).
/// Returns the number of fields found or -1 if an error occurs.
-///
+///
/// out_fields can be NULL.
-/// Fields that don't fit in out_fields are not nul-terminated.
+/// Fields that don't fit in out_fields are not null-terminated.
/// Extra entries in out_fields are filled with the end of the last field (empty string).
-///
+///
/// @param str String to parse
/// @param len Length of the string
/// @param startoff Where to start parsing
/// @param delim Field delimiter
/// @param out_fields Array of resulting fields
/// @param nfields Size of the field array
-/// @param opt Options that determine the parsing behaviour
-/// @return Number of fields found in the string or -1 if an error occured
+/// @param opt Options that determine the parsing behavior
+/// @return Number of fields found in the string or -1 if an error occurred
int sv_split(char* str, int len, int startoff, char delim, char** out_fields, int nfields, enum e_svopt opt) {
int pos[1024];
int i;
diff --git a/src/common/strlib.h b/src/common/strlib.h
index 10844d257..7f84d2893 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -2,27 +2,21 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_STRLIB_H_
-#define _COMMON_STRLIB_H_
+#ifndef COMMON_STRLIB_H
+#define COMMON_STRLIB_H
-#include "../common/cbasetypes.h"
#include <stdarg.h>
+#include <string.h>
-#ifndef __USE_GNU
- #define __USE_GNU // required to enable strnlen on some platforms
- #include <string.h>
- #undef __USE_GNU
-#else
- #include <string.h>
-#endif
+#include "../common/cbasetypes.h"
#ifdef WIN32
#define HAVE_STRTOK_R
- #define strtok_r(s,delim,save_ptr) _strtok_r((s),(delim),(save_ptr))
- char *_strtok_r(char* s1, const char* s2, char** lasts);
+ #define strtok_r(s,delim,save_ptr) strtok_r_((s),(delim),(save_ptr))
+ char *strtok_r_(char* s1, const char* s2, char** lasts);
#endif
-/// Bitfield determining the behaviour of sv_parse and sv_split.
+/// Bitfield determining the behavior of sv_parse and sv_split.
typedef enum e_svopt {
// default: no escapes and no line terminator
SV_NOESCAPE_NOTERMINATE = 0,
@@ -79,14 +73,14 @@ struct strlib_interface {
int (*e_mail_check) (char* email);
int (*config_switch) (const char* str);
- /// strncpy that always nul-terminates the string
+ /// strncpy that always null-terminates the string
char *(*safestrncpy) (char* dst, const char* src, size_t n);
/// doesn't crash on null pointer
size_t (*safestrnlen) (const char* string, size_t maxlen);
- /// Works like snprintf, but always nul-terminates the buffer.
- /// Returns the size of the string (without nul-terminator)
+ /// Works like snprintf, but always null-terminates the buffer.
+ /// Returns the size of the string (without null-terminator)
/// or -1 if the buffer is too small.
int (*safesnprintf) (char* buf, size_t sz, const char* fmt, ...);
@@ -137,7 +131,7 @@ struct sv_interface {
/// WARNING: this function modifies the input string
/// Starts splitting at startoff and fills the out_fields array.
/// out_fields[0] is the start of the next line.
- /// Other entries are the start of fields (nul-teminated).
+ /// Other entries are the start of fields (null-terminated).
/// Returns the number of fields found or -1 if an error occurs.
int (*split) (char* str, int len, int startoff, char delim, char** out_fields, int nfields, enum e_svopt opt);
@@ -165,7 +159,7 @@ struct sv_interface *sv;
void strlib_defaults(void);
/* the purpose of these macros is simply to not make calling them be an annoyance */
-#ifndef STRLIB_C
+#ifndef H_STRLIB_C
#define jstrescape(pt) (strlib->jstrescape(pt))
#define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt)))
#define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size)))
@@ -189,6 +183,6 @@ void strlib_defaults(void);
#define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__))
#define strline(str,pos) (strlib->strline((str),(pos)))
#define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count)))
-#endif /* STRLIB_C */
+#endif /* H_STRLIB_C */
-#endif /* _COMMON_STRLIB_H_ */
+#endif /* COMMON_STRLIB_H */
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
new file mode 100644
index 000000000..605256100
--- /dev/null
+++ b/src/common/sysinfo.c
@@ -0,0 +1,1061 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Base Author: Haru @ http://hercules.ws
+
+/// See sysinfo.h for a description of this file
+
+#define HERCULES_CORE
+
+#include "sysinfo.h"
+
+#include <stdio.h> // fopen
+#include <stdlib.h> // atoi
+
+#include "../common/cbasetypes.h"
+#include "../common/core.h"
+#include "../common/malloc.h"
+#include "../common/strlib.h"
+
+#ifdef WIN32
+# include <string.h> // strlen
+# include <windows.h>
+#else
+# include <unistd.h>
+#endif
+
+/// Private interface fields
+struct sysinfo_private {
+ char *platform;
+ char *osversion;
+ char *cpu;
+ int cpucores;
+ char *arch;
+ char *compiler;
+ char *cflags;
+ char *vcstype_name;
+ int vcstype;
+ char *vcsrevision_src;
+ char *vcsrevision_scripts;
+};
+
+/// sysinfo.c interface source
+struct sysinfo_interface sysinfo_s;
+struct sysinfo_private sysinfo_p;
+
+#define VCSTYPE_UNKNOWN 0
+#define VCSTYPE_GIT 1
+#define VCSTYPE_SVN 2
+#define VCSTYPE_NONE -1
+
+#ifdef WIN32
+/**
+ * Values to be used with GetProductInfo.
+ *
+ * These aren't defined in MSVC2008/WindowsXP, so we gotta define them here.
+ * Values from: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724358%28v=vs.85%29.aspx
+ */
+enum windows_product_type {
+ msPRODUCT_UNDEFINED = 0x00000000, ///< An unknown product
+ msPRODUCT_ULTIMATE = 0x00000001, ///< Ultimate
+ msPRODUCT_HOME_BASIC = 0x00000002, ///< Home Basic
+ msPRODUCT_HOME_PREMIUM = 0x00000003, ///< Home Premium
+ msPRODUCT_ENTERPRISE = 0x00000004, ///< Enterprise
+ msPRODUCT_HOME_BASIC_N = 0x00000005, ///< Home Basic N
+ msPRODUCT_BUSINESS = 0x00000006, ///< Business
+ msPRODUCT_STANDARD_SERVER = 0x00000007, ///< Server Standard
+ msPRODUCT_DATACENTER_SERVER = 0x00000008, ///< Server Datacenter (full installation)
+ msPRODUCT_SMALLBUSINESS_SERVER = 0x00000009, ///< Windows Small Business Server
+ msPRODUCT_ENTERPRISE_SERVER = 0x0000000A, ///< Server Enterprise (full installation)
+ msPRODUCT_STARTER = 0x0000000B, ///< Starter
+ msPRODUCT_DATACENTER_SERVER_CORE = 0x0000000C, ///< Server Datacenter (core installation)
+ msPRODUCT_ENTERPRISE_SERVER_CORE = 0x0000000E, ///< Server Enterprise (core installation)
+ msPRODUCT_STANDARD_SERVER_CORE = 0x0000000D, ///< Server Standard (core installation)
+ msPRODUCT_ENTERPRISE_SERVER_IA64 = 0x0000000F, ///< Server Enterprise for Itanium-based Systems
+ msPRODUCT_BUSINESS_N = 0x00000010, ///< Business N
+ msPRODUCT_WEB_SERVER = 0x00000011, ///< Web Server (full installation)
+ msPRODUCT_CLUSTER_SERVER = 0x00000012, ///< HPC Edition
+ msPRODUCT_HOME_SERVER = 0x00000013, ///< Windows Storage Server 2008 R2 Essentials
+ msPRODUCT_STORAGE_EXPRESS_SERVER = 0x00000014, ///< Storage Server Express
+ msPRODUCT_STORAGE_STANDARD_SERVER = 0x00000015, ///< Storage Server Standard
+ msPRODUCT_STORAGE_WORKGROUP_SERVER = 0x00000016, ///< Storage Server Workgroup
+ msPRODUCT_STORAGE_ENTERPRISE_SERVER = 0x00000017, ///< Storage Server Enterprise
+ msPRODUCT_SERVER_FOR_SMALLBUSINESS = 0x00000018, ///< Windows Server 2008 for Windows Essential Server Solutions
+ msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM = 0x00000019, ///< Small Business Server Premium
+ msPRODUCT_HOME_PREMIUM_N = 0x0000001A, ///< Home Premium N
+ msPRODUCT_ENTERPRISE_N = 0x0000001B, ///< Enterprise N
+ msPRODUCT_ULTIMATE_N = 0x0000001C, ///< Ultimate N
+ msPRODUCT_WEB_SERVER_CORE = 0x0000001D, ///< Web Server (core installation)
+ msPRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT = 0x0000001E, ///< Windows Essential Business Server Management Server
+ msPRODUCT_MEDIUMBUSINESS_SERVER_SECURITY = 0x0000001F, ///< Windows Essential Business Server Security Server
+ msPRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING = 0x00000020, ///< Windows Essential Business Server Messaging Server
+ msPRODUCT_SERVER_FOUNDATION = 0x00000021, ///< Server Foundation
+ msPRODUCT_HOME_PREMIUM_SERVER = 0x00000022, ///< Windows Home Server 2011
+ msPRODUCT_SERVER_FOR_SMALLBUSINESS_V = 0x00000023, ///< Windows Server 2008 without Hyper-V for Windows Essential Server Solutions
+ msPRODUCT_STANDARD_SERVER_V = 0x00000024, ///< Server Standard without Hyper-V
+ msPRODUCT_DATACENTER_SERVER_V = 0x00000025, ///< Server Datacenter without Hyper-V (full installation)
+ msPRODUCT_ENTERPRISE_SERVER_V = 0x00000026, ///< Server Enterprise without Hyper-V (full installation)
+ msPRODUCT_DATACENTER_SERVER_CORE_V = 0x00000027, ///< Server Datacenter without Hyper-V (core installation)
+ msPRODUCT_STANDARD_SERVER_CORE_V = 0x00000028, ///< Server Standard without Hyper-V (core installation)
+ msPRODUCT_ENTERPRISE_SERVER_CORE_V = 0x00000029, ///< Server Enterprise without Hyper-V (core installation)
+ msPRODUCT_HYPERV = 0x0000002A, ///< Microsoft Hyper-V Server
+ msPRODUCT_STORAGE_EXPRESS_SERVER_CORE = 0x0000002B, ///< Storage Server Express (core installation)
+ msPRODUCT_STORAGE_STANDARD_SERVER_CORE = 0x0000002C, ///< Storage Server Standard (core installation)
+ msPRODUCT_STORAGE_WORKGROUP_SERVER_CORE = 0x0000002D, ///< Storage Server Workgroup (core installation)
+ msPRODUCT_STORAGE_ENTERPRISE_SERVER_CORE = 0x0000002E, ///< Storage Server Enterprise (core installation)
+ msPRODUCT_STARTER_N = 0x0000002F, ///< Starter N
+ msPRODUCT_PROFESSIONAL = 0x00000030, ///< Professional
+ msPRODUCT_PROFESSIONAL_N = 0x00000031, ///< Professional N
+ msPRODUCT_SB_SOLUTION_SERVER = 0x00000032, ///< Windows Small Business Server 2011 Essentials
+ msPRODUCT_SERVER_FOR_SB_SOLUTIONS = 0x00000033, ///< Server For SB Solutions
+ msPRODUCT_STANDARD_SERVER_SOLUTIONS = 0x00000034, ///< Server Solutions Premium
+ msPRODUCT_STANDARD_SERVER_SOLUTIONS_CORE = 0x00000035, ///< Server Solutions Premium (core installation)
+ msPRODUCT_SB_SOLUTION_SERVER_EM = 0x00000036, ///< Server For SB Solutions EM
+ msPRODUCT_SERVER_FOR_SB_SOLUTIONS_EM = 0x00000037, ///< Server For SB Solutions EM
+ msPRODUCT_SOLUTION_EMBEDDEDSERVER = 0x00000038, ///< Windows MultiPoint Server
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMT = 0x0000003B, ///< Windows Essential Server Solution Management
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDL = 0x0000003C, ///< Windows Essential Server Solution Additional
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC = 0x0000003D, ///< Windows Essential Server Solution Management SVC
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC = 0x0000003E, ///< Windows Essential Server Solution Additional SVC
+ msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE = 0x0000003F, ///< Small Business Server Premium (core installation)
+ msPRODUCT_CLUSTER_SERVER_V = 0x00000040, ///< Server Hyper Core V
+ msPRODUCT_STARTER_E = 0x00000042, ///< Not supported
+ msPRODUCT_HOME_BASIC_E = 0x00000043, ///< Not supported
+ msPRODUCT_HOME_PREMIUM_E = 0x00000044, ///< Not supported
+ msPRODUCT_PROFESSIONAL_E = 0x00000045, ///< Not supported
+ msPRODUCT_ENTERPRISE_E = 0x00000046, ///< Not supported
+ msPRODUCT_ULTIMATE_E = 0x00000047, ///< Not supported
+ msPRODUCT_ENTERPRISE_EVALUATION = 0x00000048, ///< Server Enterprise (evaluation installation)
+ msPRODUCT_MULTIPOINT_STANDARD_SERVER = 0x0000004C, ///< Windows MultiPoint Server Standard (full installation)
+ msPRODUCT_MULTIPOINT_PREMIUM_SERVER = 0x0000004D, ///< Windows MultiPoint Server Premium (full installation)
+ msPRODUCT_STANDARD_EVALUATION_SERVER = 0x0000004F, ///< Server Standard (evaluation installation)
+ msPRODUCT_DATACENTER_EVALUATION_SERVER = 0x00000050, ///< Server Datacenter (evaluation installation)
+ msPRODUCT_ENTERPRISE_N_EVALUATION = 0x00000054, ///< Enterprise N (evaluation installation)
+ msPRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER = 0x0000005F, ///< Storage Server Workgroup (evaluation installation)
+ msPRODUCT_STORAGE_STANDARD_EVALUATION_SERVER = 0x00000060, ///< Storage Server Standard (evaluation installation)
+ msPRODUCT_CORE_N = 0x00000062, ///< Windows 8 N
+ msPRODUCT_CORE_COUNTRYSPECIFIC = 0x00000063, ///< Windows 8 China
+ msPRODUCT_CORE_SINGLELANGUAGE = 0x00000064, ///< Windows 8 Single Language
+ msPRODUCT_CORE = 0x00000065, ///< Windows 8
+ msPRODUCT_PROFESSIONAL_WMC = 0x00000067, ///< Professional with Media Center
+};
+
+/**
+ * Values to be used with GetSystemMetrics.
+ *
+ * Values from http://msdn.microsoft.com/en-us/library/windows/desktop/ms724385%28v=vs.85%29.aspx
+ */
+enum windows_metrics {
+ msSM_SERVERR2 = 89, ///< Obtains the build number if the system is Windows Server 2003 R2; otherwise, 0.
+};
+
+/**
+ * Values to be used with OSVERSIONINFOEX.wSuiteMask.
+ *
+ * Values from http://msdn.microsoft.com/en-us/library/windows/desktop/ms724833%28v=vs.85%29.aspx
+ */
+enum windows_ver_suite {
+ msVER_SUITE_BLADE = 0x00000400, ///< Windows Server 2003, Web Edition is installed.
+ msVER_SUITE_STORAGE_SERVER = 0x00002000, ///< Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed.
+ msVER_SUITE_COMPUTE_SERVER = 0x00004000, ///< Windows Server 2003, Compute Cluster Edition is installed.
+ msVER_SUITE_WH_SERVER = 0x00008000, ///< Windows Home Server is installed.
+};
+
+#else // not WIN32
+// UNIX. Use build-time cached values
+#include "sysinfo.inc"
+#endif // WIN32
+
+// Compiler detection <http://sourceforge.net/p/predef/wiki/Compilers/>
+#if defined(__BORLANDC__)
+#define SYSINFO_COMPILER "Borland C++"
+#elif defined(__clang__)
+#define SYSINFO_COMPILER "Clang v" EXPAND_AND_QUOTE(__clang_major__) "." EXPAND_AND_QUOTE(__clang_minor__) "." EXPAND_AND_QUOTE(__clang_patchlevel__)
+#elif defined(__INTEL_COMPILER)
+#define SYSINFO_COMPILER "Intel CC v" EXPAND_AND_QUOTE(__INTEL_COMPILER)
+#elif defined(__MINGW32__)
+#if defined(__MINGW64__)
+#define SYSINFO_COMPILER "MinGW-w64 64 Bit v" EXPAND_AND_QUOTE(__MINGW64_VERSION_MAJOR) "." EXPAND_AND_QUOTE(__MINGW64_VERSION_MINOR) \
+ " (MinGW " EXPAND_AND_QUOTE(__MINGW32_MAJOR_VERSION) "." EXPAND_AND_QUOTE(__MINGW32_MINOR_VERSION) ")"
+#elif defined(__MINGW64_VERSION_MAJOR)
+#define SYSINFO_COMPILER "MinGW-w64 32 Bit v" EXPAND_AND_QUOTE(__MINGW64_VERSION_MAJOR) "." EXPAND_AND_QUOTE(__MINGW64_VERSION_MINOR) \
+ " (MinGW " EXPAND_AND_QUOTE(__MINGW32_MAJOR_VERSION) "." EXPAND_AND_QUOTE(__MINGW32_MINOR_VERSION) ")"
+#else
+#define SYSINFO_COMPILER "MinGW32 v" EXPAND_AND_QUOTE(__MINGW32_MAJOR_VERSION) "." EXPAND_AND_QUOTE(__MINGW32_MINOR_VERSION)
+#endif
+#elif defined(__GNUC__)
+#define SYSINFO_COMPILER "GCC v" EXPAND_AND_QUOTE(__GNUC__) "." EXPAND_AND_QUOTE(__GNUC_MINOR__) "." EXPAND_AND_QUOTE(__GNUC_PATCHLEVEL__)
+#elif defined(_MSC_VER)
+#if _MSC_VER >= 1300 && _MSC_VER < 1310
+#define SYSINFO_COMPILER "Microsoft Visual C++ 7.0 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1310 && _MSC_VER < 1400
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2003 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1400 && _MSC_VER < 1500
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2005 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1500 && _MSC_VER < 1600
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2008 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1600 && _MSC_VER < 1700
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2010 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1700 && _MSC_VER < 1800
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2012 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1800 && _MSC_VER < 1900
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2013 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#else // < 1300 || >= 1900
+#define SYSINFO_COMPILER "Microsoft Visual C++ v" EXPAND_AND_QUOTE(_MSC_VER)
+#endif
+#else
+#define SYSINFO_COMPILER "Unknown"
+#endif
+// end compiler detection
+
+/**
+ * Retrieves the current SVN revision.
+ *
+ * @param out[out] a string pointer to return the value (to be aFree()'d.)
+ * @retval true if a revision was correctly detected.
+ * @retval false if no revision was detected. out is set to NULL in this case.
+ */
+bool sysinfo_svn_get_revision(char **out) {
+ // Only include SVN support if detected it, or we're on MSVC
+#if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_SVN || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN
+ FILE *fp;
+
+ // subversion 1.7 uses a sqlite3 database
+ // FIXME this is hackish at best...
+ // - ignores database file structure
+ // - assumes the data in NODES.dav_cache column ends with "!svn/ver/<revision>/<path>)"
+ // - since it's a cache column, the data might not even exist
+ if ((fp = fopen(".svn"PATHSEP_STR"wc.db", "rb")) != NULL || (fp = fopen(".."PATHSEP_STR".svn"PATHSEP_STR"wc.db", "rb")) != NULL) {
+
+#ifndef SVNNODEPATH //not sure how to handle branches, so I'll leave this overridable define until a better solution comes up
+#define SVNNODEPATH trunk
+#endif // SVNNODEPATH
+
+ const char* prefix = "!svn/ver/";
+ const char* postfix = "/"EXPAND_AND_QUOTE(SVNNODEPATH)")"; // there should exist only 1 entry like this
+ size_t prefix_len = strlen(prefix);
+ size_t postfix_len = strlen(postfix);
+ size_t i,j,flen;
+ char* buffer;
+
+ // read file to buffer
+ fseek(fp, 0, SEEK_END);
+ flen = ftell(fp);
+ buffer = (char*)aMalloc(flen + 1);
+ fseek(fp, 0, SEEK_SET);
+ flen = fread(buffer, 1, flen, fp);
+ buffer[flen] = '\0';
+ fclose(fp);
+
+ // parse buffer
+ for (i = prefix_len + 1; i + postfix_len <= flen; ++i) {
+ if (buffer[i] != postfix[0] || memcmp(buffer + i, postfix, postfix_len) != 0)
+ continue; // postfix mismatch
+ for (j = i; j > 0; --j) { // skip digits
+ if (!ISDIGIT(buffer[j - 1]))
+ break;
+ }
+ if (memcmp(buffer + j - prefix_len, prefix, prefix_len) != 0)
+ continue; // prefix mismatch
+ // done
+ if (*out != NULL)
+ aFree(*out);
+ *out = aCalloc(1, 8);
+ snprintf(*out, 8, "%d", atoi(buffer + j));
+ break;
+ }
+ aFree(buffer);
+
+ if (*out != NULL)
+ return true;
+ }
+
+ // subversion 1.6 and older?
+ if ((fp = fopen(".svn/entries", "r")) != NULL) {
+ char line[1024];
+ int rev;
+ // Check the version
+ if (fgets(line, sizeof(line), fp)) {
+ if (!ISDIGIT(line[0])) {
+ // XML File format
+ while (fgets(line,sizeof(line),fp))
+ if (strstr(line,"revision=")) break;
+ if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
+ if (*out != NULL)
+ aFree(*out);
+ *out = aCalloc(1, 8);
+ snprintf(*out, 8, "%d", rev);
+ }
+ } else {
+ // Bin File format
+ if (fgets(line, sizeof(line), fp) == NULL) { printf("Can't get bin name\n"); } // Get the name
+ if (fgets(line, sizeof(line), fp) == NULL) { printf("Can't get entries kind\n"); } // Get the entries kind
+ if (fgets(line, sizeof(line), fp)) { // Get the rev numver
+ if (*out != NULL)
+ aFree(*out);
+ *out = aCalloc(1, 8);
+ snprintf(*out, 8, "%d", atoi(line));
+ }
+ }
+ }
+ fclose(fp);
+
+ if (*out != NULL)
+ return true;
+ }
+#endif
+ if (*out != NULL)
+ aFree(*out);
+ *out = NULL;
+ return false;
+}
+
+/**
+ * Retrieves the current Git revision.
+ *
+ * @param out[out] a string pointer to return the value (to be aFree()'d.)
+ * @retval true if a revision was correctly detected.
+ * @retval false if no revision was detected. out is set to NULL in this case.
+ */
+bool sysinfo_git_get_revision(char **out) {
+ // Only include Git support if we detected it, or we're on MSVC
+#if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_GIT || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN
+ FILE *fp;
+ char ref[128], filepath[128], line[128];
+
+ strcpy(ref, "HEAD");
+
+ while (*ref) {
+ snprintf(filepath, sizeof(filepath), ".git/%s", ref);
+ if ((fp = fopen(filepath, "r")) != NULL) {
+ if (fgets(line, sizeof(line)-1, fp) == NULL) {
+ fclose(fp);
+ break;
+ }
+ fclose(fp);
+ if (sscanf(line, "ref: %127[^\n]", ref) == 1) {
+ continue;
+ } else if (sscanf(line, "%127[a-f0-9]", ref) == 1 && strlen(ref) == 40) {
+ if (*out != NULL)
+ aFree(*out);
+ *out = aStrdup(ref);
+ }
+ }
+ break;
+ }
+ if (*out != NULL)
+ return true;
+#else
+ if (*out != NULL)
+ aFree(*out);
+ *out = NULL;
+#endif
+ return false;
+}
+
+#ifdef WIN32
+
+/// Windows-specific runtime detection functions.
+
+typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+/**
+ * Retrieves the Operating System version (Windows only).
+ *
+ * Once retrieved, the version string is stored into sysinfo->p->osversion.
+ */
+void sysinfo_osversion_retrieve(void) {
+ OSVERSIONINFOEX osvi;
+ StringBuf buf;
+ ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
+ StrBuf->Init(&buf);
+
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+
+ if (sysinfo->p->osversion != NULL) {
+ aFree(sysinfo->p->osversion);
+ sysinfo->p->osversion = NULL;
+ }
+
+ /*
+ * #pragma rantmode (on)
+ * Some engineer at Microsoft moronically decided that, since some applications use this information to do version checks and refuse to
+ * run if they detect a new, unknown version of Windows, now nobody will be able to rely on this information anymore, not even those who
+ * need it for reporting or logging.
+ * The correct fix was to let those applications break, and their developer fix them (and in the meanwhile let the users use the
+ * Compatibility settings to run them) but no, they decided they'd deprecate the API, and make it lie for those who use it, reporting
+ * windows 8 even if they're running on 8.1 or newer.
+ * The API wasn't broken, applications were. Now we have broken applications, and a broken API. Great move, Microsoft. Oh right,
+ * there's the Version API helper functions. Or maybe not, since you can only do 'are we running on at least version X?' checks with
+ * those, it's not what we need.
+ * You know what? I'll just silence your deprecation warning for the time being. Maybe by the time you release the next version of
+ * Windows, you'll have provided a less crippled API or something.
+ * #pragma rantmode (off)
+ */
+#pragma warning (push)
+#pragma warning (disable : 4996)
+ if (!GetVersionEx((OSVERSIONINFO*) &osvi)) {
+ sysinfo->p->osversion = aStrdup("Unknown Version");
+ return;
+ }
+#pragma warning (pop)
+
+ if (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId // Windows NT Family
+ && ((osvi.dwMajorVersion > 4 && osvi.dwMajorVersion < 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 3)) // Between XP and 8.1
+ ) {
+ if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 3) { // Between Vista and 8.1
+ PGPI pGPI;
+ DWORD dwType;
+ if (osvi.dwMinorVersion == 0) {
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows Vista" : "Windows Server 2008");
+ } else if (osvi.dwMinorVersion == 1) {
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows 7" : "Windows Server 2008 R2");
+ } else {
+ // If it's 2, it can be Windows 8, or any newer version (8.1 at the time of writing this) -- see above for the reason.
+ switch (osvi.dwMinorVersion) {
+ case 2:
+ {
+ ULONGLONG mask = 0;
+ OSVERSIONINFOEX osvi2;
+ ZeroMemory(&osvi2, sizeof(OSVERSIONINFOEX));
+ osvi2.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ osvi2.dwMajorVersion = 6;
+ osvi2.dwMinorVersion = 2;
+ VER_SET_CONDITION(mask, VER_MAJORVERSION, VER_LESS_EQUAL);
+ VER_SET_CONDITION(mask, VER_MINORVERSION, VER_LESS_EQUAL);
+ if (VerifyVersionInfo(&osvi2, VER_MAJORVERSION | VER_MINORVERSION, mask)) {
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows 8" : "Windows Server 2012");
+ break;
+ }
+ }
+ case 3:
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows 8.1" : "Windows Server 2012 R2");
+ }
+ }
+
+ pGPI = (PGPI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetProductInfo");
+
+ pGPI(osvi.dwMajorVersion, osvi.dwMinorVersion, 0, 0, &dwType);
+
+ switch (dwType) {
+ case msPRODUCT_ULTIMATE:
+ case msPRODUCT_ULTIMATE_N:
+ StrBuf->AppendStr(&buf, " Ultimate");
+ break;
+ case msPRODUCT_PROFESSIONAL:
+ case msPRODUCT_PROFESSIONAL_N:
+ case msPRODUCT_PROFESSIONAL_WMC:
+ StrBuf->AppendStr(&buf, " Professional");
+ break;
+ case msPRODUCT_HOME_PREMIUM:
+ case msPRODUCT_HOME_PREMIUM_N:
+ StrBuf->AppendStr(&buf, " Home Premium");
+ break;
+ case msPRODUCT_HOME_BASIC:
+ case msPRODUCT_HOME_BASIC_N:
+ StrBuf->AppendStr(&buf, " Home Basic");
+ break;
+ case msPRODUCT_ENTERPRISE:
+ case msPRODUCT_ENTERPRISE_N:
+ case msPRODUCT_ENTERPRISE_SERVER:
+ case msPRODUCT_ENTERPRISE_SERVER_CORE:
+ case msPRODUCT_ENTERPRISE_SERVER_IA64:
+ case msPRODUCT_ENTERPRISE_SERVER_V:
+ case msPRODUCT_ENTERPRISE_SERVER_CORE_V:
+ case msPRODUCT_ENTERPRISE_EVALUATION:
+ case msPRODUCT_ENTERPRISE_N_EVALUATION:
+ StrBuf->AppendStr(&buf, " Enterprise");
+ break;
+ case msPRODUCT_BUSINESS:
+ case msPRODUCT_BUSINESS_N:
+ StrBuf->AppendStr(&buf, " Business");
+ break;
+ case msPRODUCT_STARTER:
+ case msPRODUCT_STARTER_N:
+ StrBuf->AppendStr(&buf, " Starter");
+ break;
+ case msPRODUCT_CLUSTER_SERVER:
+ case msPRODUCT_CLUSTER_SERVER_V:
+ StrBuf->AppendStr(&buf, " Cluster Server");
+ break;
+ case msPRODUCT_DATACENTER_SERVER:
+ case msPRODUCT_DATACENTER_SERVER_CORE:
+ case msPRODUCT_DATACENTER_SERVER_V:
+ case msPRODUCT_DATACENTER_SERVER_CORE_V:
+ case msPRODUCT_DATACENTER_EVALUATION_SERVER:
+ StrBuf->AppendStr(&buf, " Datacenter");
+ break;
+ case msPRODUCT_SMALLBUSINESS_SERVER:
+ case msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM:
+ case msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE:
+ StrBuf->AppendStr(&buf, " Small Business Server");
+ break;
+ case PRODUCT_STANDARD_SERVER:
+ case PRODUCT_STANDARD_SERVER_CORE:
+ case msPRODUCT_STANDARD_SERVER_V:
+ case msPRODUCT_STANDARD_SERVER_CORE_V:
+ case msPRODUCT_STANDARD_EVALUATION_SERVER:
+ StrBuf->AppendStr(&buf, " Standard");
+ break;
+ case msPRODUCT_WEB_SERVER:
+ case msPRODUCT_WEB_SERVER_CORE:
+ StrBuf->AppendStr(&buf, " Web Server");
+ break;
+ case msPRODUCT_STORAGE_EXPRESS_SERVER:
+ case msPRODUCT_STORAGE_STANDARD_SERVER:
+ case msPRODUCT_STORAGE_WORKGROUP_SERVER:
+ case msPRODUCT_STORAGE_ENTERPRISE_SERVER:
+ case msPRODUCT_STORAGE_EXPRESS_SERVER_CORE:
+ case msPRODUCT_STORAGE_STANDARD_SERVER_CORE:
+ case msPRODUCT_STORAGE_WORKGROUP_SERVER_CORE:
+ case msPRODUCT_STORAGE_ENTERPRISE_SERVER_CORE:
+ case msPRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER:
+ case msPRODUCT_STORAGE_STANDARD_EVALUATION_SERVER:
+ StrBuf->AppendStr(&buf, " Storage Server");
+ break;
+ case msPRODUCT_HOME_SERVER:
+ case msPRODUCT_SERVER_FOR_SMALLBUSINESS:
+ case msPRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT:
+ case msPRODUCT_MEDIUMBUSINESS_SERVER_SECURITY:
+ case msPRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING:
+ case msPRODUCT_SERVER_FOR_SMALLBUSINESS_V:
+ case msPRODUCT_SERVER_FOUNDATION:
+ case msPRODUCT_HOME_PREMIUM_SERVER:
+ case msPRODUCT_HYPERV:
+ case msPRODUCT_SB_SOLUTION_SERVER:
+ case msPRODUCT_SERVER_FOR_SB_SOLUTIONS:
+ case msPRODUCT_STANDARD_SERVER_SOLUTIONS:
+ case msPRODUCT_STANDARD_SERVER_SOLUTIONS_CORE:
+ case msPRODUCT_SB_SOLUTION_SERVER_EM:
+ case msPRODUCT_SERVER_FOR_SB_SOLUTIONS_EM:
+ case msPRODUCT_SOLUTION_EMBEDDEDSERVER:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMT:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDL:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC:
+ case msPRODUCT_MULTIPOINT_STANDARD_SERVER:
+ case msPRODUCT_MULTIPOINT_PREMIUM_SERVER:
+ StrBuf->AppendStr(&buf, " Server (other)");
+ break;
+ case msPRODUCT_CORE_N:
+ case msPRODUCT_CORE_COUNTRYSPECIFIC:
+ case msPRODUCT_CORE_SINGLELANGUAGE:
+ case msPRODUCT_CORE:
+ StrBuf->AppendStr(&buf, " Workstation (other)");
+ break;
+ }
+
+ } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) { // XP x64 and Server 2003
+ if (osvi.wProductType == VER_NT_WORKSTATION) {
+ StrBuf->AppendStr(&buf, "Windows XP Professional");
+ } else {
+ if (GetSystemMetrics(msSM_SERVERR2))
+ StrBuf->AppendStr(&buf, "Windows Server 2003 R2");
+ else if (osvi.wSuiteMask & msVER_SUITE_STORAGE_SERVER)
+ StrBuf->AppendStr(&buf, "Windows Storage Server 2003");
+ else if (osvi.wSuiteMask & msVER_SUITE_WH_SERVER)
+ StrBuf->AppendStr(&buf, "Windows Home Server");
+ else
+ StrBuf->AppendStr(&buf, "Windows Server 2003");
+
+ // Test for the server type.
+ if (osvi.wSuiteMask & msVER_SUITE_COMPUTE_SERVER)
+ StrBuf->AppendStr(&buf, " Compute Cluster");
+ else if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ StrBuf->AppendStr(&buf, " Datacenter");
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ StrBuf->AppendStr(&buf, " Enterprise");
+ else if (osvi.wSuiteMask & msVER_SUITE_BLADE)
+ StrBuf->AppendStr(&buf, " Web");
+ else
+ StrBuf->AppendStr(&buf, " Standard");
+ }
+ } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) { // XP
+ StrBuf->AppendStr(&buf, "Windows XP");
+ if (osvi.wSuiteMask & VER_SUITE_EMBEDDEDNT)
+ StrBuf->AppendStr(&buf, " Embedded");
+ else if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
+ StrBuf->AppendStr(&buf, " Home");
+ else
+ StrBuf->AppendStr(&buf, " Professional");
+ } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) { // 2000
+ StrBuf->AppendStr(&buf, "Windows 2000");
+
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ StrBuf->AppendStr(&buf, " Professional");
+ else if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ StrBuf->AppendStr(&buf, " Datacenter Server");
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ StrBuf->AppendStr(&buf, " Advanced Server");
+ else
+ StrBuf->AppendStr(&buf, " Server");
+ } else {
+ StrBuf->Printf(&buf, "Unknown Windows version %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
+ }
+ }
+
+ // Include service pack (if any) and build number.
+
+ if (strlen(osvi.szCSDVersion) > 0) {
+ StrBuf->Printf(&buf, " %s", osvi.szCSDVersion);
+ }
+
+ StrBuf->Printf(&buf, " (build %d)", osvi.dwBuildNumber);
+
+ sysinfo->p->osversion = aStrdup(StrBuf->Value(&buf));
+
+ StrBuf->Destroy(&buf);
+ return;
+}
+
+typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
+
+/**
+ * Retrieves SYSTEM_INFO (Windows only)
+ * System info is not stored anywhere after retrieval
+ * @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx
+ **/
+void sysinfo_systeminfo_retrieve( LPSYSTEM_INFO info ) {
+ PGNSI pGNSI;
+
+ // Call GetNativeSystemInfo if supported or GetSystemInfo otherwise.
+ pGNSI = (PGNSI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo");
+ if (NULL != pGNSI)
+ pGNSI(info);
+ else
+ GetSystemInfo(info);
+
+ return;
+}
+
+/**
+ * Returns number of bytes in a memory page
+ * Only needed when compiling with MSVC
+ **/
+long sysinfo_getpagesize( void ) {
+ SYSTEM_INFO si;
+ ZeroMemory(&si, sizeof(SYSTEM_INFO));
+
+ sysinfo_systeminfo_retrieve(&si);
+ return si.dwPageSize;
+}
+
+/**
+ * Retrieves the CPU type (Windows only).
+ *
+ * Once retrieved, the name is stored into sysinfo->p->cpu and the
+ * number of cores in sysinfo->p->cpucores.
+ */
+void sysinfo_cpu_retrieve(void) {
+ StringBuf buf;
+ SYSTEM_INFO si;
+ ZeroMemory(&si, sizeof(SYSTEM_INFO));
+ StrBuf->Init(&buf);
+
+ if (sysinfo->p->cpu != NULL) {
+ aFree(sysinfo->p->cpu);
+ sysinfo->p->cpu = NULL;
+ }
+
+ sysinfo_systeminfo_retrieve(&si);
+
+ if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL
+ || si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64
+ ) {
+ StrBuf->Printf(&buf, "%s CPU, Family %d, Model %d, Stepping %d",
+ si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL ? "x86" : "x86_64",
+ si.wProcessorLevel,
+ (si.wProcessorRevision&0xff00)>>8,
+ (si.wProcessorRevision&0xff));
+ } else {
+ StrBuf->AppendStr(&buf, "Unknown");
+ }
+
+ sysinfo->p->cpu = aStrdup(StrBuf->Value(&buf));
+ sysinfo->p->cpucores = si.dwNumberOfProcessors;
+
+ StrBuf->Destroy(&buf);
+}
+
+/**
+ * Retrieves the OS architecture (Windows only).
+ *
+ * Once retrieved, the name is stored into sysinfo->p->arch.
+ */
+void sysinfo_arch_retrieve(void) {
+ SYSTEM_INFO si;
+ ZeroMemory(&si, sizeof(SYSTEM_INFO));
+
+ if (sysinfo->p->arch != NULL) {
+ aFree(sysinfo->p->arch);
+ sysinfo->p->arch = NULL;
+ }
+
+ sysinfo_systeminfo_retrieve(&si);
+
+ if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) // x64
+ sysinfo->p->arch = aStrdup("x86_64");
+ else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) // x32
+ sysinfo->p->arch = aStrdup("x86");
+ else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_ARM) // ARM
+ sysinfo->p->arch = aStrdup("ARM");
+ else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) // Itanium
+ sysinfo->p->arch = aStrdup("IA-64");
+ else
+ sysinfo->p->arch = aStrdup("Unknown");
+}
+
+/**
+ * Retrieves the startup-time VCS revision information.
+ *
+ * Once retrieved, the value is stored in sysinfo->p->vcsrevision_src.
+ */
+void sysinfo_vcsrevision_src_retrieve(void) {
+ if (sysinfo->p->vcsrevision_src != NULL) {
+ aFree(sysinfo->p->vcsrevision_src);
+ sysinfo->p->vcsrevision_src = NULL;
+ }
+ // Try Git, then SVN
+ if (sysinfo_git_get_revision(&sysinfo->p->vcsrevision_src)) {
+ sysinfo->p->vcstype = VCSTYPE_GIT;
+ return;
+ }
+ if (sysinfo_svn_get_revision(&sysinfo->p->vcsrevision_src)) {
+ sysinfo->p->vcstype = VCSTYPE_SVN;
+ return;
+ }
+ sysinfo->p->vcstype = VCSTYPE_NONE;
+ sysinfo->p->vcsrevision_src = aStrdup("Unknown");
+}
+#endif // WIN32
+
+/**
+ * Retrieves the VCS type name.
+ *
+ * Once retrieved, the value is stored in sysinfo->p->vcstype_name.
+ */
+void sysinfo_vcstype_name_retrieve(void) {
+ if (sysinfo->p->vcstype_name != NULL) {
+ aFree(sysinfo->p->vcstype_name);
+ sysinfo->p->vcstype_name = NULL;
+ }
+ switch (sysinfo->p->vcstype) {
+ case VCSTYPE_GIT:
+ sysinfo->p->vcstype_name = aStrdup("Git");
+ break;
+ case VCSTYPE_SVN:
+ sysinfo->p->vcstype_name = aStrdup("SVN");
+ break;
+ default:
+ sysinfo->p->vcstype_name = aStrdup("Exported");
+ break;
+ }
+}
+
+/**
+ * Returns the platform (OS type) this application is running on.
+ *
+ * This information is cached at compile time, since it's unlikely to change.
+ *
+ * @return the OS platform name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Linux", "Darwin", "Windows", etc.
+ */
+const char *sysinfo_platform(void) {
+ return sysinfo->p->platform;
+}
+
+/**
+ * Returns the Operating System version the application is running on.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the OS name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Windows 2008 Small Business Server", "OS X 10.8 Mountain Lion",
+ * "Gentoo Base System Release 2.2", "Debian GNU/Linux 6.0.6 (squeeze)", etc.
+ */
+const char *sysinfo_osversion(void) {
+ return sysinfo->p->osversion;
+}
+
+/**
+ * Returns the CPU model the application is running on.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the CPU model name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Intel(R) Atom(TM) CPU D2500 @ 1.86GHz",
+ * "Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz", "Intel Core i7",
+ * "x86 CPU, Family 6, Model 54, Stepping 1", etc.
+ */
+const char *sysinfo_cpu(void) {
+ return sysinfo->p->cpu;
+}
+
+/**
+ * Returns the number of CPU cores available.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the number of CPU cores.
+ */
+int sysinfo_cpucores(void) {
+ return sysinfo->p->cpucores;
+}
+
+/**
+ * Returns the CPU architecture the application was compiled for.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the CPU architecture name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "x86", "x86_64", "IA-64", "ARM", etc.
+ */
+const char *sysinfo_arch(void) {
+ return sysinfo->p->arch;
+}
+
+/**
+ * Returns info about the 32 or 64 bit build of Hercules.
+ *
+ * @retval true if this is a 64 bit build.
+ * @retval false if this isn't a 64 bit build (i.e. it is a 32 bit build).
+ */
+bool sysinfo_is64bit(void) {
+#ifdef _LP64
+ return true;
+#else
+ return false;
+#endif
+}
+
+/**
+ * Returns the compiler the application was compiled with.
+ *
+ * @return the compiler name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Microsoft Visual C++ 2012 (v170050727)",
+ * "Clang v5.0.0", "MinGW32 v3.20", "GCC v4.7.3", etc.
+ */
+const char *sysinfo_compiler(void) {
+ return sysinfo->p->compiler;
+}
+
+/**
+ * Returns the compiler flags the application was compiled with.
+ *
+ * On Windows (MSVC), an empty string is returned instead.
+ *
+ * @return the compiler flags.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "-ggdb -O2 -flto -pipe -ffast-math ..."
+ */
+const char *sysinfo_cflags(void) {
+ return sysinfo->p->cflags;
+}
+
+/**
+ * Returns the Version Control System the application was downloaded with.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time. On Windows (MSVC), it is cached when the function is first
+ * called (most likely on server startup).
+ *
+ * @return the VCS type (numerical).
+ *
+ * @see VCSTYPE_NONE, VCSTYPE_GIT, VCSTYPE_SVN, VCSTYPE_UNKNOWN
+ */
+int sysinfo_vcstypeid(void) {
+ return sysinfo->p->vcstype;
+}
+
+/**
+ * Returns the Version Control System the application was downloaded with.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time. On Windows (MSVC), it is cached when the function is first
+ * called (most likely on server startup).
+ *
+ * @return the VCS type.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Git", "SVN", "Exported"
+ */
+const char *sysinfo_vcstype(void) {
+ return sysinfo->p->vcstype_name;
+}
+
+/**
+ * Returns the Version Control System revision.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time for better reliability. On Windows (MSVC), it is cached when
+ * the function is first called (most likely on server startup), so it may
+ * diverge from the actual revision that was compiled.
+ *
+ * @return the VCS revision.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546"
+ */
+const char *sysinfo_vcsrevision_src(void) {
+ return sysinfo->p->vcsrevision_src;
+}
+
+/**
+ * Returns the Version Control System revision.
+ *
+ * This information is cached during a script reload, so that it matches the
+ * version of the loaded scripts.
+ *
+ * @return the VCS revision.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546"
+ */
+const char *sysinfo_vcsrevision_scripts(void) {
+ return sysinfo->p->vcsrevision_scripts;
+}
+
+/**
+ * Reloads the run-time (scripts) VCS revision information. To be used during
+ * script reloads to refresh the cached version.
+ */
+void sysinfo_vcsrevision_reload(void) {
+ if (sysinfo->p->vcsrevision_scripts != NULL) {
+ aFree(sysinfo->p->vcsrevision_scripts);
+ sysinfo->p->vcsrevision_scripts = NULL;
+ }
+ // Try Git, then SVN
+ if (sysinfo_git_get_revision(&sysinfo->p->vcsrevision_scripts)) {
+ return;
+ }
+ if (sysinfo_svn_get_revision(&sysinfo->p->vcsrevision_scripts)) {
+ return;
+ }
+ sysinfo->p->vcsrevision_scripts = aStrdup("Unknown");
+}
+
+/**
+ * Checks if we're running (unnecessarily) as superuser.
+ *
+ * @retval true if the current process is running as UNIX super-user.
+ * @retval false if the current process is running as regular user, or
+ * in any case under Windows.
+ */
+bool sysinfo_is_superuser(void) {
+#ifndef _WIN32
+ if (geteuid() == 0)
+ return true;
+#endif
+ return false;
+}
+
+/**
+ * Interface runtime initialization.
+ */
+void sysinfo_init(void) {
+ sysinfo->p->compiler = SYSINFO_COMPILER;
+#ifdef WIN32
+ sysinfo->p->platform = "Windows";
+ sysinfo->p->cflags = "N/A";
+ sysinfo_osversion_retrieve();
+ sysinfo_cpu_retrieve();
+ sysinfo_arch_retrieve();
+ sysinfo_vcsrevision_src_retrieve();
+#else
+ sysinfo->p->platform = SYSINFO_PLATFORM;
+ sysinfo->p->osversion = SYSINFO_OSVERSION;
+ sysinfo->p->cpucores = SYSINFO_CPUCORES;
+ sysinfo->p->cpu = SYSINFO_CPU;
+ sysinfo->p->arch = SYSINFO_ARCH;
+ sysinfo->p->cflags = SYSINFO_CFLAGS;
+ sysinfo->p->vcstype = SYSINFO_VCSTYPE;
+ sysinfo->p->vcsrevision_src = SYSINFO_VCSREV;
+#endif
+ sysinfo->vcsrevision_reload();
+ sysinfo_vcstype_name_retrieve(); // Must be called after setting vcstype
+}
+
+/**
+ * Interface shutdown cleanup.
+ */
+void sysinfo_final(void) {
+#ifdef WIN32
+ // Only need to be free'd in win32, they're #defined elsewhere
+ if (sysinfo->p->osversion)
+ aFree(sysinfo->p->osversion);
+ if (sysinfo->p->cpu)
+ aFree(sysinfo->p->cpu);
+ if (sysinfo->p->arch)
+ aFree(sysinfo->p->arch);
+ if (sysinfo->p->vcsrevision_src)
+ aFree(sysinfo->p->vcsrevision_src);
+#endif
+ sysinfo->p->platform = NULL;
+ sysinfo->p->osversion = NULL;
+ sysinfo->p->cpu = NULL;
+ sysinfo->p->arch = NULL;
+ sysinfo->p->vcsrevision_src = NULL;
+ sysinfo->p->cflags = NULL;
+ if (sysinfo->p->vcsrevision_scripts)
+ aFree(sysinfo->p->vcsrevision_scripts);
+ sysinfo->p->vcsrevision_scripts = NULL;
+ if (sysinfo->p->vcstype_name)
+ aFree(sysinfo->p->vcstype_name);
+ sysinfo->p->vcstype_name = NULL;
+}
+
+/**
+ * Interface default values initialization.
+ */
+void sysinfo_defaults(void) {
+ sysinfo = &sysinfo_s;
+ memset(&sysinfo_p, '\0', sizeof(sysinfo_p));
+ sysinfo->p = &sysinfo_p;
+#if defined(WIN32) && !defined(__CYGWIN__)
+ sysinfo->getpagesize = sysinfo_getpagesize;
+#else
+ sysinfo->getpagesize = getpagesize;
+#endif
+ sysinfo->platform = sysinfo_platform;
+ sysinfo->osversion = sysinfo_osversion;
+ sysinfo->cpu = sysinfo_cpu;
+ sysinfo->cpucores = sysinfo_cpucores;
+ sysinfo->arch = sysinfo_arch;
+ sysinfo->is64bit = sysinfo_is64bit;
+ sysinfo->compiler = sysinfo_compiler;
+ sysinfo->cflags = sysinfo_cflags;
+ sysinfo->vcstype = sysinfo_vcstype;
+ sysinfo->vcstypeid = sysinfo_vcstypeid;
+ sysinfo->vcsrevision_src = sysinfo_vcsrevision_src;
+ sysinfo->vcsrevision_scripts = sysinfo_vcsrevision_scripts;
+ sysinfo->vcsrevision_reload = sysinfo_vcsrevision_reload;
+ sysinfo->is_superuser = sysinfo_is_superuser;
+ sysinfo->init = sysinfo_init;
+ sysinfo->final = sysinfo_final;
+}
diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h
new file mode 100644
index 000000000..600206a21
--- /dev/null
+++ b/src/common/sysinfo.h
@@ -0,0 +1,51 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Base Author: Haru @ http://hercules.ws
+
+#ifndef COMMON_SYSINFO_H
+#define COMMON_SYSINFO_H
+
+/**
+ * Provides various bits of information about the system Hercules is running on
+ * (note: on unix systems, to avoid runtime detection, most of the data is
+ * cached at compile time)
+ */
+
+#include "../common/cbasetypes.h"
+
+struct sysinfo_private;
+
+/**
+ * sysinfo.c interface
+ **/
+struct sysinfo_interface {
+ struct sysinfo_private *p;
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+ long (*getpagesize) (void);
+#else
+ int (*getpagesize) (void);
+#endif
+ const char *(*platform) (void);
+ const char *(*osversion) (void);
+ const char *(*cpu) (void);
+ int (*cpucores) (void);
+ const char *(*arch) (void);
+ bool (*is64bit) (void);
+ const char *(*compiler) (void);
+ const char *(*cflags) (void);
+ const char *(*vcstype) (void);
+ int (*vcstypeid) (void);
+ const char *(*vcsrevision_src) (void);
+ const char *(*vcsrevision_scripts) (void);
+ void (*vcsrevision_reload) (void);
+ bool (*is_superuser) (void);
+ void (*init) (void);
+ void (*final) (void);
+};
+
+struct sysinfo_interface *sysinfo;
+
+void sysinfo_defaults(void);
+
+#endif /* COMMON_SYSINFO_H */
diff --git a/src/common/thread.c b/src/common/thread.c
index 4d110f2dd..1d0285302 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -6,30 +6,32 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
+#define HERCULES_CORE
+
+#include "thread.h"
+
+#include "../common/sysinfo.h" // sysinfo->getpagesize()
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+
#ifdef WIN32
-#include "../common/winapi.h"
-#define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.)
-#define __thread __declspec( thread )
+# include "../common/winapi.h"
+# define __thread __declspec( thread )
#else
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#include <pthread.h>
-#include <sched.h>
+# include <pthread.h>
+# include <sched.h>
+# include <signal.h>
+# include <stdlib.h>
+# include <string.h>
+# include <unistd.h>
#endif
-#include "cbasetypes.h"
-#include "malloc.h"
-#include "showmsg.h"
-#include "thread.h"
-
// When Compiling using MSC (on win32..) we know we have support in any case!
-#ifdef _MSC_VER
-#define HAS_TLS
+#ifdef _MSC_VER
+#define HAS_TLS
#endif
-
#define RA_THREADS_MAX 64
struct rAthread {
@@ -37,7 +39,7 @@ struct rAthread {
RATHREAD_PRIO prio;
rAthreadProc proc;
- void *param;
+ void *param;
#ifdef WIN32
HANDLE hThread;
@@ -57,7 +59,7 @@ __thread int g_rathread_ID = -1;
///
static struct rAthread l_threads[RA_THREADS_MAX];
-void rathread_init(){
+void rathread_init(void) {
register unsigned int i;
memset(&l_threads, 0x00, RA_THREADS_MAX * sizeof(struct rAthread) );
@@ -65,7 +67,7 @@ void rathread_init(){
l_threads[i].myID = i;
}
- // now lets init thread id 0, which represnts the main thread
+ // now lets init thread id 0, which represents the main thread
#ifdef HAS_TLS
g_rathread_ID = 0;
#endif
@@ -76,12 +78,12 @@ void rathread_init(){
-void rathread_final(){
+void rathread_final(void) {
register unsigned int i;
- // Unterminated Threads Left?
- // Should'nt happen ..
- // Kill 'em all!
+ // Unterminated Threads Left?
+ // Shouldn't happen ..
+ // Kill 'em all!
//
for(i = 1; i < RA_THREADS_MAX; i++){
if(l_threads[i].proc != NULL){
@@ -96,7 +98,7 @@ void rathread_final(){
// gets called whenever a thread terminated ..
-static void rat_thread_terminated(rAthread handle) {
+static void rat_thread_terminated(rAthread *handle) {
// Preserve handle->myID and handle->hThread, set everything else to its default value
handle->param = NULL;
handle->proc = NULL;
@@ -104,23 +106,23 @@ static void rat_thread_terminated(rAthread handle) {
}//end: rat_thread_terminated()
#ifdef WIN32
-DWORD WINAPI _raThreadMainRedirector(LPVOID p){
+DWORD WINAPI raThreadMainRedirector(LPVOID p){
#else
-static void *_raThreadMainRedirector( void *p ){
+static void *raThreadMainRedirector( void *p ){
sigset_t set; // on Posix Thread platforms
#endif
void *ret;
// Update myID @ TLS to right id.
#ifdef HAS_TLS
- g_rathread_ID = ((rAthread)p)->myID;
+ g_rathread_ID = ((rAthread*)p)->myID;
#endif
#ifndef WIN32
// When using posix threads
- // the threads inherits the Signal mask from the thread which's spawned
+ // the threads inherits the Signal mask from the thread which spawned
// this thread
- // so we've to block everything we dont care about.
+ // so we've to block everything we don't care about.
sigemptyset(&set);
sigaddset(&set, SIGINT);
sigaddset(&set, SIGTERM);
@@ -131,19 +133,19 @@ static void *_raThreadMainRedirector( void *p ){
#endif
- ret = ((rAthread)p)->proc( ((rAthread)p)->param ) ;
+ ret = ((rAthread*)p)->proc( ((rAthread*)p)->param ) ;
-#ifdef WIN32
- CloseHandle( ((rAthread)p)->hThread );
+#ifdef WIN32
+ CloseHandle( ((rAthread*)p)->hThread );
#endif
- rat_thread_terminated( (rAthread)p );
+ rat_thread_terminated( (rAthread*)p );
#ifdef WIN32
return (DWORD)ret;
#else
return ret;
#endif
-}//end: _raThreadMainRedirector()
+}//end: raThreadMainRedirector()
@@ -151,28 +153,28 @@ static void *_raThreadMainRedirector( void *p ){
///
/// API Level
-///
-rAthread rathread_create( rAthreadProc entryPoint, void *param ){
+///
+rAthread *rathread_create(rAthreadProc entryPoint, void *param) {
return rathread_createEx( entryPoint, param, (1<<23) /*8MB*/, RAT_PRIO_NORMAL );
}//end: rathread_create()
-rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szStack, RATHREAD_PRIO prio ){
+rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack, RATHREAD_PRIO prio) {
#ifndef WIN32
pthread_attr_t attr;
#endif
size_t tmp;
unsigned int i;
- rAthread handle = NULL;
+ rAthread *handle = NULL;
// given stacksize aligned to systems pagesize?
- tmp = szStack % getpagesize();
+ tmp = szStack % sysinfo->getpagesize();
if(tmp != 0)
szStack += tmp;
- // Get a free Thread Slot.
+ // Get a free Thread Slot.
for(i = 0; i < RA_THREADS_MAX; i++){
if(l_threads[i].proc == NULL){
handle = &l_threads[i];
@@ -191,12 +193,12 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta
handle->param = param;
#ifdef WIN32
- handle->hThread = CreateThread(NULL, szStack, _raThreadMainRedirector, (void*)handle, 0, NULL);
+ handle->hThread = CreateThread(NULL, szStack, raThreadMainRedirector, (void*)handle, 0, NULL);
#else
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, szStack);
- if(pthread_create(&handle->hThread, &attr, _raThreadMainRedirector, (void*)handle) != 0){
+ if(pthread_create(&handle->hThread, &attr, raThreadMainRedirector, (void*)handle) != 0){
handle->proc = NULL;
handle->param = NULL;
return NULL;
@@ -210,7 +212,7 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta
}//end: rathread_createEx
-void rathread_destroy ( rAthread handle ){
+void rathread_destroy(rAthread *handle) {
#ifdef WIN32
if( TerminateThread(handle->hThread, 0) != FALSE){
CloseHandle(handle->hThread);
@@ -219,24 +221,23 @@ void rathread_destroy ( rAthread handle ){
#else
if( pthread_cancel( handle->hThread ) == 0){
- // We have to join it, otherwise pthread wont re-cycle its internal ressources assoc. with this thread.
- //
+ // We have to join it, otherwise pthread wont re-cycle its internal resources assoc. with this thread.
pthread_join( handle->hThread, NULL );
- // Tell our manager to release ressources ;)
+ // Tell our manager to release resources ;)
rat_thread_terminated(handle);
}
#endif
}//end: rathread_destroy()
-rAthread rathread_self( ){
+rAthread *rathread_self(void) {
#ifdef HAS_TLS
- rAthread handle = &l_threads[g_rathread_ID];
+ rAthread *handle = &l_threads[g_rathread_ID];
- if(handle->proc != NULL) // entry point set, so its used!
+ if(handle->proc != NULL) // entry point set, so its used!
return handle;
#else
- // .. so no tls means we have to search the thread by its api-handle ..
+ // .. so no tls means we have to search the thread by its api-handle ..
int i;
#ifdef WIN32
@@ -254,16 +255,16 @@ rAthread rathread_self( ){
#endif
- return NULL;
+ return NULL;
}//end: rathread_self()
-int rathread_get_tid(){
+int rathread_get_tid(void) {
-#ifdef HAS_TLS
+#ifdef HAS_TLS
return g_rathread_ID;
#else
- // todo
+ // TODO
#ifdef WIN32
return (int)GetCurrentThreadId();
#else
@@ -275,7 +276,7 @@ int rathread_get_tid(){
}//end: rathread_get_tid()
-bool rathread_wait( rAthread handle, void* *out_exitCode ){
+bool rathread_wait(rAthread *handle, void **out_exitCode) {
// Hint:
// no thread data cleanup routine call here!
@@ -283,7 +284,7 @@ bool rathread_wait( rAthread handle, void* *out_exitCode ){
//
#ifdef WIN32
WaitForSingleObject(handle->hThread, INFINITE);
- return true;
+ return true;
#else
if(pthread_join(handle->hThread, out_exitCode) == 0)
return true;
@@ -293,21 +294,21 @@ bool rathread_wait( rAthread handle, void* *out_exitCode ){
}//end: rathread_wait()
-void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio ){
- handle->prio = RAT_PRIO_NORMAL;
- //@TODO
+void rathread_prio_set(rAthread *handle, RATHREAD_PRIO prio) {
+ handle->prio = RAT_PRIO_NORMAL;
+ //@TODO
}//end: rathread_prio_set()
-RATHREAD_PRIO rathread_prio_get( rAthread handle){
+RATHREAD_PRIO rathread_prio_get(rAthread *handle) {
return handle->prio;
}//end: rathread_prio_get()
-void rathread_yield(){
-#ifdef WIN32
+void rathread_yield(void) {
+#ifdef WIN32
SwitchToThread();
#else
sched_yield();
-#endif
+#endif
}//end: rathread_yield()
diff --git a/src/common/thread.h b/src/common/thread.h
index d6b2bbc6e..c7582366d 100644
--- a/src/common/thread.h
+++ b/src/common/thread.h
@@ -1,19 +1,18 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#pragma once
-#ifndef _COMMON_THREAD_H_
-#define _COMMON_THREAD_H_
+#ifndef COMMON_THREAD_H
+#define COMMON_THREAD_H
#include "../common/cbasetypes.h"
-typedef struct rAthread *rAthread;
+typedef struct rAthread rAthread;
typedef void* (*rAthreadProc)(void*);
typedef enum RATHREAD_PRIO {
RAT_PRIO_LOW = 0,
RAT_PRIO_NORMAL,
- RAT_PRIO_HIGH
+ RAT_PRIO_HIGH
} RATHREAD_PRIO;
@@ -21,99 +20,99 @@ typedef enum RATHREAD_PRIO {
* Creates a new Thread
*
* @param entyPoint - entryProc,
- * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint.
- *
+ * @param param - general purpose parameter, would be given as parameter to the thread's entry point.
+ *
* @return not NULL if success
*/
-rAthread rathread_create( rAthreadProc entryPoint, void *param );
+rAthread *rathread_create(rAthreadProc entryPoint, void *param);
-/**
+/**
* Creates a new Thread (with more creation options)
*
* @param entyPoint - entryProc,
- * @param param - general purpose parameter, would be given as parameter to the thread's entrypoint
- * @param szStack - stack Size in bytes
+ * @param param - general purpose parameter, would be given as parameter to the thread's entry point
+ * @param szStack - stack Size in bytes
* @param prio - Priority of the Thread @ OS Scheduler..
*
* @return not NULL if success
*/
-rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szStack, RATHREAD_PRIO prio );
+rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack, RATHREAD_PRIO prio);
/**
- * Destroys the given Thread immediatly
+ * Destroys the given Thread immediately
*
- * @note The Handle gets invalid after call! dont use it afterwards.
+ * @note The Handle gets invalid after call! don't use it afterwards.
*
* @param handle - thread to destroy.
*/
-void rathread_destroy ( rAthread handle );
+void rathread_destroy(rAthread *handle);
-/**
+/**
* Returns the thread handle of the thread calling this function
- *
- * @note this wont work @ programms main thread
- * @note the underlying implementation might not perform very well, cache the value received!
- *
+ *
+ * @note this wont work @ programs main thread
+ * @note the underlying implementation might not perform very well, cache the value received!
+ *
* @return not NULL if success
*/
-rAthread rathread_self( );
+rAthread *rathread_self(void);
/**
- * Returns own thrad id (TID)
+ * Returns own thread id (TID)
*
- * @note this is an unique identifier for the calling thread, and
- * depends on platfrom / compiler, and may not be the systems Thread ID!
+ * @note this is an unique identifier for the calling thread, and
+ * depends on platform/ compiler, and may not be the systems Thread ID!
*
* @return -1 when fails, otherwise >= 0
*/
-int rathread_get_tid();
+int rathread_get_tid(void);
/**
- * Waits for the given thread to terminate
+ * Waits for the given thread to terminate
*
* @param handle - thread to wait (join) for
* @param out_Exitcode - [OPTIONAL] - if given => Exitcode (value) of the given thread - if it's terminated
- *
+ *
* @return true - if the given thread has been terminated.
*/
-bool rathread_wait( rAthread handle, void* *out_exitCode );
+bool rathread_wait(rAthread *handle, void **out_exitCode);
-/**
+/**
* Sets the given PRIORITY @ OS Task Scheduler
- *
+ *
* @param handle - thread to set prio for
* @param rio - the priority (RAT_PRIO_LOW ... )
*/
-void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio );
+void rathread_prio_set(rAthread *handle, RATHREAD_PRIO prio);
-/**
- * Gets the current Prio of the given trhead
+/**
+ * Gets the current Prio of the given thread
*
* @param handle - the thread to get the prio for.
*/
-RATHREAD_PRIO rathread_prio_get( rAthread handle);
+RATHREAD_PRIO rathread_prio_get(rAthread *handle);
/**
* Tells the OS scheduler to yield the execution of the calling thread
- *
+ *
* @note: this will not "pause" the thread,
- * it just allows the OS to spent the remaining time
+ * it just allows the OS to spent the remaining time
* of the slice to another thread.
*/
-void rathread_yield();
+void rathread_yield(void);
-void rathread_init();
-void rathread_final();
+void rathread_init(void);
+void rathread_final(void);
-#endif /* _COMMON_THREAD_H_ */
+#endif /* COMMON_THREAD_H */
diff --git a/src/common/timer.c b/src/common/timer.c
index 526854582..370eafd4c 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -2,11 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/utils.h"
+#define HERCULES_CORE
+
#include "timer.h"
#include <stdio.h>
@@ -14,11 +11,17 @@
#include <string.h>
#include <time.h>
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+#include "../common/utils.h"
+
#ifdef WIN32
-#include "../common/winapi.h" // GetTickCount()
+# include "../common/winapi.h" // GetTickCount()
#else
-#include <unistd.h>
-#include <sys/time.h> // struct timeval, gettimeofday()
+# include <sys/time.h> // struct timeval, gettimeofday()
+# include <unistd.h>
#endif
struct timer_interface timer_s;
@@ -104,7 +107,7 @@ char* search_timer_func_list(TimerFunc func)
#if defined(ENABLE_RDTSC)
static uint64 RDTSC_BEGINTICK = 0, RDTSC_CLOCK = 0;
-static __inline uint64 _rdtsc(){
+static __inline uint64 rdtsc_(void) {
register union{
uint64 qw;
uint32 dw[2];
@@ -115,7 +118,7 @@ static __inline uint64 _rdtsc(){
return t.qw;
}
-static void rdtsc_calibrate(){
+static void rdtsc_calibrate(void){
uint64 t1, t2;
int32 i;
@@ -124,14 +127,14 @@ static void rdtsc_calibrate(){
RDTSC_CLOCK = 0;
for(i = 0; i < 5; i++){
- t1 = _rdtsc();
+ t1 = rdtsc_();
usleep(1000000); //1000 MS
- t2 = _rdtsc();
- RDTSC_CLOCK += (t2 - t1) / 1000;
+ t2 = rdtsc_();
+ RDTSC_CLOCK += (t2 - t1) / 1000;
}
RDTSC_CLOCK /= 5;
- RDTSC_BEGINTICK = _rdtsc();
+ RDTSC_BEGINTICK = rdtsc_();
ShowMessage(" done. (Frequency: %u Mhz)\n", (uint32)(RDTSC_CLOCK/1000) );
}
@@ -167,17 +170,17 @@ static int64 sys_tick(void) {
}
if (pGetTickCount64)
return (int64)pGetTickCount64();
- // 32-bit fallback. Note: This will wrap around every ~49 days since system startup!!!
+ // 32-bit fall back. Note: This will wrap around every ~49 days since system startup!!!
return (int64)GetTickCount();
#elif defined(ENABLE_RDTSC)
// RDTSC: Returns the number of CPU cycles since reset. Unreliable if
// the CPU frequency is variable.
- return (int64)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK);
+ return (int64)((rdtsc_() - RDTSC_BEGINTICK) / RDTSC_CLOCK);
#elif defined(HAVE_MONOTONIC_CLOCK)
- // Monotinic clock: Implementation-defined.
+ // Monotonic clock: Implementation-defined.
// Clock that cannot be set and represents monotonic time since some
// unspecified starting point. This clock is not affected by
- // discontinâ€uous jumps in the system time (e.g., if the system
+ // discontinuous jumps in the system time (e.g., if the system
// administrator manually changes the clock), but is affected by
// the incremental adjustments performed by adjtime(3) and NTP.
struct timespec tval;
@@ -185,7 +188,7 @@ static int64 sys_tick(void) {
// int64 cast to avoid overflows on platforms where time_t is 32 bit
return (int64)tval.tv_sec * 1000 + tval.tv_nsec / 1000000;
#else
- // Fallback, regular clock: Number of milliseconds since epoch.
+ // Fall back, regular clock: Number of milliseconds since epoch.
// The time returned by gettimeofday() is affected by discontinuous
// jumps in the system time (e.g., if the system administrator
// manually changes the system time). If you need a monotonically
@@ -450,7 +453,7 @@ void timer_final(void) {
if (free_timer_list) aFree(free_timer_list);
}
/*=====================================
-* Default Functions : timer.h
+* Default Functions : timer.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
diff --git a/src/common/timer.h b/src/common/timer.h
index ab3ffc21f..d0927adde 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_TIMER_H_
-#define _COMMON_TIMER_H_
+#ifndef COMMON_TIMER_H
+#define COMMON_TIMER_H
#include "../common/cbasetypes.h"
@@ -30,13 +30,13 @@ struct TimerData {
int interval;
// general-purpose storage
- int id;
+ int id;
intptr_t data;
};
/*=====================================
-* Interface : timer.h
+* Interface : timer.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -67,4 +67,4 @@ struct timer_interface *timer;
void timer_defaults(void);
-#endif /* _COMMON_TIMER_H_ */
+#endif /* COMMON_TIMER_H */
diff --git a/src/common/utils.c b/src/common/utils.c
index 9a7d4971b..4e6cb49c2 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -2,33 +2,35 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/core.h"
-#include "socket.h"
+#define HERCULES_CORE
+
#include "utils.h"
-#include <stdio.h>
+#include <math.h> // floor()
#include <stdarg.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <math.h> // floor()
+#include <sys/stat.h> // cache purposes [Ind/Hercules]
+
+#include "../common/cbasetypes.h"
+#include "../common/core.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
#ifdef WIN32
- #include "../common/winapi.h"
- #ifndef F_OK
- #define F_OK 0x0
- #endif /* F_OK */
+# include "../common/winapi.h"
+# ifndef F_OK
+# define F_OK 0x0
+# endif /* F_OK */
#else
- #include <unistd.h>
- #include <dirent.h>
- #include <sys/stat.h>
+# include <dirent.h>
+# include <sys/stat.h>
+# include <unistd.h>
#endif
-#include <sys/stat.h> // cache purposes [Ind/Hercules]
-
struct HCache_interface HCache_s;
/// Dumps given buffer into file pointed to by a handle.
@@ -198,7 +200,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*))
sprintf(tmppath,"%s%c%s",path, PATHSEP, entry->d_name);
- // check if the pattern matchs.
+ // check if the pattern matches.
if (entry->d_name && strstr(entry->d_name, pattern)) {
func( tmppath );
}
@@ -209,7 +211,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*))
}
// is this a directory?
if (S_ISDIR(dir_stat.st_mode)) {
- // decent recursivly
+ // decent recursively
findfile(tmppath, pat, func);
}
}//end while
@@ -264,6 +266,58 @@ uint32 MakeDWord(uint16 word0, uint16 word1)
( (uint32)(word1 << 0x10) );
}
+/*************************************
+* Big-endian compatibility functions *
+*************************************/
+
+// Converts an int16 from current machine order to little-endian
+int16 MakeShortLE(int16 val)
+{
+ unsigned char buf[2];
+ buf[0] = (unsigned char)( (val & 0x00FF) );
+ buf[1] = (unsigned char)( (val & 0xFF00) >> 0x08 );
+ return *((int16*)buf);
+}
+
+// Converts an int32 from current machine order to little-endian
+int32 MakeLongLE(int32 val)
+{
+ unsigned char buf[4];
+ buf[0] = (unsigned char)( (val & 0x000000FF) );
+ buf[1] = (unsigned char)( (val & 0x0000FF00) >> 0x08 );
+ buf[2] = (unsigned char)( (val & 0x00FF0000) >> 0x10 );
+ buf[3] = (unsigned char)( (val & 0xFF000000) >> 0x18 );
+ return *((int32*)buf);
+}
+
+// Reads an uint16 in little-endian from the buffer
+uint16 GetUShort(const unsigned char* buf)
+{
+ return ( ((uint16)(buf[0])) )
+ |( ((uint16)(buf[1])) << 0x08 );
+}
+
+// Reads an uint32 in little-endian from the buffer
+uint32 GetULong(const unsigned char* buf)
+{
+ return ( ((uint32)(buf[0])) )
+ |( ((uint32)(buf[1])) << 0x08 )
+ |( ((uint32)(buf[2])) << 0x10 )
+ |( ((uint32)(buf[3])) << 0x18 );
+}
+
+// Reads an int32 in little-endian from the buffer
+int32 GetLong(const unsigned char* buf)
+{
+ return (int32)GetULong(buf);
+}
+
+// Reads a float (32 bits) from the buffer
+float GetFloat(const unsigned char* buf)
+{
+ uint32 val = GetULong(buf);
+ return *((float*)(void*)&val);
+}
/// calculates the value of A / B, in percent (rounded down)
unsigned int get_percentage(const unsigned int A, const unsigned int B)
@@ -272,7 +326,7 @@ unsigned int get_percentage(const unsigned int A, const unsigned int B)
if( B == 0 )
{
- ShowError("get_percentage(): divison by zero! (A=%u,B=%u)\n", A, B);
+ ShowError("get_percentage(): division by zero! (A=%u,B=%u)\n", A, B);
return ~0U;
}
diff --git a/src/common/utils.h b/src/common/utils.h
index 68dd01ac4..421698d95 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -2,13 +2,14 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_UTILS_H_
-#define _COMMON_UTILS_H_
+#ifndef COMMON_UTILS_H
+#define COMMON_UTILS_H
-#include "../common/cbasetypes.h"
#include <stdio.h> // FILE*
#include <time.h>
+#include "../common/cbasetypes.h"
+
/* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */
#define HCACHE_KEY 'k'
@@ -36,6 +37,16 @@ extern uint16 GetWord(uint32 val, int idx);
extern uint16 MakeWord(uint8 byte0, uint8 byte1);
extern uint32 MakeDWord(uint16 word0, uint16 word1);
+//////////////////////////////////////////////////////////////////////////
+// Big-endian compatibility functions
+//////////////////////////////////////////////////////////////////////////
+extern int16 MakeShortLE(int16 val);
+extern int32 MakeLongLE(int32 val);
+extern uint16 GetUShort(const unsigned char* buf);
+extern uint32 GetULong(const unsigned char* buf);
+extern int32 GetLong(const unsigned char* buf);
+extern float GetFloat(const unsigned char* buf);
+
size_t hread(void * ptr, size_t size, size_t count, FILE * stream);
size_t hwrite(const void * ptr, size_t size, size_t count, FILE * stream);
@@ -54,4 +65,4 @@ struct HCache_interface *HCache;
void HCache_defaults(void);
-#endif /* _COMMON_UTILS_H_ */
+#endif /* COMMON_UTILS_H */
diff --git a/src/common/winapi.h b/src/common/winapi.h
index 7ce555049..b7c2bea1e 100644
--- a/src/common/winapi.h
+++ b/src/common/winapi.h
@@ -7,7 +7,7 @@
#define WINVER 0x0500
#define _WIN32_IE 0x0600
#define WIN32_LEAN_AND_MEAN
-#define NOCOMM
+#define NOCOMM
#define NOKANJI
#define NOHELP
#define NOMCX
@@ -32,5 +32,3 @@
#include <Ws2tcpip.h>
#include <Mswsock.h>
#include <MMSystem.h>
-
-
diff --git a/src/config/classes/general.h b/src/config/classes/general.h
index 147fddb55..b3da4a475 100644
--- a/src/config/classes/general.h
+++ b/src/config/classes/general.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_GENERAL_H_
-#define _CONFIG_GENERAL_H_
+#ifndef CONFIG_GENERAL_H
+#define CONFIG_GENERAL_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -31,4 +31,4 @@
* No settings past this point
**/
-#endif // _CONFIG_GENERAL_H_
+#endif // CONFIG_GENERAL_H
diff --git a/src/config/const.h b/src/config/const.h
index 6557cb987..2b5b180c4 100644
--- a/src/config/const.h
+++ b/src/config/const.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_CONSTANTS_H_
-#define _CONFIG_CONSTANTS_H_
+#ifndef CONFIG_CONSTANTS_H
+#define CONFIG_CONSTANTS_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -15,7 +15,7 @@
*/
/**
- * "Sane Checks" to save you from compiling with cool bugs
+ * "Sane Checks" to save you from compiling with cool bugs
**/
#if SECURE_NPCTIMEOUT_INTERVAL <= 0
#error SECURE_NPCTIMEOUT_INTERVAL should be at least 1 (1s)
@@ -52,13 +52,6 @@
#define DEFTYPE_MAX CHAR_MAX
#endif
-/* pointer size fix which fixes several gcc warnings */
-#ifdef __64BIT__
- #define __64BPTRSIZE(y) ((intptr)(y))
-#else
- #define __64BPTRSIZE(y) (y)
-#endif
-
/* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */
#ifdef RENEWAL
#define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 )
@@ -94,14 +87,6 @@
#define RE_LVL_TMDMOD()
#endif
-/* Feb 1st 2012 */
-#if PACKETVER >= 20120201
- #define NEW_CARTS
- #define MAX_CARTS 9
-#else
- #define MAX_CARTS 5
-#endif
-
// Renewal variable cast time reduction
#ifdef RENEWAL_CAST
#define VARCAST_REDUCTION(val) do { \
@@ -118,4 +103,4 @@
/**
* End of File
**/
-#endif /* _CONFIG_CONSTANTS_H_ */
+#endif /* CONFIG_CONSTANTS_H */
diff --git a/src/config/core.h b/src/config/core.h
index edd5c2b2a..ac59563b5 100644
--- a/src/config/core.h
+++ b/src/config/core.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_CORE_H_
-#define _CONFIG_CORE_H_
+#ifndef CONFIG_CORE_H
+#define CONFIG_CORE_H
/// Max number of items on @autolootid list
#define AUTOLOOTITEM_SIZE 10
@@ -27,7 +27,7 @@
/// CONSOLE_INPUT allows you to type commands into the server's console,
/// Disabling it saves one thread.
#define CONSOLE_INPUT
-/// Maximum number of caracters 'CONSOLE_INPUT' will support per line.
+/// Maximum number of characters 'CONSOLE_INPUT' will support per line.
#define MAX_CONSOLE_INPUT 150
/// Uncomment to disable Hercules' anonymous stat report
@@ -43,7 +43,7 @@
/// By default, all range checks in Aegis are of Square shapes, so a weapon range
/// - of 10 allows you to attack from anywhere within a 21x21 area.
/// Enabling this changes such checks to circular checks, which is more realistic,
-/// - but is not the official behaviour.
+/// - but is not the official behavior.
//#define CIRCULAR_AREA
//This is the distance at which @autoloot works,
@@ -57,10 +57,6 @@
/// When uncommented the cap takes place after modifiers.
//#define HMAP_ZONE_DAMAGE_CAP_TYPE
-/// Uncomment to enable Non Stackable items unique ID
-/// By enabling it, the system will create an unique id for each new non stackable item created
-//#define NSI_UNIQUE_ID
-
/// Comment to disable Guild/Party Bound item system
#define GP_BOUND_ITEMS
@@ -83,4 +79,4 @@
**/
#include "./const.h"
-#endif // _CONFIG_CORE_H_
+#endif // CONFIG_CORE_H
diff --git a/src/config/renewal.h b/src/config/renewal.h
index 36615d63b..939ad9b73 100644
--- a/src/config/renewal.h
+++ b/src/config/renewal.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_RENEWAL_H_
-#define _CONFIG_RENEWAL_H_
+#ifndef CONFIG_RENEWAL_H
+#define CONFIG_RENEWAL_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -13,8 +13,18 @@
* @INFO: This file holds general-purpose renewal settings, for class-specific ones check /src/config/classes folder
**/
+/**
+ * Renewal full toggle switch.
+ *
+ * Uncomment this line to disable all of the below settings at once.
+ * Note: in UNIX builds, this can be easily done without touching this
+ * line, by passing --disable-renewal to the configure script:
+ * ./configure --disable-renewal
+ */
//#define DISABLE_RENEWAL
-#ifndef DISABLE_RENEWAL
+
+
+#ifndef DISABLE_RENEWAL // Do not change this line
/// game renewal server mode
/// (disable by commenting the line)
@@ -74,5 +84,6 @@
#define RENEWAL_ASPD
#endif // DISABLE_RENEWAL
+#undef DISABLE_RENEWAL
-#endif // _CONFIG_RENEWAL_H_
+#endif // CONFIG_RENEWAL_H
diff --git a/src/config/secure.h b/src/config/secure.h
index e5e3662d1..418d24751 100644
--- a/src/config/secure.h
+++ b/src/config/secure.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_SECURE_H_
-#define _CONFIG_SECURE_H_
+#ifndef CONFIG_SECURE_H
+#define CONFIG_SECURE_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -49,7 +49,7 @@
/**
* Uncomment to disable
- * while enabled, movement of invisible (cloaking, hide, etca [not chase walk]) units is not informed to nearby foes,
+ * while enabled, movement of invisible (cloaking, hide, etc [not chase walk]) units is not informed to nearby foes,
* rendering any client-side cheat, that would otherwise make these units visible, to not function.
* - "Why is this a setting?" because theres a cost, while enabled if a hidden character uses a skill with cast time,
* - for example "cloaking -> walk a bit -> soul break another player" the character display will be momentarily abrupted
@@ -58,4 +58,4 @@
**/
#define ANTI_MAYAP_CHEAT
-#endif // _CONFIG_SECURE_H_
+#endif // CONFIG_SECURE_H
diff --git a/src/login/CMakeLists.txt b/src/login/CMakeLists.txt
deleted file mode 100644
index fa657f8fd..000000000
--- a/src/login/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#
-# setup
-#
-set( LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
-set( SQL_LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
-
-
-#
-# targets
-#
-add_subdirectory( sql )
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index fa5f92105..7551eed5f 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -1,9 +1,14 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
+# @configure_input@
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -23,7 +28,7 @@ LOGIN_H = login.h account.h ipban.h loginlog.h
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ)
+ LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
else
LOGIN_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -62,6 +67,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/login/Makefile
+$(SYSINFO_INC): $(LOGIN_C) $(LOGIN_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
@@ -85,7 +94,7 @@ login-server: ../../login-server@EXEEXT@
obj_sql/%.o: %.c $(LOGIN_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_sql
@echo " CC $<"
- @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/login/account.h b/src/login/account.h
index 234e7c0c1..e15143ce9 100644
--- a/src/login/account.h
+++ b/src/login/account.h
@@ -2,11 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _LOGIN_ACCOUNT_H_
-#define _LOGIN_ACCOUNT_H_
+#ifndef LOGIN_ACCOUNT_H
+#define LOGIN_ACCOUNT_H
#include "../common/cbasetypes.h"
#include "../common/mmo.h" // ACCOUNT_REG2_NUM
+#include "../common/sql.h" // Sql
typedef struct AccountDB AccountDB;
typedef struct AccountDBIterator AccountDBIterator;
@@ -24,7 +25,7 @@ struct mmo_account
char email[40]; // e-mail (by default: a@a.com)
int group_id; // player group id
uint8 char_slots; // this accounts maximum character slots (maximum is limited to MAX_CHARS define in char server)
- unsigned int state; // packet 0x006a value + 1 (0: compte OK)
+ unsigned int state; // packet 0x006a value + 1 (0: complete OK)
time_t unban_time; // (timestamp): ban time limit of the account (0 = no ban)
time_t expiration_time; // (timestamp): validity limit of the account (0 = unlimited)
unsigned int logincount; // number of successful auth attempts
@@ -139,4 +140,4 @@ Sql *account_db_sql_up(AccountDB* self);
void mmo_send_accreg2(AccountDB* self, int fd, int account_id, int char_id);
void mmo_save_accreg2(AccountDB* self, int fd, int account_id, int char_id);
-#endif /* _LOGIN_ACCOUNT_H_ */
+#endif /* LOGIN_ACCOUNT_H */
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 1483196ab..51e499369 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -2,17 +2,22 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "../config/core.h" // CONSOLE_INPUT
+#include "account.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/console.h"
#include "../common/malloc.h"
#include "../common/mmo.h"
#include "../common/showmsg.h"
+#include "../common/socket.h"
#include "../common/sql.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "../common/console.h"
-#include "../common/socket.h"
-#include "account.h"
-#include <stdlib.h>
-#include <string.h>
/// global defines
#define ACCOUNT_SQL_DB_VERSION 20110114
@@ -449,7 +454,7 @@ static bool account_db_sql_load_str(AccountDB* self, struct mmo_account* acc, co
}
if( SQL->NumRows(sql_handle) > 1 )
- {// serious problem - duplicit account
+ {// serious problem - duplicate account
ShowError("account_db_sql_load_str: multiple accounts found when retrieving data for account '%s'!\n", userid);
SQL->FreeResult(sql_handle);
return false;
@@ -652,7 +657,7 @@ Sql* account_db_sql_up(AccountDB* self) {
AccountDB_SQL* db = (AccountDB_SQL*)self;
Sql_HerculesUpdateCheck(db->accounts);
#ifdef CONSOLE_INPUT
- console->setSQL(db->accounts);
+ console->input->setSQL(db->accounts);
#endif
return db->accounts;
}
diff --git a/src/login/ipban.h b/src/login/ipban.h
index e6851d8dd..b4f3ac51b 100644
--- a/src/login/ipban.h
+++ b/src/login/ipban.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _LOGIN_IPBAN_H_
-#define _LOGIN_IPBAN_H_
+#ifndef LOGIN_IPBAN_H
+#define LOGIN_IPBAN_H
#include "../common/cbasetypes.h"
@@ -22,4 +22,4 @@ void ipban_log(uint32 ip);
bool ipban_config_read(const char* key, const char* value);
-#endif /* _LOGIN_IPBAN_H_ */
+#endif /* LOGIN_IPBAN_H */
diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c
index 74f45e418..081f28d84 100644
--- a/src/login/ipban_sql.c
+++ b/src/login/ipban_sql.c
@@ -2,6 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "ipban.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "login.h"
+#include "loginlog.h"
#include "../common/cbasetypes.h"
#include "../common/db.h"
#include "../common/malloc.h"
@@ -9,11 +18,6 @@
#include "../common/socket.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "login.h"
-#include "ipban.h"
-#include "loginlog.h"
-#include <stdlib.h>
-#include <string.h>
// global sql settings
static char global_db_hostname[32] = "127.0.0.1";
diff --git a/src/login/login.c b/src/login/login.c
index c12c9bde9..0488ae4ed 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -2,6 +2,18 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "login.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "account.h"
+#include "ipban.h"
+#include "loginlog.h"
+#include "../common/HPM.h"
#include "../common/core.h"
#include "../common/db.h"
#include "../common/malloc.h"
@@ -12,15 +24,6 @@
#include "../common/strlib.h"
#include "../common/timer.h"
#include "../common/utils.h"
-#include "../common/HPM.h"
-#include "account.h"
-#include "ipban.h"
-#include "login.h"
-#include "loginlog.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
struct Login_Config login_config;
@@ -170,7 +173,7 @@ static int online_data_cleanup_sub(DBKey key, DBData *data, va_list ap)
static int online_data_cleanup(int tid, int64 tick, int id, intptr_t data) {
online_db->foreach(online_db, online_data_cleanup_sub);
return 0;
-}
+}
//--------------------------------------------------------------------
@@ -284,7 +287,7 @@ int lan_subnetcheck(uint32 ip)
}
//----------------------------------
-// Reading Lan Support configuration
+// Reading LAN Support configuration
//----------------------------------
int login_lan_config_read(const char *lancfgName)
{
@@ -721,13 +724,13 @@ int parse_fromchar(int fd)
RFIFOSKIP(fd,6);
if( !accounts->load_num(accounts, &acc, account_id) )
- ShowNotice("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s).\n", server[id].name, account_id, ip);
+ ShowNotice("Char-server '%s': Error of Unban request (account: %d not found, ip: %s).\n", server[id].name, account_id, ip);
else
if( acc.unban_time == 0 )
- ShowNotice("Char-server '%s': Error of UnBan request (account: %d, no change for unban date, ip: %s).\n", server[id].name, account_id, ip);
+ ShowNotice("Char-server '%s': Error of Unban request (account: %d, no change for unban date, ip: %s).\n", server[id].name, account_id, ip);
else
{
- ShowNotice("Char-server '%s': UnBan request (account: %d, ip: %s).\n", server[id].name, account_id, ip);
+ ShowNotice("Char-server '%s': Unban request (account: %d, ip: %s).\n", server[id].name, account_id, ip);
acc.unban_time = 0;
accounts->save(accounts, &acc);
}
@@ -842,18 +845,20 @@ int parse_fromchar(int fd)
WFIFOHEAD(fd,183);
WFIFOW(fd,0) = 0x2737;
safestrncpy((char*)WFIFOP(fd,2), acc.userid, NAME_LENGTH);
- if (u_group >= acc.group_id) {
+ if (u_group >= acc.group_id)
safestrncpy((char*)WFIFOP(fd,26), acc.pass, 33);
- }
+ else
+ memset(WFIFOP(fd,26), '\0', 33);
safestrncpy((char*)WFIFOP(fd,59), acc.email, 40);
safestrncpy((char*)WFIFOP(fd,99), acc.last_ip, 16);
WFIFOL(fd,115) = acc.group_id;
safestrncpy((char*)WFIFOP(fd,119), acc.lastlogin, 24);
WFIFOL(fd,143) = acc.logincount;
WFIFOL(fd,147) = acc.state;
- if (u_group >= acc.group_id) {
+ if (u_group >= acc.group_id)
safestrncpy((char*)WFIFOP(fd,151), acc.pincode, 5);
- }
+ else
+ memset(WFIFOP(fd,151), '\0', 5);
safestrncpy((char*)WFIFOP(fd,156), acc.birthdate, 11);
WFIFOL(fd,167) = map_fd;
WFIFOL(fd,171) = u_fd;
@@ -909,7 +914,7 @@ int mmo_auth_new(const char* userid, const char* pass, const char sex, const cha
// check if the account doesn't exist already
if( accounts->load_str(accounts, &acc, userid) ) {
- ShowNotice("Attempt of creation of an already existant account (account: %s_%c, pass: %s, received pass: %s)\n", userid, sex, acc.pass, pass);
+ ShowNotice("Attempt of creation of an already existing account (account: %s_%c, pass: %s, received pass: %s)\n", userid, sex, acc.pass, pass);
return 1; // 1 = Incorrect Password
}
@@ -1042,8 +1047,9 @@ int mmo_auth(struct login_session_data* sd, bool isServer) {
for( i = 0; i < 16; i++ )
sprintf(&smd5[i * 2], "%02x", sd->client_hash[i]);
+ smd5[32] = '\0';
- ShowNotice("Invalid client hash (account: %s, pass: %s, sent md5: %d, ip: %s)\n", sd->userid, sd->passwd, smd5, ip);
+ ShowNotice("Invalid client hash (account: %s, pass: %s, sent md5: %s, ip: %s)\n", sd->userid, sd->passwd, smd5, ip);
return 5;
}
}
@@ -1101,12 +1107,12 @@ void login_auth_ok(struct login_session_data* sd)
WFIFOSET(fd,3);
return;
} else if( login_config.min_group_id_to_connect >= 0 && login_config.group_id_to_connect == -1 && sd->group_id < login_config.min_group_id_to_connect ) {
- ShowStatus("Connection refused: the minium group id required for connection is %d (account: %s, group: %d).\n", login_config.min_group_id_to_connect, sd->userid, sd->group_id);
+ ShowStatus("Connection refused: the minimum group id required for connection is %d (account: %s, group: %d).\n", login_config.min_group_id_to_connect, sd->userid, sd->group_id);
WFIFOHEAD(fd,3);
WFIFOW(fd,0) = 0x81;
WFIFOB(fd,2) = 1; // 01 = Server closed
WFIFOSET(fd,3);
- return;
+ return;
}
server_num = 0;
@@ -1306,7 +1312,7 @@ int parse_login(int fd)
// Perform ip-ban check
if( login_config.ipban && ipban_check(ipl) )
{
- ShowStatus("Connection refused: IP isn't authorised (deny/allow, ip: %s).\n", ip);
+ ShowStatus("Connection refused: IP isn't authorized (deny/allow, ip: %s).\n", ip);
login_log(ipl, "unknown", -3, "ip banned");
WFIFOHEAD(fd,23);
WFIFOW(fd,0) = 0x6a;
@@ -1689,8 +1695,7 @@ int login_config_read(const char* cfgName)
//--------------------------------------
// Function called at exit of the server
//--------------------------------------
-void do_final(void)
-{
+int do_final(void) {
int i;
struct client_hash_node *hn = login_config.client_hash_nodes;
@@ -1730,6 +1735,7 @@ void do_final(void)
}
ShowStatus("Finished.\n");
+ return EXIT_SUCCESS;
}
//------------------------------
@@ -1769,7 +1775,7 @@ int do_init(int argc, char** argv)
{
int i;
- // intialize engine (to accept config settings)
+ // initialize engine (to accept config settings)
account_engine[0].db = account_engine[0].constructor();
// read login-server configuration
@@ -1824,7 +1830,7 @@ int do_init(int argc, char** argv)
HPM->config_read(NULL, 0);
HPM->event(HPET_INIT);
- // server port open & binding
+ // server port open & binding
if( (login_fd = make_listen_bind(login_config.login_ip,login_config.login_port)) == -1 ) {
ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",login_config.login_port);
exit(EXIT_FAILURE);
diff --git a/src/login/login.h b/src/login/login.h
index 14c361a15..9b9d1e82c 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -2,11 +2,11 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _LOGIN_LOGIN_H_
-#define _LOGIN_LOGIN_H_
+#ifndef LOGIN_LOGIN_H
+#define LOGIN_LOGIN_H
-#include "../common/mmo.h" // NAME_LENGTH,SEX_*
#include "../common/core.h" // CORE_ST_LAST
+#include "../common/mmo.h" // NAME_LENGTH,SEX_*
enum E_LOGINSERVER_ST
{
@@ -72,7 +72,7 @@ struct Login_Config {
unsigned int ip_sync_interval; // interval (in minutes) to execute a DNS/IP update (for dynamic IPs)
bool log_login; // whether to log login server actions or not
char date_format[32]; // date format used in messages
- bool new_account_flag,new_acc_length_limit; // autoregistration via _M/_F ? / if yes minimum length is 4?
+ bool new_account_flag,new_acc_length_limit; // auto-registration via _M/_F ? / if yes minimum length is 4?
int start_limited_time; // new account expiration time (-1: unlimited)
bool use_md5_passwds; // work with password hashes instead of plaintext passwords?
int group_id_to_connect; // required group id to connect
@@ -100,4 +100,4 @@ extern struct mmo_char_server server[MAX_SERVERS];
extern struct Login_Config login_config;
-#endif /* _LOGIN_LOGIN_H_ */
+#endif /* LOGIN_LOGIN_H */
diff --git a/src/login/loginlog.h b/src/login/loginlog.h
index 730fb6e62..52e18f3d1 100644
--- a/src/login/loginlog.h
+++ b/src/login/loginlog.h
@@ -1,9 +1,10 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _LOGIN_LOGINLOG_H_
-#define _LOGIN_LOGINLOG_H_
+#ifndef LOGIN_LOGINLOG_H
+#define LOGIN_LOGINLOG_H
+#include "../common/cbasetypes.h"
unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes);
void login_log(uint32 ip, const char* username, int rcode, const char* message);
@@ -11,5 +12,4 @@ bool loginlog_init(void);
bool loginlog_final(void);
bool loginlog_config_read(const char* w1, const char* w2);
-
-#endif /* _LOGIN_LOGINLOG_H_ */
+#endif /* LOGIN_LOGINLOG_H */
diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c
index 231ac783b..2c0b1cc03 100644
--- a/src/login/loginlog_sql.c
+++ b/src/login/loginlog_sql.c
@@ -2,13 +2,18 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "loginlog.h"
+
+#include <string.h>
+#include <stdlib.h> // exit
+
#include "../common/cbasetypes.h"
#include "../common/mmo.h"
#include "../common/socket.h"
#include "../common/sql.h"
#include "../common/strlib.h"
-#include <string.h>
-#include <stdlib.h> // exit
// global sql settings (in ipban_sql.c)
static char global_db_hostname[32] = "127.0.0.1";
@@ -30,7 +35,7 @@ static Sql* sql_handle = NULL;
static bool enabled = false;
-// Returns the number of failed login attemps by the ip in the last minutes.
+// Returns the number of failed login attempts by the ip in the last minutes.
unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes)
{
unsigned long failures = 0;
diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt
deleted file mode 100644
index 46cf4db02..000000000
--- a/src/login/sql/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#
-# login sql
-#
-if( BUILD_SQL_SERVERS )
-message( STATUS "Creating target login-server" )
-set( SQL_LOGIN_HEADERS
- "${SQL_LOGIN_SOURCE_DIR}/account.h"
- "${SQL_LOGIN_SOURCE_DIR}/ipban.h"
- "${SQL_LOGIN_SOURCE_DIR}/login.h"
- "${SQL_LOGIN_SOURCE_DIR}/loginlog.h"
- )
-set( SQL_LOGIN_SOURCES
- "${SQL_LOGIN_SOURCE_DIR}/account_sql.c"
- "${SQL_LOGIN_SOURCE_DIR}/ipban_sql.c"
- "${SQL_LOGIN_SOURCE_DIR}/login.c"
- "${SQL_LOGIN_SOURCE_DIR}/loginlog_sql.c"
- )
-set( DEPENDENCIES common_sql )
-set( LIBRARIES ${GLOBAL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS} -DWITH_SQL" )
-set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} )
-source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
-source_group( login FILES ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} )
-include_directories( ${INCLUDE_DIRS} )
-add_executable( login-server ${SOURCE_FILES} )
-add_dependencies( login-server ${DEPENDENCIES} )
-target_link_libraries( login-server ${LIBRARIES} ${DEPENDENCIES} )
-set_target_properties( login-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server" GROUP Runtime )
- install( TARGETS login-server
- DESTINATION "."
- COMPONENT Runtime_loginserver_sql )
-endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" )
-message( STATUS "Creating target login-server - done" )
-endif( BUILD_SQL_SERVERS )
diff --git a/src/map/CMakeLists.txt b/src/map/CMakeLists.txt
deleted file mode 100644
index 51c3538ef..000000000
--- a/src/map/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#
-# setup
-#
-set( MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
-set( SQL_MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
-
-
-#
-# targets
-#
-add_subdirectory( sql )
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 061479d87..cb8c979c6 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -1,25 +1,15 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/HPM.h"
-#include "../common/conf.h"
-#include "../common/db.h"
-#include "../common/des.h"
-#include "../common/ers.h"
-#include "../common/mapindex.h"
-#include "../common/mmo.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-
+#define HERCULES_CORE
#include "HPMmap.h"
-#include "pc.h"
-#include "map.h"
-//
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
#include "atcommand.h"
#include "battle.h"
#include "battleground.h"
@@ -37,12 +27,14 @@
#include "itemdb.h"
#include "log.h"
#include "mail.h"
+#include "map.h"
#include "mapreg.h"
#include "mercenary.h"
#include "mob.h"
#include "npc.h"
#include "party.h"
#include "path.h"
+#include "pc.h"
#include "pc_groups.h"
#include "pet.h"
#include "quest.h"
@@ -54,11 +46,19 @@
#include "trade.h"
#include "unit.h"
#include "vending.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
+#include "../common/db.h"
+#include "../common/des.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/mapindex.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/sysinfo.h"
#include "../common/HPMDataCheck.h"
diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h
index f291575fb..99c4224ff 100644
--- a/src/map/HPMmap.h
+++ b/src/map/HPMmap.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _MAP_HPMMAP_H_
-#define _MAP_HPMMAP_H_
+#ifndef MAP_HPMMAP_H
+#define MAP_HPMMAP_H
#include "../common/cbasetypes.h"
#include "../map/atcommand.h"
@@ -26,4 +26,4 @@ bool HPM_map_DataCheck(struct s_HPMDataCheck *src, unsigned int size, char *name
void HPM_map_do_init(void);
-#endif /* _MAP_HPMMAP_H_ */
+#endif /* MAP_HPMMAP_H */
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index e3a47abeb..fc58c9d70 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -1,9 +1,14 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
+# @configure_input@
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -33,7 +38,7 @@ MAP_H = atcommand.h battle.h battleground.h buyingstore.h chat.h chrif.h \
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ)
+ MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
else
MAP_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -79,6 +84,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/map/Makefile
+$(SYSINFO_INC): $(MAP_C) $(MAP_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
@@ -102,7 +111,7 @@ map-server: ../../map-server@EXEEXT@
obj_sql/%.o: %.c $(MAP_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_sql
@echo " CC $<"
- @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(PCRE_CFLAGS) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(PCRE_CFLAGS) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 9e33f3c68..e22e2101c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2,55 +2,59 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/core.h"
-#include "../common/showmsg.h"
-#include "../common/malloc.h"
-#include "../common/random.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/conf.h"
+#define HERCULES_CORE
+#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP
#include "atcommand.h"
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "HPMmap.h"
#include "battle.h"
#include "chat.h"
-#include "clif.h"
#include "chrif.h"
+#include "clif.h"
#include "duel.h"
+#include "elemental.h"
+#include "guild.h"
+#include "homunculus.h"
#include "intif.h"
#include "itemdb.h"
#include "log.h"
+#include "mail.h"
#include "map.h"
-#include "pc.h"
-#include "pc_groups.h" // groupid2name
-#include "status.h"
-#include "skill.h"
+#include "mapreg.h"
+#include "mercenary.h"
#include "mob.h"
#include "npc.h"
-#include "pet.h"
-#include "homunculus.h"
-#include "mail.h"
-#include "mercenary.h"
-#include "elemental.h"
#include "party.h"
-#include "guild.h"
+#include "pc.h"
+#include "pc_groups.h" // groupid2name
+#include "pet.h"
+#include "quest.h"
#include "script.h"
+#include "searchstore.h"
+#include "skill.h"
+#include "status.h"
#include "storage.h"
#include "trade.h"
#include "unit.h"
-#include "mapreg.h"
-#include "quest.h"
-#include "searchstore.h"
-#include "HPMmap.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
+#include "../common/core.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h" // MAX_CARTS
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/sysinfo.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct atcommand_interface atcommand_s;
@@ -403,6 +407,11 @@ ACMD(mapmove) {
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
+
+ if( sd->bl.m == m && sd->bl.x == x && sd->bl.y == y ) {
+ clif->message(fd, msg_txt(253)); // You already are at your destination!
+ return false;
+ }
if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc_get_group_level(sd) < battle_config.gm_ignore_warpable_area) {
//This is to prevent the pc->setpos call from printing an error.
@@ -460,12 +469,22 @@ ACMD(where) {
*------------------------------------------*/
ACMD(jumpto) {
struct map_session_data *pl_sd = NULL;
-
+
if (!message || !*message) {
clif->message(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
return false;
}
-
+
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ return false;
+ }
+
+ if( pc_isdead(sd) ) {
+ clif->message(fd, msg_txt(864)); // "You cannot use this command when dead."
+ return false;
+ }
+
if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
clif->message(fd, msg_txt(3)); // Character not found.
return false;
@@ -475,21 +494,16 @@ ACMD(jumpto) {
clif->message(fd, msg_txt(247)); // You are not authorized to warp to this map.
return false;
}
-
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
- return false;
- }
-
- if( pc_isdead(sd) ) {
- clif->message(fd, msg_txt(864)); // "You cannot use this command when dead."
+
+ if( pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y ) {
+ clif->message(fd, msg_txt(253)); // You already are at your destination!
return false;
}
-
+
pc->setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s
- clif->message(fd, atcmd_output);
-
+ clif->message(fd, atcmd_output);
+
return true;
}
@@ -520,6 +534,11 @@ ACMD(jump)
if (!map->search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
+
+ if( x && y && sd->bl.x == x && sd->bl.y == y ) {
+ clif->message(fd, msg_txt(253)); // You already are at your destination!
+ return false;
+ }
pc->setpos(sd, sd->mapindex, x, y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); // Jumped to %d %d
@@ -824,7 +843,11 @@ ACMD(guildstorage)
return false;
}
- gstorage->open(sd);
+ if( gstorage->open(sd) ) {
+ clif->message(fd, msg_txt(1201)); // Your guild's storage has already been opened by another member, try again later.
+ return false;
+ }
+
clif->message(fd, msg_txt(920)); // Guild storage opened.
return true;
}
@@ -924,7 +947,7 @@ ACMD(jobchange) {
}
}
- // High Jobs, Babys and Third
+ // High Jobs, Babies and Third
for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){
if (strncmpi(message, pc->job_name(i), 16) == 0) {
job = i;
@@ -1100,14 +1123,14 @@ ACMD(item)
memset(item_name, '\0', sizeof(item_name));
if (!strcmpi(info->command,"itembound") && (!message || !*message || (
- sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 2 &&
- sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2
+ sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 2 &&
+ sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2
))) {
clif->message(fd, msg_txt(295)); // Please enter an item name or ID (usage: @itembound <item name/ID> <quantity> <bound_type>).
return false;
} else if (!message || !*message || (
- sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 &&
- sscanf(message, "%99s %d", item_name, &number) < 1 ))
+ sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 &&
+ sscanf(message, "%99s %d", item_name, &number) < 1 ))
{
clif->message(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>).
return false;
@@ -1306,7 +1329,7 @@ ACMD(baselevelup)
clif->message(fd, msg_txt(47)); // Base level can't go any higher.
return false;
} // End Addition
- if ((unsigned int)level > pc->maxbaselv(sd) || (unsigned int)level > pc->maxbaselv(sd) - sd->status.base_level) // fix positiv overflow
+ if ((unsigned int)level > pc->maxbaselv(sd) || (unsigned int)level > pc->maxbaselv(sd) - sd->status.base_level) // fix positive overflow
level = pc->maxbaselv(sd) - sd->status.base_level;
for (i = 0; i < level; i++)
status_point += pc->gets_status_point(sd->status.base_level + i);
@@ -1366,7 +1389,7 @@ ACMD(joblevelup)
clif->message(fd, msg_txt(23)); // Job level can't go any higher.
return false;
}
- if ((unsigned int)level > pc->maxjoblv(sd) || (unsigned int)level > pc->maxjoblv(sd) - sd->status.job_level) // fix positiv overflow
+ if ((unsigned int)level > pc->maxjoblv(sd) || (unsigned int)level > pc->maxjoblv(sd) - sd->status.job_level) // fix positive overflow
level = pc->maxjoblv(sd) - sd->status.job_level;
sd->status.job_level += (unsigned int)level;
sd->status.skill_point += level;
@@ -1378,11 +1401,11 @@ ACMD(joblevelup)
return false;
}
level *=-1;
- if ((unsigned int)level >= sd->status.job_level) // fix negativ overflow
+ if ((unsigned int)level >= sd->status.job_level) // fix negative overflow
level = sd->status.job_level-1;
sd->status.job_level -= (unsigned int)level;
if (sd->status.skill_point < level)
- pc->resetskill(sd,0); //Reset skills since we need to substract more points.
+ pc->resetskill(sd,0); //Reset skills since we need to subtract more points.
if (sd->status.skill_point < level)
sd->status.skill_point = 0;
else
@@ -1608,7 +1631,7 @@ ACMD(model)
pc->changelook(sd, LOOK_HAIR, hair_style);
pc->changelook(sd, LOOK_HAIR_COLOR, hair_color);
pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif->message(fd, msg_txt(36)); // Appearence changed.
+ clif->message(fd, msg_txt(36)); // Appearance changed.
} else {
clif->message(fd, msg_txt(37)); // An invalid number was specified.
return false;
@@ -1634,7 +1657,7 @@ ACMD(dye)
if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
pc->changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif->message(fd, msg_txt(36)); // Appearence changed.
+ clif->message(fd, msg_txt(36)); // Appearance changed.
} else {
clif->message(fd, msg_txt(37)); // An invalid number was specified.
return false;
@@ -1660,7 +1683,7 @@ ACMD(hair_style)
if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) {
pc->changelook(sd, LOOK_HAIR, hair_style);
- clif->message(fd, msg_txt(36)); // Appearence changed.
+ clif->message(fd, msg_txt(36)); // Appearance changed.
} else {
clif->message(fd, msg_txt(37)); // An invalid number was specified.
return false;
@@ -1686,7 +1709,7 @@ ACMD(hair_color)
if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) {
pc->changelook(sd, LOOK_HAIR_COLOR, hair_color);
- clif->message(fd, msg_txt(36)); // Appearence changed.
+ clif->message(fd, msg_txt(36)); // Appearance changed.
} else {
clif->message(fd, msg_txt(37)); // An invalid number was specified.
return false;
@@ -1698,67 +1721,63 @@ ACMD(hair_color)
/*==========================================
* @go [city_number or city_name] - Updated by Harbin
*------------------------------------------*/
-ACMD(go)
-{
+ACMD(go) {
int i;
- int town;
+ int town = INT_MAX; // Initialized to INT_MAX instead of -1 to avoid conflicts with those who map [-3:-1] to @memo locations.
char map_name[MAP_NAME_LENGTH];
- int16 m;
const struct {
char map[MAP_NAME_LENGTH];
int x, y;
+ int min_match; ///< Minimum string length to match
} data[] = {
- { MAP_PRONTERA, 156, 191 }, // 0=Prontera
- { MAP_MORROC, 156, 93 }, // 1=Morroc
- { MAP_GEFFEN, 119, 59 }, // 2=Geffen
- { MAP_PAYON, 162, 233 }, // 3=Payon
- { MAP_ALBERTA, 192, 147 }, // 4=Alberta
+ { MAP_PRONTERA, 156, 191, 3 }, // 0 = Prontera
+ { MAP_MORROC, 156, 93, 4 }, // 1 = Morroc
+ { MAP_GEFFEN, 119, 59, 3 }, // 2 = Geffen
+ { MAP_PAYON, 162, 233, 3 }, // 3 = Payon
+ { MAP_ALBERTA, 192, 147, 3 }, // 4 = Alberta
#ifdef RENEWAL
- { MAP_IZLUDE, 128, 146 }, // 5=Izlude (Renewal)
+ { MAP_IZLUDE, 128, 146, 3 }, // 5 = Izlude (Renewal)
#else
- { MAP_IZLUDE, 128, 114 }, // 5=Izlude
+ { MAP_IZLUDE, 128, 114, 3 }, // 5 = Izlude
#endif
- { MAP_ALDEBARAN, 140, 131 }, // 6=Al de Baran
- { MAP_LUTIE, 147, 134 }, // 7=Lutie
- { MAP_COMODO, 209, 143 }, // 8=Comodo
- { MAP_YUNO, 157, 51 }, // 9=Yuno
- { MAP_AMATSU, 198, 84 }, // 10=Amatsu
- { MAP_GONRYUN, 160, 120 }, // 11=Gonryun
- { MAP_UMBALA, 89, 157 }, // 12=Umbala
- { MAP_NIFLHEIM, 21, 153 }, // 13=Niflheim
- { MAP_LOUYANG, 217, 40 }, // 14=Louyang
- { MAP_NOVICE, 53, 111 }, // 15=Training Grounds
- { MAP_JAIL, 23, 61 }, // 16=Prison
- { MAP_JAWAII, 249, 127 }, // 17=Jawaii
- { MAP_AYOTHAYA, 151, 117 }, // 18=Ayothaya
- { MAP_EINBROCH, 64, 200 }, // 19=Einbroch
- { MAP_LIGHTHALZEN, 158, 92 }, // 20=Lighthalzen
- { MAP_EINBECH, 70, 95 }, // 21=Einbech
- { MAP_HUGEL, 96, 145 }, // 22=Hugel
- { MAP_RACHEL, 130, 110 }, // 23=Rachel
- { MAP_VEINS, 216, 123 }, // 24=Veins
- { MAP_MOSCOVIA, 223, 184 }, // 25=Moscovia
- { MAP_MIDCAMP, 180, 240 }, // 26=Midgard Camp
- { MAP_MANUK, 282, 138 }, // 27=Manuk
- { MAP_SPLENDIDE, 197, 176 }, // 28=Splendide
- { MAP_BRASILIS, 182, 239 }, // 29=Brasilis
- { MAP_DICASTES, 198, 187 }, // 30=El Dicastes
- { MAP_MORA, 44, 151 }, // 31=Mora
- { MAP_DEWATA, 200, 180 }, // 32=Dewata
- { MAP_MALANGDO, 140, 114 }, // 33=Malangdo Island
- { MAP_MALAYA, 242, 211 }, // 34=Malaya Port
- { MAP_ECLAGE, 110, 39 }, // 35=Eclage
+ { MAP_ALDEBARAN, 140, 131, 3 }, // 6 = Aldebaran
+ { MAP_LUTIE, 147, 134, 3 }, // 7 = Lutie
+ { MAP_COMODO, 209, 143, 3 }, // 8 = Comodo
+ { MAP_YUNO, 157, 51, 3 }, // 9 = Juno
+ { MAP_AMATSU, 198, 84, 3 }, // 10 = Amatsu
+ { MAP_GONRYUN, 160, 120, 3 }, // 11 = Kunlun
+ { MAP_UMBALA, 89, 157, 3 }, // 12 = Umbala
+ { MAP_NIFLHEIM, 21, 153, 3 }, // 13 = Niflheim
+ { MAP_LOUYANG, 217, 40, 3 }, // 14 = Luoyang
+ { MAP_NOVICE, 53, 111, 3 }, // 15 = Training Grounds
+ { MAP_JAIL, 23, 61, 3 }, // 16 = Prison
+ { MAP_JAWAII, 249, 127, 3 }, // 17 = Jawaii
+ { MAP_AYOTHAYA, 151, 117, 3 }, // 18 = Ayothaya
+ { MAP_EINBROCH, 64, 200, 5 }, // 19 = Einbroch
+ { MAP_LIGHTHALZEN, 158, 92, 3 }, // 20 = Lighthalzen
+ { MAP_EINBECH, 70, 95, 5 }, // 21 = Einbech
+ { MAP_HUGEL, 96, 145, 3 }, // 22 = Hugel
+ { MAP_RACHEL, 130, 110, 3 }, // 23 = Rachel
+ { MAP_VEINS, 216, 123, 3 }, // 24 = Veins
+ { MAP_MOSCOVIA, 223, 184, 3 }, // 25 = Moscovia
+ { MAP_MIDCAMP, 180, 240, 3 }, // 26 = Midgard Camp
+ { MAP_MANUK, 282, 138, 3 }, // 27 = Manuk
+ { MAP_SPLENDIDE, 197, 176, 3 }, // 28 = Splendide
+ { MAP_BRASILIS, 182, 239, 3 }, // 29 = Brasilis
+ { MAP_DICASTES, 198, 187, 3 }, // 30 = El Dicastes
+ { MAP_MORA, 44, 151, 4 }, // 31 = Mora
+ { MAP_DEWATA, 200, 180, 3 }, // 32 = Dewata
+ { MAP_MALANGDO, 140, 114, 5 }, // 33 = Malangdo Island
+ { MAP_MALAYA, 242, 211, 5 }, // 34 = Malaya Port
+ { MAP_ECLAGE, 110, 39, 3 }, // 35 = Eclage
};
memset(map_name, '\0', sizeof(map_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
- // get the number
- town = atoi(message);
-
- if (!message || !*message || sscanf(message, "%11s", map_name) < 1 || town < 0 || town >= ARRAYLENGTH(data))
- {// no value matched so send the list of locations
+ if (!message || !*message || sscanf(message, "%11s", map_name) < 1) {
+ // no value matched so send the list of locations
const char* text;
// attempt to find the text help string
@@ -1772,98 +1791,49 @@ ACMD(go)
return false;
}
-
- // get possible name of the city
- map_name[MAP_NAME_LENGTH-1] = '\0';
- for (i = 0; map_name[i]; i++)
- map_name[i] = TOLOWER(map_name[i]);
- // try to identify the map name
- if (strncmp(map_name, "prontera", 3) == 0) {
- town = 0;
- } else if (strncmp(map_name, "morocc", 4) == 0 ||
- strncmp(map_name, "morroc", 4) == 0) {
- town = 1;
- } else if (strncmp(map_name, "geffen", 3) == 0) {
- town = 2;
- } else if (strncmp(map_name, "payon", 3) == 0) {
- town = 3;
- } else if (strncmp(map_name, "alberta", 3) == 0) {
- town = 4;
- } else if (strncmp(map_name, "izlude", 3) == 0) {
- town = 5;
- } else if (strncmp(map_name, "aldebaran", 3) == 0) {
- town = 6;
- } else if (strncmp(map_name, "lutie", 3) == 0 ||
- strcmp(map_name, "christmas") == 0 ||
- strncmp(map_name, "xmas", 3) == 0 ||
- strncmp(map_name, "x-mas", 3) == 0) {
- town = 7;
- } else if (strncmp(map_name, "comodo", 3) == 0) {
- town = 8;
- } else if (strncmp(map_name, "juno", 3) == 0 ||
- strncmp(map_name, "yuno", 3) == 0) {
- town = 9;
- } else if (strncmp(map_name, "amatsu", 3) == 0) {
- town = 10;
- } else if (strncmp(map_name, "kunlun", 3) == 0 ||
- strncmp(map_name, "gonryun", 3) == 0) {
- town = 11;
- } else if (strncmp(map_name, "umbala", 3) == 0) {
- town = 12;
- } else if (strncmp(map_name, "niflheim", 3) == 0) {
- town = 13;
- } else if (strncmp(map_name, "louyang", 3) == 0) {
- town = 14;
- } else if (strncmp(map_name, "new_1-1", 3) == 0 ||
- strncmp(map_name, "startpoint", 3) == 0 ||
- strncmp(map_name, "beginning", 3) == 0) {
- town = 15;
- } else if (strncmp(map_name, "sec_pri", 3) == 0 ||
- strncmp(map_name, "prison", 3) == 0 ||
- strncmp(map_name, "jail", 3) == 0) {
- town = 16;
- } else if (strncmp(map_name, "jawaii", 3) == 0) {
- town = 17;
- } else if (strncmp(map_name, "ayothaya", 3) == 0) {
- town = 18;
- } else if (strncmp(map_name, "einbroch", 5) == 0) {
- town = 19;
- } else if (strncmp(map_name, "lighthalzen", 3) == 0) {
- town = 20;
- } else if (strncmp(map_name, "einbech", 5) == 0) {
- town = 21;
- } else if (strncmp(map_name, "hugel", 3) == 0) {
- town = 22;
- } else if (strncmp(map_name, "rachel", 3) == 0) {
- town = 23;
- } else if (strncmp(map_name, "veins", 3) == 0) {
- town = 24;
- } else if (strncmp(map_name, "moscovia", 3) == 0) {
- town = 25;
- } else if (strncmp(map_name, "mid_camp", 3) == 0) {
- town = 26;
- } else if (strncmp(map_name, "manuk", 3) == 0) {
- town = 27;
- } else if (strncmp(map_name, "splendide", 3) == 0) {
- town = 28;
- } else if (strncmp(map_name, "brasilis", 3) == 0) {
- town = 29;
- } else if (strncmp(map_name, "dicastes01", 3) == 0) {
- town = 30;
- } else if (strcmp(map_name, "mora") == 0) {
- town = 31;
- } else if (strncmp(map_name, "dewata", 3) == 0) {
- town = 32;
- } else if (strncmp(map_name, "malangdo", 5) == 0) {
- town = 33;
- } else if (strncmp(map_name, "malaya", 5) == 0) {
- town = 34;
- } else if (strncmp(map_name, "eclage", 3) == 0) {
- town = 35;
+
+ // Numeric entry
+ if (ISDIGIT(*message) || (message[0] == '-' && ISDIGIT(message[1]))) {
+ town = atoi(message);
}
-
+
+ if (town < 0 || town >= ARRAYLENGTH(data)) {
+ map_name[MAP_NAME_LENGTH-1] = '\0';
+
+ // Match maps on the list
+ for (i = 0; i < ARRAYLENGTH(data); i++) {
+ if (strncmpi(map_name, data[i].map, data[i].min_match) == 0) {
+ town = i;
+ break;
+ }
+ }
+ }
+
+ if (town < 0 || town >= ARRAYLENGTH(data)) {
+ // Alternate spellings
+ if (strncmpi(map_name, "morroc", 4) == 0) { // Correct town name for 'morocc'
+ town = 1;
+ } else if (strncmpi(map_name, "lutie", 3) == 0) { // Correct town name for 'xmas'
+ town = 7;
+ } else if (strncmpi(map_name, "juno", 3) == 0) { // Correct town name for 'yuno'
+ town = 9;
+ } else if (strncmpi(map_name, "kunlun", 3) == 0) { // Original town name for 'gonryun'
+ town = 11;
+ } else if (strncmpi(map_name, "luoyang", 3) == 0) { // Original town name for 'louyang'
+ town = 14;
+ } else if (strncmpi(map_name, "startpoint", 3) == 0 // Easy to remember alternatives to 'new_1-1'
+ || strncmpi(map_name, "beginning", 3) == 0) {
+ town = 15;
+ } else if (strncmpi(map_name, "prison", 3) == 0 // Easy to remember alternatives to 'sec_pri'
+ || strncmpi(map_name, "jail", 3) == 0) {
+ town = 16;
+ } else if (strncmpi(map_name, "rael", 3) == 0) { // Original town name for 'rachel'
+ town = 23;
+ }
+ }
+
if (town >= 0 && town < ARRAYLENGTH(data)) {
- m = map->mapname2mapid(data[town].map);
+ int16 m = map->mapname2mapid(data[town].map);
if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(247));
return false;
@@ -1878,7 +1848,7 @@ ACMD(go)
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
- } else { // if you arrive here, you have an error in town variable when reading of names
+ } else {
clif->message(fd, msg_txt(38)); // Invalid location number or name.
return false;
}
@@ -1926,7 +1896,7 @@ ACMD(monster)
return false;
}
- if ((mob_id = mob->db_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number)
+ if ((mob_id = mob->db_searchname(monster)) == 0) // check name first (to avoid possible name beginning by a number)
mob_id = mob->db_checkid(atoi(monster));
if (mob_id == 0) {
@@ -2353,7 +2323,11 @@ ACMD(zeny)
if((ret=pc->payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1)
clif->message(fd, msg_txt(41)); // Unable to decrease the number/value.
}
- if(!ret) clif->message(fd, msg_txt(176)); //ret=0 mean cmd success
+
+ if( ret ) //ret != 0 means cmd failure
+ return false;
+
+ clif->message(fd, msg_txt(176));
return true;
}
@@ -2737,7 +2711,7 @@ ACMD(char_block)
* mn: minute
* s: second
* <example> @ban +1m-2mn1s-6y test_player
- * this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time.
+ * this example adds 1 month and 1 second, and subtracts 2 minutes and 6 years at the same time.
*------------------------------------------*/
ACMD(char_ban)
{
@@ -2905,12 +2879,12 @@ ACMD(doom)
{
status_kill(&pl_sd->bl);
clif->specialeffect(&pl_sd->bl,450,AREA);
- clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
+ clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgment.
}
}
mapit->free(iter);
- clif->message(fd, msg_txt(62)); // Judgement was made.
+ clif->message(fd, msg_txt(62)); // Judgment was made.
return true;
}
@@ -2930,12 +2904,12 @@ ACMD(doommap)
{
status_kill(&pl_sd->bl);
clif->specialeffect(&pl_sd->bl,450,AREA);
- clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
+ clif->message(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgment.
}
}
mapit->free(iter);
- clif->message(fd, msg_txt(62)); // Judgement was made.
+ clif->message(fd, msg_txt(62)); // Judgment was made.
return true;
}
@@ -3010,7 +2984,7 @@ ACMD(kick)
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player.
return false;
}
@@ -3313,7 +3287,7 @@ ACMD(mapexit) {
}
/*==========================================
- * idsearch <part_of_name>: revrited by [Yor]
+ * idsearch <part_of_name>: rewrite by [Yor]
*------------------------------------------*/
ACMD(idsearch)
{
@@ -3359,7 +3333,7 @@ ACMD(recallall)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map.
return false;
}
@@ -3411,7 +3385,7 @@ ACMD(guildrecall)
}
if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map.
return false;
}
@@ -3468,7 +3442,7 @@ ACMD(partyrecall)
}
if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif->message(fd, msg_txt(1032)); // You are not authorized to warp someone to your current map.
return false;
}
@@ -3943,7 +3917,12 @@ ACMD(mount_peco)
return false;
}
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT && pc->checkskill(sd,RK_DRAGONTRAINING) > 0 ) {
+ if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT ) {
+ if( !pc->checkskill(sd,RK_DRAGONTRAINING) ) {
+ sprintf(atcmd_output, msg_txt(213), skill->get_desc(RK_DRAGONTRAINING)); // You need %s to mount!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
if( !(sd->sc.option&OPTION_DRAGON1) ) {
clif->message(sd->fd,msg_txt(1119)); // You have mounted your Dragon.
pc->setoption(sd, sd->sc.option|OPTION_DRAGON1);
@@ -3953,7 +3932,12 @@ ACMD(mount_peco)
}
return true;
}
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER && pc->checkskill(sd,RA_WUGRIDER) > 0 ) {
+ if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER ) {
+ if( !pc->checkskill(sd,RA_WUGRIDER) ) {
+ sprintf(atcmd_output, msg_txt(213), skill->get_desc(RA_WUGRIDER)); // You need %s to mount!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
if( !pc_isridingwug(sd) ) {
clif->message(sd->fd,msg_txt(1121)); // You have mounted your Warg.
pc->setoption(sd, sd->sc.option|OPTION_WUGRIDER);
@@ -3973,21 +3957,23 @@ ACMD(mount_peco)
}
return true;
}
- if (!pc_isriding(sd)) { // if actually no peco
-
- if (!pc->checkskill(sd, KN_RIDING)) {
- clif->message(fd, msg_txt(213)); // You can not mount a Peco Peco with your current job.
- return false;
+ if( sd->class_&MAPID_SWORDMAN && sd->class_&JOBL_2 ) {
+ if( !pc_isriding(sd) ) { // if actually no peco
+ if (!pc->checkskill(sd, KN_RIDING)) {
+ sprintf(atcmd_output, msg_txt(213), skill->get_desc(KN_RIDING)); // You need %s to mount!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
+ pc->setoption(sd, sd->sc.option | OPTION_RIDING);
+ clif->message(fd, msg_txt(102)); // You have mounted a Peco Peco.
+ } else {//Dismount
+ pc->setoption(sd, sd->sc.option & ~OPTION_RIDING);
+ clif->message(fd, msg_txt(214)); // You have released your Peco Peco.
}
-
- pc->setoption(sd, sd->sc.option | OPTION_RIDING);
- clif->message(fd, msg_txt(102)); // You have mounted a Peco Peco.
- } else {//Dismount
- pc->setoption(sd, sd->sc.option & ~OPTION_RIDING);
- clif->message(fd, msg_txt(214)); // You have released your Peco Peco.
+ return true;
}
-
- return true;
+ clif->message(fd, msg_txt(215)); // Your class can't mount!
+ return false;
}
/*==========================================
@@ -4115,7 +4101,7 @@ ACMD(nuke) {
skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0);
clif->message(fd, msg_txt(109)); // Player has been nuked!
} else {
- clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player.
return false;
}
} else {
@@ -4312,7 +4298,7 @@ ACMD(servertime) {
const struct TimerData * timer_data2 = timer->get(pc->day_timer_tid);
if (map->night_flag == 0) {
- sprintf(temp, msg_txt(235), // Game time: The game is actualy in daylight for %s.
+ sprintf(temp, msg_txt(235), // Game time: The game is actually in daylight for %s.
txt_time((unsigned int)(DIFF_TICK(timer_data->tick,timer->gettick())/1000)));
clif->message(fd, temp);
if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0)
@@ -4323,7 +4309,7 @@ ACMD(servertime) {
txt_time((unsigned int)(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)));
clif->message(fd, temp);
} else {
- sprintf(temp, msg_txt(233), // Game time: The game is actualy in night for %s.
+ sprintf(temp, msg_txt(233), // Game time: The game is actually in night for %s.
txt_time((unsigned int)(DIFF_TICK(timer_data2->tick,timer->gettick()) / 1000)));
clif->message(fd, temp);
if (DIFF_TICK(timer_data2->tick,timer_data->tick) > 0)
@@ -4397,7 +4383,7 @@ ACMD(jail) {
if (pc_get_group_level(sd) < pc_get_group_level(pl_sd))
{ // you can jail only lower or same GM
- clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player.
return false;
}
@@ -4448,7 +4434,7 @@ ACMD(unjail) {
if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM
- clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player.
return false;
}
@@ -4525,7 +4511,7 @@ ACMD(jailfor) {
}
if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
- clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player.
return false;
}
@@ -5183,9 +5169,10 @@ ACMD(clearcart)
return false;
}
- if (sd->state.vending == 1) { //Somehow...
- return false;
- }
+ if( sd->state.vending == 1 ) {
+ clif->message(fd, msg_txt(548)); // You can't clean a cart while vending!
+ return false;
+ }
for( i = 0; i < MAX_CART; i++ )
if(sd->status.cart[i].nameid > 0)
@@ -5270,7 +5257,7 @@ ACMD(useskill) {
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->message(fd, msg_txt(81)); // Your GM level don't authorized you to do this action on this player.
return false;
}
@@ -5485,7 +5472,7 @@ ACMD(autotrade) {
status->change_start(NULL,&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0);
}
- /* currently standalones are not supporting buyingstores, so we rely on the previous method */
+ /* currently standalone is not supporting buyingstores, so we rely on the previous method */
if( sd->state.buyingstore ) {
clif->authfail_fd(fd, 15);
return true;
@@ -6410,7 +6397,7 @@ ACMD(changesex)
int i;
pc->resetskill(sd,4);
- // to avoid any problem with equipment and invalid sex, equipment is unequiped.
+ // to avoid any problem with equipment and invalid sex, equipment is unequipped.
for( i=0; i<EQI_MAX; i++ )
if( sd->equip_index[i] >= 0 ) pc->unequipitem(sd, sd->equip_index[i], 3);
chrif->changesex(sd);
@@ -6436,7 +6423,7 @@ ACMD(mute) {
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif->message(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player.
return false;
}
@@ -6673,20 +6660,29 @@ ACMD(showmobs)
int number = 0;
struct s_mapiterator* it;
- if(sscanf(message, "%99[^\n]", mob_name) < 0)
+ if( sscanf(message, "%99[^\n]", mob_name) < 0 ) {
+ clif->message(fd, msg_txt(546)); // Please enter a mob name/id (usage: @showmobs <mob name/id>)
return false;
-
- if((mob_id = atoi(mob_name)) == 0)
+ }
+
+ if( (mob_id = atoi(mob_name)) == 0 )
mob_id = mob->db_searchname(mob_name);
+
+ if( mob_id == 0 ) {
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(547), mob_name); // Invalid mob name %s!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
+
if(mob_id > 0 && mob->db_checkid(mob_id) == 0){
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1250),mob_name); // Invalid mob id %s!
clif->message(fd, atcmd_output);
- return true;
+ return false;
}
if(mob->db(mob_id)->status.mode&MD_BOSS && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs.
clif->message(fd, msg_txt(1251)); // Can't show boss mobs!
- return true;
+ return false;
}
if(mob_id == atoi(mob_name) && mob->db(mob_id)->jname)
@@ -7208,18 +7204,11 @@ ACMD(whereis)
}
ACMD(version) {
- const char *git = get_git_hash();
- const char *svn = get_svn_revision();
-
- if ( git[0] != HERC_UNKNOWN_VER ) {
- sprintf(atcmd_output,msg_txt(1295),git); // Git Hash '%s'
- clif->message(fd,atcmd_output);
- } else if ( svn[0] != HERC_UNKNOWN_VER ) {
- sprintf(atcmd_output,msg_txt(1294),git); // SVN r%s
- clif->message(fd,atcmd_output);
- } else
- clif->message(fd,msg_txt(1296)); // Cannot determine version
-
+ sprintf(atcmd_output, msg_txt(1296), sysinfo->is64bit() ? 64 : 32, sysinfo->platform()); // Hercules %d-bit for %s
+ clif->message(fd, atcmd_output);
+ sprintf(atcmd_output, msg_txt(1295), sysinfo->vcstype(), sysinfo->vcsrevision_src(), sysinfo->vcsrevision_scripts()); // %s revision '%s' (src) / '%s' (scripts)
+ clif->message(fd, atcmd_output);
+
return true;
}
@@ -7438,6 +7427,8 @@ ACMD(fakename){
{
sd->fakename[0] = '\0';
clif->charnameack(0, &sd->bl);
+ if( sd->disguise )
+ clif->charnameack(sd->fd, &sd->bl);
clif->message(sd->fd, msg_txt(1307)); // Returned to real name.
return true;
}
@@ -7454,6 +7445,8 @@ ACMD(fakename){
safestrncpy(sd->fakename, message, sizeof(sd->fakename));
clif->charnameack(0, &sd->bl);
+ if( sd->disguise ) // Another packet should be sent so the client updates the name for sd
+ clif->charnameack(sd->fd, &sd->bl);
clif->message(sd->fd, msg_txt(1310)); // Fake name enabled.
return true;
@@ -7723,7 +7716,7 @@ ACMD(accept) {
}
if(sd->duel_invite <= 0) {
- // "Duel: @accept without invititation."
+ // "Duel: @accept without invitation."
clif->message(fd, msg_txt(360));
return false;
}
@@ -7743,7 +7736,7 @@ ACMD(accept) {
ACMD(reject) {
if(sd->duel_invite <= 0) {
- // "Duel: @reject without invititation."
+ // "Duel: @reject without invitation."
clif->message(fd, msg_txt(362));
return false;
}
@@ -8441,7 +8434,7 @@ ACMD(set) {
if( is_str )
script->set_var(sd, reg, (void*) val);
else
- script->set_var(sd, reg, (void*)__64BPTRSIZE((atoi(val))));
+ script->set_var(sd, reg, (void*)h64BPTRSIZE((atoi(val))));
}
@@ -8655,7 +8648,7 @@ ACMD(join) {
if( hChSys.local && strcmpi(name + 1, hChSys.local_name) == 0 ) {
if( !map->list[sd->bl.m].channel ) {
clif->chsys_mjoin(sd);
- if( map->list[sd->bl.m].channel ) /* mjoin might have refused, map has chatting capabilities disabled */
+ if( map->list[sd->bl.m].channel ) /* join might have refused, map has chatting capabilities disabled */
return true;
} else
channel = map->list[sd->bl.m].channel;
@@ -10058,7 +10051,7 @@ void atcommand_config_read(const char* config_filename) {
}
commandinfo->log = false;
}
- }
+ }
// Commands help
// We only check if all commands exist
@@ -10105,7 +10098,7 @@ static inline int AtCommandType2idx(AtCommandType type) { return (type-1); }
/**
* Loads permissions for groups to use commands.
- *
+ *
*/
void atcommand_db_load_groups(GroupSettings **groups, config_setting_t **commands_, size_t sz)
{
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index bc4ab30a3..356487bd1 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -2,12 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_ATCOMMAND_H_
-#define _MAP_ATCOMMAND_H_
+#ifndef MAP_ATCOMMAND_H
+#define MAP_ATCOMMAND_H
+#include "pc_groups.h"
#include "../common/conf.h"
#include "../common/db.h"
-#include "pc_groups.h"
/**
* Declarations
@@ -121,4 +121,4 @@ void atcommand_defaults(void);
/* stay here */
#define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info)
-#endif /* _MAP_ATCOMMAND_H_ */
+#endif /* MAP_ATCOMMAND_H */
diff --git a/src/map/battle.c b/src/map/battle.c
index 2217ccecc..7610d97b2 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2,40 +2,44 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/ers.h"
-#include "../common/random.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
-#include "map.h"
-#include "path.h"
-#include "pc.h"
-#include "status.h"
-#include "skill.h"
-#include "homunculus.h"
-#include "mercenary.h"
-#include "elemental.h"
-#include "mob.h"
-#include "itemdb.h"
-#include "clif.h"
-#include "pet.h"
-#include "guild.h"
-#include "party.h"
+#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT
#include "battle.h"
-#include "battleground.h"
-#include "chrif.h"
+#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <math.h>
+
+#include "battleground.h"
+#include "chrif.h"
+#include "clif.h"
+#include "elemental.h"
+#include "guild.h"
+#include "homunculus.h"
+#include "itemdb.h"
+#include "map.h"
+#include "mercenary.h"
+#include "mob.h"
+#include "party.h"
+#include "path.h"
+#include "pc.h"
+#include "pet.h"
+#include "skill.h"
+#include "status.h"
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/sysinfo.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct Battle_Config battle_config;
struct battle_interface battle_s;
@@ -54,7 +58,7 @@ int battle_getcurrentskill(struct block_list *bl) { //Returns the current/last s
}
/*==========================================
- * Get random targetting enemy
+ * Get random targeting enemy
*------------------------------------------*/
int battle_gettargeted_sub(struct block_list *bl, va_list ap) {
struct block_list **bl_list;
@@ -98,7 +102,7 @@ struct block_list* battle_gettargeted(struct block_list *target) {
}
-//Returns the id of the current targetted character of the passed bl. [Skotlex]
+//Returns the id of the current targeted character of the passed bl. [Skotlex]
int battle_gettarget(struct block_list* bl) {
switch (bl->type) {
@@ -258,7 +262,7 @@ int battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct
if ( !battle_config.delay_battle_damage || amotion <= 1 ) {
map->freeblock_lock();
- status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope]
+ status_fix_damage(src, target, damage, ddelay); // We have to separate here between reflect damage and others [icescope]
if( attack_type && !status->isdead(target) && additional_effects )
skill->additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, timer->gettick());
if( dmg_lv > ATK_BLOCK && attack_type )
@@ -354,7 +358,7 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
}
}
}
- if( tsc && tsc->count ) { //since an atk can only have one type let's optimise this a bit
+ if( tsc && tsc->count ) { //since an atk can only have one type let's optimize this a bit
switch(atk_elem){
case ELE_FIRE:
if( tsc->data[SC_SPIDERWEB]) {
@@ -442,7 +446,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u
if( sc && sc->count ){
if( sc->data[SC_ZENKAI] && watk->ele == sc->data[SC_ZENKAI]->val2 )
eatk += 200;
- #ifdef RENEWAL_EDP
+ #ifdef RENEWAL_EDP
if( sc->data[SC_EDP] && skill_id != AS_GRIMTOOTH && skill_id != AS_VENOMKNIFE && skill_id != ASC_BREAKER ){
eatk = eatk * (sc->data[SC_EDP]->val4 / 100 - 1);
damage = damage * (sc->data[SC_EDP]->val4 / 100);
@@ -459,7 +463,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u
damage = battle->calc_elefix(src, bl, skill_id, skill_lv, damage + eatk, nk, n_ele, s_ele, s_ele_, type == EQI_HAND_L, flag);
/**
- * In RE Shield Bommerang takes weapon element only for damage calculation,
+ * In RE Shield Boomerang takes weapon element only for damage calculation,
* - resist calculation is always against neutral
**/
if ( skill_id == CR_SHIELDBOOMERANG )
@@ -478,7 +482,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u
}
/*==========================================
* Calculates the standard damage of a normal attack assuming it hits,
- * it calculates nothing extra fancy, is needed for magnum break's WATK_ELEMENT bonus. [Skotlex]
+ * it calculates nothing extra fancy, is needed for magnum breaks WATK_ELEMENT bonus. [Skotlex]
*------------------------------------------
* Pass damage2 as NULL to not calc it.
* Flag values:
@@ -563,7 +567,7 @@ int64 battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, st
else
damage += st->batk;
- //rodatazone says that Overrefine bonuses are part of baseatk
+ //rodatazone says that Overrefined bonuses are part of baseatk
//Here we also apply the weapon_atk_rate bonus so it is correctly applied on left/right hands.
if(sd) {
if (type == EQI_HAND_L) {
@@ -600,7 +604,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in
nullpo_ret(sd);
if((skill_lv = pc->checkskill(sd,AL_DEMONBANE)) > 0 &&
- target->type == BL_MOB && //This bonus doesnt work against players.
+ target->type == BL_MOB && //This bonus doesn't work against players.
(battle->check_undead(st->race,st->def_ele) || st->race==RC_DEMON) )
damage += (int)(skill_lv*(3+sd->status.base_level/20.0));
//damage += (skill_lv * 3);
@@ -651,7 +655,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in
damage += (skill_lv * 10);
else if(pc_isriding(sd))
damage += (skill_lv * 5);
- else
+ else
damage += (skill_lv * 4);
}
break;
@@ -672,7 +676,7 @@ int64 battle_addmastery(struct map_session_data *sd,struct block_list *target,in
case W_FIST:
if((skill_lv = pc->checkskill(sd,TK_RUN)) > 0)
damage += (skill_lv * 10);
- // No break, fallthrough to Knuckles
+ // No break, fall through to Knuckles
case W_KNUCKLE:
if((skill_lv = pc->checkskill(sd,MO_IRONHAND)) > 0)
damage += (skill_lv * 3);
@@ -733,7 +737,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target,
#endif
)
damage += 3 * skill2_lv;
- break;
+ break;
#ifndef RENEWAL
case NJ_KUNAI:
if( weapon )
@@ -744,7 +748,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target,
if( sd->weight )
damage += sd->weight / 8 ;
case RA_WUGSTRIKE:
- case RA_WUGBITE:
+ case RA_WUGBITE:
damage += 30*pc->checkskill(sd, RA_TOOTHOFWUG);
break;
case HT_FREEZINGTRAP:
@@ -995,7 +999,7 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_
cardfix = cardfix * (100 + sd->right_weapon.addrace[RC_NONDEMIHUMAN]+sd->arrow_addrace[RC_NONDEMIHUMAN]) / 100;
}else{ // Melee attack
if( !battle_config.left_cardfix_to_right ){
- cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100;
if( !(nk&NK_NO_ELEFIX) ){
int ele_fix = sd->right_weapon.addele[tstatus->def_ele];
for (i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++) {
@@ -1015,9 +1019,9 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_
cardfix = cardfix * (100 + sd->right_weapon.addrace[RC_NONDEMIHUMAN]) / 100;
if( cflag&1 ){
- cardfix_ = cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100;
+ cardfix_ = cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100;
if (!(nk&NK_NO_ELEFIX)){
- int ele_fix_lh = sd->left_weapon.addele[tstatus->def_ele];
+ int ele_fix_lh = sd->left_weapon.addele[tstatus->def_ele];
for (i = 0; ARRAYLENGTH(sd->left_weapon.addele2) > i && sd->left_weapon.addele2[i].rate != 0; i++) {
if (sd->left_weapon.addele2[i].ele != tstatus->def_ele) continue;
if(!(sd->left_weapon.addele2[i].flag&wflag&BF_WEAPONMASK &&
@@ -1217,7 +1221,7 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_
**/
defType def1 = status->get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
short def2 = tstatus->def2, vit_def;
-#ifdef RENEWAL
+#ifdef RENEWAL
def1 = status->calc_def2(target, tsc, def1, false); // equip def(RE)
def2 = status->calc_def(target, tsc, def2, false); // status def(RE)
#else
@@ -1268,9 +1272,9 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_
#else
vit_def = def2;
#endif
- if((battle->check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesnt work vs players
+ if((battle->check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesn't work vs players
src->type == BL_MOB && (i=pc->checkskill(tsd,AL_DP)) > 0)
- vit_def += i*(int)(3 +(tsd->status.base_level+1)*0.04); // submitted by orn
+ vit_def += i*(int)(3 +(tsd->status.base_level+1)*0.04); // [orn]
if( src->type == BL_MOB && (i=pc->checkskill(tsd,RA_RANGERMAIN))>0 &&
(sstatus->race == RC_BRUTE || sstatus->race == RC_FISH || sstatus->race == RC_PLANT) )
vit_def += i*5;
@@ -1292,12 +1296,12 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_
#ifdef RENEWAL
/**
* RE DEF Reduction
- * Pierce defence gains 1 atk per def/2
+ * Pierce defense gains 1 atk per def/2
**/
if( def1 < -399 ) // it stops at -399
def1 = 399; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 399
- //return 1;
+ //return 1;
if( flag&2 )
damage += def1 >> 1;
@@ -1353,7 +1357,7 @@ int64 battle_calc_defense(int attack_type, struct block_list *src, struct block_
**/
if( mdef < -99 ) // it stops at -99
mdef = 99; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 99
- //return 1;
+ //return 1;
damage = (int)((100.0f - mdef / (mdef + 100.0f) * 90.0f) / 100.0f * damage - mdef2);
#else
@@ -1380,7 +1384,7 @@ int battle_calc_chorusbonus(struct map_session_data *sd) {
if (members < 3)
return 0; // Bonus remains 0 unless 3 or more Minstrel's/Wanderer's are in the party.
if (members > 7)
- return 5; // Maximum effect possiable from 7 or more Minstrel's/Wanderer's
+ return 5; // Maximum effect possible from 7 or more Minstrel's/Wanderer's
return members - 2; // Effect bonus from additional Minstrel's/Wanderer's if not above the max possible
}
@@ -1720,9 +1724,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
skillratio += 1100;
break;
case MH_ERASER_CUTTER:
- if(skill_lv%2) skillratio += 400; //600:800:1000
- else skillratio += 700; //1000:1200
- skillratio += 100 * skill_lv;
+ skillratio += 400 + 100 * skill_lv + (skill_lv%2 > 0 ? 0 : 300);
break;
case MH_XENO_SLASHER:
if(skill_lv%2) skillratio += 350 + 50 * skill_lv; //500:600:700
@@ -2003,7 +2005,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
skillratio += 50 * skill_lv;
break;
case GS_BULLSEYE:
- //Only works well against brute/demihumans non bosses.
+ //Only works well against brute/demi-humans non bosses.
if((tst->race == RC_BRUTE || tst->race == RC_DEMIHUMAN)
&& !(tst->mode&MD_BOSS))
skillratio += 400;
@@ -2107,15 +2109,6 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
if( st->rhw.ele == ELE_FIRE )
skillratio += 100 * skill_lv;
break;
- case RK_CRUSHSTRIKE:
- if( sd )
- {//ATK [{Weapon Level * (Weapon Upgrade Level + 6) * 100} + (Weapon ATK) + (Weapon Weight)]%
- short index = sd->equip_index[EQI_HAND_R];
- if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON )
- skillratio += -100 + sd->inventory_data[index]->weight/10 + st->rhw.atk +
- 100 * sd->inventory_data[index]->wlv * (sd->status.inventory[index].refine + 6);
- }
- break;
case RK_STORMBLAST:
skillratio = ((sd ? pc->checkskill(sd,RK_RUNEMASTERY) : 1) + status_get_int(src) / 8) * 100;
break;
@@ -2124,7 +2117,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
RE_LVL_DMOD(150);
break;
/**
- * GC Guilotine Cross
+ * GC Guillotine Cross
**/
case GC_CROSSIMPACT:
skillratio += 900 + 100 * skill_lv;
@@ -2408,7 +2401,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
{
int chorusbonus = battle->calc_chorusbonus(sd);
skillratio += 300 + 200 * skill_lv;
- //Chorus bonus dont count the first 2 Minstrel's/Wanderer's and only increases when their's 3 or more. [Rytech]
+ //Chorus bonus don't count the first 2 Minstrel's/Wanderer's and only increases when their's 3 or more. [Rytech]
if (chorusbonus >= 1 && chorusbonus <= 5)
skillratio += 100<<(chorusbonus-1); // 1->100; 2->200; 3->400; 4->800; 5->1600
RE_LVL_DMOD(100);
@@ -2461,7 +2454,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
if( sc && sc->data[SC_BLAST_OPTION] )
skillratio += (sd ? sd->status.job_level * 5 : 0);
break;
- // Physical Elemantal Spirits Attack Skills
+ // Physical Elemental Spirits Attack Skills
case EL_CIRCLE_OF_FIRE:
case EL_FIRE_BOMB_ATK:
case EL_STONE_RAIN:
@@ -2546,6 +2539,17 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
if( sd && sd->status.weapon == W_KATAR && (i=pc->checkskill(sd,ASC_KATAR)) > 0 )
skillratio += skillratio * (10 + 2 * i) / 100;
#endif
+ if( (!skill_id || skill_id == KN_AUTOCOUNTER) && sc->data[SC_CRUSHSTRIKE] ){
+ if( sd )
+ {//ATK [{Weapon Level * (Weapon Upgrade Level + 6) * 100} + (Weapon ATK) + (Weapon Weight)]%
+ short index = sd->equip_index[EQI_HAND_R];
+ if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON )
+ skillratio += -100 + sd->inventory_data[index]->weight/10 + st->rhw.atk +
+ 100 * sd->inventory_data[index]->wlv * (sd->status.inventory[index].refine + 6);
+ }
+ status_change_end(src, SC_CRUSHSTRIKE, INVALID_TIMER);
+ skill->break_equip(src,EQP_WEAPON,2000,BCT_SELF); // 20% chance to destroy the weapon.
+ }
}
}
if( skillratio < 1 )
@@ -2553,8 +2557,8 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
return skillratio;
}
/*==========================================
- * Check dammage trough status.
- * ATK may be MISS, BLOCKED FAIL, reduc, increase, end status...
+ * Check damage trough status.
+ * ATK may be MISS, BLOCKED FAIL, reduce, increase, end status...
* After this we apply bg/gvg reduction
*------------------------------------------*/
int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv) {
@@ -2617,8 +2621,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
}
}
- if(sc->data[SC_ZEPHYR] &&
- flag&(BF_LONG|BF_SHORT)){
+ if( sc->data[SC_ZEPHYR] && ((flag&BF_LONG) || rand()%100 < 10) ) {
d->dmg_lv = ATK_BLOCK;
return 0;
}
@@ -2711,7 +2714,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
clif->skill_nodamage(bl, bl, RK_MILLENNIUMSHIELD, 1, 1);
sce->val3 -= (int)cap_value(damage,INT_MIN,INT_MAX); // absorb damage
d->dmg_lv = ATK_BLOCK;
- sc_start(src,bl,SC_STUN,15,0,skill->get_time2(RK_MILLENNIUMSHIELD,sce->val1)); // There is a chance to be stuned when one shield is broken.
+ sc_start(src,bl,SC_STUN,15,0,skill->get_time2(RK_MILLENNIUMSHIELD,sce->val1)); // There is a chance to be stunned when one shield is broken.
if( sce->val3 <= 0 ) { // Shield Down
sce->val2--;
if( sce->val2 > 0 ) {
@@ -2981,7 +2984,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
rnd()%100 < sce->val3)
status->heal(src, damage*sce->val4/100, 0, 3);
- if( (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON
+ if( (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON
&& rnd()%100 < sce->val2 && sc->fv_counter <= sce->val3 )
clif->millenniumshield(bl, sc->fv_counter++);
@@ -3025,7 +3028,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
short rate = 100;
struct status_data *tstatus = status->get_status_data(bl);
if ( !(flag&BF_SKILL) && (flag&BF_WEAPON) && damage > 0 && rnd()%100 < tsc->data[SC_POISONINGWEAPON]->val3 ) {
- if ( tsc->data[SC_POISONINGWEAPON]->val1 == 9 ) // Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech]
+ if ( tsc->data[SC_POISONINGWEAPON]->val1 == 9 ) // Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech]
rate = 100 - tstatus->int_ * 4 / 5;
sc_start(src,bl,tsc->data[SC_POISONINGWEAPON]->val2,rate,tsc->data[SC_POISONINGWEAPON]->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000);
}
@@ -3042,7 +3045,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
/* no data claims these settings affect anything other than players */
if( damage && sd && bl->type == BL_PC ) {
switch( skill_id ) {
- //case PA_PRESSURE: /* pressure also belongs to this list but it doesn't reach this area -- so dont worry about it */
+ //case PA_PRESSURE: /* pressure also belongs to this list but it doesn't reach this area -- so don't worry about it */
case HW_GRAVITATION:
case NJ_ZENYNAGE:
case KO_MUCHANAGE:
@@ -3250,7 +3253,7 @@ int battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) {
int i;
if (!sd->skillblown[0].id)
return 0;
- //Apply the bonus blewcount. [Skotlex]
+ //Apply the bonus blow count. [Skotlex]
for (i = 0; i < ARRAYLENGTH(sd->skillblown) && sd->skillblown[i].id; i++) {
if (sd->skillblown[i].id == skill_id)
return sd->skillblown[i].val;
@@ -3331,7 +3334,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
ad.flag |= battle->range_type(src, target, skill_id, skill_lv);
flag.infdef=(tstatus->mode&MD_PLANT?1:0);
if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION )
- flag.infdef = 1; // Reberberation takes 1 damage
+ flag.infdef = 1; // Reverberation takes 1 damage
switch(skill_id) {
case MG_FIREWALL:
@@ -3596,7 +3599,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
}
/*==========================================
- * Calculate Misc dammage for skill_id
+ * Calculate Misc damage for skill_id
*------------------------------------------*/
struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag) {
int temp;
@@ -3904,7 +3907,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
{
if (battle_config.agi_penalty_type == 1)
flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
- else //asume type 2: absolute reduction
+ else // assume type 2: absolute reduction
flee -= (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
if(flee < 1) flee = 1;
}
@@ -4042,7 +4045,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
unsigned lh : 1; //Attack considers left hand (wd.damage2)
unsigned weapon : 1; //It's a weapon attack (consider VVS, and all that)
#ifdef RENEWAL
- unsigned tdef : 1; //Total defence reduction
+ unsigned tdef : 1; //Total defense reduction
#endif
} flag;
@@ -4061,7 +4064,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
#endif
?1:0);
if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION )
- flag.infdef = 1; // Reberberation takes 1 damage
+ flag.infdef = 1; // Reverberation takes 1 damage
//Initial Values
wd.type=0; //Normal attack
@@ -4303,6 +4306,10 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
cri <<= 1;
}
switch (skill_id) {
+ case 0:
+ if(!(sc && sc->data[SC_AUTOCOUNTER]))
+ break;
+ status_change_end(src, SC_AUTOCOUNTER, INVALID_TIMER);
case KN_AUTOCOUNTER:
if(battle_config.auto_counter_type &&
(battle_config.auto_counter_type&src->type))
@@ -4509,7 +4516,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_RATE(50);
RE_SKILL_REDUCTION();
}
- break;
+ break;
case NJ_SYURIKEN: // [malufett]
GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0) );
wd.damage += battle->calc_masteryfix(src, target, skill_id, skill_lv, 4 * skill_lv + (sd ? sd->bonus.arrow_atk : 0), wd.div_, 0, flag.weapon) - status->get_total_def(target);
@@ -4652,6 +4659,8 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADDRATE(sc->data[SC_EXEEDBREAK]->val1);
status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER);
}
+
+
#ifdef RENEWAL
if( sd && skill_id == NJ_KUNAI ){
flag.tdef = 1;
@@ -4876,7 +4885,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADDRATE(sd->bonus.long_attack_atk_rate);
if( sc && sc->data[SC_MTF_RANGEATK] )
ATK_ADDRATE(25);// temporary it should be 'bonus.long_attack_atk_rate'
- #endif
+ #endif
if( (i=pc->checkskill(sd,AB_EUCHARISTICA)) > 0 &&
(tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) )
ATK_ADDRATE(-i);
@@ -5114,12 +5123,13 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
temp = pc->checkskill(sd,TF_DOUBLE);
wd.damage2 = wd.damage * (1 + (temp * 2))/100;
- if(wd.damage && !wd.damage2) wd.damage2 =
+ if(wd.damage && !wd.damage2) {
#ifdef RENEWAL
- 0;
+ wd.damage2 = 0;
#else
- 1;
+ wd.damage2 = 1;
#endif
+ }
flag.lh = 1;
}
}
@@ -5646,7 +5656,6 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
return ATK_BLOCK;
}
}
-
if( tsc && tsc->data[SC_BLADESTOP_WAIT] && !is_boss(src) && (src->type == BL_PC || tsd == NULL || distance_bl(src, target) <= (tsd->status.weapon == W_FIST ? 1 : 2)) )
{
uint16 skill_lv = tsc->data[SC_BLADESTOP_WAIT]->val1;
@@ -5684,7 +5693,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
/**
* We need to calculate the DMG before the hp reduction, because it can kill the source.
- * For futher information: bugreport:4950
+ * For further information: bugreport:4950
**/
ret_val = (damage_lv)skill->attack(BF_WEAPON,src,src,target,PA_SACRIFICE,skill_lv,tick,0);
@@ -5710,13 +5719,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
skill->get_time(MO_CALLSPIRITS, tsc->data[SC_GENTLETOUCH_ENERGYGAIN]->val1),
tsc->data[SC_GENTLETOUCH_ENERGYGAIN]->val1);
}
- if( sc && sc->data[SC_CRUSHSTRIKE] ){
- uint16 skill_lv = sc->data[SC_CRUSHSTRIKE]->val1;
- status_change_end(src, SC_CRUSHSTRIKE, INVALID_TIMER);
- if( skill->attack(BF_WEAPON,src,src,target,RK_CRUSHSTRIKE,skill_lv,tick,0) )
- return ATK_DEF;
- return ATK_MISS;
- }
+
if( tsc && tsc->data[SC_MTF_MLEATKED] && rnd()%100 < 20 )
clif->skill_nodamage(target, target, SM_ENDURE, 5,
sc_start(target,target, SC_ENDURE, 100, 5, skill->get_time(SM_ENDURE, 5)));
@@ -6054,7 +6057,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if(((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres
(((TBL_MOB*)target)->special_state.ai == 3 && battle_config.summon_flora&1)) && //Floras
s_bl->type == BL_PC && src->type != BL_MOB) || (((TBL_MOB*)target)->special_state.ai == 4 && t_bl->id != s_bl->id)) //Zanzoe
- { //Targettable by players
+ { //Targetable by players
state |= BCT_ENEMY;
strip_enemy = 0;
}
@@ -6133,7 +6136,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
sd = BL_CAST(BL_PC, t_bl);
if( sd->state.monster_ignore && flag&BCT_ENEMY )
- return 0; // Global inminuty only to Attacks
+ return 0; // Global immunity only to Attacks
if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma )
state |= BCT_ENEMY; // Characters with bad karma may fight amongst them
if( sd->state.killable ) {
@@ -6146,7 +6149,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
{
struct mob_data *md = BL_CAST(BL_MOB, t_bl);
- if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+ if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle)
+ && md->guardian_data && (md->guardian_data->g || md->guardian_data->castle->guild_id) )
return 0; // Disable guardians/emperiums owned by Guilds on non-woe times.
break;
}
@@ -6206,7 +6210,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_MOB:
{
struct mob_data *md = BL_CAST(BL_MOB, s_bl);
- if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+ if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle)
+ && md->guardian_data && (md->guardian_data->g || md->guardian_data->castle->guild_id) )
return 0; // Disable guardians/emperium owned by Guilds on non-woe times.
if( !md->special_state.ai )
@@ -6227,7 +6232,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
break;
}
default:
- //Need some sort of default behaviour for unhandled types.
+ //Need some sort of default behavior for unhandled types.
if (t_bl->type != s_bl->type)
state |= BCT_ENEMY;
break;
@@ -6347,12 +6352,12 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range
return true; // No need for path checking.
if( d > AREA_SIZE )
- return false; // Avoid targetting objects beyond your range of sight.
+ return false; // Avoid targeting objects beyond your range of sight.
return path->search_long(NULL,src->m,src->x,src->y,bl->x,bl->y,CELL_CHKWALL);
}
-static const struct _battle_data {
+static const struct battle_data {
const char* str;
int* val;
int defval;
@@ -6711,8 +6716,9 @@ static const struct _battle_data {
/**
* rAthena
**/
- { "max_third_parameter", &battle_config.max_third_parameter, 120, 10, 10000, },
- { "max_baby_third_parameter", &battle_config.max_baby_third_parameter, 108, 10, 10000, },
+ { "max_third_parameter", &battle_config.max_third_parameter, 130, 10, 10000, },
+ { "max_baby_third_parameter", &battle_config.max_baby_third_parameter, 117, 10, 10000, },
+ { "max_extended_parameter", &battle_config.max_extended_parameter, 125, 10, 10000, },
{ "atcommand_max_stat_bypass", &battle_config.atcommand_max_stat_bypass, 0, 0, 100, },
{ "skill_amotion_leniency", &battle_config.skill_amotion_leniency, 90, 0, 300 },
{ "mvp_tomb_enabled", &battle_config.mvp_tomb_enabled, 1, 0, 1 },
@@ -6740,6 +6746,8 @@ static const struct _battle_data {
{ "mon_trans_disable_in_gvg", &battle_config.mon_trans_disable_in_gvg, 0, 0, 1, },
{ "case_sensitive_aegisnames", &battle_config.case_sensitive_aegisnames, 1, 0, 1, },
+ { "guild_castle_invite", &battle_config.guild_castle_invite, 0, 0, 1, },
+ { "guild_castle_expulsion", &battle_config.guild_castle_expulsion, 0, 0, 1, },
};
#ifndef STATS_OPT_OUT
/**
@@ -6748,8 +6756,6 @@ static const struct _battle_data {
void Hercules_report(char* date, char *time_c) {
int i, bd_size = ARRAYLENGTH(battle_data);
unsigned int config = 0;
- const char *svn = get_svn_revision();
- const char *git = get_git_hash();
char timestring[25];
time_t curtime;
char* buf;
@@ -6757,7 +6763,7 @@ void Hercules_report(char* date, char *time_c) {
enum config_table {
C_CIRCULAR_AREA = 0x0001,
C_CELLNOSTACK = 0x0002,
- C_CONSOLE_INPUT = 0x0004,
+ C_CONSOLE_INPUT = 0x0004,
C_SCRIPT_CALLFUNC_CHECK = 0x0008,
C_OFFICIAL_WALKPATH = 0x0010,
C_RENEWAL = 0x0020,
@@ -6768,12 +6774,15 @@ void Hercules_report(char* date, char *time_c) {
C_RENEWAL_EDP = 0x0400,
C_RENEWAL_ASPD = 0x0800,
C_SECURE_NPCTIMEOUT = 0x1000,
- C_SQL_DBS = 0x2000,
+ C_SQL_DB_ITEM = 0x2000,
C_SQL_LOGS = 0x4000,
- C_MEMWATCH = 0x8000,
- C_DMALLOC = 0x10000,
- C_GCOLLECT = 0x20000,
- C_SEND_SHORTLIST = 0x40000,
+ C_MEMWATCH = 0x8000,
+ C_DMALLOC = 0x10000,
+ C_GCOLLECT = 0x20000,
+ C_SEND_SHORTLIST = 0x40000,
+ C_SQL_DB_MOB = 0x80000,
+ C_SQL_DB_MOBSKILL = 0x100000,
+ C_PACKETVER_RE = 0x200000,
};
/* we get the current time */
@@ -6831,10 +6840,18 @@ void Hercules_report(char* date, char *time_c) {
#ifdef SECURE_NPCTIMEOUT
config |= C_SECURE_NPCTIMEOUT;
#endif
+
+#ifdef PACKETVER_RE
+ config |= C_PACKETVER_RE;
+#endif
/* non-define part */
- if( map->db_use_sql_item_db || map->db_use_sql_mob_db || map->db_use_sql_mob_skill_db )
- config |= C_SQL_DBS; //TODO: split this config into three.
+ if( map->db_use_sql_item_db )
+ config |= C_SQL_DB_ITEM;
+ if( map->db_use_sql_mob_db )
+ config |= C_SQL_DB_MOB;
+ if( map->db_use_sql_mob_skill_db )
+ config |= C_SQL_DB_MOBSKILL;
if( logs->config.sql_logs )
config |= C_SQL_LOGS;
@@ -6855,30 +6872,40 @@ void Hercules_report(char* date, char *time_c) {
#define BFLAG_LENGTH 35
- CREATE(buf, char, 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) + 1 );
+ CREATE(buf, char, 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) + 1 );
/* build packet */
WBUFW(buf,0) = 0x3000;
- WBUFW(buf,2) = 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) );
- WBUFW(buf,4) = 0x9e;
+ WBUFW(buf,2) = 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) );
+ WBUFW(buf,4) = 0x9f;
safestrncpy((char*)WBUFP(buf,6), date, 12);
- safestrncpy((char*)WBUFP(buf,6 + 12), time_c, 9);
- safestrncpy((char*)WBUFP(buf,6 + 12 + 9), timestring, 24);
-
- safestrncpy((char*)WBUFP(buf,6 + 12 + 9 + 24), git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown", 41);
- WBUFL(buf,6 + 12 + 9 + 24 + 41) = map->getusers();
-
- WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4) = config;
- WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4 + 4) = bd_size;
-
+ safestrncpy((char*)WBUFP(buf,18), time_c, 9);
+ safestrncpy((char*)WBUFP(buf,27), timestring, 24);
+
+ safestrncpy((char*)WBUFP(buf,51), sysinfo->platform(), 16);
+ safestrncpy((char*)WBUFP(buf,67), sysinfo->osversion(), 50);
+ safestrncpy((char*)WBUFP(buf,117), sysinfo->cpu(), 32);
+ WBUFL(buf,149) = sysinfo->cpucores();
+ safestrncpy((char*)WBUFP(buf,153), sysinfo->arch(), 8);
+ WBUFB(buf,161) = sysinfo->vcstypeid();
+ WBUFB(buf,162) = sysinfo->is64bit();
+ safestrncpy((char*)WBUFP(buf,163), sysinfo->vcsrevision_src(), 41);
+ safestrncpy((char*)WBUFP(buf,204), sysinfo->vcsrevision_scripts(), 41);
+ WBUFB(buf,245) = (sysinfo->is_superuser()? 1 : 0);
+ WBUFL(buf,246) = map->getusers();
+
+ WBUFL(buf,250) = config;
+ WBUFL(buf,254) = PACKETVER;
+
+ WBUFL(buf,258) = bd_size;
for( i = 0; i < bd_size; i++ ) {
- safestrncpy((char*)WBUFP(buf,6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, 35);
- WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val;
+ safestrncpy((char*)WBUFP(buf,262 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, BFLAG_LENGTH);
+ WBUFL(buf,262 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val;
}
- chrif->send_report(buf, 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) );
+ chrif->send_report(buf, 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) );
aFree(buf);
diff --git a/src/map/battle.h b/src/map/battle.h
index b57476cb4..aab94420a 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -2,11 +2,11 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_BATTLE_H_
-#define _MAP_BATTLE_H_
+#ifndef MAP_BATTLE_H
+#define MAP_BATTLE_H
-#include "../common/cbasetypes.h"
#include "map.h" //ELE_MAX
+#include "../common/cbasetypes.h"
/**
* Declarations
@@ -21,12 +21,12 @@ struct status_data;
/**
* Defines
**/
-#define MIN_HAIR_STYLE (battle_config.min_hair_style)
-#define MAX_HAIR_STYLE (battle_config.max_hair_style)
-#define MIN_HAIR_COLOR (battle_config.min_hair_color)
-#define MAX_HAIR_COLOR (battle_config.max_hair_color)
-#define MIN_CLOTH_COLOR (battle_config.min_cloth_color)
-#define MAX_CLOTH_COLOR (battle_config.max_cloth_color)
+#define MIN_HAIR_STYLE (battle->bc->min_hair_style)
+#define MAX_HAIR_STYLE (battle->bc->max_hair_style)
+#define MIN_HAIR_COLOR (battle->bc->min_hair_color)
+#define MAX_HAIR_COLOR (battle->bc->max_hair_color)
+#define MIN_CLOTH_COLOR (battle->bc->min_cloth_color)
+#define MAX_CLOTH_COLOR (battle->bc->max_cloth_color)
#define is_boss(bl) (status_get_mode(bl)&MD_BOSS) // Can refine later [Aru]
@@ -79,7 +79,7 @@ enum e_battle_check_target { //New definitions [Skotlex]
* Structures
**/
-// dammage structure
+// damage structure
struct Damage {
int64 damage,damage2; //right, left dmg
int type,div_; //chk clif_damage for type @TODO add an enum ? ; nb of hit
@@ -437,6 +437,7 @@ struct Battle_Config {
// rAthena
int max_third_parameter;
int max_baby_third_parameter;
+ int max_extended_parameter;
int atcommand_max_stat_bypass;
int max_third_aspd;
int vcast_stat_scale;
@@ -468,7 +469,11 @@ struct Battle_Config {
int mon_trans_disable_in_gvg;
int case_sensitive_aegisnames;
-} battle_config;
+ int guild_castle_invite;
+ int guild_castle_expulsion;
+};
+
+extern struct Battle_Config battle_config;
/* criteria for battle_config.idletime_critera */
enum e_battle_config_idletime {
@@ -484,7 +489,7 @@ enum e_battle_config_idletime {
BCIDLE_ATCOMMAND = 0x200,
};
-// Dammage delayed info
+// Damage delayed info
struct delay_damage {
int src_id;
int target_id;
@@ -536,9 +541,9 @@ struct battle_interface {
int64 (*attr_fix) (struct block_list *src, struct block_list *target, int64 damage, int atk_elem, int def_type, int def_lv);
/* applies card modifiers */
int64 (*calc_cardfix) (int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int64 damage, int left, int flag);
- /* applies element modifiers */
+ /* applies element modifiers */
int64 (*calc_elefix) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int nk, int n_ele, int s_ele, int s_ele_, bool left, int flag);
- /* applies mastery modifiers */
+ /* applies mastery modifiers */
int64 (*calc_masteryfix) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int div, bool left, bool weapon);
/* calculates chorus bonus */
int (*calc_chorusbonus) (struct map_session_data *sd);
@@ -566,7 +571,7 @@ struct battle_interface {
int (*check_target) (struct block_list *src, struct block_list *target,int flag);
/* is src and bl within range? */
bool (*check_range) (struct block_list *src,struct block_list *bl,int range);
- /* consume amo for this skill and lv */
+ /* consume ammo for this skill and lv */
void (*consume_ammo) (struct map_session_data* sd, int skill_id, int lv);
int (*get_targeted_sub) (struct block_list *bl, va_list ap);
int (*get_enemy_sub) (struct block_list *bl, va_list ap);
@@ -598,4 +603,4 @@ struct battle_interface {
struct battle_interface *battle;
void battle_defaults(void);
-#endif /* _MAP_BATTLE_H_ */
+#endif /* MAP_BATTLE_H */
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 68539e25d..f7131513d 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -2,29 +2,32 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/conf.h"
+#define HERCULES_CORE
#include "battleground.h"
+
+#include <stdio.h>
+#include <string.h>
+
#include "battle.h"
#include "clif.h"
+#include "homunculus.h"
#include "map.h"
+#include "mapreg.h"
+#include "mercenary.h"
+#include "mob.h" // struct mob_data
#include "npc.h"
-#include "pc.h"
#include "party.h"
+#include "pc.h"
#include "pet.h"
-#include "homunculus.h"
-#include "mercenary.h"
-#include "mapreg.h"
-
-#include <string.h>
-#include <stdio.h>
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
struct battleground_interface bg_s;
@@ -538,7 +541,7 @@ void bg_match_over(struct bg_arena *arena, bool canceled) {
bg->queue_pc_cleanup(sd);
}
if( canceled )
- clif->colormes(sd->fd,COLOR_RED,"BG Match Cancelled: not enough players");
+ clif->colormes(sd->fd,COLOR_RED,"BG Match Canceled: not enough players");
else {
pc_setglobalreg(sd, script->add_str(arena->delay_var), (unsigned int)time(NULL));
}
@@ -576,7 +579,7 @@ void bg_begin(struct bg_arena *arena) {
if( bg->afk_timer_id == INVALID_TIMER && bg->mafksec > 0 )
bg->afk_timer_id = timer->add(timer->gettick()+10000,bg->afk_timer,0,0);
- /* TODO: make this a arena-independant var? or just .@? */
+ /* TODO: make this a arena-independent var? or just .@? */
mapreg->setreg(script->add_str("$@bg_queue_id"),arena->queue_id);
mapreg->setregstr(script->add_str("$@bg_delay_var$"),bg->gdelay_var);
diff --git a/src/map/battleground.h b/src/map/battleground.h
index 05c4eb060..c1d3be054 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -2,12 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_BATTLEGROUND_H_
-#define _MAP_BATTLEGROUND_H_
+#ifndef MAP_BATTLEGROUND_H
+#define MAP_BATTLEGROUND_H
-#include "../common/mmo.h" // struct party
#include "clif.h"
#include "guild.h"
+#include "../common/mmo.h" // struct party
/**
* Defines
@@ -122,4 +122,4 @@ struct battleground_interface *bg;
void battleground_defaults(void);
-#endif /* _MAP_BATTLEGROUND_H_ */
+#endif /* MAP_BATTLEGROUND_H */
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index 2a15e66fc..80264b30d 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -2,18 +2,21 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/db.h" // ARR_FIND
-#include "../common/showmsg.h" // ShowWarning
-#include "../common/socket.h" // RBUF*
-#include "../common/strlib.h" // safestrncpy
+#define HERCULES_CORE
+
+#include "buyingstore.h" // struct s_buyingstore
+
#include "atcommand.h" // msg_txt
#include "battle.h" // battle_config.*
-#include "buyingstore.h" // struct s_buyingstore
+#include "chrif.h"
#include "clif.h" // clif->buyingstore_*
#include "log.h" // log_pick_pc, log_zeny
#include "pc.h" // struct map_session_data
-#include "chrif.h"
+#include "../common/cbasetypes.h"
+#include "../common/db.h" // ARR_FIND
+#include "../common/showmsg.h" // ShowWarning
+#include "../common/socket.h" // RBUF*
+#include "../common/strlib.h" // safestrncpy
struct buyingstore_interface buyingstore_s;
diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h
index 5141a1013..c981cc444 100644
--- a/src/map/buyingstore.h
+++ b/src/map/buyingstore.h
@@ -2,8 +2,13 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_BUYINGSTORE_H_
-#define _MAP_BUYINGSTORE_H_
+#ifndef MAP_BUYINGSTORE_H
+#define MAP_BUYINGSTORE_H
+
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h" // MAX_SLOTS
+
+struct map_session_data;
/**
* Declarations
@@ -70,4 +75,4 @@ struct buyingstore_interface *buyingstore;
void buyingstore_defaults (void);
-#endif // _MAP_BUYINGSTORE_H_
+#endif // MAP_BUYINGSTORE_H
diff --git a/src/map/chat.c b/src/map/chat.c
index 08fc4a575..cd7b5f811 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -2,12 +2,13 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/mmo.h"
+#define HERCULES_CORE
+
+#include "chat.h"
+
+#include <stdio.h>
+#include <string.h>
+
#include "atcommand.h" // msg_txt()
#include "battle.h" // struct battle_config
#include "clif.h"
@@ -15,10 +16,12 @@
#include "npc.h" // npc_event_do()
#include "pc.h"
#include "skill.h" // ext_skill_unit_onplace()
-#include "chat.h"
-
-#include <stdio.h>
-#include <string.h>
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
struct chat_interface chat_s;
@@ -29,7 +32,7 @@ struct chat_data* chat_createchat(struct block_list* bl, const char* title, cons
struct chat_data* cd;
nullpo_retr(NULL, bl);
- /* Given the overhead and the numerous instances (npc allocatted or otherwise) wouldn't it be benefitial to have it use ERS? [Ind] */
+ /* Given the overhead and the numerous instances (npc allocated or otherwise) wouldn't it be beneficial to have it use ERS? [Ind] */
cd = (struct chat_data *) aMalloc(sizeof(struct chat_data));
safestrncpy(cd->title, title, sizeof(cd->title));
@@ -154,8 +157,8 @@ bool chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) {
pc_setchatid(sd,cd->bl.id);
clif->joinchatok(sd, cd); //To the person who newly joined the list of all
- clif->addchat(cd, sd); //Reports To the person who already in the chat
- clif->dispchat(cd, 0); //Reported number of changes to the people around
+ clif->addchat(cd, sd); //Reports To the person who already in the chat
+ clif->dispchat(cd, 0); //Reported number of changes to the people around
chat->trigger_event(cd); //Event
@@ -443,7 +446,7 @@ bool chat_npckickall(struct chat_data* cd)
}
/*=====================================
-* Default Functions : chat.h
+* Default Functions : chat.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
diff --git a/src/map/chat.h b/src/map/chat.h
index b0c6cd905..e055c04ed 100644
--- a/src/map/chat.h
+++ b/src/map/chat.h
@@ -2,19 +2,22 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_CHAT_H_
-#define _MAP_CHAT_H_
+#ifndef MAP_CHAT_H
+#define MAP_CHAT_H
#include "map.h" // struct block_list, CHATROOM_TITLE_SIZE
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
-struct map_session_data;
struct chat_data;
+struct map_session_data;
+struct npc_data;
#define MAX_CHAT_USERS 20
struct chat_data {
struct block_list bl; // data for this map object
- char title[CHATROOM_TITLE_SIZE]; // room title
+ char title[CHATROOM_TITLE_SIZE]; // room title
char pass[CHATROOM_PASS_SIZE]; // password
bool pub; // private/public flag
uint8 users; // current user count
@@ -31,7 +34,7 @@ struct chat_data {
};
/*=====================================
-* Interface : chat.h
+* Interface : chat.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -57,4 +60,4 @@ struct chat_interface *chat;
void chat_defaults(void);
-#endif /* _MAP_CHAT_H_ */
+#endif /* MAP_CHAT_H */
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 99a1935fd..54cc139f4 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -2,15 +2,16 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/ers.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
+
+#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT
+#include "chrif.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
#include "map.h"
#include "battle.h"
@@ -25,15 +26,17 @@
#include "instance.h"
#include "mercenary.h"
#include "elemental.h"
-#include "chrif.h"
#include "quest.h"
#include "storage.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <time.h>
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
struct chrif_interface chrif_s;
@@ -52,7 +55,7 @@ struct chrif_interface chrif_s;
//2b03: Incoming, clif_charselectok -> '' (i think its the packet after enterworld?) (not sure)
//2b04: Incoming, chrif_recvmap -> 'getting maps from charserver of other mapserver's'
//2b05: Outgoing, chrif_changemapserver -> 'Tell the charserver the mapchange / quest for ok...'
-//2b06: Incoming, chrif_changemapserverack -> 'awnser of 2b05, ok/fail, data: dunno^^'
+//2b06: Incoming, chrif_changemapserverack -> 'answer of 2b05, ok/fail, data: dunno^^'
//2b07: Outgoing, chrif_removefriend -> 'Tell charserver to remove friend_id from char_id friend list'
//2b08: Outgoing, chrif_searchcharid -> '...'
//2b09: Incoming, map_addchariddb -> 'Adds a name to the nick db'
@@ -76,7 +79,7 @@ struct chrif_interface chrif_s;
//2b1b: Incoming, chrif_recvfamelist -> 'Receive fame ranking lists'
//2b1c: Outgoing, chrif_save_scdata -> 'Send sc_data of player for saving.'
//2b1d: Incoming, chrif_load_scdata -> 'received sc_data of player for loading.'
-//2b1e: Incoming, chrif_update_ip -> 'Reqest forwarded from char-server for interserver IP sync.' [Lance]
+//2b1e: Incoming, chrif_update_ip -> 'Request forwarded from char-server for interserver IP sync.' [Lance]
//2b1f: Incoming, chrif_disconnectplayer -> 'disconnects a player (aid X) with the message XY ... 0x81 ..' [Sirius]
//2b20: Incoming, chrif_removemap -> 'remove maps of a server (sample: its going offline)' [Sirius]
//2b21: Incoming, chrif_save_ack. Returned after a character has been "final saved" on the char-server. [Skotlex]
@@ -268,7 +271,7 @@ bool chrif_save(struct map_session_data *sd, int flag) {
if (flag)
sd->state.storage_flag = 0; //Force close it.
- //Saving of registry values.
+ //Saving of registry values.
if (sd->vars_dirty)
intif->saveregistry(sd);
@@ -288,7 +291,7 @@ bool chrif_save(struct map_session_data *sd, int flag) {
if( sd->md && mercenary->get_lifetime(sd->md) > 0 )
mercenary->save(sd->md);
if( sd->ed && elemental->get_lifetime(sd->ed) > 0 )
- elemental->save(sd->ed);
+ elemental->save(sd->ed);
if( sd->save_quest )
intif->quest_save(sd);
@@ -390,7 +393,7 @@ bool chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port)
return true;
}
-/// map-server change request acknowledgement (positive or negative)
+/// map-server change request acknowledgment (positive or negative)
/// R 2b06 <account_id>.L <login_id1>.L <login_id2>.L <char_id>.L <map_index>.W <x>.W <y>.W <ip>.L <port>.W
bool chrif_changemapserverack(int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port) {
struct auth_node *node;
@@ -850,9 +853,9 @@ void chrif_changedsex(int fd) {
// Path to activate this response:
// Map(start) (0x2b0e) -> Char(0x2727) -> Login
// Login(0x2723) [ALL] -> Char (0x2b0d)[ALL] -> Map (HERE)
- // Char will usually be "logged in" despite being forced to log-out in the begining
+ // Char will usually be "logged in" despite being forced to log-out in the beginning
// of this process, but there's no need to perform map-server specific response
- // as everything should've been changed through char-server [Panikon]
+ // as everything should been changed through char-server [Panikon]
}
/*==========================================
* Request Char Server to Divorce Players
@@ -941,14 +944,14 @@ void chrif_idbanned(int fd) {
}
sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
- if (RFIFOB(fd,6) == 0) { // 0: change of statut
+ if (RFIFOB(fd,6) == 0) { // 0: change of status
int ret_status = RFIFOL(fd,7); // status or final date of a banishment
if(0<ret_status && ret_status<=9)
clif->message(sd->fd, msg_txt(411+ret_status)); // Message IDs (for search convenience): 412, 413, 414, 415, 416, 417, 418, 419, 420
else if(ret_status==100)
clif->message(sd->fd, msg_txt(421));
else
- clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorised."
+ clif->message(sd->fd, msg_txt(420)); //"Your account has not more authorized."
} else if (RFIFOB(fd,6) == 1) { // 1: ban
time_t timestamp;
char tmpstr[2048];
@@ -1203,7 +1206,7 @@ bool chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) {
/*=========================================
- * Tell char-server charcter disconnected [Wizputer]
+ * Tell char-server character disconnected [Wizputer]
*-----------------------------------------*/
bool chrif_char_offline_nsd(int account_id, int char_id) {
chrif_check(false);
@@ -1244,7 +1247,7 @@ bool chrif_char_reset_offline(void) {
}
/*=========================================
- * Tell char-server charcter is online [Wizputer]
+ * Tell char-server character is online [Wizputer]
*-----------------------------------------*/
bool chrif_char_online(struct map_session_data *sd) {
chrif_check(false);
@@ -1364,7 +1367,7 @@ int chrif_parse(int fd) {
if (cmd < 0x2af8 || cmd >= 0x2af8 + ARRAYLENGTH(chrif->packet_len_table) || chrif->packet_len_table[cmd-0x2af8] == 0) {
r = intif->parse(fd); // Passed on to the intif
- if (r == 1) continue; // Treated in intif
+ if (r == 1) continue; // Treated in intif
if (r == 2) return 0; // Didn't have enough data (len==-1)
ShowWarning("chrif_parse: session #%d, intif->parse failed (unrecognized command 0x%.4x).\n", fd, cmd);
@@ -1530,7 +1533,7 @@ void chrif_send_report(char* buf, int len) {
}
/**
- * Sends a single scdata for saving into char server, meant to ensure integrity of durationless conditions
+ * Sends a single scdata for saving into char server, meant to ensure integrity of duration-less conditions
**/
void chrif_save_scdata_single(int account_id, int char_id, short type, struct status_change_entry *sce) {
@@ -1552,7 +1555,7 @@ void chrif_save_scdata_single(int account_id, int char_id, short type, struct st
}
/**
- * Sends a single scdata deletion request into char server, meant to ensure integrity of durationless conditions
+ * Sends a single scdata deletion request into char server, meant to ensure integrity of duration-less conditions
**/
void chrif_del_scdata_single(int account_id, int char_id, short type) {
@@ -1635,7 +1638,7 @@ void do_init_chrif(bool minimal) {
/*=====================================
-* Default Functions : chrif.h
+* Default Functions : chrif.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 25e955604..11baaf5ff 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -2,12 +2,14 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_CHRIF_H_
-#define _MAP_CHRIF_H_
+#ifndef MAP_CHRIF_H
+#define MAP_CHRIF_H
-#include "../common/cbasetypes.h"
#include <time.h>
+
#include "map.h" //TBL_stuff
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
struct status_change_entry;
@@ -39,7 +41,7 @@ struct auth_node {
};
/*=====================================
-* Interface : chrif.h
+* Interface : chrif.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -51,7 +53,7 @@ struct chrif_interface {
int other_mapserver_count; //Holds count of how many other map servers are online (apart of this instance) [Skotlex]
/* */
- struct eri *auth_db_ers; //For reutilizing player login structures.
+ struct eri *auth_db_ers; //For re-utilizing player login structures.
DBMap* auth_db; // int id -> struct auth_node*
/* */
int packet_len_table[CHRIF_PACKET_LEN_TABLE_SIZE];
@@ -152,4 +154,4 @@ void chrif_defaults(void);
// There's no need for another function when a simple macro can do exactly the same effect
#define chrif_char_offline(x) chrif->char_offline_nsd((x)->status.account_id,(x)->status.char_id)
-#endif /* _MAP_CHRIF_H_ */
+#endif /* MAP_CHRIF_H */
diff --git a/src/map/clif.c b/src/map/clif.c
index 7715e6c6a..9e105e4a9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2,56 +2,60 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/grfio.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/ers.h"
-#include "../common/conf.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
+
+#include "../config/core.h" // ANTI_MAYAP_CHEAT, RENEWAL, SECURE_NPCTIMEOUT
+#include "clif.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <time.h>
-#include "map.h"
-#include "chrif.h"
-#include "pc.h"
-#include "status.h"
-#include "npc.h"
-#include "itemdb.h"
-#include "chat.h"
-#include "trade.h"
-#include "storage.h"
-#include "script.h"
-#include "skill.h"
#include "atcommand.h"
-#include "intif.h"
#include "battle.h"
#include "battleground.h"
-#include "mob.h"
-#include "party.h"
-#include "unit.h"
+#include "chat.h"
+#include "chrif.h"
+#include "elemental.h"
#include "guild.h"
-#include "vending.h"
-#include "pet.h"
#include "homunculus.h"
#include "instance.h"
-#include "mercenary.h"
-#include "elemental.h"
+#include "intif.h"
+#include "irc-bot.h"
+#include "itemdb.h"
#include "log.h"
-#include "clif.h"
#include "mail.h"
+#include "map.h"
+#include "mercenary.h"
+#include "mob.h"
+#include "npc.h"
+#include "party.h"
+#include "pc.h"
+#include "pet.h"
#include "quest.h"
-#include "irc-bot.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <time.h>
+#include "script.h"
+#include "skill.h"
+#include "status.h"
+#include "storage.h"
+#include "trade.h"
+#include "unit.h"
+#include "vending.h"
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
+#include "../common/ers.h"
+#include "../common/grfio.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h" // NEW_CARTS
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct clif_interface clif_s;
@@ -61,8 +65,10 @@ static struct packet_itemlist_equip itemlist_equip;
static struct packet_storelist_normal storelist_normal;
static struct packet_storelist_equip storelist_equip;
static struct packet_viewequip_ack viewequip_list;
+#if PACKETVER >= 20131223
static struct packet_npc_market_result_ack npcmarket_result;
static struct packet_npc_market_open npcmarket_open;
+#endif
//#define DUMP_UNKNOWN_PACKET
//#define DUMP_INVALID_PACKET
@@ -1099,7 +1105,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
p.accessory = status->get_emblem_id(bl);
p.accessory2 = GetWord(g_id, 1);
p.accessory3 = GetWord(g_id, 0);
- }
+ }
p.headpalette = vd->hair_color;
p.bodypalette = vd->cloth_color;
p.headDir = (sd)? sd->head_dir : 0;
@@ -1219,7 +1225,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
p.GID = -bl->id;
#else
p.GID = -bl->id;
-#endif
+#endif
clif->send(&p,sizeof(p),bl,SELF);
}
}
@@ -2582,7 +2588,7 @@ void clif_cartlist(struct map_session_data *sd) {
/// Removes cart (ZC_CARTOFF).
/// 012b
-/// Client behaviour:
+/// Client behavior:
/// Closes the cart storage and removes all it's items from memory.
/// The Num & Weight values of the cart are left untouched and the cart is NOT removed.
void clif_clearcart(int fd)
@@ -4616,6 +4622,8 @@ void clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum send
/// 099f <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.L <range>.W <visible>.B (ZC_SKILL_ENTRY4)
void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, enum send_target target) {
struct packet_skill_entry p;
+ nullpo_retv(bl);
+ nullpo_retv(su);
if( su->group->state.guildaura )
return;
@@ -5041,7 +5049,7 @@ void clif_skillcastcancel(struct block_list* bl)
/// 4 = "no party" MsgStringTable[163]
/// 5 = "no shout" MsgStringTable[164]
/// 6 = "no PKing" MsgStringTable[165]
-/// 7 = "no alligning" MsgStringTable[383]
+/// 7 = "no aligning" MsgStringTable[383]
/// ? = ignored
/// cause:
/// 0 = "not enough skill level" MsgStringTable[214] (AL_WARP)
@@ -5419,7 +5427,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst) {
}
-/// Presents a textual list of producable items (ZC_MAKABLEITEMLIST).
+/// Presents a textual list of producible items (ZC_MAKABLEITEMLIST).
/// 018d <packet len>.W { <name id>.W { <material id>.W }*3 }*
/// material id:
/// unused by the client
@@ -5461,7 +5469,7 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int
}
-/// Present a list of producable items (ZC_MAKINGITEM_LIST).
+/// Present a list of producible items (ZC_MAKINGITEM_LIST).
/// 025a <packet len>.W <mk type>.W { <name id>.W }*
/// mk type:
/// 1 = cooking
@@ -5597,7 +5605,7 @@ void clif_displaymessage(const int fd, const char* mes) {
if ( ( len = strnlen(mes, 255) ) > 0 ) { // don't send a void message (it's not displaying on the client chat). @help can send void line.
WFIFOHEAD(fd, 5 + len);
WFIFOW(fd,0) = 0x8e;
- WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate
+ WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate
safestrncpy((char *)WFIFOP(fd,4), mes, len + 1);
WFIFOSET(fd, 5 + len);
}
@@ -5626,14 +5634,14 @@ void clif_displaymessage2(const int fd, const char* mes) {
} else {
WFIFOHEAD(fd, 5 + len);
WFIFOW(fd,0) = 0x8e;
- WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate
+ WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate
safestrncpy((char *)WFIFOP(fd,4), line, len + 1);
WFIFOSET(fd, 5 + len);
}
}
line = strtok(NULL, "\n");
}
- aFree(message);
+ aFree(message);
}
}
/* oh noo! another version of 0x8e! */
@@ -5643,7 +5651,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) {
if( map->cpsd_active && fd == 0 ) {
ShowInfo("HCP: ");
va_start(ap,mes);
- _vShowMessage(MSG_NONE,mes,ap);
+ vShowMessage_(MSG_NONE,mes,ap);
va_end(ap);
ShowMessage("\n");
} else if ( fd > 0 ) {
@@ -5663,7 +5671,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) {
/* */
WFIFOW(fd,0) = 0x8e;
- WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate
+ WFIFOW(fd,2) = 5 + len; // 4 + len + NULL terminate
WFIFOSET(fd, 5 + len);
}
@@ -5918,8 +5926,8 @@ void clif_wis_message(int fd, const char* nick, const char* mes, size_t mes_len)
/// Inform the player about the result of his whisper action (ZC_ACK_WHISPER).
/// 0098 <result>.B
/// result:
-/// 0 = success to send wisper
-/// 1 = target character is not loged in
+/// 0 = success to send whisper
+/// 1 = target character is not logged in
/// 2 = ignored by target
/// 3 = everyone ignored by target
void clif_wis_end(int fd, int flag) {
@@ -6164,7 +6172,7 @@ void clif_item_refine_list(struct map_session_data *sd)
WFIFOHEAD(fd, MAX_INVENTORY * 13 + 4);
WFIFOW(fd,0)=0x221;
for(i=c=0;i<MAX_INVENTORY;i++){
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify
&& (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1
&& !sd->inventory_data[i]->flag.no_refine
&& !(sd->status.inventory[i].equip&EQP_ARMS)){
@@ -6185,7 +6193,7 @@ void clif_item_refine_list(struct map_session_data *sd)
/// Notification of an auto-casted skill (ZC_AUTORUN_SKILL).
-/// 0147 <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradable>.B
+/// 0147 <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B
void clif_item_skill(struct map_session_data *sd,uint16 skill_id,uint16 skill_lv)
{
int fd;
@@ -7270,7 +7278,7 @@ void clif_mvp_noitem(struct map_session_data* sd)
/// 0 = "Guild has been created."
/// 1 = "You are already in a Guild."
/// 2 = "That Guild Name already exists."
-/// 3 = "You need the neccessary item to create a Guild."
+/// 3 = "You need the necessary item to create a Guild."
void clif_guild_created(struct map_session_data *sd,int flag)
{
int fd;
@@ -7663,7 +7671,7 @@ void clif_guild_emblem_area(struct block_list* bl)
/// Sends guild skills (ZC_GUILD_SKILLINFO).
-/// 0162 <packet len>.W <skill points>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradable>.B }*
+/// 0162 <packet len>.W <skill points>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B }*
void clif_guild_skillinfo(struct map_session_data* sd)
{
int fd;
@@ -8131,7 +8139,7 @@ void clif_disp_message(struct block_list* src, const char* mes, size_t len, enum
/// result:
/// 0 = failure
/// 1 = success
-void clif_GM_kickack(struct map_session_data *sd, int id)
+void clif_GM_kickack(struct map_session_data *sd, int result)
{
int fd;
@@ -8140,7 +8148,7 @@ void clif_GM_kickack(struct map_session_data *sd, int id)
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0xcd));
WFIFOW(fd,0) = 0xcd;
- WFIFOB(fd,2) = id; // FIXME: this is not account id
+ WFIFOB(fd,2) = result;
WFIFOSET(fd, packet_len(0xcd));
}
@@ -8154,7 +8162,7 @@ void clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd) {
map->quit(tsd);
if( sd )
- clif->GM_kickack(sd,tsd->status.account_id);
+ clif->GM_kickack(sd, 1);
}
@@ -8180,7 +8188,7 @@ void clif_manner_message(struct map_session_data* sd, uint32 type)
}
-/// Followup to 0x14a type 3/5, informs who did the manner adjustment action (ZC_NOTIFY_MANNER_POINT_GIVEN).
+/// Follow-up to 0x14a type 3/5, informs who did the manner adjustment action (ZC_NOTIFY_MANNER_POINT_GIVEN).
/// 014b <type>.B <GM name>.24B
/// type:
/// 0 = positive (unmute)
@@ -8271,7 +8279,7 @@ void clif_playBGM(struct map_session_data* sd, const char* name)
/// term:
/// unknown purpose, only relevant to act = 1
/// npc id:
-/// The accustic direction of the sound is determined by the
+/// The acoustic direction of the sound is determined by the
/// relative position of the NPC to the player (3D sound).
void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const char* name, int type)
{
@@ -8420,6 +8428,34 @@ void clif_message(struct block_list* bl, const char* msg) {
clif->send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC);
}
+/**
+ * Notifies the client that the storage window is still open
+ *
+ * Should only be used in cases where the client closed the
+ * storage window without server's consent
+ **/
+void clif_refresh_storagewindow( struct map_session_data *sd ) {
+ // Notify the client that the storage is open
+ if( sd->state.storage_flag == 1 ) {
+ storage->sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
+ clif->storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
+ clif->updatestorageamount(sd, sd->status.storage.storage_amount, MAX_STORAGE);
+ }
+ // Notify the client that the gstorage is open otherwise it will
+ // remain locked forever and nobody will be able to access it
+ if( sd->state.storage_flag == 2 ) {
+ struct guild_storage *gstor;
+ if( (gstor = gstorage->id2storage2(sd->status.guild_id)) == NULL) {
+ // Shouldn't happen... The information should already be at the map-server
+ intif->request_guild_storage(sd->status.account_id,sd->status.guild_id);
+ } else {
+ storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items));
+ clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items));
+ clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE);
+ }
+ }
+}
+
// refresh the client's screen, getting rid of any effects
void clif_refresh(struct map_session_data *sd)
{
@@ -8480,6 +8516,7 @@ void clif_refresh(struct map_session_data *sd)
pc->disguise(sd, disguise);
}
+ clif->refresh_storagewindow(sd);
}
@@ -8567,11 +8604,11 @@ void clif_charnameack (int fd, struct block_list *bl)
nullpo_retv(md);
memcpy(WBUFP(buf,6), md->name, NAME_LENGTH);
- if( md->guardian_data && md->guardian_data->guild_id )
+ if( md->guardian_data && md->guardian_data->g )
{
WBUFW(buf, 0) = cmd = 0x195;
WBUFB(buf,30) = 0;
- memcpy(WBUFP(buf,54), md->guardian_data->guild_name, NAME_LENGTH);
+ memcpy(WBUFP(buf,54), md->guardian_data->g->name, NAME_LENGTH);
memcpy(WBUFP(buf,78), md->guardian_data->castle->castle_name, NAME_LENGTH);
}
else if( battle_config.show_mob_info )
@@ -8608,7 +8645,7 @@ void clif_charnameack (int fd, struct block_list *bl)
return;
}
- // if no receipient specified just update nearby clients
+ // if no recipient specified just update nearby clients
if (fd == 0)
clif->send(buf, packet_len(cmd), bl, AREA);
else {
@@ -8703,7 +8740,7 @@ void clif_slide(struct block_list *bl, int x, int y)
/// 008d <packet len>.W <id>.L <message>.?B
void clif_disp_overhead(struct block_list *bl, const char* mes)
{
- unsigned char buf[256]; //This should be more than sufficient, the theorical max is CHAT_SIZE + 8 (pads and extra inserted crap)
+ unsigned char buf[256]; //This should be more than sufficient, the theoretical max is CHAT_SIZE + 8 (pads and extra inserted crap)
size_t len_mes = strlen(mes)+1; //Account for \0
if (len_mes > sizeof(buf)-8) {
@@ -8811,7 +8848,7 @@ void clif_starskill(struct map_session_data* sd, const char* mapname, int monste
}
/*==========================================
- * Info about Star Glaldiator save map [Komurka]
+ * Info about Star Gladiator save map [Komurka]
* type: 1: Information, 0: Map registered
*------------------------------------------*/
void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsigned char type)
@@ -8823,7 +8860,7 @@ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsig
}
/*==========================================
- * Info about Star Glaldiator hate mob [Komurka]
+ * Info about Star Gladiator hate mob [Komurka]
* type: 1: Register mob, 0: Information.
*------------------------------------------*/
void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type)
@@ -9017,7 +9054,7 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_,
if( strncmp(name, sd->status.name, namelen) || // the text must start with the speaker's name
name[namelen] != ' ' || name[namelen+1] != ':' || name[namelen+2] != ' ' ) // followed by ' : '
{
- //Hacked message, or infamous "client desynch" issue where they pick one char while loading another.
+ //Hacked message, or infamous "client desynchronize" issue where they pick one char while loading another.
ShowWarning("clif_process_message: Player '%s' sent a message using an incorrect name! Forcing a relog...\n", sd->status.name);
set_eof(fd); // Just kick them out to correct it.
return false;
@@ -9829,7 +9866,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
if( atcommand->exec(fd, sd, message, true) )
return;
- if( sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
+ if( !pc->can_talk(sd) )
return;
if( battle_config.min_chat_delay ) { //[Skotlex]
@@ -10076,14 +10113,14 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
return;
}
- if (sd->sc.count &&
- (sd->sc.data[SC_TRICKDEAD] ||
- sd->sc.data[SC_AUTOCOUNTER] ||
- sd->sc.data[SC_BLADESTOP] ||
- sd->sc.data[SC_DEEP_SLEEP] ||
- sd->sc.data[SC__MANHOLE] ||
- sd->sc.data[SC_CURSEDCIRCLE_ATKER] ||
- sd->sc.data[SC_CURSEDCIRCLE_TARGET] ))
+ // Statuses that don't let the player sit / attack / talk with NPCs(targeted)
+ // (not all are included in pc_can_attack)
+ if( sd->sc.count && (
+ sd->sc.data[SC_TRICKDEAD] ||
+ (sd->sc.data[SC_AUTOCOUNTER] && action_type != 0x07) ||
+ sd->sc.data[SC_BLADESTOP] ||
+ sd->sc.data[SC_DEEP_SLEEP] )
+ )
return;
pc_stop_walking(sd, 1);
@@ -10107,10 +10144,6 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
if( sd->sc.option&OPTION_COSTUME )
return;
- if( sd->sc.data[SC_BASILICA] || sd->sc.data[SC__SHADOWFORM] ||
- (sd->sc.data[SC_SIREN] && sd->sc.data[SC_SIREN]->val2 == target_id) )
- return;
-
if (!battle_config.sdelay_attack_enable && pc->checkskill(sd, SA_FREECAST) <= 0) {
if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) {
clif->skill_fail(sd, 1, USESKILL_FAIL_SKILLINTERVAL, 0);
@@ -10277,7 +10310,7 @@ void clif_hercules_chsys_quit(struct map_session_data *sd) {
sd->channel_count = 0;
aFree(sd->channels);
- sd->channels = NULL;
+ sd->channels = NULL;
}
/// Request for an action.
@@ -10288,7 +10321,7 @@ void clif_hercules_chsys_quit(struct map_session_data *sd) {
/// 1 = pick up item
/// 2 = sit down
/// 3 = stand up
-/// 7 = continous attack
+/// 7 = continuous attack
/// 12 = (touch skill?)
/// There are various variants of this packet, some of them have padding between fields.
void clif_parse_ActionRequest(int fd, struct map_session_data *sd)
@@ -10342,7 +10375,8 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
if ( atcommand->exec(fd, sd, message, true) )
return;
- if (sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT))
+ // Statuses that prevent the player from whispering
+ if( !pc->can_talk(sd) )
return;
if (battle_config.min_chat_delay) { //[Skotlex]
@@ -11002,7 +11036,7 @@ void clif_parse_ChatLeave(int fd, struct map_session_data* sd)
}
-//Handles notifying asker and rejecter of what has just ocurred.
+//Handles notifying asker and rejecter of what has just occurred.
//Type is used to determine the correct msg_txt to use:
//0:
void clif_noask_sub(struct map_session_data *src, struct map_session_data *target, int type) {
@@ -11128,8 +11162,8 @@ void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
/// 012a
void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
{
- if( !(sd->sc.option&(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR))
-#ifdef NEW_CARTS
+ if( !(sd->sc.option&(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR))
+#ifdef NEW_CARTS
&& sd->sc.data[SC_PUSH_CART] ){
pc->setcart(sd,0);
#else
@@ -11341,10 +11375,6 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
)
return;
- // Some self skills need to close the storage to work properly
- if( skill_id == AL_TELEPORT && sd->state.storage_flag )
- storage->close(sd);
-
if( pc_issit(sd) )
return;
@@ -11545,7 +11575,8 @@ void clif_parse_UseSkillMap(int fd, struct map_session_data* sd)
if(skill_id != sd->menuskill_id)
return;
- if( pc_cant_act(sd) ) {
+ // It is possible to use teleport with the storage window open issue:8027
+ if( pc_cant_act(sd) && (!sd->state.storage_flag && skill_id != AL_TELEPORT) ) {
clif_menuskill_clear(sd);
return;
}
@@ -12207,7 +12238,7 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) {
/// Party Booking in KRO [Spiria]
///
-/// Request to register a party booking advertisment (CZ_PARTY_BOOKING_REQ_REGISTER).
+/// Request to register a party booking advertisement (CZ_PARTY_BOOKING_REQ_REGISTER).
/// 0802 <level>.W <map id>.W { <job>.W }*6
void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
{
@@ -12227,7 +12258,7 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
}
-/// Result of request to register a party booking advertisment (ZC_PARTY_BOOKING_ACK_REGISTER).
+/// Result of request to register a party booking advertisement (ZC_PARTY_BOOKING_ACK_REGISTER).
/// 0803 <result>.W
/// result:
/// 0 = success
@@ -12248,7 +12279,7 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
}
-/// Request to search for party booking advertisments (CZ_PARTY_BOOKING_REQ_SEARCH).
+/// Request to search for party booking advertisement (CZ_PARTY_BOOKING_REQ_SEARCH).
/// 0804 <level>.W <map id>.W <job>.W <last index>.L <result count>.W
void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
{
@@ -12299,7 +12330,7 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
}
-/// Request to delete own party booking advertisment (CZ_PARTY_BOOKING_REQ_DELETE).
+/// Request to delete own party booking advertisement (CZ_PARTY_BOOKING_REQ_DELETE).
/// 0806
void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
{
@@ -12312,7 +12343,7 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
}
-/// Result of request to delete own party booking advertisment (ZC_PARTY_BOOKING_ACK_DELETE).
+/// Result of request to delete own party booking advertisement (ZC_PARTY_BOOKING_ACK_DELETE).
/// 0807 <result>.W
/// result:
/// 0 = success
@@ -12334,7 +12365,7 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
}
-/// Request to update party booking advertisment (CZ_PARTY_BOOKING_REQ_UPDATE).
+/// Request to update party booking advertisement (CZ_PARTY_BOOKING_REQ_UPDATE).
/// 0808 { <job>.W }*6
void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
{
@@ -12352,7 +12383,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
}
-/// Notification about new party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_INSERT).
+/// Notification about new party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_INSERT).
/// 0809 <index>.L <char name>.24B <expire time>.L <level>.W <map id>.W { <job>.W }*6
void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
@@ -12378,7 +12409,7 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo
}
-/// Notification about updated party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_UPDATE).
+/// Notification about updated party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_UPDATE).
/// 080a <index>.L { <job>.W }*6
void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
@@ -12399,7 +12430,7 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo
}
-/// Notification about deleted party booking advertisment (ZC_PARTY_BOOKING_NOTIFY_DELETE).
+/// Notification about deleted party booking advertisement (ZC_PARTY_BOOKING_NOTIFY_DELETE).
/// 080b <index>.L
void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index)
{
@@ -12418,7 +12449,7 @@ void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index)
/// Modified version of Party Booking System for 2012-04-10 or 2012-04-18 (RagexeRE).
/// Code written by mkbu95, Spiria, Yommy and Ind
-/// Request to register a party booking advertisment (CZ_PARTY_RECRUIT_REQ_REGISTER).
+/// Request to register a party booking advertisement (CZ_PARTY_RECRUIT_REQ_REGISTER).
/// 08e5 <level>.W <notice>.37B
void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd)
{
@@ -12465,7 +12496,7 @@ void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info** results,
#endif
}
-/// Result of request to register a party booking advertisment (ZC_PARTY_RECRUIT_ACK_REGISTER).
+/// Result of request to register a party booking advertisement (ZC_PARTY_RECRUIT_ACK_REGISTER).
/// 08e6 <result>.W
/// result:
/// 0 = success
@@ -12485,7 +12516,7 @@ void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag)
#endif
}
-/// Request to search for party booking advertisments (CZ_PARTY_RECRUIT_REQ_SEARCH).
+/// Request to search for party booking advertisement (CZ_PARTY_RECRUIT_REQ_SEARCH).
/// 08e7 <level>.W <map id>.W <last index>.L <result count>.W
void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd)
{
@@ -12501,7 +12532,7 @@ void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd)
#endif
}
-/// Request to delete own party booking advertisment (CZ_PARTY_RECRUIT_REQ_DELETE).
+/// Request to delete own party booking advertisement (CZ_PARTY_RECRUIT_REQ_DELETE).
/// 08e9
void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd)
{
@@ -12513,7 +12544,7 @@ void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd)
#endif
}
-/// Result of request to delete own party booking advertisment (ZC_PARTY_RECRUIT_ACK_DELETE).
+/// Result of request to delete own party booking advertisement (ZC_PARTY_RECRUIT_ACK_DELETE).
/// 08ea <result>.W
/// result:
/// 0 = success
@@ -12534,7 +12565,7 @@ void clif_PartyRecruitDeleteAck(struct map_session_data* sd, int flag)
#endif
}
-/// Request to update party booking advertisment (CZ_PARTY_RECRUIT_REQ_UPDATE).
+/// Request to update party booking advertisement (CZ_PARTY_RECRUIT_REQ_UPDATE).
/// 08eb <notice>.37B
void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
{
@@ -12549,7 +12580,7 @@ void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
#endif
}
-/// Notification about new party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_INSERT).
+/// Notification about new party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_INSERT).
/// 08ec <index>.L <expire time>.L <char name>.24B <level>.W <notice>.37B
void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
@@ -12571,7 +12602,7 @@ void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_boo
#endif
}
-/// Notification about updated party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_UPDATE).
+/// Notification about updated party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_UPDATE).
/// 08ed <index>.L <notice>.37B
void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad)
{
@@ -12588,7 +12619,7 @@ void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_boo
#endif
}
-/// Notification about deleted party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_DELETE).
+/// Notification about deleted party booking advertisement (ZC_PARTY_RECRUIT_NOTIFY_DELETE).
/// 08ee <index>.L
void clif_PartyRecruitDeleteNotify(struct map_session_data* sd, int index)
{
@@ -13140,7 +13171,7 @@ void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd)
if(!sd->state.gmaster_flag)
return;
- // compensate for some client defects when using multilanguage mode
+ // compensate for some client defects when using multilingual mode
if (msg1[0] == '|' && msg1[3] == '|') msg1+= 3; // skip duplicate marker
if (msg2[0] == '|' && msg2[3] == '|') msg2+= 3; // skip duplicate marker
if (msg2[0] == '|') msg2[strnlen(msg2, MAX_GUILDMES2)-1] = '\0'; // delete extra space at the end of string
@@ -13580,7 +13611,7 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) {
/// Request to execute GM commands.
/// usage:
/// /item n - summon n monster or acquire n item/s
-/// /item money - grants 2147483647 zenies
+/// /item money - grants 2147483647 Zeny
/// /item whereisboss - locate boss mob in current map.(not yet implemented)
/// /item regenboss_n t - regenerate n boss monster by t millisecond.(not yet implemented)
/// /item onekillmonster - toggle an ability to kill mobs in one hit.(not yet implemented)
@@ -13684,7 +13715,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
return;
value = battle_config.client_accept_chatdori;
- dstsd = sd;
+ dstsd = sd;
} else {
dstsd = map->id2sd(id);
if( dstsd == NULL )
@@ -13961,7 +13992,7 @@ void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int cha
}
-//Subfunction called from clif_foreachclient to toggle friends on/off [Skotlex]
+//Sub-function called from clif_foreachclient to toggle friends on/off [Skotlex]
int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap)
{
int account_id, char_id, online;
@@ -14310,7 +14341,7 @@ void clif_parse_ranklist(int fd, struct map_session_data *sd) {
case RANKTYPE_BLACKSMITH:
case RANKTYPE_ALCHEMIST:
case RANKTYPE_TAEKWON:
- clif->ranklist(sd, type); // pk_list unsuported atm
+ clif->ranklist(sd, type); // pk_list unsupported atm
break;
}
}
@@ -14581,18 +14612,27 @@ void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
/// 0292
void clif_parse_AutoRevive(int fd, struct map_session_data *sd) {
int item_position = pc->search_inventory(sd, ITEMID_TOKEN_OF_SIEGFRIED);
+ int hpsp = 100;
- if (item_position < 0)
- return;
+ if (item_position < 0){
+ if (sd->sc.data[SC_LIGHT_OF_REGENE])
+ hpsp = 20 * sd->sc.data[SC_LIGHT_OF_REGENE]->val1;
+ else
+ return;
+ }
if (sd->sc.data[SC_HELLPOWER]) //Cannot res while under the effect of SC_HELLPOWER.
return;
- if (!status->revive(&sd->bl, 100, 100))
+ if (!status->revive(&sd->bl, hpsp, hpsp))
return;
+ if ( item_position > 0)
+ pc->delitem(sd, item_position, 1, 0, 1, LOG_TYPE_CONSUME);
+ else
+ status_change_end(&sd->bl,SC_LIGHT_OF_REGENE,INVALID_TIMER);
+
clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
- pc->delitem(sd, item_position, 1, 0, 1, LOG_TYPE_CONSUME);
}
@@ -14631,7 +14671,7 @@ void clif_check(int fd, struct map_session_data* pl_sd) {
WFIFOW(fd,34) = pl_sd->battle_status.flee2/10;
WFIFOW(fd,36) = pl_sd->battle_status.cri/10;
WFIFOW(fd,38) = (2000-pl_sd->battle_status.amotion)/10; // aspd
- WFIFOW(fd,40) = 0; // FIXME: What is 'plusASPD' supposed to be? Maybe adelay?
+ WFIFOW(fd,40) = 0; // FIXME: What is 'plusASPD' supposed to be? Maybe a delay?
WFIFOSET(fd,packet_len(0x214));
}
@@ -14696,7 +14736,7 @@ void clif_Mail_getattachment(int fd, uint8 flag)
/// 0249 <result>.B
/// result:
/// 0 = success
-/// 1 = recipinent does not exist
+/// 1 = recipient does not exist
void clif_Mail_send(int fd, bool fail)
{
WFIFOHEAD(fd,packet_len(0x249));
@@ -15521,20 +15561,10 @@ void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) {
WFIFOSET(fd,WFIFOW(fd,2));
}
-
/// Cashshop Buy Ack (ZC_PC_CASH_POINT_UPDATE).
/// 0289 <cash point>.L <error>.W
/// 0289 <cash point>.L <kafra point>.L <error>.W (PACKETVER >= 20070711)
-/// error:
-/// 0 = The deal has successfully completed. (ERROR_TYPE_NONE)
-/// 1 = The Purchase has failed because the NPC does not exist. (ERROR_TYPE_NPC)
-/// 2 = The Purchase has failed because the Kafra Shop System is not working correctly. (ERROR_TYPE_SYSTEM)
-/// 3 = You are over your Weight Limit. (ERROR_TYPE_INVENTORY_WEIGHT)
-/// 4 = You cannot purchase items while you are in a trade. (ERROR_TYPE_EXCHANGE)
-/// 5 = The Purchase has failed because the Item Information was incorrect. (ERROR_TYPE_ITEM_ID)
-/// 6 = You do not have enough Kafra Credit Points. (ERROR_TYPE_MONEY)
-/// 7 = You can purchase up to 10 items.
-/// 8 = Some items could not be purchased.
+/// For error return codes see enum cashshop_error@clif.h
void clif_cashshop_ack(struct map_session_data* sd, int error) {
struct npc_data *nd;
int fd = sd->fd;
@@ -16037,7 +16067,7 @@ void clif_mercenary_info(struct map_session_data *sd) {
/// Mercenary skill tree (ZC_MER_SKILLINFO_LIST).
-/// 029d <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B }*
+/// 029d <packet len>.W { <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradeable>.B }*
void clif_mercenary_skillblock(struct map_session_data *sd)
{
struct mercenary_data *md;
@@ -17111,7 +17141,7 @@ void clif_parse_debug(int fd,struct map_session_data *sd) {
}
/*==========================================
* Server tells client to display a window similar to Magnifier (item) one
- * Server populates the window with avilable elemental converter options according to player's inventory
+ * Server populates the window with available elemental converter options according to player's inventory
*------------------------------------------*/
int clif_elementalconverter_list(struct map_session_data *sd) {
int i,c,view,fd;
@@ -17526,7 +17556,7 @@ void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) {
WFIFOW(fd, 0) = 0x845;
WFIFOL(fd, 2) = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values
WFIFOL(fd, 6) = sd->kafraPoints;
- WFIFOSET(fd, 10);
+ WFIFOSET(fd, 10);
}
void clif_parse_CashShopClose(int fd, struct map_session_data *sd) {
@@ -17556,7 +17586,7 @@ void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) {
}
void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) {
unsigned short limit = RFIFOW(fd, 4), i, j;
- unsigned int kafra_pay = RFIFOL(fd, 6);// [Ryuuzaki] - These are free cash points (strangely #CASH = main cash curreny for us, confusing)
+ unsigned int kafra_pay = RFIFOL(fd, 6);// [Ryuuzaki] - These are free cash points (strangely #CASH = main cash currently for us, confusing)
if( map->list[sd->bl.m].flag.nocashshop ) {
clif->colormes(fd,COLOR_RED,msg_txt(1489)); //Cash Shop is disabled in this map
@@ -17761,7 +17791,7 @@ void clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK
clif->send(&p,sizeof(p), &sd->bl, SELF);
}
break;
- }
+ }
}
@@ -17793,7 +17823,7 @@ void clif_parse_bgqueue_register(int fd, struct map_session_data *sd) {
default:
clif->bgqueue_ack(sd,BGQA_FAIL_TYPE_INVALID, arena->id);
return;
- }
+ }
bg->queue_add(sd, arena, (enum bg_queue_types)p->type);
}
@@ -18153,6 +18183,7 @@ void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd) {
}
/* NPC Market (by Ind after an extensive debugging of the packet, only possible thanks to Yommy <3) */
void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
+#if PACKETVER >= 20131223
struct npc_item_list *shop = nd->u.scr.shop->item;
unsigned short shop_size = nd->u.scr.shop->items, i, c;
struct item_data *id = NULL;
@@ -18173,12 +18204,14 @@ void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
npcmarket_open.PacketLength = 4 + ( sizeof(npcmarket_open.list[0]) * c );
clif->send(&npcmarket_open,npcmarket_open.PacketLength,&sd->bl,SELF);
+#endif
}
void clif_parse_NPCMarketClosed(int fd, struct map_session_data *sd) {
/* TODO track the state <3~ */
sd->npc_shopid = 0;
}
void clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_npc_market_purchase *req, unsigned char response) {
+#if PACKETVER >= 20131223
unsigned short c = 0;
npcmarket_result.PacketType = npcmarketresultackType;
@@ -18211,11 +18244,14 @@ void clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_npc
npcmarket_result.PacketLength = 5 + ( sizeof(npcmarket_result.list[0]) * c );;
clif->send(&npcmarket_result,npcmarket_result.PacketLength,&sd->bl,SELF);
+#endif
}
void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd) {
+#if PACKETVER >= 20131223
struct packet_npc_market_purchase *p = P2PTR(fd);
clif->npc_market_purchase_ack(sd,p,npc->market_buylist(sd,(p->PacketLength - 4) / sizeof(p->list[0]),p));
+#endif
}
/* */
unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) {
@@ -18646,6 +18682,7 @@ void clif_defaults(void) {
clif->sitting = clif_sitting;
clif->standing = clif_standing;
clif->arrow_create_list = clif_arrow_create_list;
+ clif->refresh_storagewindow = clif_refresh_storagewindow;
clif->refresh = clif_refresh;
clif->fame_blacksmith = clif_fame_blacksmith;
clif->fame_alchemist = clif_fame_alchemist;
@@ -18986,7 +19023,7 @@ void clif_defaults(void) {
clif->search_store_info_failed = clif_search_store_info_failed;
clif->open_search_store_info = clif_open_search_store_info;
clif->search_store_info_click_ack = clif_search_store_info_click_ack;
- /* elemental-related */
+ /* elemental-related */
clif->elemental_info = clif_elemental_info;
clif->elemental_updatestatus = clif_elemental_updatestatus;
/* bgqueue */
@@ -18996,7 +19033,7 @@ void clif_defaults(void) {
clif->bgqueue_joined = clif_bgqueue_joined;
clif->bgqueue_pcleft = clif_bgqueue_pcleft;
clif->bgqueue_battlebegins = clif_bgqueue_battlebegins;
- /* misc-handling */
+ /* misc-handling */
clif->adopt_reply = clif_Adopt_reply;
clif->adopt_request = clif_Adopt_request;
clif->readbook = clif_readbook;
@@ -19033,7 +19070,7 @@ void clif_defaults(void) {
clif->npc_market_purchase_ack = clif_npc_market_purchase_ack;
/*------------------------
*- Parse Incoming Packet
- *------------------------*/
+ *------------------------*/
clif->pWantToConnection = clif_parse_WantToConnection;
clif->pLoadEndAck = clif_parse_LoadEndAck;
clif->pTickSend = clif_parse_TickSend;
@@ -19087,7 +19124,7 @@ void clif_defaults(void) {
clif->pUseSkillToPos = clif_parse_UseSkillToPos;
clif->pUseSkillToPosSub = clif_parse_UseSkillToPosSub;
clif->pUseSkillToPos_homun = clif_parse_UseSkillToPos_homun;
- clif->pUseSkillToPos_mercenary = clif_parse_UseSkillToPos_mercenary;
+ clif->pUseSkillToPos_mercenary = clif_parse_UseSkillToPos_mercenary;
clif->pUseSkillToPosMoreInfo = clif_parse_UseSkillToPosMoreInfo;
clif->pUseSkillMap = clif_parse_UseSkillMap;
clif->pRequestMemo = clif_parse_RequestMemo;
diff --git a/src/map/clif.h b/src/map/clif.h
index 36bd42718..48316427f 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -2,16 +2,16 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_CLIF_H_
-#define _MAP_CLIF_H_
+#ifndef MAP_CLIF_H
+#define MAP_CLIF_H
+#include <stdarg.h>
+
+#include "map.h"
+#include "packets_struct.h"
#include "../common/cbasetypes.h"
#include "../common/db.h"
#include "../common/mmo.h"
-#include "../common/socket.h"
-#include "../map/map.h"
-#include "../map/packets_struct.h"
-#include <stdarg.h>
/**
* Declarations
@@ -20,7 +20,6 @@ struct item;
struct item_data;
struct storage_data;
struct guild_storage;
-struct block_list;
struct unit_data;
struct map_session_data;
struct homun_data;
@@ -67,7 +66,7 @@ typedef enum send_target {
AREA, // area
AREA_WOS, // area, without self
AREA_WOC, // area, without chatrooms
- AREA_WOSC, // area, without own chatroom
+ AREA_WOSC, // area, without own chatrooms
AREA_CHAT_WOC, // hearable area, without chatrooms
CHAT, // current chatroom
CHAT_WOS, // current chatroom, without self
@@ -350,6 +349,22 @@ enum clif_messages {
};
/**
+ * Used to answer CZ_PC_BUY_CASH_POINT_ITEM (clif_parse_cashshop_buy)
+ **/
+enum cashshop_error {
+ ERROR_TYPE_NONE = 0, // The deal has successfully completed. (ERROR_TYPE_NONE)
+ ERROR_TYPE_NPC, // The Purchase has failed because the NPC does not exist. (ERROR_TYPE_NPC)
+ ERROR_TYPE_SYSTEM, // The Purchase has failed because the Kafra Shop System is not working correctly. (ERROR_TYPE_SYSTEM)
+ ERROR_TYPE_INVENTORY_WEIGHT, // You are over your Weight Limit. (ERROR_TYPE_INVENTORY_WEIGHT)
+ ERROR_TYPE_EXCHANGE, // You cannot purchase items while you are in a trade. (ERROR_TYPE_EXCHANGE)
+ ERROR_TYPE_ITEM_ID, // The Purchase has failed because the Item Information was incorrect. (ERROR_TYPE_ITEM_ID)
+ ERROR_TYPE_MONEY, // You do not have enough Kafra Credit Points. (ERROR_TYPE_MONEY)
+ // Unofficial type names
+ ERROR_TYPE_QUANTITY, // You can purchase up to 10 items. (ERROR_TYPE_QUANTITY)
+ ERROR_TYPE_NOT_ALL, // Some items could not be purchased. (ERROR_TYPE_NOT_ALL)
+};
+
+/**
* Color Table
**/
enum clif_colors {
@@ -650,6 +665,7 @@ struct clif_interface {
void (*sitting) (struct block_list* bl);
void (*standing) (struct block_list* bl);
void (*arrow_create_list) (struct map_session_data *sd);
+ void (*refresh_storagewindow) (struct map_session_data *sd);
void (*refresh) (struct map_session_data *sd);
void (*fame_blacksmith) (struct map_session_data *sd, int points);
void (*fame_alchemist) (struct map_session_data *sd, int points);
@@ -910,7 +926,7 @@ struct clif_interface {
void (*friendslist_toggle) (struct map_session_data *sd,int account_id, int char_id, int online);
void (*friendlist_req) (struct map_session_data* sd, int account_id, int char_id, const char* name);
/* gm-related */
- void (*GM_kickack) (struct map_session_data *sd, int id);
+ void (*GM_kickack) (struct map_session_data *sd, int result);
void (*GM_kick) (struct map_session_data *sd,struct map_session_data *tsd);
void (*manner_message) (struct map_session_data* sd, uint32 type);
void (*GM_silence) (struct map_session_data* sd, struct map_session_data* tsd, uint8 type);
@@ -1274,4 +1290,4 @@ struct clif_interface *clif;
void clif_defaults(void);
-#endif /* _MAP_CLIF_H_ */
+#endif /* MAP_CLIF_H */
diff --git a/src/map/date.c b/src/map/date.c
index f38ead858..975a00c50 100644
--- a/src/map/date.c
+++ b/src/map/date.c
@@ -1,10 +1,14 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#include "../common/cbasetypes.h"
+#define HERCULES_CORE
+
#include "date.h"
+
#include <time.h>
+#include "../common/cbasetypes.h"
+
int date_get_year(void)
{
time_t t;
diff --git a/src/map/date.h b/src/map/date.h
index 46f0d86c3..c3f353f64 100644
--- a/src/map/date.h
+++ b/src/map/date.h
@@ -1,8 +1,10 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _MAP_DATE_H_
-#define _MAP_DATE_H_
+#ifndef MAP_DATE_H
+#define MAP_DATE_H
+
+#include "../common/cbasetypes.h"
int date_get_year(void);
int date_get_month(void);
@@ -15,4 +17,4 @@ bool is_day_of_sun(void);
bool is_day_of_moon(void);
bool is_day_of_star(void);
-#endif /* _MAP_DATE_H_ */
+#endif /* MAP_DATE_H */
diff --git a/src/map/duel.c b/src/map/duel.c
index af2741f77..4e4eeef1f 100644
--- a/src/map/duel.c
+++ b/src/map/duel.c
@@ -2,18 +2,20 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
+#define HERCULES_CORE
-#include "atcommand.h" // msg_txt
-#include "clif.h"
#include "duel.h"
-#include "pc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include "atcommand.h" // msg_txt
+#include "clif.h"
+#include "pc.h"
+#include "../common/cbasetypes.h"
+
/*==========================================
* Duel organizing functions [LuzZza]
*------------------------------------------*/
@@ -126,7 +128,7 @@ void duel_leave(const unsigned int did, struct map_session_data* sd) {
duel->list[did].members_count--;
if(duel->list[did].members_count == 0) {
- map->foreachpc(duel_leave_sub, did);
+ map->foreachpc(duel_leave_sub, did);
duel->count--;
}
@@ -174,7 +176,7 @@ void do_init_duel(bool minimal) {
}
/*=====================================
-* Default Functions : duel.h
+* Default Functions : duel.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
diff --git a/src/map/duel.h b/src/map/duel.h
index 5405d2eee..de2bd1bf6 100644
--- a/src/map/duel.h
+++ b/src/map/duel.h
@@ -2,8 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_DUEL_H_
-#define _MAP_DUEL_H_
+#ifndef MAP_DUEL_H
+#define MAP_DUEL_H
+
+#include "../common/cbasetypes.h"
+
+struct map_session_data;
struct duel {
int members_count;
@@ -14,7 +18,7 @@ struct duel {
#define MAX_DUEL 1024
/*=====================================
-* Interface : duel.h
+* Interface : duel.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -42,4 +46,4 @@ struct duel_interface *duel;
void duel_defaults(void);
-#endif /* _MAP_DUEL_H_ */
+#endif /* MAP_DUEL_H */
diff --git a/src/map/elemental.c b/src/map/elemental.c
index f335600d6..7ffeea410 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -2,42 +2,44 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/utils.h"
-#include "../common/random.h"
-#include "../common/strlib.h"
+#define HERCULES_CORE
-#include "log.h"
-#include "clif.h"
+#include "elemental.h"
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "atcommand.h"
+#include "battle.h"
#include "chrif.h"
+#include "clif.h"
+#include "guild.h"
#include "intif.h"
#include "itemdb.h"
+#include "log.h"
#include "map.h"
-#include "pc.h"
-#include "status.h"
-#include "skill.h"
#include "mob.h"
-#include "pet.h"
-#include "battle.h"
+#include "npc.h"
#include "party.h"
-#include "guild.h"
-#include "atcommand.h"
+#include "pc.h"
+#include "pet.h"
#include "script.h"
-#include "npc.h"
+#include "skill.h"
+#include "status.h"
#include "trade.h"
#include "unit.h"
-#include "elemental.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct elemental_interface elemental_s;
@@ -503,7 +505,7 @@ int elemental_change_mode_ack(struct elemental_data *ed, int mode) {
else
unit->skilluse_id(&ed->bl,bl->id,skill_id,skill_lv);
- ed->target_id = 0; // Reset target after casting the skill to avoid continious attack.
+ ed->target_id = 0; // Reset target after casting the skill to avoid continuous attack.
return 1;
}
@@ -527,7 +529,7 @@ int elemental_change_mode(struct elemental_data *ed, int mode) {
else if( mode == EL_MODE_ASSIST ) mode = EL_SKILLMODE_ASSIST; // Assist spirit mode -> Assist spirit skill.
else mode = EL_SKILLMODE_PASIVE; // Passive spirit mode -> Passive spirit skill.
- // Use a skill inmediately after every change mode.
+ // Use a skill immediately after every change mode.
if( mode != EL_SKILLMODE_AGGRESSIVE )
elemental->change_mode_ack(ed,mode);
return 1;
@@ -949,7 +951,7 @@ void do_final_elemental(void) {
}
/*=====================================
-* Default Functions : elemental.h
+* Default Functions : elemental.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
diff --git a/src/map/elemental.h b/src/map/elemental.h
index 6d04a41a5..0c8fff8b3 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -2,11 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_ELEMENTAL_H_
-#define _MAP_ELEMENTAL_H_
+#ifndef MAP_ELEMENTAL_H
+#define MAP_ELEMENTAL_H
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
+#include "../common/mmo.h" // NAME_LENGTH
/**
* Defines
@@ -63,7 +64,7 @@ struct elemental_data {
};
/*=====================================
-* Interface : elemental.h
+* Interface : elemental.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -120,4 +121,4 @@ struct elemental_interface *elemental;
void elemental_defaults(void);
-#endif /* _MAP_ELEMENTAL_H_ */
+#endif /* MAP_ELEMENTAL_H */
diff --git a/src/map/guild.c b/src/map/guild.c
index 99c74c217..af29dc64e 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -2,35 +2,38 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/mapindex.h"
-#include "../common/showmsg.h"
-#include "../common/ers.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
-#include "map.h"
+#include "../config/core.h" // GP_BOUND_ITEMS
#include "guild.h"
-#include "storage.h"
-#include "battle.h"
-#include "npc.h"
-#include "pc.h"
-#include "status.h"
-#include "mob.h"
-#include "intif.h"
-#include "clif.h"
-#include "skill.h"
-#include "log.h"
-#include "instance.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "battle.h"
+#include "clif.h"
+#include "instance.h"
+#include "intif.h"
+#include "log.h"
+#include "map.h"
+#include "mob.h"
+#include "npc.h"
+#include "pc.h"
+#include "skill.h"
+#include "status.h"
+#include "storage.h"
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/mapindex.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
+
struct guild_interface guild_s;
/*==========================================
@@ -58,7 +61,7 @@ int guild_skill_get_max (int id) {
return guild->skill_tree[id-GD_SKILLBASE].max;
}
-// Retrive skill_lv learned by guild
+// Retrieve skill_lv learned by guild
int guild_checkskill(struct guild *g, int id) {
int idx = id - GD_SKILLBASE;
if (idx < 0 || idx >= MAX_GUILDSKILL)
@@ -484,21 +487,27 @@ int guild_recv_info(struct guild *sg) {
}
for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) {
- if( sd->status.guild_id ) {
- if( sd->status.guild_id == sg->guild_id ) {
- clif->chsys_join(channel,sd);
- sd->guild = g;
- }
-
+ if (!sd->status.guild_id)
+ continue; // Not interested in guildless users
+
+ if (sd->status.guild_id == sg->guild_id) {
+ // Guild member
+ clif->chsys_join(channel,sd);
+ sd->guild = g;
+
for (i = 0; i < MAX_GUILDALLIANCE; i++) {
- if( sg->alliance[i].opposition == 0 && sg->alliance[i].guild_id ) {
- if( sg->alliance[i].guild_id == sd->status.guild_id ) {
- clif->chsys_join(channel,sd);
- } else if( tg[i] != NULL ) {
- if( !(tg[i]->channel->banned && idb_exists(tg[i]->channel->banned, sd->status.account_id)))
- clif->chsys_join(tg[i]->channel,sd);
- }
- }
+ // Join channels from allied guilds
+ if (tg[i] && !(tg[i]->channel->banned && idb_exists(tg[i]->channel->banned, sd->status.account_id)))
+ clif->chsys_join(tg[i]->channel, sd);
+ }
+ continue;
+ }
+
+ for (i = 0; i < MAX_GUILDALLIANCE; i++) {
+ if (tg[i] && sd->status.guild_id == tg[i]->guild_id) { // Shortcut to skip the alliance checks again
+ // Alliance member
+ if( !(channel->banned && idb_exists(channel->banned, sd->status.account_id)))
+ clif->chsys_join(channel, sd);
}
}
}
@@ -568,9 +577,9 @@ int guild_recv_info(struct guild *sg) {
if (before.skill_point != g->skill_point)
clif->guild_skillinfo(sd); //Submit information skills
- if (guild_new) { // Send information and affiliation if unsent
+ if (guild_new) { // Send information and affiliation if unsent
clif->guild_belonginfo(sd, g);
- clif->guild_notice(sd, g);
+ //clif->guild_notice(sd, g); Is already sent in clif_parse_LoadEndAck
sd->guild_emblem_id = g->emblem_id;
}
}
@@ -618,9 +627,12 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
return 0;
}
- if( tsd->status.guild_id > 0
- || tsd->guild_invite > 0
- || ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
+ if( tsd->status.guild_id > 0
+ || tsd->guild_invite > 0
+ || ( (map->agit_flag || map->agit2_flag)
+ && map->list[tsd->bl.m].flag.gvg_castle
+ && !battle_config.guild_castle_invite
+ )
) {
//Can't invite people inside castles. [Skotlex]
clif->guild_inviteack(sd,0);
@@ -752,7 +764,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag) {
return 0;
if(sd==NULL || sd->guild_invite==0){
- // cancel if player not present or invalide guild_id invitation
+ // cancel if player not present or invalid guild_id invitation
if (flag == 0) {
ShowError("guild: member added error %d is not online\n",account_id);
intif->guild_leave(guild_id,account_id,char_id,0,"** Data Error **");
@@ -803,10 +815,13 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c
return 0;
if( sd->status.account_id != account_id
- || sd->status.char_id != char_id
- || sd->status.guild_id != guild_id
- || ((map->agit_flag || map->agit2_flag) && map->list[sd->bl.m].flag.gvg_castle)
- )
+ || sd->status.char_id != char_id
+ || sd->status.guild_id != guild_id
+ // Can't leave inside castles
+ || ((map->agit_flag || map->agit2_flag)
+ && map->list[sd->bl.m].flag.gvg_castle
+ && !battle_config.guild_castle_expulsion)
+ )
return 0;
intif->guild_leave(sd->status.guild_id, sd->status.account_id, sd->status.char_id,0,mes);
@@ -835,10 +850,12 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, i
return 0; //Expulsion permission
//Can't leave inside guild castles.
- if ((tsd = map->id2sd(account_id))
- && tsd->status.char_id == char_id
- && ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
- )
+ if ((tsd = map->id2sd(account_id))
+ && tsd->status.char_id == char_id
+ && ((map->agit_flag || map->agit2_flag)
+ && map->list[sd->bl.m].flag.gvg_castle
+ && !battle_config.guild_castle_expulsion)
+ )
return 0;
// find the member and perform expulsion
@@ -865,7 +882,7 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c
online_member_sd = guild->getavailablesd(g);
if(online_member_sd == NULL)
- return 0; // noone online to inform
+ return 0; // no one online to inform
#ifdef GP_BOUND_ITEMS
//Guild bound item check
@@ -1001,7 +1018,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
//Ensure validity of pointer (ie: player logs in/out, changes map-server)
g->member[idx].sd = guild->sd_check(guild_id, account_id, char_id);
- if(oldonline!=online)
+ if(oldonline!=online)
clif->guild_memberlogin_notice(g, idx, online);
if(!g->member[idx].sd)
@@ -1196,7 +1213,7 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
TBL_MOB* md = (gc->guardian[i].id ? map->id2md(gc->guardian[i].id) : NULL);
if( md == NULL || md->guardian_data == NULL )
continue;
- md->guardian_data->emblem_id = emblem_id;
+
clif->guild_emblem_area(&md->bl);
}
// update temporary guardians
@@ -1204,7 +1221,7 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
TBL_MOB* md = (gc->temp_guardians[i] ? map->id2md(gc->temp_guardians[i]) : NULL);
if( md == NULL || md->guardian_data == NULL )
continue;
- md->guardian_data->emblem_id = emblem_id;
+
clif->guild_emblem_area(&md->bl);
}
}
@@ -1998,14 +2015,14 @@ int guild_castledatasave(int castle_id, int index, int value)
void guild_castle_reconnect_sub(void *key, void *data, va_list ap)
{
- int castle_id = GetWord((int)__64BPTRSIZE(key), 0);
- int index = GetWord((int)__64BPTRSIZE(key), 1);
+ int castle_id = GetWord((int)h64BPTRSIZE(key), 0);
+ int index = GetWord((int)h64BPTRSIZE(key), 1);
intif->guild_castle_datasave(castle_id, index, *(int *)data);
aFree(data);
}
/**
- * Saves pending guild castle data changes when char-server is
+ * Saves pending guild castle data changes when char-server is
* disconnected.
* On reconnect pushes all changes to char-server for saving.
*/
@@ -2020,7 +2037,7 @@ void guild_castle_reconnect(int castle_id, int index, int value)
int *data;
CREATE(data, int, 1);
*data = value;
- linkdb_replace(&gc_save_pending, (void*)__64BPTRSIZE((MakeDWord(castle_id, index))), data);
+ linkdb_replace(&gc_save_pending, (void*)h64BPTRSIZE((MakeDWord(castle_id, index))), data);
}
}
@@ -2356,11 +2373,11 @@ void guild_defaults(void) {
guild->agit_end = guild_agit_end;
guild->agit2_start = guild_agit2_start;
guild->agit2_end = guild_agit2_end;
- /* guild flag cachin */
+ /* guild flag caching */
guild->flag_add = guild_flag_add;
guild->flag_remove = guild_flag_remove;
guild->flags_clear = guild_flags_clear;
- /* guild aura */
+ /* guild aura */
guild->aura_refresh = guild_guildaura_refresh;
/* */
guild->payexp_timer = guild_payexp_timer;
diff --git a/src/map/guild.h b/src/map/guild.h
index b03bd664d..126325eef 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -2,21 +2,13 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_GUILD_H_
-#define _MAP_GUILD_H_
+#ifndef MAP_GUILD_H
+#define MAP_GUILD_H
-//#include "../common/mmo.h"
-#include "map.h" // NAME_LENGTH
-
-/**
- * Declarations
- **/
-struct guild;
-struct guild_member;
-struct guild_position;
-struct guild_castle;
-struct map_session_data;
-struct mob_data;
+#include "map.h" // EVENT_NAME_LENGTH, TBL_PC
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/mmo.h"
/**
* Defines
@@ -32,13 +24,15 @@ struct eventlist {
char name[EVENT_NAME_LENGTH];
struct eventlist *next;
};
-//For quick linking to a guardian's info. [Skotlex]
+
+/**
+ * Guardian data
+ * For quick linking to a guardian's info. [Skotlex]
+ **/
struct guardian_data {
int number; //0-MAX_GUARDIANS-1 = Guardians. MAX_GUARDIANS = Emperium.
- int guild_id;
- int emblem_id;
- int guardup_lv; //Level of GD_GUARDUP skill.
- char guild_name[NAME_LENGTH];
+
+ struct guild *g;
struct guild_castle* castle;
};
struct guild_expcache {
@@ -173,4 +167,4 @@ struct guild_interface *guild;
void guild_defaults(void);
-#endif /* _MAP_GUILD_H_ */
+#endif /* MAP_GUILD_H */
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 94c2ae5b1..8c47226db 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -2,43 +2,45 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/mmo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
+#define HERCULES_CORE
-#include "log.h"
-#include "clif.h"
+#include "../config/core.h" // DBPATH
+#include "homunculus.h"
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "atcommand.h"
+#include "battle.h"
#include "chrif.h"
+#include "clif.h"
+#include "guild.h"
#include "intif.h"
#include "itemdb.h"
+#include "log.h"
#include "map.h"
-#include "pc.h"
-#include "status.h"
-#include "skill.h"
#include "mob.h"
-#include "pet.h"
-#include "battle.h"
+#include "npc.h"
#include "party.h"
-#include "guild.h"
-#include "atcommand.h"
+#include "pc.h"
+#include "pet.h"
#include "script.h"
-#include "npc.h"
+#include "skill.h"
+#include "status.h"
#include "trade.h"
#include "unit.h"
-
-#include "homunculus.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct homunculus_interface homunculus_s;
@@ -807,7 +809,7 @@ bool homunculus_call(struct map_session_data *sd) {
return true;
}
-// Recv homunculus data from char server
+// Receive homunculus data from char server
bool homunculus_recv_data(int account_id, struct s_homunculus *sh, int flag) {
struct map_session_data *sd;
struct homun_data *hd;
@@ -1155,7 +1157,7 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) {
classid = atoi(split[0]) - HM_CLASS_BASE;
if ( classid >= MAX_HOMUNCULUS_CLASS ) {
- ShowWarning("homunculus_read_skill_db_sub: Invalud homunculus class %d.\n", atoi(split[0]));
+ ShowWarning("homunculus_read_skill_db_sub: Invalid homunculus class %d.\n", atoi(split[0]));
return false;
}
@@ -1182,6 +1184,24 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) {
return true;
}
+int8 homunculus_get_intimacy_grade(struct homun_data *hd) {
+ unsigned int val = hd->homunculus.intimacy / 100;
+ if( val > 100 ) {
+ if( val > 250 ) {
+ if( val > 750 ) {
+ if ( val > 900 )
+ return 4;
+ else
+ return 3;
+ } else
+ return 2;
+ } else
+ return 1;
+ }
+
+ return 0;
+}
+
void homunculus_skill_db_read(void) {
memset(homun->skill_tree,0,sizeof(homun->skill_tree));
sv->readdb(map->db_path, "homun_skill_tree.txt", ',', 13, 15, -1, homun->read_skill_db_sub);
@@ -1303,4 +1323,5 @@ void homunculus_defaults(void) {
homun->exp_db_read = homunculus_exp_db_read;
homun->addspiritball = homunculus_addspiritball;
homun->delspiritball = homunculus_delspiritball;
+ homun->get_intimacy_grade = homunculus_get_intimacy_grade;
}
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index db250f511..25ccabf48 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -2,12 +2,13 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_HOMUNCULUS_H_
-#define _MAP_HOMUNCULUS_H_
+#ifndef MAP_HOMUNCULUS_H
+#define MAP_HOMUNCULUS_H
+#include "pc.h"
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
-#include "pc.h"
+#include "../common/mmo.h"
#define MAX_HOM_SKILL_REQUIRE 5
#define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX)
@@ -140,10 +141,11 @@ struct homunculus_interface {
void (*exp_db_read) (void);
void (*addspiritball) (struct homun_data *hd, int max);
void (*delspiritball) (struct homun_data *hd, int count, int type);
+ int8 (*get_intimacy_grade) (struct homun_data *hd);
};
struct homunculus_interface *homun;
void homunculus_defaults(void);
-#endif /* _MAP_HOMUNCULUS_H_ */
+#endif /* MAP_HOMUNCULUS_H */
diff --git a/src/map/instance.c b/src/map/instance.c
index caf622b3d..5789d7dd6 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -2,30 +2,32 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/db.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
-#include "clif.h"
#include "instance.h"
-#include "map.h"
-#include "npc.h"
-#include "party.h"
-#include "pc.h"
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdarg.h>
#include <time.h>
+#include "clif.h"
+#include "map.h"
+#include "npc.h"
+#include "party.h"
+#include "pc.h"
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
+
struct instance_interface instance_s;
/// Checks whether given instance id is valid or not.
diff --git a/src/map/instance.h b/src/map/instance.h
index 712a0f141..2ee77d3e3 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -2,12 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_INSTANCE_H_
-#define _MAP_INSTANCE_H_
+#ifndef MAP_INSTANCE_H
+#define MAP_INSTANCE_H
#include "script.h" // struct reg_db
+#include "../common/cbasetypes.h"
#include "../common/mmo.h" // struct point
+
struct block_list;
+struct map_session_data;
#define INSTANCE_NAME_LENGTH (60+1)
@@ -85,4 +88,4 @@ struct instance_interface *instance;
void instance_defaults(void);
-#endif /* _MAP_INSTANCE_H_ */
+#endif /* MAP_INSTANCE_H */
diff --git a/src/map/intif.c b/src/map/intif.c
index 40ceda917..432154f04 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1,37 +1,40 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "map.h"
+#define HERCULES_CORE
+
+#include "../config/core.h" // GP_BOUND_ITEMS
+#include "intif.h"
+
+#include <fcntl.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "atcommand.h"
#include "battle.h"
#include "chrif.h"
#include "clif.h"
-#include "pc.h"
-#include "intif.h"
-#include "log.h"
-#include "storage.h"
-#include "party.h"
+#include "elemental.h"
#include "guild.h"
-#include "pet.h"
-#include "atcommand.h"
-#include "mercenary.h"
#include "homunculus.h"
-#include "elemental.h"
+#include "log.h"
#include "mail.h"
+#include "map.h"
+#include "mercenary.h"
+#include "party.h"
+#include "pc.h"
+#include "pet.h"
#include "quest.h"
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <string.h>
-
+#include "storage.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
struct intif_interface intif_s;
@@ -47,7 +50,7 @@ int CheckForCharServer(void)
// pet
int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,short pet_egg_id,
- short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name)
+ short pet_equip,short intimate,short hungry,char rename_flag,char incubate,char *pet_name)
{
if (intif->CheckForCharServer())
return 0;
@@ -62,7 +65,7 @@ int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,sho
WFIFOW(inter_fd,18) = intimate;
WFIFOW(inter_fd,20) = hungry;
WFIFOB(inter_fd,22) = rename_flag;
- WFIFOB(inter_fd,23) = incuvate;
+ WFIFOB(inter_fd,23) = incubate;
memcpy(WFIFOP(inter_fd,24),pet_name,NAME_LENGTH);
WFIFOSET(inter_fd,24+NAME_LENGTH);
@@ -235,7 +238,7 @@ int intif_wis_replay(int id, int flag)
WFIFOHEAD(inter_fd,7);
WFIFOW(inter_fd,0) = 0x3002;
WFIFOL(inter_fd,2) = id;
- WFIFOB(inter_fd,6) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ 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)
@@ -384,7 +387,7 @@ int intif_request_registry(struct map_session_data *sd, int flag)
{
nullpo_ret(sd);
- /* if char server aint online it doesn't load, shouldn't we kill the session then? */
+ /* if char server ain't online it doesn't load, shouldn't we kill the session then? */
if (intif->CheckForCharServer())
return 0;
@@ -692,7 +695,10 @@ int intif_guild_message(int guild_id,int account_id,const char *mes,int len)
return 0;
}
-// Request a change of Guild basic information
+/**
+ * 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
+ **/
int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
{
if (intif->CheckForCharServer())
@@ -925,7 +931,7 @@ void intif_parse_WisMessage(int fd) {
}
//Success to send whisper.
clif->wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
- intif_wis_replay(id,0); // succes
+ intif_wis_replay(id,0); // success
}
// Wisp/page transmission result reception
@@ -933,7 +939,7 @@ void intif_parse_WisEnd(int fd) {
struct map_session_data* sd;
if (battle_config.etc_log)
- ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send whisper, 1: target character is not logged in?, 2: ignored by target
sd = (struct map_session_data *)map->nick2sd((char *) RFIFOP(fd,2));
if (sd != NULL)
clif->wis_end(sd->fd, RFIFOB(fd,26));
@@ -1061,7 +1067,7 @@ void intif_parse_Registers(int fd)
ival = RFIFOL(fd, cursor);
cursor += 4;
- script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)__64BPTRSIZE(ival), NULL);
+ script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)h64BPTRSIZE(ival), NULL);
}
}
@@ -1237,6 +1243,21 @@ void intif_parse_GuildBasicInfoChanged(int fd) {
case GBI_EXP: g->exp = RFIFOQ(fd,10); break;
case GBI_GUILDLV: g->guild_lv = RFIFOW(fd,10); break;
case GBI_SKILLPOINT: g->skill_point = RFIFOL(fd,10); break;
+ case GBI_SKILLLV: {
+ int idx, max;
+ struct guild_skill *gs = (struct guild_skill *)RFIFOP(fd,10);
+
+ if( gs == NULL )
+ return;
+
+ idx = gs->id - GD_SKILLBASE;
+ max = guild->skill_get_max(gs->id);
+ if( gs->lv > max )
+ gs->lv = max;
+
+ memcpy(&(g->skill[idx]), gs, sizeof(g->skill[idx]));
+ break;
+ }
}
}
@@ -1316,7 +1337,7 @@ void intif_parse_GuildMasterChanged(int fd) {
// Request pet creation
void intif_parse_CreatePet(int fd) {
- pet->get_egg(RFIFOL(fd,2),RFIFOL(fd,7),RFIFOB(fd,6));
+ pet->get_egg(RFIFOL(fd,2), RFIFOW(fd,6), RFIFOL(fd,8));
}
// ACK pet data
@@ -1345,7 +1366,7 @@ void intif_parse_DeletePetOk(int fd) {
ShowError("pet data delete failure\n");
}
-// ACK changing name resquest, players,pets,hommon
+// ACK changing name request, players,pets,homun
void intif_parse_ChangeNameOk(int fd)
{
struct map_session_data *sd = NULL;
@@ -2284,7 +2305,7 @@ int intif_parse(int fd)
}
/*=====================================
-* Default Functions : intif.h
+* Default Functions : intif.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -2298,7 +2319,7 @@ void intif_defaults(void) {
-1,-1, 7, 7, 7,11, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari]
-1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
-1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
- 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
+ 12,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
-1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator]
};
diff --git a/src/map/intif.h b/src/map/intif.h
index 290dcfcdc..fe47d6537 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -2,22 +2,25 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_INTIF_H_
-#define _MAP_INTIF_H_
+#ifndef MAP_INTIF_H
+#define MAP_INTIF_H
+#include "../common/cbasetypes.h"
/**
* Declarations
**/
-struct party_member;
+struct auction_data;
struct guild_member;
struct guild_position;
-struct s_pet;
+struct guild_storage;
+struct mail_message;
+struct map_session_data;
+struct party_member;
+struct s_elemental;
struct s_homunculus;
struct s_mercenary;
-struct s_elemental;
-struct mail_message;
-struct auction_data;
+struct s_pet;
/**
* Defines
@@ -29,7 +32,7 @@ struct auction_data;
/*=====================================
-* Interface : intif.h
+* Interface : intif.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -39,7 +42,7 @@ struct intif_interface {
/* funcs */
int (*parse) (int fd);
int (*create_pet)(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id,
- short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name);
+ short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
int (*broadcast) (const char* mes, size_t len, int type);
int (*broadcast2) (const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY);
int (*main_message) (struct map_session_data* sd, const char* message);
@@ -183,4 +186,4 @@ struct intif_interface *intif;
void intif_defaults(void);
-#endif /* _MAP_INTIF_H_ */
+#endif /* MAP_INTIF_H */
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index ff28082e7..6f016697f 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -2,23 +2,25 @@
// See the LICENSE file
// Base Author: shennetsind @ http://hercules.ws
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/strlib.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/random.h"
+#define HERCULES_CORE
-#include "map.h"
-#include "pc.h"
-#include "clif.h"
#include "irc-bot.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "clif.h"
+#include "map.h"
+#include "pc.h"
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+
//#define IRCBOT_DEBUG
struct irc_bot_interface irc_bot_s;
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index c15a5d46a..0c26c3cd8 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -3,8 +3,10 @@
// Base Author: shennetsind @ http://hercules.ws
-#ifndef _MAP_IRC_BOT_H_
-#define _MAP_IRC_BOT_H_
+#ifndef MAP_IRC_BOT_H
+#define MAP_IRC_BOT_H
+
+#include "../common/cbasetypes.h"
#define IRC_NICK_LENGTH 40
#define IRC_IDENT_LENGTH 40
@@ -61,4 +63,4 @@ struct irc_bot_interface *ircbot;
void ircbot_defaults(void);
-#endif /* _MAP_IRC_BOT_H_ */
+#endif /* MAP_IRC_BOT_H */
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index bfcc6f795..61b77748a 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -2,27 +2,32 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/conf.h"
+#define HERCULES_CORE
+
+#include "../config/core.h" // DBPATH, RENEWAL
#include "itemdb.h"
-#include "map.h"
-#include "battle.h" // struct battle_config
-#include "script.h" // item script processing
-#include "pc.h" // W_MUSICAL, W_WHIP
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "battle.h" // struct battle_config
+#include "map.h"
+#include "mob.h" // MAX_MOB_DB
+#include "pc.h" // W_MUSICAL, W_WHIP
+#include "script.h" // item script processing
+#include "../common/conf.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/utils.h"
+
struct itemdb_interface itemdb_s;
/**
- * Search for item name
+ * Search for item name
* name = item alias, so we should find items aliases first. if not found then look for "jname" (full name)
* @see DBApply
*/
@@ -50,7 +55,7 @@ int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap)
}
/*==========================================
- * Return item data from item name. (lookup)
+ * Return item data from item name. (lookup)
*------------------------------------------*/
struct item_data* itemdb_searchname(const char *str) {
struct item_data* item;
@@ -251,7 +256,7 @@ void itemdb_package_item(struct map_session_data *sd, struct item_package *packa
return;
}
/*==========================================
- * Return a random item id from group. (takes into account % chance giving/tot group)
+ * Return a random item id from group. (takes into account % chance giving/tot group)
*------------------------------------------*/
int itemdb_searchrandomid(struct item_group *group) {
@@ -307,7 +312,7 @@ const char* itemdb_typename(int type)
}
/*==========================================
- * Converts the jobid from the format in itemdb
+ * Converts the jobid from the format in itemdb
* to the format used by the map server. [Skotlex]
*------------------------------------------*/
void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
@@ -465,8 +470,7 @@ int itemdb_isequip(int nameid)
/*==========================================
* Alternate version of itemdb_isequip
*------------------------------------------*/
-int itemdb_isequip2(struct item_data *data)
-{
+int itemdb_isequip2(struct item_data *data) {
nullpo_ret(data);
switch(data->type) {
case IT_WEAPON:
@@ -517,39 +521,39 @@ int itemdb_isstackable2(struct item_data *data)
* Trade Restriction functions [Skotlex]
*------------------------------------------*/
int itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) {
- return (item && (!(item->flag.trade_restriction&1) || gmlv >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NODROP) || gmlv >= item->gm_lv_trade_override));
}
int itemdb_cantrade_sub(struct item_data* item, int gmlv, int gmlv2) {
- return (item && (!(item->flag.trade_restriction&2) || gmlv >= item->gm_lv_trade_override || gmlv2 >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NOTRADE) || gmlv >= item->gm_lv_trade_override || gmlv2 >= item->gm_lv_trade_override));
}
int itemdb_canpartnertrade_sub(struct item_data* item, int gmlv, int gmlv2) {
- return (item && (item->flag.trade_restriction&4 || gmlv >= item->gm_lv_trade_override || gmlv2 >= item->gm_lv_trade_override));
+ return (item && (item->flag.trade_restriction&ITR_PARTNEROVERRIDE || gmlv >= item->gm_lv_trade_override || gmlv2 >= item->gm_lv_trade_override));
}
int itemdb_cansell_sub(struct item_data* item, int gmlv, int unused) {
- return (item && (!(item->flag.trade_restriction&8) || gmlv >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NOSELLTONPC) || gmlv >= item->gm_lv_trade_override));
}
int itemdb_cancartstore_sub(struct item_data* item, int gmlv, int unused) {
- return (item && (!(item->flag.trade_restriction&16) || gmlv >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NOCART) || gmlv >= item->gm_lv_trade_override));
}
int itemdb_canstore_sub(struct item_data* item, int gmlv, int unused) {
- return (item && (!(item->flag.trade_restriction&32) || gmlv >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NOSTORAGE) || gmlv >= item->gm_lv_trade_override));
}
int itemdb_canguildstore_sub(struct item_data* item, int gmlv, int unused) {
- return (item && (!(item->flag.trade_restriction&64) || gmlv >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NOGSTORAGE) || gmlv >= item->gm_lv_trade_override));
}
int itemdb_canmail_sub(struct item_data* item, int gmlv, int unused) {
- return (item && (!(item->flag.trade_restriction&128) || gmlv >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NOMAIL) || gmlv >= item->gm_lv_trade_override));
}
int itemdb_canauction_sub(struct item_data* item, int gmlv, int unused) {
- return (item && (!(item->flag.trade_restriction&256) || gmlv >= item->gm_lv_trade_override));
+ return (item && (!(item->flag.trade_restriction&ITR_NOAUCTION) || gmlv >= item->gm_lv_trade_override));
}
int itemdb_isrestricted(struct item* item, int gmlv, int gmlv2, int (*func)(struct item_data*, int, int))
@@ -597,39 +601,6 @@ int itemdb_isidentified2(struct item_data *data) {
}
}
-
-/*==========================================
- * Search by name for the override flags available items
- * (Give item another sprite)
- *------------------------------------------*/
-bool itemdb_read_itemavail(char* str[], int columns, int current)
-{// <nameid>,<sprite>
- int nameid, sprite;
- struct item_data *id;
-
- nameid = atoi(str[0]);
-
- if( ( id = itemdb->exists(nameid) ) == NULL )
- {
- ShowWarning("itemdb_read_itemavail: Invalid item id %d.\n", nameid);
- return false;
- }
-
- sprite = atoi(str[1]);
-
- if( sprite > 0 )
- {
- id->flag.available = 1;
- id->view_id = sprite;
- }
- else
- {
- id->flag.available = 0;
- }
-
- return true;
-}
-
void itemdb_read_groups(void) {
config_t item_group_conf;
config_setting_t *itg = NULL, *it = NULL;
@@ -818,7 +789,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
hread(&random_qty,sizeof(random_qty),1,file);
if( !(pdata = itemdb->exists(id)) )
- ShowWarning("itemdb_read_packages: unknown package item '%d', skipping..\n",id);
+ ShowWarning("itemdb_read_cached_packages: unknown package item '%d', skipping..\n",id);
else
pdata->package = &itemdb->packages[i];
@@ -848,7 +819,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
hread(&named,sizeof(announce),1,file);
if( !(data = itemdb->exists(mid)) )
- ShowWarning("itemdb_read_packages: unknown item '%d' in package '%s'!\n",mid,itemdb_name(package->id));
+ ShowWarning("itemdb_read_cached_packages: unknown item '%d' in package '%s'!\n",mid,itemdb_name(package->id));
entry->id = data ? data->nameid : 0;
entry->hours = hours;
@@ -893,7 +864,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
hread(&named,sizeof(announce),1,file);
if( !(data = itemdb->exists(mid)) )
- ShowWarning("itemdb_read_packages: unknown item '%d' in package '%s'!\n",mid,itemdb_name(package->id));
+ ShowWarning("itemdb_read_cached_packages: unknown item '%d' in package '%s'!\n",mid,itemdb_name(package->id));
entry->id = data ? data->nameid : 0;
entry->rate = rate;
@@ -932,7 +903,7 @@ void itemdb_read_packages(void) {
if( HCache->check(config_filename) ) {
if( itemdb->read_cached_packages(config_filename) )
return;
- }
+ }
if (libconfig->read_file(&item_packages_conf, config_filename)) {
ShowError("can't read %s\n", config_filename);
@@ -1119,7 +1090,7 @@ void itemdb_read_packages(void) {
for( r = 0; r < itemdb->packages[count].random_qty; r++ ) {
if( itemdb->packages[count].random_groups[r].random_qty == 1 ) {
- //item packages dont stop looping until something comes out of them, so if you have only one item in it the drop is guaranteed.
+ //item packages don't stop looping until something comes out of them, so if you have only one item in it the drop is guaranteed.
ShowWarning("itemdb_read_packages: in '%s' 'Random: %d' group has only 1 random option, drop rate will be 100%!\n",itemdb_name(itemdb->packages[count].id),r+1);
itemdb->packages[count].random_groups[r].random_list[0].rate = 10000;
}
@@ -1214,163 +1185,6 @@ void itemdb_read_chains(void) {
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename);
}
-
-/*==========================================
- * Reads item trade restrictions [Skotlex]
- *------------------------------------------*/
-bool itemdb_read_itemtrade(char* str[], int columns, int current)
-{// <nameid>,<mask>,<gm level>
- int nameid, flag, gmlv;
- struct item_data *id;
-
- nameid = atoi(str[0]);
-
- if( ( id = itemdb->exists(nameid) ) == NULL )
- {
- //ShowWarning("itemdb_read_itemtrade: Invalid item id %d.\n", nameid);
- //return false;
- // FIXME: item_trade.txt contains items, which are commented in item database.
- return true;
- }
-
- flag = atoi(str[1]);
- gmlv = atoi(str[2]);
-
- if( flag < 0 || flag > 511 ) {//Check range
- ShowWarning("itemdb_read_itemtrade: Invalid trading mask %d for item id %d.\n", flag, nameid);
- return false;
- }
- if( gmlv < 1 )
- {
- ShowWarning("itemdb_read_itemtrade: Invalid override GM level %d for item id %d.\n", gmlv, nameid);
- return false;
- }
-
- id->flag.trade_restriction = flag;
- id->gm_lv_trade_override = gmlv;
-
- return true;
-}
-
-/*==========================================
- * Reads item delay amounts [Paradox924X]
- *------------------------------------------*/
-bool itemdb_read_itemdelay(char* str[], int columns, int current)
-{// <nameid>,<delay>
- int nameid, delay;
- struct item_data *id;
-
- nameid = atoi(str[0]);
-
- if( ( id = itemdb->exists(nameid) ) == NULL )
- {
- ShowWarning("itemdb_read_itemdelay: Invalid item id %d.\n", nameid);
- return false;
- }
-
- delay = atoi(str[1]);
-
- if( delay < 0 )
- {
- ShowWarning("itemdb_read_itemdelay: Invalid delay %d for item id %d.\n", id->delay, nameid);
- return false;
- }
-
- id->delay = delay;
-
- return true;
-}
-
-/*==================================================================
- * Reads item stacking restrictions
- *----------------------------------------------------------------*/
-bool itemdb_read_stack(char* fields[], int columns, int current)
-{// <item id>,<stack limit amount>,<type>
- unsigned short nameid, amount;
- unsigned int type;
- struct item_data* id;
-
- nameid = (unsigned short)strtoul(fields[0], NULL, 10);
-
- if( ( id = itemdb->exists(nameid) ) == NULL )
- {
- ShowWarning("itemdb_read_stack: Unknown item id '%hu'.\n", nameid);
- return false;
- }
-
- if( !itemdb->isstackable2(id) )
- {
- ShowWarning("itemdb_read_stack: Item id '%hu' is not stackable.\n", nameid);
- return false;
- }
-
- amount = (unsigned short)strtoul(fields[1], NULL, 10);
- type = (unsigned int)strtoul(fields[2], NULL, 10);
-
- if( !amount )
- {// ignore
- return true;
- }
-
- id->stack.amount = amount;
- id->stack.inventory = (type&1)!=0;
- id->stack.cart = (type&2)!=0;
- id->stack.storage = (type&4)!=0;
- id->stack.guildstorage = (type&8)!=0;
-
- return true;
-}
-
-
-/// Reads items allowed to be sold in buying stores
-bool itemdb_read_buyingstore(char* fields[], int columns, int current)
-{// <nameid>
- int nameid;
- struct item_data* id;
-
- nameid = atoi(fields[0]);
-
- if( ( id = itemdb->exists(nameid) ) == NULL )
- {
- ShowWarning("itemdb_read_buyingstore: Invalid item id %d.\n", nameid);
- return false;
- }
-
- if( !itemdb->isstackable2(id) )
- {
- ShowWarning("itemdb_read_buyingstore: Non-stackable item id %d cannot be enabled for buying store.\n", nameid);
- return false;
- }
-
- id->flag.buyingstore = true;
-
- return true;
-}
-
-/*******************************************
-** Item usage restriction (item_nouse.txt)
-********************************************/
-bool itemdb_read_nouse(char* fields[], int columns, int current)
-{// <nameid>,<flag>,<override>
- int nameid, flag, override;
- struct item_data* id;
-
- nameid = atoi(fields[0]);
-
- if( ( id = itemdb->exists(nameid) ) == NULL ) {
- ShowWarning("itemdb_read_nouse: Invalid item id %d.\n", nameid);
- return false;
- }
-
- flag = atoi(fields[1]);
- override = atoi(fields[2]);
-
- id->item_usage.flag = flag;
- id->item_usage.override = override;
-
- return true;
-}
-
/**
* @return: amount of retrieved entries.
**/
@@ -1440,7 +1254,7 @@ void itemdb_read_combos() {
p++;
str[1] = p;
- p = strchr(p,',');
+ p = strchr(p,',');
p++;
if (str[1][0] != '{') {
@@ -1478,7 +1292,7 @@ void itemdb_read_combos() {
CREATE(combo, struct item_combo, 1);
combo->count = retcount;
- combo->script = script->parse(str[1], filepath, lines, 0);
+ combo->script = script->parse(str[1], filepath, lines, 0, NULL);
combo->id = itemdb->combo_count - 1;
/* populate ->nameid field */
for( v = 0; v < retcount; v++ ) {
@@ -1574,7 +1388,8 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
|| (entry->type > IT_DELAYCONSUME && entry->type < IT_CASH ) || entry->type >= IT_MAX
) {
// catch invalid item types
- ShowWarning("itemdb_validate_entry: Invalid item type %d for item %d. IT_ETC will be used.\n", entry->type, entry->nameid);
+ ShowWarning("itemdb_validate_entry: Invalid item type %d for item %d in '%s'. IT_ETC will be used.\n",
+ entry->type, entry->nameid, source);
entry->type = IT_ETC;
} else if( entry->type == IT_DELAYCONSUME ) {
//Items that are consumed only after target confirmation
@@ -1592,21 +1407,61 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
entry->value_sell = entry->value_buy / 2;
}
if( entry->value_buy/124. < entry->value_sell/75. ) {
- ShowWarning("itemdb_validate_entry: Buying/Selling [%d/%d] price of item %d (%s) allows Zeny making exploit through buying/selling at discounted/overcharged prices!\n",
- entry->value_buy, entry->value_sell, entry->nameid, entry->jname);
+ ShowWarning("itemdb_validate_entry: Buying/Selling [%d/%d] price of item %d (%s) in '%s' "
+ "allows Zeny making exploit through buying/selling at discounted/overcharged prices!\n",
+ entry->value_buy, entry->value_sell, entry->nameid, entry->jname, source);
}
if( entry->slot > MAX_SLOTS ) {
- ShowWarning("itemdb_validate_entry: Item %d (%s) specifies %d slots, but the server only supports up to %d. Using %d slots.\n",
- entry->nameid, entry->jname, entry->slot, MAX_SLOTS, MAX_SLOTS);
+ ShowWarning("itemdb_validate_entry: Item %d (%s) in '%s' specifies %d slots, but the server only supports up to %d. Using %d slots.\n",
+ entry->nameid, entry->jname, source, entry->slot, MAX_SLOTS, MAX_SLOTS);
entry->slot = MAX_SLOTS;
}
if (!entry->equip && itemdb->isequip2(entry)) {
- ShowWarning("itemdb_validate_entry: Item %d (%s) is an equipment with no equip-field! Making it an etc item.\n", entry->nameid, entry->jname);
+ ShowWarning("itemdb_validate_entry: Item %d (%s) in '%s' is an equipment with no equip-field! Making it an etc item.\n",
+ entry->nameid, entry->jname, source);
entry->type = IT_ETC;
}
+ if (entry->flag.trade_restriction < 0 || entry->flag.trade_restriction > ITR_ALL) {
+ ShowWarning("itemdb_validate_entry: Invalid trade restriction flag 0x%x for item %d (%s) in '%s', defaulting to none.\n",
+ entry->flag.trade_restriction, entry->nameid, entry->jname, source);
+ entry->flag.trade_restriction = ITR_NONE;
+ }
+
+ if (entry->gm_lv_trade_override < 0 || entry->gm_lv_trade_override > 100) {
+ ShowWarning("itemdb_validate_entry: Invalid trade-override GM level %d for item %d (%s) in '%s', defaulting to none.\n",
+ entry->gm_lv_trade_override, entry->nameid, entry->jname, source);
+ entry->gm_lv_trade_override = 0;
+ }
+ if (entry->gm_lv_trade_override == 0) {
+ // Default value if none or an ivalid one was specified
+ entry->gm_lv_trade_override = 100;
+ }
+
+ if (entry->item_usage.flag > INR_ALL) {
+ ShowWarning("itemdb_validate_entry: Invalid nouse flag 0x%x for item %d (%s) in '%s', defaulting to none.\n",
+ entry->item_usage.flag, entry->nameid, entry->jname, source);
+ entry->item_usage.flag = INR_NONE;
+ }
+
+ if (entry->item_usage.override > 100) {
+ ShowWarning("itemdb_validate_entry: Invalid nouse-override GM level %d for item %d (%s) in '%s', defaulting to none.\n",
+ entry->item_usage.override, entry->nameid, entry->jname, source);
+ entry->item_usage.override = 0;
+ }
+ if (entry->item_usage.override == 0) {
+ // Default value if none or an ivalid one was specified
+ entry->item_usage.override = 100;
+ }
+
+ if (entry->stack.amount > 0 && !itemdb->isstackable2(entry)) {
+ ShowWarning("itemdb_validate_entry: Item %d (%s) of type %d is not stackable, ignoring stack settings in '%s'.\n",
+ entry->nameid, entry->jname, entry->type, source);
+ memset(&entry->stack, '\0', sizeof(entry->stack));
+ }
+
entry->wlv = cap_value(entry->wlv, REFINE_TYPE_ARMOR, REFINE_TYPE_MAX);
if( !entry->elvmax )
@@ -1617,8 +1472,11 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
if( entry->type != IT_ARMOR && entry->type != IT_WEAPON && !entry->flag.no_refine )
entry->flag.no_refine = 1;
- entry->flag.available = 1;
- entry->view_id = 0;
+ if (entry->flag.available != 1) {
+ entry->flag.available = 1;
+ entry->view_id = 0;
+ }
+
entry->sex = itemdb->gendercheck(entry); //Apply gender filtering.
// Validated. Finally insert it
@@ -1681,6 +1539,15 @@ int itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) {
* `refineable` tinyint(1) unsigned DEFAULT NULL
* `view` smallint(3) unsigned DEFAULT NULL
* `bindonequip` tinyint(1) unsigned DEFAULT NULL
+ * `buyingstore` tinyint(1) NOT NULL DEFAULT NULL
+ * `delay` mediumint(9) NOT NULL DEFAULT NULL
+ * `trade_flag` smallint(4) NOT NULL DEFAULT NULL
+ * `trade_group` smallint(4) NOT NULL DEFAULT NULL
+ * `nouse_flag` smallint(4) NOT NULL DEFAULT NULL
+ * `nouse_group` smallint(4) NOT NULL DEFAULT NULL
+ * `stack_amount` mediumint(6) NOT NULL DEFAULT NULL
+ * `stack_flag` smallint(2) NOT NULL DEFAULT NULL
+ * `sprite` mediumint(6) NOT NULL DEFAULT NULL
* `script` text
* `equip_script` text
* `unequip_script` text
@@ -1707,9 +1574,30 @@ int itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) {
SQL->GetData(handle, 19, &data, NULL); id.flag.no_refine = data && atoi(data) ? 0 : 1;
SQL->GetData(handle, 20, &data, NULL); id.look = data ? atoi(data) : 0;
SQL->GetData(handle, 21, &data, NULL); id.flag.bindonequip = data && atoi(data) ? 1 : 0;
- SQL->GetData(handle, 22, &data, NULL); id.script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL;
- SQL->GetData(handle, 23, &data, NULL); id.equip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL;
- SQL->GetData(handle, 24, &data, NULL); id.unequip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL;
+ SQL->GetData(handle, 22, &data, NULL); id.flag.buyingstore = data && atoi(data) ? 1 : 0;
+ SQL->GetData(handle, 23, &data, NULL); id.delay = data ? atoi(data) : 0;
+ SQL->GetData(handle, 24, &data, NULL); id.flag.trade_restriction = data ? atoi(data) : ITR_NONE;
+ SQL->GetData(handle, 25, &data, NULL); id.gm_lv_trade_override = data ? atoi(data) : 0;
+ SQL->GetData(handle, 26, &data, NULL); id.item_usage.flag = data ? atoi(data) : INR_NONE;
+ SQL->GetData(handle, 27, &data, NULL); id.item_usage.override = data ? atoi(data) : 0;
+ SQL->GetData(handle, 28, &data, NULL); id.stack.amount = data ? atoi(data) : 0;
+ SQL->GetData(handle, 29, &data, NULL);
+ if (data) {
+ int stack_flag = atoi(data);
+ id.stack.inventory = (stack_flag&1)!=0;
+ id.stack.cart = (stack_flag&2)!=0;
+ id.stack.storage = (stack_flag&4)!=0;
+ id.stack.guildstorage = (stack_flag&8)!=0;
+ }
+ SQL->GetData(handle, 30, &data, NULL);
+ if (data) {
+ id.view_id = atoi(data);
+ if (id.view_id)
+ id.flag.available = 1;
+ }
+ SQL->GetData(handle, 31, &data, NULL); id.script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
+ SQL->GetData(handle, 32, &data, NULL); id.equip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
+ SQL->GetData(handle, 33, &data, NULL); id.unequip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
return itemdb->validate_entry(&id, n, source);
}
@@ -1754,10 +1642,30 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source)
* Gender: Gender
* Loc: Equip location
* WeaponLv: Weapon Level
- * EquipLv: Equip required level
+ * EquipLv: Equip required level or [min, max]
* Refine: Refineable
* View: View ID
* BindOnEquip: (true or false)
+ * BuyingStore: (true or false)
+ * Delay: Delay to use item
+ * Trade: {
+ * override: Group to override
+ * nodrop: (true or false)
+ * notrade: (true or false)
+ * partneroverride: (true or false)
+ * noselltonpc: (true or false)
+ * nocart: (true or false)
+ * nostorage: (true or false)
+ * nogstorage: (true or false)
+ * nomail: (true or false)
+ * noauction: (true or false)
+ * }
+ * Nouse: {
+ * override: Group to override
+ * sitting: (true or false)
+ * }
+ * Stack: [Stackable Amount, Stack Type]
+ * Sprite: SpriteID
* Script: <"
* Script
* (it can be multi-line)
@@ -1874,14 +1782,124 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source)
if( (t = libconfig->setting_get_member(it, "BindOnEquip")) )
id.flag.bindonequip = libconfig->setting_get_bool(t) ? 1 : 0;
+ if ( (t = libconfig->setting_get_member(it, "BuyingStore")) )
+ id.flag.buyingstore = libconfig->setting_get_bool(t) ? 1 : 0;
+
+ if (libconfig->setting_lookup_int(it, "Delay", &i32) && i32 >= 0)
+ id.delay = i32;
+
+ if ( (t = libconfig->setting_get_member(it, "Trade")) ) {
+ if (config_setting_is_group(t)) {
+ config_setting_t *tt = NULL;
+
+ if ((tt = libconfig->setting_get_member(t, "override"))) {
+ id.gm_lv_trade_override = libconfig->setting_get_int(tt);
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "nodrop"))) {
+ id.flag.trade_restriction &= ~ITR_NODROP;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NODROP;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "notrade"))) {
+ id.flag.trade_restriction &= ~ITR_NOTRADE;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NOTRADE;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "partneroverride"))) {
+ id.flag.trade_restriction &= ~ITR_PARTNEROVERRIDE;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_PARTNEROVERRIDE;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "noselltonpc"))) {
+ id.flag.trade_restriction &= ~ITR_NOSELLTONPC;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NOSELLTONPC;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "nocart"))) {
+ id.flag.trade_restriction &= ~ITR_NOCART;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NOCART;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "nostorage"))) {
+ id.flag.trade_restriction &= ~ITR_NOSTORAGE;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NOSTORAGE;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "nogstorage"))) {
+ id.flag.trade_restriction &= ~ITR_NOGSTORAGE;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NOGSTORAGE;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "nomail"))) {
+ id.flag.trade_restriction &= ~ITR_NOMAIL;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NOMAIL;
+ }
+
+ if ((tt = libconfig->setting_get_member(t, "noauction"))) {
+ id.flag.trade_restriction &= ~ITR_NOAUCTION;
+ if (libconfig->setting_get_bool(tt))
+ id.flag.trade_restriction |= ITR_NOAUCTION;
+ }
+ } else { // Fallback to int if it's not a group
+ id.flag.trade_restriction = libconfig->setting_get_int(t);
+ }
+ }
+
+ if ((t = libconfig->setting_get_member(it, "Nouse"))) {
+ if (config_setting_is_group(t)) {
+ config_setting_t *nt = NULL;
+
+ if ((nt = libconfig->setting_get_member(t, "override"))) {
+ id.item_usage.override = libconfig->setting_get_int(nt);
+ }
+
+ if ((nt = libconfig->setting_get_member(t, "sitting"))) {
+ id.item_usage.flag &= ~INR_SITTING;
+ if (libconfig->setting_get_bool(nt))
+ id.item_usage.flag |= INR_SITTING;
+ }
+
+ } else { // Fallback to int if it's not a group
+ id.item_usage.flag = libconfig->setting_get_int(t);
+ }
+ }
+
+ if ((t = libconfig->setting_get_member(it, "Stack"))) {
+ if (config_setting_is_aggregate(t) && libconfig->setting_length(t) >= 1) {
+ int stack_flag = libconfig->setting_get_int_elem(t, 1);
+ int stack_amount = libconfig->setting_get_int_elem(t, 0);
+ if (stack_amount >= 0) {
+ id.stack.amount = cap_value(stack_amount, 0, USHRT_MAX);
+ id.stack.inventory = (stack_flag&1)!=0;
+ id.stack.cart = (stack_flag&2)!=0;
+ id.stack.storage = (stack_flag&4)!=0;
+ id.stack.guildstorage = (stack_flag&8)!=0;
+ }
+ }
+ }
+
+ if (libconfig->setting_lookup_int(it, "Sprite", &i32) && i32 >= 0) {
+ id.flag.available = 1;
+ id.view_id = i32;
+ }
+
if( libconfig->setting_lookup_string(it, "Script", &str) )
- id.script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL;
+ id.script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
if( libconfig->setting_lookup_string(it, "OnEquipScript", &str) )
- id.equip_script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL;
+ id.equip_script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
if( libconfig->setting_lookup_string(it, "OnUnequipScript", &str) )
- id.unequip_script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS) : NULL;
+ id.unequip_script = *str ? script->parse(str, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
return itemdb->validate_entry(&id, n, source);
}
@@ -1943,7 +1961,10 @@ int itemdb_readdb_sql(const char *tablename) {
" `matk`, `defence`, `range`, `slots`,"
" `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`,"
" `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`,"
- " `view`, `bindonequip`, `script`, `equip_script`, `unequip_script`"
+ " `view`, `bindonequip`, `buyingstore`, `delay`,"
+ " `trade_flag`, `trade_group`, `nouse_flag`, `nouse_group`,"
+ " `stack_amount`, `stack_flag`, `sprite`, `script`,"
+ " `equip_script`, `unequip_script`"
"FROM `%s`", tablename) ) {
Sql_ShowDebug(map->mysql_handle);
return 0;
@@ -1966,44 +1987,10 @@ int itemdb_readdb_sql(const char *tablename) {
/*==========================================
* Unique item ID function
* Only one operation by once
-* Flag:
-* 0 return new id
-* 1 set new value, checked with current value
-* 2 set new value bypassing anything
-* 3/other return last value
*------------------------------------------*/
-uint64 itemdb_unique_id(int8 flag, int64 value) {
- static uint64 item_uid = 0;
-
- if(flag)
- {
- if(flag == 1)
- { if(item_uid < value)
- return (item_uid = value);
- }else if(flag == 2)
- return (item_uid = value);
-
- return item_uid;
- }
+uint64 itemdb_unique_id(struct map_session_data *sd) {
- return ++item_uid;
-}
-int itemdb_uid_load() {
- char * uid;
- if (SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT `value` FROM `%s` WHERE `varname`='unique_id'",map->interreg_db))
- Sql_ShowDebug(map->mysql_handle);
-
- if( SQL_SUCCESS != SQL->NextRow(map->mysql_handle) ) {
- ShowError("itemdb_uid_load: Unable to fetch unique_id data\n");
- SQL->FreeResult(map->mysql_handle);
- return -1;
- }
-
- SQL->GetData(map->mysql_handle, 0, &uid, NULL);
- itemdb->unique_id(1, (uint64)strtoull(uid, NULL, 10));
- SQL->FreeResult(map->mysql_handle);
-
- return 0;
+ return ((uint64)sd->status.char_id << 32) | sd->status.uniqueitem_counter++;
}
/**
@@ -2050,15 +2037,7 @@ void itemdb_read(bool minimal) {
itemdb->read_groups();
itemdb->read_chains();
itemdb->read_packages();
-
- sv->readdb(map->db_path, "item_avail.txt", ',', 2, 2, -1, itemdb->read_itemavail);
- sv->readdb(map->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, itemdb->read_itemtrade);
- sv->readdb(map->db_path, DBPATH"item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay);
- sv->readdb(map->db_path, "item_stack.txt", ',', 3, 3, -1, itemdb->read_stack);
- sv->readdb(map->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, itemdb->read_buyingstore);
- sv->readdb(map->db_path, "item_nouse.txt", ',', 3, 3, -1, itemdb->read_nouse);
-
- itemdb->uid_load();
+
}
/**
@@ -2112,9 +2091,10 @@ int itemdb_final_sub(DBKey key, DBData *data, va_list ap)
void itemdb_clear(bool total) {
int i;
// clear the previous itemdb data
- for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i )
+ for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) {
if( itemdb->array[i] )
itemdb->destroy_item_data(itemdb->array[i], 1);
+ }
for( i = 0; i < itemdb->group_count; i++ ) {
if( itemdb->groups[i].nameid )
@@ -2155,7 +2135,8 @@ void itemdb_clear(bool total) {
itemdb->package_count = 0;
for(i = 0; i < itemdb->combo_count; i++) {
- script->free_code(itemdb->combos[i]->script);
+ if( itemdb->combos[i]->script ) // Check if script was loaded
+ script->free_code(itemdb->combos[i]->script);
aFree(itemdb->combos[i]);
}
if( itemdb->combos )
@@ -2245,7 +2226,7 @@ void itemdb_name_constants(void) {
script->parser_current_file = NULL;
#endif // ENABLE_CASE_CHECK
- dbi_destroy(iter);
+ dbi_destroy(iter);
}
void do_final_itemdb(void) {
itemdb->clear(true);
@@ -2333,12 +2314,6 @@ void itemdb_defaults(void) {
itemdb->isrestricted = itemdb_isrestricted;
itemdb->isidentified = itemdb_isidentified;
itemdb->isidentified2 = itemdb_isidentified2;
- itemdb->read_itemavail = itemdb_read_itemavail;
- itemdb->read_itemtrade = itemdb_read_itemtrade;
- itemdb->read_itemdelay = itemdb_read_itemdelay;
- itemdb->read_stack = itemdb_read_stack;
- itemdb->read_buyingstore = itemdb_read_buyingstore;
- itemdb->read_nouse = itemdb_read_nouse;
itemdb->combo_split_atoi = itemdb_combo_split_atoi;
itemdb->read_combos = itemdb_read_combos;
itemdb->gendercheck = itemdb_gendercheck;
@@ -2348,7 +2323,6 @@ void itemdb_defaults(void) {
itemdb->readdb_libconfig = itemdb_readdb_libconfig;
itemdb->readdb_sql = itemdb_readdb_sql;
itemdb->unique_id = itemdb_unique_id;
- itemdb->uid_load = itemdb_uid_load;
itemdb->read = itemdb_read;
itemdb->destroy_item_data = destroy_item_data;
itemdb->final_sub = itemdb_final_sub;
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index eebcd5d4d..2ad596ce1 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -2,12 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_ITEMDB_H_
-#define _MAP_ITEMDB_H_
+#ifndef MAP_ITEMDB_H
+#define MAP_ITEMDB_H
+#include "map.h"
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
#include "../common/db.h"
#include "../common/mmo.h" // ITEM_NAME_LENGTH
-#include "map.h"
+#include "../common/sql.h"
/**
* Declarations
@@ -316,10 +319,6 @@ enum geneticist_item_list {
ITEMID_BLACK_THING_TO_THROW, // 13290
};
-enum item_nouse_list {
- NOUSE_SITTING = 0x01,
-};
-
//
enum e_chain_cache {
ECC_ORE,
@@ -338,6 +337,34 @@ enum item_class_upper {
ITEMUPPER_ALL = 0x3f, // Sum of all the above
};
+/**
+ * Item Trade restrictions
+ */
+enum ItemTradeRestrictions {
+ ITR_NONE = 0x000, ///< No restrictions
+ ITR_NODROP = 0x001, ///< Item can't be dropped
+ ITR_NOTRADE = 0x002, ///< Item can't be traded (nor vended)
+ ITR_PARTNEROVERRIDE = 0x004, ///< Wedded partner can override ITR_NOTRADE restriction
+ ITR_NOSELLTONPC = 0x008, ///< Item can't be sold to NPCs
+ ITR_NOCART = 0x010, ///< Item can't be placed in the cart
+ ITR_NOSTORAGE = 0x020, ///< Item can't be placed in the storage
+ ITR_NOGSTORAGE = 0x040, ///< Item can't be placed in the guild storage
+ ITR_NOMAIL = 0x080, ///< Item can't be attached to mail messages
+ ITR_NOAUCTION = 0x100, ///< Item can't be auctioned
+
+ ITR_ALL = 0x1ff ///< Sum of all the above values
+};
+
+/**
+ * Iten No-use restrictions
+ */
+enum ItemNouseRestrictions {
+ INR_NONE = 0x0, ///< No restrictions
+ INR_SITTING = 0x1, ///< Item can't be used while sitting
+
+ INR_ALL = 0x1 ///< Sum of all the above values
+};
+
struct item_data {
uint16 nameid;
char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
@@ -377,7 +404,7 @@ struct item_data {
unsigned available : 1;
unsigned no_refine : 1; // [celest]
unsigned delay_consume : 1; // Signifies items that are not consumed immediately upon double-click [Skotlex]
- unsigned trade_restriction : 9; //Item restrictions mask [Skotlex]
+ unsigned trade_restriction : 9; ///< Item trade restrictions mask (@see enum ItemTradeRestrictions)
unsigned autoequip: 1;
unsigned buyingstore : 1;
unsigned bindonequip : 1;
@@ -389,8 +416,8 @@ struct item_data {
unsigned int storage:1;
unsigned int guildstorage:1;
} stack;
- struct {// used by item_nouse.txt
- unsigned int flag;
+ struct {
+ unsigned int flag; ///< Item nouse restriction mask (@see enum ItemNouseRestrictions)
unsigned short override;
} item_usage;
short gm_lv_trade_override; //GM-level to override trade_restriction
@@ -562,12 +589,6 @@ struct itemdb_interface {
int (*isrestricted) (struct item *item, int gmlv, int gmlv2, int(*func)(struct item_data *, int, int));
int (*isidentified) (int nameid);
int (*isidentified2) (struct item_data *data);
- bool (*read_itemavail) (char *str[], int columns, int current);
- bool (*read_itemtrade) (char *str[], int columns, int current);
- bool (*read_itemdelay) (char *str[], int columns, int current);
- bool (*read_stack) (char *fields[], int columns, int current);
- bool (*read_buyingstore) (char *fields[], int columns, int current);
- bool (*read_nouse) (char *fields[], int columns, int current);
int (*combo_split_atoi) (char *str, int *val);
void (*read_combos) ();
int (*gendercheck) (struct item_data *id);
@@ -576,8 +597,7 @@ struct itemdb_interface {
int (*readdb_libconfig_sub) (config_setting_t *it, int n, const char *source);
int (*readdb_libconfig) (const char *filename);
int (*readdb_sql) (const char *tablename);
- uint64 (*unique_id) (int8 flag, int64 value);
- int (*uid_load) ();
+ uint64 (*unique_id) (struct map_session_data *sd);
void (*read) (bool minimal);
void (*destroy_item_data) (struct item_data *self, int free_self);
int (*final_sub) (DBKey key, DBData *data, va_list ap);
@@ -589,4 +609,4 @@ struct itemdb_interface *itemdb;
void itemdb_defaults(void);
-#endif /* _MAP_ITEMDB_H_ */
+#endif /* MAP_ITEMDB_H */
diff --git a/src/map/log.c b/src/map/log.c
index 19a98f34b..523ef1d65 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -2,22 +2,25 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/sql.h" // SQL_INNODB
-#include "../common/strlib.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "battle.h"
-#include "itemdb.h"
+#define HERCULES_CORE
+
#include "log.h"
-#include "map.h"
-#include "mob.h"
-#include "pc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "battle.h"
+#include "itemdb.h"
+#include "map.h"
+#include "mob.h"
+#include "pc.h"
+#include "../common/cbasetypes.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/sql.h" // SQL_INNODB
+#include "../common/strlib.h"
+
struct log_interface log_s;
/// obtain log type character for item/zeny logs
diff --git a/src/map/log.h b/src/map/log.h
index b2cb92c20..6ab142f87 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_LOG_H_
-#define _MAP_LOG_H_
+#ifndef MAP_LOG_H
+#define MAP_LOG_H
#include "../common/cbasetypes.h"
#include "../common/sql.h"
@@ -11,11 +11,10 @@
/**
* Declarations
**/
-struct block_list;
-struct map_session_data;
-struct mob_data;
struct item;
struct item_data;
+struct map_session_data;
+struct mob_data;
/**
* Defines
@@ -134,4 +133,4 @@ struct log_interface *logs;
void log_defaults(void);
-#endif /* _MAP_LOG_H_ */
+#endif /* MAP_LOG_H */
diff --git a/src/map/mail.c b/src/map/mail.c
index 371aa892f..7ba7d7470 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -2,19 +2,21 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
+#define HERCULES_CORE
#include "mail.h"
-#include "atcommand.h"
-#include "itemdb.h"
-#include "clif.h"
-#include "pc.h"
-#include "log.h"
#include <time.h>
#include <string.h>
+#include "atcommand.h"
+#include "clif.h"
+#include "itemdb.h"
+#include "log.h"
+#include "pc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+
struct mail_interface mail_s;
void mail_clear(struct map_session_data *sd)
diff --git a/src/map/mail.h b/src/map/mail.h
index 8df537ff3..64b0f9779 100644
--- a/src/map/mail.h
+++ b/src/map/mail.h
@@ -2,10 +2,14 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MAIL_H_
-#define _MAP_MAIL_H_
+#ifndef MAP_MAIL_H
+#define MAP_MAIL_H
-#include "../common/mmo.h"
+#include "../common/cbasetypes.h"
+
+struct item;
+struct mail_message;
+struct map_session_data;
struct mail_interface {
void (*clear) (struct map_session_data *sd);
@@ -23,4 +27,4 @@ struct mail_interface *mail;
void mail_defaults(void);
-#endif /* _MAP_MAIL_H_ */
+#endif /* MAP_MAIL_H */
diff --git a/src/map/map.c b/src/map/map.c
index a423e6973..b254b6792 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2,62 +2,66 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/core.h"
-#include "../common/timer.h"
-#include "../common/ers.h"
-#include "../common/grfio.h"
-#include "../common/malloc.h"
-#include "../common/socket.h" // WFIFO*()
-#include "../common/showmsg.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/conf.h"
-#include "../common/console.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
+#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL
#include "map.h"
-#include "path.h"
+
+#include <math.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "HPMmap.h"
+#include "atcommand.h"
+#include "battle.h"
+#include "battleground.h"
+#include "chat.h"
#include "chrif.h"
#include "clif.h"
#include "duel.h"
+#include "elemental.h"
+#include "guild.h"
+#include "homunculus.h"
+#include "instance.h"
#include "intif.h"
+#include "irc-bot.h"
+#include "itemdb.h"
+#include "log.h"
+#include "mail.h"
+#include "mapreg.h"
+#include "mercenary.h"
+#include "mob.h"
#include "npc.h"
+#include "npc.h" // npc_setcells(), npc_unsetcells()
+#include "party.h"
+#include "path.h"
#include "pc.h"
+#include "pet.h"
+#include "quest.h"
+#include "script.h"
+#include "skill.h"
#include "status.h"
-#include "mob.h"
-#include "npc.h" // npc_setcells(), npc_unsetcells()
-#include "chat.h"
-#include "itemdb.h"
#include "storage.h"
-#include "skill.h"
#include "trade.h"
-#include "party.h"
#include "unit.h"
-#include "battle.h"
-#include "battleground.h"
-#include "quest.h"
-#include "script.h"
-#include "mapreg.h"
-#include "guild.h"
-#include "pet.h"
-#include "homunculus.h"
-#include "instance.h"
-#include "mercenary.h"
-#include "elemental.h"
-#include "atcommand.h"
-#include "log.h"
-#include "mail.h"
-#include "irc-bot.h"
-#include "HPMmap.h"
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
+#include "../common/console.h"
+#include "../common/core.h"
+#include "../common/ers.h"
+#include "../common/grfio.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h" // WFIFO*()
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <math.h>
#ifndef _WIN32
#include <unistd.h>
#endif
@@ -163,31 +167,32 @@ int map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) {
return 0;
}
-/*==========================================
- * These pair of functions update the counter of how many objects
- * lie on a tile.
- *------------------------------------------*/
-void map_addblcell(struct block_list *bl) {
+/**
+ * Updates the counter (cell.cell_bl) of how many objects are on a tile.
+ * @param add Whether the counter should be increased or decreased
+ **/
+void map_update_cell_bl( struct block_list *bl, bool increase ) {
#ifdef CELL_NOSTACK
+ int pos;
+
if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs
|| bl->y < 0 || bl->y >= map->list[bl->m].ys
|| !(bl->type&BL_CHAR) )
return;
- map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl++;
-#else
- return;
-#endif
-}
-void map_delblcell(struct block_list *bl) {
-#ifdef CELL_NOSTACK
- if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs
- || bl->y < 0 || bl->y >= map->list[bl->m].ys
- || !(bl->type&BL_CHAR) )
- map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl--;
-#else
- return;
+ // When reading from mapcache the cell isn't initialized
+ // TODO: Maybe start initializing cells when they're loaded instead of
+ // having to get them here? [Panikon]
+ if( map->list[bl->m].cell == (struct mapcell *)0xdeadbeaf )
+ map->cellfromcache(&map->list[bl->m]);
+
+ pos = bl->x + bl->y*map->list[bl->m].xs;
+ if( increase )
+ map->list[bl->m].cell[pos].cell_bl++;
+ else
+ map->list[bl->m].cell[pos].cell_bl--;
#endif
+ return;
}
/*==========================================
@@ -233,7 +238,7 @@ int map_addblock(struct block_list* bl)
}
#ifdef CELL_NOSTACK
- map->addblcell(bl);
+ map->update_cell_bl(bl, true);
#endif
return 0;
@@ -250,14 +255,14 @@ int map_delblock(struct block_list* bl)
// blocklist (2ways chainlist)
if (bl->prev == NULL) {
if (bl->next != NULL) {
- // can't delete block (already at the begining of the chain)
+ // can't delete block (already at the beginning of the chain)
ShowError("map_delblock error : bl->next!=NULL\n");
}
return 0;
}
#ifdef CELL_NOSTACK
- map->delblcell(bl);
+ map->update_cell_bl(bl, false);
#endif
pos = bl->x/BLOCK_SIZE+(bl->y/BLOCK_SIZE)*map->list[bl->m].bxs;
@@ -315,13 +320,13 @@ int map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) {
if (moveblock) map->delblock(bl);
#ifdef CELL_NOSTACK
- else map->delblcell(bl);
+ else map->update_cell_bl(bl, false);
#endif
bl->x = x1;
bl->y = y1;
if (moveblock) map->addblock(bl);
#ifdef CELL_NOSTACK
- else map->addblcell(bl);
+ else map->update_cell_bl(bl, true);
#endif
if (bl->type&BL_CHAR) {
@@ -464,7 +469,7 @@ static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount,
map->freeblock_lock();
for (i = blockcount; i < map->bl_list_count && returnCount < max; i++) {
- if (map->bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion.
+ if (map->bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasn't queued for deletion.
va_list argscopy;
va_copy(argscopy, args);
returnCount += func(map->bl_list[i], argscopy);
@@ -490,7 +495,7 @@ static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount,
static int map_vforeachinmap(int (*func)(struct block_list*, va_list), int16 m, int type, va_list args) {
int i;
int returnCount = 0;
- int bsize;
+ int bsize;
va_list argscopy;
struct block_list *bl;
int blockcount = map->bl_list_count;
@@ -2033,7 +2038,7 @@ void map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...) {
}
/// Applies func to everything in the db.
-/// Stops iteratin gif func returns -1.
+/// Stops iterating gif func returns -1.
void map_vforeachregen(int (*func)(struct block_list* bl, va_list args), va_list args) {
DBIterator* iter;
struct block_list* bl;
@@ -2053,7 +2058,7 @@ void map_vforeachregen(int (*func)(struct block_list* bl, va_list args), va_list
}
/// Applies func to everything in the db.
-/// Stops iteratin gif func returns -1.
+/// Stops iterating gif func returns -1.
/// @see map_vforeachregen
void map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...) {
va_list args;
@@ -2517,8 +2522,13 @@ void map_cellfromcache(struct map_data *m) {
decode_zip(decode_buffer, &size, m->cellPos+sizeof(struct map_cache_map_info), info->len);
CREATE(m->cell, struct mapcell, size);
- for( xy = 0; xy < size; ++xy )
+ // Set cell properties
+ for( xy = 0; xy < size; ++xy ) {
m->cell[xy] = map->gat2cell(decode_buffer[xy]);
+#ifdef CELL_NOSTACK
+ m->cell[xy].cell_bl = 0;
+#endif
+ }
m->getcellp = map->getcellp;
m->setcell = map->setcell;
@@ -2846,6 +2856,7 @@ int map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) {
* [Shinryo]: Init the mapcache
*------------------------------------------*/
char *map_init_mapcache(FILE *fp) {
+ struct map_cache_main_header header;
size_t size = 0;
char *buffer;
@@ -2866,6 +2877,21 @@ char *map_init_mapcache(FILE *fp) {
// Read file into buffer..
if(fread(buffer, sizeof(char), size, fp) != size) {
ShowError("map_init_mapcache: Could not read entire mapcache file\n");
+ aFree(buffer);
+ return NULL;
+ }
+
+ rewind(fp);
+
+ // Get main header to verify if data is corrupted
+ if( fread(&header, sizeof(header), 1, fp) != 1 ) {
+ ShowError("map_init_mapcache: Error obtaining main header!\n");
+ aFree(buffer);
+ return NULL;
+ }
+ if( GetULong((unsigned char *)&(header.file_size)) != size ) {
+ ShowError("map_init_mapcache: Map cache is corrupted!\n");
+ aFree(buffer);
return NULL;
}
@@ -3273,6 +3299,9 @@ int map_readgat (struct map_data* m)
type = 3; // Cell is 0 (walkable) but under water level, set to 3 (walkable water)
m->cell[xy] = map->gat2cell(type);
+#ifdef CELL_NOSTACK
+ m->cell[xy].cell_bl = 0;
+#endif
}
aFree(gat);
@@ -3636,6 +3665,8 @@ int inter_config_read(char *cfgName) {
strcpy(map->autotrade_merchants_db, w2);
else if(strcmpi(w1,"autotrade_data_db")==0)
strcpy(map->autotrade_data_db, w2);
+ else if(strcmpi(w1,"npc_market_data_db")==0)
+ strcpy(map->npc_market_data_db, w2);
/* sql log db */
else if(strcmpi(w1,"log_db_ip")==0)
strcpy(logs->db_ip, w2);
@@ -3765,10 +3796,9 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone
CREATE(zone->capped_skills, struct map_zone_skill_damage_cap_entry *, zone->capped_skills_count);
-
for(i = 0, cursor = 0; i < main->capped_skills_count; i++, cursor++ ) {
CREATE(zone->capped_skills[cursor], struct map_zone_skill_damage_cap_entry, 1);
- memcpy(zone->capped_skills[cursor], main->disabled_commands[i], sizeof(struct map_zone_skill_damage_cap_entry));
+ memcpy(zone->capped_skills[cursor], main->capped_skills[i], sizeof(struct map_zone_skill_damage_cap_entry));
}
for(i = 0; i < other->capped_skills_count; i++, cursor++ ) {
@@ -3826,7 +3856,7 @@ void map_zone_remove(int m) {
}
}
- npc->parse_mapflag(map->list[m].name,empty,flag,params,empty,empty,empty);
+ npc->parse_mapflag(map->list[m].name,empty,flag,params,empty,empty,empty, NULL);
aFree(map->list[m].zone_mf[k]);
map->list[m].zone_mf[k] = NULL;
}
@@ -4381,7 +4411,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
}
if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
- ;/* we dont mind it, the server will take care of it next. */
+ ;/* we don't mind it, the server will take care of it next. */
} else {
int idx = map->list[m].unit_count;
@@ -4414,7 +4444,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
}
if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
- ;/* we dont mind it, the server will take care of it next. */
+ ;/* we don't mind it, the server will take care of it next. */
} else {
int idx = map->list[m].skill_count;
@@ -4558,7 +4588,7 @@ void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const
if( map->zone_mf_cache(m,flag,params) )
continue;
- npc->parse_mapflag(map->list[m].name,empty,flag,params,start,buffer,filepath);
+ npc->parse_mapflag(map->list[m].name, empty, flag, params, start, buffer, filepath, NULL);
}
}
/* used on npc load and reload to apply all "Normal" and "PK Mode" zones */
@@ -4586,7 +4616,7 @@ void map_zone_init(void) {
if( map->list[j].zone == zone ) {
if( map->zone_mf_cache(j,flag,params) )
break;
- npc->parse_mapflag(map->list[j].name,empty,flag,params,empty,empty,empty);
+ npc->parse_mapflag(map->list[j].name, empty, flag, params, empty, empty, empty, NULL);
}
}
}
@@ -4608,7 +4638,7 @@ void map_zone_init(void) {
if( map->list[j].zone == zone ) {
if( map->zone_mf_cache(j,flag,params) )
break;
- npc->parse_mapflag(map->list[j].name,empty,flag,params,empty,empty,empty);
+ npc->parse_mapflag(map->list[j].name, empty, flag, params, empty, empty, empty, NULL);
}
}
}
@@ -4771,7 +4801,7 @@ void read_map_zone_db(void) {
--h;
continue;
}
- if( !map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype) )/* we dont remove it from the three due to inheritance */
+ if( !map->zone_bl_type(libconfig->setting_get_string_elem(skills,h),&subtype) )/* we don't remove it from the three due to inheritance */
--disabled_skills_count;
}
/* all ok, process */
@@ -4809,7 +4839,7 @@ void read_map_zone_db(void) {
--h;
continue;
}
- if( !libconfig->setting_get_bool(item) )/* we dont remove it from the three due to inheritance */
+ if( !libconfig->setting_get_bool(item) )/* we don't remove it from the three due to inheritance */
--disabled_items_count;
}
/* all ok, process */
@@ -4854,7 +4884,7 @@ void read_map_zone_db(void) {
--h;
continue;
}
- if( !libconfig->setting_get_int(command) )/* we dont remove it from the three due to inheritance */
+ if( !libconfig->setting_get_int(command) )/* we don't remove it from the three due to inheritance */
--disabled_commands_count;
}
/* all ok, process */
@@ -4890,7 +4920,7 @@ void read_map_zone_db(void) {
--h;
continue;
}
- if( !map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype) )/* we dont remove it from the three due to inheritance */
+ if( !map->zone_bl_type(libconfig->setting_get_string_elem(cap,1),&subtype) )/* we don't remove it from the three due to inheritance */
--capped_skills_count;
}
/* all ok, process */
@@ -5213,8 +5243,7 @@ int cleanup_db_sub(DBKey key, DBData *data, va_list va) {
/*==========================================
* map destructor
*------------------------------------------*/
-void do_final(void)
-{
+int do_final(void) {
int i;
struct map_session_data* sd;
struct s_mapiterator* iter;
@@ -5309,6 +5338,7 @@ void do_final(void)
HPM->event(HPET_POST_FINAL);
ShowStatus("Finished.\n");
+ return map->retval;
}
int map_abort_sub(struct map_session_data* sd, va_list ap) {
@@ -5373,9 +5403,6 @@ void map_helpscreen(bool do_exit)
* Map-Server Version Screen [MC Cameri]
*------------------------------------------------------*/
void map_versionscreen(bool do_exit) {
- const char *svn = get_svn_revision();
- const char *git = get_git_hash();
- ShowInfo(CL_WHITE"Hercules version: %s" CL_RESET"\n", git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown");
ShowInfo(CL_GREEN"Website/Forum:"CL_RESET"\thttp://hercules.ws/\n");
ShowInfo(CL_GREEN"IRC Channel:"CL_RESET"\tirc://irc.rizon.net/#Hercules\n");
ShowInfo("Open "CL_WHITE"readme.txt"CL_RESET" for more information.\n");
@@ -5468,8 +5495,8 @@ void map_cp_defaults(void) {
map->cpsd->bl.y = MAP_DEFAULT_Y;
map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT);
- console->addCommand("gm:info",CPCMD_A(gm_position));
- console->addCommand("gm:use",CPCMD_A(gm_use));
+ console->input->addCommand("gm:info",CPCMD_A(gm_position));
+ console->input->addCommand("gm:use",CPCMD_A(gm_use));
#endif
}
/* Hercules Plugin Mananger */
@@ -5694,7 +5721,7 @@ int do_init(int argc, char *argv[])
char ip_str[16];
ip2str(sockt->addr_[0], ip_str);
- ShowWarning("Not all IP addresses in /conf/map-server.conf configured, autodetecting...\n");
+ ShowWarning("Not all IP addresses in /conf/map-server.conf configured, auto-detecting...\n");
if (sockt->naddr_ == 0)
ShowError("Unable to determine your IP address...\n");
@@ -5718,7 +5745,7 @@ int do_init(int argc, char *argv[])
map->id_db = idb_alloc(DB_OPT_BASE);
map->pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable map->id2sd() use. [Skotlex]
- map->mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob ai. [Skotlex]
+ map->mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob AI. [Skotlex]
map->bossid_db = idb_alloc(DB_OPT_BASE); // Used for Convex Mirror quick MVP search
map->map_db = uidb_alloc(DB_OPT_BASE);
map->nick_db = idb_alloc(DB_OPT_BASE);
@@ -5777,7 +5804,7 @@ int do_init(int argc, char *argv[])
itemdb->init(minimal);
skill->init(minimal);
if (!minimal)
- map->read_zone_db();/* read after item and skill initalization */
+ map->read_zone_db();/* read after item and skill initialization */
mob->init(minimal);
pc->init(minimal);
status->init(minimal);
@@ -5798,7 +5825,7 @@ int do_init(int argc, char *argv[])
if (scriptcheck) {
bool failed = load_extras_count > 0 ? false : true;
for (i = 0; i < load_extras_count; i++) {
- if (npc->parsesrcfile(load_extras[i], false) != 0)
+ if (npc->parsesrcfile(load_extras[i], false) != EXIT_SUCCESS)
failed = true;
}
if (failed)
@@ -5816,7 +5843,7 @@ int do_init(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
- npc->event_do_oninit(); // Init npcs (OnInit)
+ npc->event_do_oninit( false ); // Init npcs (OnInit)
npc->market_fromsql(); /* after OnInit */
if (battle_config.pk_mode)
@@ -5825,7 +5852,7 @@ int do_init(int argc, char *argv[])
Sql_HerculesUpdateCheck(map->mysql_handle);
#ifdef CONSOLE_INPUT
- console->setSQL(map->mysql_handle);
+ console->input->setSQL(map->mysql_handle);
#endif
ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port);
@@ -5843,7 +5870,7 @@ int do_init(int argc, char *argv[])
}
/*=====================================
-* Default Functions : map.h
+* Default Functions : map.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -5853,6 +5880,7 @@ void map_defaults(void) {
/* */
map->minimal = false;
map->count = 0;
+ map->retval = EXIT_SUCCESS;
sprintf(map->db_path ,"db");
sprintf(map->help_txt ,"conf/help.txt");
@@ -6107,8 +6135,7 @@ void map_defaults(void) {
map->versionscreen = map_versionscreen;
map->arg_next_value = map_arg_next_value;
- map->addblcell = map_addblcell;
- map->delblcell = map_delblcell;
+ map->update_cell_bl = map_update_cell_bl;
map->get_new_bonus_id = map_get_new_bonus_id;
diff --git a/src/map/map.h b/src/map/map.h
index c1eaeb40d..4f7f09131 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -2,21 +2,21 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MAP_H_
-#define _MAP_MAP_H_
+#ifndef MAP_MAP_H
+#define MAP_MAP_H
+#include <stdarg.h>
+
+#include "atcommand.h"
#include "../common/cbasetypes.h"
#include "../common/core.h" // CORE_ST_LAST
-#include "../common/mmo.h"
-#include "../common/mapindex.h"
#include "../common/db.h"
-#include "../config/core.h"
+#include "../common/mapindex.h"
+#include "../common/mmo.h"
#include "../common/sql.h"
-#include "atcommand.h"
-#include <stdarg.h>
+struct mob_data;
struct npc_data;
-struct item_data;
struct hChSysCh;
enum E_MAPSERVER_ST {
@@ -26,7 +26,7 @@ enum E_MAPSERVER_ST {
};
#define MAX_NPC_PER_MAP 512
-#define AREA_SIZE (battle_config.area_size)
+#define AREA_SIZE (battle->bc->area_size)
#define DAMAGELOG_SIZE 30
#define LOOTITEM_SIZE 10
#define MAX_MOBSKILL 50
@@ -36,7 +36,6 @@ enum E_MAPSERVER_ST {
#define NATURAL_HEAL_INTERVAL 500
#define MIN_FLOORITEM 2
#define MAX_FLOORITEM START_ACCOUNT_NUM
-#define MAX_LEVEL 150
#define MAX_IGNORE_LIST 20 // official is 14
#define MAX_VENDING 12
#define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo]
@@ -325,7 +324,7 @@ struct spawn_data {
unsigned int level;
struct {
unsigned int size : 2; //Holds if mob has to be tiny/large
- unsigned int ai : 4; //Special ai for summoned monsters.
+ unsigned int ai : 4; //Special AI for summoned monsters.
//0: Normal mob | 1: Standard summon, attacks mobs
//2: Alchemist Marine Sphere | 3: Alchemist Summon Flora | 4: Summon Zanzou
unsigned int dynamic : 1; //Whether this data is indexed by a map's dynamic mob list
@@ -343,7 +342,7 @@ struct flooritem_data {
struct item item_data;
};
-enum _sp {
+enum status_point_types {
SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP, // 0-7
SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT, // 8-15
SP_INT,SP_DEX,SP_LUK,SP_CLASS,SP_ZENY,SP_SEX,SP_NEXTBASEEXP,SP_NEXTJOBEXP, // 16-23
@@ -416,7 +415,7 @@ enum _sp {
SP_LAST_KNOWN,
};
-enum _look {
+enum look {
LOOK_BASE,
LOOK_HAIR,
LOOK_WEAPON,
@@ -487,7 +486,7 @@ struct mapcell {
icewall : 1;
#ifdef CELL_NOSTACK
- unsigned char cell_bl; //Holds amount of bls in this cell.
+ int cell_bl; //Holds amount of bls in this cell.
#endif
};
@@ -580,9 +579,9 @@ struct map_data {
"Algorithms in Java, Parts 1-4" 3.18, Robert Sedgewick
Map is divided into squares, called blocks (side length = BLOCK_SIZE).
For each block there is a linked list of objects in that block (block_list).
- Array provides capability to access immediately the set of objects close
+ Array provides capability to access immediately the set of objects close
to a given object.
- The linked lists provide the flexibility to store the objects without
+ The linked lists provide the flexibility to store the objects without
knowing ahead how many objects fall into each block.
*/
struct block_list **block; // Grid array of block_lists containing only non-BL_MOB objects
@@ -660,8 +659,8 @@ struct map_data {
int nocommand; //Blocks @/# commands for non-gms. [Skotlex]
/**
* Ice wall reference counter for bugreport:3574
- * - since there are a thounsand mobs out there in a lot of maps checking on,
- * - every targetting for icewall on attack path would just be a waste, so,
+ * - since there are a thousand mobs out there in a lot of maps checking on,
+ * - every targeting for icewall on attack path would just be a waste, so,
* - this counter allows icewall checking be only run when there is a actual ice wall on the map
**/
int icewall_num;
@@ -733,7 +732,7 @@ struct map_data_other_server {
/// Bitfield of flags for the iterator.
enum e_mapitflags {
MAPIT_NORMAL = 0,
- // MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold auth'ed, active players.
+ // MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold authed, active players.
};
struct s_mapiterator;
@@ -797,7 +796,7 @@ struct map_cache_map_info {
/*=====================================
-* Interface : map.h
+* Interface : map.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -805,6 +804,7 @@ struct map_interface {
/* vars */
bool minimal;
+ int retval;
int count;
int autosave_interval;
@@ -845,6 +845,7 @@ struct map_interface {
char interreg_db[32];
char autotrade_merchants_db[32];
char autotrade_data_db[32];
+ char npc_market_data_db[32];
char default_codepage[32];
@@ -1058,8 +1059,7 @@ struct map_interface {
void (*helpscreen) (bool do_exit);
void (*versionscreen) (bool do_exit);
bool (*arg_next_value) (const char *option, int i, int argc, bool must);
- void (*addblcell) (struct block_list *bl);
- void (*delblcell) (struct block_list *bl);
+ void (*update_cell_bl) (struct block_list *bl, bool increase);
int (*get_new_bonus_id) (void);
void (*add_questinfo) (int m, struct questinfo *qi);
bool (*remove_questinfo) (int m, struct npc_data *nd);
@@ -1070,4 +1070,4 @@ struct map_interface *map;
void map_defaults(void);
-#endif /* _MAP_MAP_H_ */
+#endif /* MAP_MAP_H */
diff --git a/src/map/mapreg.h b/src/map/mapreg.h
index 2aa2943a2..59d226cda 100644
--- a/src/map/mapreg.h
+++ b/src/map/mapreg.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MAPREG_H_
-#define _MAP_MAPREG_H_
+#ifndef MAP_MAPREG_H
+#define MAP_MAPREG_H
#include "script.h" // struct reg_db
#include "../common/cbasetypes.h"
@@ -50,4 +50,4 @@ struct mapreg_interface *mapreg;
void mapreg_defaults(void);
-#endif /* _MAP_MAPREG_H_ */
+#endif /* MAP_MAPREG_H */
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 61c25f24e..f026fde00 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -2,6 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "mapreg.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "map.h" // map->mysql_handle
+#include "script.h"
#include "../common/cbasetypes.h"
#include "../common/db.h"
#include "../common/ers.h"
@@ -10,11 +19,6 @@
#include "../common/sql.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "map.h" // map->mysql_handle
-#include "script.h"
-#include "mapreg.h"
-#include <stdlib.h>
-#include <string.h>
struct mapreg_interface mapreg_s;
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 495621014..80bcfdf05 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -2,42 +2,44 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/mmo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
+#define HERCULES_CORE
-#include "log.h"
-#include "clif.h"
+#include "mercenary.h"
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "atcommand.h"
+#include "battle.h"
#include "chrif.h"
+#include "clif.h"
+#include "guild.h"
#include "intif.h"
#include "itemdb.h"
+#include "log.h"
#include "map.h"
-#include "pc.h"
-#include "status.h"
-#include "skill.h"
#include "mob.h"
-#include "pet.h"
-#include "battle.h"
+#include "npc.h"
#include "party.h"
-#include "guild.h"
-#include "atcommand.h"
+#include "pc.h"
+#include "pet.h"
#include "script.h"
-#include "npc.h"
+#include "skill.h"
+#include "status.h"
#include "trade.h"
#include "unit.h"
-#include "mercenary.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct mercenary_interface mercenary_s;
@@ -501,7 +503,7 @@ void do_init_mercenary(bool minimal) {
}
/*=====================================
-* Default Functions : mercenary.h
+* Default Functions : mercenary.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index dd9266b2e..270245e96 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -1,11 +1,12 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MERCENARY_H_
-#define _MAP_MERCENARY_H_
+#ifndef MAP_MERCENARY_H
+#define MAP_MERCENARY_H
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
+#include "../common/cbasetypes.h"
// number of cells that a mercenary can walk to from it's master before being warped
#define MAX_MER_DISTANCE 15
@@ -47,7 +48,7 @@ struct mercenary_data {
};
/*=====================================
-* Interface : mercenary.h
+* Interface : mercenary.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -98,4 +99,4 @@ struct mercenary_interface *mercenary;
void mercenary_defaults(void);
-#endif /* _MAP_MERCENARY_H_ */
+#endif /* MAP_MERCENARY_H */
diff --git a/src/map/mob.c b/src/map/mob.c
index 8f12d4b1b..38ddffa37 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2,46 +2,49 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/db.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/ers.h"
-#include "../common/random.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/socket.h"
+#define HERCULES_CORE
-#include "map.h"
-#include "path.h"
-#include "clif.h"
-#include "intif.h"
-#include "pc.h"
-#include "pet.h"
-#include "status.h"
+#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP
#include "mob.h"
-#include "homunculus.h"
-#include "mercenary.h"
+
+#include <math.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "atcommand.h"
+#include "battle.h"
+#include "clif.h"
+#include "date.h"
#include "elemental.h"
#include "guild.h"
+#include "homunculus.h"
+#include "intif.h"
#include "itemdb.h"
-#include "skill.h"
-#include "battle.h"
-#include "party.h"
-#include "npc.h"
#include "log.h"
-#include "script.h"
-#include "atcommand.h"
-#include "date.h"
+#include "map.h"
+#include "mercenary.h"
+#include "npc.h"
+#include "party.h"
+#include "path.h"
+#include "pc.h"
+#include "pet.h"
#include "quest.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <math.h>
+#include "script.h"
+#include "skill.h"
+#include "status.h"
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct mob_interface mob_s;
@@ -353,7 +356,7 @@ bool mob_ksprotected(struct block_list *src, struct block_list *target) {
return false; // KS Protection Disabled
if( !(md = BL_CAST(BL_MOB,target)) )
- return false; // Tarjet is not MOB
+ return false; // Target is not MOB
if( (s_bl = battle->get_master(src)) == NULL )
s_bl = src;
@@ -484,20 +487,17 @@ int mob_once_spawn(struct map_session_data* sd, int16 m, int16 x, int16 y, const
if (!md)
continue;
- if (class_ == MOBID_EMPERIUM && !no_guardian_data) {
+ if ( class_ == MOBID_EMPERIUM && !no_guardian_data ) {
struct guild_castle* gc = guild->mapindex2gc(map_id2index(m));
struct guild* g = (gc) ? guild->search(gc->guild_id) : NULL;
- if (gc) {
+ if( gc ) {
md->guardian_data = (struct guardian_data*)aCalloc(1, sizeof(struct guardian_data));
md->guardian_data->castle = gc;
md->guardian_data->number = MAX_GUARDIANS;
- md->guardian_data->guild_id = gc->guild_id;
- if (g) {
- md->guardian_data->emblem_id = g->emblem_id;
- memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH);
- }
- else if (gc->guild_id) //Guild not yet available, retry in 5.
- timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id);
+ if( g )
+ md->guardian_data->g = g;
+ else if( gc->guild_id ) //Guild not yet available, retry in 5.
+ timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,gc->guild_id);
}
} // end addition [Valaris]
@@ -567,21 +567,23 @@ int mob_once_spawn_area(struct map_session_data* sd, int16 m, int16 x0, int16 y0
return id; // id of last spawned mob
}
-/*==========================================
- * Set a Guardian's guild data [Skotlex]
- *------------------------------------------*/
+
+/**
+ * Sets a guardian's guild data and liberates castle if couldn't retrieve guild data
+ * @param data (int)guild_id
+ * @retval Always 0
+ * @author Skotlex
+ **/
int mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) {
- //Needed because the guild_data may not be available at guardian spawn time.
+ //Needed because the guild data may not be available at guardian spawn time.
struct block_list* bl = map->id2bl(id);
struct mob_data* md;
struct guild* g;
- int guardup_lv;
- if (bl == NULL) //It is possible mob was already removed from map when the castle has no owner. [Skotlex]
+ if( bl == NULL ) //It is possible mob was already removed from map when the castle has no owner. [Skotlex]
return 0;
- if (bl->type != BL_MOB)
- {
+ if( bl->type != BL_MOB ) {
ShowError("mob_spawn_guardian_sub: Block error!\n");
return 0;
}
@@ -590,30 +592,28 @@ int mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) {
nullpo_ret(md->guardian_data);
g = guild->search((int)data);
- if (g == NULL)
- { //Liberate castle, if the guild is not found this is an error! [Skotlex]
+ if( g == NULL ) { //Liberate castle, if the guild is not found this is an error! [Skotlex]
ShowError("mob_spawn_guardian_sub: Couldn't load guild %d!\n", (int)data);
- if (md->class_ == MOBID_EMPERIUM && md->guardian_data)
- { //Not sure this is the best way, but otherwise we'd be invoking this for ALL guardians spawned later on.
- md->guardian_data->guild_id = 0;
- if (md->guardian_data->castle->guild_id) //Free castle up.
- {
+ //Not sure this is the best way, but otherwise we'd be invoking this for ALL guardians spawned later on.
+ if( md->class_ == MOBID_EMPERIUM && md->guardian_data ) {
+ md->guardian_data->g = NULL;
+ if( md->guardian_data->castle->guild_id ) {//Free castle up.
ShowNotice("Clearing ownership of castle %d (%s)\n", md->guardian_data->castle->castle_id, md->guardian_data->castle->castle_name);
guild->castledatasave(md->guardian_data->castle->castle_id, 1, 0);
}
} else {
- if (md->guardian_data && md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS && md->guardian_data->castle->guardian[md->guardian_data->number].visible)
+ if( md->guardian_data && md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS
+ && md->guardian_data->castle->guardian[md->guardian_data->number].visible )
guild->castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
- unit->free(&md->bl,CLR_OUTSIGHT); //Remove guardian.
+
+ unit->free(&md->bl,CLR_OUTSIGHT); // Remove guardian.
}
return 0;
}
- guardup_lv = guild->checkskill(g,GD_GUARDUP);
- md->guardian_data->emblem_id = g->emblem_id;
- memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH);
- md->guardian_data->guardup_lv = guardup_lv;
- if( guardup_lv )
- status_calc_mob(md, SCO_NONE); //Give bonuses.
+
+ if( guild->checkskill(g,GD_GUARDUP) )
+ status_calc_mob(md, SCO_NONE); // Give bonuses.
+
return 0;
}
@@ -689,7 +689,6 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
md = mob->spawn_dataset(&data);
md->guardian_data = (struct guardian_data*)aCalloc(1, sizeof(struct guardian_data));
md->guardian_data->number = guardian;
- md->guardian_data->guild_id = gc->guild_id;
md->guardian_data->castle = gc;
if( has_index )
{// permanent guardian
@@ -706,13 +705,10 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
}
gc->temp_guardians[i] = md->bl.id;
}
- if (g)
- {
- md->guardian_data->emblem_id = g->emblem_id;
- memcpy (md->guardian_data->guild_name, g->name, NAME_LENGTH);
- md->guardian_data->guardup_lv = guild->checkskill(g,GD_GUARDUP);
- } else if (md->guardian_data->guild_id)
- timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id);
+ if( g )
+ md->guardian_data->g = g;
+ else if( gc->guild_id )
+ timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,gc->guild_id);
mob->spawn(md);
return md->bl.id;
@@ -1070,7 +1066,7 @@ int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
default:
if (battle_config.hom_setting&0x4 &&
(*target) && (*target)->type == BL_HOM && bl->type != BL_HOM)
- return 0; //For some reason Homun targets are never overriden.
+ return 0; //For some reason Homun targets are never overridden.
dist = distance_bl(&md->bl, bl);
if(
@@ -1440,7 +1436,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
//Unlock current target.
if (mob->warpchase(md, tbl))
return true; //Chasing this target.
- mob->unlocktarget(md, tick-(battle_config.mob_ai&0x8?3000:0)); //Imediately do random walk.
+ mob->unlocktarget(md, tick-(battle_config.mob_ai&0x8?3000:0)); //Immediately do random walk.
tbl = NULL;
}
}
@@ -1617,7 +1613,19 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
if(tbl->type == BL_PC)
mob->log_damage(md, tbl, 0); //Log interaction (counts as 'attacker' for the exp bonus)
- unit->attack(&md->bl,tbl->id,1);
+
+ if(!(mode&MD_RANDOMTARGET))
+ unit->attack(&md->bl,tbl->id,1);
+ else { // Attack once and find new random target
+ int search_size = (view_range < md->status.rhw.range) ? view_range : md->status.rhw.range;
+ unit->attack(&md->bl,tbl->id,0);
+ tbl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md), search_size);
+ // If no target was found, keep atacking the old one
+ if( tbl ) {
+ md->target_id = tbl->id;
+ md->min_chase = md->db->range3;
+ }
+ }
return true;
}
@@ -2072,7 +2080,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
unsigned int base_exp,job_exp;
} pt[DAMAGELOG_SIZE];
int i, temp, count, m = md->bl.m, pnum = 0;
- int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are elligible for exp distribution
+ int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are eligible for exp distribution
unsigned int mvp_damage;
int64 tick = timer->gettick();
bool rebirth, homkillonly;
@@ -2290,7 +2298,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
int drop_modifier = mvp_sd ? pc->level_penalty_mod( md->level - mvp_sd->status.base_level, md->status.race, md->status.mode, 2) :
second_sd ? pc->level_penalty_mod( md->level - second_sd->status.base_level, md->status.race, md->status.mode, 2):
third_sd ? pc->level_penalty_mod( md->level - third_sd->status.base_level, md->status.race, md->status.mode, 2) :
- 100;/* no player was attached, we dont use any modifier (100 = rates are not touched) */
+ 100;/* no player was attached, we don't use any modifier (100 = rates are not touched) */
#endif
dlist->m = md->bl.m;
dlist->x = md->bl.x;
@@ -2601,7 +2609,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
if( !rebirth ) {
if( pcdb_checkid(md->vd->class_) ) {//Player mobs are not removed automatically by the client.
- /* first we set them dead, then we delay the outsight effect */
+ /* first we set them dead, then we delay the out sight effect */
clif->clearunit_area(&md->bl,CLR_DEAD);
clif->clearunit_delayed(&md->bl, CLR_OUTSIGHT,tick+3000);
} else
@@ -2654,14 +2662,11 @@ int mob_guardian_guildchange(struct mob_data *md)
if (!md->guardian_data)
return 0;
- if (md->guardian_data->castle->guild_id == 0)
+ if( md->guardian_data->castle->guild_id == 0 )
{ //Castle with no owner? Delete the guardians.
- if (md->class_ == MOBID_EMPERIUM)
- { //But don't delete the emperium, just clear it's guild-data
- md->guardian_data->guild_id = 0;
- md->guardian_data->emblem_id = 0;
- md->guardian_data->guild_name[0] = '\0';
- } else {
+ if( md->class_ == MOBID_EMPERIUM ) //But don't delete the emperium, just clear it's guild-data
+ md->guardian_data->g = NULL;
+ else {
if (md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS && md->guardian_data->castle->guardian[md->guardian_data->number].visible)
guild->castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number, 0);
unit->free(&md->bl,CLR_OUTSIGHT); //Remove guardian.
@@ -2670,19 +2675,16 @@ int mob_guardian_guildchange(struct mob_data *md)
}
g = guild->search(md->guardian_data->castle->guild_id);
- if (g == NULL)
+ if( g == NULL )
{ //Properly remove guardian info from Castle data.
- ShowError("mob_guardian_guildchange: New Guild (id %d) does not exists!\n", md->guardian_data->guild_id);
+ ShowError("mob_guardian_guildchange: New Guild (id %d) does not exists!\n", md->guardian_data->castle->guild_id);
if (md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS)
guild->castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number, 0);
unit->free(&md->bl,CLR_OUTSIGHT);
return 0;
}
- md->guardian_data->guild_id = g->guild_id;
- md->guardian_data->emblem_id = g->emblem_id;
- md->guardian_data->guardup_lv = guild->checkskill(g,GD_GUARDUP);
- memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH);
+ md->guardian_data->g = g;
return 1;
}
@@ -2830,7 +2832,7 @@ int mob_warpslave(struct block_list *bl, int range) {
}
/*==========================================
- * Counts slave sub, curently checking if mob master is the given ID.
+ * Counts slave sub, currently checking if mob master is the given ID.
*------------------------------------------*/
int mob_countslave_sub(struct block_list *bl,va_list ap)
{
@@ -3070,6 +3072,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) {
struct block_list *bl;
struct mob_data *fmd = NULL;
int i,j,n;
+ short skill_target;
nullpo_ret(md);
nullpo_ret(ms = md->db->skill);
@@ -3168,10 +3171,12 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) {
if (!flag)
continue; //Skill requisite failed to be fulfilled.
+
//Execute skill
+ skill_target = (md->db->status.mode&MD_RANDOMTARGET)? MST_RANDOM : ms[i].target;
if (skill->get_casttype(ms[i].skill_id) == CAST_GROUND) {//Ground skill.
short x, y;
- switch (ms[i].target) {
+ switch (skill_target) {
case MST_RANDOM: //Pick a random enemy within skill range.
bl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md),
skill->get_range2(&md->bl, ms[i].skill_id, ms[i].skill_lv));
@@ -3201,10 +3206,10 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) {
x = bl->x;
y = bl->y;
// Look for an area to cast the spell around...
- if (ms[i].target >= MST_AROUND1 || ms[i].target >= MST_AROUND5) {
- j = ms[i].target >= MST_AROUND1?
- (ms[i].target-MST_AROUND1) +1:
- (ms[i].target-MST_AROUND5) +1;
+ if (skill_target >= MST_AROUND1 || skill_target >= MST_AROUND5) {
+ j = skill_target >= MST_AROUND1?
+ (skill_target-MST_AROUND1) +1:
+ (skill_target-MST_AROUND5) +1;
map->search_freecell(&md->bl, md->bl.m, &x, &y, j, j, 3);
}
md->skill_idx = i;
@@ -3216,8 +3221,8 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) {
continue;
}
} else {
- //Targetted skill
- switch (ms[i].target) {
+ //Targeted skill
+ switch (skill_target) {
case MST_RANDOM: //Pick a random enemy within skill range.
bl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md),
skill->get_range2(&md->bl, ms[i].skill_id, ms[i].skill_lv));
@@ -3320,7 +3325,7 @@ int mob_is_clone(int class_)
}
//Flag values:
-//&1: Set special ai (fight mobs, not players)
+//&1: Set special AI (fight mobs, not players)
//If mode is not passed, a default aggressive mode is used.
//If master_id is passed, clone is attached to him.
//Returns: ID of newly crafted copy.
@@ -3606,7 +3611,7 @@ unsigned int mob_drop_adjust(int baserate, int rate_adjust, unsigned short rate_
}
/**
- * Check if global item drop rate is overriden for given item
+ * Check if global item drop rate is overridden for given item
* in db/mob_item_ratio.txt
* @param nameid ID of the item
* @param mob_id ID of the monster
@@ -3758,7 +3763,7 @@ bool mob_parse_dbrow(char** str) {
status->calc_misc(&data.bl, mstatus, db->lv);
// MVP EXP Bonus: MEXP
- // Some new MVP's MEXP multipled by high exp-rate cause overflow. [LuzZza]
+ // Some new MVP's MEXP multiple by high exp-rate cause overflow. [LuzZza]
exp = (double)atoi(str[30]) * (double)battle_config.mvp_exp_rate / 100.;
db->mexp = (unsigned int)cap_value(exp, 0, UINT_MAX);
@@ -3820,7 +3825,7 @@ bool mob_parse_dbrow(char** str) {
ratemax = battle_config.item_drop_treasure_max;
}
else switch (type)
- { // Added suport to restrict normal drops of MVP's [Reddozen]
+ { // Added support to restrict normal drops of MVP's [Reddozen]
case IT_HEALING:
rate_adjust = (mstatus->mode&MD_BOSS) ? battle_config.item_rate_heal_boss : battle_config.item_rate_heal;
ratemin = battle_config.item_drop_heal_min;
@@ -3877,7 +3882,7 @@ bool mob_parse_dbrow(char** str) {
mob->db_data[class_] = (struct mob_db*)aMalloc(sizeof(struct mob_db));
else
//Copy over spawn data
- memcpy(&db->spawn, mob->db_data[class_]->spawn, sizeof(db->spawn));
+ memcpy(&db->spawn, mob->db_data[class_]->spawn, sizeof(db->spawn));
memcpy(mob->db_data[class_], db, sizeof(struct mob_db));
return true;
diff --git a/src/map/mob.h b/src/map/mob.h
index 80175b1db..c8d43dbb2 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -2,19 +2,18 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MOB_H_
-#define _MAP_MOB_H_
+#ifndef MAP_MOB_H
+#define MAP_MOB_H
-#include "../common/mmo.h" // struct item
-#include "guild.h" // struct guardian_data
#include "map.h" // struct status_data, struct view_data, struct mob_skill
-#include "status.h" // struct status data, struct status_change
-#include "unit.h" // unit_stop_walking(), unit_stop_attack()
-#include "npc.h"
+#include "status.h" // struct status_data, struct status_change
+#include "unit.h" // struct unit_data
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h" // struct item
#define MAX_RANDOMMONSTER 5
-// Change this to increase the table size in your mob_db to accomodate a larger mob database.
+// Change this to increase the table size in your mob_db to accommodate a larger mob database.
// Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes.
// Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000
#define MAX_MOB_DB 4000
@@ -36,7 +35,7 @@
#define MOB_CLONE_START (MAX_MOB_DB-999)
#define MOB_CLONE_END MAX_MOB_DB
-//Used to determine default enemy type of mobs (for use in eachinrange calls)
+//Used to determine default enemy type of mobs (for use in each in range calls)
#define DEFAULT_ENEMY_TYPE(md) ((md)->special_state.ai?BL_CHAR:BL_MOB|BL_PC|BL_HOM|BL_MER)
#define MAX_MOB_CHAT 250 //Max Skill's messages
@@ -128,7 +127,7 @@ struct mob_data {
char name[NAME_LENGTH];
struct {
unsigned int size : 2; //Small/Big monsters.
- unsigned int ai : 4; //Special ai for summoned monsters.
+ unsigned int ai : 4; //Special AI for summoned monsters.
//0: Normal mob.
//1: Standard summon, attacks mobs.
//2: Alchemist Marine Sphere
@@ -364,4 +363,4 @@ struct mob_interface *mob;
void mob_defaults(void);
-#endif /* _MAP_MOB_H_ */
+#endif /* MAP_MOB_H */
diff --git a/src/map/npc.c b/src/map/npc.c
index ae374e961..417aa6c61 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2,41 +2,44 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/ers.h"
-#include "../common/db.h"
-#include "../common/socket.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
-#include "map.h"
-#include "log.h"
+#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL
+#include "npc.h"
+
+#include <errno.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "battle.h"
+#include "chat.h"
#include "clif.h"
+#include "instance.h"
#include "intif.h"
-#include "pc.h"
-#include "status.h"
#include "itemdb.h"
-#include "script.h"
+#include "log.h"
+#include "map.h"
#include "mob.h"
+#include "pc.h"
#include "pet.h"
-#include "instance.h"
-#include "battle.h"
+#include "script.h"
#include "skill.h"
+#include "status.h"
#include "unit.h"
-#include "npc.h"
-#include "chat.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
-#include <errno.h>
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct npc_interface npc_s;
@@ -447,14 +450,17 @@ int npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) {
return c;
}
-/*==========================================
- * OnInit Event execution (the start of the event and watch)
- *------------------------------------------*/
-void npc_event_do_oninit(void)
+/**
+ * OnInit event execution (the start of the event and watch)
+ * @param reload Is the server reloading?
+ **/
+void npc_event_do_oninit( bool reload )
{
ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs."CL_CLL"\n", npc->event_doall("OnInit"));
- timer->add_interval(timer->gettick()+100,npc->event_do_clock,0,0,1000);
+ // This interval has already been added on startup
+ if( !reload )
+ timer->add_interval(timer->gettick()+100,npc->event_do_clock,0,0,1000);
}
/*==========================================
@@ -660,7 +666,7 @@ void npc_timerevent_quit(struct map_session_data* sd)
struct npc_data* nd;
struct timer_event_data *ted;
- // Check timer existance
+ // Check timer existence
if( sd->npc_timer_id == INVALID_TIMER )
return;
if( !(td = timer->get(sd->npc_timer_id)) )
@@ -1148,10 +1154,10 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
// This usually happens when the player clicked on a NPC that has the view id
// of a mob, to activate this kind of npc it's needed to be in a 2,2 range
- // from it. If the OnTouch area of a npc, coincides with the 2,2 range of
+ // from it. If the OnTouch area of a npc, coincides with the 2,2 range of
// another it's expected that the OnTouch event be put first in stack, because
// unit_walktoxy_timer is executed before any other function in this case.
- // So it's best practice to put an 'end;' before OnTouch events in npcs that
+ // So it's best practice to put an 'end;' before OnTouch events in npcs that
// have view ids of mobs to avoid this "issue" [Panikon]
if (sd->npc_id != 0) {
// The player clicked a npc after entering an OnTouch area
@@ -1295,23 +1301,23 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
unsigned short shop_size = 0;
if( sd->state.trading )
- return 4;
+ return ERROR_TYPE_EXCHANGE;
if( count <= 0 )
- return 5;
+ return ERROR_TYPE_ITEM_ID;
if( points < 0 )
- return 6;
+ return ERROR_TYPE_MONEY;
if( !(nd = (struct npc_data *)map->id2bl(sd->npc_shopid)) )
- return 1;
+ return ERROR_TYPE_NPC;
if( nd->subtype != CASHSHOP ) {
if( nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET ) {
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
} else
- return 1;
+ return ERROR_TYPE_NPC;
} else {
shop = nd->u.shop.shop_item;
shop_size = nd->u.shop.count;
@@ -1327,14 +1333,14 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
amount = item_list[i*2+0];
if( !itemdb->exists(nameid) || amount <= 0 )
- return 5;
+ return ERROR_TYPE_ITEM_ID;
ARR_FIND(0,shop_size,j,shop[j].nameid == nameid);
if( j == shop_size || shop[j].value <= 0 )
- return 5;
+ return ERROR_TYPE_ITEM_ID;
if( !itemdb->isstackable(nameid) && amount > 1 ) {
- ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n",
+ ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n",
sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid);
amount = item_list[i*2+0] = 1;
}
@@ -1344,7 +1350,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
new_++;
break;
case ADDITEM_OVERAMOUNT:
- return 3;
+ return ERROR_TYPE_INVENTORY_WEIGHT;
}
vt += shop[j].value * amount;
@@ -1352,20 +1358,20 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
}
if( w + sd->weight > sd->max_weight )
- return 3;
+ return ERROR_TYPE_INVENTORY_WEIGHT;
if( pc->inventoryblank(sd) < new_ )
- return 3;
+ return ERROR_TYPE_INVENTORY_WEIGHT;
if( points > vt ) points = vt;
// Payment Process ----------------------------------------------------
if( nd->subtype == SCRIPT && nd->u.scr.shop->type == NST_CUSTOM ) {
if( !npc->trader_pay(nd,sd,vt,points) )
- return 6;
+ return ERROR_TYPE_MONEY;
} else {
if( sd->kafraPoints < points || sd->cashPoints < (vt - points) )
- return 6;
+ return ERROR_TYPE_MONEY;
pc->paycash(sd,vt,points);
}
// Delivery Process ----------------------------------------------------
@@ -1384,7 +1390,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
}
}
- return 0;
+ return ERROR_TYPE_NONE;
}
//npc_buylist for script-controlled shops.
@@ -1420,8 +1426,7 @@ void npc_market_fromsql(void) {
int itemid;
int amount;
- /* TODO inter-server.conf npc_market_data */
- if ( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemid`, `amount` FROM `npc_market_data`")
+ if ( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemid`, `amount` FROM `%s`", map->npc_market_data_db)
|| SQL_ERROR == SQL->StmtExecute(stmt)
) {
SqlStmt_ShowDebug(stmt);
@@ -1468,20 +1473,20 @@ void npc_market_fromsql(void) {
* Saves persistent NPC Market Data into SQL
**/
void npc_market_tosql(struct npc_data *nd, unsigned short index) {
- /* TODO inter-server.conf npc_market_data */
- if( SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `npc_market_data` VALUES ('%s','%d','%d')", nd->exname, nd->u.scr.shop->item[index].nameid, nd->u.scr.shop->item[index].qty) )
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s','%d','%d')",
+ map->npc_market_data_db, nd->exname, nd->u.scr.shop->item[index].nameid, nd->u.scr.shop->item[index].qty) )
Sql_ShowDebug(map->mysql_handle);
}
/**
* Removes persistent NPC Market Data from SQL
*/
void npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
- /* TODO inter-server.conf npc_market_data */
if( index == USHRT_MAX ) {
- if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `npc_market_data` WHERE `name`='%s'", npcname) )
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `name`='%s'", map->npc_market_data_db, npcname) )
Sql_ShowDebug(map->mysql_handle);
} else {
- if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `npc_market_data` WHERE `name`='%s' AND `itemid`='%d' LIMIT 1", npcname, index) )
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `name`='%s' AND `itemid`='%d' LIMIT 1",
+ map->npc_market_data_db, npcname, index) )
Sql_ShowDebug(map->mysql_handle);
}
}
@@ -1514,7 +1519,7 @@ bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd) {
/* nothing to display, no items available */
if( i == nd->u.scr.shop->items ) {
- clif->colormes(sd->fd,COLOR_RED,"Shop is out of stock! Come again later!");/* TODO messages.conf-it */
+ clif->colormes(sd->fd,COLOR_RED, msg_txt(881));
return false;
}
@@ -1628,26 +1633,26 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
unsigned short shop_size = 0;
if( amount <= 0 )
- return 5;
+ return ERROR_TYPE_ITEM_ID;
if( points < 0 )
- return 6;
+ return ERROR_TYPE_MONEY;
if( sd->state.trading )
- return 4;
+ return ERROR_TYPE_EXCHANGE;
if( !(nd = (struct npc_data *)map->id2bl(sd->npc_shopid)) )
- return 1;
+ return ERROR_TYPE_NPC;
if( (item = itemdb->exists(nameid)) == NULL )
- return 5; // Invalid Item
+ return ERROR_TYPE_ITEM_ID; // Invalid Item
if( nd->subtype != CASHSHOP ) {
if( nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET ) {
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
} else
- return 1;
+ return ERROR_TYPE_NPC;
} else {
shop = nd->u.shop.shop_item;
shop_size = nd->u.shop.count;
@@ -1656,13 +1661,13 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
ARR_FIND(0, shop_size, i, shop[i].nameid == nameid);
if( i == shop_size )
- return 5;
+ return ERROR_TYPE_ITEM_ID;
if( shop[i].value <= 0 )
- return 5;
+ return ERROR_TYPE_ITEM_ID;
if(!itemdb->isstackable(nameid) && amount > 1) {
- ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n",
+ ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n",
sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid);
amount = 1;
}
@@ -1670,15 +1675,15 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
switch( pc->checkadditem(sd, nameid, amount) ) {
case ADDITEM_NEW:
if( pc->inventoryblank(sd) == 0 )
- return 3;
+ return ERROR_TYPE_INVENTORY_WEIGHT;
break;
case ADDITEM_OVERAMOUNT:
- return 3;
+ return ERROR_TYPE_INVENTORY_WEIGHT;
}
w = item->weight * amount;
if( w + sd->weight > sd->max_weight )
- return 3;
+ return ERROR_TYPE_INVENTORY_WEIGHT;
if( (double)shop[i].value * amount > INT_MAX ) {
ShowWarning("npc_cashshop_buy: Item '%s' (%d) price overflow attempt!\n", item->name, nameid);
@@ -1686,7 +1691,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
nd->exname, map->list[nd->bl.m].name, nd->bl.x, nd->bl.y,
sd->status.name, sd->status.account_id, sd->status.char_id,
shop[i].value, amount);
- return 5;
+ return ERROR_TYPE_ITEM_ID;
}
price = shop[i].value * amount;
@@ -1696,10 +1701,10 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
if( nd->subtype == SCRIPT && nd->u.scr.shop->type == NST_CUSTOM ) {
if( !npc->trader_pay(nd,sd,price,points) )
- return 6;
+ return ERROR_TYPE_MONEY;
} else {
if( (sd->kafraPoints < points) || (sd->cashPoints < price - points) )
- return 6;
+ return ERROR_TYPE_MONEY;
pc->paycash(sd, price, points);
}
@@ -1713,7 +1718,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
pc->additem(sd,&item_tmp, amount, LOG_TYPE_NPC);
}
- return 0;
+ return ERROR_TYPE_NONE;
}
/// Player item purchase from npc shop.
@@ -1770,7 +1775,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) {
if( !itemdb->isstackable(nameid) && amount > 1 ) {
//Exploit? You can't buy more than 1 of equipment types o.O
- ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n",
+ ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n",
sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid);
amount = item_list[i*2+0] = 1;
}
@@ -1893,7 +1898,7 @@ int npc_market_buylist(struct map_session_data* sd, unsigned short list_size, st
if( !itemdb->isstackable(nameid) && amount > 1 ) {
//Exploit? You can't buy more than 1 of equipment types o.O
- ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n",
+ ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n",
sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid);
amount = p->list[i].qty = 1;
}
@@ -2532,8 +2537,7 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short
}
/// Parses a warp npc.
-const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath)
-{
+const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
int x, y, xs, ys, to_x, to_y, m;
unsigned short i;
char mapname[32], to_mapname[32];
@@ -2542,22 +2546,24 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
// w1=<from map name>,<fromX>,<fromY>,<facing>
// w4=<spanx>,<spany>,<to map name>,<toX>,<toY>
if( sscanf(w1, "%31[^,],%d,%d", mapname, &x, &y) != 3
- || sscanf(w4, "%d,%d,%31[^,],%d,%d", &xs, &ys, to_mapname, &to_x, &to_y) != 5 )
- {
+ || sscanf(w4, "%d,%d,%31[^,],%d,%d", &xs, &ys, to_mapname, &to_x, &to_y) != 5
+ ) {
ShowError("npc_parse_warp: Invalid warp definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
m = map->mapname2mapid(mapname);
i = mapindex->name2id(to_mapname);
- if( i == 0 )
- {
+ if( i == 0 ) {
ShowError("npc_parse_warp: Unknown destination map in file '%s', line '%d' : %s\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), to_mapname, w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
if( m != -1 && ( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) ) {
ShowError("npc_parse_warp: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", map->list[m].name, x, y, map->list[m].xs, map->list[m].ys,filepath,strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');;//try next
}
@@ -2596,26 +2602,35 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
return strchr(start,'\n');// continue
}
-/// Parses a shop/cashshop npc.
-const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath)
-{
+/**
+ * Parses a SHOP/CASHSHOP npc
+ * @param retval Pointer to the status, used to know whether there was an error or not, if so it will be EXIT_FAILURE
+ * @retval Parsing position (currently only '\n')
+ **/
+const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
//TODO: could be rewritten to NOT need this temp array [ultramage]
- #define MAX_SHOPITEM 100
- struct npc_item_list items[MAX_SHOPITEM];
+ // We could use nd->u.shop.shop_item to store directly the items, but this could lead
+ // to unecessary memory usage by the server, using a temp dynamic array is the
+ // best way to do this without having to do multiple reallocs [Panikon]
+ struct npc_item_list *items = NULL;
+ size_t items_count = 40; // Starting items size
+
char *p;
int x, y, dir, m, i;
struct npc_data *nd;
enum npc_subtype type;
- if( strcmp(w1,"-") == 0 ) {// 'floating' shop?
+ if( strcmp(w1,"-") == 0 ) {
+ // 'floating' shop
x = y = dir = 0;
m = -1;
} else {// w1=<map name>,<x>,<y>,<facing>
char mapname[32];
if( sscanf(w1, "%31[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4
- || strchr(w4, ',') == NULL )
- {
+ || strchr(w4, ',') == NULL
+ ) {
ShowError("npc_parse_shop: Invalid shop definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
@@ -2624,7 +2639,8 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
if( m != -1 && ( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) ) {
ShowError("npc_parse_shop: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", map->list[m].name, x, y, map->list[m].xs, map->list[m].ys,filepath,strline(buffer,start-buffer));
- return strchr(start,'\n');;//try next
+ if (retval) *retval = EXIT_FAILURE;
+ return strchr(start,'\n');//try next
}
if( strcmp(w2,"cashshop") == 0 )
@@ -2632,39 +2648,51 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
else
type = SHOP;
+ items = aMalloc(sizeof(items[0])*items_count);
+
p = strchr(w4,',');
- for( i = 0; i < ARRAYLENGTH(items) && p; ++i )
- {
+ for( i = 0; p; ++i ) {
int nameid, value;
struct item_data* id;
- if( sscanf(p, ",%d:%d", &nameid, &value) != 2 )
- {
+
+ if( i == items_count-1 ) { // Grow array
+ items_count *= 2;
+ items = aRealloc(items, sizeof(items[0])*items_count);
+ }
+
+ if( sscanf(p, ",%d:%d", &nameid, &value) != 2 ) {
ShowError("npc_parse_shop: Invalid item definition in file '%s', line '%d'. Ignoring the rest of the line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
break;
}
- if( (id = itemdb->exists(nameid)) == NULL )
- {
+ if( (id = itemdb->exists(nameid)) == NULL ) {
ShowWarning("npc_parse_shop: Invalid sell item in file '%s', line '%d' (id '%d').\n", filepath, strline(buffer,start-buffer), nameid);
p = strchr(p+1,',');
+ if (retval) *retval = EXIT_FAILURE;
continue;
}
- if( value < 0 )
- {
+ if( value < 0 ) {
+ if( value != -1 )
+ ShowWarning("npc_parse_shop: Item %s [%d] with invalid selling value '%d' in file '%s', line '%d', defaulting to buy price...\n",
+ id->name, nameid, value, filepath, strline(buffer,start-buffer));
+
if( type == SHOP ) value = id->value_buy;
else value = 0; // Cashshop doesn't have a "buy price" in the item_db
}
- if( type == SHOP && value == 0 )
- { // NPC selling items for free!
+ if( type == SHOP && value == 0 ) {
+ // NPC selling items for free!
ShowWarning("npc_parse_shop: Item %s [%d] is being sold for FREE in file '%s', line '%d'.\n",
id->name, nameid, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
- if( type == SHOP && value*0.75 < id->value_sell*1.24 )
- {// Exploit possible: you can buy and sell back with profit
+ if( type == SHOP && value*0.75 < id->value_sell*1.24 ) {
+ // Exploit possible: you can buy and sell back with profit
ShowWarning("npc_parse_shop: Item %s [%d] discounted buying price (%d->%d) is less than overcharged selling price (%d->%d) in file '%s', line '%d'.\n",
id->name, nameid, value, (int)(value*0.75), id->value_sell, (int)(id->value_sell*1.24), filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
//for logs filters, atcommands and iteminfo script command
if( id->maxchance == 0 )
@@ -2674,15 +2702,18 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
items[i].value = value;
p = strchr(p+1,',');
}
- if( i == 0 )
- {
+ if( i == 0 ) {
ShowWarning("npc_parse_shop: Ignoring empty shop in file '%s', line '%d'.\n", filepath, strline(buffer,start-buffer));
+ aFree(items);
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// continue
}
CREATE(nd, struct npc_data, 1);
CREATE(nd->u.shop.shop_item, struct npc_item_list, i);
- memcpy(nd->u.shop.shop_item, items, sizeof(struct npc_item_list)*i);
+ memcpy(nd->u.shop.shop_item, items, sizeof(items[0])*i);
+ aFree(items);
+
nd->u.shop.count = i;
nd->bl.prev = nd->bl.next = NULL;
nd->bl.m = m;
@@ -2704,7 +2735,7 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
nd->dir = dir;
if( map->list[nd->bl.m].users )
clif->spawn(&nd->bl);
- } else {// 'floating' shop?
+ } else {// 'floating' shop
map->addiddb(&nd->bl);
}
strdb_put(npc->name_db, nd->exname, nd);
@@ -2743,8 +2774,7 @@ void npc_convertlabel_db(struct npc_label_list* label_list, const char *filepath
}
// Skip the contents of a script.
-const char* npc_skip_script(const char* start, const char* buffer, const char* filepath)
-{
+const char* npc_skip_script(const char* start, const char* buffer, const char* filepath, int *retval) {
const char* p;
int curly_count;
@@ -2753,9 +2783,9 @@ const char* npc_skip_script(const char* start, const char* buffer, const char* f
// initial bracket (assumes the previous part is ok)
p = strchr(start,'{');
- if( p == NULL )
- {
+ if( p == NULL ) {
ShowError("npc_skip_script: Missing left curly in file '%s', line '%d'.\n", filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return NULL;// can't continue
}
@@ -2775,16 +2805,15 @@ const char* npc_skip_script(const char* start, const char* buffer, const char* f
{// string
for( ++p; *p != '"' ; ++p )
{
- if( *p == '\\' && (unsigned char)p[-1] <= 0x7e )
+ if( *p == '\\' && (unsigned char)p[-1] <= 0x7e ) {
++p;// escape sequence (not part of a multibyte character)
- else if( *p == '\0' )
- {
+ } else if( *p == '\0' ) {
script->error(buffer, filepath, 0, "Unexpected end of string.", p);
+ if (retval) *retval = EXIT_FAILURE;
return NULL;// can't continue
- }
- else if( *p == '\n' )
- {
+ } else if( *p == '\n' ) {
script->error(buffer, filepath, 0, "Unexpected newline at string.", p);
+ if (retval) *retval = EXIT_FAILURE;
return NULL;// can't continue
}
}
@@ -2792,6 +2821,7 @@ const char* npc_skip_script(const char* start, const char* buffer, const char* f
else if( *p == '\0' )
{// end of buffer
ShowError("Missing %d right curlys in file '%s', line '%d'.\n", curly_count, filepath, strline(buffer,p-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return NULL;// can't continue
}
}
@@ -2804,7 +2834,7 @@ const char* npc_skip_script(const char* start, const char* buffer, const char* f
/// -%TAB%script%TAB%<NPC Name>%TAB%-1,{<code>}
/// <map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,{<code>}
/// <map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>,{<code>}
-const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options) {
+const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options, int *retval) {
int x, y, dir = 0, m, xs = 0, ys = 0; // [Valaris] thanks to fov
char mapname[32];
struct script_code *scriptroot;
@@ -2824,6 +2854,7 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
} else {// npc in a map
if( sscanf(w1, "%31[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4 ) {
ShowError("npc_parse_script: Invalid placement format for a script in file '%s', line '%d'. Skipping the rest of file...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return NULL;// unknown format, don't continue
}
m = map->mapname2mapid(mapname);
@@ -2834,15 +2865,16 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
if( strstr(w4,",{") == NULL || script_start == NULL || (end != NULL && script_start > end) )
{
ShowError("npc_parse_script: Missing left curly ',{' in file '%s', line '%d'. Skipping the rest of the file.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return NULL;// can't continue
}
++script_start;
- end = npc->skip_script(script_start, buffer, filepath);
+ end = npc->skip_script(script_start, buffer, filepath, retval);
if( end == NULL )
return NULL;// (simple) parse error, don't continue
- scriptroot = script->parse(script_start, filepath, strline(buffer,script_start-buffer), SCRIPT_USE_LABEL_DB);
+ scriptroot = script->parse(script_start, filepath, strline(buffer,script_start-buffer), SCRIPT_USE_LABEL_DB, retval);
label_list = NULL;
label_list_num = 0;
if( script->label_count ) {
@@ -2906,6 +2938,7 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
if (npc->event_export(nd, i)) {
ShowWarning("npc_parse_script: duplicate event %s::%s in file '%s'.\n",
nd->exname, nd->u.scr.label_list[i].name, filepath);
+ if (retval) *retval = EXIT_FAILURE;
}
npc->timerevent_export(nd, i);
}
@@ -2935,8 +2968,8 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
/// shop/cashshop/npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<sprite id>
/// npc: -%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>
/// npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>
-const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath)
-{
+/// !!Only NPO_ONINIT is available trough options!!
+const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options, int *retval) {
int x, y, dir, m, xs = -1, ys = -1;
char mapname[32];
char srcname[128];
@@ -2956,6 +2989,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
if( w2[length-1] != ')' || length <= 11 || length-11 >= sizeof(srcname) )
{// does not match 'duplicate(%127s)', name is empty or too long
ShowError("npc_parse_script: bad duplicate name in file '%s', line '%d': %s\n", filepath, strline(buffer,start-buffer), w2);
+ if (retval) *retval = EXIT_FAILURE;
return end;// next line, try to continue
}
safestrncpy(srcname, w2+10, length-10);
@@ -2963,6 +2997,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
dnd = npc->name2id(srcname);
if( dnd == NULL) {
ShowError("npc_parse_script: original npc not found for duplicate in file '%s', line '%d': %s\n", filepath, strline(buffer,start-buffer), srcname);
+ if (retval) *retval = EXIT_FAILURE;
return end;// next line, try to continue
}
src_id = dnd->bl.id;
@@ -2978,6 +3013,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
dir = 0;
} else if( fields != 4 ) {// <map name>,<x>,<y>,<facing>
ShowError("npc_parse_duplicate: Invalid placement format for duplicate in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return end;// next line, try to continue
}
m = map->mapname2mapid(mapname);
@@ -2985,6 +3021,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
if( m != -1 && ( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) ) {
ShowError("npc_parse_duplicate: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", map->list[m].name, x, y, map->list[m].xs, map->list[m].ys,filepath,strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return end;//try next
}
@@ -2992,6 +3029,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
else if( type == SCRIPT && sscanf(w4, "%*[^,],%d,%d", &xs, &ys) == 2);// <sprite id>,<triggerX>,<triggerY>
else if( type == WARP ) {
ShowError("npc_parse_duplicate: Invalid span format for duplicate warp in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return end;// next line, try to continue
}
@@ -3068,12 +3106,27 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
if (npc->event_export(nd, i)) {
ShowWarning("npc_parse_duplicate: duplicate event %s::%s in file '%s'.\n",
nd->exname, nd->u.scr.label_list[i].name, filepath);
+ if (retval) *retval = EXIT_FAILURE;
}
npc->timerevent_export(nd, i);
}
nd->u.scr.timerid = INVALID_TIMER;
+ if( type == SCRIPT && options&NPO_ONINIT ) {
+ // From npc_parse_script
+ char evname[EVENT_NAME_LENGTH];
+ struct event_data *ev;
+
+ snprintf(evname, ARRAYLENGTH(evname), "%s::OnInit", nd->exname);
+
+ if( ( ev = (struct event_data*)strdb_get(npc->ev_db, evname) ) ) {
+
+ //Execute OnInit
+ script->run(nd->u.scr.script,ev->pos,0,nd->bl.id);
+
+ }
+ }
return end;
}
@@ -3137,7 +3190,7 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) {
else
snprintf(w4, sizeof(w4), "%d", snd->class_);
- npc->parse_duplicate(w1, w2, w3, w4, stat_buf, stat_buf, "INSTANCING");
+ npc->parse_duplicate(w1, w2, w3, w4, stat_buf, stat_buf, "INSTANCING", NPO_NONE, NULL);
}
return 0;
@@ -3315,7 +3368,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
}
}
- script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)__64BPTRSIZE(j), NULL);
+ script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)h64BPTRSIZE(j), NULL);
aFree(temp);
script->run_main(st);
@@ -3324,8 +3377,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
/// Parses a function.
/// function%TAB%script%TAB%<function name>%TAB%{<code>}
-const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath)
-{
+const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
DBMap* func_db;
DBData old_data;
struct script_code *scriptroot;
@@ -3334,18 +3386,18 @@ const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const cha
script_start = strstr(start,"\t{");
end = strchr(start,'\n');
- if( *w4 != '{' || script_start == NULL || (end != NULL && script_start > end) )
- {
+ if( *w4 != '{' || script_start == NULL || (end != NULL && script_start > end) ) {
ShowError("npc_parse_function: Missing left curly '%%TAB%%{' in file '%s', line '%d'. Skipping the rest of the file.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return NULL;// can't continue
}
++script_start;
- end = npc->skip_script(script_start,buffer,filepath);
+ end = npc->skip_script(script_start,buffer,filepath, retval);
if( end == NULL )
return NULL;// (simple) parse error, don't continue
- scriptroot = script->parse(script_start, filepath, strline(buffer,start-buffer), SCRIPT_RETURN_EMPTY_SCRIPT);
+ scriptroot = script->parse(script_start, filepath, strline(buffer,start-buffer), SCRIPT_RETURN_EMPTY_SCRIPT, retval);
if( scriptroot == NULL )// parse error, continue
return end;
@@ -3379,7 +3431,7 @@ void npc_parse_mob2(struct spawn_data* mobspawn)
}
}
-const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) {
+const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
int num, class_, m,x,y,xs,ys, i,j;
int mob_lv = -1, ai = -1, size = -1;
char mapname[32], mobname[NAME_LENGTH];
@@ -3398,10 +3450,12 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
|| sscanf(w4, "%d,%d,%u,%u,%127[^,],%d,%d[^\t\r\n]", &class_, &num, &mobspawn.delay1, &mobspawn.delay2, mobspawn.eventname, &size, &ai) < 2
) {
ShowError("npc_parse_mob: Invalid mob definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
if( mapindex->name2id(mapname) == 0 ) {
ShowError("npc_parse_mob: Unknown map '%s' in file '%s', line '%d'.\n", mapname, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
m = map->mapname2mapid(mapname);
@@ -3411,32 +3465,38 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
if( x < 0 || x >= map->list[mobspawn.m].xs || y < 0 || y >= map->list[mobspawn.m].ys ) {
ShowError("npc_parse_mob: Spawn coordinates out of range: %s (%d,%d), map size is (%d,%d) - %s %s in file '%s', line '%d'.\n", map->list[mobspawn.m].name, x, y, (map->list[mobspawn.m].xs-1), (map->list[mobspawn.m].ys-1), w1, w3, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
// check monster ID if exists!
if( mob->db_checkid(class_) == 0 ) {
ShowError("npc_parse_mob: Unknown mob ID %d in file '%s', line '%d'.\n", class_, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
if( num < 1 || num > 1000 ) {
ShowError("npc_parse_mob: Invalid number of monsters %d, must be inside the range [1,1000] in file '%s', line '%d'.\n", num, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
if( (mobspawn.state.size < 0 || mobspawn.state.size > 2) && size != -1 ) {
ShowError("npc_parse_mob: Invalid size number %d for mob ID %d in file '%s', line '%d'.\n", mobspawn.state.size, class_, filepath, strline(buffer, start - buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start, '\n');
}
if( (mobspawn.state.ai < 0 || mobspawn.state.ai > 4) && ai != -1 ) {
ShowError("npc_parse_mob: Invalid ai %d for mob ID %d in file '%s', line '%d'.\n", mobspawn.state.ai, class_, filepath, strline(buffer, start - buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start, '\n');
}
if( (mob_lv == 0 || mob_lv > MAX_LEVEL) && mob_lv != -1 ) {
ShowError("npc_parse_mob: Invalid level %d for mob ID %d in file '%s', line '%d'.\n", mob_lv, class_, filepath, strline(buffer, start - buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start, '\n');
}
@@ -3467,6 +3527,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
if(mobspawn.delay1>0xfffffff || mobspawn.delay2>0xfffffff) {
ShowError("npc_parse_mob: Invalid spawn delays %u %u in file '%s', line '%d'.\n", mobspawn.delay1, mobspawn.delay2, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
@@ -3481,6 +3542,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
//Verify dataset.
if( !mob->parse_dataset(&mobspawn) ) {
ShowError("npc_parse_mob: Invalid dataset for monster ID %d in file '%s', line '%d'.\n", class_, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
@@ -3540,7 +3602,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
* eg : bat_c01 mapflag battleground 2
* also chking if mapflag conflict with another
*------------------------------------------*/
-const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) {
+const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
int16 m;
char mapname[32];
int state = 1;
@@ -3549,11 +3611,13 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if( sscanf(w1, "%31[^,]", mapname) != 1 )
{
ShowError("npc_parse_mapflag: Invalid mapflag definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
m = map->mapname2mapid(mapname);
if( m < 0 ) {
ShowWarning("npc_parse_mapflag: Unknown map in file '%s', line '%d' : %s\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", mapname, filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
return strchr(start,'\n');// skip and continue
}
@@ -3575,6 +3639,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].save.y = savey;
if (!map->list[m].save.map) {
ShowWarning("npc_parse_mapflag: Specified save point map '%s' for mapflag 'nosave' not found in file '%s', line '%d', using 'SavePoint'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", savemap, filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
+ if (retval) *retval = EXIT_FAILURE;
map->list[m].save.x = -1;
map->list[m].save.y = -1;
}
@@ -3613,10 +3678,12 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].flag.gvg_dungeon = 0;
map->list[m].flag.gvg_castle = 0;
ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing GvG flags from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
if( state && map->list[m].flag.battleground ) {
map->list[m].flag.battleground = 0;
ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing BattleGround flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
if( state && (zone = strdb_get(map->zone_db, MAP_ZONE_PVP_NAME)) && map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
@@ -3663,10 +3730,12 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if( state && map->list[m].flag.pvp ) {
map->list[m].flag.pvp = 0;
ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing PvP flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
if( state && map->list[m].flag.battleground ) {
map->list[m].flag.battleground = 0;
ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing BattleGround flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
if( state && (zone = strdb_get(map->zone_db, MAP_ZONE_GVG_NAME)) && map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
@@ -3695,12 +3764,14 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if( map->list[m].flag.battleground && map->list[m].flag.pvp ) {
map->list[m].flag.pvp = 0;
ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing PvP flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
if( map->list[m].flag.battleground && (map->list[m].flag.gvg || map->list[m].flag.gvg_dungeon || map->list[m].flag.gvg_castle) ) {
map->list[m].flag.gvg = 0;
map->list[m].flag.gvg_dungeon = 0;
map->list[m].flag.gvg_castle = 0;
ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing GvG flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
}
if( state && (zone = strdb_get(map->zone_db, MAP_ZONE_BG_NAME)) && map->list[m].zone != zone ) {
@@ -3803,10 +3874,13 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if( modifier[0] == '\0' ) {
ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_unit_duration' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
} else if( !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) ) {
ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_unit_duration' flag! removing flag from %s in file '%s', line '%d'.\n",skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
} else if ( atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_unit_duration' flag! removing flag from %s in file '%s', line '%d'.\n", atoi(modifier), skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
} else {
int idx = map->list[m].unit_count;
@@ -3859,10 +3933,13 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if( modifier[0] == '\0' ) {
ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_skill_damage' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
} else if( !( skill_id = skill->name2id(skill_name) ) ) {
ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_skill_damage' flag! removing flag from %s in file '%s', line '%d'.\n", skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
} else if ( atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_skill_damage' flag! removing flag from %s in file '%s', line '%d'.\n", atoi(modifier), skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
} else {
int idx = map->list[m].skill_count;
@@ -3901,6 +3978,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if( !(zone = strdb_get(map->zone_db, w4)) ) {
ShowWarning("npc_parse_mapflag: Invalid zone '%s'! removing flag from %s in file '%s', line '%d'.\n", w4, map->list[m].name, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
} else if( map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
}
@@ -3924,15 +4002,25 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].flag.src4instance = (state) ? 1 : 0;
} else if ( !strcmpi(w3,"nocashshop") ) {
map->list[m].flag.nocashshop = (state) ? 1 : 0;
- } else
+ } else {
ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.\n", w3, filepath, strline(buffer,start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
+ }
return strchr(start,'\n');// continue
}
-//Read file and create npc/func/mapflag/monster... accordingly.
-//@runOnInit should we exec OnInit when it's done ?
+/**
+ * Parses a script file and creates NPCs/functions/mapflags/monsters/etc
+ * accordingly.
+ *
+ * @param filepath File name and path.
+ * @param runOnInit Whether the OnInit label should be called.
+ * @retval EXIT_SUCCESS if filepath was loaded correctly.
+ * @retval EXIT_FAILURE if there were errors/warnings when loading filepath.
+ */
int npc_parsesrcfile(const char* filepath, bool runOnInit) {
+ int success = EXIT_SUCCESS;
int16 m, x, y;
int lines = 0;
FILE* fp;
@@ -3942,10 +4030,9 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
// read whole file to buffer
fp = fopen(filepath, "rb");
- if( fp == NULL )
- {
+ if( fp == NULL ) {
ShowError("npc_parsesrcfile: File not found '%s'.\n", filepath);
- return -1;
+ return EXIT_FAILURE;
}
fseek(fp, 0, SEEK_END);
len = ftell(fp);
@@ -3953,12 +4040,11 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
fseek(fp, 0, SEEK_SET);
len = fread(buffer, sizeof(char), len, fp);
buffer[len] = '\0';
- if( ferror(fp) )
- {
+ if( ferror(fp) ) {
ShowError("npc_parsesrcfile: Failed to read file '%s' - %s\n", filepath, strerror(errno));
aFree(buffer);
fclose(fp);
- return -1;
+ return EXIT_FAILURE;
}
fclose(fp);
@@ -3971,12 +4057,11 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
ShowError("npc_parsesrcfile: Detected unsupported UTF-8 BOM in file '%s'. Stopping (please consider using another character set.)\n", filepath);
aFree(buffer);
fclose(fp);
- return -1;
+ return EXIT_FAILURE;
}
// parse buffer
- for( p = script->skip_space(buffer); p && *p ; p = script->skip_space(p) )
- {
+ for( p = script->skip_space(buffer); p && *p ; p = script->skip_space(p) ) {
int pos[9];
char w1[2048], w2[2048], w3[2048], w4[2048];
int i, count;
@@ -3987,41 +4072,50 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
if( count < 0 )
{
ShowError("npc_parsesrcfile: Parse error in file '%s', line '%d'. Stopping...\n", filepath, strline(buffer,p-buffer));
+ success = EXIT_FAILURE;
break;
}
// fill w1
- if( pos[3]-pos[2] > ARRAYLENGTH(w1)-1 )
+ if( pos[3]-pos[2] > ARRAYLENGTH(w1)-1 ) {
ShowWarning("npc_parsesrcfile: w1 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[3]-pos[2], filepath, strline(buffer,p-buffer));
+ success = EXIT_FAILURE;
+ }
i = min(pos[3]-pos[2], ARRAYLENGTH(w1)-1);
memcpy(w1, p+pos[2], i*sizeof(char));
w1[i] = '\0';
// fill w2
- if( pos[5]-pos[4] > ARRAYLENGTH(w2)-1 )
+ if( pos[5]-pos[4] > ARRAYLENGTH(w2)-1 ) {
ShowWarning("npc_parsesrcfile: w2 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[5]-pos[4], filepath, strline(buffer,p-buffer));
+ success = EXIT_FAILURE;
+ }
i = min(pos[5]-pos[4], ARRAYLENGTH(w2)-1);
memcpy(w2, p+pos[4], i*sizeof(char));
w2[i] = '\0';
// fill w3
- if( pos[7]-pos[6] > ARRAYLENGTH(w3)-1 )
+ if( pos[7]-pos[6] > ARRAYLENGTH(w3)-1 ) {
ShowWarning("npc_parsesrcfile: w3 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[7]-pos[6], filepath, strline(buffer,p-buffer));
+ success = EXIT_FAILURE;
+ }
i = min(pos[7]-pos[6], ARRAYLENGTH(w3)-1);
memcpy(w3, p+pos[6], i*sizeof(char));
w3[i] = '\0';
// fill w4 (to end of line)
- if( pos[1]-pos[8] > ARRAYLENGTH(w4)-1 )
+ if( pos[1]-pos[8] > ARRAYLENGTH(w4)-1 ) {
ShowWarning("npc_parsesrcfile: w4 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[1]-pos[8], filepath, strline(buffer,p-buffer));
- if( pos[8] != -1 )
- {
+ success = EXIT_FAILURE;
+ }
+ if( pos[8] != -1 ) {
i = min(pos[1]-pos[8], ARRAYLENGTH(w4)-1);
memcpy(w4, p+pos[8], i*sizeof(char));
w4[i] = '\0';
- }
- else
+ } else {
w4[0] = '\0';
+ }
- if( count < 3 )
- {// Unknown syntax
+ if( count < 3 ) {
+ // Unknown syntax
ShowError("npc_parsesrcfile: Unknown syntax in file '%s', line '%d'. Stopping...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,p-buffer), w1, w2, w3, w4);
+ success = EXIT_FAILURE;
break;
}
@@ -4030,13 +4124,12 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
char mapname[MAP_NAME_LENGTH*2];
x = y = 0;
sscanf(w1,"%23[^,],%hd,%hd[^,]",mapname,&x,&y);
- if( !mapindex->name2id(mapname) )
- {// Incorrect map, we must skip the script info...
+ if( !mapindex->name2id(mapname) ) {
+ // Incorrect map, we must skip the script info...
ShowError("npc_parsesrcfile: Unknown map '%s' in file '%s', line '%d'. Skipping line...\n", mapname, filepath, strline(buffer,p-buffer));
- if( strcmp(w2,"script") == 0 && count > 3 )
- {
- if((p = npc->skip_script(p,buffer,filepath)) == NULL)
- {
+ success = EXIT_FAILURE;
+ if( strcmp(w2,"script") == 0 && count > 3 ) {
+ if((p = npc->skip_script(p,buffer,filepath, &success)) == NULL) {
break;
}
}
@@ -4046,10 +4139,8 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
m = map->mapname2mapid(mapname);
if( m < 0 ) {
// "mapname" is not assigned to this server, we must skip the script info...
- if( strcmp(w2,"script") == 0 && count > 3 )
- {
- if((p = npc->skip_script(p,buffer,filepath)) == NULL)
- {
+ if( strcmp(w2,"script") == 0 && count > 3 ) {
+ if((p = npc->skip_script(p,buffer,filepath, &success)) == NULL) {
break;
}
}
@@ -4058,10 +4149,9 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
}
if (x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys) {
ShowError("npc_parsesrcfile: Unknown coordinates ('%d', '%d') for map '%s' in file '%s', line '%d'. Skipping line...\n", x, y, mapname, filepath, strline(buffer,p-buffer));
- if( strcmp(w2,"script") == 0 && count > 3 )
- {
- if((p = npc->skip_script(p,buffer,filepath)) == NULL)
- {
+ success = EXIT_FAILURE;
+ if( strcmp(w2,"script") == 0 && count > 3 ) {
+ if((p = npc->skip_script(p,buffer,filepath, &success)) == NULL) {
break;
}
}
@@ -4070,39 +4160,44 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
}
}
- if( strcmp(w2,"warp") == 0 && count > 3 )
+ if( strcmp(w2,"mapflag") == 0 && count >= 3 )
{
- p = npc->parse_warp(w1,w2,w3,w4, p, buffer, filepath);
+ p = npc->parse_mapflag(w1, w2, trim(w3), trim(w4), p, buffer, filepath, &success);
}
- else if( (strcmp(w2,"shop") == 0 || strcmp(w2,"cashshop") == 0) && count > 3 )
- {
- p = npc->parse_shop(w1,w2,w3,w4, p, buffer, filepath);
+ else if( count == 3 ) {
+ ShowError("npc_parsesrcfile: Unable to parse, probably a missing TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,p-buffer), w1, w2, w3, w4);
+ p = strchr(p,'\n');// skip and continue
+ success = EXIT_FAILURE;
}
- else if( strcmp(w2,"script") == 0 && count > 3 )
+ else if( strcmp(w2,"script") == 0 )
{
if( strcmp(w1,"function") == 0 ) {
- p = npc->parse_function(w1, w2, w3, w4, p, buffer, filepath);
+ p = npc->parse_function(w1, w2, w3, w4, p, buffer, filepath, &success);
} else {
#ifdef ENABLE_CASE_CHECK
if( strcasecmp(w1, "function") == 0 ) DeprecationWarning("npc_parsesrcfile", w1, "function", filepath, strline(buffer, p-buffer)); // TODO
#endif // ENABLE_CASE_CHECK
- p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,runOnInit?NPO_ONINIT:NPO_NONE);
+ p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,runOnInit?NPO_ONINIT:NPO_NONE, &success);
}
}
- else if( strcmp(w2,"trader") == 0 && count > 3 ) {
- p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,(runOnInit?NPO_ONINIT:NPO_NONE)|NPO_TRADER);
+ else if( strcmp(w2,"trader") == 0 ) {
+ p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,(runOnInit?NPO_ONINIT:NPO_NONE)|NPO_TRADER, &success);
+ }
+ else if( strcmp(w2,"warp") == 0 )
+ {
+ p = npc->parse_warp(w1,w2,w3,w4, p, buffer, filepath, &success);
}
- else if( (i=0, sscanf(w2,"duplicate%n",&i), (i > 0 && w2[i] == '(')) && count > 3 )
+ else if( (i=0, sscanf(w2,"duplicate%n",&i), (i > 0 && w2[i] == '(')) )
{
- p = npc->parse_duplicate(w1,w2,w3,w4, p, buffer, filepath);
+ p = npc->parse_duplicate(w1,w2,w3,w4, p, buffer, filepath, (runOnInit?NPO_ONINIT:NPO_NONE), &success);
}
- else if( (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0) && count > 3 )
+ else if( (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0) )
{
- p = npc->parse_mob(w1, w2, w3, w4, p, buffer, filepath);
+ p = npc->parse_mob(w1, w2, w3, w4, p, buffer, filepath, &success);
}
- else if( strcmp(w2,"mapflag") == 0 && count >= 3 )
+ else if( (strcmp(w2,"shop") == 0 || strcmp(w2,"cashshop") == 0) )
{
- p = npc->parse_mapflag(w1, w2, trim(w3), trim(w4), p, buffer, filepath);
+ p = npc->parse_shop(w1,w2,w3,w4, p, buffer, filepath, &success);
}
else
{
@@ -4124,11 +4219,12 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
#endif // ENABLE_CASE_CHECK
ShowError("npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,p-buffer), w1, w2, w3, w4);
p = strchr(p,'\n');// skip and continue
+ success = EXIT_FAILURE;
}
}
aFree(buffer);
- return 0;
+ return success;
}
int npc_script_event(struct map_session_data* sd, enum npce_event type)
@@ -4227,14 +4323,39 @@ int npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args)
return 0;
}
+/**
+ * Main npc file processing
+ * @param npc_min Minimum npc id - used to know how many NPCs were loaded
+ **/
+void npc_process_files( int npc_min ) {
+ struct npc_src_list *file; // Current file
+
+ ShowStatus("Loading NPCs...\r");
+ for( file = npc->src_files; file != NULL; file = file->next ) {
+ ShowStatus("Loading NPC file: %s"CL_CLL"\r", file->name);
+ if (npc->parsesrcfile(file->name, false) != EXIT_SUCCESS)
+ map->retval = EXIT_FAILURE;
+ }
+ ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n"
+ "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n"
+ "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n"
+ "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n"
+ "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n"
+ "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n"
+ "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
+ npc_id - npc_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
+}
+
//Clear then reload npcs files
int npc_reload(void) {
- struct npc_src_list *nsl;
int16 m, i;
int npc_new_min = npc_id;
struct s_mapiterator* iter;
struct block_list* bl;
+ if (map->retval == EXIT_FAILURE)
+ map->retval = EXIT_SUCCESS; // Clear return status in case something failed before.
+
/* clear guild flag cache */
guild->flags_clear();
@@ -4291,46 +4412,35 @@ int npc_reload(void) {
// reset mapflags
map->flags_init();
- //TODO: the following code is copy-pasted from do_init_npc(); clean it up
- // Reloading npcs now
- for (nsl = npc->src_files; nsl; nsl = nsl->next) {
- ShowStatus("Loading NPC file: %s"CL_CLL"\r", nsl->name);
- npc->parsesrcfile(nsl->name,false);
- }
- ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
- npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
-
+ // Reprocess npc files and reload constants
itemdb->name_constants();
-
+ npc_process_files( npc_new_min );
+
instance->reload();
map->zone_init();
-
+
npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */
-
+
//Re-read the NPC Script Events cache.
npc->read_event_script();
- /* refresh guild castle flags on both woe setups */
- npc->event_doall("OnAgitInit");
- npc->event_doall("OnAgitInit2");
-
- //Execute the OnInit event for freshly loaded npcs. [Skotlex]
- ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n",npc->event_doall("OnInit"));
-
- npc->market_fromsql();/* after OnInit */
-
+ // Execute main initialisation events
+ // The correct initialisation order is:
+ // OnInit -> OnInterIfInit -> OnInterIfInitOnce -> OnAgitInit -> OnAgitInit2
+ npc->event_do_oninit( true );
+ npc->market_fromsql();
// Execute rest of the startup events if connected to char-server. [Lance]
- if(!intif->CheckForCharServer()){
+ // Executed when connection is established with char-server in chrif_connectack
+ if( !intif->CheckForCharServer() ) {
ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInit"));
ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInitOnce"));
}
+ // Refresh guild castle flags on both woe setups
+ // These events are only executed after receiving castle information from char-server
+ npc->event_doall("OnAgitInit");
+ npc->event_doall("OnAgitInit2");
+
return 0;
}
@@ -4412,7 +4522,6 @@ static void npc_debug_warps(void) {
* npc initialization
*------------------------------------------*/
int do_init_npc(bool minimal) {
- struct npc_src_list *file;
int i;
memset(&npc->base_ud, 0, sizeof( struct unit_data) );
@@ -4441,28 +4550,17 @@ int do_init_npc(bool minimal) {
npc_last_npd = NULL;
npc_last_path = NULL;
npc_last_ref = NULL;
-
+
+ // Should be loaded before npc processing, otherwise labels could overwrite constant values
+ // and lead to undefined behavior [Panikon]
+ itemdb->name_constants();
+
if (!minimal) {
npc->timer_event_ers = ers_new(sizeof(struct timer_event_data),"clif.c::timer_event_ers",ERS_OPT_NONE);
- // process all npc files
- ShowStatus("Loading NPCs...\r");
- for( file = npc->src_files; file != NULL; file = file->next ) {
- ShowStatus("Loading NPC file: %s"CL_CLL"\r", file->name);
- npc->parsesrcfile(file->name,false);
- }
- ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Warps\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n"
- "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
- npc_id - START_NPC_NUM, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
+ npc_process_files(START_NPC_NUM);
}
- itemdb->name_constants();
-
if (!minimal) {
map->zone_init();
diff --git a/src/map/npc.h b/src/map/npc.h
index 346a9f8c0..4c904e1ac 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -2,16 +2,16 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_NPC_H_
-#define _MAP_NPC_H_
+#ifndef MAP_NPC_H
+#define MAP_NPC_H
#include "map.h" // struct block_list
#include "status.h" // struct status_change
#include "unit.h" // struct unit_data
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
struct HPluginData;
-struct block_list;
-struct npc_data;
struct view_data;
enum npc_parse_options {
@@ -121,7 +121,7 @@ enum actor_classes {
#define MAX_NPC_CLASS 1000
// New NPC range
#define MAX_NPC_CLASS2_START 10000
-#define MAX_NPC_CLASS2_END 10070
+#define MAX_NPC_CLASS2_END 10110
//Checks if a given id is a valid npc id. [Skotlex]
//Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001)
@@ -193,7 +193,7 @@ struct npc_interface {
int (*event_doall_id) (const char *name, int rid);
int (*event_doall) (const char *name);
int (*event_do_clock) (int tid, int64 tick, int id, intptr_t data);
- void (*event_do_oninit) (void);
+ void (*event_do_oninit) ( bool reload );
int (*timerevent_export) (struct npc_data *nd, int i);
int (*timerevent) (int tid, int64 tick, int id, intptr_t data);
int (*timerevent_start) (struct npc_data *nd, int rid);
@@ -232,12 +232,12 @@ struct npc_interface {
int (*parseview) (const char *w4, const char *start, const char *buffer, const char *filepath);
bool (*viewisid) (const char *viewid);
struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
- const char* (*parse_warp) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
- const char* (*parse_shop) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*parse_warp) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*parse_shop) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
void (*convertlabel_db) (struct npc_label_list *label_list, const char *filepath);
- const char* (*skip_script) (const char *start, const char *buffer, const char *filepath);
- const char* (*parse_script) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options);
- const char* (*parse_duplicate) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*skip_script) (const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*parse_script) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval);
+ const char* (*parse_duplicate) (char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options, int *retval);
int (*duplicate4instance) (struct npc_data *snd, int16 m);
void (*setcells) (struct npc_data *nd);
int (*unsetcells_sub) (struct block_list *bl, va_list ap);
@@ -246,10 +246,10 @@ struct npc_interface {
void (*setdisplayname) (struct npc_data *nd, const char *newname);
void (*setclass) (struct npc_data *nd, short class_);
int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname);
- const char* (*parse_function) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*parse_function) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
void (*parse_mob2) (struct spawn_data *mobspawn);
- const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
- const char* (*parse_mapflag) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*parse_mapflag) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
int (*parsesrcfile) (const char *filepath, bool runOnInit);
int (*script_event) (struct map_session_data *sd, enum npce_event type);
void (*read_event_script) (void);
@@ -347,4 +347,4 @@ struct pcre_interface *libpcre;
void npc_chat_defaults(void);
#endif
-#endif /* _MAP_NPC_H_ */
+#endif /* MAP_NPC_H */
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c
index 9d5639efc..8bc246819 100644
--- a/src/map/npc_chat.c
+++ b/src/map/npc_chat.c
@@ -2,25 +2,27 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifdef PCRE_SUPPORT
+#define HERCULES_CORE
-#include "../common/timer.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
+#ifdef PCRE_SUPPORT
-#include "mob.h" // struct mob_data
#include "npc.h" // struct npc_data
-#include "pc.h" // struct map_session_data
-#include "script.h" // set_var()
-
-#include "../../3rdparty/pcre/include/pcre.h"
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdarg.h>
+
+#include "../../3rdparty/pcre/include/pcre.h"
+
+#include "mob.h" // struct mob_data
+#include "pc.h" // struct map_session_data
+#include "script.h" // set_var()
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
/**
* interface sources
@@ -47,7 +49,7 @@ struct pcre_interface libpcre_s;
*
* defpattern 1, "[^:]+: (.*) loves (.*)", "label";
*
- * this defines a new pattern in set 1 using perl syntax
+ * this defines a new pattern in set 1 using perl syntax
* (http://www.troubleshooters.com/codecorn/littperl/perlreg.htm)
* and tells it to jump to the supplied label when the pattern
* is matched.
@@ -57,7 +59,7 @@ struct pcre_interface libpcre_s;
* before the script gets executed.
*
* activatepset 1;
- *
+ *
* This activates a set of patterns.. You can have many pattern
* sets defined and many active all at once. This feature allows
* you to set up "conversations" and ever changing expectations of
@@ -78,7 +80,7 @@ struct pcre_interface libpcre_s;
/**
- * delete everythign associated with a entry
+ * delete everything associated with a entry
*
* This does NOT do the list management
*/
@@ -93,11 +95,10 @@ void finalize_pcrematch_entry(struct pcrematch_entry* e)
/**
* Lookup (and possibly create) a new set of patterns by the set id
*/
-struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid)
-{
+struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid) {
struct pcrematch_set *pcreset;
struct npc_parse *npcParse = nd->chatdb;
- if (npcParse == NULL)
+ if (npcParse == NULL)
nd->chatdb = npcParse = (struct npc_parse *)aCalloc(sizeof(struct npc_parse), 1);
pcreset = npcParse->active;
@@ -107,7 +108,7 @@ struct pcrematch_set* lookup_pcreset(struct npc_data* nd, int setid)
break;
pcreset = pcreset->next;
}
- if (pcreset == NULL)
+ if (pcreset == NULL)
pcreset = npcParse->inactive;
while (pcreset != NULL) {
@@ -138,7 +139,7 @@ void activate_pcreset(struct npc_data* nd, int setid)
{
struct pcrematch_set *pcreset;
struct npc_parse *npcParse = nd->chatdb;
- if (npcParse == NULL)
+ if (npcParse == NULL)
return; // Nothing to activate...
pcreset = npcParse->inactive;
while (pcreset != NULL) {
@@ -152,7 +153,7 @@ void activate_pcreset(struct npc_data* nd, int setid)
pcreset->next->prev = pcreset->prev;
if (pcreset->prev != NULL)
pcreset->prev->next = pcreset->next;
- else
+ else
npcParse->inactive = pcreset->next;
pcreset->prev = NULL;
@@ -171,7 +172,7 @@ void deactivate_pcreset(struct npc_data* nd, int setid)
{
struct pcrematch_set *pcreset;
struct npc_parse *npcParse = nd->chatdb;
- if (npcParse == NULL)
+ if (npcParse == NULL)
return; // Nothing to deactivate...
if (setid == -1) {
while(npcParse->active != NULL)
@@ -190,7 +191,7 @@ void deactivate_pcreset(struct npc_data* nd, int setid)
pcreset->next->prev = pcreset->prev;
if (pcreset->prev != NULL)
pcreset->prev->next = pcreset->next;
- else
+ else
npcParse->active = pcreset->next;
pcreset->prev = NULL;
@@ -208,7 +209,7 @@ void delete_pcreset(struct npc_data* nd, int setid)
int active = 1;
struct pcrematch_set *pcreset;
struct npc_parse *npcParse = nd->chatdb;
- if (npcParse == NULL)
+ if (npcParse == NULL)
return; // Nothing to deactivate...
pcreset = npcParse->active;
while (pcreset != NULL) {
@@ -225,7 +226,7 @@ void delete_pcreset(struct npc_data* nd, int setid)
pcreset = pcreset->next;
}
}
- if (pcreset == NULL)
+ if (pcreset == NULL)
return;
if (pcreset->next != NULL)
@@ -244,7 +245,7 @@ void delete_pcreset(struct npc_data* nd, int setid)
while (pcreset->head) {
struct pcrematch_entry* n = pcreset->head->next;
npc_chat->finalize_pcrematch_entry(pcreset->head);
- aFree(pcreset->head); // Cleanin' the last ones.. [Lance]
+ aFree(pcreset->head); // Cleaning the last ones.. [Lance]
pcreset->head = n;
}
@@ -252,7 +253,7 @@ void delete_pcreset(struct npc_data* nd, int setid)
}
/**
- * create a new pattern entry
+ * create a new pattern entry
*/
struct pcrematch_entry* create_pcrematch_entry(struct pcrematch_set* set)
{
@@ -298,9 +299,9 @@ void npc_chat_def_pattern(struct npc_data* nd, int setid, const char* pattern, c
/**
* Delete everything associated with a NPC concerning the pattern
- * matching code
+ * matching code
*
- * this could be more efficent but.. how often do you do this?
+ * this could be more efficient but.. how often do you do this?
*/
void npc_chat_finalize(struct npc_data* nd)
{
@@ -343,10 +344,10 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
// iterate across all active sets
for (pcreset = npcParse->active; pcreset != NULL; pcreset = pcreset->next)
{
- // interate across all patterns in that set
+ // n across all patterns in that set
for (e = pcreset->head; e != NULL; e = e->next)
{
- int offsets[2*10 + 10]; // 1/3 reserved for temp space requred by pcre_exec
+ int offsets[2*10 + 10]; // 1/3 reserved for temp space required by pcre_exec
// perform pattern match
int r = libpcre->exec(e->pcre_, e->pcre_extra_, msg, len, 0, 0, offsets, ARRAYLENGTH(offsets));
@@ -379,7 +380,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
return 0;
}
-// Various script builtins used to support these functions
+// Various script built-ins used to support these functions
BUILDIN(defpattern) {
int setid = script_getnum(st,2);
const char* pattern = script_getstr(st,3);
diff --git a/src/map/packets.h b/src/map/packets.h
index 1be5d2dbe..810f341d4 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -3,8 +3,8 @@
//Included directly by clif.h in packet_loaddb()
-#ifndef _MAP_PACKETS_H_
-#define _MAP_PACKETS_H_
+#ifndef MAP_PACKETS_H
+#define MAP_PACKETS_H
#ifndef packet
#define packet(a,b,...)
@@ -2453,6 +2453,43 @@ packet(0x020d,-1);
packet(0x0887,36,clif->pStoragePassword,0);
#endif
+//2013-08-14aRagexe - Themon
+#if PACKETVER >= 20130814
+ packet(0x0874,7,clif->pActionRequest,2,6);
+ packet(0x0947,10,clif->pUseSkillToId,2,4,6);
+ packet(0x093A,5,clif->pWalkToXY,2);
+ packet(0x088A,6,clif->pTickSend,2);
+ packet(0x088C,5,clif->pChangeDir,2,4);
+ packet(0x0926,6,clif->pTakeItem,2);
+ packet(0x095F,6,clif->pDropItem,2,4);
+ packet(0x0202,8,clif->pMoveToKafra,2,4);
+ packet(0x0873,8,clif->pMoveFromKafra,2,4);
+ packet(0x0887,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0962,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x0937,6,clif->pGetCharNameRequest,2);
+ packet(0x0923,6,clif->pSolveCharName,2);
+ packet(0x0868,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0941,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0889,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0835,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0895,6,clif->pReqClickBuyingStore,2);
+ packet(0x094E,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0936,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+#ifdef PACKETVER_RE
+ packet(0x0365,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x0959,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
+ // packet(0x0896,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x08A4,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x0368,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0927,26,clif->pPartyInvite2,2);
+ // packet(0x0815,4); // CZ_GANGSI_RANK
+ packet(0x0281,26,clif->pFriendsListAdd,2);
+ packet(0x0958,5,clif->pHomMenu,2,4);
+ packet(0x0885,36,clif->pStoragePassword,0);
+#endif
+
// 2013-12-18bRagexe - Yommy
#if PACKETVER >= 20131218
packet(0x0369,7,clif->pActionRequest,2,6);
@@ -2559,6 +2596,177 @@ packet(0x020d,-1);
packet(0x091D,36,clif->pStoragePassword,0);
#endif
+// 2014 Packet Data
+
+// 2014-01-15eRagexe - YomRawr
+#if PACKETVER >= 20140115
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x08A7,5,clif->pChangeDir,2,4);
+ packet(0x0940,6,clif->pTakeItem,2);
+ packet(0x0361,6,clif->pDropItem,2,4);
+ packet(0x088E,8,clif->pMoveToKafra,2,4);
+ packet(0x0367,8,clif->pMoveFromKafra,2,4);
+ packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x0802,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0360,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0817,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0815,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x096A,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x088A,6,clif->pReqClickBuyingStore,2);
+ packet(0x0965,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x096A,18,clif->pPartyBookingRegisterReq,2,4);
+ // packet(0x088A,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0965,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x0966,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x095D,26,clif->pPartyInvite2,2);
+ // packet(0x095B,4); // CZ_GANGSI_RANK
+ packet(0x089B,26,clif->pFriendsListAdd,2);
+ packet(0x092D,5,clif->pHomMenu,2,4);
+ packet(0x0865,36,clif->pStoragePassword,0);
+#endif
+
+// 2014-02-05bRagexe - Themon
+#if PACKETVER >= 20140205
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x0202,5,clif->pChangeDir,2,4);
+ packet(0x07E4,6,clif->pTakeItem,2);
+ packet(0x0362,6,clif->pDropItem,2,4);
+ packet(0x07EC,8,clif->pMoveToKafra,2,4);
+ packet(0x0364,8,clif->pMoveFromKafra,2,4);
+ packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);
+ // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0802,26,clif->pPartyInvite2,2);
+ // packet(0x0436,4); // CZ_GANGSI_RANK
+ packet(0x023B,26,clif->pFriendsListAdd,2);
+ packet(0x0361,5,clif->pHomMenu,2,4);
+ packet(0x0938,36,clif->pStoragePassword,0);
+ packet(0x09DF,7);
+#endif
+
+// 2014-03-05bRagexe - Themon
+#if PACKETVER >= 20140305
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x0815,5,clif->pChangeDir,2,4);
+ packet(0x0202,6,clif->pTakeItem,2);
+ packet(0x0362,6,clif->pDropItem,2,4);
+ packet(0x07EC,8,clif->pMoveToKafra,2,4);
+ packet(0x0364,8,clif->pMoveFromKafra,2,4);
+ packet(0x0436,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0361,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);
+ // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x0438,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0802,26,clif->pPartyInvite2,2);
+ // packet(0x0878,4); // CZ_GANGSI_RANK
+ packet(0x07E4,26,clif->pFriendsListAdd,2);
+ packet(0x0934,5,clif->pHomMenu,2,4);
+ packet(0x095e,36,clif->pStoragePassword,0);
+ packet(0x09DF,7);
+#endif
+
+// 2014-04-02gRagexe - Themon
+#if PACKETVER >= 20140402
+ packet(0x0946,7,clif->pActionRequest,2,6);
+ packet(0x0868,10,clif->pUseSkillToId,2,4,6);
+ packet(0x093F,5,clif->pWalkToXY,2);
+ packet(0x0950,6,clif->pTickSend,2);
+ packet(0x0360,5,clif->pChangeDir,2,4);
+ packet(0x0958,6,clif->pTakeItem,2);
+ packet(0x0882,6,clif->pDropItem,2,4);
+ packet(0x095C,8,clif->pMoveToKafra,2,4);
+ packet(0x085B,8,clif->pMoveFromKafra,2,4);
+ packet(0x0364,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x092D,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x088A,6,clif->pGetCharNameRequest,2);
+ packet(0x07EC,6,clif->pSolveCharName,2);
+ packet(0x0965,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x085D,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0933,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x091F,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x023B,6,clif->pReqClickBuyingStore,2);
+ packet(0x0867,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0944,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x08AC,18,clif->pPartyBookingRegisterReq,2,4);
+ // packet(0x094C,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0883,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x0920,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0890,26,clif->pPartyInvite2,2);
+ // packet(0x088C,4); // CZ_GANGSI_RANK
+ packet(0x089A,26,clif->pFriendsListAdd,2);
+ packet(0x0896,5,clif->pHomMenu,2,4);
+ packet(0x0926,36,clif->pStoragePassword,0);
+ packet(0x09DF,7);
+#endif
+
+// 2014-04-16aRagexe - Themon
+#if PACKETVER >= 20140416
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x0202,5,clif->pChangeDir,2,4);
+ packet(0x07E4,6,clif->pTakeItem,2);
+ packet(0x0362,6,clif->pDropItem,2,4);
+ packet(0x07EC,8,clif->pMoveToKafra,2,4);
+ packet(0x0364,8,clif->pMoveFromKafra,2,4);
+ packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);
+ // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0802,26,clif->pPartyInvite2,2);
+ // packet(0x0436,4); // CZ_GANGSI_RANK
+ packet(0x023B,26,clif->pFriendsListAdd,2);
+ packet(0x0361,5,clif->pHomMenu,2,4);
+ packet(0x095C,36,clif->pStoragePassword,0);
+ packet(0x09DF,7);
+#endif
+
/* PacketKeys: http://hercules.ws/board/topic/1105-hercules-wpe-free-june-14th-patch/ */
#if PACKETVER >= 20110817
packetKeys(0x053D5CED,0x3DED6DED,0x6DED6DED); /* Thanks to Shakto */
@@ -2752,6 +2960,10 @@ packet(0x020d,-1);
packetKeys(0x7E241DE0,0x5E805580,0x3D807D80); /* Thanks to Shakto */
#endif
+#if PACKETVER >= 20130814
+ packetKeys(0x23A23148,0x0C41420E,0x53785AD7); /* Themon */
+#endif
+
#if PACKETVER >= 20131218
packetKeys(0x6A596301,0x76866D0E,0x32294A45);
#endif
@@ -2764,8 +2976,30 @@ packet(0x020d,-1);
packetKeys(0x611B7097,0x01F957A1,0x768A0FCB);
#endif
+// 2014 Packet Keys
+
+#if PACKETVER >= 20140115
+ packetKeys(0x63224335,0x0F3A1F27,0x6D217B24); /* Thanks to Yommy */
+#endif
+
+#if PACKETVER >= 20140205
+ packetKeys(0x63DC7BDC,0x7BDC7BDC,0x7BDC7BDC); /* Themon */
+#endif
+
+#if PACKETVER >= 20140305
+ packetKeys(0x116763F2,0x41117DAC,0x7FD13C45); /* Themon */
+#endif
+
+#if PACKETVER >= 20140402
+ packetKeys(0x15D3271C,0x004D725B,0x111A3A37); /* Themon */
+#endif
+
+#if PACKETVER >= 20140416
+ packetKeys(0x04810281,0x42814281,0x42814281); /* Themon */
+#endif
+
#if defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3)
packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3);
#endif
-#endif /* _MAP_PACKETS_H_ */
+#endif /* MAP_PACKETS_H */
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 55006db64..55ab0c66a 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -3,8 +3,8 @@
/* Hercules Renewal: Phase Two http://hercules.ws/board/topic/383-hercules-renewal-phase-two/ */
-#ifndef _MAP_PACKETS_STRUCT_H_
-#define _MAP_PACKETS_STRUCT_H_
+#ifndef MAP_PACKETS_STRUCT_H
+#define MAP_PACKETS_STRUCT_H
#include "../common/mmo.h"
@@ -596,7 +596,7 @@ struct packet_status_change {
#if PACKETVER >= 20120618
unsigned int Total;
#endif
-#if PACKETVER >= 20090121
+#if PACKETVER >= 20090121
unsigned int Left;
int val1;
int val2;
@@ -943,6 +943,9 @@ struct packet_npc_market_open {
unsigned int price;
unsigned int qty;
unsigned short view;
+ // It seems that the client doesn't have any hard-coded limit for this list
+ // it's possible to send up to 1890 items without dropping a packet that's
+ // too large [Panikon]
} list[1000];/* TODO: whats the actual max of this? */
} __attribute__((packed));
@@ -959,4 +962,4 @@ struct packet_wis_end {
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris
-#endif /* _MAP_PACKETS_STRUCT_H_ */
+#endif /* MAP_PACKETS_STRUCT_H */
diff --git a/src/map/party.c b/src/map/party.c
index cf5e7bbe3..7cf340edb 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -2,34 +2,37 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/socket.h" // last_tick
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/utils.h"
-#include "../common/strlib.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
+#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP
#include "party.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "atcommand.h" //msg_txt()
-#include "pc.h"
-#include "map.h"
-#include "instance.h"
#include "battle.h"
-#include "intif.h"
#include "clif.h"
+#include "instance.h"
+#include "intif.h"
+#include "itemdb.h"
#include "log.h"
+#include "map.h"
+#include "mob.h" // struct mob_data
+#include "pc.h"
#include "skill.h"
#include "status.h"
-#include "itemdb.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h" // last_tick
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct party_interface party_s;
@@ -210,7 +213,7 @@ void party_check_state(struct party_data *p) {
int i;
memset(&p->state, 0, sizeof(p->state));
for (i = 0; i < MAX_PARTY; i ++) {
- if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that.
+ if (!p->party.member[i].online) continue; //Those not online shouldn't apart to skill usage and all that.
switch (p->party.member[i].class_) {
case JOB_MONK:
case JOB_BABY_MONK:
@@ -1129,7 +1132,7 @@ int party_sub_count_chorus(struct block_list *bl, va_list ap) {
* @param func Function to execute
* @param sd Reference character for party, map, area center
* @param range Area size (0 = whole map)
- * @param ... Adidtional parameters to pass to func()
+ * @param ... Additional parameters to pass to func()
* @return Sum of the return values from func()
*/
int party_foreachsamemap(int (*func)(struct block_list*,va_list), struct map_session_data *sd, int range, ...) {
@@ -1361,7 +1364,7 @@ void do_init_party(bool minimal) {
timer->add_interval(timer->gettick()+battle_config.party_update_interval, party->send_xy_timer, 0, 0, battle_config.party_update_interval);
}
/*=====================================
-* Default Functions : party.h
+* Default Functions : party.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
diff --git a/src/map/party.h b/src/map/party.h
index ed8289af6..d62db23a7 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -2,14 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PARTY_H_
-#define _MAP_PARTY_H_
+#ifndef MAP_PARTY_H
+#define MAP_PARTY_H
-#include "../common/mmo.h" // struct party
-#include "../config/core.h"
#include <stdarg.h>
-#include "map.h"
+#include "map.h" // TBL_PC
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/mmo.h" // struct party
#define PARTY_BOOKING_JOBS 6
#define PARTY_BOOKING_RESULTS 10
@@ -70,7 +71,7 @@ struct party_booking_ad_info {
#endif /* PARTY_RECRUIT */
/*=====================================
-* Interface : party.h
+* Interface : party.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -142,4 +143,4 @@ struct party_interface *party;
void party_defaults(void);
-#endif /* _MAP_PARTY_H_ */
+#endif /* MAP_PARTY_H */
diff --git a/src/map/path.c b/src/map/path.c
index ae9fc389d..e90b26db5 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -2,20 +2,23 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
+#define HERCULES_CORE
+#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA
#include "path.h"
-#include "map.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "map.h"
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+
#define SET_OPEN 0
#define SET_CLOSED 1
@@ -202,7 +205,7 @@ static int add_path(struct node_heap *heap, struct path_node *tp, int16 x, int16
if (g_cost < tp[i].g_cost) { // New path to this node is better than old one
// Update costs and parent
tp[i].g_cost = g_cost;
- tp[i].parent = parent;
+ tp[i].parent = parent;
tp[i].f_cost = g_cost + h_cost;
if (tp[i].flag == SET_CLOSED) {
heap_push_node(heap, &tp[i]); // Put it in open set again
@@ -296,7 +299,7 @@ bool path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x
return true;
}
- return false; // easy path unsuccessful
+ return false; // easy path unsuccessful
}
else { // !(flag&1)
// A* (A-star) pathfinding
diff --git a/src/map/path.h b/src/map/path.h
index 0b67a0120..8d02e6558 100644
--- a/src/map/path.h
+++ b/src/map/path.h
@@ -2,10 +2,11 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PATH_H_
-#define _MAP_PATH_H_
+#ifndef MAP_PATH_H
+#define MAP_PATH_H
#include "map.h" // enum cell_chk
+#include "../common/cbasetypes.h"
#define MOVE_COST 10
#define MOVE_DIAGONAL_COST 14
@@ -46,4 +47,4 @@ struct path_interface *path;
void path_defaults(void);
-#endif /* _MAP_PATH_H_ */
+#endif /* MAP_PATH_H */
diff --git a/src/map/pc.c b/src/map/pc.c
index 848238ed2..8b84ee3bc 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2,20 +2,16 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/core.h" // get_svn_revision()
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h" // session[]
-#include "../common/strlib.h" // safestrncpy()
-#include "../common/timer.h"
-#include "../common/utils.h"
-#include "../common/conf.h"
-#include "../common/mmo.h" //NAME_LENGTH
+#define HERCULES_CORE
+#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_SPIRITBALL, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT
#include "pc.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
#include "atcommand.h" // get_atcommand_level()
#include "battle.h" // battle_config
#include "battleground.h"
@@ -24,32 +20,40 @@
#include "clif.h"
#include "date.h" // is_day_of_*()
#include "duel.h"
+#include "elemental.h"
+#include "guild.h" // guild->search(), guild_request_info()
+#include "homunculus.h"
+#include "instance.h"
#include "intif.h"
#include "itemdb.h"
#include "log.h"
#include "mail.h"
#include "map.h"
-#include "path.h"
-#include "homunculus.h"
-#include "instance.h"
#include "mercenary.h"
-#include "elemental.h"
+#include "mob.h" // struct mob_data
#include "npc.h" // fake_nd
-#include "pet.h" // pet_unlocktarget()
#include "party.h" // party->search()
-#include "guild.h" // guild->search(), guild_request_info()
+#include "path.h"
+#include "pc_groups.h"
+#include "pet.h" // pet_unlocktarget()
+#include "quest.h"
#include "script.h" // script_config
#include "skill.h"
#include "status.h" // struct status_data
#include "storage.h"
-#include "pc_groups.h"
-#include "quest.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
+#include "../common/core.h" // get_svn_revision()
+#include "../common/malloc.h"
+#include "../common/mmo.h" // NAME_LENGTH, MAX_CARTS, NEW_CARTS
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h" // session[]
+#include "../common/strlib.h" // safestrncpy()
+#include "../common/sysinfo.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct pc_interface pc_s;
@@ -1147,19 +1151,12 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
if( !changing_mapservers ) {
if (battle_config.display_version == 1) {
- const char* svn = get_svn_revision();
- const char* git = get_git_hash();
char buf[256];
- if( git[0] != HERC_UNKNOWN_VER )
- sprintf(buf,"Git Hash: %s", git);
- else if( svn[0] != HERC_UNKNOWN_VER )
- sprintf(buf,"SVN Revision: %s", svn);
- else
- sprintf(buf,"Unknown Version");
+ sprintf(buf, msg_txt(1295), sysinfo->vcstype(), sysinfo->vcsrevision_src(), sysinfo->vcsrevision_scripts()); // %s revision '%s' (src) / '%s' (scripts)
clif->message(sd->fd, buf);
}
- if (expiration_time != 0) {
+ if (expiration_time != 0) {
sd->expiration_time = expiration_time;
}
@@ -1394,7 +1391,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
if( sd->status.skill[i].flag == SKILL_FLAG_PERMANENT ) {
switch( skill->db[i].nameid ) {
case NV_TRICKDEAD:
- if( (sd->class_&MAPID_BASEMASK) != MAPID_NOVICE ) {
+ if( (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) {
sd->status.skill[i].id = 0;
sd->status.skill[i].lv = 0;
sd->status.skill[i].flag = 0;
@@ -3998,10 +3995,10 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
sd->inventory_data[i] = data;
clif->additem(sd,i,amount,0);
}
-#ifdef NSI_UNIQUE_ID
+
if( !itemdb->isstackable2(data) && !item_data->unique_id )
- sd->status.inventory[i].unique_id = itemdb->unique_id(0,0);
-#endif
+ sd->status.inventory[i].unique_id = itemdb->unique_id(sd);
+
logs->pick_pc(sd, log_type, amount, &sd->status.inventory[i],sd->inventory_data[i]);
sd->weight += w;
@@ -4194,7 +4191,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( !item->script ) //if it has no script, you can't really consume it!
return 0;
- if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) {
+ if( (item->item_usage.flag&INR_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) {
clif->msgtable(sd->fd,0x297);
//clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474));
return 0; // You cannot use this item while sitting.
@@ -4387,6 +4384,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
if (nameid != ITEMID_NAUTHIZ && sd->sc.opt1 > 0 && sd->sc.opt1 != OPT1_STONEWAIT && sd->sc.opt1 != OPT1_BURNING)
return 0;
+ // Statuses that don't let the player use items
if (sd->sc.count && (
sd->sc.data[SC_BERSERK] ||
(sd->sc.data[SC_GRAVITATION] && sd->sc.data[SC_GRAVITATION]->val3 == BCT_SELF) ||
@@ -4399,6 +4397,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
sd->sc.data[SC_WHITEIMPRISON] ||
sd->sc.data[SC_DEEP_SLEEP] ||
sd->sc.data[SC_SATURDAY_NIGHT_FEVER] ||
+ sd->sc.data[SC_COLD] ||
(sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
))
return 0;
@@ -4451,7 +4450,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
}
}
- /* on restricted maps the item is consumed but the effect is not used */
+ /* on restricted maps the item is consumed but the effect is not used */
for(i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++) {
if( map->list[sd->bl.m].zone->disabled_items[i] == nameid ) {
clif->msg(sd, ITEM_CANT_USE_AREA); // This item cannot be used within this area
@@ -5944,9 +5943,9 @@ int pc_checkjoblevelup(struct map_session_data *sd)
return 1;
}
-/*==========================================
- * Alters experienced based on self bonuses that do not get even shared to the party.
- *------------------------------------------*/
+/**
+ * Alters EXP based on self bonuses that do not get shared with the party
+ **/
void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) {
int bonus = 0;
struct status_data *st = status->get_status_data(src);
@@ -5977,19 +5976,23 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in
return;
}
-/*==========================================
- * Give x exp at sd player and calculate remaining exp for next lvl
- *------------------------------------------*/
-int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool is_quest) {
+
+/**
+ * Gives a determined EXP amount to sd and calculates remaining EXP for next level
+ * @param src if is NULL no bonuses are taken into account
+ * @param is_quest Used to let client know that the EXP was from a quest (clif->displayexp) PACKETVER >= 20091027
+ * @retval true success
+ **/
+bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool is_quest) {
float nextbp=0, nextjp=0;
unsigned int nextb=0, nextj=0;
nullpo_ret(sd);
if(sd->bl.prev == NULL || pc_isdead(sd))
- return 0;
+ return false;
if(!battle_config.pvp_exp && map->list[sd->bl.m].flag.pvp) // [MouseJstr]
- return 0; // no exp on pvp maps
+ return false; // no exp on pvp maps
if(sd->status.guild_id>0)
base_exp-=guild->payexp(sd,base_exp);
@@ -6021,7 +6024,8 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
}
}
- //Cap exp to the level up requirement of the previous level when you are at max level, otherwise cap at UINT_MAX (this is required for some S. Novice bonuses). [Skotlex]
+ // Cap exp to the level up requirement of the previous level when you are at max level,
+ // otherwise cap at UINT_MAX (this is required for some S. Novice bonuses). [Skotlex]
if (base_exp) {
nextb = nextb?UINT_MAX:pc->thisbaseexp(sd);
if(sd->status.base_exp > nextb - base_exp)
@@ -6056,7 +6060,7 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
clif_disp_onlyself(sd,output,strlen(output));
}
- return 1;
+ return true;
}
/*==========================================
@@ -6231,7 +6235,7 @@ int pc_maxparameterincrease(struct map_session_data* sd, int type) {
* Subtracts status points according to the cost of the increased stat points.
*
* @param sd The target character.
- * @param type The stat to change (see enum _sp)
+ * @param type The stat to change (see enum status_point_types)
* @param increase The stat increase (strictly positive) amount.
* @retval true if the stat was increased by any amount.
* @retval false if there were no changes.
@@ -6290,7 +6294,7 @@ bool pc_statusup(struct map_session_data* sd, int type, int increase) {
* Does not subtract status points for the cost of the modified stat points.
*
* @param sd The target character.
- * @param type The stat to change (see enum _sp)
+ * @param type The stat to change (see enum status_point_types)
* @param val The stat increase (or decrease) amount.
* @return the stat increase amount.
* @retval 0 if no changes were made.
@@ -6613,7 +6617,7 @@ int pc_resetskill(struct map_session_data* sd, int flag)
if( pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd) ) //Remove perma blindness due to skill-reset. [Skotlex]
clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_DEVIL1);
i = sd->sc.option;
- if( i&OPTION_RIDING && (!pc->checkskill(sd, KN_RIDING) || (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) )
+ if( i&OPTION_RIDING && pc->checkskill(sd, KN_RIDING) )
i &= ~OPTION_RIDING;
if( i&OPTION_FALCON && pc->checkskill(sd, HT_FALCON) )
i &= ~OPTION_FALCON;
@@ -6652,14 +6656,14 @@ int pc_resetskill(struct map_session_data* sd, int flag)
skill_id = skill->db[i].nameid;
// Don't reset trick dead if not a novice/baby
- if( skill_id == NV_TRICKDEAD && (sd->class_&MAPID_BASEMASK) != MAPID_NOVICE ) {
+ if( skill_id == NV_TRICKDEAD && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) {
sd->status.skill[i].lv = 0;
sd->status.skill[i].flag = 0;
continue;
}
// do not reset basic skill
- if( skill_id == NV_BASIC && (sd->class_&MAPID_BASEMASK) != MAPID_NOVICE )
+ if( skill_id == NV_BASIC && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE )
continue;
if( sd->status.skill[i].flag == SKILL_FLAG_PERM_GRANTED )
@@ -6691,6 +6695,21 @@ int pc_resetskill(struct map_session_data* sd, int flag)
sd->status.skill_point += skill_point;
+
+ if( !(flag&2) ) {
+ // Remove all SCs that can't be inactivated without a skill
+ if( sd->sc.data[SC_STORMKICK_READY] )
+ status_change_end(&sd->bl, SC_STORMKICK_READY, INVALID_TIMER);
+ if( sd->sc.data[SC_DOWNKICK_READY] )
+ status_change_end(&sd->bl, SC_DOWNKICK_READY, INVALID_TIMER);
+ if( sd->sc.data[SC_TURNKICK_READY] )
+ status_change_end(&sd->bl, SC_TURNKICK_READY, INVALID_TIMER);
+ if( sd->sc.data[SC_COUNTERKICK_READY] )
+ status_change_end(&sd->bl, SC_COUNTERKICK_READY, INVALID_TIMER);
+ if( sd->sc.data[SC_DODGE_READY] )
+ status_change_end(&sd->bl, SC_DODGE_READY, INVALID_TIMER);
+ }
+
if( flag&1 ) {
clif->updatestatus(sd,SP_SKILLPOINT);
clif->skillinfoblock(sd);
@@ -6839,13 +6858,14 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
int i=0,j=0;
int64 tick = timer->gettick();
- for(j = 0; j < 5; j++)
+ for(j = 0; j < 5; j++) {
if (sd->devotion[j]){
struct map_session_data *devsd = map->id2sd(sd->devotion[j]);
if (devsd)
status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER);
sd->devotion[j] = 0;
}
+ }
if(sd->status.pet_id > 0 && sd->pd) {
struct pet_data *pd = sd->pd;
@@ -6860,7 +6880,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
if (sd->status.hom_id > 0){
- if(battle_config.homunculus_auto_vapor && sd->hd && !sd->hd->sc.data[SC_LIGHT_OF_REGENE])
+ if(battle_config.homunculus_auto_vapor && sd->hd)
homun->vaporize(sd, HOM_ST_REST);
}
@@ -7143,6 +7163,17 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
}
}
+
+ // Remove autotrade to prevent autotrading from save point
+ if( (sd->state.standalone || sd->state.autotrade)
+ && (map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg)
+ ) {
+ sd->state.autotrade = 0;
+ sd->state.standalone = 0;
+ pc->autotrade_update(sd,PAUC_REMOVE);
+ map->quit(sd);
+ }
+
// pvp
// disable certain pvp functions on pk_mode [Valaris]
if( map->list[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {
@@ -7172,10 +7203,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
}
-
//Reset "can log out" tick.
if( battle_config.prevent_logout )
sd->canlog_tick = timer->gettick() - battle_config.prevent_logout;
+
return 1;
}
@@ -7255,7 +7286,7 @@ int pc_readparam(struct map_session_data* sd,int type)
case SP_DEFELE: val = sd->battle_status.def_ele; break;
#ifndef RENEWAL_CAST
case SP_VARCASTRATE:
-#endif
+#endif
case SP_CASTRATE:
val = sd->castrate+=val;
break;
@@ -7973,22 +8004,21 @@ int pc_setoption(struct map_session_data *sd,int type)
else if (!(type&OPTION_FALCON) && p_type&OPTION_FALCON) //Falcon OFF
clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_FALCON);
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER ) {
- if( type&OPTION_WUGRIDER && !(p_type&OPTION_WUGRIDER) ) { // Mounting
- clif->sc_load(&sd->bl,sd->bl.id,AREA,SI_WUGRIDER, 0, 0, 0);
- status_calc_pc(sd,SCO_NONE);
- } else if( !(type&OPTION_WUGRIDER) && p_type&OPTION_WUGRIDER ) { // Dismount
- clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_WUGRIDER);
- status_calc_pc(sd,SCO_NONE);
- }
+ if( type&OPTION_WUGRIDER && !(p_type&OPTION_WUGRIDER) ) { // Mounting
+ clif->sc_load(&sd->bl,sd->bl.id,AREA,SI_WUGRIDER, 0, 0, 0);
+ status_calc_pc(sd,SCO_NONE);
+ } else if( !(type&OPTION_WUGRIDER) && p_type&OPTION_WUGRIDER ) { // Dismount
+ clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_WUGRIDER);
+ status_calc_pc(sd,SCO_NONE);
}
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) {
+
+ if( (type&OPTION_MADOGEAR && !(p_type&OPTION_MADOGEAR))
+ || (!(type&OPTION_MADOGEAR) && p_type&OPTION_MADOGEAR) ) {
int i;
- if( type&OPTION_MADOGEAR && !(p_type&OPTION_MADOGEAR) )
- status_calc_pc(sd, SCO_NONE);
- else if( !(type&OPTION_MADOGEAR) && p_type&OPTION_MADOGEAR )
- status_calc_pc(sd, SCO_NONE);
- for( i = 0; i < SC_MAX; i++ ){
+ status_calc_pc(sd, SCO_NONE);
+
+ // End all SCs that can be reset when mado is taken off
+ for( i = 0; i < SC_MAX; i++ ) {
if ( !sd->sc.data[i] || !status->get_sc_type(i) )
continue;
if ( status->get_sc_type(i)&SC_MADO_NO_RESET )
@@ -8030,7 +8060,7 @@ int pc_setoption(struct map_session_data *sd,int type)
*------------------------------------------*/
int pc_setcart(struct map_session_data *sd,int type) {
#ifndef NEW_CARTS
- int cart[6] = {0x0000,OPTION_CART1,OPTION_CART2,OPTION_CART3,OPTION_CART4,OPTION_CART5};
+ int cart[6] = {OPTION_NOTHING,OPTION_CART1,OPTION_CART2,OPTION_CART3,OPTION_CART4,OPTION_CART5};
int option;
#endif
nullpo_ret(sd);
@@ -8108,19 +8138,62 @@ int pc_setriding(TBL_PC* sd, int flag)
return 0;
}
-/*==========================================
- * Give player a mado
- *------------------------------------------*/
-int pc_setmadogear(TBL_PC* sd, int flag)
-{
- if( flag ){
- if( pc->checkskill(sd,NC_MADOLICENCE) > 0 )
+/**
+ * Gives player a mado
+ * @param flag 1 Set mado
+ **/
+void pc_setmadogear( struct map_session_data *sd, int flag ) {
+ if( flag ) {
+ if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC )
pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR);
- } else if( pc_ismadogear(sd) ){
- pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
- }
+ } else if( pc_ismadogear(sd) )
+ pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
- return 0;
+ return;
+}
+
+/**
+ * Determines whether a player can attack based on status changes
+ * Why not use status_check_skilluse?
+ * "src MAY be null to indicate we shouldn't check it, this is a ground-based skill attack."
+ * Even ground-based attacks should be blocked by these statuses
+ * Called from unit_attack and unit_attack_timer_sub
+ * @retval true Can attack
+ **/
+bool pc_can_attack( struct map_session_data *sd, int target_id ) {
+ nullpo_retr(false, sd);
+
+ if( sd->sc.data[SC_BASILICA] ||
+ sd->sc.data[SC__SHADOWFORM] ||
+ sd->sc.data[SC__MANHOLE] ||
+ sd->sc.data[SC_CURSEDCIRCLE_ATKER] ||
+ sd->sc.data[SC_CURSEDCIRCLE_TARGET] ||
+ sd->sc.data[SC_COLD] ||
+ sd->sc.data[SC_ALL_RIDING] || // The client doesn't let you, this is to make cheat-safe
+ sd->sc.data[SC_TRICKDEAD] ||
+ (sd->sc.data[SC_SIREN] && sd->sc.data[SC_SIREN]->val2 == target_id) ||
+ sd->sc.data[SC_BLADESTOP] ||
+ sd->sc.data[SC_DEEP_SLEEP] ||
+ sd->sc.data[SC_FALLENEMPIRE] )
+ return false;
+
+ return true;
+}
+
+/**
+ * Determines whether a player can talk/whisper based on status changes
+ * Called from clif_parse_GlobalMessage and clif_parse_WisMessage
+ * @retval true Can talk
+ **/
+bool pc_can_talk( struct map_session_data *sd ) {
+ nullpo_retr(false, sd);
+
+ if( sd->sc.data[SC_BERSERK] ||
+ (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
+ (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
+ return false;
+
+ return true;
}
/*==========================================
@@ -9936,7 +10009,7 @@ void pc_read_skill_tree(void) {
if( a == MAX_SKILL_TREE ) {
ShowWarning("pc_read_skill_tree: '%s' can't inherit '%s', skill tree is full!\n", name,iname);
break;
- } else if ( pc->skill_tree[idx][a].id || ( pc->skill_tree[idx][a].id == NV_TRICKDEAD && ((pc->jobid2mapid(jnames[k].id)&MAPID_BASEMASK)!=MAPID_NOVICE) ) ) /* we skip trickdead for non-novices */
+ } else if ( pc->skill_tree[idx][a].id || ( pc->skill_tree[idx][a].id == NV_TRICKDEAD && ((pc->jobid2mapid(jnames[k].id)&(MAPID_BASEMASK|JOBL_2))!=MAPID_NOVICE) ) ) /* we skip trickdead for non-novices */
continue;/* skip */
memcpy(&pc->skill_tree[idx][a],&pc->skill_tree[fidx][f],sizeof(pc->skill_tree[fidx][f]));
@@ -10320,7 +10393,7 @@ int pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) {
return 0;
}
-void pc_expire_check(struct map_session_data *sd) {
+void pc_expire_check(struct map_session_data *sd) {
/* ongoing timer */
if( sd->expiration_tid != INVALID_TIMER )
return;
@@ -10621,7 +10694,7 @@ void do_init_pc(bool minimal) {
ers_chunk_size(pc->str_reg_ers, 50);
}
/*=====================================
-* Default Functions : pc.h
+* Default Functions : pc.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -10645,9 +10718,7 @@ void pc_defaults(void) {
memset(pc->exp_table, 0, sizeof(pc->exp_table)
+ sizeof(pc->max_level)
+ sizeof(pc->statp)
-#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
+ sizeof(pc->level_penalty)
-#endif
+ sizeof(pc->skill_tree)
+ sizeof(pc->smith_fame_list)
+ sizeof(pc->chemist_fame_list)
@@ -10829,6 +10900,8 @@ void pc_defaults(void) {
pc->setstand = pc_setstand;
pc->candrop = pc_candrop;
+ pc->can_talk = pc_can_talk;
+ pc->can_attack = pc_can_attack;
pc->jobid2mapid = pc_jobid2mapid; // Skotlex
pc->mapid2jobid = pc_mapid2jobid; // Skotlex
diff --git a/src/map/pc.h b/src/map/pc.h
index 3a1d15746..fcd6f39d0 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -2,26 +2,26 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PC_H_
-#define _MAP_PC_H_
+#ifndef MAP_PC_H
+#define MAP_PC_H
-#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus
-#include "../common/ers.h"
-#include "../common/timer.h" // INVALID_TIMER
-#include "atcommand.h" // AtCommandType
-#include "battle.h" // battle_config
-#include "battleground.h"
+#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT
+
+#include "battle.h" // battle
+#include "battleground.h" // enum bg_queue_types
#include "buyingstore.h" // struct s_buyingstore
-#include "itemdb.h"
-#include "log.h"
-#include "map.h" // RC_MAX
-#include "mob.h"
-#include "pc_groups.h"
-#include "script.h" // struct script_reg, struct script_regstr
+#include "itemdb.h" // MAX_ITEMDELAYS
+#include "log.h" // struct e_log_pick_type
+#include "map.h" // RC_MAX, ELE_MAX
+#include "pc_groups.h" // GroupSettings
+#include "script.h" // struct reg_db
#include "searchstore.h" // struct s_search_store_info
-#include "status.h" // OPTION_*, struct weapon_atk
-#include "unit.h" // unit_stop_attack(), unit_stop_walking()
+#include "status.h" // enum sc_type, OPTION_*
+#include "unit.h" // struct unit_data, struct view_data
#include "vending.h" // struct s_vending
+#include "../common/cbasetypes.h"
+#include "../common/ers.h" // struct eri
+#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus, NEW_CARTS
/**
* Defines
@@ -565,7 +565,7 @@ struct map_session_data {
#define pc_setsit(sd) ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 2 )
#define pc_isdead(sd) ( (sd)->state.dead_sit == 1 )
#define pc_issit(sd) ( (sd)->vd.dead_sit == 2 )
-#define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(sockt->last_tick, (sd)->idletime) >= battle_config.idle_no_share )
+#define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(sockt->last_tick, (sd)->idletime) >= battle->bc->idle_no_share )
#define pc_istrading(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading )
#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
@@ -587,9 +587,9 @@ struct map_session_data {
#define pc_isfalcon(sd) ( (sd)->sc.option&OPTION_FALCON )
#define pc_isriding(sd) ( (sd)->sc.option&OPTION_RIDING )
#define pc_isinvisible(sd) ( (sd)->sc.option&OPTION_INVISIBLE )
-#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle_config.natural_heal_weight_rate )
+#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle->bc->natural_heal_weight_rate )
#define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 )
-#define pc_maxparameter(sd) ( ((((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) || (((sd)->class_&MAPID_UPPERMASK) == MAPID_REBELLION) || (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
+#define pc_maxparameter(sd) ( (((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO || ((sd)->class_&MAPID_UPPERMASK) == MAPID_REBELLION || ((sd)->class_&MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E) ? battle->bc->max_extended_parameter : (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle->bc->max_baby_third_parameter : battle->bc->max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle->bc->max_baby_parameter : battle->bc->max_parameter) )
/**
* Ranger
**/
@@ -725,7 +725,7 @@ struct autotrade_vending {
};
/*=====================================
-* Interface : pc.h
+* Interface : pc.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -742,9 +742,8 @@ struct pc_interface {
unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL];
unsigned int max_level[CLASS_COUNT][2];
unsigned int statp[MAX_LEVEL+1];
-#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1];
-#endif
+
unsigned int equip_pos[EQI_MAX];
/* */
struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE];
@@ -772,6 +771,8 @@ struct pc_interface {
//int (*getrefinebonus) (int lv,int type); FIXME: This function does not exist, nor it is ever called
bool (*can_give_items) (struct map_session_data *sd);
bool (*can_give_bound_items) (struct map_session_data *sd);
+ bool (*can_talk) (struct map_session_data *sd);
+ bool (*can_attack) ( struct map_session_data *sd, int target_id );
bool (*can_use_command) (struct map_session_data *sd, const char *command);
int (*set_group) (struct map_session_data *sd, int group_id);
@@ -857,7 +858,7 @@ struct pc_interface {
unsigned int (*maxjoblv) (struct map_session_data *sd);
int (*checkbaselevelup) (struct map_session_data *sd);
int (*checkjoblevelup) (struct map_session_data *sd);
- int (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest);
+ bool (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest);
unsigned int (*nextbaseexp) (struct map_session_data *sd);
unsigned int (*thisbaseexp) (struct map_session_data *sd);
unsigned int (*nextjobexp) (struct map_session_data *sd);
@@ -894,7 +895,7 @@ struct pc_interface {
int (*setcart) (struct map_session_data* sd, int type);
int (*setfalcon) (struct map_session_data* sd, int flag);
int (*setriding) (struct map_session_data* sd, int flag);
- int (*setmadogear) (struct map_session_data* sd, int flag);
+ void (*setmadogear) (struct map_session_data* sd, int flag);
int (*changelook) (struct map_session_data *sd,int type,int val);
int (*equiplookall) (struct map_session_data *sd);
@@ -1025,4 +1026,4 @@ struct pc_interface *pc;
void pc_defaults(void);
-#endif /* _MAP_PC_H_ */
+#endif /* MAP_PC_H */
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index 906462c7e..e577c642f 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -2,6 +2,14 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "pc_groups.h"
+
+#include "atcommand.h" // atcommand->exists(), atcommand->load_groups()
+#include "clif.h" // clif->GM_kick()
+#include "map.h" // mapiterator
+#include "pc.h" // pc->set_group()
#include "../common/cbasetypes.h"
#include "../common/conf.h"
#include "../common/db.h"
@@ -10,12 +18,6 @@
#include "../common/showmsg.h"
#include "../common/strlib.h" // strcmp
-#include "pc_groups.h"
-#include "atcommand.h" // atcommand->exists(), atcommand->load_groups()
-#include "clif.h" // clif->GM_kick()
-#include "map.h" // mapiterator
-#include "pc.h" // pc->set_group()
-
static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd()
struct pc_groups_interface pcg_s;
@@ -181,7 +183,7 @@ static void read_config(void) {
int j, inherit_count = 0, done = 0;
if (group_settings->inheritance_done) // group already processed
- continue;
+ continue;
if ((inherit = group_settings->inherit) == NULL ||
(inherit_count = libconfig->setting_length(inherit)) <= 0) { // this group does not inherit from others
diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h
index 5c03f999f..f52e2ba22 100644
--- a/src/map/pc_groups.h
+++ b/src/map/pc_groups.h
@@ -2,8 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PC_GROUPS_H_
-#define _MAP_PC_GROUPS_H_
+#ifndef MAP_PC_GROUPS_H
+#define MAP_PC_GROUPS_H
+
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
+#include "../common/db.h"
/// PC permissions
enum e_pc_permission {
@@ -92,4 +96,4 @@ struct pc_groups_interface *pcg;
void pc_groups_defaults(void);
-#endif /* _MAP_PC_GROUPS_H_ */
+#endif /* MAP_PC_GROUPS_H */
diff --git a/src/map/pet.c b/src/map/pet.c
index c04d9267a..e083e58d1 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -2,37 +2,39 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/db.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/ers.h"
+#define HERCULES_CORE
-#include "pc.h"
-#include "status.h"
-#include "map.h"
-#include "path.h"
-#include "intif.h"
-#include "clif.h"
-#include "chrif.h"
#include "pet.h"
-#include "itemdb.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "atcommand.h" // msg_txt()
#include "battle.h"
+#include "chrif.h"
+#include "clif.h"
+#include "intif.h"
+#include "itemdb.h"
+#include "log.h"
+#include "map.h"
#include "mob.h"
#include "npc.h"
+#include "path.h"
+#include "pc.h"
#include "script.h"
#include "skill.h"
+#include "status.h"
#include "unit.h"
-#include "atcommand.h" // msg_txt()
-#include "log.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "../common/db.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct pet_interface pet_s;
@@ -97,7 +99,7 @@ int pet_unlocktarget(struct pet_data *pd)
* Pet Attack Skill [Skotlex]
*------------------------------------------*/
int pet_attackskill(struct pet_data *pd, int target_id) {
- if (!battle_config.pet_status_support || !pd->a_skill ||
+ if (!battle_config.pet_status_support || !pd->a_skill ||
(battle_config.pet_equip_required && !pd->pet.equip))
return 0;
@@ -105,7 +107,7 @@ int pet_attackskill(struct pet_data *pd, int target_id) {
return 0;
if (rnd()%100 < (pd->a_skill->rate +pd->pet.intimate*pd->a_skill->bonusrate/1000)) {
- //Skotlex: Use pet's skill
+ //Skotlex: Use pet's skill
int inf;
struct block_list *bl;
@@ -156,7 +158,7 @@ int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type)
if(pd->petDB->defence_attack_rate > 0 && rate <= 0)
rate = 1;
}
- if(rnd()%10000 < rate)
+ if(rnd()%10000 < rate)
{
if(pd->target_id == 0 || rnd()%10000 < pd->petDB->change_target_rate)
pd->target_id = bl->id;
@@ -301,7 +303,7 @@ int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
clif->additem(sd,0,0,flag);
map->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
- pd->pet.incuvate = 1;
+ pd->pet.incubate = 1;
unit->free(&pd->bl,CLR_OUTSIGHT);
status_calc_pc(sd,SCO_NONE);
@@ -317,7 +319,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
nullpo_retr(1, sd);
- Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
if(sd->status.account_id != petinfo->account_id || sd->status.char_id != petinfo->char_id) {
sd->status.pet_id = 0;
@@ -325,8 +327,8 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
}
if (sd->status.pet_id != petinfo->pet_id) {
if (sd->status.pet_id) {
- //Wrong pet?? Set incuvate to no and send it back for saving.
- petinfo->incuvate = 1;
+ //Wrong pet?? Set incubate to no and send it back for saving.
+ petinfo->incubate = 1;
intif->save_petdata(sd->status.account_id,petinfo);
sd->status.pet_id = 0;
return 1;
@@ -388,14 +390,14 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo)
{
nullpo_retr(1, sd);
- Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
- if(sd->status.pet_id && petinfo->incuvate == 1) {
+ if(sd->status.pet_id && petinfo->incubate == 1) {
sd->status.pet_id = 0;
return 1;
}
- petinfo->incuvate = 0;
+ petinfo->incubate = 0;
petinfo->account_id = sd->status.account_id;
petinfo->char_id = sd->status.char_id;
sd->status.pet_id = petinfo->pet_id;
@@ -416,7 +418,7 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo)
clif->send_petdata(NULL, sd->pd, 3, sd->pd->vd.head_bottom);
clif->send_petstatus(sd);
}
- Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
return 0;
}
@@ -431,7 +433,7 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag) {
sd->status.pet_id = 0;
return 1;
}
- if(p->incuvate == 1) {
+ if(p->incubate == 1) {
int i;
//Delete egg from inventory. [Skotlex]
for (i = 0; i < MAX_INVENTORY; i++) {
@@ -537,25 +539,38 @@ int pet_catch_process2(struct map_session_data* sd, int target_id) {
return 0;
}
-///This function is invoked when a new pet has been created, and at no other time!
-int pet_get_egg(int account_id,int pet_id,int flag) {
+/**
+ * Is invoked _only_ when a new pet has been created is a product of packet 0x3880
+ * see mapif_pet_created@int_pet.c for more information
+ * Handles new pet data from inter-server and prepares item information
+ * to add pet egg
+ *
+ * pet_id - Should contain pet id otherwise means failure
+ * returns true on success
+ **/
+bool pet_get_egg(int account_id, short pet_class, int pet_id ) {
struct map_session_data *sd;
struct item tmp_item;
- int i=0,ret=0;
+ int i = 0, ret = 0;
- if(flag)
- return 0;
-
- sd = map->id2sd(account_id);
- if(sd == NULL)
- return 0;
+ if( pet_id == 0 || pet_class == 0 )
+ return false;
- i = pet->search_petDB_index(sd->catch_target_class,PET_CLASS);
+ sd = map->id2sd(account_id);
+ if( sd == NULL )
+ return false;
+
+ // i = pet->search_petDB_index(sd->catch_target_class,PET_CLASS);
+ // issue: 8150
+ // Before this change in cases where more than one pet egg were requested in a short
+ // period of time it wasn't possible to know which kind of egg was being requested after
+ // the first request. [Panikon]
+ i = pet->search_petDB_index(pet_class,PET_CLASS);
sd->catch_target_class = -1;
if(i < 0) {
intif->delete_petdata(pet_id);
- return 0;
+ return false;
}
memset(&tmp_item,0,sizeof(tmp_item));
@@ -570,7 +585,7 @@ int pet_get_egg(int account_id,int pet_id,int flag) {
map->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
- return 1;
+ return true;
}
int pet_menu(struct map_session_data *sd,int menunum)
@@ -581,12 +596,12 @@ int pet_menu(struct map_session_data *sd,int menunum)
return 1;
//You lost the pet already.
- if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incuvate)
+ if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incubate)
return 1;
egg_id = itemdb->exists(sd->pd->petDB->EggID);
if (egg_id) {
- if ((egg_id->flag.trade_restriction&0x01) && !pc->inventoryblank(sd)) {
+ if ((egg_id->flag.trade_restriction&ITR_NODROP) && !pc->inventoryblank(sd)) {
clif->message(sd->fd, msg_txt(451)); // You can't return your pet because your inventory is full.
return 1;
}
@@ -897,7 +912,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
(pd->ud.attacktimer != INVALID_TIMER || pd->ud.walktimer != INVALID_TIMER))
return 0; //Target already locked.
- if (target->type != BL_ITEM)
+ if (target->type != BL_ITEM)
{ //enemy targetted
if(!battle->check_range(&pd->bl,target,pd->status.rhw.range))
{ //Chase
@@ -919,7 +934,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
memcpy(&pd->loot->item[pd->loot->count++],&fitem->item_data,sizeof(pd->loot->item[0]));
pd->loot->weight += itemdb_weight(fitem->item_data.nameid)*fitem->item_data.amount;
map->clearflooritem(target);
- }
+ }
//Target is unlocked regardless of whether it was picked or not.
pet->unlocktarget(pd);
}
@@ -1035,7 +1050,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
/*==========================================
* pet bonus giving skills [Valaris] / Rewritten by [Skotlex]
- *------------------------------------------*/
+ *------------------------------------------*/
int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
@@ -1076,7 +1091,7 @@ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
/*==========================================
* pet recovery skills [Valaris] / Rewritten by [Skotlex]
- *------------------------------------------*/
+ *------------------------------------------*/
int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
@@ -1092,7 +1107,7 @@ int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
}
if(sd->sc.data[pd->recovery->type])
- { //Display a heal animation?
+ { //Display a heal animation?
//Detoxify is chosen for now.
clif->skill_nodamage(&pd->bl,&sd->bl,TF_DETOXIFY,1,1);
status_change_end(&sd->bl, pd->recovery->type, INVALID_TIMER);
@@ -1140,7 +1155,7 @@ int pet_heal_timer(int tid, int64 tick, int id, intptr_t data) {
/*==========================================
* pet support skills [Skotlex]
- *------------------------------------------*/
+ *------------------------------------------*/
int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
@@ -1187,12 +1202,12 @@ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
* Pet read db data
* pet->db.txt
* pet->db2.txt
- *------------------------------------------*/
+ *------------------------------------------*/
int read_petdb()
{
char* filename[] = {"pet_db.txt","pet_db2.txt"};
FILE *fp;
- int nameid,i,j,k;
+ int nameid,i,j,k;
// Remove any previous scripts in case reloaddb was invoked.
for( j = 0; j < MAX_PET_DB; j++ )
@@ -1314,9 +1329,9 @@ int read_petdb()
pet->db[j].equip_script = NULL;
if( *str[20] )
- pet->db[j].pet_script = script->parse(str[20], filename[i], lines, 0);
+ pet->db[j].pet_script = script->parse(str[20], filename[i], lines, 0, NULL);
if( *str[21] )
- pet->db[j].equip_script = script->parse(str[21], filename[i], lines, 0);
+ pet->db[j].equip_script = script->parse(str[21], filename[i], lines, 0, NULL);
j++;
entries++;
diff --git a/src/map/pet.h b/src/map/pet.h
index 537a50c4b..5c890ef85 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -2,11 +2,17 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PET_H_
-#define _MAP_PET_H_
+#ifndef MAP_PET_H
+#define MAP_PET_H
-#define MAX_PET_DB 300
-#define MAX_PETLOOT_SIZE 30
+#include "map.h" // struct block_list
+#include "status.h" // enum sc_type
+#include "unit.h" // struct unit_data
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h" // NAME_LENGTH, struct s_pet
+
+#define MAX_PET_DB 300
+#define MAX_PETLOOT_SIZE 30
struct s_pet_db {
short class_;
@@ -127,7 +133,7 @@ struct pet_interface {
int (*select_egg) (struct map_session_data *sd, short egg_index);
int (*catch_process1) (struct map_session_data *sd, int target_class);
int (*catch_process2) (struct map_session_data *sd, int target_id);
- int (*get_egg) (int account_id, int pet_id, int flag);
+ bool (*get_egg) (int account_id, short pet_class, int pet_id );
int (*unequipitem) (struct map_session_data *sd, struct pet_data *pd);
int (*food) (struct map_session_data *sd, struct pet_data *pd);
int (*ai_sub_hard_lootsearch) (struct block_list *bl, va_list ap);
@@ -152,4 +158,4 @@ struct pet_interface *pet;
void pet_defaults(void);
-#endif /* _MAP_PET_H_ */
+#endif /* MAP_PET_H */
diff --git a/src/map/quest.c b/src/map/quest.c
index bde276f9d..b76d6bc82 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -2,36 +2,37 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
+#define HERCULES_CORE
-#include "map.h"
-#include "pc.h"
-#include "npc.h"
-#include "itemdb.h"
-#include "script.h"
-#include "intif.h"
-#include "battle.h"
-#include "mob.h"
-#include "party.h"
-#include "unit.h"
-#include "log.h"
-#include "clif.h"
#include "quest.h"
-#include "chrif.h"
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdarg.h>
#include <time.h>
+#include "battle.h"
+#include "chrif.h"
+#include "clif.h"
+#include "intif.h"
+#include "itemdb.h"
+#include "log.h"
+#include "map.h"
+#include "mob.h"
+#include "npc.h"
+#include "party.h"
+#include "pc.h"
+#include "script.h"
+#include "unit.h"
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct quest_interface quest_s;
diff --git a/src/map/quest.h b/src/map/quest.h
index e01e35619..9d617e369 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -2,8 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_QUEST_H_
-#define _MAP_QUEST_H_
+#ifndef MAP_QUEST_H
+#define MAP_QUEST_H
+
+#include "map.h" // TBL_PC
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES
#define MAX_QUEST_DB (60355+1) // Highest quest ID + 1
@@ -48,4 +52,4 @@ struct quest_interface *quest;
void quest_defaults(void);
-#endif /* _MAP_QUEST_H_ */
+#endif /* MAP_QUEST_H */
diff --git a/src/map/script.c b/src/map/script.c
index 312e40696..9fe746c8c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2,58 +2,63 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "../config/core.h" // RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL
+#include "script.h"
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "atcommand.h"
+#include "battle.h"
+#include "battleground.h"
+#include "chat.h"
+#include "chrif.h"
+#include "clif.h"
+#include "elemental.h"
+#include "guild.h"
+#include "homunculus.h"
+#include "instance.h"
+#include "intif.h"
+#include "itemdb.h"
+#include "log.h"
+#include "mail.h"
+#include "map.h"
+#include "mapreg.h"
+#include "mercenary.h"
+#include "mob.h"
+#include "npc.h"
+#include "party.h"
+#include "path.h"
+#include "pc.h"
+#include "pet.h"
+#include "pet.h"
+#include "quest.h"
+#include "skill.h"
+#include "status.h"
+#include "status.h"
+#include "storage.h"
+#include "unit.h"
#include "../common/cbasetypes.h"
#include "../common/malloc.h"
#include "../common/md5calc.h"
+#include "../common/mmo.h" // NEW_CARTS
#include "../common/nullpo.h"
#include "../common/random.h"
#include "../common/showmsg.h"
#include "../common/socket.h" // usage: getcharip
#include "../common/strlib.h"
+#include "../common/sysinfo.h"
#include "../common/timer.h"
#include "../common/utils.h"
-#include "map.h"
-#include "path.h"
-#include "clif.h"
-#include "chrif.h"
-#include "itemdb.h"
-#include "pc.h"
-#include "status.h"
-#include "storage.h"
-#include "mob.h"
-#include "npc.h"
-#include "pet.h"
-#include "mapreg.h"
-#include "homunculus.h"
-#include "instance.h"
-#include "mercenary.h"
-#include "intif.h"
-#include "skill.h"
-#include "status.h"
-#include "chat.h"
-#include "battle.h"
-#include "battleground.h"
-#include "party.h"
-#include "guild.h"
-#include "atcommand.h"
-#include "log.h"
-#include "unit.h"
-#include "pet.h"
-#include "mail.h"
-#include "script.h"
-#include "quest.h"
-#include "elemental.h"
-#include "../config/core.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
#ifndef WIN32
#include <sys/time.h>
#endif
-#include <time.h>
static inline int GETVALUE(const unsigned char* buf, int i) {
return (int)MakeDWord(MakeWord(buf[i], buf[i+1]), MakeWord(buf[i+2], 0));
@@ -1497,9 +1502,9 @@ const char* parse_syntax(const char* p)
script->set_label(l,script->pos,p);
}
// check duplication of case label [Rayce]
- if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v)) != NULL)
+ if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v)) != NULL)
disp_error_message("parse_syntax: dup 'case'",p);
- linkdb_insert(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v), (void*)1);
+ linkdb_insert(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v), (void*)1);
sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
@@ -2241,8 +2246,7 @@ void script_warning(const char* src, const char* file, int start_line, const cha
/*==========================================
* Analysis of the script
*------------------------------------------*/
-struct script_code* parse_script(const char *src,const char *file,int line,int options)
-{
+struct script_code* parse_script(const char *src,const char *file,int line,int options, int *retval) {
const char *p,*tmpp;
int i;
struct script_code* code = NULL;
@@ -2288,6 +2292,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
script->parser_current_file = NULL;
script->parser_current_line = 0;
#endif // ENABLE_CASE_CHECK
+ if (retval) *retval = EXIT_FAILURE;
return NULL;
}
@@ -2314,8 +2319,10 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
}
else
{// requires brackets around the script
- if( *p != '{' )
+ if( *p != '{' ) {
disp_error_message("not found '{'",p);
+ if (retval) *retval = EXIT_FAILURE;
+ }
p = script->skip_space(p+1);
if( *p == '}' && !(options&SCRIPT_RETURN_EMPTY_SCRIPT) )
{// empty script and can return NULL
@@ -2390,13 +2397,14 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
else if( script->str_data[i].type == C_USERFUNC )
{// 'function name;' without follow-up code
ShowError("parse_script: function '%s' declared but not defined.\n", script->str_buf+script->str_data[i].str);
+ if (retval) *retval = EXIT_FAILURE;
unresolved_names = true;
}
}
- if( unresolved_names )
- {
+ if( unresolved_names ) {
disp_error_message("parse_script: unresolved function references", p);
+ if (retval) *retval = EXIT_FAILURE;
}
#ifdef SCRIPT_DEBUG_DISP
@@ -2619,7 +2627,7 @@ void* get_val2(struct script_state* st, int64 uid, struct reg_db *ref) {
script->push_val(st->stack, C_NAME, uid, ref);
data = script_getdatatop(st, -1);
script->get_val(st, data);
- return (data->type == C_INT ? (void*)__64BPTRSIZE((int32)data->u.num) : (void*)__64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val
+ return (data->type == C_INT ? (void*)h64BPTRSIZE((int32)data->u.num) : (void*)h64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val
}
/**
* Because, currently, array members with key 0 are indifferenciable from normal variables, we should ensure its actually in
@@ -2640,7 +2648,7 @@ void script_array_ensure_zero(struct script_state *st, struct map_session_data *
insert = true;
script_removetop(st, -1, 0);
} else {
- int32 num = (int32)__64BPTRSIZE(script->get_val2(st, uid, ref));
+ int32 num = (int32)h64BPTRSIZE(script->get_val2(st, uid, ref));
if( num )
insert = true;
script_removetop(st, -1, 0);
@@ -2757,7 +2765,7 @@ void script_array_add_member(struct script_array *sa, unsigned int idx) {
}
/**
* Obtains the source of the array database for this type and scenario
- * Initializes such database when not yet initialised.
+ * Initializes such database when not yet initialized.
**/
struct reg_db *script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) {
struct reg_db *src = NULL;
@@ -2907,14 +2915,20 @@ int set_reg(struct script_state* st, TBL_PC* sd, int64 num, const char* name, co
return pc_setglobalreg_str(sd, num, str);
}
} else {// integer variable
- int val = (int)__64BPTRSIZE(value);
+ // FIXME: This isn't safe, in 32bits systems we're converting a 64bit pointer
+ // to a 32bit int, this will lead to overflows! [Panikon]
+ int val = (int)h64BPTRSIZE(value);
if(script->str_data[script_getvarid(num)].type == C_PARAM) {
if( pc->setparam(sd, script->str_data[script_getvarid(num)].val, val) == 0 ) {
if( st != NULL ) {
ShowError("script:set_reg: failed to set param '%s' to %d.\n", name, val);
script->reportsrc(st);
- st->state = END;
+ // Instead of just stop the script execution we let the character close
+ // the window if it was open.
+ st->state = (sd->state.dialog) ? CLOSE : END;
+ if( st->state == CLOSE )
+ clif->scriptclose(sd, st->oid);
}
return 0;
}
@@ -3216,6 +3230,8 @@ void script_free_vars(struct DBMap* var_storage) {
void script_free_code(struct script_code* code)
{
+ nullpo_retv(code);
+
if( code->instances )
script->stop_instances(code);
else {
@@ -4200,7 +4216,7 @@ void script_run_autobonus(const char *autobonus, int id, int pos)
void script_add_autobonus(const char *autobonus)
{
if( strdb_get(script->autobonus_db, autobonus) == NULL ) {
- struct script_code *scriptroot = script->parse(autobonus, "autobonus", 0, 0);
+ struct script_code *scriptroot = script->parse(autobonus, "autobonus", 0, 0, NULL);
if( scriptroot )
strdb_put(script->autobonus_db, autobonus, scriptroot);
@@ -4499,6 +4515,8 @@ int script_reload(void) {
itemdb->name_constants();
+ sysinfo->vcsrevision_reload();
+
return 0;
}
/* returns name of current function being run, from within the stack [Ind/Hercules] */
@@ -5647,7 +5665,7 @@ BUILDIN(input)
else
{
int amount = sd->npc_amount;
- script->set_reg(st, sd, uid, name, (void*)__64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2));
+ script->set_reg(st, sd, uid, name, (void*)h64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2));
script_pushint(st, (amount > max ? 1 : amount < min ? -1 : 0));
}
st->state = RUN;
@@ -5735,7 +5753,7 @@ BUILDIN(setr) {
if( is_string_variable(name) )
script->set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2));
else
- script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
+ script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
return true;
}
@@ -5790,7 +5808,7 @@ BUILDIN(setarray)
else
{// int array
for( i = 3; start < end; ++start, ++i )
- script->set_reg(st, sd, reference_uid(id, start), name, (void*)__64BPTRSIZE(script_getnum(st,i)), reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, (void*)h64BPTRSIZE(script_getnum(st,i)), reference_getref(data));
}
return true;
}
@@ -5832,7 +5850,7 @@ BUILDIN(cleararray)
if( is_string_variable(name) )
v = (void*)script_getstr(st, 3);
else
- v = (void*)__64BPTRSIZE(script_getnum(st, 3));
+ v = (void*)h64BPTRSIZE(script_getnum(st, 3));
end = start + script_getnum(st, 4);
if( end > SCRIPT_MAX_ARRAYSIZE )
@@ -6190,10 +6208,8 @@ BUILDIN(countitem) {
struct item_data* id = NULL;
TBL_PC* sd = script->rid2sd(st);
- if (!sd) {
- script_pushint(st,0);
+ if( !sd )
return true;
- }
if( script_isstringtype(st, 2) ) {
// item name
@@ -6230,10 +6246,8 @@ BUILDIN(countitem2) {
struct item_data* id = NULL;
TBL_PC* sd = script->rid2sd(st);
- if (!sd) {
- script_pushint(st,0);
+ if( !sd )
return true;
- }
if( script_isstringtype(st, 2) ) {
// item name
@@ -6377,7 +6391,9 @@ BUILDIN(checkweight2)
int nb_it, nb_nb; //array size
TBL_PC *sd = script->rid2sd(st);
- nullpo_retr(false,sd);
+
+ if( sd == NULL )
+ return false;
data_it = script_getdata(st, 2);
data_nb = script_getdata(st, 3);
@@ -6409,9 +6425,9 @@ BUILDIN(checkweight2)
slots = pc->inventoryblank(sd);
for(i=0; i<nb_it; i++) {
- nameid = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it)));
+ nameid = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it)));
script_removetop(st, -1, 0);
- amount = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb)));
+ amount = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb)));
script_removetop(st, -1, 0);
if(fail) continue; //cpntonie to depop rest
@@ -6711,11 +6727,8 @@ BUILDIN(getnameditem) {
TBL_PC *sd, *tsd;
sd = script->rid2sd(st);
- if (sd == NULL) {
- //Player not attached!
- script_pushint(st,0);
+ if (sd == NULL) // Player not attached!
return true;
- }
if( script_isstringtype(st, 2) ) {
const char *name = script_getstr(st, 2);
@@ -7410,10 +7423,9 @@ BUILDIN(strcharinfo)
struct party_data* p;
sd=script->rid2sd(st);
- if (!sd) { //Avoid crashing....
- script_pushconststr(st,"");
+ if (!sd) //Avoid crashing....
return true;
- }
+
num=script_getnum(st,2);
switch(num) {
case 0:
@@ -7964,6 +7976,9 @@ BUILDIN(delequip)
if(i >= 0) {
pc->unequipitem(sd,i,3); //recalculate bonus
pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
+ script_pushint(st,1);
+ } else {
+ script_pushint(st,0);
}
return true;
@@ -8263,20 +8278,36 @@ BUILDIN(addtoskill) {
/// guildskill <skill id>,<amount>;
/// guildskill "<skill name>",<amount>;
BUILDIN(guildskill) {
- int id;
+ int skill_id, id, max_points;
int level;
+
TBL_PC* sd;
- int i;
+ struct guild *gd;
+ struct guild_skill gd_skill;
sd = script->rid2sd(st);
if( sd == NULL )
- return true;// no player attached, report source
+ return false; // no player attached, report source
- id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+ if( (gd = sd->guild) == NULL )
+ return true;
+
+ skill_id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
level = script_getnum(st,3);
- for( i=0; i < level; i++ )
- guild->skillup(sd, id);
+ id = skill_id - GD_SKILLBASE;
+ max_points = guild->skill_get_max(skill_id);
+
+ if( (gd->skill[id].lv + level) > max_points )
+ level = max_points - gd->skill[id].lv;
+
+ if( level <= 0 )
+ return true;
+
+ memcpy(&gd_skill, &(gd->skill[id]), sizeof(gd->skill[id]));
+ gd_skill.lv += level;
+
+ intif->guild_change_basicinfo( gd->guild_id, GBI_SKILLLV, &(gd_skill), sizeof(gd_skill) );
return true;
}
@@ -8935,7 +8966,7 @@ BUILDIN(getexp)
base = (int) cap_value(base * bonus, 0, INT_MAX);
job = (int) cap_value(job * bonus, 0, INT_MAX);
- pc->gainexp(sd, NULL, base, job, true);
+ pc->gainexp(sd, &sd->bl, base, job, true);
return true;
}
@@ -9722,8 +9753,13 @@ BUILDIN(itemeffect) {
TBL_PC *sd;
struct item_data *item_data;
- nullpo_retr( false, ( sd = script->rid2sd( st ) ) );
- nullpo_retr( false, ( nd = (TBL_NPC *)map->id2bl( sd->npc_id ) ) );
+ sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
+ nd = (TBL_NPC *)map->id2bl(sd->npc_id);
+ if( nd == NULL )
+ return false;
if( script_isstringtype(st, 2) ) {
const char *name = script_getstr(st, 2);
@@ -10404,10 +10440,8 @@ BUILDIN(eaclass)
else {
TBL_PC *sd;
sd=script->rid2sd(st);
- if (!sd) {
- script_pushint(st,-1);
+ if( !sd )
return true;
- }
class_ = sd->status.class_;
}
script_pushint(st,pc->jobid2mapid(class_));
@@ -10478,6 +10512,8 @@ BUILDIN(resetstatus)
{
TBL_PC *sd;
sd=script->rid2sd(st);
+ if( sd == NULL )
+ return false;
pc->resetstate(sd);
return true;
}
@@ -10489,6 +10525,8 @@ BUILDIN(resetskill)
{
TBL_PC *sd;
sd=script->rid2sd(st);
+ if( sd == NULL )
+ return false;
pc->resetskill(sd,1);
return true;
}
@@ -10500,6 +10538,8 @@ BUILDIN(skillpointcount)
{
TBL_PC *sd;
sd=script->rid2sd(st);
+ if( sd == NULL )
+ return false;
script_pushint(st,sd->status.skill_point + pc->resetskill(sd,2));
return true;
}
@@ -10550,6 +10590,9 @@ BUILDIN(changesex)
TBL_PC *sd = NULL;
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
pc->resetskill(sd,4);
// to avoid any problem with equipment and invalid sex, equipment is unequiped.
for( i=0; i<EQI_MAX; i++ )
@@ -11017,7 +11060,7 @@ BUILDIN(setmapflag) {
char empty[1] = "\0";
char params[MAP_ZONE_MAPFLAG_LENGTH];
memcpy(params, val2, MAP_ZONE_MAPFLAG_LENGTH);
- npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty);
+ npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty, NULL);
}
break;
case MF_NOCOMMAND: map->list[m].nocommand = (val <= 0) ? 100 : val; break;
@@ -11501,6 +11544,10 @@ BUILDIN(getequipcardcnt)
num=script_getnum(st,2);
sd=script->rid2sd(st);
+
+ if( sd == NULL )
+ return false;
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
@@ -11533,6 +11580,9 @@ BUILDIN(successremovecards) {
TBL_PC* sd = script->rid2sd(st);
int num = script_getnum(st,2);
+ if( sd == NULL )
+ return false;
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
@@ -11600,6 +11650,9 @@ BUILDIN(failedremovecards) {
int num = script_getnum(st,2);
int typefail = script_getnum(st,3);
+ if( sd == NULL )
+ return false;
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
@@ -11746,12 +11799,11 @@ BUILDIN(mobcount) {
if( strcmp(mapname, "this") == 0 ) {
struct map_session_data *sd = script->rid2sd(st);
- if( sd )
- m = sd->bl.m;
- else {
- script_pushint(st,-1);
- return true;
- }
+
+ if( sd == NULL )
+ return false;
+
+ m = sd->bl.m;
} else if( (m = map->mapname2mapid(mapname)) < 0 ) {
script_pushint(st,-1);
return true;
@@ -11783,10 +11835,10 @@ BUILDIN(wedding_effect) {
TBL_PC *sd=script->rid2sd(st);
struct block_list *bl;
- if(sd==NULL) {
- bl=map->id2bl(st->oid);
- } else
- bl=&sd->bl;
+ if( sd == NULL )
+ return false; //bl=map->id2bl(st->oid);
+
+ bl=&sd->bl;
clif->wedding_effect(bl);
return true;
}
@@ -11816,10 +11868,8 @@ BUILDIN(ispartneron) {
BUILDIN(getpartnerid) {
TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
script_pushint(st,sd->status.partner_id);
return true;
@@ -11827,10 +11877,8 @@ BUILDIN(getpartnerid) {
BUILDIN(getchildid) {
TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
script_pushint(st,sd->status.child);
return true;
@@ -11838,10 +11886,8 @@ BUILDIN(getchildid) {
BUILDIN(getmotherid) {
TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
script_pushint(st,sd->status.mother);
return true;
@@ -11849,10 +11895,8 @@ BUILDIN(getmotherid) {
BUILDIN(getfatherid) {
TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
script_pushint(st,sd->status.father);
return true;
@@ -12177,6 +12221,10 @@ BUILDIN(getequipcardid)
num=script_getnum(st,2);
slot=script_getnum(st,3);
sd=script->rid2sd(st);
+
+ if( sd == NULL )
+ return false;
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0 && slot>=0 && slot<4)
@@ -12364,18 +12412,18 @@ BUILDIN(undisguise)
}
/*==========================================
- * Transform a bl to another _class,
+ * Transform a bl to another class,
* @type unused
*------------------------------------------*/
BUILDIN(classchange) {
- int _class,type;
+ int class_,type;
struct block_list *bl=map->id2bl(st->oid);
if(bl==NULL) return true;
- _class=script_getnum(st,2);
+ class_=script_getnum(st,2);
type=script_getnum(st,3);
- clif->class_change(bl,_class,type);
+ clif->class_change(bl,class_,type);
return true;
}
@@ -12722,6 +12770,9 @@ BUILDIN(skilleffect) {
uint16 skill_lv=script_getnum(st,3);
sd=script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
/* ensure we're standing because the following packet causes the client to virtually set the char to stand,
* which leaves the server thinking it still is sitting. */
if( pc_issit(sd) ) {
@@ -12785,12 +12836,14 @@ BUILDIN(specialeffect) {
}
BUILDIN(specialeffect2) {
- TBL_PC *sd=script->rid2sd(st);
+ TBL_PC *sd;
int type = script_getnum(st,2);
enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA;
if( script_hasdata(st,4) )
sd = map->nick2sd(script_getstr(st,4));
+ else
+ sd = script->rid2sd(st);
if (sd)
clif->specialeffect(&sd->bl, type, target);
@@ -12836,6 +12889,8 @@ BUILDIN(atcommand) {
if (st->rid) {
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
fd = sd->fd;
} else { //Use a dummy character.
sd = dummy_sd = pc->get_dummy_sd();
@@ -12977,10 +13032,8 @@ BUILDIN(getmercinfo) {
return false;
}
} else {
- if( ( sd = script->rid2sd(st) ) == NULL ) {
- script_pushnil(st);
+ if( ( sd = script->rid2sd(st) ) == NULL )
return true;
- }
}
md = ( sd->status.mer_id && sd->md ) ? sd->md : NULL;
@@ -13016,25 +13069,27 @@ BUILDIN(getmercinfo) {
*------------------------------------------*/
BUILDIN(checkequipedcard)
{
+ int n,i,c=0;
TBL_PC *sd=script->rid2sd(st);
- if(sd) {
- int n,i,c=0;
- c=script_getnum(st,2);
+ if( sd == NULL )
+ return false;
- for(i=0;i<MAX_INVENTORY;i++) {
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount && sd->inventory_data[i]) {
- if (itemdb_isspecial(sd->status.inventory[i].card[0]))
- continue;
- for(n=0;n<sd->inventory_data[i]->slot;n++) {
- if(sd->status.inventory[i].card[n]==c) {
- script_pushint(st,1);
- return true;
- }
+ c = script_getnum(st,2);
+
+ for( i=0; i<MAX_INVENTORY; i++) {
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount && sd->inventory_data[i]) {
+ if (itemdb_isspecial(sd->status.inventory[i].card[0]))
+ continue;
+ for(n=0;n<sd->inventory_data[i]->slot;n++) {
+ if(sd->status.inventory[i].card[n]==c) {
+ script_pushint(st,1);
+ return true;
}
}
}
}
+
script_pushint(st,0);
return true;
}
@@ -13174,6 +13229,8 @@ BUILDIN(getlook)
int type,val;
TBL_PC *sd;
sd=script->rid2sd(st);
+ if( sd == NULL )
+ return false;
type=script_getnum(st,2);
val = -1;
@@ -13203,10 +13260,8 @@ BUILDIN(getsavepoint)
int type;
sd = script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
type = script_getnum(st,2);
@@ -13384,7 +13439,7 @@ BUILDIN(getmapxy)
sd=script->rid2sd(st);
else
sd=NULL;
- script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(x),script_getref(st,3));
+ script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(x),script_getref(st,3));
//Set MapY
num=st->stack->stack_data[st->start+4].u.num;
@@ -13395,7 +13450,7 @@ BUILDIN(getmapxy)
sd=script->rid2sd(st);
else
sd=NULL;
- script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(y),script_getref(st,4));
+ script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(y),script_getref(st,4));
//Return Success value
script_pushint(st,0);
@@ -13421,7 +13476,7 @@ BUILDIN(logmes)
BUILDIN(summon)
{
- int _class, timeout=0;
+ int class_, timeout=0;
const char *str,*event="";
TBL_PC *sd;
struct mob_data *md;
@@ -13431,7 +13486,7 @@ BUILDIN(summon)
if (!sd) return true;
str = script_getstr(st,2);
- _class = script_getnum(st,3);
+ class_ = script_getnum(st,3);
if( script_hasdata(st,4) )
timeout=script_getnum(st,4);
if( script_hasdata(st,5) ) {
@@ -13441,7 +13496,7 @@ BUILDIN(summon)
clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
- md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, class_, event, SZ_MEDIUM, AI_NONE);
if (md) {
md->master_id=sd->bl.id;
md->special_state.ai = AI_ATTACK;
@@ -13479,10 +13534,8 @@ BUILDIN(isequippedcnt)
int ret = 0;
sd = script->rid2sd(st);
- if (!sd) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
for (i=0; id!=0; i++) {
script_fetch(st,i+2, id);
@@ -13535,10 +13588,8 @@ BUILDIN(isequipped)
sd = script->rid2sd(st);
- if (!sd) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
setitem_hash = sd->bonus.setitem_hash;
setitem_hash2 = sd->bonus.setitem_hash2;
@@ -13616,6 +13667,9 @@ BUILDIN(cardscnt) {
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
for (i=0; id!=0; i++) {
script_fetch(st,i+2, id);
if (id <= 0)
@@ -13650,10 +13704,12 @@ BUILDIN(cardscnt) {
*-------------------------------------------------------*/
BUILDIN(getrefine) {
TBL_PC *sd;
- if ((sd = script->rid2sd(st))!= NULL)
- script_pushint(st,sd->status.inventory[status->current_equip_item_index].refine);
- else
- script_pushint(st,0);
+
+ sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
+ script_pushint(st,sd->status.inventory[status->current_equip_item_index].refine);
return true;
}
@@ -13696,6 +13752,8 @@ BUILDIN(equip)
struct item_data *item_data;
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
nameid=script_getnum(st,2);
if((item_data = itemdb->exists(nameid)) == NULL)
@@ -14342,7 +14400,7 @@ BUILDIN(sscanf) {
if(sscanf(str, buf, &ref_int)==0) {
break;
}
- script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)__64BPTRSIZE(ref_int), reference_getref(data));
+ script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)h64BPTRSIZE(ref_int), reference_getref(data));
}
arg++;
@@ -14709,7 +14767,7 @@ BUILDIN(setd)
if( is_string_variable(varname) ) {
script->setd_sub(st, sd, varname, elem, (void *)script_getstr(st, 3), NULL);
} else {
- script->setd_sub(st, sd, varname, elem, (void *)__64BPTRSIZE(script_getnum(st, 3)), NULL);
+ script->setd_sub(st, sd, varname, elem, (void *)h64BPTRSIZE(script_getnum(st, 3)), NULL);
}
return true;
@@ -14733,11 +14791,8 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
name = reference_getname(data);
if( not_server_variable(*name) && sd == NULL ) { // requires a player
sd = script->rid2sd(st);
- if( sd == NULL ) { // no player attached
- script->reportdata(data);
- st->state = END;
+ if( sd == NULL )// no player attached
return false;
- }
}
} else {
ShowError("script:query_sql: not a variable\n");
@@ -14786,7 +14841,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
if( is_string_variable(name) )
script->setd_sub(st, sd, name, i, (void *)(str?str:""), reference_getref(data));
else
- script->setd_sub(st, sd, name, i, (void *)__64BPTRSIZE((str?atoi(str):0)), reference_getref(data));
+ script->setd_sub(st, sd, name, i, (void *)h64BPTRSIZE((str?atoi(str):0)), reference_getref(data));
}
}
if( i == max_rows && max_rows < SQL->NumRows(handle) ) {
@@ -14881,10 +14936,8 @@ BUILDIN(callshop)
const char *shopname;
int flag = 0;
sd = script->rid2sd(st);
- if (!sd) {
- script_pushint(st,0);
- return true;
- }
+ if( sd == NULL )
+ return false;
shopname = script_getstr(st, 2);
if( script_hasdata(st,3) )
flag = script_getnum(st,3);
@@ -15076,7 +15129,7 @@ BUILDIN(setitemscript)
if(*dstscript)
script->free_code(*dstscript);
- *dstscript = new_bonus_script[0] ? script->parse(new_bonus_script, "script_setitemscript", 0, 0) : NULL;
+ *dstscript = new_bonus_script[0] ? script->parse(new_bonus_script, "script_setitemscript", 0, 0, NULL) : NULL;
script_pushint(st,1);
return true;
}
@@ -15342,7 +15395,7 @@ BUILDIN(searchitem)
for( i = 0; i < count; ++start, ++i )
{// Set array
- void* v = (void*)__64BPTRSIZE((int)items[i]->nameid);
+ void* v = (void*)h64BPTRSIZE((int)items[i]->nameid);
script->set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data));
}
@@ -16204,7 +16257,9 @@ BUILDIN(setquest) {
struct map_session_data *sd = script->rid2sd(st);
unsigned short i;
int quest_id;
- nullpo_retr(false,sd);
+
+ if( sd == NULL )
+ return false;
quest_id = script_getnum(st, 2);
@@ -16227,7 +16282,9 @@ BUILDIN(setquest) {
BUILDIN(erasequest) {
struct map_session_data *sd = script->rid2sd(st);
- nullpo_retr(false,sd);
+
+ if( sd == NULL )
+ return false;
quest->delete(sd, script_getnum(st, 2));
return true;
@@ -16235,7 +16292,9 @@ BUILDIN(erasequest) {
BUILDIN(completequest) {
struct map_session_data *sd = script->rid2sd(st);
- nullpo_retr(false,sd);
+
+ if( sd == NULL )
+ return false;
quest->update_status(sd, script_getnum(st, 2), Q_COMPLETE);
return true;
@@ -16243,7 +16302,9 @@ BUILDIN(completequest) {
BUILDIN(changequest) {
struct map_session_data *sd = script->rid2sd(st);
- nullpo_retr(false,sd);
+
+ if( sd == NULL )
+ return false;
quest->change(sd, script_getnum(st, 2),script_getnum(st, 3));
return true;
@@ -16253,7 +16314,8 @@ BUILDIN(checkquest) {
struct map_session_data *sd = script->rid2sd(st);
enum quest_check_type type = HAVEQUEST;
- nullpo_retr(false,sd);
+ if( sd == NULL )
+ return false;
if( script_hasdata(st, 3) )
type = (enum quest_check_type)script_getnum(st, 3);
@@ -17315,19 +17377,6 @@ BUILDIN(is_function) {
return true;
}
/**
- * get_revision() -> retrieves the current svn revision (if available)
- **/
-BUILDIN(get_revision) {
- const char *svn = get_svn_revision();
-
- if ( svn[0] != HERC_UNKNOWN_VER )
- script_pushint(st,atoi(svn));
- else
- script_pushint(st,-1);//unknown
-
- return true;
-}
-/**
* freeloop(<toggle>) -> toggles this script instance's looping-check ability
**/
BUILDIN(freeloop) {
@@ -17345,12 +17394,14 @@ BUILDIN(freeloop) {
BUILDIN(sit) {
struct map_session_data *sd = NULL;
- if (script_hasdata(st, 2))
+ if( script_hasdata(st, 2) )
sd = map->nick2sd(script_getstr(st, 2));
-
- if (sd == NULL)
+ else
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
if (!pc_issit(sd))
{
pc_setsit(sd);
@@ -17363,12 +17414,14 @@ BUILDIN(sit) {
BUILDIN(stand) {
struct map_session_data *sd = NULL;
- if (script_hasdata(st, 2))
+ if( script_hasdata(st, 2) )
sd = map->nick2sd(script_getstr(st, 2));
-
- if (sd == NULL)
+ else
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
if (pc_issit(sd))
{
pc->setstand(sd);
@@ -17381,12 +17434,14 @@ BUILDIN(stand) {
BUILDIN(issit) {
struct map_session_data *sd = NULL;
- if (script_hasdata(st, 2))
+ if( script_hasdata(st, 2) )
sd = map->nick2sd(script_getstr(st, 2));
-
- if (sd == NULL)
+ else
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
+
if (pc_issit(sd))
script_pushint(st, 1);
else
@@ -17498,6 +17553,8 @@ BUILDIN(useatcmd) {
if( st->rid ) {
sd = script->rid2sd(st);
+ if( sd == NULL )
+ return false;
fd = sd->fd;
} else {
// Use a dummy character.
@@ -17700,7 +17757,7 @@ BUILDIN(npcskill) {
ShowError("npcskill: level exceeded maximum of %d.\n", MAX_LEVEL);
return false;
}
- if (sd == NULL || nd == NULL) { //ain't possible, but I don't trust people.
+ if (sd == NULL || nd == NULL) {
return false;
}
@@ -18546,6 +18603,13 @@ BUILDIN(tradertype) {
npc->market_delfromsql(nd,USHRT_MAX);
}
+#if PACKETVER < 20131223
+ if( type == NST_MARKET ) {
+ ShowWarning("buildin_tradertype: NST_MARKET is only available with PACKETVER 20131223 or newer!\n");
+ script->reportsrc(st);
+ }
+#endif
+
nd->u.scr.shop->type = type;
return true;
@@ -19152,7 +19216,6 @@ void script_parse_builtin(void) {
BUILDIN_DEF(getargcount,""),
BUILDIN_DEF(getcharip,"?"),
BUILDIN_DEF(is_function,"s"),
- BUILDIN_DEF(get_revision,""),
BUILDIN_DEF(freeloop,"i"),
BUILDIN_DEF(getrandgroupitem,"ii"),
BUILDIN_DEF(cleanmap,"s"),
diff --git a/src/map/script.h b/src/map/script.h
index eed0dbf1d..48abf1487 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -2,20 +2,22 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_SCRIPT_H_
-#define _MAP_SCRIPT_H_
+#ifndef MAP_SCRIPT_H
+#define MAP_SCRIPT_H
-#include "../common/strlib.h" //StringBuf
-#include "../common/cbasetypes.h"
-#include "map.h" //EVENT_NAME_LENGTH
-
-#include <setjmp.h>
#include <errno.h>
+#include <setjmp.h>
+
+#include "map.h" //EVENT_NAME_LENGTH
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/mmo.h" // struct item
+#include "../common/sql.h" // Sql
+#include "../common/strlib.h" //StringBuf
/**
* Declarations
**/
-struct map_session_data;
struct eri;
/**
@@ -564,7 +566,7 @@ struct script_interface {
void (*final) (void);
int (*reload) (void);
/* parse */
- struct script_code* (*parse) (const char* src,const char* file,int line,int options);
+ struct script_code* (*parse) (const char* src,const char* file,int line,int options, int *retval);
bool (*add_builtin) (const struct script_function *buildin, bool override);
void (*parse_builtin) (void);
const char* (*parse_subexpr) (const char* p,int limit);
@@ -713,4 +715,4 @@ struct script_interface *script;
void script_defaults(void);
-#endif /* _MAP_SCRIPT_H_ */
+#endif /* MAP_SCRIPT_H */
diff --git a/src/map/searchstore.c b/src/map/searchstore.c
index 0144aea93..72b28aacd 100644
--- a/src/map/searchstore.c
+++ b/src/map/searchstore.c
@@ -2,14 +2,17 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "searchstore.h" // struct s_search_store_info
+
+#include "battle.h" // battle_config.*
+#include "clif.h" // clif->open_search_store_info, clif->search_store_info_*
+#include "pc.h" // struct map_session_data
#include "../common/cbasetypes.h"
#include "../common/malloc.h" // aMalloc, aRealloc, aFree
#include "../common/showmsg.h" // ShowError, ShowWarning
#include "../common/strlib.h" // safestrncpy
-#include "battle.h" // battle_config.*
-#include "clif.h" // clif->open_search_store_info, clif->search_store_info_*
-#include "pc.h" // struct map_session_data
-#include "searchstore.h" // struct s_search_store_info
struct searchstore_interface searchstore_s;
diff --git a/src/map/searchstore.h b/src/map/searchstore.h
index 827e39053..d8abde615 100644
--- a/src/map/searchstore.h
+++ b/src/map/searchstore.h
@@ -2,8 +2,14 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_SEARCHSTORE_H_
-#define _MAP_SEARCHSTORE_H_
+#ifndef MAP_SEARCHSTORE_H
+#define MAP_SEARCHSTORE_H
+
+#include <time.h>
+
+#include "map.h" // MESSAGE_SIZE
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h" // MAX_SLOTS
/**
* Defines
@@ -93,4 +99,4 @@ struct searchstore_interface *searchstore;
void searchstore_defaults (void);
-#endif /* _MAP_SEARCHSTORE_H_ */
+#endif /* MAP_SEARCHSTORE_H */
diff --git a/src/map/skill.c b/src/map/skill.c
index 612b205e9..c744dbde4 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2,46 +2,48 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-#include "../common/ers.h"
+#define HERCULES_CORE
-#include "map.h"
-#include "path.h"
-#include "clif.h"
-#include "pc.h"
-#include "status.h"
+#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION()
#include "skill.h"
-#include "pet.h"
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "battle.h"
+#include "battleground.h"
+#include "chrif.h"
+#include "clif.h"
+#include "date.h"
+#include "elemental.h"
+#include "guild.h"
#include "homunculus.h"
+#include "intif.h"
+#include "itemdb.h"
+#include "log.h"
+#include "map.h"
#include "mercenary.h"
-#include "elemental.h"
#include "mob.h"
#include "npc.h"
-#include "battle.h"
-#include "battleground.h"
#include "party.h"
-#include "itemdb.h"
+#include "path.h"
+#include "pc.h"
+#include "pet.h"
#include "script.h"
-#include "intif.h"
-#include "log.h"
-#include "chrif.h"
-#include "guild.h"
-#include "date.h"
+#include "status.h"
#include "unit.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <math.h>
-
+#include "../common/cbasetypes.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
#define SKILLUNITTIMER_INTERVAL 100
@@ -541,23 +543,6 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
return 1;
}
break;
- case BS_GREED:
- case WS_CARTBOOST:
- case BS_HAMMERFALL:
- case BS_ADRENALINE:
- case MC_CARTREVOLUTION:
- case MC_MAMMONITE:
- case WS_MELTDOWN:
- case MG_SIGHT:
- case TF_HIDING:
- /**
- * These skills cannot be used while in mado gear (credits to Xantara)
- **/
- if( pc_ismadogear(sd) ) {
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR_RIDE,0);
- return 1;
- }
- break;
case SC_MANHOLE:
case WM_SOUND_OF_DESTRUCTION:
@@ -585,12 +570,12 @@ int skillnotok_hom(uint16 skill_id, struct homun_data *hd)
return 1;
switch(skill_id){
case MH_LIGHT_OF_REGENE:
- if(hd->homunculus.intimacy <= 75000) //if not cordial
- return 1;
- break;
- case MH_OVERED_BOOST:
- if(hd->homunculus.hunger <= 1) //if we starving
- return 1;
+ if( homun->get_intimacy_grade(hd) != 4 ){
+ if( hd->master )
+ clif->skill_fail(hd->master, skill_id, USESKILL_FAIL_RELATIONGRADE, 0);
+ return 1;
+ }
+ break;
case MH_GOLDENE_FERSE: //can be used with angriff
if(hd->sc.data[SC_ANGRIFFS_MODUS])
return 1;
@@ -760,15 +745,18 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
// Chance to trigger Taekwon kicks [Dralnu]
if(sc && !sc->data[SC_COMBOATTACK]) {
if(sc->data[SC_STORMKICK_READY] &&
- sc_start(src,src,SC_COMBOATTACK, 15, TK_STORMKICK,
+ sc_start4(src,src,SC_COMBOATTACK, 15, TK_STORMKICK,
+ bl->id, 2, 0,
(2000 - 4*sstatus->agi - 2*sstatus->dex)))
; //Stance triggered
else if(sc->data[SC_DOWNKICK_READY] &&
- sc_start(src,src,SC_COMBOATTACK, 15, TK_DOWNKICK,
+ sc_start4(src,src,SC_COMBOATTACK, 15, TK_DOWNKICK,
+ bl->id, 2, 0,
(2000 - 4*sstatus->agi - 2*sstatus->dex)))
; //Stance triggered
else if(sc->data[SC_TURNKICK_READY] &&
- sc_start(src,src,SC_COMBOATTACK, 15, TK_TURNKICK,
+ sc_start4(src,src,SC_COMBOATTACK, 15, TK_TURNKICK,
+ bl->id, 2, 0,
(2000 - 4*sstatus->agi - 2*sstatus->dex)))
; //Stance triggered
else if (sc->data[SC_COUNTERKICK_READY]) { //additional chance from SG_FRIEND [Komurka]
@@ -850,7 +838,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
#ifdef RENEWAL
sc_start(src,bl,SC_FREEZE,65-(5*skill_lv),skill_lv,skill->get_time2(skill_id,skill_lv));
#else
- //Tharis pointed out that this is normal freeze chance with a base of 300%
+ // [Tharis] pointed out that this is normal freeze chance with a base of 300%
if(tsc->sg_counter >= 3 &&
sc_start(src,bl,SC_FREEZE,300,skill_lv,skill->get_time2(skill_id,skill_lv)))
tsc->sg_counter = 0;
@@ -991,7 +979,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
break;
case NPC_MENTALBREAKER:
{
- //Based on observations by Tharis, Mental Breaker should do SP damage
+ //Based on observations by [Tharis], Mental Breaker should do SP damage
//equal to Matk*skLevel.
rate = status->get_matk(src, 2);
rate*=skill_lv;
@@ -1030,7 +1018,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
sc_start(src,bl,SC_BLIND,100,skill_lv,skill->get_time2(skill_id,skill_lv));
break;
- case LK_HEADCRUSH: //Headcrush has chance of causing Bleeding status, except on demon and undead element
+ case LK_HEADCRUSH: // Headcrush has chance of causing Bleeding status, except on demon and undead element
if (!(battle->check_undead(tstatus->race, tstatus->def_ele) || tstatus->race == RC_DEMON))
sc_start2(src, bl, SC_BLOODING,50, skill_lv, src->id, skill->get_time2(skill_id,skill_lv));
break;
@@ -1257,7 +1245,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
sc_start(src, bl, SC_STUN, 1 + skill_lv, skill_lv, skill->get_time(skill_id, skill_lv));
break;
case SR_FALLENEMPIRE:
- sc_start(src, bl, SC_STOP, 100, skill_lv, skill->get_time(skill_id, skill_lv));
+ sc_start(src, bl, SC_FALLENEMPIRE, 100, skill_lv, skill->get_time(skill_id, skill_lv));
break;
case SR_WINDMILL:
if( dstsd )
@@ -1294,11 +1282,11 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
sc_start(src, bl, SC_BLOODING, 100, skill_lv, 10000);
break;
case ITEMID_MELON_BOMB:
- sc_start(src, bl, SC_MELON_BOMB, 100, skill_lv, 60000); // Reduces ASPD and moviment speed
+ sc_start(src, bl, SC_MELON_BOMB, 100, skill_lv, 60000); // Reduces ASPD and movement speed
break;
case ITEMID_BANANA_BOMB:
sc_start(src, bl, SC_BANANA_BOMB, 100, skill_lv, 60000); // Reduces LUK? Needed confirm it, may be it's bugged in kRORE?
- sc_start(src, bl, SC_BANANA_BOMB_SITDOWN_POSTDELAY, (sd? sd->status.job_level:0) + sstatus->dex / 6 + tstatus->agi / 4 - tstatus->luk / 5 - status->get_lv(bl) + status->get_lv(src), skill_lv, 1000); // Sitdown for 3 seconds.
+ sc_start(src, bl, SC_BANANA_BOMB_SITDOWN_POSTDELAY, (sd? sd->status.job_level:0) + sstatus->dex / 6 + tstatus->agi / 4 - tstatus->luk / 5 - status->get_lv(bl) + status->get_lv(src), skill_lv, 1000); // Sit down for 3 seconds.
break;
}
sd->itemid = -1;
@@ -1341,6 +1329,9 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
if( sc_start(src, bl, SC_ILLUSIONDOPING, 10 * skill_lv, skill_lv, skill->get_time(skill_id, skill_lv)) ) //custom rate.
sc_start(src, bl, SC_ILLUSION, 100, skill_lv, skill->get_time(skill_id, skill_lv));
break;
+ case MH_XENO_SLASHER:
+ sc_start2(src, bl, SC_BLOODING, 10 * skill_lv, skill_lv, src->id, skill->get_time(skill_id,skill_lv));
+ break;
}
if (md && battle_config.summons_trigger_autospells && md->master_id && md->special_state.ai) {
@@ -1652,7 +1643,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1
return 1;
}
-/* Splitted off from skill->additional_effect, which is never called when the
+/* Split off from skill->additional_effect, which is never called when the
* attack skill kills the enemy. Place in this function counter status effects
* when using skills (eg: Asura's sp regen penalty, or counter-status effects
* from cards) that will take effect on the source, not the target. [Skotlex]
@@ -1668,7 +1659,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
nullpo_ret(src);
nullpo_ret(bl);
- if(skill_id > 0 && !skill_lv) return 0; // don't forget auto attacks! - celest
+ if(skill_id > 0 && !skill_lv) return 0; // don't forget auto attacks! [celest]
sd = BL_CAST(BL_PC, src);
dstsd = BL_CAST(BL_PC, bl);
@@ -1707,7 +1698,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
case GS_FULLBUSTER:
sc_start(src,src,SC_BLIND,2*skill_lv,skill_lv,skill->get_time2(skill_id,skill_lv));
break;
- case HFLI_SBR44: //[orn]
+ case HFLI_SBR44: // [orn]
case HVAN_EXPLOSION:
if(src->type == BL_HOM){
TBL_HOM *hd = (TBL_HOM*)src;
@@ -1723,15 +1714,15 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
}
if( sd && (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR
- && rnd()%10000 < battle_config.sg_miracle_skill_ratio) //SG_MIRACLE [Komurka]
+ && rnd()%10000 < battle_config.sg_miracle_skill_ratio) // SG_MIRACLE [Komurka]
sc_start(src,src,SC_MIRACLE,100,1,battle_config.sg_miracle_skill_duration);
if( sd && skill_id && attack_type&BF_MAGIC && status->isdead(bl)
&& !(skill->get_inf(skill_id)&(INF_GROUND_SKILL|INF_SELF_SKILL))
&& (rate=pc->checkskill(sd,HW_SOULDRAIN)) > 0
) {
- //Soul Drain should only work on targetted spells [Skotlex]
- if( pc_issit(sd) ) pc->setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex]
+ // Soul Drain should only work on targeted spells [Skotlex]
+ if( pc_issit(sd) ) pc->setstand(sd); // Character stuck in attacking animation while 'sitting' fix. [Skotlex]
if( skill->get_nk(skill_id)&NK_SPLASH && skill->area_temp[1] != bl->id )
;
else {
@@ -1751,7 +1742,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
if( attack_type&BF_MAGIC ) {
sp += sd->bonus.magic_sp_gain_value;
hp += sd->bonus.magic_hp_gain_value;
- if( skill_id == WZ_WATERBALL ) {//(bugreport:5303)
+ if( skill_id == WZ_WATERBALL ) {// (bugreport:5303)
struct status_change *sc = NULL;
if( ( sc = status->get_sc(src) ) ) {
if( sc->data[SC_SOULLINK]
@@ -1846,7 +1837,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
break;
}
dstsd->state.autocast = 0;
- //Set canact delay. [Skotlex]
+ // Set canact delay. [Skotlex]
ud = unit->bl2ud(bl);
if (ud) {
rate = skill->delay_fix(bl, auto_skill_id, auto_skill_lv);
@@ -1984,7 +1975,7 @@ int skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int
return 0;
sc = status->get_sc(bl);
- if (!sc || sc->option&OPTION_MADOGEAR ) //Mado Gear cannot be divested [Ind]
+ if (!sc || sc->option&OPTION_MADOGEAR ) // Mado Gear cannot be divested [Ind]
return 0;
for (i = 0; i < ARRAYLENGTH(pos); i++) {
@@ -2013,16 +2004,16 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
nullpo_ret(src);
if (src != target && map->list[src->m].flag.noknockback)
- return 0; //No knocking
+ return 0; // No knocking
if (count == 0)
- return 0; //Actual knockback distance is 0.
+ return 0; // Actual knockback distance is 0.
switch (target->type) {
case BL_MOB: {
struct mob_data* md = BL_CAST(BL_MOB, target);
if( md->class_ == MOBID_EMPERIUM )
return 0;
- if(src != target && is_boss(target)) //Bosses can't be knocked-back
+ if(src != target && is_boss(target)) // Bosses can't be knocked-back
return 0;
}
break;
@@ -2054,11 +2045,13 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
}
-// Checks if 'bl' should reflect back a spell cast by 'src'.
-// type is the type of magic attack: 0: indirect (aoe), 1: direct (targetted)
-// In case of success returns type of reflection, otherwise 0
-// 1 - Regular reflection (Maya)
-// 2 - SL_KAITE reflection
+/*
+ Checks if 'bl' should reflect back a spell cast by 'src'.
+ type is the type of magic attack: 0: indirect (aoe), 1: direct (targeted)
+ In case of success returns type of reflection, otherwise 0
+ 1 - Regular reflection (Maya)
+ 2 - SL_KAITE reflection
+*/
int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type) {
struct status_change *sc = status->get_sc(bl);
struct map_session_data* sd = BL_CAST(BL_PC, bl);
@@ -2117,8 +2110,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
if(skill_id > 0 && !skill_lv) return 0;
- nullpo_ret(src); //Source is the master behind the attack (player/mob/pet)
- nullpo_ret(dsrc); //dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.
+ nullpo_ret(src); // Source is the master behind the attack (player/mob/pet)
+ nullpo_ret(dsrc); // dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.
nullpo_ret(bl); //Target to be attacked.
if (src != dsrc) {
@@ -2126,7 +2119,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
if (!status->check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2))
return 0;
} else if ((flag&SD_ANIMATION) && skill->get_nk(skill_id)&NK_SPLASH) {
- //Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex]
+ //Note that splash attacks often only check versus the targeted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex]
if (!status->check_skilluse(src, bl, skill_id, 2))
return 0;
}
@@ -2134,6 +2127,14 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
sd = BL_CAST(BL_PC, src);
tsd = BL_CAST(BL_PC, bl);
+ // To block skills that aren't called via battle_check_target [Panikon]
+ // issue: 8203
+ if( sd
+ && ( (bl->type == BL_MOB && pc_has_permission(sd, PC_PERM_DISABLE_PVM))
+ || (bl->type == BL_PC && pc_has_permission(sd, PC_PERM_DISABLE_PVP)) )
+ )
+ return 0;
+
sstatus = status->get_status_data(src);
tstatus = status->get_status_data(bl);
sc = status->get_sc(bl);
@@ -2180,7 +2181,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
sc = NULL; //Don't need it.
/* bugreport:2564 flag&2 disables double casting trigger */
flag |= 2;
- /* bugreport:7859 magical reflect'd zeroes blewcount */
+ /* bugreport:7859 magical reflected zeroes blow count */
dmg.blewcount = 0;
//Spirit of Wizard blocks Kaite's reflection
if( type == 2 && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_WIZARD )
@@ -2202,11 +2203,11 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
#if MAGIC_REFLECTION_TYPE
#ifdef RENEWAL
- if( dmg.dmg_lv != ATK_MISS ) //Wiz SL cancelled and consumed fragment
+ if( dmg.dmg_lv != ATK_MISS ) // Wiz SL canceled and consumed fragment
#else
// issue:6415 in pre-renewal Kaite reflected the entire damage received
- // regardless of caster's equipament (Aegis 11.1)
- if( dmg.dmg_lv != ATK_MISS && type == 1 ) //Wiz SL cancelled and consumed fragment
+ // regardless of caster's equipment (Aegis 11.1)
+ if( dmg.dmg_lv != ATK_MISS && type == 1 ) //Wiz SL canceled and consumed fragment
#endif
{
short s_ele = skill->get_ele(skill_id, skill_lv);
@@ -2229,7 +2230,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
status_change_end(bl, SC_ENERGYCOAT, INVALID_TIMER);
//Reduction: 6% + 6% every 20%
dmg.damage -= dmg.damage * (6 * (1+per)) / 100;
- }
+ }
}
#endif /* MAGIC_REFLECTION_TYPE */
}
@@ -2324,10 +2325,11 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
combo=1;
break;
case AC_DOUBLE:
- if( (tstatus->race == RC_BRUTE || tstatus->race == RC_INSECT) && pc->checkskill(sd, HT_POWER))
- {
- //TODO: This code was taken from Triple Blows, is this even how it should be? [Skotlex]
- sc_start2(NULL,src,SC_COMBOATTACK,100,HT_POWER,bl->id,2000);
+ // AC_DOUBLE can start the combo with other monster types, but the
+ // monster that's going to be hit by HT_POWER should be RC_BRUTE or RC_INSECT [Panikon]
+ if( pc->checkskill(sd, HT_POWER) )
+ {
+ sc_start4(NULL,src,SC_COMBOATTACK,100,HT_POWER,0,1,0,2000);
clif->combo_delay(src,2000);
}
break;
@@ -2429,6 +2431,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
case EL_ROCK_CRUSHER_ATK:
case EL_HURRICANE:
case EL_HURRICANE_ATK:
+ case EL_TYPOON_MIS:
+ case EL_TYPOON_MIS_ATK:
case KO_BAKURETSU:
case NC_MAGMA_ERUPTION:
dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,skill_id,-1,5);
@@ -2498,7 +2502,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
{ //Updated to not be able to copy skills if the blow will kill you. [Skotlex]
int copy_skill = skill_id, cidx = 0;
/**
- * Copy Referal: dummy skills should point to their source upon copying
+ * Copy Referral: dummy skills should point to their source upon copying
**/
switch( skill_id ) {
case AB_DUPLELIGHT_MELEE:
@@ -2642,7 +2646,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
//blown-specific handling
switch( skill_id ) {
case LG_OVERBRAND_BRANDISH:
- if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) < dmg.blewcount )
+ if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) < dmg.blewcount )
skill->addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag|SD_ANIMATION);
break;
case SR_KNUCKLEARROW:
@@ -2730,15 +2734,12 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
* Post-damage effects
**/
switch( skill_id ) {
- case RK_CRUSHSTRIKE:
- skill->break_equip(src,EQP_WEAPON,2000,BCT_SELF); // 20% chance to destroy the weapon.
- break;
case GC_VENOMPRESSURE:
{
struct status_change *ssc = status->get_sc(src);
if( ssc && ssc->data[SC_POISONINGWEAPON] && rnd()%100 < 70 + 5*skill_lv ) {
short rate = 100;
- if ( ssc->data[SC_POISONINGWEAPON]->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech]
+ if ( ssc->data[SC_POISONINGWEAPON]->val1 == 9 )// Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech]
rate = 100 - tstatus->int_ * 4 / 5;
sc_start(src, bl,ssc->data[SC_POISONINGWEAPON]->val2,rate,ssc->data[SC_POISONINGWEAPON]->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000);
status_change_end(src,SC_POISONINGWEAPON,-1);
@@ -2773,8 +2774,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
}
/*==========================================
- * sub fonction for recursive skill call.
- * Checking bl battle flag and display dammage
+ * sub function for recursive skill call.
+ * Checking bl battle flag and display damage
* then call func with source,target,skill_id,skill_lv,tick,flag
*------------------------------------------*/
int skill_area_sub(struct block_list *bl, va_list ap) {
@@ -2965,7 +2966,7 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv,
if( (idx = skill->get_index(skill_id)) == 0 )
return 0;
- // Requeriments
+ // Requirements
for( i = 0; i < ARRAYLENGTH(itemid); i++ )
{
itemid[i] = skill->db[idx].itemid[i];
@@ -2987,7 +2988,7 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv,
else
sp += (st->max_sp * (-sp_rate)) / 100;
- if( bl->type == BL_HOM ) { // Intimacy Requeriments
+ if( bl->type == BL_HOM ) { // Intimacy Requirements
struct homun_data *hd = BL_CAST(BL_HOM, bl);
switch( skill_id ) {
case HFLI_SBR44:
@@ -3095,10 +3096,11 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
case WL_TETRAVORTEX_WATER:
case WL_TETRAVORTEX_WIND:
case WL_TETRAVORTEX_GROUND:
- case SR_FLASHCOMBO_ATK_STEP1:
- case SR_FLASHCOMBO_ATK_STEP2:
- case SR_FLASHCOMBO_ATK_STEP3:
- case SR_FLASHCOMBO_ATK_STEP4:
+ // SR_FLASHCOMBO
+ case SR_DRAGONCOMBO:
+ case SR_FALLENEMPIRE:
+ case SR_TIGERCANNON:
+ case SR_SKYNETBLOW:
break;
default:
continue; // Caster is Dead
@@ -3122,6 +3124,9 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
map->foreachinarea(skill->frostjoke_scream,skl->map,skl->x-range,skl->y-range,
skl->x+range,skl->y+range,BL_CHAR,src,skl->skill_id,skl->skill_lv,tick);
break;
+ case KN_AUTOCOUNTER:
+ clif->skill_nodamage(src,target,skl->skill_id,skl->skill_lv,1);
+ break;
case NPC_EARTHQUAKE:
if( skl->type > 1 )
skill->addtimerskill(src,tick+250,src->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag);
@@ -3160,7 +3165,7 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
BL_CHAR|BL_SKILL, target->id); // Search for a new Target around current one...
if( nbl == NULL)
skl->x++;
- else
+ else
skl->x = 0;
skill->addtimerskill(src, tick + 651, (nbl?nbl:target)->id, skl->x, 0, WL_CHAINLIGHTNING_ATK, skl->skill_lv, skl->type + 1, skl->flag);
@@ -3172,9 +3177,9 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
case WL_TETRAVORTEX_WIND:
case WL_TETRAVORTEX_GROUND:
clif->skill_nodamage(src, target, skl->skill_id, skl->skill_lv, 1);
- skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag);
+ skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag);
skill->toggle_magicpower(src, skl->skill_id); // only the first hit will be amplify
- if( skl->type == 4 ){
+ if( skl->type == 4 ){
const enum sc_type scs[] = { SC_BURNING, SC_BLOODING, SC_FROSTMISTY, SC_STUN }; // status inflicts are depend on what summoned element is used.
int rate = skl->y, index = skl->x-1;
sc_start2(src,target, scs[index], rate, skl->skill_lv, src->id, skill->get_time(WL_TETRAVORTEX,index+1));
@@ -3211,22 +3216,23 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
map->foreachinrange(skill->area_sub, target, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR,
src, skl->skill_id, skl->skill_lv, (int64)0, skl->flag|1|BCT_ENEMY, skill->castend_damage_id);
break;
- case SR_FLASHCOMBO_ATK_STEP1:
- case SR_FLASHCOMBO_ATK_STEP2:
- case SR_FLASHCOMBO_ATK_STEP3:
- case SR_FLASHCOMBO_ATK_STEP4:
- if( src->type == BL_PC ) {
- struct map_session_data *sd = NULL;
- const enum e_skill combos[] = {SR_DRAGONCOMBO, SR_FALLENEMPIRE, SR_TIGERCANNON, SR_SKYNETBLOW};
- if( (sd = ((TBL_PC*)src)) ){
- uint16 cid = combos[skl->skill_id-SR_FLASHCOMBO_ATK_STEP1];
- if( distance_xy(src->x, src->y, target->x, target->y) >= 3 )
- break;
- skill->consume_requirement(sd,cid,pc->checkskill(sd, cid),1);
- skill->castend_damage_id(src, target, cid, pc->checkskill(sd, cid), tick, 0);
- }
+ // SR_FLASHCOMBO
+ case SR_DRAGONCOMBO:
+ case SR_FALLENEMPIRE:
+ case SR_TIGERCANNON:
+ case SR_SKYNETBLOW:
+ {
+ struct map_session_data *sd = NULL;
+
+ if( src->type == BL_PC && (sd = ((TBL_PC*)src)) ) {
+ if( distance_xy(src->x, src->y, target->x, target->y) >= 3 ) // FIXME: Don't combos ignore distance? [Panikon]
+ break;
+
+ skill->consume_requirement(sd, skl->skill_id, pc->checkskill(sd, skl->skill_id),1);
+ skill->castend_damage_id(src, target, skl->skill_id, pc->checkskill(sd, skl->skill_id), tick, 0);
}
break;
+ }
case SC_ESCAPE:
if( skl->type < 4+skl->skill_lv ){
clif->skill_damage(src,src,tick,0,0,-30000,1,skl->skill_id,skl->skill_lv,5);
@@ -3344,10 +3350,11 @@ int skill_cleartimerskill (struct block_list *src)
case WL_TETRAVORTEX_WATER:
case WL_TETRAVORTEX_WIND:
case WL_TETRAVORTEX_GROUND:
- case SR_FLASHCOMBO_ATK_STEP1:
- case SR_FLASHCOMBO_ATK_STEP2:
- case SR_FLASHCOMBO_ATK_STEP3:
- case SR_FLASHCOMBO_ATK_STEP4:
+ // SR_FLASHCOMBO
+ case SR_DRAGONCOMBO:
+ case SR_FALLENEMPIRE:
+ case SR_TIGERCANNON:
+ case SR_SKYNETBLOW:
continue;
}
timer->delete(ud->skilltimerskill[i]->timer, skill->timerskill);
@@ -3409,7 +3416,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
return 1;
if (skill_id && skill->get_type(skill_id) == BF_MAGIC && status->isimmune(bl) == 100) {
- //GTB makes all targetted magic display miss with a single bolt.
+ //GTB makes all targeted magic display miss with a single bolt.
sc_type sct = status->skill2sc(skill_id);
if(sct != SC_NONE)
status_change_end(bl, sct, INVALID_TIMER);
@@ -3492,7 +3499,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case WS_CARTTERMINATION: // Cart Termination
case AS_VENOMKNIFE:
case HT_PHANTASMIC:
- case HT_POWER:
case TK_DOWNKICK:
case TK_COUNTER:
case GS_CHAINACTION:
@@ -3516,7 +3522,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case NPC_HELLPOWER:
case RK_SONICWAVE:
case RK_STORMBLAST:
- case RK_CRUSHSTRIKE:
case AB_DUPLELIGHT_MELEE:
case RA_AIMEDBOLT:
case NC_AXEBOOMERANG:
@@ -3715,6 +3720,11 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
}
break;
+ case HT_POWER:
+ if( tstatus->race == RC_BRUTE || tstatus->race == RC_INSECT )
+ skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
+ break;
+
//Splash attack skills.
case AS_GRIMTOOTH:
case MC_CARTREVOLUTION:
@@ -3769,6 +3779,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case KO_MUCHANAGE:
case KO_BAKURETSU:
case GN_ILLUSIONDOPING:
+ case MH_XENO_SLASHER:
if( flag&1 ) {//Recursive invocation
// skill->area_temp[0] holds number of targets in area
// skill->area_temp[1] holds the id of the original target
@@ -3796,6 +3807,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case GC_ROLLINGCUTTER:
flag |= SD_ANIMATION;
case LG_MOONSLASHER:
+ case MH_XENO_SLASHER:
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
break;
case NPC_EARTHQUAKE://FIXME: Isn't EarthQuake a ground skill after all?
@@ -4048,7 +4060,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag);
break;
- // Celest
+ // [Celest]
case PF_SOULBURN:
if (rnd()%100 < (skill_lv < 5 ? 30 + skill_lv * 10 : 70)) {
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -4133,7 +4145,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
if( unit->movepos(src, bl->x+x, bl->y+y, 1, 1) )
{
clif->slide(src,bl->x+x,bl->y+y);
- clif->fixpos(src); // the official server send these two packts.
+ clif->fixpos(src); // the official server send these two packets.
skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
if( rnd()%100 < 4 * skill_lv )
skill->castend_damage_id(src,bl,GC_CROSSIMPACT,skill_lv,tick,flag);
@@ -4190,7 +4202,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case WL_TETRAVORTEX:
if( sc ){
int i = SC_SUMMON5, x = 0;
- int types[][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
+ int types[][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
for(; i >= SC_SUMMON1; i--){
if( sc->data[i] ){
int skillid = WL_TETRAVORTEX_FIRE + (sc->data[i]->val1 - WLS_FIRE) + (sc->data[i]->val1 == WLS_WIND) - (sc->data[i]->val1 == WLS_WATER), sc_index = 0, rate = 0;
@@ -4266,7 +4278,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
if (sd->skillcooldown[i].id == spell_skill_id){
cooldown += sd->skillcooldown[i].val;
break;
- }
+ }
}
if(cooldown)
skill->blockpc_start(sd, spell_skill_id, cooldown);
@@ -4556,9 +4568,8 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
}
break;
- //recursive homon skill
+ // Recursive homun skill
case MH_MAGMA_FLOW:
- case MH_XENO_SLASHER:
case MH_HEILIGE_STANGE:
if(flag & 1)
skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);
@@ -4764,10 +4775,10 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
inf &= ~BCT_NEUTRAL;
}
- if( sd && (inf2&INF2_CHORUS_SKILL) && skill->check_pc_partner(sd, ud->skill_id, &ud->skill_lv, 1, 0) < 1 ) {
- clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_NEED_HELPER, 0);
- break;
- }
+ if( sd && (inf2&INF2_CHORUS_SKILL) && skill->check_pc_partner(sd, ud->skill_id, &ud->skill_lv, 1, 0) < 1 ) {
+ clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_NEED_HELPER, 0);
+ break;
+ }
if( ud->skill_id >= SL_SKE && ud->skill_id <= SL_SKA && target->type == BL_MOB )
{
@@ -4786,7 +4797,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
&& (sc = status->get_sc(target)) && sc->data[SC_FOGWALL]
&& rnd() % 100 < 75
) {
- //Fogwall makes all offensive-type targetted skills fail at 75%
+ // Fogwall makes all offensive-type targeted skills fail at 75%
if (sd) clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0);
break;
}
@@ -4837,8 +4848,8 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
unit->stop_walking(src,1);
if( !sd || sd->skillitem != ud->skill_id || skill->get_delay(ud->skill_id,ud->skill_lv) )
- ud->canact_tick = tick + skill->delay_fix(src, ud->skill_id, ud->skill_lv); //Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish]
- if (sd) { //Cooldown application
+ ud->canact_tick = tick + skill->delay_fix(src, ud->skill_id, ud->skill_lv); // Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish]
+ if (sd) { // Cooldown application
int i, cooldown = skill->get_cooldown(ud->skill_id, ud->skill_lv);
for (i = 0; i < ARRAYLENGTH(sd->skillcooldown) && sd->skillcooldown[i].id; i++) { // Increases/Decreases cooldown of a skill by item/card bonuses.
if (sd->skillcooldown[i].id == ud->skill_id){
@@ -4881,7 +4892,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
// SC_MAGICPOWER needs to switch states before any damage is actually dealt
skill->toggle_magicpower(src, ud->skill_id);
- /* On aegis damage skills are also increase by camouflage. Need confirmation on kRo.
+ /* On aegis damage skills are also increase by camouflage. Need confirmation on kRO.
if( ud->skill_id != RA_CAMOUFLAGE ) // only normal attack and auto cast skills benefit from its bonuses
status_change_end(src,SC_CAMOUFLAGE, INVALID_TIMER);
*/
@@ -4978,7 +4989,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
int element = 0;
enum sc_type type;
- if(skill_id > 0 && !skill_lv) return 0; // celest
+ if(skill_id > 0 && !skill_lv) return 0; // [Celest]
nullpo_retr(1, src);
nullpo_retr(1, bl);
@@ -5014,12 +5025,27 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
}
+ // Supportive skills that can't be cast in users with mado
+ if( sd && dstsd && pc_ismadogear(dstsd) ) {
+ switch( skill_id ) {
+ case AL_HEAL:
+ case AL_INCAGI:
+ case AL_DECAGI:
+ case AB_RENOVATIO:
+ case AB_HIGHNESSHEAL:
+ clif->skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0);
+ return 0;
+ default:
+ break;
+ }
+ }
+
tstatus = status->get_status_data(bl);
sstatus = status->get_status_data(src);
//Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
switch (skill_id) {
- case HLIF_HEAL: //[orn]
+ case HLIF_HEAL: // [orn]
if (bl->type != BL_HOM) {
if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0) ;
break ;
@@ -5031,11 +5057,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
**/
case AB_RENOVATIO:
case AB_HIGHNESSHEAL:
- case AL_INCAGI:
- if( sd && dstsd && pc_ismadogear(dstsd) ){
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0);
- return 0;
- }
+ case AL_INCAGI:
case ALL_RESURRECTION:
case PR_ASPERSIO:
//Apparently only player casted skills can be offensive like this.
@@ -5090,7 +5112,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
struct block_list *s_src = battle->get_master(src);
short ret = 0;
if(!skill->check_unit_range(src, src->x, src->y, skill_id, skill_lv)) //prevent reiteration
- ret = skill->castend_pos2(src,src->x,src->y,skill_id,skill_lv,tick,flag); //cast on homon
+ ret = skill->castend_pos2(src,src->x,src->y,skill_id,skill_lv,tick,flag); //cast on homun
if(s_src && !skill->check_unit_range(s_src, s_src->x, s_src->y, skill_id, skill_lv))
ret |= skill->castend_pos2(s_src,s_src->x,s_src->y,skill_id,skill_lv,tick,flag); //cast on master
if (hd)
@@ -5133,7 +5155,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
map->freeblock_lock();
switch(skill_id) {
- case HLIF_HEAL: //[orn]
+ case HLIF_HEAL: // [orn]
case AL_HEAL:
/**
* Arch Bishop
@@ -5489,7 +5511,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if (dstsd) {
if(dstsd->status.weapon == W_FIST ||
(dstsd->sc.count && !dstsd->sc.data[type] &&
- ( //Allow re-enchanting to lenghten time. [Skotlex]
+ ( //Allow re-enchanting to lengthen time. [Skotlex]
dstsd->sc.data[SC_PROPERTYFIRE] ||
dstsd->sc.data[SC_PROPERTYWATER] ||
dstsd->sc.data[SC_PROPERTYWIND] ||
@@ -5594,7 +5616,6 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case PR_BENEDICTIO:
case LK_BERSERK:
case MS_BERSERK:
- case KN_AUTOCOUNTER:
case KN_TWOHANDQUICKEN:
case KN_ONEHAND:
case MER_QUICKEN:
@@ -5667,6 +5688,11 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
clif->skill_nodamage(src,bl,skill_id,skill_lv,
sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
break;
+
+ case KN_AUTOCOUNTER:
+ sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
+ skill->addtimerskill(src, tick + 100, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag);
+ break;
case SO_STRIKING:
if (sd) {
@@ -5707,7 +5733,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
{
int duration = skill->get_time(skill_id,skill_lv);
clif->skill_nodamage(bl,bl,skill_id,skill_lv,sc_start(src,bl,type,100,skill_lv,duration)); // Master
- clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,src,type,100,skill_lv,duration)); // Homunc
+ clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,src,type,100,skill_lv,duration)); // Homun
}
break;
case NJ_BUNSINJYUTSU:
@@ -6041,7 +6067,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
BF_MAGIC, src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY);
break;
- case HVAN_EXPLOSION: //[orn]
+ case HVAN_EXPLOSION: // [orn]
case NPC_SELFDESTRUCTION:
{
//Self Destruction hits everyone in range (allies+enemies)
@@ -6174,7 +6200,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
return 0;
}
clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start4(src,bl,type,100,skill_lv,unit->getdir(bl),0,0,0));
- if (sd) // If the client receives a skill-use packet inmediately before a walkok packet, it will discard the walk packet! [Skotlex]
+ if (sd) // If the client receives a skill-use packet immediately before a walkok packet, it will discard the walk packet! [Skotlex]
clif->walkok(sd); // So aegis has to resend the walk ok.
break;
case AS_CLOAKING:
@@ -6410,7 +6436,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case MC_IDENTIFY:
if(sd) {
clif->item_identify_list(sd);
- if( sd->menuskill_id != MC_IDENTIFY ) {/* failed, dont consume anything, return */
+ if( sd->menuskill_id != MC_IDENTIFY ) {/* failed, don't consume anything, return */
map->freeblock_unlock();
return 1;
}
@@ -6752,7 +6778,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER)
- || (tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_ROGUE) //Rogue's spirit defends againt dispel.
+ || (tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_ROGUE) //Rogue's spirit defends against dispel.
|| (dstsd && pc_ismadogear(dstsd))
|| rnd()%100 >= 50+10*skill_lv )
{
@@ -7062,7 +7088,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
unit->stop_attack(src);
//Run skillv tiles overriding the can-move check.
if (unit->walktoxy(src, src->x + skill_lv * mask[dir][0], src->y + skill_lv * mask[dir][1], 2) && md)
- md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the ai.
+ md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the AI.
}
break;
@@ -7128,14 +7154,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case WE_MALE:
{
int hp_rate = (!skill_lv)? 0:skill->db[skill_id].hp_rate[skill_lv-1];
- int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it costed the caster. [Skotlex]
+ int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it cost the caster. [Skotlex]
clif->skill_nodamage(src,bl,skill_id,status->heal(bl, gain_hp, 0, 0),1);
}
break;
case WE_FEMALE:
{
int sp_rate = (!skill_lv)? 0:skill->db[skill_id].sp_rate[skill_lv-1];
- int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex]
+ int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it cost the caster. [Skotlex]
clif->skill_nodamage(src,bl,skill_id,status->heal(bl, 0, gain_sp, 0),1);
}
break;
@@ -7239,7 +7265,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
// if it is already trapping something don't spring it,
// remove trap should be used instead
break;
- // otherwise fallthrough to below
+ // otherwise fall through to below
case UNT_BLASTMINE:
case UNT_SKIDTRAP:
case UNT_LANDMINE:
@@ -7472,7 +7498,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if (count == -1)
count = 3;
else
- count++; //Should not retrigger this one.
+ count++; //Should not re-trigger this one.
break;
case 7: // stop freeze or stoned
{
@@ -7687,7 +7713,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
break;
- case AM_CALLHOMUN: //[orn]
+ case AM_CALLHOMUN: // [orn]
if( sd ) {
if (homun->call(sd))
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
@@ -7705,7 +7731,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
break;
- case HAMI_CASTLE: //[orn]
+ case HAMI_CASTLE: // [orn]
if(rnd()%100 < 20*skill_lv && src != bl)
{
int x,y;
@@ -7715,7 +7741,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
skill->blockhomun_start(hd, skill_id, skill->get_time2(skill_id,skill_lv));
if (unit->movepos(src,bl->x,bl->y,0,0)) {
- clif->skill_nodamage(src,src,skill_id,skill_lv,1); // Homunc
+ clif->skill_nodamage(src,src,skill_id,skill_lv,1); // Homun
clif->slide(src,bl->x,bl->y) ;
if (unit->movepos(bl,x,y,0,0))
{
@@ -7734,7 +7760,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
else if (sd)
clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
break;
- case HVAN_CHAOTIC: //[orn]
+ case HVAN_CHAOTIC: // [orn]
{
static const int per[5][2]={{20,50},{50,60},{25,75},{60,64},{34,67}};
int r = rnd()%100;
@@ -7755,7 +7781,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
status->heal(bl, hp, 0, 0);
}
break;
- //Homun single-target support skills [orn]
+ // Homun single-target support skills [orn]
case HAMI_BLOODLUST:
case HFLI_FLEET:
case HFLI_SPEED:
@@ -8007,7 +8033,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
{ // Every time the skill is casted the status change is reseted adding a counter.
count += (short)tsc->data[SC_ROLLINGCUTTER]->val1;
if( count > 10 )
- count = 10; // Max coounter
+ count = 10; // Max counter
status_change_end(bl, SC_ROLLINGCUTTER, INVALID_TIMER);
}
sc_start(src,bl,SC_ROLLINGCUTTER,100,count,skill->get_time(skill_id,skill_lv));
@@ -8113,15 +8139,12 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( dstsd && dstsd->special_state.no_magic_damage )
break;
- if ( sd && sd->status.party_id == 0 )
- count = 1;
- else
- count = party->foreachsamemap(party->sub_count, sd, 0);
+ if( sd && sd->status.party_id != 0 )
+ count = party->foreachsamemap(party->sub_count, sd, 0);
- if (count > 0)
- clif->skill_nodamage(bl, bl, skill_id, skill_lv,
- sc_start4(src, bl, type, 100, skill_lv, 0, 0, count, skill->get_time(skill_id, skill_lv)));
- } else
+ clif->skill_nodamage(bl, bl, skill_id, skill_lv,
+ sc_start4(src, bl, type, 100, skill_lv, 0, 0, count, skill->get_time(skill_id, skill_lv)));
+ } else if( sd )
party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case AB_CHEAL:
@@ -8526,7 +8549,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
//First we set the success chance based on the caster's build which increases the chance.
rate = 10 * skill_lv + rnd_value( sstatus->dex / 12, sstatus->dex / 4 ) + joblvbonus + status->get_lv(src) / 10;
// We then reduce the success chance based on the target's build.
- rate -= rnd_value( tstatus->agi / 6, tstatus->agi / 3 ) - tstatus->luk / 10 - ( dstsd ? (dstsd->max_weight / 10 - dstsd->weight / 10 ) / 100 : 0 ) - status->get_lv(bl) / 10;
+ rate -= rnd_value( tstatus->agi / 6, tstatus->agi / 3 ) + tstatus->luk / 10 + ( dstsd ? (dstsd->max_weight / 10 - dstsd->weight / 10 ) / 100 : 0 ) + status->get_lv(bl) / 10;
//Finally we set the minimum success chance cap based on the caster's skill level and DEX.
rate = cap_value( rate, skill_lv + sstatus->dex / 20, 100);
clif->skill_nodamage(src,bl,skill_id,0,sc_start(src,bl,type,rate,skill_lv,skill->get_time(skill_id,skill_lv)));
@@ -8539,7 +8562,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
if ( tsc && tsc->data[SC__UNLUCKY] && skill_id == SC_UNLUCKY) {
//If the target was successfully inflected with the Unlucky status, give 1 of 3 random status's.
- switch(rnd()%3) {//Targets in the Unlucky status will be affected by one of the 3 random status's reguardless of resistance.
+ switch(rnd()%3) {//Targets in the Unlucky status will be affected by one of the 3 random status's regardless of resistance.
case 0:
status->change_start(src,bl,SC_POISON,10000,skill_lv,0,0,0,skill->get_time(skill_id,skill_lv),10);
break;
@@ -8568,9 +8591,11 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case LG_SHIELDSPELL:
+ if( !sd )
+ break;
if( flag&1 ) {
sc_start(src,bl,SC_SILENCE,100,skill_lv,sd->bonus.shieldmdef * 30000);
- } else if( sd ) {
+ } else {
int opt = 0, val = 0, splashrange = 0;
struct item_data *shield_data = sd->inventory_data[sd->equip_index[EQI_HAND_L]];
if( !shield_data || shield_data->type != IT_ARMOR ) {
@@ -8607,6 +8632,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
break;
case 2:
+ if( sd->bonus.shieldmdef == 0 )
+ break; // Nothing should happen if the shield has no mdef, not even displaying a message
if ( sd->bonus.shieldmdef >= 1 && sd->bonus.shieldmdef <= 3 )
splashrange = 1;
else if ( sd->bonus.shieldmdef >= 4 && sd->bonus.shieldmdef <= 5 )
@@ -8634,8 +8661,12 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case 3:
{
- struct item *shield = &sd->status.inventory[sd->equip_index[EQI_HAND_L]];
int rate = 0;
+ struct item *shield = &sd->status.inventory[sd->equip_index[EQI_HAND_L]];
+
+ if( shield->refine == 0 )
+ break; // Nothing should happen if the shield has no refine, not even displaying a message
+
switch( opt ) {
case 1:
sc_start(src,bl,SC_SHIELDSPELL_REF,100,opt,shield->refine * 30000); //Now breaks Armor at 100% rate
@@ -8723,7 +8754,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
} else {
int count = 0;
clif->skill_damage(src, bl, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
- count = map->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-charactors
+ count = map->forcountinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv), (sd)?sd->spiritball_old:15, // Assume 15 spiritballs in non-characters
BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
if( sd ) pc->delspiritball(sd, count, 0);
clif->skill_nodamage(src, src, skill_id, skill_lv,
@@ -8749,8 +8780,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
{
sp = dstsd->spiritball; //1%sp per spiritball.
pc->delspiritball(dstsd, dstsd->spiritball, 0);
+ status_percent_heal(src, 0, sp);
}
- if( sp ) status_percent_heal(src, 0, sp);
clif->skill_nodamage(src, bl, skill_id, skill_lv, sp ? 1:0);
} else {
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
@@ -8801,16 +8832,23 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SR_GENTLETOUCH_CHANGE:
case SR_GENTLETOUCH_REVITALIZE:
clif->skill_nodamage(src,bl,skill_id,skill_lv,
- sc_start2(src,bl,type,100,skill_lv,src->id,skill->get_time(skill_id,skill_lv)));
+ sc_start2(src,bl,type,100,skill_lv,bl->id,skill->get_time(skill_id,skill_lv)));
break;
case SR_FLASHCOMBO:
{
+ const int combo[] = {
+ SR_DRAGONCOMBO, SR_FALLENEMPIRE, SR_TIGERCANNON, SR_SKYNETBLOW
+ };
int i;
- clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- for(i = SR_FLASHCOMBO_ATK_STEP1; i <= SR_FLASHCOMBO_ATK_STEP4; i++)
- skill->addtimerskill(src, tick + 400 * (i - SR_FLASHCOMBO_ATK_STEP1), bl->id, 0, 0, i, skill_lv, BF_WEAPON, flag|SD_LEVEL);
+
+ clif->skill_nodamage(src,bl,skill_id,skill_lv,
+ sc_start2(src,bl,type,100,skill_lv,bl->id,skill->get_time(skill_id,skill_lv)));
+
+ for( i = 0; i < ARRAYLENGTH(combo); i++ )
+ skill->addtimerskill(src, tick + 400 * i, bl->id, 0, 0, combo[i], skill_lv, BF_WEAPON, flag|SD_LEVEL);
+
+ break;
}
- break;
case WA_SWING_DANCE:
case WA_SYMPHONY_OF_LOVER:
case WA_MOONLIT_SERENADE:
@@ -8851,7 +8889,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if ( flag&1 )
sc_start2(src,bl,type,100,skill_lv,src->id,skill->get_time(skill_id,skill_lv));
else if ( sd ) {
- int rate = 4 * skill_lv + 2 * (sd ? pc->checkskill(sd,WM_LESSON) : 1) + status->get_lv(src) / 15 + (sd? sd->status.job_level:0) / 5;
+ int rate = 4 * skill_lv + 2 * pc->checkskill(sd,WM_LESSON) + status->get_lv(src)/15 + sd->status.job_level/5;
if ( rnd()%100 < rate ) {
flag |= BCT_PARTY|BCT_GUILD;
map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),BL_CHAR|BL_NPC|BL_SKILL, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
@@ -8868,7 +8906,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( flag&1 ) {
sc_start2(src,bl,type,100,skill_lv,(skill_id==WM_VOICEOFSIREN)?src->id:0,skill->get_time(skill_id,skill_lv));
} else if( sd ) {
- int rate = 6 * skill_lv + (sd ? pc->checkskill(sd,WM_LESSON) : 1) + (sd? sd->status.job_level:0) / 2;
+ int rate = 6 * skill_lv + pc->checkskill(sd,WM_LESSON) + sd->status.job_level/2;
if ( rnd()%100 < rate ) {
flag |= BCT_PARTY|BCT_GUILD;
map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),(skill_id==WM_VOICEOFSIREN)?BL_CHAR|BL_NPC|BL_SKILL:BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
@@ -8912,7 +8950,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
sc_start(src, bl, type, 100, skill_lv,skill->get_time(skill_id, skill_lv));
if ( madnesscheck >= 8 )//The god of madness deals 9999 fixed unreduceable damage when 8 or more enemy players are affected.
status_fix_damage(src, bl, 9999, clif->damage(src, bl, 0, 0, 9999, 0, 0, 0));
- //skill->attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);//To renable when I can confirm it deals damage like this. Data shows its dealed as reflected damage which I dont have it coded like that yet. [Rytech]
+ //skill->attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);//To renable when I can confirm it deals damage like this. Data shows its dealt as reflected damage which I don't have it coded like that yet. [Rytech]
} else if( sd ) {
int rate = sstatus->int_ / 6 + (sd? sd->status.job_level:0) / 5 + skill_lv * 4;
if ( rnd()%100 < rate ) {
@@ -9038,7 +9076,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( sd ) {
int elemental_class = skill->get_elemental_type(skill_id,skill_lv);
- // Remove previous elemental fisrt.
+ // Remove previous elemental first.
if( sd->ed )
elemental->delete(sd->ed,0);
@@ -9061,7 +9099,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
elemental->delete(sd->ed, 0);
break;
}
- switch( skill_lv ) {// Select mode bassed on skill level used.
+ switch( skill_lv ) {// Select mode based on skill level used.
case 2: mode = EL_MODE_ASSIST; break;
case 3: mode = EL_MODE_AGGRESSIVE; break;
}
@@ -9397,10 +9435,23 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
break;
+ case MH_LIGHT_OF_REGENE:
+ if( hd && battle->get_master(src) ) {
+ hd->homunculus.intimacy = (751 + rnd()%99) * 100; // random between 751 ~ 850
+ clif->send_homdata(hd->master, SP_INTIMATE, hd->homunculus.intimacy / 100); //refresh intimacy info
+ sc_start(src, battle->get_master(src), type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
+ }
+ break;
+
+ case MH_OVERED_BOOST:
+ if ( hd && battle->get_master(src) ) {
+ sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
+ sc_start(src, battle->get_master(src), type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
+ }
+ break;
+
case MH_SILENT_BREEZE:
{
- struct status_change *ssc = status->get_sc(src);
- struct block_list *m_bl = battle->get_master(src);
const enum sc_type scs[] = {
SC_MANDRAGORA, SC_HARMONIZE, SC_DEEP_SLEEP, SC_SIREN, SC_SLEEP, SC_CONFUSION, SC_ILLUSION
};
@@ -9410,40 +9461,15 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
for (i = 0; i < ARRAYLENGTH(scs); i++) {
if (tsc->data[scs[i]]) status_change_end(bl, scs[i], INVALID_TIMER);
}
- if (!tsc->data[SC_SILENCE]) //put inavoidable silence on target
- status->change_start(src, bl, SC_SILENCE, 100, skill_lv, 0,0,0, skill->get_time(skill_id, skill_lv),1|2|8);
}
- heal = status_get_matk_min(src)*4;
- status->heal(bl, heal, 0, 7);
-
- //now inflict silence on everyone
- if(ssc && !ssc->data[SC_SILENCE]) //put inavoidable silence on homun
- status->change_start(src, src, SC_SILENCE, 100, skill_lv, 0,0,0, skill->get_time(skill_id, skill_lv),1|2|8);
- if(m_bl){
- struct status_change *msc = status->get_sc(m_bl);
- if(msc && !msc->data[SC_SILENCE]) //put inavoidable silence on master
- status->change_start(src, m_bl, SC_SILENCE, 100, skill_lv, 0,0,0, skill->get_time(skill_id, skill_lv),1|2|8);
- }
- if (hd)
- skill->blockhomun_start(hd, skill_id, skill->get_cooldown(skill_id, skill_lv));
+ heal = 5 * status->get_lv(&hd->bl) + status->base_matk(&hd->battle_status, status->get_lv(&hd->bl));
+ status->heal(bl, heal, 0, 0);
+ clif->skill_nodamage(src, src, skill_id, skill_lv, clif->skill_nodamage(src, bl, AL_HEAL, heal, 1));
+ status->change_start(src, src, type, 1000, skill_lv, 0, 0, 0, skill->get_time(skill_id,skill_lv), 1|2|8);
+ status->change_start(src, bl, type, 1000, skill_lv, 0, 0, 0, skill->get_time(skill_id,skill_lv), 1|2|8);
}
break;
- case MH_OVERED_BOOST:
- if (hd) {
- struct block_list *s_bl = battle->get_master(src);
- if(hd->homunculus.hunger>50) //reduce hunger
- hd->homunculus.hunger = hd->homunculus.hunger/2;
- else
- hd->homunculus.hunger = min(1,hd->homunculus.hunger);
- if(s_bl && s_bl->type==BL_PC) {
- status->set_sp(s_bl,status_get_max_sp(s_bl)/2,0); //master drain 50% sp
- clif->send_homdata(((TBL_PC *)s_bl), SP_HUNGRY, hd->homunculus.hunger); //refresh hunger info
- sc_start(src, s_bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)); //gene bonus
- }
- sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
- skill->blockhomun_start(hd, skill_id, skill->get_cooldown(skill_id, skill_lv));
- }
- break;
+
case MH_GRANITIC_ARMOR:
case MH_PYROCLASTIC:
if( hd ){
@@ -9458,12 +9484,6 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
break;
- case MH_LIGHT_OF_REGENE:
- if(hd) {
- hd->homunculus.intimacy = 25100; //change to neutral (can't be cast if < 750)
- if(sd) clif->send_homdata(sd, SP_INTIMATE, hd->homunculus.intimacy); //refresh intimacy info
- }
- //don't break need to start status and start block timer
case MH_MAGMA_FLOW:
case MH_PAIN_KILLER:
sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
@@ -9759,10 +9779,15 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char
switch(skill_id) {
case AL_TELEPORT:
+ // The storage window is closed automatically by the client when there's
+ // any kind of map change, so we need to restore it automatically
+ // issue: 8027
if(strcmp(mapname,"Random")==0)
pc->randomwarp(sd,CLR_TELEPORT);
else if (sd->menuskill_val > 1) //Need lv2 to be able to warp here.
pc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
+
+ clif->refresh_storagewindow(sd);
break;
case AL_WARP:
@@ -9852,7 +9877,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
int r;
//if(skill_lv <= 0) return 0;
- if(skill_id > 0 && !skill_lv) return 0; // celest
+ if(skill_id > 0 && !skill_lv) return 0; // [Celest]
nullpo_ret(src);
@@ -10047,10 +10072,10 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case MH_VOLCANIC_ASH:
case MH_POISON_MIST:
case MH_STEINWAND:
- case MH_XENO_SLASHER:
case NC_MAGMA_ERUPTION:
case SO_ELEMENTAL_SHIELD:
case RL_B_TRAP:
+ case MH_XENO_SLASHER:
flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete).
case GS_GROUNDDRIFT: //Ammo should be deleted right away.
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
@@ -10158,7 +10183,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
int class_ = skill_id==AM_SPHEREMINE?1142:summons[skill_lv-1];
struct mob_data *md;
- // Correct info, don't change any of this! [celest]
+ // Correct info, don't change any of this! [Celest]
md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_MEDIUM, AI_NONE);
if (md) {
md->master_id = src->id;
@@ -10298,7 +10323,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
sc_start(src,src,type,100,skill_lv,skill->get_time2(skill_id,skill_lv));
break;
- case AM_RESURRECTHOMUN: //[orn]
+ case AM_RESURRECTHOMUN: // [orn]
if (sd) {
if (!homun->ressurect(sd, 20*skill_lv, x, y)) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
@@ -10320,7 +10345,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case WM_SOUND_OF_DESTRUCTION:
r = skill->get_splash(skill_id,skill_lv);
map->foreachinarea(skill->area_sub,src->m,x-r,y-r,x+r,y+r,BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id);
- break;
+ break;
case WM_LULLABY_DEEPSLEEP:
r = skill->get_splash(skill_id,skill_lv);
@@ -10610,14 +10635,22 @@ int skill_dance_overlap(struct skill_unit* su, int flag) {
return map->foreachincell(skill->dance_overlap_sub, su->bl.m,su->bl.x,su->bl.y,BL_SKILL, su,flag);
}
-/*==========================================
+/**
* Converts this group information so that it is handled as a Dissonance or Ugly Dance cell.
- * Flag: 0 - Convert, 1 - Revert.
- *------------------------------------------*/
+ * This function is safe to call even when the unit or the group were freed by other function
+ * previously.
+ * @param su Skill unit data (from BA_DISSONANCE or DC_UGLYDANCE)
+ * @param flag 0 Convert
+ * @param flag 1 Revert
+ * @retval true success
+ **/
bool skill_dance_switch(struct skill_unit* su, int flag) {
static int prevflag = 1; // by default the backup is empty
static struct skill_unit_group backup;
- struct skill_unit_group* group = su->group;
+ struct skill_unit_group* group;
+
+ if( su == NULL || (group = su->group) == NULL )
+ return false;
// val2&UF_ENSEMBLE is a hack to indicate dissonance
if ( !(group->state.song_dance&0x1 && su->val2&UF_ENSEMBLE) )
@@ -11674,7 +11707,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
case UNT_FIREPILLAR_ACTIVE:
case UNT_CLAYMORETRAP:
if( sg->unit_id == UNT_FIRINGTRAP || sg->unit_id == UNT_ICEBOUNDTRAP || sg->unit_id == UNT_CLAYMORETRAP )
- map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &src->bl,tick);
+ map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &src->bl,tick);
else
map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
if (sg->unit_id != UNT_FIREPILLAR_ACTIVE)
@@ -11876,7 +11909,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
case UNT_POISONSMOKE:
if( battle->check_target(ss,bl,BCT_ENEMY) > 0 && !(tsc && tsc->data[sg->val2]) && rnd()%100 < 50 ) {
short rate = 100;
- if ( sg->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reduceable. [Rytech]
+ if ( sg->val1 == 9 )//Oblivion Curse gives a 2nd success chance after the 1st one passes which is reducible. [Rytech]
rate = 100 - tstatus->int_ * 4 / 5 ;
sc_start(ss,bl,sg->val2,rate,sg->val1,skill->get_time2(GC_POISONINGWEAPON,1) - (tstatus->vit + tstatus->luk) / 2 * 1000);
}
@@ -11911,7 +11944,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
case UNT_STEALTHFIELD:
if( bl->id == sg->src_id )
- break; // Dont work on Self (video shows that)
+ break; // Don't work on Self (video shows that)
case UNT_NEUTRALBARRIER:
sc_start(ss,bl,type,100,sg->skill_lv,sg->interval + 100);
break;
@@ -12193,8 +12226,8 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) {
//We don't check for SC_LONGING because someone could always have knocked you back and out of the song/dance.
//FIXME: This code is not perfect, it doesn't checks for the real ensemble's owner,
//it only checks if you are doing the same ensemble. So if there's two chars doing an ensemble
- //which overlaps, by stepping outside of the other parther's ensemble will cause you to cancel
- //your own. Let's pray that scenario is pretty unlikely and noone will complain too much about it.
+ //which overlaps, by stepping outside of the other partner's ensemble will cause you to cancel
+ //your own. Let's pray that scenario is pretty unlikely and none will complain too much about it.
status_change_end(bl, SC_DANCING, INVALID_TIMER);
}
case MH_STEINWAND:
@@ -12240,7 +12273,7 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) {
if (sce) {
status_change_end(bl, type, INVALID_TIMER);
if ((sce=sc->data[SC_BLIND])) {
- if (bl->type == BL_PC) //Players get blind ended inmediately, others have it still for 30 secs. [Skotlex]
+ if (bl->type == BL_PC) //Players get blind ended immediately, others have it still for 30 secs. [Skotlex]
status_change_end(bl, SC_BLIND, INVALID_TIMER);
else {
timer->delete(sce->timer, status->change_timer);
@@ -12646,6 +12679,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
// Check the skills that can be used while mounted on a warg
if( pc_isridingwug(sd) ) {
switch( skill_id ) {
+ // Hunter skills
case HT_SKIDTRAP:
case HT_LANDMINE:
case HT_ANKLESNARE:
@@ -12655,43 +12689,39 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
case HT_FREEZINGTRAP:
case HT_BLASTMINE:
case HT_CLAYMORETRAP:
- case HT_SPRINGTRAP:
+ case HT_TALKIEBOX:
+ // Ranger skills
case RA_DETONATOR:
+ case RA_ELECTRICSHOCKER:
case RA_CLUSTERBOMB:
- case HT_TALKIEBOX:
+ case RA_MAGENTATRAP:
+ case RA_COBALTTRAP:
+ case RA_MAIZETRAP:
+ case RA_VERDURETRAP:
case RA_FIRINGTRAP:
case RA_ICEBOUNDTRAP:
case RA_WUGDASH:
case RA_WUGRIDER:
case RA_WUGSTRIKE:
+ // Other
+ case BS_GREED:
break;
default: // in official there is no message.
return 0;
}
}
+
+ // Check the skills that can be used whiled using mado
if( pc_ismadogear(sd) ) {
- switch( skill_id ) { //None Mado skills are unusable when Mado is equipped. [Jobbie]
- case BS_REPAIRWEAPON:
- case WS_MELTDOWN:
- case BS_HAMMERFALL:
- case WS_CARTBOOST:
- case BS_ADRENALINE:
- case WS_WEAPONREFINE:
- case BS_WEAPONPERFECT:
- case WS_CARTTERMINATION:
- case BS_OVERTHRUST:
- case WS_OVERTHRUSTMAX:
- case BS_MAXIMIZE:
- case BS_ADRENALINE2:
- case BS_UNFAIRLYTRICK:
- case BS_GREED:
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR,0);
- return 0;
- default: //Only Mechanic exlcusive skill can be used.
- break;
+ if( !(skill_id > NC_MADOLICENCE && skill_id <= NC_DISJOINT)
+ && skill_id != NC_MAGMA_ERUPTION
+ && skill_id != BS_GREED ) {
+ clif->skill_fail(sd,skill_id,USESKILL_FAIL_MADOGEAR,0);
+ return 0;
}
}
+
if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL )
return 0;
@@ -13001,7 +13031,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
return 0;
}
break;
- case AM_REST: //Can't vapo homun if you don't have an active homunc or it's hp is < 80%
+ case AM_REST: //Can't vapo homun if you don't have an active homun or it's hp is < 80%
if (!homun_alive(sd->hd) || sd->hd->battle_status.hp < (sd->hd->battle_status.max_hp*80/100))
{
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
@@ -13042,14 +13072,17 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
case WL_COMET:
{
int idx;
+
+ if( !require.itemid[0] ) // issue: 7935
+ break;
if( skill->check_pc_partner(sd,skill_id,&skill_lv,1,0) <= 0 && ((idx = pc->search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[idx].amount < require.amount[0]) )
{
//clif->skill_fail(sd,skill_id,USESKILL_FAIL_NEED_ITEM,require.amount[0],require.itemid[0]);
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
- }
break;
+ }
case WL_SUMMONFB:
case WL_SUMMONBL:
case WL_SUMMONWB:
@@ -13059,7 +13092,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
{
int j, i = 0;
for(j = SC_SUMMON1; j <= SC_SUMMON5; j++)
- if( sc && sc->data[j] )
+ if( sc && sc->data[j] )
i++;
switch(skill_id){
@@ -13438,7 +13471,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
// There's no need to check if the skill is part of a combo if it's
// already been checked before, see unit_skilluse_id2 [Panikon]
- // Note that if this check is readded part of issue:8047 will reapear!
+ // Note that if this check is read part of issue:8047 will reappear!
//if( sd->sc.data[SC_COMBOATTACK] && !skill->is_combo(skill_id ) )
// return 0;
@@ -13686,7 +13719,7 @@ int skill_consume_requirement( struct map_session_data *sd, uint16 skill_id, uin
continue;
if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_WIZARD )
- continue; //Gemstones are checked, but not substracted from inventory.
+ continue; //Gemstones are checked, but not subtracted from inventory.
switch( skill_id ){
case SA_SEISMICWEAPON:
@@ -13881,7 +13914,7 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN )
{
if( sd->special_state.no_gemstone )
- { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica
+ { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card [helvetica]
if( skill_id != SA_ABRACADABRA )
req.itemid[i] = req.amount[i] = 0;
else if( --req.amount[i] < 1 )
@@ -14129,9 +14162,9 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
if( sd->bonus.varcastrate < 0 )
VARCAST_REDUCTION(sd->bonus.varcastrate);
if( sd->bonus.add_varcast != 0 ) // bonus bVariableCast
- time += sd->bonus.add_varcast;
+ time += sd->bonus.add_varcast;
if( sd->bonus.add_fixcast != 0 ) // bonus bFixedCast
- fixed += sd->bonus.add_fixcast;
+ fixed += sd->bonus.add_fixcast;
for (i = 0; i < ARRAYLENGTH(sd->skillfixcast) && sd->skillfixcast[i].id; i++)
if (sd->skillfixcast[i].id == skill_id){ // bonus2 bSkillFixedCast
fixed += sd->skillfixcast[i].val;
@@ -14202,7 +14235,7 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
fixcast_r = max(fixcast_r, sc->data[SC_DANCE_WITH_WUG]->val4);
if( sc->data[SC_SECRAMENT] )
fixcast_r = max(fixcast_r, sc->data[SC_SECRAMENT]->val2);
- if( sd && ( skill_lv = pc->checkskill(sd, WL_RADIUS) ) && (skill_id >= WL_WHITEIMPRISON && skill_id < WL_FREEZE_SP) )
+ if( sd && ( skill_lv = pc->checkskill(sd, WL_RADIUS) ) && (skill_id >= WL_WHITEIMPRISON && skill_id < WL_FREEZE_SP) )
fixcast_r = max(fixcast_r, (status_get_int(bl) + status->get_lv(bl)) / 15 + skill_lv * 5); // [{(Caster?s INT / 15) + (Caster?s Base Level / 15) + (Radius Skill Level x 5)}] %
// Fixed cast non percentage bonuses
if( sc->data[SC_MANDRAGORA] )
@@ -15038,7 +15071,7 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) {
if( su == NULL || su->group == NULL || (*alive) == 0 )
return 0;
- if( su->group->state.guildaura ) /* guild auras are not cancelled! */
+ if( su->group->state.guildaura ) /* guild auras are not canceled! */
return 0;
switch (skill_id) {
@@ -15290,6 +15323,36 @@ bool skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce
return wall;
}
+
+/**
+ * Verifies if an user can use SC_CLOAKING
+ **/
+bool skill_can_cloak(struct map_session_data *sd) {
+ nullpo_retr(false, sd);
+
+ //Avoid cloaking with no wall and low skill level. [Skotlex]
+ //Due to the cloaking card, we have to check the wall versus to known
+ //skill level rather than the used one. [Skotlex]
+ //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL))
+ if (pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(&sd->bl,NULL))
+ return false;
+
+ return true;
+}
+
+/**
+ * Verifies if an user can still be cloaked (AS_CLOAKING)
+ * Is called via map->foreachinrange when any kind of wall disapears
+ **/
+int skill_check_cloaking_end(struct block_list *bl, va_list ap) {
+ TBL_PC *sd = BL_CAST(BL_PC, bl);
+
+ if (sd && sd->sc.data[SC_CLOAKING] && !skill->can_cloak(sd))
+ status_change_end(bl, SC_CLOAKING, INVALID_TIMER);
+
+ return 0;
+}
+
bool skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce)
{
static int dx[] = { 0, 1, 0, -1, -1, 1, 1, -1};
@@ -15328,7 +15391,7 @@ bool skill_check_shadowform(struct block_list *bl, int64 damage, int hit){
if( sc && sc->data[SC__SHADOWFORM] && damage ) {
src = map->id2bl(sc->data[SC__SHADOWFORM]->val2);
- if( !src || src->m != bl->m ) {
+ if( !src || src->m != bl->m ) {
status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
return false;
}
@@ -15438,6 +15501,13 @@ int skill_delunit (struct skill_unit* su) {
clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,su->val2,ALL_SAMEMAP); // hack to avoid clientside cell bug
skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,false);
map->list[su->bl.m].icewall_num--;
+ // AS_CLOAKING in low levels requires a wall to be cast, thus it needs to be
+ // checked again when a wall disapears! issue:8182 [Panikon]
+ map->foreachinarea(skill->check_cloaking_end, su->bl.m,
+ // Use 3x3 area to check for users near cell
+ su->bl.x - 1, su->bl.y - 1,
+ su->bl.x + 1, su->bl.x + 1,
+ BL_PC);
break;
case SA_LANDPROTECTOR:
skill->unitsetmapcell(su,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,false);
@@ -15452,7 +15522,7 @@ int skill_delunit (struct skill_unit* su) {
}
break;
case SC_MANHOLE: // Note : Removing the unit don't remove the status (official info)
- if( group->val2 ) { // Someone Traped
+ if( group->val2 ) { // Someone Trapped
struct status_change *tsc = status->get_sc(map->id2bl(group->val2));
if( tsc && tsc->data[SC__MANHOLE] )
tsc->data[SC__MANHOLE]->val4 = 0; // Remove the Unit ID
@@ -15599,7 +15669,7 @@ int skill_delunitgroup(struct skill_unit_group *group, const char* file, int lin
struct status_change* sc = status->get_sc(src);
if (sc && sc->data[SC_DANCING])
{
- sc->data[SC_DANCING]->val2 = 0 ; //This prevents status_change_end attempting to redelete the group. [Skotlex]
+ sc->data[SC_DANCING]->val2 = 0 ; //This prevents status_change_end attempting to re-delete the group. [Skotlex]
status_change_end(src, SC_DANCING, INVALID_TIMER);
}
}
@@ -15981,7 +16051,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
return 0;
}
/*==========================================
- * Executes on all skill units every SKILLUNITTIMER_INTERVAL miliseconds.
+ * Executes on all skill units every SKILLUNITTIMER_INTERVAL milliseconds.
*------------------------------------------*/
int skill_unit_timer(int tid, int64 tick, int id, intptr_t data) {
map->freeblock_lock();
@@ -16073,9 +16143,6 @@ int skill_unit_move_sub(struct block_list* bl, va_list ap) {
}
}
- //TODO: Normally, this is dangerous since the unit and group could be freed
- //inside the onout/onplace functions. Currently it is safe because we know song/dance
- //cells do not get deleted within them. [Skotlex]
if( dissonance ) skill->dance_switch(su, 1);
if( flag&4 )
@@ -16388,7 +16455,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
make_per = 100000; // Star Crumbs are 100% success crafting rate? (made 1000% so it succeeds even after penalties) [Skotlex]
break;
default: // Enchanted Stones
- make_per += 1000+i*500; // Enchantedstone Craft bonus: +15/+20/+25/+30/+35
+ make_per += 1000+i*500; // Enchanted stone Craft bonus: +15/+20/+25/+30/+35
break;
}
break;
@@ -16436,7 +16503,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
case ITEMID_COATING_BOTTLE:
make_per -= (1+rnd()%100)*10;
break;
- //Common items, recieve no bonus or penalty, listed just because they are commonly produced
+ //Common items, receive no bonus or penalty, listed just because they are commonly produced
case ITEMID_BLUE_POTION:
case ITEMID_RED_SLIM_POTION:
case ITEMID_ANODYNE:
@@ -17339,7 +17406,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
return 0;
}
-int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { //[orn]
+int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { // [orn]
struct homun_data *hd = (TBL_HOM*)map->id2bl(id);
if (data <= 0 || data >= MAX_SKILL)
return 0;
@@ -17348,7 +17415,7 @@ int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { //[orn]
return 1;
}
-int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { //[orn]
+int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { // [orn]
uint16 idx = skill->get_index(skill_id);
nullpo_retr (-1, hd);
@@ -17364,7 +17431,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { /
return timer->add(timer->gettick() + tick, skill->blockhomun_end, hd->bl.id, idx);
}
-int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {//[orn]
+int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {// [orn]
struct mercenary_data *md = (TBL_MER*)map->id2bl(id);
if( data <= 0 || data >= MAX_SKILL )
return 0;
@@ -17952,7 +18019,7 @@ bool skill_parse_row_requiredb(char* split[], int columns, int current) {
skill->split_atoi(split[5],skill->db[idx].sp_rate);
skill->split_atoi(split[6],skill->db[idx].zeny);
- //Wich weapon type are required, see doc/item_db for types
+ //Which weapon type are required, see doc/item_db for types
p = split[7];
for( j = 0; j < 32; j++ ) {
int l = atoi(p);
@@ -18449,7 +18516,7 @@ void skill_defaults(void) {
memset(&skill->area_temp,0,sizeof(skill->area_temp));
memset(&skill->unit_temp,0,sizeof(skill->unit_temp));
skill->unit_group_newid = 0;
- /* accesssors */
+ /* accessors */
skill->get_index = skill_get_index;
skill->get_type = skill_get_type;
skill->get_hit = skill_get_hit;
@@ -18520,7 +18587,7 @@ void skill_defaults(void) {
skill->unit_onplace = skill_unit_onplace;
skill->unit_ondamaged = skill_unit_ondamaged;
skill->cast_fix = skill_castfix;
- skill->cast_fix_sc = skill_castfix_sc;
+ skill->cast_fix_sc = skill_castfix_sc;
skill->vf_cast_fix = skill_vfcastfix;
skill->delay_fix = skill_delay_fix;
skill->check_condition_castbegin = skill_check_condition_castbegin;
@@ -18540,6 +18607,8 @@ void skill_defaults(void) {
skill->autospell = skill_autospell;
skill->calc_heal = skill_calc_heal;
skill->check_cloaking = skill_check_cloaking;
+ skill->check_cloaking_end = skill_check_cloaking_end;
+ skill->can_cloak = skill_can_cloak;
skill->enchant_elemental_end = skill_enchant_elemental_end;
skill->not_ok = skillnotok;
skill->not_ok_hom = skillnotok_hom;
diff --git a/src/map/skill.h b/src/map/skill.h
index dda310bd4..352e31f9e 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2,22 +2,26 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_SKILL_H_
-#define _MAP_SKILL_H_
+#ifndef MAP_SKILL_H
+#define MAP_SKILL_H
+
+#include "../config/core.h" // RENEWAL_CAST
-#include "../common/mmo.h" // MAX_SKILL, struct square
-#include "../common/db.h"
#include "map.h" // struct block_list
+#include "status.h" // enum sc_type
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/mmo.h" // MAX_SKILL, struct square
/**
* Declarations
**/
-struct map_session_data;
struct homun_data;
+struct map_session_data;
+struct mercenary_data;
struct skill_unit;
-struct skill_unit_group;
-struct status_change_entry;
struct square;
+struct status_change_entry;
/**
* Defines
@@ -162,7 +166,7 @@ enum {
enum e_skill {
NV_BASIC = 1,
-
+
SM_SWORD,
SM_TWOHAND,
SM_RECOVERY,
@@ -170,7 +174,7 @@ enum e_skill {
SM_PROVOKE,
SM_MAGNUM,
SM_ENDURE,
-
+
MG_SRECOVERY,
MG_SIGHT,
MG_NAPALMBEAT,
@@ -184,7 +188,7 @@ enum e_skill {
MG_FIREBOLT,
MG_LIGHTNINGBOLT,
MG_THUNDERSTORM,
-
+
AL_DP,
AL_DEMONBANE,
AL_RUWACH,
@@ -199,7 +203,7 @@ enum e_skill {
AL_ANGELUS,
AL_BLESSING,
AL_CURE,
-
+
MC_INCCARRY,
MC_DISCOUNT,
MC_OVERCHARGE,
@@ -207,22 +211,22 @@ enum e_skill {
MC_IDENTIFY,
MC_VENDING,
MC_MAMMONITE,
-
+
AC_OWL,
AC_VULTURE,
AC_CONCENTRATION,
AC_DOUBLE,
AC_SHOWER,
-
+
TF_DOUBLE,
TF_MISS,
TF_STEAL,
TF_HIDING,
TF_POISON,
TF_DETOXIFY,
-
+
ALL_RESURRECTION,
-
+
KN_SPEARMASTERY,
KN_PIERCE,
KN_BRANDISHSPEAR,
@@ -233,7 +237,7 @@ enum e_skill {
KN_BOWLINGBASH,
KN_RIDING,
KN_CAVALIERMASTERY,
-
+
PR_MACEMASTERY,
PR_IMPOSITIO,
PR_SUFFRAGIUM,
@@ -249,7 +253,7 @@ enum e_skill {
PR_TURNUNDEAD,
PR_LEXAETERNA,
PR_MAGNUS,
-
+
WZ_FIREPILLAR,
WZ_SIGHTRASHER,
WZ_FIREIVY,
@@ -264,7 +268,7 @@ enum e_skill {
WZ_HEAVENDRIVE,
WZ_QUAGMIRE,
WZ_ESTIMATION,
-
+
BS_IRON,
BS_STEEL,
BS_ENCHANTEDSTONE,
@@ -286,7 +290,7 @@ enum e_skill {
BS_WEAPONPERFECT,
BS_OVERTHRUST,
BS_MAXIMIZE,
-
+
HT_SKIDTRAP,
HT_LANDMINE,
HT_ANKLESNARE,
@@ -304,7 +308,7 @@ enum e_skill {
HT_BLITZBEAT,
HT_DETECTING,
HT_SPRINGTRAP,
-
+
AS_RIGHT,
AS_LEFT,
AS_KATAR,
@@ -315,7 +319,7 @@ enum e_skill {
AS_POISONREACT,
AS_VENOMDUST,
AS_SPLASHER,
-
+
NV_FIRSTAID,
NV_TRICKDEAD,
SM_MOVINGRECOVERY,
@@ -332,7 +336,7 @@ enum e_skill {
MC_LOUD,
AL_HOLYLIGHT,
MG_ENERGYCOAT,
-
+
NPC_PIERCINGATT,
NPC_MENTALBREAKER,
NPC_RANGEATTACK,
@@ -385,7 +389,7 @@ enum e_skill {
NPC_HALLUCINATION,
NPC_REBIRTH,
NPC_SUMMONMONSTER,
-
+
RG_SNATCHER,
RG_STEALCOIN,
RG_BACKSTAP,
@@ -402,7 +406,7 @@ enum e_skill {
RG_GANGSTER,
RG_COMPULSION,
RG_PLAGIARISM,
-
+
AM_AXEMASTERY,
AM_LEARNINGPOTION,
AM_PHARMACY,
@@ -425,7 +429,7 @@ enum e_skill {
AM_DRILLMASTER,
AM_HEALHOMUN,
AM_RESURRECTHOMUN,
-
+
CR_TRUST,
CR_AUTOGUARD,
CR_SHIELDCHARGE,
@@ -437,7 +441,7 @@ enum e_skill {
CR_PROVIDENCE,
CR_DEFENDER,
CR_SPEARQUICKEN,
-
+
MO_IRONHAND,
MO_SPIRITSRECOVERY,
MO_CALLSPIRITS,
@@ -453,7 +457,7 @@ enum e_skill {
MO_EXTREMITYFIST,
MO_CHAINCOMBO,
MO_COMBOFINISH,
-
+
SA_ADVANCEDBOOK,
SA_CASTCANCEL,
SA_MAGICROD,
@@ -484,7 +488,7 @@ enum e_skill {
SA_INSTANTDEATH,
SA_FULLRECOVERY,
SA_COMA,
-
+
BD_ADAPTATION,
BD_ENCORE,
BD_LULLABY,
@@ -496,7 +500,7 @@ enum e_skill {
BD_INTOABYSS,
BD_SIEGFRIED,
BD_RAGNAROK,
-
+
BA_MUSICALLESSON,
BA_MUSICALSTRIKE,
BA_DISSONANCE,
@@ -505,7 +509,7 @@ enum e_skill {
BA_ASSASSINCROSS,
BA_POEMBRAGI,
BA_APPLEIDUN,
-
+
DC_DANCINGLESSON,
DC_THROWARROW,
DC_UGLYDANCE,
@@ -514,17 +518,17 @@ enum e_skill {
DC_DONTFORGETME,
DC_FORTUNEKISS,
DC_SERVICEFORYOU,
-
+
NPC_RANDOMMOVE,
NPC_SPEEDUP,
NPC_REVENGE,
-
+
WE_MALE,
WE_FEMALE,
WE_CALLPARTNER,
-
+
ITM_TOMAHAWK,
-
+
NPC_DARKCROSS,
NPC_GRANDDARKNESS,
NPC_DARKSTRIKE,
@@ -542,7 +546,7 @@ enum e_skill {
NPC_CALLSLAVE,
NPC_INVISIBLE,
NPC_RUN,
-
+
LK_AURABLADE,
LK_PARRYING,
LK_CONCENTRATION,
@@ -596,10 +600,11 @@ enum e_skill {
PF_SPIDERWEB,
ASC_METEORASSAULT,
ASC_CDP,
+
WE_BABY,
WE_CALLPARENT,
WE_CALLBABY,
-
+
TK_RUN,
TK_READYSTORM,
TK_STORMKICK,
@@ -616,7 +621,7 @@ enum e_skill {
TK_POWER,
TK_SEVENWIND,
TK_HIGHJUMP,
-
+
SG_FEEL,
SG_SUN_WARM,
SG_MOON_WARM,
@@ -635,7 +640,7 @@ enum e_skill {
SG_FRIEND,
SG_KNOWLEDGE,
SG_FUSION,
-
+
SL_ALCHEMIST,
AM_BERSERKPITCHER,
SL_MONK,
@@ -664,7 +669,7 @@ enum e_skill {
SL_SWOO,
SL_SKE,
SL_SKA,
-
+
SM_SELFPROVOKE,
NPC_EMOTION_ON,
ST_PRESERVE,
@@ -692,7 +697,7 @@ enum e_skill {
AM_TWILIGHT2,
AM_TWILIGHT3,
HT_POWER,
-
+
GS_GLITTERING,
GS_FLING,
GS_TRIPLEACTION,
@@ -715,7 +720,7 @@ enum e_skill {
GS_FULLBUSTER,
GS_SPREADATTACK,
GS_GROUNDDRIFT,
-
+
NJ_TOBIDOUGU,
NJ_SYURIKEN,
NJ_KUNAI,
@@ -739,7 +744,7 @@ enum e_skill {
NJ_KAMAITACHI,
NJ_NEN,
NJ_ISSEN,
-
+
MB_FIGHTING,
MB_NEUTRAL,
MB_TAIMING_PUTI,
@@ -767,7 +772,7 @@ enum e_skill {
MB_M_WALLCRASH,
MB_M_REINCARNATION,
MB_B_EQUIP,
-
+
SL_DEATHKNIGHT,
SL_COLLECTOR,
SL_NINJA,
@@ -776,7 +781,7 @@ enum e_skill {
DA_RESET,
DE_BERSERKAIZER,
DA_DARKPOWER,
-
+
DE_PASSIVE,
DE_PATTACK,
DE_PSPEED,
@@ -816,7 +821,7 @@ enum e_skill {
DE_TWINATTACK,
DE_WINDATTACK,
DE_WATERATTACK,
-
+
DA_ENERGY,
DA_CLOUD,
DA_FIRSTSLOT,
@@ -851,7 +856,7 @@ enum e_skill {
ALL_TIMEIN,
DA_ZENYRANK,
DA_ACCESSORYMIX,
-
+
NPC_EARTHQUAKE,
NPC_FIREBREATH,
NPC_ICEBREATH,
@@ -880,7 +885,6 @@ enum e_skill {
NPC_WIDESTUN,
NPC_VAMPIRE_GIFT,
NPC_WIDESOULDRAIN,
-
ALL_INCCARRY,
NPC_TALK,
NPC_HELLPOWER,
@@ -909,6 +913,23 @@ enum e_skill {
NPC_VENOMFOG,
NPC_MILLENNIUMSHIELD,
NPC_COMET,
+// TODO: What PACKETVER are these skills added? [Panikon]
+// After this addition all skills from NPC_WIDEWEB to NPC_LEX_AETERNA
+// will have their IDs changed
+#if PACKETVER >= 20140205
+ NPC_ICEMINE,
+ NPC_ICEEXPLO,
+ NPC_FLAMECROSS,
+ NPC_PULSESTRIKE2,
+ NPC_DANCINGBLADE,
+ NPC_DANCINGBLADE_ATK,
+ NPC_DARKPIERCING,
+ NPC_MAXPAIN,
+ NPC_MAXPAIN_ATK,
+ NPC_DEATHSUMMON,
+ NPC_HELLBURNING,
+ NPC_JACKFROST,
+#endif
NPC_WIDEWEB,
NPC_WIDESUCK,
NPC_STORMGUST2,
@@ -936,7 +957,7 @@ enum e_skill {
SA_ELEMENTGROUND,
SA_ELEMENTFIRE,
SA_ELEMENTWIND,
-
+
RK_ENCHANTBLADE = 2001,
RK_SONICWAVE,
RK_DEATHBOUND,
@@ -957,7 +978,7 @@ enum e_skill {
RK_FIGHTINGSPIRIT,
RK_ABUNDANCE,
RK_PHANTOMTHRUST,
-
+
GC_VENOMIMPRESS,
GC_CROSSIMPACT,
GC_DARKILLUSION,
@@ -975,7 +996,7 @@ enum e_skill {
GC_HALLUCINATIONWALK,
GC_ROLLINGCUTTER,
GC_CROSSRIPPERSLASHER,
-
+
AB_JUDEX,
AB_ANCILLA,
AB_ADORAMUS,
@@ -996,7 +1017,7 @@ enum e_skill {
AB_DUPLELIGHT_MELEE,
AB_DUPLELIGHT_MAGIC,
AB_SILENTIUM,
-
+
WL_WHITEIMPRISON = 2201,
WL_SOULEXPANSION,
WL_FROSTMISTY,
@@ -1029,7 +1050,7 @@ enum e_skill {
WL_RELEASE,
WL_READING_SB,
WL_FREEZE_SP,
-
+
RA_ARROWSTORM,
RA_FEARBREEZE,
RA_RANGERMAIN,
@@ -1052,7 +1073,7 @@ enum e_skill {
RA_VERDURETRAP,
RA_FIRINGTRAP,
RA_ICEBOUNDTRAP,
-
+
NC_MADOLICENCE,
NC_BOOSTKNUCKLE,
NC_PILEBUNKER,
@@ -1082,7 +1103,7 @@ enum e_skill {
NC_SILVERSNIPER,
NC_MAGICDECOY,
NC_DISJOINT,
-
+
SC_FATALMENACE,
SC_REPRODUCE,
SC_AUTOSHADOWSPELL,
@@ -1104,7 +1125,7 @@ enum e_skill {
SC_MAELSTROM,
SC_BLOODYLUST,
SC_FEINTBOMB,
-
+
LG_CANNONSPEAR = 2307,
LG_BANISHINGPOINT,
LG_TRAMPLE,
@@ -1124,7 +1145,7 @@ enum e_skill {
LG_EARTHDRIVE,
LG_HESPERUSLIT,
LG_INSPIRATION,
-
+
SR_DRAGONCOMBO,
SR_SKYNETBLOW,
SR_EARTHSHAKER,
@@ -1148,15 +1169,15 @@ enum e_skill {
SR_GENTLETOUCH_ENERGYGAIN,
SR_GENTLETOUCH_CHANGE,
SR_GENTLETOUCH_REVITALIZE,
-
+
WA_SWING_DANCE = 2350,
WA_SYMPHONY_OF_LOVER,
WA_MOONLIT_SERENADE,
-
+
MI_RUSH_WINDMILL = 2381,
MI_ECHOSONG,
MI_HARMONIZE,
-
+
WM_LESSON = 2412,
WM_METALICSOUND,
WM_REVERBERATION,
@@ -1180,7 +1201,7 @@ enum e_skill {
WM_MELODYOFSINK,
WM_BEYOND_OF_WARCRY,
WM_UNLIMITED_HUMMING_VOICE,
-
+
SO_FIREWALK = 2443,
SO_ELECTRICWALK,
SO_SPELLFIST,
@@ -1207,7 +1228,7 @@ enum e_skill {
SO_WATER_INSIGNIA,
SO_WIND_INSIGNIA,
SO_EARTH_INSIGNIA,
-
+
GN_TRAINING_SWORD = 2474,
GN_REMODELING_CART,
GN_CART_TORNADO,
@@ -1233,14 +1254,14 @@ enum e_skill {
GN_MAKEBOMB,
GN_S_PHARMACY,
GN_SLINGITEM_RANGEMELEEATK,
-
+
AB_SECRAMENT = 2515,
WM_SEVERE_RAINSTORM_MELEE,
SR_HOWLINGOFLION,
SR_RIDEINLIGHTNING,
LG_OVERBRAND_BRANDISH,
LG_OVERBRAND_PLUSATK,
-
+
ALL_ODINS_RECALL = 2533,
RETURN_TO_ELDICASTES,
ALL_BUYING_STORE,
@@ -1253,7 +1274,12 @@ enum e_skill {
ALL_TETANY,
ALL_RAY_OF_PROTECTION,
MC_CARTDECORATE,
-
+ GM_ITEM_ATKMAX,
+ GM_ITEM_ATKMIN,
+ GM_ITEM_MATKMAX,
+ GM_ITEM_MATKMIN,
+ ALL_LIGHTGUARD,
+
RL_GLITTERING_GREED = 2551,
RL_RICHS_COIN,
RL_MASS_SPIRAL,
@@ -1278,7 +1304,7 @@ enum e_skill {
RL_R_TRIP_PLUSATK,
RL_B_FLICKER_ATK,
RL_GLITTERING_GREED_ATK,
-
+
KO_YAMIKUMO = 3001,
KO_RIGHT,
KO_LEFT,
@@ -1308,12 +1334,17 @@ enum e_skill {
OB_OBOROGENSOU,
OB_OBOROGENSOU_TRANSITION_ATK,
OB_AKAITSUKI,
-
+
ECL_SNOWFLIP = 3031,
ECL_PEONYMAMY,
ECL_SADAGUI,
ECL_SEQUOIADUST,
ECLAGE_RECALL,
+ BA_POEMBRAGI2,
+ DC_FORTUNEKISS2,
+ ITEM_OPTION_SPLASH_ATTACK,
+ GM_FORCE_TRANSFER,
+ GM_WIDE_RESURRECTION,
GC_DARKCROW = 5001,
RA_UNLIMIT,
@@ -1329,10 +1360,7 @@ enum e_skill {
WL_TELEKINESIS_INTENSE,
LG_KINGS_GRACE,
ALL_FULL_THROTTLE,
- SR_FLASHCOMBO_ATK_STEP1,
- SR_FLASHCOMBO_ATK_STEP2,
- SR_FLASHCOMBO_ATK_STEP3,
- SR_FLASHCOMBO_ATK_STEP4,
+ NC_MAGMA_ERUPTION_DOTDAMAGE,
HLIF_HEAL = 8001,
HLIF_AVOID,
@@ -1377,7 +1405,7 @@ enum e_skill {
MH_LAVA_SLIDE,
MH_PYROCLASTIC,
MH_VOLCANIC_ASH,
-
+
MS_BASH = 8201,
MS_MAGNUM,
MS_BOWLINGBASH,
@@ -1418,7 +1446,8 @@ enum e_skill {
MER_KYRIE,
MER_BLESSING,
MER_INCAGI,
-
+ MER_INVINCIBLEOFF2,
+
EL_CIRCLE_OF_FIRE = 8401,
EL_FIRE_CLOAK,
EL_FIRE_MANTLE,
@@ -1593,7 +1622,7 @@ enum {
UNT_ZENKAI_WIND,
UNT_MAKIBISHI,
UNT_VENOMFOG,
- UNT_ICEMINE,
+ UNT_ICEMINE,
UNT_FLAMECROSS,
UNT_HELLBURNING,
UNT_MAGMA_ERUPTION,
@@ -1914,6 +1943,8 @@ struct skill_interface {
int (*autospell) (struct map_session_data *md,uint16 skill_id);
int (*calc_heal) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal);
bool (*check_cloaking) (struct block_list *bl, struct status_change_entry *sce);
+ int (*check_cloaking_end) (struct block_list *bl, va_list ap);
+ bool (*can_cloak) (struct map_session_data *sd);
int (*enchant_elemental_end) (struct block_list *bl, int type);
int (*not_ok) (uint16 skill_id, struct map_session_data *sd);
int (*not_ok_hom) (uint16 skill_id, struct homun_data *hd);
@@ -2015,4 +2046,4 @@ struct skill_interface *skill;
void skill_defaults(void);
-#endif /* _MAP_SKILL_H_ */
+#endif /* MAP_SKILL_H */
diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt
deleted file mode 100644
index 11751a1a5..000000000
--- a/src/map/sql/CMakeLists.txt
+++ /dev/null
@@ -1,118 +0,0 @@
-
-#
-# map sql
-#
-if( BUILD_SQL_SERVERS )
-message( STATUS "Creating target map-server" )
-set( SQL_MAP_HEADERS
- "${SQL_MAP_SOURCE_DIR}/atcommand.h"
- "${SQL_MAP_SOURCE_DIR}/battle.h"
- "${SQL_MAP_SOURCE_DIR}/battleground.h"
- "${SQL_MAP_SOURCE_DIR}/buyingstore.h"
- "${SQL_MAP_SOURCE_DIR}/chat.h"
- "${SQL_MAP_SOURCE_DIR}/chrif.h"
- "${SQL_MAP_SOURCE_DIR}/clif.h"
- "${SQL_MAP_SOURCE_DIR}/date.h"
- "${SQL_MAP_SOURCE_DIR}/duel.h"
- "${SQL_MAP_SOURCE_DIR}/elemental.h"
- "${SQL_MAP_SOURCE_DIR}/guild.h"
- "${SQL_MAP_SOURCE_DIR}/homunculus.h"
- "${SQL_MAP_SOURCE_DIR}/HPMmap.h"
- "${SQL_MAP_SOURCE_DIR}/instance.h"
- "${SQL_MAP_SOURCE_DIR}/intif.h"
- "${SQL_MAP_SOURCE_DIR}/irc-bot.h"
- "${SQL_MAP_SOURCE_DIR}/itemdb.h"
- "${SQL_MAP_SOURCE_DIR}/log.h"
- "${SQL_MAP_SOURCE_DIR}/mail.h"
- "${SQL_MAP_SOURCE_DIR}/map.h"
- "${SQL_MAP_SOURCE_DIR}/mapreg.h"
- "${SQL_MAP_SOURCE_DIR}/mercenary.h"
- "${SQL_MAP_SOURCE_DIR}/mob.h"
- "${SQL_MAP_SOURCE_DIR}/npc.h"
- "${SQL_MAP_SOURCE_DIR}/packets.h"
- "${SQL_MAP_SOURCE_DIR}/packets_struct.h"
- "${SQL_MAP_SOURCE_DIR}/party.h"
- "${SQL_MAP_SOURCE_DIR}/path.h"
- "${SQL_MAP_SOURCE_DIR}/pc.h"
- "${SQL_MAP_SOURCE_DIR}/pc_groups.h"
- "${SQL_MAP_SOURCE_DIR}/pet.h"
- "${SQL_MAP_SOURCE_DIR}/quest.h"
- "${SQL_MAP_SOURCE_DIR}/script.h"
- "${SQL_MAP_SOURCE_DIR}/searchstore.h"
- "${SQL_MAP_SOURCE_DIR}/skill.h"
- "${SQL_MAP_SOURCE_DIR}/status.h"
- "${SQL_MAP_SOURCE_DIR}/storage.h"
- "${SQL_MAP_SOURCE_DIR}/trade.h"
- "${SQL_MAP_SOURCE_DIR}/unit.h"
- "${SQL_MAP_SOURCE_DIR}/vending.h"
- )
-set( SQL_MAP_SOURCES
- "${SQL_MAP_SOURCE_DIR}/atcommand.c"
- "${SQL_MAP_SOURCE_DIR}/battle.c"
- "${SQL_MAP_SOURCE_DIR}/battleground.c"
- "${SQL_MAP_SOURCE_DIR}/buyingstore.c"
- "${SQL_MAP_SOURCE_DIR}/chat.c"
- "${SQL_MAP_SOURCE_DIR}/chrif.c"
- "${SQL_MAP_SOURCE_DIR}/clif.c"
- "${SQL_MAP_SOURCE_DIR}/date.c"
- "${SQL_MAP_SOURCE_DIR}/duel.c"
- "${SQL_MAP_SOURCE_DIR}/elemental.c"
- "${SQL_MAP_SOURCE_DIR}/guild.c"
- "${SQL_MAP_SOURCE_DIR}/homunculus.c"
- "${SQL_MAP_SOURCE_DIR}/HPMmap.c"
- "${SQL_MAP_SOURCE_DIR}/instance.c"
- "${SQL_MAP_SOURCE_DIR}/intif.c"
- "${SQL_MAP_SOURCE_DIR}/irc-bot.c"
- "${SQL_MAP_SOURCE_DIR}/itemdb.c"
- "${SQL_MAP_SOURCE_DIR}/log.c"
- "${SQL_MAP_SOURCE_DIR}/mail.c"
- "${SQL_MAP_SOURCE_DIR}/map.c"
- "${SQL_MAP_SOURCE_DIR}/mapreg_sql.c"
- "${SQL_MAP_SOURCE_DIR}/mercenary.c"
- "${SQL_MAP_SOURCE_DIR}/mob.c"
- "${SQL_MAP_SOURCE_DIR}/npc.c"
- "${SQL_MAP_SOURCE_DIR}/npc_chat.c"
- "${SQL_MAP_SOURCE_DIR}/party.c"
- "${SQL_MAP_SOURCE_DIR}/path.c"
- "${SQL_MAP_SOURCE_DIR}/pc.c"
- "${SQL_MAP_SOURCE_DIR}/pc_groups.c"
- "${SQL_MAP_SOURCE_DIR}/pet.c"
- "${SQL_MAP_SOURCE_DIR}/quest.c"
- "${SQL_MAP_SOURCE_DIR}/script.c"
- "${SQL_MAP_SOURCE_DIR}/searchstore.c"
- "${SQL_MAP_SOURCE_DIR}/skill.c"
- "${SQL_MAP_SOURCE_DIR}/status.c"
- "${SQL_MAP_SOURCE_DIR}/storage.c"
- "${SQL_MAP_SOURCE_DIR}/trade.c"
- "${SQL_MAP_SOURCE_DIR}/unit.c"
- "${SQL_MAP_SOURCE_DIR}/vending.c"
- )
-set( DEPENDENCIES common_sql )
-set( LIBRARIES ${GLOBAL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" )
-if( WITH_PCRE )
- message( STATUS "Enabled PCRE code" )
- set( LIBRARIES ${LIBRARIES} ${PCRE_LIBRARIES} )
- set( INCLUDE_DIRS ${INCLUDE_DIRS} ${PCRE_INCLUDE_DIRS} )
- set( DEFINITIONS "${DEFINITIONS} -DPCRE_SUPPORT" )
-else()
- message( STATUS "Disabled PCRE code" )
-endif()
-set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} )
-source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
-source_group( map FILES ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} )
-include_directories( ${INCLUDE_DIRS} )
-add_executable( map-server ${SOURCE_FILES} )
-add_dependencies( map-server ${DEPENDENCIES} )
-target_link_libraries( map-server ${LIBRARIES} ${DEPENDENCIES} )
-set_target_properties( map-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server" GROUP Runtime )
- install( TARGETS map-server
- DESTINATION "."
- COMPONENT Runtime_mapserver_sql )
-endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" )
-message( STATUS "Creating target map-server - done" )
-endif( BUILD_SQL_SERVERS )
diff --git a/src/map/status.c b/src/map/status.c
index 9a2151971..c73f78c42 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2,43 +2,46 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/malloc.h"
-#include "../common/utils.h"
-#include "../common/ers.h"
-#include "../common/strlib.h"
+#define HERCULES_CORE
+
+#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP
+#include "status.h"
+
+#include <math.h>
+#include <memory.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "battle.h"
+#include "chrif.h"
+#include "clif.h"
+#include "elemental.h"
+#include "guild.h"
+#include "homunculus.h"
+#include "itemdb.h"
#include "map.h"
+#include "mercenary.h"
+#include "mob.h"
+#include "npc.h"
#include "path.h"
#include "pc.h"
#include "pet.h"
-#include "npc.h"
-#include "mob.h"
-#include "clif.h"
-#include "guild.h"
+#include "script.h"
#include "skill.h"
-#include "itemdb.h"
-#include "battle.h"
-#include "chrif.h"
#include "skill.h"
-#include "status.h"
-#include "script.h"
#include "unit.h"
-#include "homunculus.h"
-#include "mercenary.h"
-#include "elemental.h"
#include "vending.h"
-
-#include <time.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <memory.h>
-#include <string.h>
-#include <math.h>
+#include "../common/cbasetypes.h"
+#include "../common/ers.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
struct status_interface status_s;
@@ -177,7 +180,7 @@ void initChangeTables(void) {
add_sc( TF_POISON , SC_POISON );
set_sc( KN_TWOHANDQUICKEN , SC_TWOHANDQUICKEN , SI_TWOHANDQUICKEN , SCB_ASPD );
add_sc( KN_AUTOCOUNTER , SC_AUTOCOUNTER );
- set_sc( PR_IMPOSITIO , SC_IMPOSITIO , SI_IMPOSITIO ,
+ set_sc( PR_IMPOSITIO , SC_IMPOSITIO , SI_IMPOSITIO ,
#ifdef RENEWAL
SCB_NONE );
#else
@@ -201,7 +204,7 @@ void initChangeTables(void) {
set_sc( BS_WEAPONPERFECT , SC_WEAPONPERFECT , SI_WEAPONPERFECT, SCB_NONE );
set_sc( BS_OVERTHRUST , SC_OVERTHRUST , SI_OVERTHRUST , SCB_NONE );
set_sc( BS_MAXIMIZE , SC_MAXIMIZEPOWER , SI_MAXIMIZE , SCB_REGEN );
- add_sc( HT_LANDMINE , SC_STUN );
+ add_sc( HT_LANDMINE , SC_STUN );
set_sc( HT_ANKLESNARE , SC_ANKLESNARE , SI_ANKLESNARE , SCB_NONE );
add_sc( HT_SANDMAN , SC_SLEEP );
add_sc( HT_FLASHER , SC_BLIND );
@@ -466,13 +469,13 @@ void initChangeTables(void) {
set_sc( HAMI_BLOODLUST , SC_HAMI_BLOODLUST , SI_BLANK , SCB_BATK|SCB_WATK );
// Homunculus S
+ set_sc( MH_LIGHT_OF_REGENE , SC_LIGHT_OF_REGENE , SI_LIGHT_OF_REGENE , SCB_NONE );
+ set_sc( MH_OVERED_BOOST , SC_OVERED_BOOST , SI_OVERED_BOOST , SCB_FLEE|SCB_ASPD|SCB_DEF );
+
add_sc(MH_STAHL_HORN, SC_STUN);
set_sc(MH_ANGRIFFS_MODUS, SC_ANGRIFFS_MODUS, SI_ANGRIFFS_MODUS, SCB_BATK | SCB_DEF | SCB_FLEE | SCB_MAXHP);
set_sc(MH_GOLDENE_FERSE, SC_GOLDENE_FERSE, SI_GOLDENE_FERSE, SCB_ASPD|SCB_MAXHP);
add_sc( MH_STEINWAND, SC_SAFETYWALL );
- add_sc(MH_ERASER_CUTTER, SC_ERASER_CUTTER);
- set_sc(MH_OVERED_BOOST, SC_OVERED_BOOST, SI_BLANK, SCB_FLEE|SCB_ASPD);
- add_sc(MH_LIGHT_OF_REGENE, SC_LIGHT_OF_REGENE);
set_sc(MH_VOLCANIC_ASH, SC_VOLCANIC_ASH, SI_VOLCANIC_ASH, SCB_DEF|SCB_DEF2|SCB_HIT|SCB_BATK|SCB_FLEE);
set_sc(MH_GRANITIC_ARMOR, SC_GRANITIC_ARMOR, SI_GRANITIC_ARMOR, SCB_NONE);
set_sc(MH_MAGMA_FLOW, SC_MAGMA_FLOW, SI_MAGMA_FLOW, SCB_NONE);
@@ -482,11 +485,11 @@ void initChangeTables(void) {
add_sc(MH_POISON_MIST, SC_BLIND);
set_sc(MH_PAIN_KILLER, SC_PAIN_KILLER, SI_PAIN_KILLER, SCB_ASPD);
- add_sc(MH_STYLE_CHANGE , SC_STYLE_CHANGE);
- set_sc( MH_TINDER_BREAKER , SC_RG_CCONFINE_S , SI_RG_CCONFINE_S , SCB_NONE );
+ set_sc( MH_SILENT_BREEZE , SC_SILENCE , SI_SILENT_BREEZE , SCB_NONE );
+ add_sc( MH_STYLE_CHANGE , SC_STYLE_CHANGE);
+ set_sc( MH_TINDER_BREAKER , SC_RG_CCONFINE_S , SI_RG_CCONFINE_S , SCB_NONE );
set_sc( MH_TINDER_BREAKER , SC_RG_CCONFINE_M , SI_RG_CCONFINE_M , SCB_FLEE );
-
add_sc( MER_CRASH , SC_STUN );
set_sc( MER_PROVOKE , SC_PROVOKE , SI_PROVOKE , SCB_DEF|SCB_DEF2|SCB_BATK|SCB_WATK );
add_sc( MS_MAGNUM , SC_SUB_WEAPONPROPERTY );
@@ -633,6 +636,7 @@ void initChangeTables(void) {
**/
add_sc( SR_DRAGONCOMBO , SC_STUN );
add_sc( SR_EARTHSHAKER , SC_STUN );
+ set_sc( SR_FALLENEMPIRE , SC_FALLENEMPIRE , SI_FALLENEMPIRE , SCB_NONE );
set_sc( SR_CRESCENTELBOW , SC_CRESCENTELBOW , SI_CRESCENTELBOW , SCB_NONE );
set_sc_with_vfx( SR_CURSEDCIRCLE , SC_CURSEDCIRCLE_TARGET, SI_CURSEDCIRCLE_TARGET , SCB_NONE );
set_sc( SR_LIGHTNINGWALK , SC_LIGHTNINGWALK , SI_LIGHTNINGWALK , SCB_NONE );
@@ -640,6 +644,7 @@ void initChangeTables(void) {
set_sc( SR_GENTLETOUCH_ENERGYGAIN, SC_GENTLETOUCH_ENERGYGAIN , SI_GENTLETOUCH_ENERGYGAIN, SCB_NONE );
set_sc( SR_GENTLETOUCH_CHANGE , SC_GENTLETOUCH_CHANGE , SI_GENTLETOUCH_CHANGE , SCB_ASPD|SCB_MDEF|SCB_MAXHP );
set_sc( SR_GENTLETOUCH_REVITALIZE, SC_GENTLETOUCH_REVITALIZE , SI_GENTLETOUCH_REVITALIZE, SCB_MAXHP|SCB_REGEN );
+ set_sc( SR_FLASHCOMBO , SC_FLASHCOMBO , SI_FLASHCOMBO , SCB_WATK );
/**
* Wanderer / Minstrel
**/
@@ -1118,8 +1123,8 @@ int status_charge(struct block_list* bl, int64 hp, int64 sp) {
}
//Inflicts damage on the target with the according walkdelay.
-//If flag&1, damage is passive and does not triggers cancelling status changes.
-//If flag&2, fail if target does not has enough to substract.
+//If flag&1, damage is passive and does not triggers canceling status changes.
+//If flag&2, fail if target does not has enough to subtract.
//If flag&4, if killed, mob must not give exp/loot.
//flag will be set to &8 when damaging sp of a dead character
int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, int64 in_sp, int walkdelay, int flag) {
@@ -1266,7 +1271,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp,
st->hp = 1; //To let the dead function cast skills and all that.
//NOTE: These dead functions should return: [Skotlex]
- //0: Death cancelled, auto-revived.
+ //0: Death canceled, auto-revived.
//Non-zero: Standard death. Clear status, cancel move/attack, etc
//&2: Also remove object from map.
//&4: Also delete object from memory.
@@ -1281,7 +1286,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp,
break;
}
- if(!flag) //Death cancelled.
+ if(!flag) //Death canceled.
return (int)(hp+sp);
//Normal death
@@ -1319,16 +1324,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp,
return (int)(hp+sp);
}
- if(target->type == BL_PC) {
- TBL_PC *sd = BL_CAST(BL_PC,target);
- TBL_HOM *hd = sd->hd;
- if(hd && hd->sc.data[SC_LIGHT_OF_REGENE]){
- clif->skillcasting(&hd->bl, hd->bl.id, target->id, 0,0, MH_LIGHT_OF_REGENE, skill->get_ele(MH_LIGHT_OF_REGENE, 1), 10); //just to display usage
- clif->skill_nodamage(&sd->bl, target, ALL_RESURRECTION, 1, status->revive(&sd->bl,10*hd->sc.data[SC_LIGHT_OF_REGENE]->val1,0));
- status_change_end(&sd->hd->bl,SC_LIGHT_OF_REGENE,INVALID_TIMER);
- return (int)(hp + sp);
- }
- }
+
if (target->type == BL_MOB && sc && sc->data[SC_REBIRTH] && !((TBL_MOB*) target)->state.rebirth) {
// Ensure the monster has not already rebirthed before doing so.
status->revive(target, sc->data[SC_REBIRTH]->val2, 0);
@@ -1435,7 +1431,7 @@ int status_heal(struct block_list *bl,int64 in_hp,int64 in_sp, int flag) {
//If rates are > 0, percent is of current HP/SP
//If rates are < 0, percent is of max HP/SP
//If !flag, this is heal, otherwise it is damage.
-//Furthermore, if flag==2, then the target must not die from the substraction.
+//Furthermore, if flag==2, then the target must not die from the subtraction.
int status_percent_change(struct block_list *src,struct block_list *target,signed char hp_rate, signed char sp_rate, int flag) {
struct status_data *st;
unsigned int hp = 0, sp = 0;
@@ -1639,16 +1635,16 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
if( sc && sc->count ) {
- if (skill_id != RK_REFRESH && sc->opt1 >0 && !(sc->opt1 == OPT1_CRYSTALIZE && src->type == BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stuned/Frozen/etc
+ if (skill_id != RK_REFRESH && sc->opt1 >0 && !(sc->opt1 == OPT1_CRYSTALIZE && src->type == BL_MOB) && sc->opt1 != OPT1_BURNING && skill_id != SR_GENTLETOUCH_CURE) { //Stunned/Frozen/etc
if (flag != 1) //Can't cast, casted stuff can't damage.
return 0;
if (!(skill->get_inf(skill_id)&INF_GROUND_SKILL))
- return 0; //Targetted spells can't come off.
+ return 0; //Targeted spells can't come off.
}
if (
(sc->data[SC_TRICKDEAD] && skill_id != NV_TRICKDEAD)
- || (sc->data[SC_AUTOCOUNTER] && !flag)
+ || (sc->data[SC_AUTOCOUNTER] && !flag && skill_id)
|| (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF && skill_id != PA_GOSPEL)
|| (sc->data[SC_GRAVITATION] && sc->data[SC_GRAVITATION]->val3 == BCT_SELF && flag != 2)
)
@@ -1788,7 +1784,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
if( ( tsc->data[SC_STEALTHFIELD] || tsc->data[SC_CAMOUFLAGE] ) && !(st->mode&(MD_BOSS|MD_DETECTOR)) && flag == 4 )
return 0;
}
- //If targetting, cloak+hide protect you, otherwise only hiding does.
+ //If targeting, cloak+hide protect you, otherwise only hiding does.
hide_flag = flag?OPTION_HIDE:(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK);
//You cannot hide from ground skills.
@@ -1821,7 +1817,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
}
}
break;
- case BL_ITEM: //Allow targetting of items to pick'em up (or in the case of mobs, to loot them).
+ case BL_ITEM: //Allow targeting of items to pick'em up (or in the case of mobs, to loot them).
//TODO: Would be nice if this could be used to judge whether the player can or not pick up the item it targets. [Skotlex]
if (st->mode&MD_LOOTER)
return 1;
@@ -1897,7 +1893,7 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
#ifdef RENEWAL_ASPD
short mod = -1;
- switch( sd->weapontype2 ){ // adjustment for dual weilding
+ switch( sd->weapontype2 ){ // adjustment for dual wielding
case W_DAGGER: mod = 0; break; // 0, 1, 1
case W_1HSWORD:
case W_1HAXE: mod = 1;
@@ -2074,6 +2070,7 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt) {
struct status_data *mstatus;
struct block_list *mbl = NULL;
int flag=0;
+ int guardup_lv = 0;
if(opt&SCO_FIRST) { //Set basic level on respawn.
if (md->level > 0 && md->level <= MAX_LEVEL && md->level != md->db->lv)
@@ -2089,7 +2086,8 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt) {
if (md->special_state.size)
flag|=2;
- if (md->guardian_data && md->guardian_data->guardup_lv)
+ if( md->guardian_data && md->guardian_data->g
+ && (guardup_lv = guild->checkskill(md->guardian_data->g,GD_GUARDUP)) )
flag|=4;
if (battle_config.slaves_inherit_speed && md->master_id)
@@ -2224,10 +2222,10 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt) {
mstatus->mdef += (gc->defense+2)/3;
}
if(md->class_ != MOBID_EMPERIUM) {
- mstatus->batk += mstatus->batk * 10*md->guardian_data->guardup_lv/100;
- mstatus->rhw.atk += mstatus->rhw.atk * 10*md->guardian_data->guardup_lv/100;
- mstatus->rhw.atk2 += mstatus->rhw.atk2 * 10*md->guardian_data->guardup_lv/100;
- mstatus->aspd_rate -= 100*md->guardian_data->guardup_lv;
+ mstatus->batk += mstatus->batk * 10*guardup_lv/100;
+ mstatus->rhw.atk += mstatus->rhw.atk * 10*guardup_lv/100;
+ mstatus->rhw.atk2 += mstatus->rhw.atk2 * 10*guardup_lv/100;
+ mstatus->aspd_rate -= 100*guardup_lv;
}
}
@@ -2561,7 +2559,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
return 1;
}
- // sanitize the refine level in case someone decreased the value inbetween
+ // sanitize the refine level in case someone decreased the value in between
if (sd->status.inventory[index].refine > MAX_REFINE)
sd->status.inventory[index].refine = MAX_REFINE;
@@ -2589,7 +2587,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
wa->matk += status->refine_info[wlv].bonus[r-1] / 100;
#endif
- //Overrefine bonus.
+ //Overrefined bonus.
if (r)
wd->overrefine = status->refine_info[wlv].randombonus_max[r-1] / 100;
@@ -3417,6 +3415,8 @@ int status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) {
void status_calc_regen(struct block_list *bl, struct status_data *st, struct regen_data *regen) {
struct map_session_data *sd;
int val, skill_lv, reg_flag;
+ nullpo_retv(bl);
+ nullpo_retv(st);
if( !(bl->type&BL_REGEN) || !regen )
return;
@@ -3678,7 +3678,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
st->batk = status->calc_batk(bl, sc, st->batk, true);
}
- if(flag&SCB_WATK) {
+ if(flag&SCB_WATK) {
st->rhw.atk = status->calc_watk(bl, sc, bst->rhw.atk, true);
if (!sd) //Should not affect weapon refine bonus
st->rhw.atk2 = status->calc_watk(bl, sc, bst->rhw.atk2, true);
@@ -3884,7 +3884,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_MATK) {
- status->get_matk(bl, 0);
+ status->update_matk(bl);
}
if(flag&SCB_ASPD) {
@@ -4643,6 +4643,8 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc,
watk += watk * sc->data[SC_TIDAL_WEAPON]->val2 / 100;
if(sc->data[SC_ANGRIFFS_MODUS])
watk += watk * sc->data[SC_ANGRIFFS_MODUS]->val2/100;
+ if( sc->data[SC_FLASHCOMBO] )
+ watk += sc->data[SC_FLASHCOMBO]->val2;
return (unsigned short)cap_value(watk,0,USHRT_MAX);
}
@@ -4842,8 +4844,6 @@ signed short status_calc_flee(struct block_list *bl, struct status_change *sc, i
flee += 10;
if (sc->data[SC_ANGRIFFS_MODUS])
flee -= sc->data[SC_ANGRIFFS_MODUS]->val3;
- if (sc->data[SC_OVERED_BOOST])
- flee = max(flee,sc->data[SC_OVERED_BOOST]->val2);
if(sc->data[SC_GS_ADJUSTMENT])
flee += 30;
if(sc->data[SC_HLIF_SPEED])
@@ -4891,6 +4891,9 @@ signed short status_calc_flee(struct block_list *bl, struct status_change *sc, i
if(status_get_element(bl) == ELE_WATER) //water type
flee /= 2;
}
+
+ if( sc->data[SC_OVERED_BOOST] ) // should be final and unmodifiable by any means
+ flee = sc->data[SC_OVERED_BOOST]->val2;
return (short)cap_value(flee,1,SHRT_MAX);
}
@@ -4923,6 +4926,8 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
/* some statuses that are hidden in the status window */
if( sc && sc->data[SC_CAMOUFLAGE] )
def -= def * 5 * (10-sc->data[SC_CAMOUFLAGE]->val4) / 100;
+ if( sc->data[SC_OVERED_BOOST] && bl->type == BL_PC )
+ def -= def * 50 / 100;
if( sc && sc->data[SC_GENTLETOUCH_REVITALIZE] && sc->data[SC_GENTLETOUCH_REVITALIZE]->val4 )
def += 2 * sc->data[SC_GENTLETOUCH_REVITALIZE]->val4;
if( sc->data[SC_FORCEOFVANGUARD] )
@@ -4942,27 +4947,32 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
if(sc->data[SC_STEELBODY])
return 90;
#endif
+
+ if(sc->data[SC_STONEHARDSKIN])
+ def += sc->data[SC_STONEHARDSKIN]->val1;
+ if(sc->data[SC_DRUMBATTLE])
+ def += sc->data[SC_DRUMBATTLE]->val3;
if(sc->data[SC_STONESKIN])
def += sc->data[SC_STONESKIN]->val2;
- if(sc->data[SC_DRUMBATTLE])
- def += sc->data[SC_DRUMBATTLE]->val3;
if(sc->data[SC_HAMI_DEFENCE]) //[orn]
- def += sc->data[SC_HAMI_DEFENCE]->val2 ;
- if(sc->data[SC_INCDEFRATE])
- def += def * sc->data[SC_INCDEFRATE]->val1/100;
+ def += sc->data[SC_HAMI_DEFENCE]->val2;
+
if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2)
def += 50;
if(sc->data[SC_ODINS_POWER])
def -= 20;
- if( sc->data[SC_ANGRIFFS_MODUS] )
- def -= 30 + 20 * sc->data[SC_ANGRIFFS_MODUS]->val1;
- if(sc->data[SC_STONEHARDSKIN])
- def += sc->data[SC_STONEHARDSKIN]->val1;
+
+#ifndef RENEWAL
if(sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
def >>=1;
if(sc->data[SC_FREEZE])
def >>=1;
+ if(sc->data[SC_INCDEFRATE])
+ def += def * sc->data[SC_INCDEFRATE]->val1/100;
+#endif
+ if( sc->data[SC_ANGRIFFS_MODUS] )
+ def -= 30 + 20 * sc->data[SC_ANGRIFFS_MODUS]->val1;
if(sc->data[SC_CRUCIS])
def -= def * sc->data[SC_CRUCIS]->val2/100;
if(sc->data[SC_LKCONCENTRATION])
@@ -4971,7 +4981,7 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
def >>=1;
if(sc->data[SC_PROVOKE] && bl->type != BL_PC) // Provoke doesn't alter player defense->
def -= def * sc->data[SC_PROVOKE]->val4/100;
- if(sc->data[SC_NOEQUIPSHIELD] && bl->type != BL_PC)
+ if(sc->data[SC_NOEQUIPSHIELD])
def -= def * sc->data[SC_NOEQUIPSHIELD]->val2/100;
if (sc->data[SC_FLING])
def -= def * (sc->data[SC_FLING]->val2)/100;
@@ -4981,20 +4991,17 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
def -= def * (10 + 10 * sc->data[SC_SATURDAY_NIGHT_FEVER]->val1) / 100;
if(sc->data[SC_EARTHDRIVE])
def -= def * 25 / 100;
- if(sc->data[SC_SOLID_SKIN_OPTION])
- def += def * sc->data[SC_SOLID_SKIN_OPTION]->val2 / 100;
if( sc->data[SC_ROCK_CRUSHER] )
def -= def * sc->data[SC_ROCK_CRUSHER]->val2 / 100;
+ if( sc->data[SC_FROSTMISTY] )
+ def -= def * 10 / 100;
+ if( sc->data[SC_OVERED_BOOST] && bl->type == BL_HOM )
+ def -= def * 50 / 100;
+
if( sc->data[SC_POWER_OF_GAIA] )
def += def * sc->data[SC_POWER_OF_GAIA]->val2 / 100;
- if( sc->data[SC_NEUTRALBARRIER] )
- def += def * (5 * sc->data[SC_NEUTRALBARRIER]->val1 + 10) / 100;
- if( sc->data[SC_SHIELDSPELL_REF] && sc->data[SC_SHIELDSPELL_REF]->val1 == 2 )
- def += sc->data[SC_SHIELDSPELL_REF]->val2;
if( sc->data[SC_PRESTIGE] )
- def += sc->data[SC_PRESTIGE]->val1;
- if( sc->data[SC_FROSTMISTY] )
- def -= def * 10 / 100;
+ def += def * sc->data[SC_PRESTIGE]->val1 / 100;
if(sc->data[SC_VOLCANIC_ASH] && (bl->type==BL_MOB)){
if(status_get_race(bl)==RC_PLANT)
def /= 2;
@@ -5017,7 +5024,7 @@ signed short status_calc_def2(struct block_list *bl, struct status_change *sc, i
#ifdef RENEWAL
if( sc && sc->data[SC_ASSUMPTIO] )
def2 <<= 1;
-#endif
+#endif
if( sc && sc->data[SC_CAMOUFLAGE] )
def2 -= def2 * 5 * (10-sc->data[SC_CAMOUFLAGE]->val4) / 100;
#ifdef RENEWAL
@@ -5471,11 +5478,6 @@ short status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int
if (!sc || !sc->count)
return cap_value(aspd, 0, 2000);
- if (!sc->data[SC_QUAGMIRE]) {
- if (sc->data[SC_OVERED_BOOST])
- aspd = 2000 - sc->data[SC_OVERED_BOOST]->val3*10;
- }
-
if ((sc->data[SC_GUST_OPTION] || sc->data[SC_BLAST_OPTION]
|| sc->data[SC_WILD_STORM_OPTION]))
aspd -= 50; // +5 ASPD
@@ -5484,6 +5486,8 @@ short status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int
if( sc && sc->data[SC_MTF_ASPD] )
aspd -= 10;
+ if (sc->data[SC_OVERED_BOOST]) // should be final and unmodifiable by any means
+ aspd = 2000 - sc->data[SC_OVERED_BOOST]->val3 * 10;
return cap_value(aspd, 0, 2000); // will be recap for proper bl anyway
}
@@ -5916,7 +5920,7 @@ struct status_data *status_get_base_status(struct block_list *bl)
case BL_HOM: return &((TBL_HOM*)bl)->base_status;
case BL_MER: return &((TBL_MER*)bl)->base_status;
case BL_ELEM: return &((TBL_ELEM*)bl)->base_status;
- case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL);
+ case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL);
default:
return NULL;
}
@@ -5933,8 +5937,8 @@ defType status_get_def(struct block_list *bl) {
}
unsigned short status_get_speed(struct block_list *bl) {
- if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex]
- return ((struct npc_data *)bl)->speed;
+ if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex]
+ return ((struct npc_data *)bl)->speed;
return status->get_status_data(bl)->speed;
}
@@ -5984,15 +5988,18 @@ int status_get_guild_id(struct block_list *bl) {
if (((TBL_PET*)bl)->msd)
return ((TBL_PET*)bl)->msd->status.guild_id;
break;
- case BL_MOB: {
+ case BL_MOB:
+ {
struct map_session_data *msd;
struct mob_data *md = (struct mob_data *)bl;
- if (md->guardian_data) //Guardian's guild [Skotlex]
- return md->guardian_data->guild_id;
- if (md->special_state.ai && (msd = map->id2sd(md->master_id)) != NULL)
+ if( md->guardian_data ) { //Guardian's guild [Skotlex]
+ // Guardian guild data may not been available yet, castle data is always set
+ return (md->guardian_data->g)?md->guardian_data->g->guild_id:md->guardian_data->castle->guild_id;
+ }
+ if( md->special_state.ai && (msd = map->id2sd(md->master_id)) != NULL )
return msd->status.guild_id; //Alchemist's mobs [Skotlex]
- }
- break;
+ break;
+ }
case BL_HOM:
if (((TBL_HOM*)bl)->master)
return ((TBL_HOM*)bl)->master->status.guild_id;
@@ -6028,7 +6035,7 @@ int status_get_emblem_id(struct block_list *bl) {
struct map_session_data *msd;
struct mob_data *md = (struct mob_data *)bl;
if (md->guardian_data) //Guardian's guild [Skotlex]
- return md->guardian_data->emblem_id;
+ return (md->guardian_data->g) ? md->guardian_data->g->emblem_id:0;
if (md->special_state.ai && (msd = map->id2sd(md->master_id)) != NULL)
return msd->guild_emblem_id; //Alchemist's mobs [Skotlex]
}
@@ -6943,16 +6950,12 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_ASSNCROS:
if(sc->option&OPTION_MADOGEAR)
return 0;//Mado is immune to wind walk, cart boost, etc (others above) [Ind]
- case SC_INC_AGI:
+ case SC_INC_AGI:
if (sc->data[SC_QUAGMIRE])
- return 0;
+ return 0;
break;
case SC_CLOAKING:
- //Avoid cloaking with no wall and low skill level. [Skotlex]
- //Due to the cloaking card, we have to check the wall versus to known
- //skill level rather than the used one. [Skotlex]
- //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL))
- if( sd && pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(bl,NULL) )
+ if (sd && !skill->can_cloak(sd))
return 0;
break;
case SC_MODECHANGE:
@@ -7147,7 +7150,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_ROKISWEIL:
case SC_FOGWALL:
case SC_FROSTMISTY:
- case SC_BURNING:
+ case SC_BURNING:
case SC_MARSHOFABYSS:
case SC_ADORAMUS:
case SC_NEEDLE_OF_PARALYZE:
@@ -7331,6 +7334,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER);
break;
case SC_FIGHTINGSPIRIT:
+ case SC_OVERED_BOOST:
status_change_end(bl, type, INVALID_TIMER); // Remove previous one.
break;
case SC_MARSHOFABYSS:
@@ -8102,22 +8106,25 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
}
break;
- case SC_COMBOATTACK: {
+ case SC_COMBOATTACK:
+ {
//val1: Skill ID
//val2: When given, target (for autotargetting skills)
//val3: When set, this combo time should NOT delay attack/movement
+ //val3: If set to 2 this combo will delay ONLY attack
//val3: TK: Last used kick
//val4: TK: Combo time
struct unit_data *ud = unit->bl2ud(bl);
- if (ud && !val3) {
+ if( ud && (!val3 || val3 == 2) ) {
tick += 300 * battle_config.combo_delay_rate/100;
ud->attackabletime = timer->gettick()+tick;
- unit->set_walkdelay(bl, timer->gettick(), tick, 1);
+ if( !val3 )
+ unit->set_walkdelay(bl, timer->gettick(), tick, 1);
}
val3 = 0;
val4 = tick;
- }
- break;
+ break;
+ }
case SC_EARTHSCROLL:
val2 = 11-val1; //Chance to consume: 11-skill_lv%
break;
@@ -8250,7 +8257,14 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
tick_time = 1000; // [GodLesZ] tick time
break;
case SC_JAILED:
- //Val1 is duration in minutes. Use INT_MAX to specify 'unlimited' time.
+ // val1 is duration in minutes. Use INT_MAX to specify 'unlimited' time.
+ // When first called:
+ // val2 Jail map_index
+ // val3 x
+ // val4 y
+ // When renewing status' information
+ // val3 Return map_index
+ // val4 return coordinates
tick = val1>0?1000:250;
if (sd)
{
@@ -8263,7 +8277,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
//2. Set restore point (val3 -> return map, val4 return coords
val3 = map_index;
val4 = pos;
- } else if (!val3 || val3 == sd->mapindex) { //Use save point.
+ } else if (!val3
+ || val3 == sd->mapindex
+ || !sd->sc.data[SC_JAILED] // If player is being jailed and is already in jail (issue: 8206)
+ ) { //Use save point.
val3 = sd->status.save_point.map;
val4 = (sd->status.save_point.x&0xFFFF)
|(sd->status.save_point.y<<16);
@@ -8827,16 +8844,34 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_STONE_SHIELD_OPTION:
val2 = 100; // Elemental modifier.
break;
+ case SC_TROPIC:
+ case SC_CHILLY_AIR:
+ case SC_WILD_STORM:
+ case SC_UPHEAVAL:
+ val2 += 10;
+ case SC_HEATER:
+ case SC_COOLER:
+ case SC_BLAST:
+ case SC_CURSED_SOIL:
+ val2 += 10;
+ case SC_PYROTECHNIC:
+ case SC_AQUAPLAY:
+ case SC_GUST:
+ case SC_PETROLOGY:
+ val2 += 5;
+ val3 += 9000;
case SC_CIRCLE_OF_FIRE:
+ case SC_WATER_SCREEN:
+ case SC_WIND_STEP:
+ case SC_SOLID_SKIN:
case SC_FIRE_CLOAK:
case SC_WATER_DROP:
- case SC_WATER_SCREEN:
case SC_WIND_CURTAIN:
- case SC_WIND_STEP:
case SC_STONE_SHIELD:
- case SC_SOLID_SKIN:
- val2 = 10;
- tick_time = 2000; // [GodLesZ] tick time
+ val2 += 5;
+ val3 += 1000;
+ val4 = tick;
+ tick_time = val3;
break;
case SC_WATER_BARRIER:
val2 = 40; // Increasement. Mdef1 ???
@@ -8979,9 +9014,15 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
val1 = 1002; // default poring
break;
case SC_ALL_RIDING:
- unit->stop_attack(bl);
tick = -1;
break;
+ case SC_FLASHCOMBO:
+ /**
+ * val1 = <IN>skill_id
+ * val2 = <OUT>attack addition
+ **/
+ val2 = 20+(20*val1);
+ break;
default:
if( calc_flag == SCB_NONE && status->SkillChangeTable[type] == 0 && status->IconChangeTable[type] == 0 )
{ //Status change with no calc, no icon, and no skill associated...?
@@ -9168,6 +9209,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
// Cancel cast when get status [LuzZza]
if (battle_config.sc_castcancel&bl->type)
unit->skillcastcancel(bl, 0);
+ case SC_FALLENEMPIRE:
case SC_WHITEIMPRISON:
unit->stop_attack(bl);
case SC_STOP:
@@ -9201,6 +9243,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_WEIGHTOVER90:
case SC_CAMOUFLAGE:
case SC_SIREN:
+ case SC_ALL_RIDING:
unit->stop_attack(bl);
break;
case SC_SILENCE:
@@ -9404,7 +9447,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
}
//On Aegis, when turning on a status change, first goes the option packet, then the sc packet.
- if(opt_flag) {
+ if(opt_flag) {
clif->changeoption(bl);
if( sd && opt_flag&0x4 ) {
clif->changelook(bl,LOOK_BASE,vd->class_);
@@ -9471,7 +9514,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
{
struct unit_data *ud = unit->bl2ud(bl);
if( ud )
- ud->state.running = unit->run(bl);
+ ud->state.running = unit->run(bl, NULL, SC_RUN);
}
break;
case SC_CASH_BOSS_ALARM:
@@ -9490,7 +9533,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
{
struct unit_data *ud = unit->bl2ud(bl);
if( ud )
- ud->state.running = unit->wugdash(bl, sd);
+ ud->state.running = unit->run(bl, sd, SC_WUGDASH);
}
break;
case SC_COMBOATTACK:
@@ -10114,6 +10157,20 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
}
break;
+ case SC_OVERED_BOOST:
+ switch( bl->type ){
+ case BL_HOM:
+ {
+ struct homun_data *hd = BL_CAST(BL_HOM, bl);
+ if( hd )
+ hd->homunculus.hunger = max(1, hd->homunculus.hunger - 50);
+ }
+ break;
+ case BL_PC:
+ status_zap(bl, 0, status_get_max_sp(bl) / 2);
+ break;
+ }
+ break;
}
opt_flag = 1;
@@ -11108,22 +11165,31 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
}
break;
+ case SC_TROPIC:
+ case SC_CHILLY_AIR:
+ case SC_WILD_STORM:
+ case SC_UPHEAVAL:
+ case SC_HEATER:
+ case SC_COOLER:
+ case SC_BLAST:
+ case SC_CURSED_SOIL:
+ case SC_PYROTECHNIC:
+ case SC_AQUAPLAY:
+ case SC_GUST:
+ case SC_PETROLOGY:
case SC_CIRCLE_OF_FIRE:
+ case SC_WATER_SCREEN:
+ case SC_WIND_STEP:
+ case SC_SOLID_SKIN:
case SC_FIRE_CLOAK:
case SC_WATER_DROP:
- case SC_WATER_SCREEN:
case SC_WIND_CURTAIN:
- case SC_WIND_STEP:
case SC_STONE_SHIELD:
- case SC_SOLID_SKIN:
- if( !status->charge(bl,0,sce->val2) ){
- struct block_list *s_bl = battle->get_master(bl);
- if( s_bl )
- status_change_end(s_bl,type+1,INVALID_TIMER);
- status_change_end(bl,type,INVALID_TIMER);
- break;
- }
- sc_timer_next(2000 + tick, status->change_timer, bl->id, data);
+ if(status->charge(bl, 0, sce->val2) && (sce->val4==-1 || (sce->val4-=sce->val3)>=0))
+ sc_timer_next(sce->val3 + tick, status->change_timer, bl->id, data);
+ else
+ if (bl->type == BL_ELEM)
+ elemental->change_mode(BL_CAST(BL_ELEM,bl),MAX_ELESKILLTREE);
return 0;
case SC_STOMACHACHE:
@@ -11307,88 +11373,149 @@ int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int fl
#endif
}
-#define GETRANDMATK(st) do {\
- if( (st)->matk_max > (st)->matk_min ) \
- return (st)->matk_min + rnd()%((st)->matk_max - (st)->matk_min); \
- else \
- return (st)->matk_min; \
- } while(0)
+/**
+ * Gets a random matk value depending on min matk and max matk
+ **/
+unsigned short status_get_rand_matk( unsigned short matk_max, unsigned short matk_min ) {
+ if( matk_max > matk_min )
+ return matk_min + rnd()%(matk_max - matk_min);
+ else
+ return matk_min;
+}
-/*==========================================
-* flag [malufett]
-* 0 - update matk values
-* 1 - get matk w/o SC bonuses
-* 2 - get modified matk
-* 3 - get matk w/o eatk & SC bonuses
-*------------------------------------------*/
-int status_get_matk(struct block_list *bl, int flag) {
+/**
+ * Get bl's matk_max and matk_min values depending on flag
+ * @param flag
+ * 0 - Get MATK
+ * 1 - Get MATK w/o SC bonuses
+ * 3 - Get MATK w/o EATK & SC bonuses
+ **/
+void status_get_matk_sub( struct block_list *bl, int flag, unsigned short *matk_max, unsigned short *matk_min ) {
struct status_data *st;
struct status_change *sc;
struct map_session_data *sd;
if( bl == NULL )
- return 1;
+ return;
+
+ if( flag != 0 && flag != 1 && flag != 3 ) {
+ ShowError("status_get_matk_sub: Unknown flag %d!\n", flag);
+ return;
+ }
st = status->get_status_data(bl);
sc = status->get_sc(bl);
sd = BL_CAST(BL_PC, bl);
- if( flag == 2 ) // just get matk
- GETRANDMATK(st);
-
#ifdef RENEWAL
/**
* RE MATK Formula (from irowiki:http://irowiki.org/wiki/MATK)
* MATK = (sMATK + wMATK + eMATK) * Multiplicative Modifiers
**/
- st->matk_min = status->base_matk(st, status->get_lv(bl));
+ *matk_min = status->base_matk(st, status->get_lv(bl));
// Any +MATK you get from skills and cards, including cards in weapon, is added here.
if( sd && sd->bonus.ematk > 0 && flag != 3 )
- st->matk_min += sd->bonus.ematk;
+ *matk_min += sd->bonus.ematk;
if( flag != 3 )
- st->matk_min = status->calc_ematk(bl, sc, st->matk_min);
+ *matk_min = status->calc_ematk(bl, sc, *matk_min);
- st->matk_max = st->matk_min;
+ *matk_max = *matk_min;
//This is the only portion in MATK that varies depending on the weapon level and refinement rate.
if( bl->type&BL_PC && (st->rhw.matk + st->lhw.matk) > 0 ) {
int wMatk = st->rhw.matk + st->lhw.matk; // Left and right matk stacks
int variance = wMatk * st->rhw.wlv / 10; // Only use right hand weapon level
- st->matk_min += wMatk - variance;
- st->matk_max += wMatk + variance;
+ *matk_min += wMatk - variance;
+ *matk_max += wMatk + variance;
} else if( bl->type&BL_MOB ) {
- st->matk_min = st->matk_max = status_get_int(bl) + status->get_lv(bl);
- st->matk_min += 70 * ((TBL_MOB*)bl)->status.rhw.atk2 / 100;
- st->matk_max += 130 * ((TBL_MOB*)bl)->status.rhw.atk2 / 100;
+ *matk_min = *matk_max = status_get_int(bl) + status->get_lv(bl);
+ *matk_min += 70 * ((TBL_MOB*)bl)->status.rhw.atk2 / 100;
+ *matk_max += 130 * ((TBL_MOB*)bl)->status.rhw.atk2 / 100;
}
#else // not RENEWAL
- st->matk_min = status_base_matk_min(st) + (sd?sd->bonus.ematk:0);
- st->matk_max = status_base_matk_max(st) + (sd?sd->bonus.ematk:0);
+ *matk_min = status_base_matk_min(st) + (sd?sd->bonus.ematk:0);
+ *matk_max = status_base_matk_max(st) + (sd?sd->bonus.ematk:0);
#endif
+
if (sd && sd->matk_rate != 100) {
- st->matk_max = st->matk_max * sd->matk_rate/100;
- st->matk_min = st->matk_min * sd->matk_rate/100;
+ *matk_max = (*matk_max) * sd->matk_rate/100;
+ *matk_min = (*matk_min) * sd->matk_rate/100;
}
if ((bl->type&BL_HOM && battle_config.hom_setting&0x20) //Hom Min Matk is always the same as Max Matk
|| (sc && sc->data[SC_RECOGNIZEDSPELL]))
- st->matk_min = st->matk_max;
+ *matk_min = *matk_max;
#ifdef RENEWAL
- if( sd && sd->right_weapon.overrefine > 0){
- st->matk_min++;
- st->matk_max += sd->right_weapon.overrefine - 1;
+ if( sd && sd->right_weapon.overrefine > 0 ) {
+ (*matk_min)++;
+ *matk_max += sd->right_weapon.overrefine - 1;
}
#endif
+ return;
+}
- if( flag ) // get unmodified from sc matk
- GETRANDMATK(st);
+/**
+ * Get bl's matk value depending on flag
+ * @param flag [malufett]
+ * 1 - Get MATK w/o SC bonuses
+ * 2 - Get modified MATK
+ * 3 - Get MATK w/o eATK & SC bonuses
+ * @retval 1 failure
+ * @retval MATK success
+ *
+ * Shouldn't change _any_ value! [Panikon]
+ **/
+int status_get_matk( struct block_list *bl, int flag ) {
+ struct status_data *st;
+ unsigned short matk_max, matk_min;
- st->matk_min = status->calc_matk(bl, sc, st->matk_min, true);
- st->matk_max = status->calc_matk(bl, sc, st->matk_max, true);
+ if( bl == NULL )
+ return 1;
- return 0;
+ if( flag < 1 || flag > 3 ) {
+ ShowError("status_get_matk: Unknown flag %d!\n", flag);
+ return 1;
+ }
+
+ if( (st = status->get_status_data(bl)) == NULL )
+ return 0;
+
+ // Just get matk
+ if( flag == 2 )
+ return status_get_rand_matk(st->matk_max, st->matk_min);
+
+ status_get_matk_sub( bl, flag, &matk_max, &matk_min );
+
+ // Get unmodified from sc matk
+ return status_get_rand_matk(matk_max, matk_min);
+}
+
+/**
+ * Updates bl's MATK values
+ **/
+void status_update_matk( struct block_list *bl ) {
+ struct status_data *st;
+ struct status_change *sc;
+ unsigned short matk_max, matk_min;
+
+ if( bl == NULL )
+ return;
+
+ if( (st = status->get_status_data(bl)) == NULL )
+ return;
+
+ if( (sc = status->get_sc(bl)) == NULL )
+ return;
+
+ status_get_matk_sub( bl, 0, &matk_max, &matk_min );
+
+ // Update matk
+ st->matk_min = status->calc_matk(bl, sc, matk_min, true);
+ st->matk_max = status->calc_matk(bl, sc, matk_max, true);
+
+ return;
}
/*==========================================
@@ -11947,7 +12074,7 @@ void do_final_status(void) {
}
/*=====================================
-* Default Functions : status.h
+* Default Functions : status.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -12062,6 +12189,7 @@ void status_defaults(void) {
status->get_total_def = status_get_total_def;
status->get_matk = status_get_matk;
+ status->update_matk = status_update_matk;
status->readdb = status_readdb;
status->init = do_init_status;
diff --git a/src/map/status.h b/src/map/status.h
index e47c2b365..599f36c73 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -2,22 +2,26 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_STATUS_H_
-#define _MAP_STATUS_H_
+#ifndef MAP_STATUS_H
+#define MAP_STATUS_H
-#include "../common/mmo.h"
+#include "../config/core.h" // defType, RENEWAL, RENEWAL_ASPD
+
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h" // NEW_CARTS
struct block_list;
-struct mob_data;
-struct pet_data;
+struct elemental_data;
struct homun_data;
struct mercenary_data;
-struct status_change;
+struct mob_data;
+struct npc_data;
+struct pet_data;
//Change the equation when the values are high enough to discard the
//imprecision in exchange of overflow protection [Skotlex]
//Also add 100% checks since those are the most used cases where we don't
-//want aproximation errors.
+//want approximation errors.
#define APPLY_RATE(value, rate) ( \
(rate) == 100 ? \
(value) \
@@ -48,6 +52,10 @@ enum refine_type {
REFINE_TYPE_MAX = 5
};
+/**
+ * SC configuration type
+ * @see db/sc_config.txt for more information
+ **/
typedef enum sc_conf_type {
SC_NO_REM_DEATH = 0x01,
SC_NO_SAVE = 0x02,
@@ -704,769 +712,832 @@ typedef enum sc_type {
SC__CHAOS,
SC__FEINTBOMB_MASTER,
-
+ SC_FALLENEMPIRE,
+ SC_FLASHCOMBO,
+
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;
-// Official status change ids, used to display status icons on the client.
+
+/// Official status change ids, used to display status icons in the client.
enum si_type {
- SI_BLANK = -1,
- SI_PROVOKE = 0,
- SI_ENDURE = 1,
- SI_TWOHANDQUICKEN = 2,
- SI_CONCENTRATION = 3,
- SI_HIDING = 4,
- SI_CLOAKING = 5,
- SI_ENCHANTPOISON = 6,
- SI_POISONREACT = 7,
- SI_QUAGMIRE = 8,
- SI_ANGELUS = 9,
- SI_BLESSING = 10,
- SI_CRUCIS = 11,
- SI_INC_AGI = 12,
- SI_DEC_AGI = 13,
- SI_SLOWPOISON = 14,
- SI_IMPOSITIO = 15,
- SI_SUFFRAGIUM = 16,
- SI_ASPERSIO = 17,
- SI_BENEDICTIO = 18,
- SI_KYRIE = 19,
- SI_MAGNIFICAT = 20,
- SI_GLORIA = 21,
- SI_LEXAETERNA = 22,
- SI_ADRENALINE = 23,
- SI_WEAPONPERFECT = 24,
- SI_OVERTHRUST = 25,
- SI_MAXIMIZE = 26,
- SI_RIDING = 27,
- SI_FALCON = 28,
- SI_TRICKDEAD = 29,
- SI_SHOUT = 30,
- SI_ENERGYCOAT = 31,
- SI_BROKENARMOR = 32,
- SI_BROKENWEAPON = 33,
- SI_ILLUSION = 34,
- SI_WEIGHTOVER50 = 35,
- SI_WEIGHTOVER90 = 36,
- SI_ATTHASTE_POTION1 = 37,
- SI_ATTHASTE_POTION2 = 38,
- SI_ATTHASTE_POTION3 = 39,
- SI_ATTHASTE_INFINITY = 40,
- SI_MOVHASTE_POTION = 41,
- SI_MOVHASTE_INFINITY = 42,
-// SI_AUTOCOUNTER = 43,
-// SI_SPLASHER = 44,
- SI_ANKLESNARE = 45,
- SI_POSTDELAY = 46,
-// SI_NOACTION = 47,
-// SI_IMPOSSIBLEPICKUP = 48,
-// SI_BARRIER = 49,
- SI_NOEQUIPWEAPON = 50,
- SI_NOEQUIPSHIELD = 51,
- SI_NOEQUIPARMOR = 52,
- SI_NOEQUIPHELM = 53,
- SI_PROTECTWEAPON = 54,
- SI_PROTECTSHIELD = 55,
- SI_PROTECTARMOR = 56,
- SI_PROTECTHELM = 57,
- SI_AUTOGUARD = 58,
- SI_REFLECTSHIELD = 59,
-// SI_DEVOTION = 60,
- SI_PROVIDENCE = 61,
- SI_DEFENDER = 62,
-// SI_MAGICROD = 63,
-// SI_WEAPONPROPERTY = 64,
- SI_AUTOSPELL = 65,
-// SI_SPECIALZONE = 66,
-// SI_MASK = 67,
- SI_SPEARQUICKEN = 68,
-// SI_BDPLAYING = 69,
-// SI_WHISTLE = 70,
-// SI_ASSASSINCROSS = 71,
-// SI_POEMBRAGI = 72,
-// SI_APPLEIDUN = 73,
-// SI_HUMMING = 74,
-// SI_DONTFORGETME = 75,
-// SI_FORTUNEKISS = 76,
-// SI_SERVICEFORYOU = 77,
-// SI_RICHMANKIM = 78,
-// SI_ETERNALCHAOS = 79,
-// SI_DRUMBATTLEFIELD = 80,
-// SI_RINGNIBELUNGEN = 81,
-// SI_ROKISWEIL = 82,
-// SI_INTOABYSS = 83,
-// SI_SIEGFRIED = 84,
-// SI_BLADESTOP = 85,
- SI_EXPLOSIONSPIRITS = 86,
- SI_STEELBODY = 87,
- SI_EXTREMITYFIST = 88,
-// SI_COMBOATTACK = 89,
- SI_PROPERTYFIRE = 90,
- SI_PROPERTYWATER = 91,
- SI_PROPERTYWIND = 92,
- SI_PROPERTYGROUND = 93,
-// SI_MAGICATTACK = 94,
- SI_STOP = 95,
-// SI_WEAPONBRAKER = 96,
- SI_PROPERTYUNDEAD = 97,
-// SI_POWERUP = 98,
-// SI_AGIUP = 99,
-// SI_SIEGEMODE = 100,
-// SI_INVISIBLE = 101,
-// SI_STATUSONE = 102,
- SI_AURABLADE = 103,
- SI_PARRYING = 104,
- SI_LKCONCENTRATION = 105,
- SI_TENSIONRELAX = 106,
- SI_BERSERK = 107,
-// SI_SACRIFICE = 108,
-// SI_GOSPEL = 109,
- SI_ASSUMPTIO = 110,
-// SI_BASILICA = 111,
- SI_GROUNDMAGIC = 112,
- SI_MAGICPOWER = 113,
- SI_EDP = 114,
- SI_TRUESIGHT = 115,
- SI_WINDWALK = 116,
- SI_MELTDOWN = 117,
- SI_CARTBOOST = 118,
-// SI_CHASEWALK = 119,
- SI_SWORDREJECT = 120,
- SI_MARIONETTE_MASTER = 121,
- SI_MARIONETTE = 122,
- SI_MOON = 123,
- SI_BLOODING = 124,
- SI_JOINTBEAT = 125,
-// SI_MINDBREAKER = 126,
-// SI_MEMORIZE = 127,
-// SI_FOGWALL = 128,
-// SI_SPIDERWEB = 129,
- SI_PROTECTEXP = 130,
-// SI_SUB_WEAPONPROPERTY = 131,
- SI_AUTOBERSERK = 132,
- SI_RUN = 133,
- SI_TING = 134,
- SI_STORMKICK_ON = 135,
- SI_STORMKICK_READY = 136,
- SI_DOWNKICK_ON = 137,
- SI_DOWNKICK_READY = 138,
- SI_TURNKICK_ON = 139,
- SI_TURNKICK_READY = 140,
- SI_COUNTER_ON = 141,
- SI_COUNTER_READY = 142,
- SI_DODGE_ON = 143,
- SI_DODGE_READY = 144,
- SI_STRUP = 145,
- SI_PROPERTYDARK = 146,
- SI_ADRENALINE2 = 147,
- SI_PROPERTYTELEKINESIS = 148,
- SI_SOULLINK = 149,
- SI_PLUSATTACKPOWER = 150,
- SI_PLUSMAGICPOWER = 151,
- SI_DEVIL1 = 152,
- SI_KAITE = 153,
-// SI_SWOO = 154,
-// SI_STAR2 = 155,
- SI_KAIZEL = 156,
- SI_KAAHI = 157,
- SI_KAUPE = 158,
- SI_SMA_READY = 159,
- SI_SKE = 160,
- SI_ONEHANDQUICKEN = 161,
-// SI_FRIEND = 162,
-// SI_FRIENDUP = 163,
-// SI_SG_WARM = 164,
- SI_SG_SUN_WARM = 165,
-// 166 | The three show the exact same display: ultra red character (165, 166, 167)
-// 167 | Their names would be SI_SG_SUN_WARM, SI_SG_MOON_WARM, SI_SG_STAR_WARM
-// SI_EMOTION = 168,
- SI_SUN_COMFORT = 169,
- SI_MOON_COMFORT = 170,
- SI_STAR_COMFORT = 171,
-// SI_EXPUP = 172,
-// SI_GDSKILL_BATTLEORDER = 173,
-// SI_GDSKILL_REGENERATION = 174,
-// SI_GDSKILL_POSTDELAY = 175,
-// SI_RESISTHANDICAP = 176,
-// SI_MAXHPPERCENT = 177,
-// SI_MAXSPPERCENT = 178,
-// SI_DEFENCE = 179,
-// SI_SLOWDOWN = 180,
- SI_PRESERVE = 181,
- SI_INCSTR = 182,
-// SI_NOT_EXTREMITYFIST = 183,
- SI_CLAIRVOYANCE = 184,
-// SI_MOVESLOW_POTION = 185,
- SI_DOUBLECASTING = 186,
-// SI_GRAVITATION = 187,
- SI_OVERTHRUSTMAX = 188,
-// SI_LONGING = 189,
-// SI_HERMODE = 190,
- SI_TAROTCARD = 191, // the icon allows no doubt... but what is it really used for ?? [DracoRPG]
-// SI_HLIF_AVOID = 192,
-// SI_HFLI_FLEET = 193,
-// SI_HFLI_SPEED = 194,
-// SI_HLIF_CHANGE = 195,
-// SI_HAMI_BLOODLUST = 196,
- SI_CR_SHRINK = 197,
- SI_WZ_SIGHTBLASTER = 198,
- SI_DC_WINKCHARM = 199,
- SI_RG_CCONFINE_M = 200,
- SI_RG_CCONFINE_S = 201,
-// SI_DISABLEMOVE = 202,
- SI_GS_MADNESSCANCEL = 203, //[blackhole89]
- SI_GS_GATLINGFEVER = 204,
- SI_EARTHSCROLL = 205,
- SI_NJ_UTSUSEMI = 206,
- SI_NJ_BUNSINJYUTSU = 207,
- SI_NJ_NEN = 208,
- SI_GS_ADJUSTMENT = 209,
- SI_GS_ACCURACY = 210,
- SI_NJ_SUITON = 211,
-// SI_PET = 212,
-// SI_MENTAL = 213,
-// SI_EXPMEMORY = 214,
-// SI_PERFORMANCE = 215,
-// SI_GAIN = 216,
-// SI_GRIFFON = 217,
-// SI_DRIFT = 218,
-// SI_WALLSHIFT = 219,
-// SI_REINCARNATION = 220,
-// SI_PATTACK = 221,
-// SI_PSPEED = 222,
-// SI_PDEFENSE = 223,
-// SI_PCRITICAL = 224,
-// SI_RANKING = 225,
-// SI_PTRIPLE = 226,
-// SI_DENERGY = 227,
-// SI_WAVE1 = 228,
-// SI_WAVE2 = 229,
-// SI_WAVE3 = 230,
-// SI_WAVE4 = 231,
-// SI_DAURA = 232,
-// SI_DFREEZER = 233,
-// SI_DPUNISH = 234,
-// SI_DBARRIER = 235,
-// SI_DWARNING = 236,
-// SI_MOUSEWHEEL = 237,
-// SI_DGAUGE = 238,
-// SI_DACCEL = 239,
-// SI_DBLOCK = 240,
- SI_FOOD_STR = 241,
- SI_FOOD_AGI = 242,
- SI_FOOD_VIT = 243,
- SI_FOOD_DEX = 244,
- SI_FOOD_INT = 245,
- SI_FOOD_LUK = 246,
- SI_FOOD_BASICAVOIDANCE = 247,
- SI_FOOD_BASICHIT = 248,
- SI_FOOD_CRITICALSUCCESSVALUE = 249,
- SI_CASH_PLUSEXP = 250,
- SI_CASH_DEATHPENALTY = 251,
- SI_CASH_RECEIVEITEM = 252,
- SI_CASH_BOSS_ALARM = 253,
-// SI_DA_ENERGY = 254,
-// SI_DA_FIRSTSLOT = 255,
-// SI_DA_HEADDEF = 256,
-// SI_DA_SPACE = 257,
-// SI_DA_TRANSFORM = 258,
-// SI_DA_ITEMREBUILD = 259,
-// SI_DA_ILLUSION = 260, //All mobs display as Turtle General
-// SI_DA_DARKPOWER = 261,
-// SI_DA_EARPLUG = 262,
-// SI_DA_CONTRACT = 263, //Bio Mob effect on you and SI_TRICKDEAD icon
-// SI_DA_BLACK = 264, //For short time blurry screen
-// SI_DA_MAGICCART = 265,
-// SI_CRYSTAL = 266,
-// SI_DA_REBUILD = 267,
-// SI_DA_EDARKNESS = 268,
-// SI_DA_EGUARDIAN = 269,
-// SI_DA_TIMEOUT = 270,
- SI_FOOD_STR_CASH = 271,
- SI_FOOD_AGI_CASH = 272,
- SI_FOOD_VIT_CASH = 273,
- SI_FOOD_DEX_CASH = 274,
- SI_FOOD_INT_CASH = 275,
- SI_FOOD_LUK_CASH = 276,
- SI_MER_FLEE = 277,
- SI_MER_ATK = 278,
- SI_MER_HP = 279,
- SI_MER_SP = 280,
- SI_MER_HIT = 281,
- SI_SLOWCAST = 282,
-// SI_MAGICMIRROR = 283,
-// SI_STONESKIN = 284,
-// SI_ANTIMAGIC = 285,
- SI_CRITICALWOUND = 286,
-// SI_NPC_DEFENDER = 287,
-// SI_NOACTION_WAIT = 288,
- SI_MOVHASTE_HORSE = 289,
- SI_PROTECT_DEF = 290,
- SI_PROTECT_MDEF = 291,
- SI_HEALPLUS = 292,
- SI_S_LIFEPOTION = 293,
- SI_L_LIFEPOTION = 294,
- SI_CRITICALPERCENT = 295,
- SI_PLUSAVOIDVALUE = 296,
-// SI_ATKER_ASPD = 297,
-// SI_TARGET_ASPD = 298,
-// SI_ATKER_MOVESPEED = 299,
- SI_ATKER_BLOOD = 300,
- SI_TARGET_BLOOD = 301,
- SI_ARMOR_PROPERTY = 302,
-// SI_REUSE_LIMIT_A = 303,
- SI_HELLPOWER = 304,
-// SI_STEAMPACK = 305,
-// SI_REUSE_LIMIT_B = 306,
-// SI_REUSE_LIMIT_C = 307,
-// SI_REUSE_LIMIT_D = 308,
-// SI_REUSE_LIMIT_E = 309,
-// SI_REUSE_LIMIT_F = 310,
- SI_INVINCIBLE = 311,
- SI_CASH_PLUSONLYJOBEXP = 312,
- SI_PARTYFLEE = 313,
- SI_ANGEL_PROTECT = 314,
-// SI_ENDURE_MDEF = 315,
- SI_ENCHANTBLADE = 316,
- SI_DEATHBOUND = 317,
- SI_REFRESH = 318,
- SI_GIANTGROWTH = 319,
- SI_STONEHARDSKIN = 320,
- SI_VITALITYACTIVATION = 321,
- SI_FIGHTINGSPIRIT = 322,
- SI_ABUNDANCE = 323,
- SI_REUSE_MILLENNIUMSHIELD = 324,
- SI_REUSE_CRUSHSTRIKE = 325,
- SI_REUSE_REFRESH = 326,
- SI_REUSE_STORMBLAST = 327,
- SI_VENOMIMPRESS = 328,
- SI_EPICLESIS = 329,
- SI_ORATIO = 330,
- SI_LAUDAAGNUS = 331,
- SI_LAUDARAMUS = 332,
- SI_CLOAKINGEXCEED = 333,
- SI_HALLUCINATIONWALK = 334,
- SI_HALLUCINATIONWALK_POSTDELAY = 335,
- SI_RENOVATIO = 336,
- SI_WEAPONBLOCKING = 337,
- SI_WEAPONBLOCKING_POSTDELAY = 338,
- SI_ROLLINGCUTTER = 339,
- SI_EXPIATIO = 340,
- SI_POISONINGWEAPON = 341,
- SI_TOXIN = 342,
- SI_PARALYSE = 343,
- SI_VENOMBLEED = 344,
- SI_MAGICMUSHROOM = 345,
- SI_DEATHHURT = 346,
- SI_PYREXIA = 347,
- SI_OBLIVIONCURSE = 348,
- SI_LEECHESEND = 349,
- SI_DUPLELIGHT = 350,
- SI_FROSTMISTY = 351,
- SI_FEARBREEZE = 352,
- SI_ELECTRICSHOCKER = 353,
- SI_MARSHOFABYSS = 354,
- SI_RECOGNIZEDSPELL = 355,
- SI_STASIS = 356,
- SI_WUGRIDER = 357,
- SI_WUGDASH = 358,
- SI_WUGBITE = 359,
- SI_CAMOUFLAGE = 360,
- SI_ACCELERATION = 361,
- SI_HOVERING = 362,
- SI_SPHERE_1 = 363,
- SI_SPHERE_2 = 364,
- SI_SPHERE_3 = 365,
- SI_SPHERE_4 = 366,
- SI_SPHERE_5 = 367,
- SI_MVPCARD_TAOGUNKA = 368,
- SI_MVPCARD_MISTRESS = 369,
- SI_MVPCARD_ORCHERO = 370,
- SI_MVPCARD_ORCLORD = 371,
- SI_OVERHEAT_LIMITPOINT = 372,
- SI_OVERHEAT = 373,
- SI_SHAPESHIFT = 374,
- SI_INFRAREDSCAN = 375,
- SI_MAGNETICFIELD = 376,
- SI_NEUTRALBARRIER = 377,
- SI_NEUTRALBARRIER_MASTER = 378,
- SI_STEALTHFIELD = 379,
- SI_STEALTHFIELD_MASTER = 380,
- SI_MANU_ATK = 381,
- SI_MANU_DEF = 382,
- SI_SPL_ATK = 383,
- SI_SPL_DEF = 384,
- SI_REPRODUCE = 385,
- SI_MANU_MATK = 386,
- SI_SPL_MATK = 387,
- SI_STR_SCROLL = 388,
- SI_INT_SCROLL = 389,
- SI_LG_REFLECTDAMAGE = 390,
- SI_FORCEOFVANGUARD = 391,
- SI_BUCHEDENOEL = 392,
- SI_AUTOSHADOWSPELL = 393,
- SI_SHADOWFORM = 394,
- SI_RAID = 395,
- SI_SHIELDSPELL_DEF = 396,
- SI_SHIELDSPELL_MDEF = 397,
- SI_SHIELDSPELL_REF = 398,
- SI_BODYPAINT = 399,
- SI_EXEEDBREAK = 400,
- SI_ADORAMUS = 401,
- SI_PRESTIGE = 402,
- SI_INVISIBILITY = 403,
- SI_DEADLYINFECT = 404,
- SI_BANDING = 405,
- SI_EARTHDRIVE = 406,
- SI_INSPIRATION = 407,
- SI_ENERVATION = 408,
- SI_GROOMY = 409,
- SI_RAISINGDRAGON = 410,
- SI_IGNORANCE = 411,
- SI_LAZINESS = 412,
- SI_LIGHTNINGWALK = 413,
- SI_ACARAJE = 414,
- SI_UNLUCKY = 415,
- SI_CURSEDCIRCLE_ATKER = 416,
- SI_CURSEDCIRCLE_TARGET = 417,
- SI_WEAKNESS = 418,
- SI_CRESCENTELBOW = 419,
- SI_NOEQUIPACCESSARY = 420,
- SI_STRIPACCESSARY = 421,
- SI_MANHOLE = 422,
- SI_POPECOOKIE = 423,
- SI_FALLENEMPIRE = 424,
- SI_GENTLETOUCH_ENERGYGAIN = 425,
- SI_GENTLETOUCH_CHANGE = 426,
- SI_GENTLETOUCH_REVITALIZE = 427,
- SI_BLOODYLUST = 428,
- SI_SWINGDANCE = 429,
- SI_SYMPHONYOFLOVERS = 430,
- SI_PROPERTYWALK = 431,
- SI_SPELLFIST = 432,
- SI_NETHERWORLD = 433,
- SI_SIREN = 434,
- SI_DEEPSLEEP = 435,
- SI_SIRCLEOFNATURE = 436,
- SI_COLD = 437,
- SI_GLOOMYDAY = 438,
- SI_SONG_OF_MANA = 439,
- SI_CLOUDKILL = 440,
- SI_DANCEWITHWUG = 441,
- SI_RUSHWINDMILL = 442,
- SI_ECHOSONG = 443,
- SI_HARMONIZE = 444,
- SI_STRIKING = 445,
- SI_WARMER = 446,
- SI_MOONLITSERENADE = 447,
- SI_SATURDAYNIGHTFEVER = 448,
- SI_SITDOWN_FORCE = 449,
- SI_ANALYZE = 450,
- SI_LERADSDEW = 451,
- SI_MELODYOFSINK = 452,
- SI_WARCRYOFBEYOND = 453,
- SI_UNLIMITEDHUMMINGVOICE = 454,
- SI_SPELLBOOK1 = 455,
- SI_SPELLBOOK2 = 456,
- SI_SPELLBOOK3 = 457,
- SI_FREEZE_SP = 458,
- SI_GN_TRAINING_SWORD = 459,
- SI_GN_REMODELING_CART = 460,
- SI_CARTSBOOST = 461,
- SI_FIXEDCASTINGTM_REDUCE = 462,
- SI_THORNTRAP = 463,
- SI_BLOODSUCKER = 464,
- SI_SPORE_EXPLOSION = 465,
- SI_DEMONIC_FIRE = 466,
- SI_FIRE_EXPANSION_SMOKE_POWDER = 467,
- SI_FIRE_EXPANSION_TEAR_GAS = 468,
- SI_BLOCKING_PLAY = 469,
- SI_MANDRAGORA = 470,
- SI_ACTIVATE = 471,
- SI_SECRAMENT = 472,
- SI_ASSUMPTIO2 = 473,
- SI_TK_SEVENWIND = 474,
- SI_LIMIT_ODINS_RECALL = 475,
- SI_STOMACHACHE = 476,
- SI_MYSTERIOUS_POWDER = 477,
- SI_MELON_BOMB = 478,
- SI_BANANA_BOMB_SITDOWN_POSTDELAY = 479,
- SI_PROMOTE_HEALTH_RESERCH = 480,
- SI_ENERGY_DRINK_RESERCH = 481,
- SI_EXTRACT_WHITE_POTION_Z = 482,
- SI_VITATA_500 = 483,
- SI_EXTRACT_SALAMINE_JUICE = 484,
- SI_BOOST500 = 485,
- SI_FULL_SWING_K = 486,
- SI_MANA_PLUS = 487,
- SI_MUSTLE_M = 488,
- SI_LIFE_FORCE_F = 489,
- SI_VACUUM_EXTREME = 490,
- SI_SAVAGE_STEAK = 491,
- SI_COCKTAIL_WARG_BLOOD = 492,
- SI_MINOR_BBQ = 493,
- SI_SIROMA_ICE_TEA = 494,
- SI_DROCERA_HERB_STEAMED = 495,
- SI_PUTTI_TAILS_NOODLES = 496,
- SI_BANANA_BOMB = 497,
- SI_SUMMON_AGNI = 498,
- SI_SPELLBOOK4 = 499,
- SI_SPELLBOOK5 = 500,
- SI_SPELLBOOK6 = 501,
- SI_SPELLBOOK7 = 502,
- SI_ELEMENTAL_AGGRESSIVE = 503,
- SI_RETURN_TO_ELDICASTES = 504,
- SI_BANDING_DEFENCE = 505,
- SI_SKELSCROLL = 506,
- SI_DISTRUCTIONSCROLL = 507,
- SI_ROYALSCROLL = 508,
- SI_IMMUNITYSCROLL = 509,
- SI_MYSTICSCROLL = 510,
- SI_BATTLESCROLL = 511,
- SI_ARMORSCROLL = 512,
- SI_FREYJASCROLL = 513,
- SI_SOULSCROLL = 514,
- SI_CIRCLE_OF_FIRE = 515,
- SI_CIRCLE_OF_FIRE_OPTION = 516,
- SI_FIRE_CLOAK = 517,
- SI_FIRE_CLOAK_OPTION = 518,
- SI_WATER_SCREEN = 519,
- SI_WATER_SCREEN_OPTION = 520,
- SI_WATER_DROP = 521,
- SI_WATER_DROP_OPTION = 522,
- SI_WIND_STEP = 523,
- SI_WIND_STEP_OPTION = 524,
- SI_WIND_CURTAIN = 525,
- SI_WIND_CURTAIN_OPTION = 526,
- SI_WATER_BARRIER = 527,
- SI_ZEPHYR = 528,
- SI_SOLID_SKIN = 529,
- SI_SOLID_SKIN_OPTION = 530,
- SI_STONE_SHIELD = 531,
- SI_STONE_SHIELD_OPTION = 532,
- SI_POWER_OF_GAIA = 533,
- // SI_EL_WAIT = 534,
- // SI_EL_PASSIVE = 535,
- // SI_EL_DEFENSIVE = 536,
- // SI_EL_OFFENSIVE = 537,
- // SI_EL_COST = 538,
- SI_PYROTECHNIC = 539,
- SI_PYROTECHNIC_OPTION = 540,
- SI_HEATER = 541,
- SI_HEATER_OPTION = 542,
- SI_TROPIC = 543,
- SI_TROPIC_OPTION = 544,
- SI_AQUAPLAY = 545,
- SI_AQUAPLAY_OPTION = 546,
- SI_COOLER = 547,
- SI_COOLER_OPTION = 548,
- SI_CHILLY_AIR = 549,
- SI_CHILLY_AIR_OPTION = 550,
- SI_GUST = 551,
- SI_GUST_OPTION = 552,
- SI_BLAST = 553,
- SI_BLAST_OPTION = 554,
- SI_WILD_STORM = 555,
- SI_WILD_STORM_OPTION = 556,
- SI_PETROLOGY = 557,
- SI_PETROLOGY_OPTION = 558,
- SI_CURSED_SOIL = 559,
- SI_CURSED_SOIL_OPTION = 560,
- SI_UPHEAVAL = 561,
- SI_UPHEAVAL_OPTION = 562,
- SI_TIDAL_WEAPON = 563,
- SI_TIDAL_WEAPON_OPTION = 564,
- SI_ROCK_CRUSHER = 565,
- SI_ROCK_CRUSHER_ATK = 566,
- SI_FIRE_INSIGNIA = 567,
- SI_WATER_INSIGNIA = 568,
- SI_WIND_INSIGNIA = 569,
- SI_EARTH_INSIGNIA = 570,
- SI_EQUIPED_FLOOR = 571,
- SI_GUARDIAN_RECALL = 572,
- SI_MORA_BUFF = 573,
- SI_REUSE_LIMIT_G = 574,
- SI_REUSE_LIMIT_H = 575,
- SI_NEEDLE_OF_PARALYZE = 576,
- SI_PAIN_KILLER = 577,
- SI_G_LIFEPOTION = 578,
- SI_VITALIZE_POTION = 579,
- SI_LIGHT_OF_REGENE = 580,
- SI_OVERED_BOOST = 581,
- SI_SILENT_BREEZE = 582,
- SI_ODINS_POWER = 583,
- SI_STYLE_CHANGE = 584,
- SI_SONIC_CLAW_POSTDELAY = 585,
+ SI_BLANK = -1,
+
+ SI_PROVOKE = 0,
+ SI_ENDURE = 1,
+ SI_TWOHANDQUICKEN = 2,
+ SI_CONCENTRATION = 3,
+ SI_HIDING = 4,
+ SI_CLOAKING = 5,
+ SI_ENCHANTPOISON = 6,
+ SI_POISONREACT = 7,
+ SI_QUAGMIRE = 8,
+ SI_ANGELUS = 9,
+ SI_BLESSING = 10,
+ SI_CRUCIS = 11,
+ SI_INC_AGI = 12,
+ SI_DEC_AGI = 13,
+ SI_SLOWPOISON = 14,
+ SI_IMPOSITIO = 15,
+ SI_SUFFRAGIUM = 16,
+ SI_ASPERSIO = 17,
+ SI_BENEDICTIO = 18,
+ SI_KYRIE = 19,
+ SI_MAGNIFICAT = 20,
+ SI_GLORIA = 21,
+ SI_LEXAETERNA = 22,
+ SI_ADRENALINE = 23,
+ SI_WEAPONPERFECT = 24,
+ SI_OVERTHRUST = 25,
+ SI_MAXIMIZE = 26,
+ SI_RIDING = 27,
+ SI_FALCON = 28,
+ SI_TRICKDEAD = 29,
+ SI_SHOUT = 30,
+ SI_ENERGYCOAT = 31,
+ SI_BROKENARMOR = 32,
+ SI_BROKENWEAPON = 33,
+ SI_ILLUSION = 34,
+ SI_WEIGHTOVER50 = 35,
+ SI_WEIGHTOVER90 = 36,
+ SI_ATTHASTE_POTION1 = 37,
+ SI_ATTHASTE_POTION2 = 38,
+ SI_ATTHASTE_POTION3 = 39,
+ SI_ATTHASTE_INFINITY = 40,
+ SI_MOVHASTE_POTION = 41,
+ SI_MOVHASTE_INFINITY = 42,
+ //SI_AUTOCOUNTER = 43,
+ //SI_SPLASHER = 44,
+ SI_ANKLESNARE = 45,
+ SI_POSTDELAY = 46,
+ //SI_NOACTION = 47,
+ //SI_IMPOSSIBLEPICKUP = 48,
+ //SI_BARRIER = 49,
+
+ SI_NOEQUIPWEAPON = 50,
+ SI_NOEQUIPSHIELD = 51,
+ SI_NOEQUIPARMOR = 52,
+ SI_NOEQUIPHELM = 53,
+ SI_PROTECTWEAPON = 54,
+ SI_PROTECTSHIELD = 55,
+ SI_PROTECTARMOR = 56,
+ SI_PROTECTHELM = 57,
+ SI_AUTOGUARD = 58,
+ SI_REFLECTSHIELD = 59,
+ //SI_DEVOTION = 60,
+ SI_PROVIDENCE = 61,
+ SI_DEFENDER = 62,
+ //SI_MAGICROD = 63,
+ //SI_WEAPONPROPERTY = 64,
+ SI_AUTOSPELL = 65,
+ //SI_SPECIALZONE = 66,
+ //SI_MASK = 67,
+ SI_SPEARQUICKEN = 68,
+ //SI_BDPLAYING = 69,
+ //SI_WHISTLE = 70,
+ //SI_ASSASSINCROSS = 71,
+ //SI_POEMBRAGI = 72,
+ //SI_APPLEIDUN = 73,
+ //SI_HUMMING = 74,
+ //SI_DONTFORGETME = 75,
+ //SI_FORTUNEKISS = 76,
+ //SI_SERVICEFORYOU = 77,
+ //SI_RICHMANKIM = 78,
+ //SI_ETERNALCHAOS = 79,
+ //SI_DRUMBATTLEFIELD = 80,
+ //SI_RINGNIBELUNGEN = 81,
+ //SI_ROKISWEIL = 82,
+ //SI_INTOABYSS = 83,
+ //SI_SIEGFRIED = 84,
+ //SI_BLADESTOP = 85,
+ SI_EXPLOSIONSPIRITS = 86,
+ SI_STEELBODY = 87,
+ SI_EXTREMITYFIST = 88,
+ //SI_COMBOATTACK = 89,
+ SI_PROPERTYFIRE = 90,
+ SI_PROPERTYWATER = 91,
+ SI_PROPERTYWIND = 92,
+ SI_PROPERTYGROUND = 93,
+ //SI_MAGICATTACK = 94,
+ SI_STOP = 95,
+ //SI_WEAPONBRAKER = 96,
+ SI_PROPERTYUNDEAD = 97,
+ //SI_POWERUP = 98,
+ //SI_AGIUP = 99,
+
+ //SI_SIEGEMODE = 100,
+ //SI_INVISIBLE = 101,
+ //SI_STATUSONE = 102,
+ SI_AURABLADE = 103,
+ SI_PARRYING = 104,
+ SI_LKCONCENTRATION = 105,
+ SI_TENSIONRELAX = 106,
+ SI_BERSERK = 107,
+ //SI_SACRIFICE = 108,
+ //SI_GOSPEL = 109,
+ SI_ASSUMPTIO = 110,
+ //SI_BASILICA = 111,
+ SI_GROUNDMAGIC = 112,
+ SI_MAGICPOWER = 113,
+ SI_EDP = 114,
+ SI_TRUESIGHT = 115,
+ SI_WINDWALK = 116,
+ SI_MELTDOWN = 117,
+ SI_CARTBOOST = 118,
+ //SI_CHASEWALK = 119,
+ SI_SWORDREJECT = 120,
+ SI_MARIONETTE_MASTER = 121,
+ SI_MARIONETTE = 122,
+ SI_MOON = 123,
+ SI_BLOODING = 124,
+ SI_JOINTBEAT = 125,
+ //SI_MINDBREAKER = 126,
+ //SI_MEMORIZE = 127,
+ //SI_FOGWALL = 128,
+ //SI_SPIDERWEB = 129,
+ SI_PROTECTEXP = 130,
+ //SI_SUB_WEAPONPROPERTY = 131,
+ SI_AUTOBERSERK = 132,
+ SI_RUN = 133,
+ SI_TING = 134,
+ SI_STORMKICK_ON = 135,
+ SI_STORMKICK_READY = 136,
+ SI_DOWNKICK_ON = 137,
+ SI_DOWNKICK_READY = 138,
+ SI_TURNKICK_ON = 139,
+ SI_TURNKICK_READY = 140,
+ SI_COUNTER_ON = 141,
+ SI_COUNTER_READY = 142,
+ SI_DODGE_ON = 143,
+ SI_DODGE_READY = 144,
+ SI_STRUP = 145,
+ SI_PROPERTYDARK = 146,
+ SI_ADRENALINE2 = 147,
+ SI_PROPERTYTELEKINESIS = 148,
+ SI_SOULLINK = 149,
+
+ SI_PLUSATTACKPOWER = 150,
+ SI_PLUSMAGICPOWER = 151,
+ SI_DEVIL1 = 152,
+ SI_KAITE = 153,
+ //SI_SWOO = 154,
+ //SI_STAR2 = 155,
+ SI_KAIZEL = 156,
+ SI_KAAHI = 157,
+ SI_KAUPE = 158,
+ SI_SMA_READY = 159,
+ SI_SKE = 160,
+ SI_ONEHANDQUICKEN = 161,
+ //SI_FRIEND = 162,
+ //SI_FRIENDUP = 163,
+ //SI_SG_WARM = 164,
+ SI_SG_SUN_WARM = 165,
+ //SI_SG_MOON_WARM = 166 | The three show the exact same display: ultra red character (165, 166, 167)
+ //SI_SG_STAR_WARM = 167 | Their names would be SI_SG_SUN_WARM, SI_SG_MOON_WARM, SI_SG_STAR_WARM
+ //SI_EMOTION = 168,
+ SI_SUN_COMFORT = 169,
+ SI_MOON_COMFORT = 170,
+ SI_STAR_COMFORT = 171,
+ //SI_EXPUP = 172,
+ //SI_GDSKILL_BATTLEORDER = 173,
+ //SI_GDSKILL_REGENERATION = 174,
+ //SI_GDSKILL_POSTDELAY = 175,
+ //SI_RESISTHANDICAP = 176,
+ //SI_MAXHPPERCENT = 177,
+ //SI_MAXSPPERCENT = 178,
+ //SI_DEFENCE = 179,
+ //SI_SLOWDOWN = 180,
+ SI_PRESERVE = 181,
+ SI_INCSTR = 182,
+ //SI_NOT_EXTREMITYFIST = 183,
+ SI_CLAIRVOYANCE = 184,
+ //SI_MOVESLOW_POTION = 185,
+ SI_DOUBLECASTING = 186,
+ //SI_GRAVITATION = 187,
+ SI_OVERTHRUSTMAX = 188,
+ //SI_LONGING = 189,
+ //SI_HERMODE = 190,
+ SI_TAROTCARD = 191, // the icon allows no doubt... but what is it really used for ?? [DracoRPG]
+ //SI_HLIF_AVOID = 192,
+ //SI_HFLI_FLEET = 193,
+ //SI_HFLI_SPEED = 194,
+ //SI_HLIF_CHANGE = 195,
+ //SI_HAMI_BLOODLUST = 196,
+ SI_CR_SHRINK = 197,
+ SI_WZ_SIGHTBLASTER = 198,
+ SI_DC_WINKCHARM = 199,
+
+ SI_RG_CCONFINE_M = 200,
+ SI_RG_CCONFINE_S = 201,
+ //SI_DISABLEMOVE = 202,
+ SI_GS_MADNESSCANCEL = 203, //[blackhole89]
+ SI_GS_GATLINGFEVER = 204,
+ SI_EARTHSCROLL = 205,
+ SI_NJ_UTSUSEMI = 206,
+ SI_NJ_BUNSINJYUTSU = 207,
+ SI_NJ_NEN = 208,
+ SI_GS_ADJUSTMENT = 209,
+ SI_GS_ACCURACY = 210,
+ SI_NJ_SUITON = 211,
+ //SI_PET = 212,
+ //SI_MENTAL = 213,
+ //SI_EXPMEMORY = 214,
+ //SI_PERFORMANCE = 215,
+ //SI_GAIN = 216,
+ //SI_GRIFFON = 217,
+ //SI_DRIFT = 218,
+ //SI_WALLSHIFT = 219,
+ //SI_REINCARNATION = 220,
+ //SI_PATTACK = 221,
+ //SI_PSPEED = 222,
+ //SI_PDEFENSE = 223,
+ //SI_PCRITICAL = 224,
+ //SI_RANKING = 225,
+ //SI_PTRIPLE = 226,
+ //SI_DENERGY = 227,
+ //SI_WAVE1 = 228,
+ //SI_WAVE2 = 229,
+ //SI_WAVE3 = 230,
+ //SI_WAVE4 = 231,
+ //SI_DAURA = 232,
+ //SI_DFREEZER = 233,
+ //SI_DPUNISH = 234,
+ //SI_DBARRIER = 235,
+ //SI_DWARNING = 236,
+ //SI_MOUSEWHEEL = 237,
+ //SI_DGAUGE = 238,
+ //SI_DACCEL = 239,
+ //SI_DBLOCK = 240,
+ SI_FOOD_STR = 241,
+ SI_FOOD_AGI = 242,
+ SI_FOOD_VIT = 243,
+ SI_FOOD_DEX = 244,
+ SI_FOOD_INT = 245,
+ SI_FOOD_LUK = 246,
+ SI_FOOD_BASICAVOIDANCE = 247,
+ SI_FOOD_BASICHIT = 248,
+ SI_FOOD_CRITICALSUCCESSVALUE = 249,
+
+ SI_CASH_PLUSEXP = 250,
+ SI_CASH_DEATHPENALTY = 251,
+ SI_CASH_RECEIVEITEM = 252,
+ SI_CASH_BOSS_ALARM = 253,
+ //SI_DA_ENERGY = 254,
+ //SI_DA_FIRSTSLOT = 255,
+ //SI_DA_HEADDEF = 256,
+ //SI_DA_SPACE = 257,
+ //SI_DA_TRANSFORM = 258,
+ //SI_DA_ITEMREBUILD = 259,
+ //SI_DA_ILLUSION = 260, //All mobs display as Turtle General
+ //SI_DA_DARKPOWER = 261,
+ //SI_DA_EARPLUG = 262,
+ //SI_DA_CONTRACT = 263, //Bio Mob effect on you and SI_TRICKDEAD icon
+ //SI_DA_BLACK = 264, //For short time blurry screen
+ //SI_DA_MAGICCART = 265,
+ //SI_CRYSTAL = 266,
+ //SI_DA_REBUILD = 267,
+ //SI_DA_EDARKNESS = 268,
+ //SI_DA_EGUARDIAN = 269,
+ //SI_DA_TIMEOUT = 270,
+ SI_FOOD_STR_CASH = 271,
+ SI_FOOD_AGI_CASH = 272,
+ SI_FOOD_VIT_CASH = 273,
+ SI_FOOD_DEX_CASH = 274,
+ SI_FOOD_INT_CASH = 275,
+ SI_FOOD_LUK_CASH = 276,
+ SI_MER_FLEE = 277,
+ SI_MER_ATK = 278,
+ SI_MER_HP = 279,
+ SI_MER_SP = 280,
+ SI_MER_HIT = 281,
+ SI_SLOWCAST = 282,
+ //SI_MAGICMIRROR = 283,
+ //SI_STONESKIN = 284,
+ //SI_ANTIMAGIC = 285,
+ SI_CRITICALWOUND = 286,
+ //SI_NPC_DEFENDER = 287,
+ //SI_NOACTION_WAIT = 288,
+ SI_MOVHASTE_HORSE = 289,
+ SI_PROTECT_DEF = 290,
+ SI_PROTECT_MDEF = 291,
+ SI_HEALPLUS = 292,
+ SI_S_LIFEPOTION = 293,
+ SI_L_LIFEPOTION = 294,
+ SI_CRITICALPERCENT = 295,
+ SI_PLUSAVOIDVALUE = 296,
+ //SI_ATKER_ASPD = 297,
+ //SI_TARGET_ASPD = 298,
+ //SI_ATKER_MOVESPEED = 299,
+
+ SI_ATKER_BLOOD = 300,
+ SI_TARGET_BLOOD = 301,
+ SI_ARMOR_PROPERTY = 302,
+ //SI_REUSE_LIMIT_A = 303,
+ SI_HELLPOWER = 304,
+ //SI_STEAMPACK = 305,
+ //SI_REUSE_LIMIT_B = 306,
+ //SI_REUSE_LIMIT_C = 307,
+ //SI_REUSE_LIMIT_D = 308,
+ //SI_REUSE_LIMIT_E = 309,
+ //SI_REUSE_LIMIT_F = 310,
+ SI_INVINCIBLE = 311,
+ SI_CASH_PLUSONLYJOBEXP = 312,
+ SI_PARTYFLEE = 313,
+ SI_ANGEL_PROTECT = 314,
+ //SI_ENDURE_MDEF = 315,
+ SI_ENCHANTBLADE = 316,
+ SI_DEATHBOUND = 317,
+ SI_REFRESH = 318,
+ SI_GIANTGROWTH = 319,
+ SI_STONEHARDSKIN = 320,
+ SI_VITALITYACTIVATION = 321,
+ SI_FIGHTINGSPIRIT = 322,
+ SI_ABUNDANCE = 323,
+ SI_REUSE_MILLENNIUMSHIELD = 324,
+ SI_REUSE_CRUSHSTRIKE = 325,
+ SI_REUSE_REFRESH = 326,
+ SI_REUSE_STORMBLAST = 327,
+ SI_VENOMIMPRESS = 328,
+ SI_EPICLESIS = 329,
+ SI_ORATIO = 330,
+ SI_LAUDAAGNUS = 331,
+ SI_LAUDARAMUS = 332,
+ SI_CLOAKINGEXCEED = 333,
+ SI_HALLUCINATIONWALK = 334,
+ SI_HALLUCINATIONWALK_POSTDELAY = 335,
+ SI_RENOVATIO = 336,
+ SI_WEAPONBLOCKING = 337,
+ SI_WEAPONBLOCKING_POSTDELAY = 338,
+ SI_ROLLINGCUTTER = 339,
+ SI_EXPIATIO = 340,
+ SI_POISONINGWEAPON = 341,
+ SI_TOXIN = 342,
+ SI_PARALYSE = 343,
+ SI_VENOMBLEED = 344,
+ SI_MAGICMUSHROOM = 345,
+ SI_DEATHHURT = 346,
+ SI_PYREXIA = 347,
+ SI_OBLIVIONCURSE = 348,
+ SI_LEECHESEND = 349,
+
+ SI_DUPLELIGHT = 350,
+ SI_FROSTMISTY = 351,
+ SI_FEARBREEZE = 352,
+ SI_ELECTRICSHOCKER = 353,
+ SI_MARSHOFABYSS = 354,
+ SI_RECOGNIZEDSPELL = 355,
+ SI_STASIS = 356,
+ SI_WUGRIDER = 357,
+ SI_WUGDASH = 358,
+ SI_WUGBITE = 359,
+ SI_CAMOUFLAGE = 360,
+ SI_ACCELERATION = 361,
+ SI_HOVERING = 362,
+ SI_SPHERE_1 = 363,
+ SI_SPHERE_2 = 364,
+ SI_SPHERE_3 = 365,
+ SI_SPHERE_4 = 366,
+ SI_SPHERE_5 = 367,
+ SI_MVPCARD_TAOGUNKA = 368,
+ SI_MVPCARD_MISTRESS = 369,
+ SI_MVPCARD_ORCHERO = 370,
+ SI_MVPCARD_ORCLORD = 371,
+ SI_OVERHEAT_LIMITPOINT = 372,
+ SI_OVERHEAT = 373,
+ SI_SHAPESHIFT = 374,
+ SI_INFRAREDSCAN = 375,
+ SI_MAGNETICFIELD = 376,
+ SI_NEUTRALBARRIER = 377,
+ SI_NEUTRALBARRIER_MASTER = 378,
+ SI_STEALTHFIELD = 379,
+ SI_STEALTHFIELD_MASTER = 380,
+ SI_MANU_ATK = 381,
+ SI_MANU_DEF = 382,
+ SI_SPL_ATK = 383,
+ SI_SPL_DEF = 384,
+ SI_REPRODUCE = 385,
+ SI_MANU_MATK = 386,
+ SI_SPL_MATK = 387,
+ SI_STR_SCROLL = 388,
+ SI_INT_SCROLL = 389,
+ SI_LG_REFLECTDAMAGE = 390,
+ SI_FORCEOFVANGUARD = 391,
+ SI_BUCHEDENOEL = 392,
+ SI_AUTOSHADOWSPELL = 393,
+ SI_SHADOWFORM = 394,
+ SI_RAID = 395,
+ SI_SHIELDSPELL_DEF = 396,
+ SI_SHIELDSPELL_MDEF = 397,
+ SI_SHIELDSPELL_REF = 398,
+ SI_BODYPAINT = 399,
+
+ SI_EXEEDBREAK = 400,
+ SI_ADORAMUS = 401,
+ SI_PRESTIGE = 402,
+ SI_INVISIBILITY = 403,
+ SI_DEADLYINFECT = 404,
+ SI_BANDING = 405,
+ SI_EARTHDRIVE = 406,
+ SI_INSPIRATION = 407,
+ SI_ENERVATION = 408,
+ SI_GROOMY = 409,
+ SI_RAISINGDRAGON = 410,
+ SI_IGNORANCE = 411,
+ SI_LAZINESS = 412,
+ SI_LIGHTNINGWALK = 413,
+ SI_ACARAJE = 414,
+ SI_UNLUCKY = 415,
+ SI_CURSEDCIRCLE_ATKER = 416,
+ SI_CURSEDCIRCLE_TARGET = 417,
+ SI_WEAKNESS = 418,
+ SI_CRESCENTELBOW = 419,
+ SI_NOEQUIPACCESSARY = 420,
+ SI_STRIPACCESSARY = 421,
+ SI_MANHOLE = 422,
+ SI_POPECOOKIE = 423,
+ SI_FALLENEMPIRE = 424,
+ SI_GENTLETOUCH_ENERGYGAIN = 425,
+ SI_GENTLETOUCH_CHANGE = 426,
+ SI_GENTLETOUCH_REVITALIZE = 427,
+ SI_BLOODYLUST = 428,
+ SI_SWINGDANCE = 429,
+ SI_SYMPHONYOFLOVERS = 430,
+ SI_PROPERTYWALK = 431,
+ SI_SPELLFIST = 432,
+ SI_NETHERWORLD = 433,
+ SI_SIREN = 434,
+ SI_DEEPSLEEP = 435,
+ SI_SIRCLEOFNATURE = 436,
+ SI_COLD = 437,
+ SI_GLOOMYDAY = 438,
+ SI_SONG_OF_MANA = 439,
+ SI_CLOUDKILL = 440,
+ SI_DANCEWITHWUG = 441,
+ SI_RUSHWINDMILL = 442,
+ SI_ECHOSONG = 443,
+ SI_HARMONIZE = 444,
+ SI_STRIKING = 445,
+ SI_WARMER = 446,
+ SI_MOONLITSERENADE = 447,
+ SI_SATURDAYNIGHTFEVER = 448,
+ SI_SITDOWN_FORCE = 449,
+
+ SI_ANALYZE = 450,
+ SI_LERADSDEW = 451,
+ SI_MELODYOFSINK = 452,
+ SI_WARCRYOFBEYOND = 453,
+ SI_UNLIMITEDHUMMINGVOICE = 454,
+ SI_SPELLBOOK1 = 455,
+ SI_SPELLBOOK2 = 456,
+ SI_SPELLBOOK3 = 457,
+ SI_FREEZE_SP = 458,
+ SI_GN_TRAINING_SWORD = 459,
+ SI_GN_REMODELING_CART = 460,
+ SI_CARTSBOOST = 461,
+ SI_FIXEDCASTINGTM_REDUCE = 462,
+ SI_THORNTRAP = 463,
+ SI_BLOODSUCKER = 464,
+ SI_SPORE_EXPLOSION = 465,
+ SI_DEMONIC_FIRE = 466,
+ SI_FIRE_EXPANSION_SMOKE_POWDER = 467,
+ SI_FIRE_EXPANSION_TEAR_GAS = 468,
+ SI_BLOCKING_PLAY = 469,
+ SI_MANDRAGORA = 470,
+ SI_ACTIVATE = 471,
+ SI_SECRAMENT = 472,
+ SI_ASSUMPTIO2 = 473,
+ SI_TK_SEVENWIND = 474,
+ SI_LIMIT_ODINS_RECALL = 475,
+ SI_STOMACHACHE = 476,
+ SI_MYSTERIOUS_POWDER = 477,
+ SI_MELON_BOMB = 478,
+ SI_BANANA_BOMB_SITDOWN_POSTDELAY = 479,
+ SI_PROMOTE_HEALTH_RESERCH = 480,
+ SI_ENERGY_DRINK_RESERCH = 481,
+ SI_EXTRACT_WHITE_POTION_Z = 482,
+ SI_VITATA_500 = 483,
+ SI_EXTRACT_SALAMINE_JUICE = 484,
+ SI_BOOST500 = 485,
+ SI_FULL_SWING_K = 486,
+ SI_MANA_PLUS = 487,
+ SI_MUSTLE_M = 488,
+ SI_LIFE_FORCE_F = 489,
+ SI_VACUUM_EXTREME = 490,
+ SI_SAVAGE_STEAK = 491,
+ SI_COCKTAIL_WARG_BLOOD = 492,
+ SI_MINOR_BBQ = 493,
+ SI_SIROMA_ICE_TEA = 494,
+ SI_DROCERA_HERB_STEAMED = 495,
+ SI_PUTTI_TAILS_NOODLES = 496,
+ SI_BANANA_BOMB = 497,
+ SI_SUMMON_AGNI = 498,
+ SI_SPELLBOOK4 = 499,
+
+ SI_SPELLBOOK5 = 500,
+ SI_SPELLBOOK6 = 501,
+ SI_SPELLBOOK7 = 502,
+ SI_ELEMENTAL_AGGRESSIVE = 503,
+ SI_RETURN_TO_ELDICASTES = 504,
+ SI_BANDING_DEFENCE = 505,
+ SI_SKELSCROLL = 506,
+ SI_DISTRUCTIONSCROLL = 507,
+ SI_ROYALSCROLL = 508,
+ SI_IMMUNITYSCROLL = 509,
+ SI_MYSTICSCROLL = 510,
+ SI_BATTLESCROLL = 511,
+ SI_ARMORSCROLL = 512,
+ SI_FREYJASCROLL = 513,
+ SI_SOULSCROLL = 514,
+ SI_CIRCLE_OF_FIRE = 515,
+ SI_CIRCLE_OF_FIRE_OPTION = 516,
+ SI_FIRE_CLOAK = 517,
+ SI_FIRE_CLOAK_OPTION = 518,
+ SI_WATER_SCREEN = 519,
+ SI_WATER_SCREEN_OPTION = 520,
+ SI_WATER_DROP = 521,
+ SI_WATER_DROP_OPTION = 522,
+ SI_WIND_STEP = 523,
+ SI_WIND_STEP_OPTION = 524,
+ SI_WIND_CURTAIN = 525,
+ SI_WIND_CURTAIN_OPTION = 526,
+ SI_WATER_BARRIER = 527,
+ SI_ZEPHYR = 528,
+ SI_SOLID_SKIN = 529,
+ SI_SOLID_SKIN_OPTION = 530,
+ SI_STONE_SHIELD = 531,
+ SI_STONE_SHIELD_OPTION = 532,
+ SI_POWER_OF_GAIA = 533,
+ //SI_EL_WAIT = 534,
+ //SI_EL_PASSIVE = 535,
+ //SI_EL_DEFENSIVE = 536,
+ //SI_EL_OFFENSIVE = 537,
+ //SI_EL_COST = 538,
+ SI_PYROTECHNIC = 539,
+ SI_PYROTECHNIC_OPTION = 540,
+ SI_HEATER = 541,
+ SI_HEATER_OPTION = 542,
+ SI_TROPIC = 543,
+ SI_TROPIC_OPTION = 544,
+ SI_AQUAPLAY = 545,
+ SI_AQUAPLAY_OPTION = 546,
+ SI_COOLER = 547,
+ SI_COOLER_OPTION = 548,
+ SI_CHILLY_AIR = 549,
+
+ SI_CHILLY_AIR_OPTION = 550,
+ SI_GUST = 551,
+ SI_GUST_OPTION = 552,
+ SI_BLAST = 553,
+ SI_BLAST_OPTION = 554,
+ SI_WILD_STORM = 555,
+ SI_WILD_STORM_OPTION = 556,
+ SI_PETROLOGY = 557,
+ SI_PETROLOGY_OPTION = 558,
+ SI_CURSED_SOIL = 559,
+ SI_CURSED_SOIL_OPTION = 560,
+ SI_UPHEAVAL = 561,
+ SI_UPHEAVAL_OPTION = 562,
+ SI_TIDAL_WEAPON = 563,
+ SI_TIDAL_WEAPON_OPTION = 564,
+ SI_ROCK_CRUSHER = 565,
+ SI_ROCK_CRUSHER_ATK = 566,
+ SI_FIRE_INSIGNIA = 567,
+ SI_WATER_INSIGNIA = 568,
+ SI_WIND_INSIGNIA = 569,
+ SI_EARTH_INSIGNIA = 570,
+ SI_EQUIPED_FLOOR = 571,
+ SI_GUARDIAN_RECALL = 572,
+ SI_MORA_BUFF = 573,
+ SI_REUSE_LIMIT_G = 574,
+ SI_REUSE_LIMIT_H = 575,
+ SI_NEEDLE_OF_PARALYZE = 576,
+ SI_PAIN_KILLER = 577,
+ SI_G_LIFEPOTION = 578,
+ SI_VITALIZE_POTION = 579,
+ SI_LIGHT_OF_REGENE = 580,
+ SI_OVERED_BOOST = 581,
+ SI_SILENT_BREEZE = 582,
+ SI_ODINS_POWER = 583,
+ SI_STYLE_CHANGE = 584,
+ SI_SONIC_CLAW_POSTDELAY = 585,
// ID's 586 - 595 Currently Unused
- SI_SILVERVEIN_RUSH_POSTDELAY = 596,
- SI_MIDNIGHT_FRENZY_POSTDELAY = 597,
- SI_GOLDENE_FERSE = 598,
- SI_ANGRIFFS_MODUS = 599,
- SI_TINDER_BREAKER = 600,
- SI_TINDER_BREAKER_POSTDELAY = 601,
- SI_CBC = 602,
- SI_CBC_POSTDELAY = 603,
- SI_EQC = 604,
- SI_MAGMA_FLOW = 605,
- SI_GRANITIC_ARMOR = 606,
- SI_PYROCLASTIC = 607,
- SI_VOLCANIC_ASH = 608,
- SI_SPIRITS_SAVEINFO1 = 609,
- SI_SPIRITS_SAVEINFO2 = 610,
- SI_MAGIC_CANDY = 611,
- SI_SEARCH_STORE_INFO = 612,
- SI_ALL_RIDING = 613,
- SI_ALL_RIDING_REUSE_LIMIT = 614,
- SI_MACRO = 615,
- SI_MACRO_POSTDELAY = 616,
- SI_BEER_BOTTLE_CAP = 617,
- SI_OVERLAPEXPUP = 618,
- SI_PC_IZ_DUN05 = 619,
- SI_CRUSHSTRIKE = 620,
- SI_MONSTER_TRANSFORM = 621,
- SI_SIT = 622,
- SI_ONAIR = 623,
- SI_MTF_ASPD = 624,
- SI_MTF_RANGEATK = 625,
- SI_MTF_MATK = 626,
- SI_MTF_MLEATKED = 627,
- SI_MTF_CRIDAMAGE = 628,
- SI_REUSE_LIMIT_MTF = 629,
- SI_MACRO_PERMIT = 630,
- SI_MACRO_PLAY = 631,
- SI_SKF_CAST = 632,
- SI_SKF_ASPD = 633,
- SI_SKF_ATK = 634,
- SI_SKF_MATK = 635,
- SI_REWARD_PLUSONLYJOBEXP = 636,
- SI_HANDICAPSTATE_NORECOVER = 637,
- SI_SET_NUM_DEF = 638,
- SI_SET_NUM_MDEF = 639,
- SI_SET_PER_DEF = 640,
- SI_SET_PER_MDEF = 641,
- SI_PARTYBOOKING_SEARCH_DEALY = 642,
- SI_PARTYBOOKING_REGISTER_DEALY = 643,
- SI_PERIOD_TIME_CHECK_DETECT_SKILL = 644,
- SI_KO_JYUMONJIKIRI = 645,
- SI_MEIKYOUSISUI = 646,
- SI_ATTHASTE_CASH = 647,
- SI_EQUIPPED_DIVINE_ARMOR = 648,
- SI_EQUIPPED_HOLY_ARMOR = 649,
- SI_2011RWC = 650,
- SI_KYOUGAKU = 651,
- SI_IZAYOI = 652,
- SI_ZENKAI = 653,
- SI_KG_KAGEHUMI = 654,
- SI_KYOMU = 655,
- SI_KAGEMUSYA = 656,
- SI_ZANGETSU = 657,
- SI_PHI_DEMON = 658,
- SI_GENSOU = 659,
- SI_AKAITSUKI = 660,
- SI_TETANY = 661,
- SI_GM_BATTLE = 662,
- SI_GM_BATTLE2 = 663,
- SI_2011RWC_SCROLL = 664,
- SI_ACTIVE_MONSTER_TRANSFORM = 665,
- SI_MYSTICPOWDER = 666,
- SI_ECLAGE_RECALL = 667,
- SI_ENTRY_QUEUE_APPLY_DELAY = 668,
- SI_REUSE_LIMIT_ECL = 669,
- SI_M_LIFEPOTION = 670,
+ SI_SILVERVEIN_RUSH_POSTDELAY = 596,
+ SI_MIDNIGHT_FRENZY_POSTDELAY = 597,
+ SI_GOLDENE_FERSE = 598,
+ SI_ANGRIFFS_MODUS = 599,
+
+ SI_TINDER_BREAKER = 600,
+ SI_TINDER_BREAKER_POSTDELAY = 601,
+ SI_CBC = 602,
+ SI_CBC_POSTDELAY = 603,
+ SI_EQC = 604,
+ SI_MAGMA_FLOW = 605,
+ SI_GRANITIC_ARMOR = 606,
+ SI_PYROCLASTIC = 607,
+ SI_VOLCANIC_ASH = 608,
+ SI_SPIRITS_SAVEINFO1 = 609,
+ SI_SPIRITS_SAVEINFO2 = 610,
+ SI_MAGIC_CANDY = 611,
+ SI_SEARCH_STORE_INFO = 612,
+ SI_ALL_RIDING = 613,
+ SI_ALL_RIDING_REUSE_LIMIT = 614,
+ SI_MACRO = 615,
+ SI_MACRO_POSTDELAY = 616,
+ SI_BEER_BOTTLE_CAP = 617,
+ SI_OVERLAPEXPUP = 618,
+ SI_PC_IZ_DUN05 = 619,
+ SI_CRUSHSTRIKE = 620,
+ SI_MONSTER_TRANSFORM = 621,
+ SI_SIT = 622,
+ SI_ONAIR = 623,
+ SI_MTF_ASPD = 624,
+ SI_MTF_RANGEATK = 625,
+ SI_MTF_MATK = 626,
+ SI_MTF_MLEATKED = 627,
+ SI_MTF_CRIDAMAGE = 628,
+ SI_REUSE_LIMIT_MTF = 629,
+ SI_MACRO_PERMIT = 630,
+ SI_MACRO_PLAY = 631,
+ SI_SKF_CAST = 632,
+ SI_SKF_ASPD = 633,
+ SI_SKF_ATK = 634,
+ SI_SKF_MATK = 635,
+ SI_REWARD_PLUSONLYJOBEXP = 636,
+ SI_HANDICAPSTATE_NORECOVER = 637,
+ SI_SET_NUM_DEF = 638,
+ SI_SET_NUM_MDEF = 639,
+ SI_SET_PER_DEF = 640,
+ SI_SET_PER_MDEF = 641,
+ SI_PARTYBOOKING_SEARCH_DEALY = 642,
+ SI_PARTYBOOKING_REGISTER_DEALY = 643,
+ SI_PERIOD_TIME_CHECK_DETECT_SKILL = 644,
+ SI_KO_JYUMONJIKIRI = 645,
+ SI_MEIKYOUSISUI = 646,
+ SI_ATTHASTE_CASH = 647,
+ SI_EQUIPPED_DIVINE_ARMOR = 648,
+ SI_EQUIPPED_HOLY_ARMOR = 649,
+
+ SI_2011RWC = 650,
+ SI_KYOUGAKU = 651,
+ SI_IZAYOI = 652,
+ SI_ZENKAI = 653,
+ SI_KG_KAGEHUMI = 654,
+ SI_KYOMU = 655,
+ SI_KAGEMUSYA = 656,
+ SI_ZANGETSU = 657,
+ SI_PHI_DEMON = 658,
+ SI_GENSOU = 659,
+ SI_AKAITSUKI = 660,
+ SI_TETANY = 661,
+ SI_GM_BATTLE = 662,
+ SI_GM_BATTLE2 = 663,
+ SI_2011RWC_SCROLL = 664,
+ SI_ACTIVE_MONSTER_TRANSFORM = 665,
+ SI_MYSTICPOWDER = 666,
+ SI_ECLAGE_RECALL = 667,
+ SI_ENTRY_QUEUE_APPLY_DELAY = 668,
+ SI_REUSE_LIMIT_ECL = 669,
+ SI_M_LIFEPOTION = 670,
SI_ENTRY_QUEUE_NOTIFY_ADMISSION_TIME_OUT = 671,
- SI_UNKNOWN_NAME = 672,
- SI_ON_PUSH_CART = 673,
- SI_HAT_EFFECT = 674,
- SI_FLOWER_LEAF = 675,
- SI_RAY_OF_PROTECTION = 676,
- SI_GLASTHEIM_ATK = 677,
- SI_GLASTHEIM_DEF = 678,
- SI_GLASTHEIM_HEAL = 679,
- SI_GLASTHEIM_HIDDEN = 680,
- SI_GLASTHEIM_STATE = 681,
- SI_GLASTHEIM_ITEMDEF = 682,
- SI_GLASTHEIM_HPSP = 683,
- SI_HOMUN_SKILL_POSTDELAY = 684,
- SI_ALMIGHTY = 685,
- SI_GVG_GIANT = 686,
- SI_GVG_GOLEM = 687,
- SI_GVG_STUN = 688,
- SI_GVG_STONE = 689,
- SI_GVG_FREEZ = 690,
- SI_GVG_SLEEP = 691,
- SI_GVG_CURSE = 692,
- SI_GVG_SILENCE = 693,
- SI_GVG_BLIND = 694,
- SI_CLIENT_ONLY_EQUIP_ARROW = 695,
- SI_CLAN_INFO = 696,
- SI_JP_EVENT01 = 697,
- SI_JP_EVENT02 = 698,
- SI_JP_EVENT03 = 699,
- SI_JP_EVENT04 = 700,
- SI_TELEPORT_FIXEDCASTINGDELAY = 701,
- SI_GEFFEN_MAGIC1 = 702,
- SI_GEFFEN_MAGIC2 = 703,
- SI_GEFFEN_MAGIC3 = 704,
- SI_QUEST_BUFF1 = 705,
- SI_QUEST_BUFF2 = 706,
- SI_QUEST_BUFF3 = 707,
- SI_REUSE_LIMIT_RECALL = 708,
- SI_SAVEPOSITION = 709,
- SI_HANDICAPSTATE_ICEEXPLO = 710,
- SI_FENRIR_CARD = 711,
- SI_REUSE_LIMIT_ASPD_POTION = 712,
- SI_MAXPAIN = 713,
- SI_PC_STOP = 714,
- SI_FRIGG_SONG = 715,
- SI_OFFERTORIUM = 716,
- SI_TELEKINESIS_INTENSE = 717,
- SI_MOONSTAR = 718,
- SI_STRANGELIGHTS = 719,
- SI_FULL_THROTTLE = 720,
- SI_REBOUND = 721,
- SI_UNLIMIT = 722,
- SI_KINGS_GRACE = 723,
- SI_ITEM_ATKMAX = 724,
- SI_ITEM_ATKMIN = 725,
- SI_ITEM_MATKMAX = 726,
- SI_ITEM_MATKMIN = 727,
- SI_SUPER_STAR = 728,
- SI_HIGH_RANKER = 729,
- SI_DARKCROW = 730,
- SI_2013_VALENTINE1 = 731,
- SI_2013_VALENTINE2 = 732,
- SI_2013_VALENTINE3 = 733,
- SI_ILLUSIONDOPING = 734,
- //SI_ = 735,
- SI_CHILL = 736,
- SI_BURNT = 737,
- SI_FLASHCOMBO = 740,
- SI_B_TRAP = 752,
- SI_E_CHAIN = 753,
- SI_E_QD_SHOT_READY = 754,
- SI_C_MARKER = 755,
- SI_H_MINE = 756,
- SI_H_MINE_SPLASH = 757,
- SI_P_ALTER = 758,
- SI_HEAT_BARREL = 759,
- SI_ANTI_M_BLAST = 760,
- SI_SLUGSHOT = 761,
- SI_SWORDCLAN = 762,
- SI_ARCWANDCLAN = 763,
- SI_GOLDENMACECLAN = 764,
- SI_CROSSBOWCLAN = 765,
- SI_PACKING_ENVELOPE1 = 766,
- SI_PACKING_ENVELOPE2 = 767,
- SI_PACKING_ENVELOPE3 = 768,
- SI_PACKING_ENVELOPE4 = 769,
- SI_PACKING_ENVELOPE5 = 770,
- SI_PACKING_ENVELOPE6 = 771,
- SI_PACKING_ENVELOPE7 = 772,
- SI_PACKING_ENVELOPE8 = 773,
- SI_PACKING_ENVELOPE9 = 774,
- SI_PACKING_ENVELOPE10 = 775,
- SI_GLASTHEIM_TRANS = 776,
- SI_HEAT_BARREL_AFTER = 778,
- SI_DECORATION_OF_MUSIC = 779,
+ SI_UNKNOWN_NAME = 672,
+ SI_ON_PUSH_CART = 673,
+ SI_HAT_EFFECT = 674,
+ SI_FLOWER_LEAF = 675,
+ SI_RAY_OF_PROTECTION = 676,
+ SI_GLASTHEIM_ATK = 677,
+ SI_GLASTHEIM_DEF = 678,
+ SI_GLASTHEIM_HEAL = 679,
+ SI_GLASTHEIM_HIDDEN = 680,
+ SI_GLASTHEIM_STATE = 681,
+ SI_GLASTHEIM_ITEMDEF = 682,
+ SI_GLASTHEIM_HPSP = 683,
+ SI_HOMUN_SKILL_POSTDELAY = 684,
+ SI_ALMIGHTY = 685,
+ SI_GVG_GIANT = 686,
+ SI_GVG_GOLEM = 687,
+ SI_GVG_STUN = 688,
+ SI_GVG_STONE = 689,
+ SI_GVG_FREEZ = 690,
+ SI_GVG_SLEEP = 691,
+ SI_GVG_CURSE = 692,
+ SI_GVG_SILENCE = 693,
+ SI_GVG_BLIND = 694,
+ SI_CLIENT_ONLY_EQUIP_ARROW = 695,
+ SI_CLAN_INFO = 696,
+ SI_JP_EVENT01 = 697,
+ SI_JP_EVENT02 = 698,
+ SI_JP_EVENT03 = 699,
+
+ SI_JP_EVENT04 = 700,
+ SI_TELEPORT_FIXEDCASTINGDELAY = 701,
+ SI_GEFFEN_MAGIC1 = 702,
+ SI_GEFFEN_MAGIC2 = 703,
+ SI_GEFFEN_MAGIC3 = 704,
+ SI_QUEST_BUFF1 = 705,
+ SI_QUEST_BUFF2 = 706,
+ SI_QUEST_BUFF3 = 707,
+ SI_REUSE_LIMIT_RECALL = 708,
+ SI_SAVEPOSITION = 709,
+ SI_HANDICAPSTATE_ICEEXPLO = 710,
+ SI_FENRIR_CARD = 711,
+ SI_REUSE_LIMIT_ASPD_POTION = 712,
+ SI_MAXPAIN = 713,
+ SI_PC_STOP = 714,
+ SI_FRIGG_SONG = 715,
+ SI_OFFERTORIUM = 716,
+ SI_TELEKINESIS_INTENSE = 717,
+ SI_MOONSTAR = 718,
+ SI_STRANGELIGHTS = 719,
+ SI_FULL_THROTTLE = 720,
+ SI_REBOUND = 721,
+ SI_UNLIMIT = 722,
+ SI_KINGS_GRACE = 723,
+ SI_ITEM_ATKMAX = 724,
+ SI_ITEM_ATKMIN = 725,
+ SI_ITEM_MATKMAX = 726,
+ SI_ITEM_MATKMIN = 727,
+ SI_SUPER_STAR = 728,
+ SI_HIGH_RANKER = 729,
+ SI_DARKCROW = 730,
+ SI_2013_VALENTINE1 = 731,
+ SI_2013_VALENTINE2 = 732,
+ SI_2013_VALENTINE3 = 733,
+ SI_ILLUSIONDOPING = 734,
+ //SI_ = 735,
+ SI_CHILL = 736,
+ SI_BURNT = 737,
+// SI_PCCAFE_PLAY_TIME = 738,
+// SI_TWISTED_TIME = 739,
+ SI_FLASHCOMBO = 740,
+
+// SI_JITTER_BUFF1 = 741,
+// SI_JITTER_BUFF2 = 742,
+// SI_JITTER_BUFF3 = 743,
+// SI_JITTER_BUFF4 = 744,
+// SI_JITTER_BUFF5 = 745,
+// SI_JITTER_BUFF6 = 746,
+// SI_JITTER_BUFF7 = 747,
+// SI_JITTER_BUFF8 = 748,
+// SI_JITTER_BUFF9 = 749,
+// SI_JITTER_BUFF10 = 750,
+// SI_CUP_OF_BOZA = 751,
+ SI_B_TRAP = 752,
+ SI_E_CHAIN = 753,
+ SI_E_QD_SHOT_READY = 754,
+ SI_C_MARKER = 755,
+ SI_H_MINE = 756,
+ SI_H_MINE_SPLASH = 757,
+ SI_P_ALTER = 758,
+ SI_HEAT_BARREL = 759,
+ SI_ANTI_M_BLAST = 760,
+ SI_SLUGSHOT = 761,
+ SI_SWORDCLAN = 762,
+ SI_ARCWANDCLAN = 763,
+ SI_GOLDENMACECLAN = 764,
+ SI_CROSSBOWCLAN = 765,
+ SI_PACKING_ENVELOPE1 = 766,
+ SI_PACKING_ENVELOPE2 = 767,
+ SI_PACKING_ENVELOPE3 = 768,
+ SI_PACKING_ENVELOPE4 = 769,
+ SI_PACKING_ENVELOPE5 = 770,
+ SI_PACKING_ENVELOPE6 = 771,
+ SI_PACKING_ENVELOPE7 = 772,
+ SI_PACKING_ENVELOPE8 = 773,
+ SI_PACKING_ENVELOPE9 = 774,
+ SI_PACKING_ENVELOPE10 = 775,
+ SI_GLASTHEIM_TRANS = 776,
+// SI_ZONGZI_POUCH_TRANS = 777,
+ SI_HEAT_BARREL_AFTER = 778,
+ SI_DECORATION_OF_MUSIC = 779,
+
+// SI_OVERSEAEXPUP = 780,
+// SI_CLOWN_N_GYPSY_CARD = 781,
+// SI_OPEN_NPC_MARKET = 782,
+// SI_BEEF_RIB_STEW = 783,
+// SI_PORK_RIB_STEW = 784,
+// SI_CHUSEOK_MONDAY = 785,
+// SI_CHUSEOK_TUESDAY = 786,
+// SI_CHUSEOK_WEDNESDAY = 787,
+// SI_CHUSEOK_THURSDAY = 788,
+// SI_CHUSEOK_FRIDAY = 789,
+// SI_CHUSEOK_WEEKEND = 790,
+// SI_ALL_LIGHTGUARD = 791,
+// SI_ALL_LIGHTGUARD_COOL_TIME = 792,
+// SI_MTF_MHP = 793,
+// SI_MTF_MSP = 794,
+// SI_MTF_PUMPKIN = 795,
+// SI_MTF_HITFLEE = 796,
+// SI_MTF_CRIDAMAGE2 = 797,
+// SI_MTF_SPDRAIN = 798,
+// SI_ACUO_MINT_GUM = 799,
+// ...
+// SI_GUILD_STORAGE = 810,
+// ...
+// SI_JUMPINGCLAN = 815,
+// ...
+// SI_MTF_RANGEATK2 = 818,
+// SI_MTF_ASPD2 = 819,
+// SI_MTF_MATK2 = 820,
+
SI_MAX,
};
// JOINTBEAT stackable ailments
@@ -1500,6 +1571,7 @@ enum e_mode
MD_CHANGETARGET_MELEE = 0x1000,
MD_CHANGETARGET_CHASE = 0x2000,
MD_TARGETWEAK = 0x4000,
+ MD_RANDOMTARGET = 0x8000,
MD_MASK = 0xFFFF,
};
@@ -1694,7 +1766,7 @@ struct status_data {
speed,
amotion, adelay, dmotion,
mode;
- short
+ short
hit, flee, cri, flee2,
def2, mdef2,
#ifdef RENEWAL_ASPD
@@ -1863,7 +1935,7 @@ struct s_refine_info {
};
/*=====================================
-* Interface : status.h
+* Interface : status.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
@@ -1878,11 +1950,7 @@ struct status_interface {
int hp_coefficient2[CLASS_COUNT];
int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1];
int sp_coefficient[CLASS_COUNT];
-#ifdef RENEWAL_ASPD
- int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1];
-#else
- int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89]
-#endif
+ int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD
sc_type Skill2SCTable[MAX_SKILL]; // skill -> status
int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated)
unsigned int ChangeFlagTable[SC_MAX]; // status -> flags
@@ -1971,6 +2039,7 @@ struct status_interface {
int (*get_total_mdef) (struct block_list *src);
int (*get_total_def) (struct block_list *src);
int (*get_matk) (struct block_list *src, int flag);
+ void (*update_matk) ( struct block_list *bl );
int (*readdb) (void);
void (*initChangeTables) (void);
@@ -2020,4 +2089,4 @@ struct status_interface *status;
void status_defaults(void);
-#endif /* _MAP_STATUS_H_ */
+#endif /* MAP_STATUS_H */
diff --git a/src/map/storage.c b/src/map/storage.c
index e65ed7b80..217f14a3a 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -2,38 +2,39 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/nullpo.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
+#define HERCULES_CORE
-#include "map.h" // struct map_session_data
#include "storage.h"
-#include "chrif.h"
-#include "itemdb.h"
-#include "clif.h"
-#include "intif.h"
-#include "pc.h"
-#include "guild.h"
-#include "battle.h"
-#include "atcommand.h"
-#include "log.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "atcommand.h"
+#include "battle.h"
+#include "chrif.h"
+#include "clif.h"
+#include "guild.h"
+#include "intif.h"
+#include "itemdb.h"
+#include "log.h"
+#include "map.h" // struct map_session_data
+#include "pc.h"
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+
struct storage_interface storage_s;
struct guild_storage_interface gstorage_s;
/*==========================================
* Sort items in the warehouse
*------------------------------------------*/
-int storage_comp_item(const void *_i1, const void *_i2)
+int storage_comp_item(const void *i1_, const void *i2_)
{
- struct item *i1 = (struct item *)_i1;
- struct item *i2 = (struct item *)_i2;
+ struct item *i1 = (struct item *)i1_;
+ struct item *i2 = (struct item *)i2_;
if (i1->nameid == i2->nameid)
return 0;
@@ -542,7 +543,7 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount)
* @index : storage idx
* return
* 0 : fail
-* 1 : succes
+* 1 : success
*------------------------------------------*/
int storage_guild_storageget(struct map_session_data* sd, int index, int amount)
{
@@ -583,7 +584,7 @@ int storage_guild_storageget(struct map_session_data* sd, int index, int amount)
* @index : cart inventory idx
* return
* 0 : fail
-* 1 : succes
+* 1 : success
*------------------------------------------*/
int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int amount)
{
@@ -615,7 +616,7 @@ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int
* @index : storage idx
* return
* 0 : fail
-* 1 : succes
+* 1 : success
*------------------------------------------*/
int storage_guild_storagegettocart(struct map_session_data* sd, int index, int amount)
{
@@ -646,7 +647,7 @@ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int a
* Request to save guild storage
* return
* 0 : fail (no storage)
-* 1 : succes
+* 1 : success
*------------------------------------------*/
int storage_guild_storagesave(int account_id, int guild_id, int flag)
{
@@ -667,7 +668,7 @@ int storage_guild_storagesave(int account_id, int guild_id, int flag)
* ACK save of guild storage
* return
* 0 : fail (no storage)
-* 1 : succes
+* 1 : success
*------------------------------------------*/
int storage_guild_storagesaved(int guild_id)
{
diff --git a/src/map/storage.h b/src/map/storage.h
index 8f9f904f6..186f21263 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -2,14 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_STORAGE_H_
-#define _MAP_STORAGE_H_
+#ifndef MAP_STORAGE_H
+#define MAP_STORAGE_H
+
+#include "../common/cbasetypes.h"
+#include "../common/db.h"
-struct storage_data;
struct guild_storage;
struct item;
struct map_session_data;
-struct DBMap;
struct storage_interface {
/* */
@@ -24,7 +25,7 @@ struct storage_interface {
int (*gettocart) (struct map_session_data *sd,int index,int amount);
void (*close) (struct map_session_data *sd);
void (*pc_quit) (struct map_session_data *sd, int flag);
- int (*comp_item) (const void *_i1, const void *_i2);
+ int (*comp_item) (const void *i1_, const void *i2_);
void (*sortitem) (struct item* items, unsigned int size);
int (*reconnect_sub) (DBKey key, DBData *data, va_list ap);
};
@@ -59,4 +60,4 @@ struct guild_storage_interface *gstorage;
void storage_defaults(void);
void gstorage_defaults(void);
-#endif /* _MAP_STORAGE_H_ */
+#endif /* MAP_STORAGE_H */
diff --git a/src/map/trade.c b/src/map/trade.c
index 44b669ebd..3bbb73568 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -2,25 +2,27 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/nullpo.h"
-#include "../common/socket.h"
+#define HERCULES_CORE
#include "trade.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include "atcommand.h"
+#include "battle.h"
+#include "chrif.h"
#include "clif.h"
+#include "intif.h"
#include "itemdb.h"
+#include "log.h"
#include "map.h"
+#include "npc.h"
#include "path.h"
#include "pc.h"
-#include "npc.h"
-#include "battle.h"
-#include "chrif.h"
#include "storage.h"
-#include "intif.h"
-#include "atcommand.h"
-#include "log.h"
-
-#include <stdio.h>
-#include <string.h>
+#include "../common/nullpo.h"
+#include "../common/socket.h"
struct trade_interface trade_s;
@@ -59,7 +61,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta
if( previous_sd ){
previous_sd->trade_partner = 0;
clif->tradecancelled(previous_sd);
- } // Once cancelled then continue to the new one.
+ } // Once canceled then continue to the new one.
sd->trade_partner = 0;
clif->tradecancelled(sd);
}
@@ -164,11 +166,13 @@ void trade_tradeack(struct map_session_data *sd, int type) {
clif->tradestart(sd, type);
}
-/*==========================================
- * Check here hacker for duplicate item in trade
- * normal client refuse to have 2 same types of item (except equipment) in same trade window
- * normal client authorise only no equiped item and only from inventory
- *------------------------------------------*/
+/**
+ * Checks if an impossible trade will occur
+ * Normal clients refuse to have 2 items of the same type (except equipment) in the same trade window
+ * Normal clients authorize only no equipped items and only items from inventory
+ * @retval 0 The trade can continue
+ * @retval 1 Hack attempt
+ **/
int impossible_trade_check(struct map_session_data *sd)
{
struct item inventory[MAX_INVENTORY];
@@ -177,17 +181,15 @@ int impossible_trade_check(struct map_session_data *sd)
nullpo_retr(1, sd);
- if(sd->deal.zeny > sd->status.zeny) {
- pc_setglobalreg(sd,script->add_str("ZENY_HACKER"),1);
- return -1;
- }
+ if( sd->deal.zeny > sd->status.zeny )
+ return 1;
// get inventory of player
memcpy(&inventory, &sd->status.inventory, sizeof(struct item) * MAX_INVENTORY);
- // remove this part: arrows can be trade and equiped
+ // remove this part: arrows can be trade and equipped
// re-added! [celest]
- // remove equiped items (they can not be trade)
+ // remove equipped items (they can not be trade)
for (i = 0; i < MAX_INVENTORY; i++)
if (inventory[i].nameid > 0 && inventory[i].equip && !(inventory[i].equip & EQP_AMMO))
memset(&inventory[i], 0, sizeof(struct item));
@@ -455,7 +457,7 @@ void trade_tradeok(struct map_session_data *sd) {
}
/*==========================================
- * 'Cancel' is pressed. (or trade was force-cancelled by the code)
+ * 'Cancel' is pressed. (or trade was force-canceled by the code)
*------------------------------------------*/
void trade_tradecancel(struct map_session_data *sd) {
struct map_session_data *target_sd;
@@ -464,7 +466,7 @@ void trade_tradecancel(struct map_session_data *sd) {
target_sd = map->id2sd(sd->trade_partner);
if(!sd->state.trading)
- { // Not trade acepted
+ { // Not trade accepted
if( target_sd ) {
target_sd->trade_partner = 0;
clif->tradecancelled(target_sd);
diff --git a/src/map/trade.h b/src/map/trade.h
index f2c0d4622..f91ccd4a2 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_TRADE_H_
-#define _MAP_TRADE_H_
+#ifndef MAP_TRADE_H
+#define MAP_TRADE_H
//Max distance from traders to enable a trade to take place.
//TODO: battle_config candidate?
@@ -27,4 +27,4 @@ struct trade_interface *trade;
void trade_defaults(void);
-#endif /* _MAP_TRADE_H_ */
+#endif /* MAP_TRADE_H */
diff --git a/src/map/unit.c b/src/map/unit.c
index 39fff0eab..78a85ba3e 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -2,45 +2,48 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/showmsg.h"
-#include "../common/timer.h"
-#include "../common/nullpo.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/random.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
+#include "../config/core.h" // RENEWAL_CAST
+#include "unit.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "battle.h"
+#include "battleground.h"
+#include "chat.h"
+#include "chrif.h"
+#include "clif.h"
+#include "duel.h"
+#include "elemental.h"
+#include "guild.h"
+#include "homunculus.h"
+#include "instance.h"
+#include "intif.h"
#include "map.h"
+#include "mercenary.h"
+#include "mob.h"
+#include "npc.h"
+#include "party.h"
#include "path.h"
#include "pc.h"
-#include "mob.h"
#include "pet.h"
-#include "homunculus.h"
-#include "instance.h"
-#include "mercenary.h"
-#include "elemental.h"
+#include "script.h"
#include "skill.h"
-#include "clif.h"
-#include "duel.h"
-#include "npc.h"
-#include "guild.h"
#include "status.h"
-#include "unit.h"
-#include "battle.h"
-#include "battleground.h"
-#include "chat.h"
+#include "storage.h"
#include "trade.h"
#include "vending.h"
-#include "party.h"
-#include "intif.h"
-#include "chrif.h"
-#include "script.h"
-#include "storage.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include "../common/HPM.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
const short dirx[8]={0,-1,-1,-1,0,1,1,1};
const short diry[8]={1,1,0,-1,-1,-1,0,1};
@@ -241,7 +244,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
{
if (!(ud->skill_id == NPC_SELFDESTRUCTION && ud->skilltimer != INVALID_TIMER))
{ //Skill used, abort walking
- clif->fixpos(bl); //Fix position as walk has been cancelled.
+ clif->fixpos(bl); //Fix position as walk has been canceled.
return 0;
}
//Resend walk packet for proper Self Destruction display.
@@ -289,7 +292,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
clif->move(ud);
} else if(ud->state.running) {
//Keep trying to run.
- if ( !(unit->run(bl) || unit->wugdash(bl,sd)) )
+ if ( !(unit->run(bl, NULL, SC_RUN) || unit->run(bl, sd, SC_WUGDASH)) )
ud->state.running = 0;
} else if (ud->target_to) {
//Update target trajectory.
@@ -377,8 +380,12 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
unit->set_target(ud, 0);
sc = status->get_sc(bl);
- if (sc && (sc->data[SC_CONFUSION] || sc->data[SC__CHAOS])) //Randomize the target position
- map->random_dir(bl, &ud->to_x, &ud->to_y);
+ if( sc ) {
+ if( sc->data[SC_CONFUSION] || sc->data[SC__CHAOS] ) //Randomize the target position
+ map->random_dir(bl, &ud->to_x, &ud->to_y);
+ if( sc->data[SC_COMBOATTACK] )
+ status_change_end(bl, SC_COMBOATTACK, INVALID_TIMER);
+ }
if(ud->walktimer != INVALID_TIMER) {
// When you come to the center of the grid because the change of destination while you're walking right now
@@ -479,137 +486,95 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int
return 0;
}
-int unit_run(struct block_list *bl) {
- struct status_change *sc = status->get_sc(bl);
- short to_x,to_y,dir_x,dir_y;
- int lv;
- int i;
-
- if (!(sc && sc->data[SC_RUN]))
- return 0;
-
- if (!unit->can_move(bl)) {
- status_change_end(bl, SC_RUN, INVALID_TIMER);
- return 0;
- }
-
- lv = sc->data[SC_RUN]->val1;
- dir_x = dirx[sc->data[SC_RUN]->val2];
- dir_y = diry[sc->data[SC_RUN]->val2];
- // determine destination cell
- to_x = bl->x;
- to_y = bl->y;
- for(i=0;i<AREA_SIZE;i++) {
- if(!map->getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
- break;
-
- //if sprinting and there's a PC/Mob/NPC, block the path [Kevin]
- if(sc->data[SC_RUN] && map->count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC))
- break;
-
- to_x += dir_x;
- to_y += dir_y;
- }
+/**
+ * Called by unit_run when an object was hit
+ * @param sd Required only when using SC_WUGDASH
+ **/
+void unit_run_hit( struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type ) {
+ int lv = sc->data[type]->val1;
- if( (to_x == bl->x && to_y == bl->y ) || (to_x == (bl->x+1) || to_y == (bl->y+1)) || (to_x == (bl->x-1) || to_y == (bl->y-1))) {
- //If you can't run forward, you must be next to a wall, so bounce back. [Skotlex]
+ //If you can't run forward, you must be next to a wall, so bounce back. [Skotlex]
+ if( type == SC_RUN )
clif->sc_load(bl,bl->id,AREA,SI_TING,0,0,0);
- //Set running to 0 beforehand so status_change_end knows not to enable spurt [Kevin]
- unit->bl2ud(bl)->state.running = 0;
- status_change_end(bl, SC_RUN, INVALID_TIMER);
+ //Set running to 0 beforehand so status_change_end knows not to enable spurt [Kevin]
+ unit->bl2ud(bl)->state.running = 0;
+ status_change_end(bl, type, INVALID_TIMER);
+ if( type == SC_RUN ) {
skill->blown(bl,bl,skill->get_blewcount(TK_RUN,lv),unit->getdir(bl),0);
clif->fixpos(bl); //Why is a clif->slide (skill->blown) AND a fixpos needed? Ask Aegis.
clif->sc_end(bl,bl->id,AREA,SI_TING);
- return 0;
- }
- if (unit->walktoxy(bl, to_x, to_y, 1))
- return 1;
- //There must be an obstacle nearby. Attempt walking one cell at a time.
- do {
- to_x -= dir_x;
- to_y -= dir_y;
- } while (--i > 0 && !unit->walktoxy(bl, to_x, to_y, 1));
- if ( i == 0 ) {
- // copy-paste from above
- clif->sc_load(bl,bl->id,AREA,SI_TING,0,0,0);
-
- //Set running to 0 beforehand so status_change_end knows not to enable spurt [Kevin]
- unit->bl2ud(bl)->state.running = 0;
- status_change_end(bl, SC_RUN, INVALID_TIMER);
-
- skill->blown(bl,bl,skill->get_blewcount(TK_RUN,lv),unit->getdir(bl),0);
+ } else if( sd ) {
clif->fixpos(bl);
- clif->sc_end(bl,bl->id,AREA,SI_TING);
- return 0;
+ skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, timer->gettick(), SD_LEVEL);
}
- return 1;
+ return;
}
-//Exclusive function to Wug Dash state. [Jobbie/3CeAM]
-int unit_wugdash(struct block_list *bl, struct map_session_data *sd) {
- struct status_change *sc = status->get_sc(bl);
+/**
+ * Makes character run, used for SC_RUN and SC_WUGDASH
+ * @param sd Required only when using SC_WUGDASH
+ * @retval true Finished running
+ * @retval false Hit an object/Couldn't run
+ **/
+bool unit_run( struct block_list *bl, struct map_session_data *sd, enum sc_type type ) {
+ struct status_change *sc;
short to_x,to_y,dir_x,dir_y;
- int lv;
int i;
- if (!(sc && sc->data[SC_WUGDASH]))
- return 0;
- nullpo_ret(sd);
- nullpo_ret(bl);
+ nullpo_retr(false, bl);
+ sc = status->get_sc(bl);
- if (!unit->can_move(bl)) {
- status_change_end(bl,SC_WUGDASH,INVALID_TIMER);
- return 0;
+ if( !(sc && sc->data[type]) )
+ return false;
+
+ if( !unit->can_move(bl) ) {
+ status_change_end(bl, type, INVALID_TIMER);
+ return false;
}
- lv = sc->data[SC_WUGDASH]->val1;
- dir_x = dirx[sc->data[SC_WUGDASH]->val2];
- dir_y = diry[sc->data[SC_WUGDASH]->val2];
+ dir_x = dirx[sc->data[type]->val2];
+ dir_y = diry[sc->data[type]->val2];
+ // determine destination cell
to_x = bl->x;
to_y = bl->y;
- for(i=0;i<AREA_SIZE;i++) {
+
+ // Search for available path
+ for(i = 0; i < AREA_SIZE; i++) {
if(!map->getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
break;
- if(sc->data[SC_WUGDASH] && map->count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC))
+ //if sprinting and there's a PC/Mob/NPC, block the path [Kevin]
+ if( map->count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC) )
break;
to_x += dir_x;
to_y += dir_y;
}
- if(to_x == bl->x && to_y == bl->y) {
+ // Can't run forward
+ if( (to_x == bl->x && to_y == bl->y ) || (to_x == (bl->x+1) || to_y == (bl->y+1)) || (to_x == (bl->x-1) || to_y == (bl->y-1))) {
+ unit->run_hit(bl, sc, sd, type);
+ return false;
+ }
- unit->bl2ud(bl)->state.running = 0;
- status_change_end(bl,SC_WUGDASH,INVALID_TIMER);
+ if( unit->walktoxy(bl, to_x, to_y, 1) )
+ return true;
- if( sd ){
- clif->fixpos(bl);
- skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, timer->gettick(), SD_LEVEL);
- }
- return 0;
- }
- if (unit->walktoxy(bl, to_x, to_y, 1))
- return 1;
+ //There must be an obstacle nearby. Attempt walking one cell at a time.
do {
to_x -= dir_x;
to_y -= dir_y;
} while (--i > 0 && !unit->walktoxy(bl, to_x, to_y, 1));
- if (i==0) {
-
- unit->bl2ud(bl)->state.running = 0;
- status_change_end(bl,SC_WUGDASH,INVALID_TIMER);
- if( sd ){
- clif->fixpos(bl);
- skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, timer->gettick(), SD_LEVEL);
- }
- return 0;
+ if ( i == 0 ) {
+ unit->run_hit(bl, sc, sd, type);
+ return false;
}
+
return 1;
}
@@ -866,7 +831,7 @@ int unit_stop_walking(struct block_list *bl,int type)
return 0;
//NOTE: We are using timer data after deleting it because we know the
//timer->delete function does not messes with it. If the function's
- //behaviour changes in the future, this code could break!
+ //behavior changes in the future, this code could break!
td = timer->get(ud->walktimer);
timer->delete(ud->walktimer, unit->walktoxy_timer);
ud->walktimer = INVALID_TIMER;
@@ -889,7 +854,7 @@ int unit_stop_walking(struct block_list *bl,int type)
if(bl->type == BL_PET && type&~0xff)
ud->canmove_tick = timer->gettick() + (type>>8);
- //Readded, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin]
+ //Read, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin]
if (ud->state.running) {
status_change_end(bl, SC_RUN, INVALID_TIMER);
status_change_end(bl, SC_WUGDASH, INVALID_TIMER);
@@ -944,6 +909,7 @@ int unit_can_move(struct block_list *bl) {
))
return 0; //Can't move
+ // Status changes that block movement
if (sc) {
if( sc->count
&& (
@@ -955,6 +921,7 @@ int unit_can_move(struct block_list *bl) {
|| (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF) // cannot move while gospel is in effect
|| (sc->data[SC_BASILICA] && sc->data[SC_BASILICA]->val4 == bl->id) // Basilica caster cannot move
|| sc->data[SC_STOP]
+ || sc->data[SC_FALLENEMPIRE]
|| sc->data[SC_RG_CCONFINE_M]
|| sc->data[SC_RG_CCONFINE_S]
|| sc->data[SC_GS_MADNESSCANCEL]
@@ -1100,7 +1067,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
) {
if (sc->data[SC_COMBOATTACK]->val2)
target_id = sc->data[SC_COMBOATTACK]->val2;
- else
+ else if( skill->get_inf(skill_id) != 1 ) // Only non-targetable skills should use auto target
target_id = ud->target;
if( skill->get_inf(skill_id)&INF_SELF_SKILL && skill->get_nk(skill_id)&NK_NO_DAMAGE )// exploit fix
@@ -1177,8 +1144,8 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
if( (skill->get_inf2(skill_id)&INF2_ENSEMBLE_SKILL) && skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1 ) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
- return 0;
- }
+ return 0;
+ }
switch(skill_id){
case SA_CASTCANCEL:
@@ -1247,7 +1214,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
if (!temp) //Stop attack on non-combo skills [Skotlex]
unit->stop_attack(src);
- else if(ud->attacktimer != INVALID_TIMER) //Elsewise, delay current attack sequence
+ else if(ud->attacktimer != INVALID_TIMER) //Else-wise, delay current attack sequence
ud->attackabletime = tick + status_get_adelay(src);
ud->state.skillcastcancel = castcancel;
@@ -1363,16 +1330,16 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
}
if(!ud->state.running) //need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026
- unit->stop_walking(src,1);// eventhough this is not how official works but this will do the trick. bugreport:6829
+ unit->stop_walking(src,1);// even though this is not how official works but this will do the trick. bugreport:6829
// in official this is triggered even if no cast time.
clif->skillcasting(src, src->id, target_id, 0,0, skill_id, skill->get_ele(skill_id, skill_lv), casttime);
if( casttime > 0 || temp )
- {
+ {
if (sd && target->type == BL_MOB)
{
TBL_MOB *md = (TBL_MOB*)target;
- mob->skill_event(md, src, tick, -1); //Cast targetted skill event.
+ mob->skill_event(md, src, tick, -1); //Cast targeted skill event.
if (tstatus->mode&(MD_CASTSENSOR_IDLE|MD_CASTSENSOR_CHASE) &&
battle->check_target(target, src, BCT_ENEMY) > 0)
{
@@ -1467,7 +1434,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui
if( skill->not_ok(skill_id, sd) || !skill->check_condition_castbegin(sd, skill_id, skill_lv) )
return 0;
/**
- * "WHY IS IT HEREE": pneuma cannot be cancelled past this point, the client displays the animation even,
+ * "WHY IS IT HEREE": pneuma cannot be canceled past this point, the client displays the animation even,
* if we cancel it from nodamage_id, so it has to be here for it to not display the animation.
**/
if( skill_id == AL_PNEUMA && map->getcell(src->m, skill_x, skill_y, CELL_CHKLANDPROTECTOR) ) {
@@ -1552,7 +1519,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui
if( casttime > 0 ) {
ud->skilltimer = timer->add( tick+casttime, skill->castend_pos, src->id, 0 );
if( (sd && pc->checkskill(sd,SA_FREECAST) > 0) || skill_id == LG_EXEEDBREAK)
- status_calc_bl(&sd->bl, SCB_SPEED);
+ status_calc_bl(&sd->bl, SCB_SPEED);
} else {
ud->skilltimer = INVALID_TIMER;
skill->castend_pos(ud->skilltimer,tick,src->id,0);
@@ -1637,6 +1604,10 @@ int unit_attack(struct block_list *src,int target_id,int continuous) {
unit->stop_attack(src);
return 0;
}
+ if( !pc->can_attack(sd, target_id) ) {
+ unit->stop_attack(src);
+ return 0;
+ }
}
if( battle->check_target(src,target,BCT_ENEMY) <= 0 || !status->check_skilluse(src, target, 0, 0) ) {
unit->unattackable(src);
@@ -1645,7 +1616,7 @@ int unit_attack(struct block_list *src,int target_id,int continuous) {
ud->state.attack_continue = continuous;
unit->set_target(ud, target_id);
- if (continuous) //If you're to attack continously, set to auto-case character
+ if (continuous) //If you're to attack continuously, set to auto-case character
ud->chaserange = status_get_range(src);
//Just change target/type. [Skotlex]
@@ -1826,6 +1797,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) {
#ifdef OFFICIAL_WALKPATH
|| !path->search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL)
#endif
+ || (sd && !pc->can_attack(sd, ud->target) )
)
return 0; // can't attack under these conditions
@@ -1935,7 +1907,7 @@ int unit_attack_timer(int tid, int64 tick, int id, intptr_t data) {
/*==========================================
* Cancels an ongoing skill cast.
* flag&1: Cast-Cancel invoked.
- * flag&2: Cancel only if skill is cancellable.
+ * flag&2: Cancel only if skill is can be cancel.
*------------------------------------------*/
int unit_skillcastcancel(struct block_list *bl,int type)
{
@@ -1951,7 +1923,7 @@ int unit_skillcastcancel(struct block_list *bl,int type)
sd = BL_CAST(BL_PC, bl);
if (type&2) {
- //See if it can be cancelled.
+ //See if it can be canceled.
if (!ud->state.skillcastcancel)
return 0;
@@ -2054,7 +2026,7 @@ int unit_changeviewsize(struct block_list *bl,short size)
/*==========================================
* Removes a bl/ud from the map.
* Returns 1 on success. 0 if it couldn't be removed or the bl was free'd
- * if clrtype is 1 (death), appropiate cleanup is performed.
+ * if clrtype is 1 (death), appropriate cleanup is performed.
* Otherwise it is assumed bl is being warped.
* On-Kill specific stuff is not performed here, look at status->damage for that.
*------------------------------------------*/
@@ -2138,11 +2110,14 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i
trade->cancel(sd);
buyingstore->close(sd);
searchstore->close(sd);
- if(sd->state.storage_flag == 1)
- storage->pc_quit(sd,0);
- else if (sd->state.storage_flag == 2)
- gstorage->pc_quit(sd,0);
- sd->state.storage_flag = 0; //Force close it when being warped.
+ if( sd->menuskill_id != AL_TELEPORT ) { // issue: 8027
+ if(sd->state.storage_flag == 1)
+ storage->pc_quit(sd,0);
+ else if (sd->state.storage_flag == 2)
+ gstorage->pc_quit(sd,0);
+
+ sd->state.storage_flag = 0; //Force close it when being warped.
+ }
if(sd->party_invite>0)
party->reply_invite(sd,sd->party_invite,0);
if(sd->guild_invite>0)
@@ -2610,7 +2585,7 @@ void unit_defaults(void) {
unit->walktobl_sub = unit_walktobl_sub;
unit->walktobl = unit_walktobl;
unit->run = unit_run;
- unit->wugdash = unit_wugdash;
+ unit->run_hit = unit_run_hit;
unit->escape = unit_escape;
unit->movepos = unit_movepos;
unit->setdir = unit_setdir;
diff --git a/src/map/unit.h b/src/map/unit.h
index 33fa4e052..9b95bae41 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -2,18 +2,16 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_UNIT_H_
-#define _MAP_UNIT_H_
-
-//#include "map.h"
-struct block_list;
-struct unit_data;
-struct map_session_data;
+#ifndef MAP_UNIT_H
+#define MAP_UNIT_H
#include "clif.h" // clr_type
-#include "map.h" // struct block_list
#include "path.h" // struct walkpath_data
-#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset
+#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset
+#include "../common/cbasetypes.h"
+
+struct map_session_data;
+struct block_list;
struct unit_data {
struct block_list *bl;
@@ -85,8 +83,8 @@ struct unit_interface {
int (*walktoxy) (struct block_list *bl, short x, short y, int flag);
int (*walktobl_sub) (int tid, int64 tick, int id, intptr_t data);
int (*walktobl) (struct block_list *bl, struct block_list *tbl, int range, int flag);
- int (*run) (struct block_list *bl);
- int (*wugdash) (struct block_list *bl, struct map_session_data *sd);
+ bool (*run) (struct block_list *bl, struct map_session_data *sd, enum sc_type type);
+ void (*run_hit) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type);
int (*escape) (struct block_list *bl, struct block_list *target, short dist);
int (*movepos) (struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath);
int (*setdir) (struct block_list *bl, unsigned char dir);
@@ -126,4 +124,4 @@ struct unit_interface *unit;
void unit_defaults(void);
-#endif /* _MAP_UNIT_H_ */
+#endif /* MAP_UNIT_H */
diff --git a/src/map/vending.c b/src/map/vending.c
index 9462975b3..7e9393bf2 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -2,24 +2,27 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/nullpo.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
+#define HERCULES_CORE
+
+#include "vending.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include "atcommand.h"
+#include "battle.h"
+#include "chrif.h"
#include "clif.h"
#include "itemdb.h"
-#include "atcommand.h"
+#include "log.h"
#include "map.h"
+#include "npc.h"
#include "path.h"
-#include "chrif.h"
-#include "vending.h"
#include "pc.h"
-#include "npc.h"
#include "skill.h"
-#include "battle.h"
-#include "log.h"
-
-#include <stdio.h>
-#include <string.h>
+#include "../common/nullpo.h"
+#include "../common/strlib.h"
+#include "../common/utils.h"
struct vending_interface vending_s;
@@ -57,7 +60,7 @@ void vending_vendinglistreq(struct map_session_data* sd, unsigned int id) {
// GM is not allowed to trade
clif->message(sd->fd, msg_txt(246));
return;
- }
+ }
sd->vended_id = vsd->vender_id; // register vending uid
diff --git a/src/map/vending.h b/src/map/vending.h
index b2ba22955..63cb632a9 100644
--- a/src/map/vending.h
+++ b/src/map/vending.h
@@ -2,18 +2,19 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_VENDING_H_
-#define _MAP_VENDING_H_
+#ifndef MAP_VENDING_H
+#define MAP_VENDING_H
#include "../common/cbasetypes.h"
#include "../common/db.h"
+
struct map_session_data;
struct s_search_store_search;
struct s_vending {
short index; //cart index (return item data)
- short amount; //amout of the item for vending
- unsigned int value; //at wich price
+ short amount; //amount of the item for vending
+ unsigned int value; //at which price
};
struct vending_interface {
@@ -35,4 +36,4 @@ struct vending_interface *vending;
void vending_defaults(void);
-#endif /* _MAP_VENDING_H_ */
+#endif /* MAP_VENDING_H */
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
deleted file mode 100644
index e3043a668..000000000
--- a/src/plugins/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# setup
-#
-get_property( CAN_BUILD_SHARED_LIBS GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS )
-if( NOT CAN_BUILD_SHARED_LIBS )
- return()
-endif()
-
-#
-# sample
-#
-option( BUILD_PLUGIN_sample "build sample plugin" OFF )
-if( BUILD_PLUGIN_sample )
-message( STATUS "Creating target sample" )
-set( SAMPLE_SOURCES
- "${CMAKE_CURRENT_SOURCE_DIR}/sample.c"
- )
-set( LIBRARIES ${GLOBAL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
-set( DEFINITIONS ${GLOBAL_DEFINITIONS} )
-set( SOURCE_FILES ${SAMPLE_SOURCES} )
-source_group( sample FILES ${SAMPLE_SOURCES} )
-include_directories( ${INCLUDE_DIRS} )
-add_library( sample SHARED ${SOURCE_FILES} )
-target_link_libraries( sample ${LIBRARIES} )
-set_target_properties( sample PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-set_target_properties( sample PROPERTIES PREFIX "" )
-if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_sample DESCRIPTION "sample plugin" DISPLAY_NAME "sample" GROUP Runtime )
- install( TARGETS sample
- DESTINATION "plugins"
- COMPONENT Runtime_sample )
-endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} sample CACHE INTERNAL "" )
-message( STATUS "Creating target sample - done" )
-endif( BUILD_PLUGIN_sample )
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index e6e698383..46792b268 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -3,48 +3,47 @@
// Sample Hercules Plugin
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
#include "../common/HPMi.h"
+#include "../common/db.h"
+#include "../common/malloc.h"
#include "../common/mmo.h"
#include "../common/socket.h"
-#include "../common/malloc.h"
-#include "../common/db.h"
-
-#include "../map/map.h"
-#include "../map/path.h"
+#include "../map/atcommand.h"
+#include "../map/battle.h"
+#include "../map/battleground.h"
+#include "../map/chat.h"
#include "../map/chrif.h"
#include "../map/clif.h"
#include "../map/duel.h"
+#include "../map/elemental.h"
+#include "../map/guild.h"
+#include "../map/homunculus.h"
+#include "../map/instance.h"
#include "../map/intif.h"
+#include "../map/irc-bot.h"
+#include "../map/itemdb.h"
+#include "../map/log.h"
+#include "../map/mail.h"
+#include "../map/map.h"
+#include "../map/mapreg.h"
+#include "../map/mercenary.h"
+#include "../map/mob.h"
+#include "../map/npc.h"
#include "../map/npc.h"
+#include "../map/party.h"
+#include "../map/path.h"
#include "../map/pc.h"
+#include "../map/pet.h"
+#include "../map/quest.h"
+#include "../map/script.h"
+#include "../map/skill.h"
#include "../map/status.h"
-#include "../map/mob.h"
-#include "../map/npc.h"
-#include "../map/chat.h"
-#include "../map/itemdb.h"
#include "../map/storage.h"
-#include "../map/skill.h"
#include "../map/trade.h"
-#include "../map/party.h"
#include "../map/unit.h"
-#include "../map/battle.h"
-#include "../map/battleground.h"
-#include "../map/quest.h"
-#include "../map/script.h"
-#include "../map/mapreg.h"
-#include "../map/guild.h"
-#include "../map/pet.h"
-#include "../map/homunculus.h"
-#include "../map/instance.h"
-#include "../map/mercenary.h"
-#include "../map/elemental.h"
-#include "../map/atcommand.h"
-#include "../map/log.h"
-#include "../map/mail.h"
-#include "../map/irc-bot.h"
#include "../common/HPMDataCheck.h"
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 3827f3e84..d73525b70 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -597,6 +597,8 @@ struct {
struct HPMHookPoint *HP_clif_standing_post;
struct HPMHookPoint *HP_clif_arrow_create_list_pre;
struct HPMHookPoint *HP_clif_arrow_create_list_post;
+ struct HPMHookPoint *HP_clif_refresh_storagewindow_pre;
+ struct HPMHookPoint *HP_clif_refresh_storagewindow_post;
struct HPMHookPoint *HP_clif_refresh_pre;
struct HPMHookPoint *HP_clif_refresh_post;
struct HPMHookPoint *HP_clif_fame_blacksmith_pre;
@@ -2123,6 +2125,8 @@ struct {
struct HPMHookPoint *HP_homun_addspiritball_post;
struct HPMHookPoint *HP_homun_delspiritball_pre;
struct HPMHookPoint *HP_homun_delspiritball_post;
+ struct HPMHookPoint *HP_homun_get_intimacy_grade_pre;
+ struct HPMHookPoint *HP_homun_get_intimacy_grade_post;
struct HPMHookPoint *HP_instance_init_pre;
struct HPMHookPoint *HP_instance_init_post;
struct HPMHookPoint *HP_instance_final_pre;
@@ -2537,18 +2541,6 @@ struct {
struct HPMHookPoint *HP_itemdb_isidentified_post;
struct HPMHookPoint *HP_itemdb_isidentified2_pre;
struct HPMHookPoint *HP_itemdb_isidentified2_post;
- struct HPMHookPoint *HP_itemdb_read_itemavail_pre;
- struct HPMHookPoint *HP_itemdb_read_itemavail_post;
- struct HPMHookPoint *HP_itemdb_read_itemtrade_pre;
- struct HPMHookPoint *HP_itemdb_read_itemtrade_post;
- struct HPMHookPoint *HP_itemdb_read_itemdelay_pre;
- struct HPMHookPoint *HP_itemdb_read_itemdelay_post;
- struct HPMHookPoint *HP_itemdb_read_stack_pre;
- struct HPMHookPoint *HP_itemdb_read_stack_post;
- struct HPMHookPoint *HP_itemdb_read_buyingstore_pre;
- struct HPMHookPoint *HP_itemdb_read_buyingstore_post;
- struct HPMHookPoint *HP_itemdb_read_nouse_pre;
- struct HPMHookPoint *HP_itemdb_read_nouse_post;
struct HPMHookPoint *HP_itemdb_combo_split_atoi_pre;
struct HPMHookPoint *HP_itemdb_combo_split_atoi_post;
struct HPMHookPoint *HP_itemdb_read_combos_pre;
@@ -2567,8 +2559,6 @@ struct {
struct HPMHookPoint *HP_itemdb_readdb_sql_post;
struct HPMHookPoint *HP_itemdb_unique_id_pre;
struct HPMHookPoint *HP_itemdb_unique_id_post;
- struct HPMHookPoint *HP_itemdb_uid_load_pre;
- struct HPMHookPoint *HP_itemdb_uid_load_post;
struct HPMHookPoint *HP_itemdb_read_pre;
struct HPMHookPoint *HP_itemdb_read_post;
struct HPMHookPoint *HP_itemdb_destroy_item_data_pre;
@@ -2889,10 +2879,8 @@ struct {
struct HPMHookPoint *HP_map_versionscreen_post;
struct HPMHookPoint *HP_map_arg_next_value_pre;
struct HPMHookPoint *HP_map_arg_next_value_post;
- struct HPMHookPoint *HP_map_addblcell_pre;
- struct HPMHookPoint *HP_map_addblcell_post;
- struct HPMHookPoint *HP_map_delblcell_pre;
- struct HPMHookPoint *HP_map_delblcell_post;
+ struct HPMHookPoint *HP_map_update_cell_bl_pre;
+ struct HPMHookPoint *HP_map_update_cell_bl_post;
struct HPMHookPoint *HP_map_get_new_bonus_id_pre;
struct HPMHookPoint *HP_map_get_new_bonus_id_post;
struct HPMHookPoint *HP_map_add_questinfo_pre;
@@ -3517,6 +3505,10 @@ struct {
struct HPMHookPoint *HP_pc_can_give_items_post;
struct HPMHookPoint *HP_pc_can_give_bound_items_pre;
struct HPMHookPoint *HP_pc_can_give_bound_items_post;
+ struct HPMHookPoint *HP_pc_can_talk_pre;
+ struct HPMHookPoint *HP_pc_can_talk_post;
+ struct HPMHookPoint *HP_pc_can_attack_pre;
+ struct HPMHookPoint *HP_pc_can_attack_post;
struct HPMHookPoint *HP_pc_can_use_command_pre;
struct HPMHookPoint *HP_pc_can_use_command_post;
struct HPMHookPoint *HP_pc_set_group_pre;
@@ -4491,6 +4483,10 @@ struct {
struct HPMHookPoint *HP_skill_calc_heal_post;
struct HPMHookPoint *HP_skill_check_cloaking_pre;
struct HPMHookPoint *HP_skill_check_cloaking_post;
+ struct HPMHookPoint *HP_skill_check_cloaking_end_pre;
+ struct HPMHookPoint *HP_skill_check_cloaking_end_post;
+ struct HPMHookPoint *HP_skill_can_cloak_pre;
+ struct HPMHookPoint *HP_skill_can_cloak_post;
struct HPMHookPoint *HP_skill_enchant_elemental_end_pre;
struct HPMHookPoint *HP_skill_enchant_elemental_end_post;
struct HPMHookPoint *HP_skill_not_ok_pre;
@@ -4805,6 +4801,8 @@ struct {
struct HPMHookPoint *HP_status_get_total_def_post;
struct HPMHookPoint *HP_status_get_matk_pre;
struct HPMHookPoint *HP_status_get_matk_post;
+ struct HPMHookPoint *HP_status_update_matk_pre;
+ struct HPMHookPoint *HP_status_update_matk_post;
struct HPMHookPoint *HP_status_readdb_pre;
struct HPMHookPoint *HP_status_readdb_post;
struct HPMHookPoint *HP_status_initChangeTables_pre;
@@ -4957,8 +4955,8 @@ struct {
struct HPMHookPoint *HP_unit_walktobl_post;
struct HPMHookPoint *HP_unit_run_pre;
struct HPMHookPoint *HP_unit_run_post;
- struct HPMHookPoint *HP_unit_wugdash_pre;
- struct HPMHookPoint *HP_unit_wugdash_post;
+ struct HPMHookPoint *HP_unit_run_hit_pre;
+ struct HPMHookPoint *HP_unit_run_hit_post;
struct HPMHookPoint *HP_unit_escape_pre;
struct HPMHookPoint *HP_unit_escape_post;
struct HPMHookPoint *HP_unit_movepos_pre;
@@ -5636,6 +5634,8 @@ struct {
int HP_clif_standing_post;
int HP_clif_arrow_create_list_pre;
int HP_clif_arrow_create_list_post;
+ int HP_clif_refresh_storagewindow_pre;
+ int HP_clif_refresh_storagewindow_post;
int HP_clif_refresh_pre;
int HP_clif_refresh_post;
int HP_clif_fame_blacksmith_pre;
@@ -7162,6 +7162,8 @@ struct {
int HP_homun_addspiritball_post;
int HP_homun_delspiritball_pre;
int HP_homun_delspiritball_post;
+ int HP_homun_get_intimacy_grade_pre;
+ int HP_homun_get_intimacy_grade_post;
int HP_instance_init_pre;
int HP_instance_init_post;
int HP_instance_final_pre;
@@ -7576,18 +7578,6 @@ struct {
int HP_itemdb_isidentified_post;
int HP_itemdb_isidentified2_pre;
int HP_itemdb_isidentified2_post;
- int HP_itemdb_read_itemavail_pre;
- int HP_itemdb_read_itemavail_post;
- int HP_itemdb_read_itemtrade_pre;
- int HP_itemdb_read_itemtrade_post;
- int HP_itemdb_read_itemdelay_pre;
- int HP_itemdb_read_itemdelay_post;
- int HP_itemdb_read_stack_pre;
- int HP_itemdb_read_stack_post;
- int HP_itemdb_read_buyingstore_pre;
- int HP_itemdb_read_buyingstore_post;
- int HP_itemdb_read_nouse_pre;
- int HP_itemdb_read_nouse_post;
int HP_itemdb_combo_split_atoi_pre;
int HP_itemdb_combo_split_atoi_post;
int HP_itemdb_read_combos_pre;
@@ -7606,8 +7596,6 @@ struct {
int HP_itemdb_readdb_sql_post;
int HP_itemdb_unique_id_pre;
int HP_itemdb_unique_id_post;
- int HP_itemdb_uid_load_pre;
- int HP_itemdb_uid_load_post;
int HP_itemdb_read_pre;
int HP_itemdb_read_post;
int HP_itemdb_destroy_item_data_pre;
@@ -7928,10 +7916,8 @@ struct {
int HP_map_versionscreen_post;
int HP_map_arg_next_value_pre;
int HP_map_arg_next_value_post;
- int HP_map_addblcell_pre;
- int HP_map_addblcell_post;
- int HP_map_delblcell_pre;
- int HP_map_delblcell_post;
+ int HP_map_update_cell_bl_pre;
+ int HP_map_update_cell_bl_post;
int HP_map_get_new_bonus_id_pre;
int HP_map_get_new_bonus_id_post;
int HP_map_add_questinfo_pre;
@@ -8556,6 +8542,10 @@ struct {
int HP_pc_can_give_items_post;
int HP_pc_can_give_bound_items_pre;
int HP_pc_can_give_bound_items_post;
+ int HP_pc_can_talk_pre;
+ int HP_pc_can_talk_post;
+ int HP_pc_can_attack_pre;
+ int HP_pc_can_attack_post;
int HP_pc_can_use_command_pre;
int HP_pc_can_use_command_post;
int HP_pc_set_group_pre;
@@ -9530,6 +9520,10 @@ struct {
int HP_skill_calc_heal_post;
int HP_skill_check_cloaking_pre;
int HP_skill_check_cloaking_post;
+ int HP_skill_check_cloaking_end_pre;
+ int HP_skill_check_cloaking_end_post;
+ int HP_skill_can_cloak_pre;
+ int HP_skill_can_cloak_post;
int HP_skill_enchant_elemental_end_pre;
int HP_skill_enchant_elemental_end_post;
int HP_skill_not_ok_pre;
@@ -9844,6 +9838,8 @@ struct {
int HP_status_get_total_def_post;
int HP_status_get_matk_pre;
int HP_status_get_matk_post;
+ int HP_status_update_matk_pre;
+ int HP_status_update_matk_post;
int HP_status_readdb_pre;
int HP_status_readdb_post;
int HP_status_initChangeTables_pre;
@@ -9996,8 +9992,8 @@ struct {
int HP_unit_walktobl_post;
int HP_unit_run_pre;
int HP_unit_run_post;
- int HP_unit_wugdash_pre;
- int HP_unit_wugdash_post;
+ int HP_unit_run_hit_pre;
+ int HP_unit_run_hit_post;
int HP_unit_escape_pre;
int HP_unit_escape_post;
int HP_unit_movepos_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 8693f6b0f..05d484d20 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -308,6 +308,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->sitting, HP_clif_sitting) },
{ HP_POP(clif->standing, HP_clif_standing) },
{ HP_POP(clif->arrow_create_list, HP_clif_arrow_create_list) },
+ { HP_POP(clif->refresh_storagewindow, HP_clif_refresh_storagewindow) },
{ HP_POP(clif->refresh, HP_clif_refresh) },
{ HP_POP(clif->fame_blacksmith, HP_clif_fame_blacksmith) },
{ HP_POP(clif->fame_alchemist, HP_clif_fame_alchemist) },
@@ -1076,6 +1077,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(homun->exp_db_read, HP_homun_exp_db_read) },
{ HP_POP(homun->addspiritball, HP_homun_addspiritball) },
{ HP_POP(homun->delspiritball, HP_homun_delspiritball) },
+ { HP_POP(homun->get_intimacy_grade, HP_homun_get_intimacy_grade) },
/* instance */
{ HP_POP(instance->init, HP_instance_init) },
{ HP_POP(instance->final, HP_instance_final) },
@@ -1287,12 +1289,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(itemdb->isrestricted, HP_itemdb_isrestricted) },
{ HP_POP(itemdb->isidentified, HP_itemdb_isidentified) },
{ HP_POP(itemdb->isidentified2, HP_itemdb_isidentified2) },
- { HP_POP(itemdb->read_itemavail, HP_itemdb_read_itemavail) },
- { HP_POP(itemdb->read_itemtrade, HP_itemdb_read_itemtrade) },
- { HP_POP(itemdb->read_itemdelay, HP_itemdb_read_itemdelay) },
- { HP_POP(itemdb->read_stack, HP_itemdb_read_stack) },
- { HP_POP(itemdb->read_buyingstore, HP_itemdb_read_buyingstore) },
- { HP_POP(itemdb->read_nouse, HP_itemdb_read_nouse) },
{ HP_POP(itemdb->combo_split_atoi, HP_itemdb_combo_split_atoi) },
{ HP_POP(itemdb->read_combos, HP_itemdb_read_combos) },
{ HP_POP(itemdb->gendercheck, HP_itemdb_gendercheck) },
@@ -1302,7 +1298,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(itemdb->readdb_libconfig, HP_itemdb_readdb_libconfig) },
{ HP_POP(itemdb->readdb_sql, HP_itemdb_readdb_sql) },
{ HP_POP(itemdb->unique_id, HP_itemdb_unique_id) },
- { HP_POP(itemdb->uid_load, HP_itemdb_uid_load) },
{ HP_POP(itemdb->read, HP_itemdb_read) },
{ HP_POP(itemdb->destroy_item_data, HP_itemdb_destroy_item_data) },
{ HP_POP(itemdb->final_sub, HP_itemdb_final_sub) },
@@ -1466,8 +1461,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->helpscreen, HP_map_helpscreen) },
{ HP_POP(map->versionscreen, HP_map_versionscreen) },
{ HP_POP(map->arg_next_value, HP_map_arg_next_value) },
- { HP_POP(map->addblcell, HP_map_addblcell) },
- { HP_POP(map->delblcell, HP_map_delblcell) },
+ { HP_POP(map->update_cell_bl, HP_map_update_cell_bl) },
{ HP_POP(map->get_new_bonus_id, HP_map_get_new_bonus_id) },
{ HP_POP(map->add_questinfo, HP_map_add_questinfo) },
{ HP_POP(map->remove_questinfo, HP_map_remove_questinfo) },
@@ -1789,6 +1783,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->class2idx, HP_pc_class2idx) },
{ HP_POP(pc->can_give_items, HP_pc_can_give_items) },
{ HP_POP(pc->can_give_bound_items, HP_pc_can_give_bound_items) },
+ { HP_POP(pc->can_talk, HP_pc_can_talk) },
+ { HP_POP(pc->can_attack, HP_pc_can_attack) },
{ HP_POP(pc->can_use_command, HP_pc_can_use_command) },
{ HP_POP(pc->set_group, HP_pc_set_group) },
{ HP_POP(pc->should_log_commands, HP_pc_should_log_commands) },
@@ -2281,6 +2277,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->autospell, HP_skill_autospell) },
{ HP_POP(skill->calc_heal, HP_skill_calc_heal) },
{ HP_POP(skill->check_cloaking, HP_skill_check_cloaking) },
+ { HP_POP(skill->check_cloaking_end, HP_skill_check_cloaking_end) },
+ { HP_POP(skill->can_cloak, HP_skill_can_cloak) },
{ HP_POP(skill->enchant_elemental_end, HP_skill_enchant_elemental_end) },
{ HP_POP(skill->not_ok, HP_skill_not_ok) },
{ HP_POP(skill->not_ok_hom, HP_skill_not_ok_hom) },
@@ -2439,6 +2437,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->get_total_mdef, HP_status_get_total_mdef) },
{ HP_POP(status->get_total_def, HP_status_get_total_def) },
{ HP_POP(status->get_matk, HP_status_get_matk) },
+ { HP_POP(status->update_matk, HP_status_update_matk) },
{ HP_POP(status->readdb, HP_status_readdb) },
{ HP_POP(status->initChangeTables, HP_status_initChangeTables) },
{ HP_POP(status->initDummyData, HP_status_initDummyData) },
@@ -2518,7 +2517,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(unit->walktobl_sub, HP_unit_walktobl_sub) },
{ HP_POP(unit->walktobl, HP_unit_walktobl) },
{ HP_POP(unit->run, HP_unit_run) },
- { HP_POP(unit->wugdash, HP_unit_wugdash) },
+ { HP_POP(unit->run_hit, HP_unit_run_hit) },
{ HP_POP(unit->escape, HP_unit_escape) },
{ HP_POP(unit->movepos, HP_unit_movepos) },
{ HP_POP(unit->setdir, HP_unit_setdir) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index f0932f518..8f209fe5c 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -9,6 +9,7 @@ void HP_atcommand_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -34,6 +35,7 @@ void HP_atcommand_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_final_pre[hIndex].func;
preHookFunc();
@@ -60,6 +62,7 @@ bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *me
bool retVal___ = false;
if( HPMHooks.count.HP_atcommand_exec_pre ) {
bool (*preHookFunc) (const int *fd, struct map_session_data *sd, const char *message, bool *player_invoked);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_exec_pre[hIndex].func;
retVal___ = preHookFunc(&fd, sd, message, &player_invoked);
@@ -86,6 +89,7 @@ bool HP_atcommand_create(char *name, AtCommandFunc func) {
bool retVal___ = false;
if( HPMHooks.count.HP_atcommand_create_pre ) {
bool (*preHookFunc) (char *name, AtCommandFunc *func);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_create_pre[hIndex].func;
retVal___ = preHookFunc(name, &func);
@@ -112,6 +116,7 @@ bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) {
bool retVal___ = false;
if( HPMHooks.count.HP_atcommand_can_use_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *command);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_can_use_pre[hIndex].func;
retVal___ = preHookFunc(sd, command);
@@ -138,6 +143,7 @@ bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtC
bool retVal___ = false;
if( HPMHooks.count.HP_atcommand_can_use2_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *command, AtCommandType *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_can_use2_pre[hIndex].func;
retVal___ = preHookFunc(sd, command, &type);
@@ -163,6 +169,7 @@ void HP_atcommand_load_groups(GroupSettings **groups, config_setting_t **command
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_load_groups_pre ) {
void (*preHookFunc) (GroupSettings **groups, config_setting_t **commands_, size_t *sz);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_load_groups_pre[hIndex].func;
preHookFunc(groups, commands_, &sz);
@@ -189,6 +196,7 @@ AtCommandInfo* HP_atcommand_exists(const char *name) {
AtCommandInfo* retVal___ = NULL;
if( HPMHooks.count.HP_atcommand_exists_pre ) {
AtCommandInfo* (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_exists_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -215,6 +223,7 @@ bool HP_atcommand_msg_read(const char *cfg_name, bool allow_override) {
bool retVal___ = false;
if( HPMHooks.count.HP_atcommand_msg_read_pre ) {
bool (*preHookFunc) (const char *cfg_name, bool *allow_override);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_msg_read_pre[hIndex].func;
retVal___ = preHookFunc(cfg_name, &allow_override);
@@ -240,6 +249,7 @@ void HP_atcommand_final_msg(void) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_final_msg_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_final_msg_pre[hIndex].func;
preHookFunc();
@@ -266,6 +276,7 @@ struct atcmd_binding_data* HP_atcommand_get_bind_byname(const char *name) {
struct atcmd_binding_data* retVal___ = NULL;
if( HPMHooks.count.HP_atcommand_get_bind_byname_pre ) {
struct atcmd_binding_data* (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_bind_byname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_get_bind_byname_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -292,6 +303,7 @@ AtCommandInfo* HP_atcommand_get_info_byname(const char *name) {
AtCommandInfo* retVal___ = NULL;
if( HPMHooks.count.HP_atcommand_get_info_byname_pre ) {
AtCommandInfo* (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_get_info_byname_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -318,6 +330,7 @@ const char* HP_atcommand_check_alias(const char *aliasname) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_atcommand_check_alias_pre ) {
const char* (*preHookFunc) (const char *aliasname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_check_alias_pre[hIndex].func;
retVal___ = preHookFunc(aliasname);
@@ -343,6 +356,7 @@ void HP_atcommand_get_suggestions(struct map_session_data *sd, const char *name,
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_get_suggestions_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *name, bool *is_atcmd_cmd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_suggestions_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_get_suggestions_pre[hIndex].func;
preHookFunc(sd, name, &is_atcmd_cmd);
@@ -368,6 +382,7 @@ void HP_atcommand_config_read(const char *config_filename) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_config_read_pre ) {
void (*preHookFunc) (const char *config_filename);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_config_read_pre[hIndex].func;
preHookFunc(config_filename);
@@ -394,6 +409,7 @@ int HP_atcommand_stopattack(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_atcommand_stopattack_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_atcommand_stopattack_pre[hIndex].func;
@@ -426,6 +442,7 @@ int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_atcommand_pvpoff_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_atcommand_pvpoff_sub_pre[hIndex].func;
@@ -458,6 +475,7 @@ int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_atcommand_pvpon_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_atcommand_pvpon_sub_pre[hIndex].func;
@@ -490,6 +508,7 @@ int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_atcommand_atkillmonster_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_atcommand_atkillmonster_sub_pre[hIndex].func;
@@ -521,6 +540,7 @@ void HP_atcommand_raise_sub(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_raise_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_raise_sub_pre[hIndex].func;
preHookFunc(sd);
@@ -546,6 +566,7 @@ void HP_atcommand_get_jail_time(int jailtime, int *year, int *month, int *day, i
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_get_jail_time_pre ) {
void (*preHookFunc) (int *jailtime, int *year, int *month, int *day, int *hour, int *minute);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_jail_time_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_get_jail_time_pre[hIndex].func;
preHookFunc(&jailtime, year, month, day, hour, minute);
@@ -572,6 +593,7 @@ int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_atcommand_cleanfloor_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_atcommand_cleanfloor_sub_pre[hIndex].func;
@@ -604,6 +626,7 @@ int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_atcommand_mutearea_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_atcommand_mutearea_sub_pre[hIndex].func;
@@ -635,6 +658,7 @@ void HP_atcommand_commands_sub(struct map_session_data *sd, const int fd, AtComm
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_commands_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const int *fd, AtCommandType *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_commands_sub_pre[hIndex].func;
preHookFunc(sd, &fd, &type);
@@ -660,6 +684,7 @@ void HP_atcommand_cmd_db_clear(void) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_cmd_db_clear_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_pre[hIndex].func;
preHookFunc();
@@ -686,6 +711,7 @@ int HP_atcommand_cmd_db_clear_sub(DBKey key, DBData *data, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_sub_pre[hIndex].func;
@@ -717,6 +743,7 @@ void HP_atcommand_doload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_doload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_doload_pre[hIndex].func;
preHookFunc();
@@ -742,6 +769,7 @@ void HP_atcommand_base_commands(void) {
int hIndex = 0;
if( HPMHooks.count.HP_atcommand_base_commands_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_base_commands_pre[hIndex].func;
preHookFunc();
@@ -768,6 +796,7 @@ bool HP_atcommand_add(char *name, AtCommandFunc func, bool replace) {
bool retVal___ = false;
if( HPMHooks.count.HP_atcommand_add_pre ) {
bool (*preHookFunc) (char *name, AtCommandFunc *func, bool *replace);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_add_pre[hIndex].func;
retVal___ = preHookFunc(name, &func, &replace);
@@ -794,6 +823,7 @@ const char* HP_atcommand_msg(int msg_number) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_atcommand_msg_pre ) {
const char* (*preHookFunc) (int *msg_number);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_atcommand_msg_pre[hIndex].func;
retVal___ = preHookFunc(&msg_number);
@@ -820,6 +850,7 @@ void HP_battle_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_battle_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -845,6 +876,7 @@ void HP_battle_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_battle_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_final_pre[hIndex].func;
preHookFunc();
@@ -872,6 +904,7 @@ struct Damage HP_battle_calc_attack(int attack_type, struct block_list *bl, stru
memset(&retVal___, '\0', sizeof(struct Damage));
if( HPMHooks.count.HP_battle_calc_attack_pre ) {
struct Damage (*preHookFunc) (int *attack_type, struct block_list *bl, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_attack_pre[hIndex].func;
retVal___ = preHookFunc(&attack_type, bl, target, &skill_id, &skill_lv, &count);
@@ -898,6 +931,7 @@ int64 HP_battle_calc_damage(struct block_list *src, struct block_list *bl, struc
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_damage_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, struct Damage *d, int64 *damage, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, d, &damage, &skill_id, &skill_lv);
@@ -924,6 +958,7 @@ int64 HP_battle_calc_gvg_damage(struct block_list *src, struct block_list *bl, i
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_gvg_damage_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_gvg_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_gvg_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &damage, &div_, &skill_id, &skill_lv, &flag);
@@ -950,6 +985,7 @@ int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, in
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_bg_damage_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_bg_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_bg_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &damage, &div_, &skill_id, &skill_lv, &flag);
@@ -976,6 +1012,7 @@ enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list
enum damage_lv retVal___ = ATK_NONE;
if( HPMHooks.count.HP_battle_weapon_attack_pre ) {
enum damage_lv (*preHookFunc) (struct block_list *bl, struct block_list *target, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_weapon_attack_pre[hIndex].func;
retVal___ = preHookFunc(bl, target, &tick, &flag);
@@ -1003,6 +1040,7 @@ struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_
memset(&retVal___, '\0', sizeof(struct Damage));
if( HPMHooks.count.HP_battle_calc_weapon_attack_pre ) {
struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *wflag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_weapon_attack_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &wflag);
@@ -1029,6 +1067,7 @@ int HP_battle_delay_damage(int64 tick, int amotion, struct block_list *src, stru
int retVal___ = 0;
if( HPMHooks.count.HP_battle_delay_damage_pre ) {
int (*preHookFunc) (int64 *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_delay_damage_pre[hIndex].func;
retVal___ = preHookFunc(&tick, &amotion, src, target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects);
@@ -1054,6 +1093,7 @@ void HP_battle_drain(struct map_session_data *sd, struct block_list *tbl, int64
int hIndex = 0;
if( HPMHooks.count.HP_battle_drain_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct block_list *tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_drain_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_drain_pre[hIndex].func;
preHookFunc(sd, tbl, &rdamage, &ldamage, &race, &boss);
@@ -1079,6 +1119,7 @@ void HP_battle_reflect_damage(struct block_list *target, struct block_list *src,
int hIndex = 0;
if( HPMHooks.count.HP_battle_reflect_damage_pre ) {
void (*preHookFunc) (struct block_list *target, struct block_list *src, struct Damage *wd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_reflect_damage_pre[hIndex].func;
preHookFunc(target, src, wd, &skill_id);
@@ -1105,6 +1146,7 @@ int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_attr_ratio_pre ) {
int (*preHookFunc) (int *atk_elem, int *def_type, int *def_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_ratio_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_attr_ratio_pre[hIndex].func;
retVal___ = preHookFunc(&atk_elem, &def_type, &def_lv);
@@ -1131,6 +1173,7 @@ int64 HP_battle_attr_fix(struct block_list *src, struct block_list *target, int6
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_attr_fix_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *damage, int *atk_elem, int *def_type, int *def_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_fix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_attr_fix_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &damage, &atk_elem, &def_type, &def_lv);
@@ -1157,6 +1200,7 @@ int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct blo
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_cardfix_pre ) {
int64 (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, int *nk, int *s_ele, int *s_ele_, int64 *damage, int *left, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_cardfix_pre[hIndex].func;
retVal___ = preHookFunc(&attack_type, src, target, &nk, &s_ele, &s_ele_, &damage, &left, &flag);
@@ -1183,6 +1227,7 @@ int64 HP_battle_calc_elefix(struct block_list *src, struct block_list *target, u
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_elefix_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *nk, int *n_ele, int *s_ele, int *s_ele_, bool *left, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_elefix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_elefix_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &damage, &nk, &n_ele, &s_ele, &s_ele_, &left, &flag);
@@ -1209,6 +1254,7 @@ int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *targe
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_masteryfix_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &damage, &div, &left, &weapon);
@@ -1235,6 +1281,7 @@ int HP_battle_calc_chorusbonus(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_chorusbonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_chorusbonus_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -1261,6 +1308,7 @@ int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct bl
int retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_skillratio_pre ) {
int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_skillratio_pre[hIndex].func;
retVal___ = preHookFunc(&attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag);
@@ -1287,6 +1335,7 @@ int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_sizefix_pre ) {
int64 (*preHookFunc) (struct map_session_data *sd, int64 *damage, int *type, int *size, bool *ignore);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_sizefix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_sizefix_pre[hIndex].func;
retVal___ = preHookFunc(sd, &damage, &type, &size, &ignore);
@@ -1313,6 +1362,7 @@ int64 HP_battle_calc_weapon_damage(struct block_list *src, struct block_list *bl
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_weapon_damage_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, struct weapon_atk *watk, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *size, int *type, int *flag, int *flag2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_weapon_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, watk, &nk, &n_ele, &s_ele, &s_ele_, &size, &type, &flag, &flag2);
@@ -1339,6 +1389,7 @@ int64 HP_battle_calc_defense(int attack_type, struct block_list *src, struct blo
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_defense_pre ) {
int64 (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *flag, int *pdef);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_defense_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_defense_pre[hIndex].func;
retVal___ = preHookFunc(&attack_type, src, target, &skill_id, &skill_lv, &damage, &flag, &pdef);
@@ -1365,6 +1416,7 @@ struct block_list* HP_battle_get_master(struct block_list *src) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_battle_get_master_pre ) {
struct block_list* (*preHookFunc) (struct block_list *src);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_get_master_pre[hIndex].func;
retVal___ = preHookFunc(src);
@@ -1391,6 +1443,7 @@ struct block_list* HP_battle_get_targeted(struct block_list *target) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_battle_get_targeted_pre ) {
struct block_list* (*preHookFunc) (struct block_list *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_get_targeted_pre[hIndex].func;
retVal___ = preHookFunc(target);
@@ -1417,6 +1470,7 @@ struct block_list* HP_battle_get_enemy(struct block_list *target, int type, int
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_battle_get_enemy_pre ) {
struct block_list* (*preHookFunc) (struct block_list *target, int *type, int *range);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_get_enemy_pre[hIndex].func;
retVal___ = preHookFunc(target, &type, &range);
@@ -1443,6 +1497,7 @@ int HP_battle_get_target(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_get_target_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_get_target_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -1469,6 +1524,7 @@ int HP_battle_get_current_skill(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_get_current_skill_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_get_current_skill_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -1495,6 +1551,7 @@ bool HP_battle_check_undead(int race, int element) {
bool retVal___ = false;
if( HPMHooks.count.HP_battle_check_undead_pre ) {
bool (*preHookFunc) (int *race, int *element);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_check_undead_pre[hIndex].func;
retVal___ = preHookFunc(&race, &element);
@@ -1521,6 +1578,7 @@ int HP_battle_check_target(struct block_list *src, struct block_list *target, in
int retVal___ = 0;
if( HPMHooks.count.HP_battle_check_target_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_target_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_check_target_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &flag);
@@ -1547,6 +1605,7 @@ bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int ra
bool retVal___ = false;
if( HPMHooks.count.HP_battle_check_range_pre ) {
bool (*preHookFunc) (struct block_list *src, struct block_list *bl, int *range);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_range_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_check_range_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &range);
@@ -1572,6 +1631,7 @@ void HP_battle_consume_ammo(struct map_session_data *sd, int skill_id, int lv) {
int hIndex = 0;
if( HPMHooks.count.HP_battle_consume_ammo_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_consume_ammo_pre[hIndex].func;
preHookFunc(sd, &skill_id, &lv);
@@ -1598,6 +1658,7 @@ int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_get_targeted_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_battle_get_targeted_sub_pre[hIndex].func;
@@ -1630,6 +1691,7 @@ int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_get_enemy_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_battle_get_enemy_sub_pre[hIndex].func;
@@ -1662,6 +1724,7 @@ int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_get_enemy_area_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_battle_get_enemy_area_sub_pre[hIndex].func;
@@ -1694,6 +1757,7 @@ int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_delay_damage_sub_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_delay_damage_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -1720,6 +1784,7 @@ int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_blewcount_bonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_blewcount_bonus_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -1746,6 +1811,7 @@ int HP_battle_range_type(struct block_list *src, struct block_list *target, uint
int retVal___ = 0;
if( HPMHooks.count.HP_battle_range_type_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_range_type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_range_type_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv);
@@ -1772,6 +1838,7 @@ int64 HP_battle_calc_base_damage(struct block_list *src, struct block_list *bl,
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_base_damage_pre ) {
int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *type, int *flag, int *flag2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_base_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &nk, &n_ele, &s_ele, &s_ele_, &type, &flag, &flag2);
@@ -1798,6 +1865,7 @@ int64 HP_battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa,
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_base_damage2_pre ) {
int64 (*preHookFunc) (struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short *t_size, struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_base_damage2_pre[hIndex].func;
retVal___ = preHookFunc(st, wa, sc, &t_size, sd, &flag);
@@ -1825,6 +1893,7 @@ struct Damage HP_battle_calc_misc_attack(struct block_list *src, struct block_li
memset(&retVal___, '\0', sizeof(struct Damage));
if( HPMHooks.count.HP_battle_calc_misc_attack_pre ) {
struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &mflag);
@@ -1852,6 +1921,7 @@ struct Damage HP_battle_calc_magic_attack(struct block_list *src, struct block_l
memset(&retVal___, '\0', sizeof(struct Damage));
if( HPMHooks.count.HP_battle_calc_magic_attack_pre ) {
struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_magic_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_magic_attack_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &mflag);
@@ -1878,6 +1948,7 @@ int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_adjust_skill_damage_pre ) {
int (*preHookFunc) (int *m, unsigned short *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_adjust_skill_damage_pre[hIndex].func;
retVal___ = preHookFunc(&m, &skill_id);
@@ -1904,6 +1975,7 @@ int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *targ
int64 retVal___ = 0;
if( HPMHooks.count.HP_battle_add_mastery_pre ) {
int64 (*preHookFunc) (struct map_session_data *sd, struct block_list *target, int64 *dmg, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_add_mastery_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_add_mastery_pre[hIndex].func;
retVal___ = preHookFunc(sd, target, &dmg, &type);
@@ -1930,6 +2002,7 @@ int HP_battle_calc_drain(int64 damage, int rate, int per) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_calc_drain_pre ) {
int (*preHookFunc) (int64 *damage, int *rate, int *per);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_calc_drain_pre[hIndex].func;
retVal___ = preHookFunc(&damage, &rate, &per);
@@ -1956,6 +2029,7 @@ int HP_battle_config_read(const char *cfgName) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_config_read_pre ) {
int (*preHookFunc) (const char *cfgName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_read_pre[hIndex].func;
retVal___ = preHookFunc(cfgName);
@@ -1981,6 +2055,7 @@ void HP_battle_config_set_defaults(void) {
int hIndex = 0;
if( HPMHooks.count.HP_battle_config_set_defaults_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_set_defaults_pre[hIndex].func;
preHookFunc();
@@ -2007,6 +2082,7 @@ int HP_battle_config_set_value(const char *w1, const char *w2) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_config_set_value_pre ) {
int (*preHookFunc) (const char *w1, const char *w2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_set_value_pre[hIndex].func;
retVal___ = preHookFunc(w1, w2);
@@ -2033,6 +2109,7 @@ int HP_battle_config_get_value(const char *w1) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_config_get_value_pre ) {
int (*preHookFunc) (const char *w1);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_get_value_pre[hIndex].func;
retVal___ = preHookFunc(w1);
@@ -2058,6 +2135,7 @@ void HP_battle_config_adjust(void) {
int hIndex = 0;
if( HPMHooks.count.HP_battle_config_adjust_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_adjust_pre[hIndex].func;
preHookFunc();
@@ -2084,6 +2162,7 @@ struct block_list* HP_battle_get_enemy_area(struct block_list *src, int x, int y
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_battle_get_enemy_area_pre ) {
struct block_list* (*preHookFunc) (struct block_list *src, int *x, int *y, int *range, int *type, int *ignore_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_get_enemy_area_pre[hIndex].func;
retVal___ = preHookFunc(src, &x, &y, &range, &type, &ignore_id);
@@ -2110,6 +2189,7 @@ int HP_battle_damage_area(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_battle_damage_area_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_battle_damage_area_pre[hIndex].func;
@@ -2142,6 +2222,7 @@ void HP_bg_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -2167,6 +2248,7 @@ void HP_bg_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_final_pre[hIndex].func;
preHookFunc();
@@ -2193,6 +2275,7 @@ struct bg_arena* HP_bg_name2arena(char *name) {
struct bg_arena* retVal___ = NULL;
if( HPMHooks.count.HP_bg_name2arena_pre ) {
struct bg_arena* (*preHookFunc) (char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_name2arena_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -2218,6 +2301,7 @@ void HP_bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum b
int hIndex = 0;
if( HPMHooks.count.HP_bg_queue_add_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_queue_add_pre[hIndex].func;
preHookFunc(sd, arena, &type);
@@ -2244,6 +2328,7 @@ enum BATTLEGROUNDS_QUEUE_ACK HP_bg_can_queue(struct map_session_data *sd, struct
enum BATTLEGROUNDS_QUEUE_ACK retVal___ = BGQA_SUCCESS;
if( HPMHooks.count.HP_bg_can_queue_pre ) {
enum BATTLEGROUNDS_QUEUE_ACK (*preHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_can_queue_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_can_queue_pre[hIndex].func;
retVal___ = preHookFunc(sd, arena, &type);
@@ -2270,6 +2355,7 @@ int HP_bg_id2pos(int queue_id, int account_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_bg_id2pos_pre ) {
int (*preHookFunc) (int *queue_id, int *account_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_id2pos_pre[hIndex].func;
retVal___ = preHookFunc(&queue_id, &account_id);
@@ -2295,6 +2381,7 @@ void HP_bg_queue_pc_cleanup(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_queue_pc_cleanup_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_queue_pc_cleanup_pre[hIndex].func;
preHookFunc(sd);
@@ -2320,6 +2407,7 @@ void HP_bg_begin(struct bg_arena *arena) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_begin_pre ) {
void (*preHookFunc) (struct bg_arena *arena);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_begin_pre[hIndex].func;
preHookFunc(arena);
@@ -2346,6 +2434,7 @@ int HP_bg_begin_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_bg_begin_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_begin_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -2371,6 +2460,7 @@ void HP_bg_queue_pregame(struct bg_arena *arena) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_queue_pregame_pre ) {
void (*preHookFunc) (struct bg_arena *arena);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_queue_pregame_pre[hIndex].func;
preHookFunc(arena);
@@ -2397,6 +2487,7 @@ int HP_bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_bg_fillup_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_fillup_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -2422,6 +2513,7 @@ void HP_bg_queue_ready_ack(struct bg_arena *arena, struct map_session_data *sd,
int hIndex = 0;
if( HPMHooks.count.HP_bg_queue_ready_ack_pre ) {
void (*preHookFunc) (struct bg_arena *arena, struct map_session_data *sd, bool *response);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_ready_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_queue_ready_ack_pre[hIndex].func;
preHookFunc(arena, sd, &response);
@@ -2447,6 +2539,7 @@ void HP_bg_match_over(struct bg_arena *arena, bool canceled) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_match_over_pre ) {
void (*preHookFunc) (struct bg_arena *arena, bool *canceled);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_match_over_pre[hIndex].func;
preHookFunc(arena, &canceled);
@@ -2472,6 +2565,7 @@ void HP_bg_queue_check(struct bg_arena *arena) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_queue_check_pre ) {
void (*preHookFunc) (struct bg_arena *arena);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_queue_check_pre[hIndex].func;
preHookFunc(arena);
@@ -2498,6 +2592,7 @@ struct battleground_data* HP_bg_team_search(int bg_id) {
struct battleground_data* retVal___ = NULL;
if( HPMHooks.count.HP_bg_team_search_pre ) {
struct battleground_data* (*preHookFunc) (int *bg_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_search_pre[hIndex].func;
retVal___ = preHookFunc(&bg_id);
@@ -2524,6 +2619,7 @@ struct map_session_data* HP_bg_getavailablesd(struct battleground_data *bgd) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_bg_getavailablesd_pre ) {
struct map_session_data* (*preHookFunc) (struct battleground_data *bgd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_getavailablesd_pre[hIndex].func;
retVal___ = preHookFunc(bgd);
@@ -2550,6 +2646,7 @@ bool HP_bg_team_delete(int bg_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_bg_team_delete_pre ) {
bool (*preHookFunc) (int *bg_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_delete_pre[hIndex].func;
retVal___ = preHookFunc(&bg_id);
@@ -2576,6 +2673,7 @@ bool HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) {
bool retVal___ = false;
if( HPMHooks.count.HP_bg_team_warp_pre ) {
bool (*preHookFunc) (int *bg_id, unsigned short *map_index, short *x, short *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_warp_pre[hIndex].func;
retVal___ = preHookFunc(&bg_id, &map_index, &x, &y);
@@ -2601,6 +2699,7 @@ void HP_bg_send_dot_remove(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_send_dot_remove_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_send_dot_remove_pre[hIndex].func;
preHookFunc(sd);
@@ -2627,6 +2726,7 @@ bool HP_bg_team_join(int bg_id, struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_bg_team_join_pre ) {
bool (*preHookFunc) (int *bg_id, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_join_pre[hIndex].func;
retVal___ = preHookFunc(&bg_id, sd);
@@ -2653,6 +2753,7 @@ int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag)
int retVal___ = 0;
if( HPMHooks.count.HP_bg_team_leave_pre ) {
int (*preHookFunc) (struct map_session_data *sd, enum bg_team_leave_type *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_leave_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -2679,6 +2780,7 @@ bool HP_bg_member_respawn(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_bg_member_respawn_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_member_respawn_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -2705,6 +2807,7 @@ int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, c
int retVal___ = 0;
if( HPMHooks.count.HP_bg_create_pre ) {
int (*preHookFunc) (unsigned short *map_index, short *rx, short *ry, const char *ev, const char *dev);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_create_pre[hIndex].func;
retVal___ = preHookFunc(&map_index, &rx, &ry, ev, dev);
@@ -2731,6 +2834,7 @@ int HP_bg_team_get_id(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_bg_team_get_id_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_get_id_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -2757,6 +2861,7 @@ bool HP_bg_send_message(struct map_session_data *sd, const char *mes, int len) {
bool retVal___ = false;
if( HPMHooks.count.HP_bg_send_message_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_send_message_pre[hIndex].func;
retVal___ = preHookFunc(sd, mes, &len);
@@ -2783,6 +2888,7 @@ int HP_bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_bg_send_xy_timer_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_bg_send_xy_timer_sub_pre[hIndex].func;
@@ -2815,6 +2921,7 @@ int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_bg_send_xy_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_send_xy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -2841,6 +2948,7 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_bg_afk_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_afk_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -2863,11 +2971,11 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) {
return retVal___;
}
enum bg_queue_types HP_bg_str2teamtype(const char *str) {
-/* Unknown return type 'enum bg_queue_types'. Initializing to '0'. */
int hIndex = 0;
- enum bg_queue_types retVal___ = 0;
+ enum bg_queue_types retVal___ = BGQT_INVALID;
if( HPMHooks.count.HP_bg_str2teamtype_pre ) {
enum bg_queue_types (*preHookFunc) (const char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_str2teamtype_pre[hIndex].func;
retVal___ = preHookFunc(str);
@@ -2893,6 +3001,7 @@ void HP_bg_config_read(void) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_config_read_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_config_read_pre[hIndex].func;
preHookFunc();
@@ -2920,6 +3029,7 @@ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) {
bool retVal___ = false;
if( HPMHooks.count.HP_buyingstore_setup_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, unsigned char *slots);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_setup_pre[hIndex].func;
retVal___ = preHookFunc(sd, &slots);
@@ -2945,6 +3055,7 @@ void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned
int hIndex = 0;
if( HPMHooks.count.HP_buyingstore_create_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *zenylimit, unsigned char *result, const char *storename, const uint8 *itemlist, unsigned int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_create_pre[hIndex].func;
preHookFunc(sd, &zenylimit, &result, storename, itemlist, &count);
@@ -2970,6 +3081,7 @@ void HP_buyingstore_close(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_buyingstore_close_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_close_pre[hIndex].func;
preHookFunc(sd);
@@ -2995,6 +3107,7 @@ void HP_buyingstore_open(struct map_session_data *sd, int account_id) {
int hIndex = 0;
if( HPMHooks.count.HP_buyingstore_open_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *account_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_open_pre[hIndex].func;
preHookFunc(sd, &account_id);
@@ -3020,6 +3133,7 @@ void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned
int hIndex = 0;
if( HPMHooks.count.HP_buyingstore_trade_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *account_id, unsigned int *buyer_id, const uint8 *itemlist, unsigned int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_trade_pre[hIndex].func;
preHookFunc(sd, &account_id, &buyer_id, itemlist, &count);
@@ -3046,6 +3160,7 @@ bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) {
bool retVal___ = false;
if( HPMHooks.count.HP_buyingstore_search_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_search_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -3072,6 +3187,7 @@ bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search
bool retVal___ = false;
if( HPMHooks.count.HP_buyingstore_searchall_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_searchall_pre[hIndex].func;
retVal___ = preHookFunc(sd, s);
@@ -3098,6 +3214,7 @@ unsigned int HP_buyingstore_getuid(void) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_buyingstore_getuid_pre ) {
unsigned int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_buyingstore_getuid_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -3125,6 +3242,7 @@ bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, cons
bool retVal___ = false;
if( HPMHooks.count.HP_chat_create_pc_chat_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pc_chat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_create_pc_chat_pre[hIndex].func;
retVal___ = preHookFunc(sd, title, pass, &limit, &pub);
@@ -3151,6 +3269,7 @@ bool HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) {
bool retVal___ = false;
if( HPMHooks.count.HP_chat_join_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *chatid, const char *pass);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_join_pre[hIndex].func;
retVal___ = preHookFunc(sd, &chatid, pass);
@@ -3177,6 +3296,7 @@ int HP_chat_leave(struct map_session_data *sd, bool kicked) {
int retVal___ = 0;
if( HPMHooks.count.HP_chat_leave_pre ) {
int (*preHookFunc) (struct map_session_data *sd, bool *kicked);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_leave_pre[hIndex].func;
retVal___ = preHookFunc(sd, &kicked);
@@ -3203,6 +3323,7 @@ bool HP_chat_change_owner(struct map_session_data *sd, const char *nextownername
bool retVal___ = false;
if( HPMHooks.count.HP_chat_change_owner_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *nextownername);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_change_owner_pre[hIndex].func;
retVal___ = preHookFunc(sd, nextownername);
@@ -3229,6 +3350,7 @@ bool HP_chat_change_status(struct map_session_data *sd, const char *title, const
bool retVal___ = false;
if( HPMHooks.count.HP_chat_change_status_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_status_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_change_status_pre[hIndex].func;
retVal___ = preHookFunc(sd, title, pass, &limit, &pub);
@@ -3255,6 +3377,7 @@ bool HP_chat_kick(struct map_session_data *sd, const char *kickusername) {
bool retVal___ = false;
if( HPMHooks.count.HP_chat_kick_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *kickusername);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_kick_pre[hIndex].func;
retVal___ = preHookFunc(sd, kickusername);
@@ -3281,6 +3404,7 @@ bool HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit,
bool retVal___ = false;
if( HPMHooks.count.HP_chat_create_npc_chat_pre ) {
bool (*preHookFunc) (struct npc_data *nd, const char *title, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_create_npc_chat_pre[hIndex].func;
retVal___ = preHookFunc(nd, title, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl);
@@ -3307,6 +3431,7 @@ bool HP_chat_delete_npc_chat(struct npc_data *nd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chat_delete_npc_chat_pre ) {
bool (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_delete_npc_chat_pre[hIndex].func;
retVal___ = preHookFunc(nd);
@@ -3333,6 +3458,7 @@ bool HP_chat_enable_event(struct chat_data *cd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chat_enable_event_pre ) {
bool (*preHookFunc) (struct chat_data *cd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_enable_event_pre[hIndex].func;
retVal___ = preHookFunc(cd);
@@ -3359,6 +3485,7 @@ bool HP_chat_disable_event(struct chat_data *cd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chat_disable_event_pre ) {
bool (*preHookFunc) (struct chat_data *cd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_disable_event_pre[hIndex].func;
retVal___ = preHookFunc(cd);
@@ -3385,6 +3512,7 @@ bool HP_chat_npc_kick_all(struct chat_data *cd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chat_npc_kick_all_pre ) {
bool (*preHookFunc) (struct chat_data *cd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_npc_kick_all_pre[hIndex].func;
retVal___ = preHookFunc(cd);
@@ -3411,6 +3539,7 @@ bool HP_chat_trigger_event(struct chat_data *cd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chat_trigger_event_pre ) {
bool (*preHookFunc) (struct chat_data *cd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_trigger_event_pre[hIndex].func;
retVal___ = preHookFunc(cd);
@@ -3437,6 +3566,7 @@ struct chat_data* HP_chat_create(struct block_list *bl, const char *title, const
struct chat_data* retVal___ = NULL;
if( HPMHooks.count.HP_chat_create_pre ) {
struct chat_data* (*preHookFunc) (struct block_list *bl, const char *title, const char *pass, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chat_create_pre[hIndex].func;
retVal___ = preHookFunc(bl, title, pass, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl);
@@ -3463,6 +3593,7 @@ void HP_chrif_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -3488,6 +3619,7 @@ void HP_chrif_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_final_pre[hIndex].func;
preHookFunc();
@@ -3513,6 +3645,7 @@ void HP_chrif_setuserid(char *id) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_setuserid_pre ) {
void (*preHookFunc) (char *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_setuserid_pre[hIndex].func;
preHookFunc(id);
@@ -3538,6 +3671,7 @@ void HP_chrif_setpasswd(char *pwd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_setpasswd_pre ) {
void (*preHookFunc) (char *pwd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_setpasswd_pre[hIndex].func;
preHookFunc(pwd);
@@ -3563,6 +3697,7 @@ void HP_chrif_checkdefaultlogin(void) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_checkdefaultlogin_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_pre[hIndex].func;
preHookFunc();
@@ -3589,6 +3724,7 @@ bool HP_chrif_setip(const char *ip) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_setip_pre ) {
bool (*preHookFunc) (const char *ip);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_setip_pre[hIndex].func;
retVal___ = preHookFunc(ip);
@@ -3614,6 +3750,7 @@ void HP_chrif_setport(uint16 port) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_setport_pre ) {
void (*preHookFunc) (uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_setport_pre[hIndex].func;
preHookFunc(&port);
@@ -3640,6 +3777,7 @@ int HP_chrif_isconnected(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_isconnected_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_isconnected_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -3665,6 +3803,7 @@ void HP_chrif_check_shutdown(void) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_check_shutdown_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_check_shutdown_pre[hIndex].func;
preHookFunc();
@@ -3691,6 +3830,7 @@ struct auth_node* HP_chrif_search(int account_id) {
struct auth_node* retVal___ = NULL;
if( HPMHooks.count.HP_chrif_search_pre ) {
struct auth_node* (*preHookFunc) (int *account_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_search_pre[hIndex].func;
retVal___ = preHookFunc(&account_id);
@@ -3717,6 +3857,7 @@ struct auth_node* HP_chrif_auth_check(int account_id, int char_id, enum sd_state
struct auth_node* retVal___ = NULL;
if( HPMHooks.count.HP_chrif_auth_check_pre ) {
struct auth_node* (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_auth_check_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &char_id, &state);
@@ -3743,6 +3884,7 @@ bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_auth_delete_pre ) {
bool (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_auth_delete_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &char_id, &state);
@@ -3769,6 +3911,7 @@ bool HP_chrif_auth_finished(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_auth_finished_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_auth_finished_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -3794,6 +3937,7 @@ void HP_chrif_authreq(struct map_session_data *sd, bool hstandalone) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_authreq_pre ) {
void (*preHookFunc) (struct map_session_data *sd, bool *hstandalone);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_authreq_pre[hIndex].func;
preHookFunc(sd, &hstandalone);
@@ -3819,6 +3963,7 @@ void HP_chrif_authok(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_authok_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_authok_pre[hIndex].func;
preHookFunc(&fd);
@@ -3845,6 +3990,7 @@ bool HP_chrif_scdata_request(int account_id, int char_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_scdata_request_pre ) {
bool (*preHookFunc) (int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_scdata_request_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &char_id);
@@ -3871,6 +4017,7 @@ bool HP_chrif_save(struct map_session_data *sd, int flag) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_save_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_save_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -3897,6 +4044,7 @@ bool HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_charselectreq_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, uint32 *s_ip);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_charselectreq_pre[hIndex].func;
retVal___ = preHookFunc(sd, &s_ip);
@@ -3923,6 +4071,7 @@ bool HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 por
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_changemapserver_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_changemapserver_pre[hIndex].func;
retVal___ = preHookFunc(sd, &ip, &port);
@@ -3949,6 +4098,7 @@ bool HP_chrif_searchcharid(int char_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_searchcharid_pre ) {
bool (*preHookFunc) (int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_searchcharid_pre[hIndex].func;
retVal___ = preHookFunc(&char_id);
@@ -3975,6 +4125,7 @@ bool HP_chrif_changeemail(int id, const char *actual_email, const char *new_emai
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_changeemail_pre ) {
bool (*preHookFunc) (int *id, const char *actual_email, const char *new_email);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_changeemail_pre[hIndex].func;
retVal___ = preHookFunc(&id, actual_email, new_email);
@@ -4001,6 +4152,7 @@ bool HP_chrif_char_ask_name(int acc, const char *character_name, unsigned short
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_char_ask_name_pre ) {
bool (*preHookFunc) (int *acc, const char *character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_char_ask_name_pre[hIndex].func;
retVal___ = preHookFunc(&acc, character_name, &operation_type, &year, &month, &day, &hour, &minute, &second);
@@ -4027,6 +4179,7 @@ int HP_chrif_updatefamelist(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_updatefamelist_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_updatefamelist_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -4053,6 +4206,7 @@ bool HP_chrif_buildfamelist(void) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_buildfamelist_pre ) {
bool (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_buildfamelist_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -4079,6 +4233,7 @@ bool HP_chrif_save_scdata(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_save_scdata_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_save_scdata_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -4105,6 +4260,7 @@ bool HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_ragsrvinfo_pre ) {
bool (*preHookFunc) (int *base_rate, int *job_rate, int *drop_rate);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_ragsrvinfo_pre[hIndex].func;
retVal___ = preHookFunc(&base_rate, &job_rate, &drop_rate);
@@ -4131,6 +4287,7 @@ bool HP_chrif_char_offline_nsd(int account_id, int char_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_char_offline_nsd_pre ) {
bool (*preHookFunc) (int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_char_offline_nsd_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &char_id);
@@ -4157,6 +4314,7 @@ bool HP_chrif_char_reset_offline(void) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_char_reset_offline_pre ) {
bool (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_char_reset_offline_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -4183,6 +4341,7 @@ bool HP_chrif_send_users_tochar(void) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_send_users_tochar_pre ) {
bool (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_send_users_tochar_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -4209,6 +4368,7 @@ bool HP_chrif_char_online(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_char_online_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_char_online_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -4235,6 +4395,7 @@ bool HP_chrif_changesex(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_changesex_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_changesex_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -4261,6 +4422,7 @@ bool HP_chrif_divorce(int partner_id1, int partner_id2) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_divorce_pre ) {
bool (*preHookFunc) (int *partner_id1, int *partner_id2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_divorce_pre[hIndex].func;
retVal___ = preHookFunc(&partner_id1, &partner_id2);
@@ -4287,6 +4449,7 @@ bool HP_chrif_removefriend(int char_id, int friend_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_removefriend_pre ) {
bool (*preHookFunc) (int *char_id, int *friend_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_removefriend_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &friend_id);
@@ -4312,6 +4475,7 @@ void HP_chrif_send_report(char *buf, int len) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_send_report_pre ) {
void (*preHookFunc) (char *buf, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_send_report_pre[hIndex].func;
preHookFunc(buf, &len);
@@ -4338,6 +4502,7 @@ bool HP_chrif_flush(void) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_flush_pre ) {
bool (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_flush_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -4363,6 +4528,7 @@ void HP_chrif_skillid2idx(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_skillid2idx_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_skillid2idx_pre[hIndex].func;
preHookFunc(&fd);
@@ -4389,6 +4555,7 @@ bool HP_chrif_sd_to_auth(TBL_PC *sd, enum sd_state state) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_sd_to_auth_pre ) {
bool (*preHookFunc) (TBL_PC *sd, enum sd_state *state);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_sd_to_auth_pre[hIndex].func;
retVal___ = preHookFunc(sd, &state);
@@ -4415,6 +4582,7 @@ int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t dat
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_check_connect_char_server_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_check_connect_char_server_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -4441,6 +4609,7 @@ bool HP_chrif_auth_logout(TBL_PC *sd, enum sd_state state) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_auth_logout_pre ) {
bool (*preHookFunc) (TBL_PC *sd, enum sd_state *state);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_auth_logout_pre[hIndex].func;
retVal___ = preHookFunc(sd, &state);
@@ -4466,6 +4635,7 @@ void HP_chrif_save_ack(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_save_ack_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_save_ack_pre[hIndex].func;
preHookFunc(&fd);
@@ -4492,6 +4662,7 @@ int HP_chrif_reconnect(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_reconnect_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_chrif_reconnect_pre[hIndex].func;
@@ -4524,6 +4695,7 @@ int HP_chrif_auth_db_cleanup_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_sub_pre[hIndex].func;
@@ -4556,6 +4728,7 @@ bool HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_char_ask_name_answer_pre ) {
bool (*preHookFunc) (int *acc, const char *player_name, uint16 *type, uint16 *answer);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_char_ask_name_answer_pre[hIndex].func;
retVal___ = preHookFunc(&acc, player_name, &type, &answer);
@@ -4582,6 +4755,7 @@ int HP_chrif_auth_db_final(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_auth_db_final_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_chrif_auth_db_final_pre[hIndex].func;
@@ -4614,6 +4788,7 @@ int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_send_usercount_tochar_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_send_usercount_tochar_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -4640,6 +4815,7 @@ int HP_chrif_auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_auth_db_cleanup_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -4665,6 +4841,7 @@ void HP_chrif_connect(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_connect_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_connect_pre[hIndex].func;
preHookFunc(&fd);
@@ -4690,6 +4867,7 @@ void HP_chrif_connectack(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_connectack_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_connectack_pre[hIndex].func;
preHookFunc(&fd);
@@ -4715,6 +4893,7 @@ void HP_chrif_sendmap(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_sendmap_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_sendmap_pre[hIndex].func;
preHookFunc(&fd);
@@ -4740,6 +4919,7 @@ void HP_chrif_sendmapack(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_sendmapack_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_sendmapack_pre[hIndex].func;
preHookFunc(&fd);
@@ -4765,6 +4945,7 @@ void HP_chrif_recvmap(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_recvmap_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_recvmap_pre[hIndex].func;
preHookFunc(&fd);
@@ -4791,6 +4972,7 @@ bool HP_chrif_changemapserverack(int account_id, int login_id1, int login_id2, i
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_changemapserverack_pre ) {
bool (*preHookFunc) (int *account_id, int *login_id1, int *login_id2, int *char_id, short *map_index, short *x, short *y, uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserverack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_changemapserverack_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &login_id1, &login_id2, &char_id, &map_index, &x, &y, &ip, &port);
@@ -4816,6 +4998,7 @@ void HP_chrif_changedsex(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_changedsex_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_changedsex_pre[hIndex].func;
preHookFunc(&fd);
@@ -4842,6 +5025,7 @@ bool HP_chrif_divorceack(int char_id, int partner_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_divorceack_pre ) {
bool (*preHookFunc) (int *char_id, int *partner_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_divorceack_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &partner_id);
@@ -4867,6 +5051,7 @@ void HP_chrif_idbanned(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_idbanned_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_idbanned_pre[hIndex].func;
preHookFunc(&fd);
@@ -4892,6 +5077,7 @@ void HP_chrif_recvfamelist(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_recvfamelist_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_recvfamelist_pre[hIndex].func;
preHookFunc(&fd);
@@ -4918,6 +5104,7 @@ bool HP_chrif_load_scdata(int fd) {
bool retVal___ = false;
if( HPMHooks.count.HP_chrif_load_scdata_pre ) {
bool (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_load_scdata_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
@@ -4943,6 +5130,7 @@ void HP_chrif_update_ip(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_update_ip_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_update_ip_pre[hIndex].func;
preHookFunc(&fd);
@@ -4969,6 +5157,7 @@ int HP_chrif_disconnectplayer(int fd) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_disconnectplayer_pre ) {
int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_disconnectplayer_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
@@ -4994,6 +5183,7 @@ void HP_chrif_removemap(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_removemap_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_removemap_pre[hIndex].func;
preHookFunc(&fd);
@@ -5020,6 +5210,7 @@ int HP_chrif_updatefamelist_ack(int fd) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_updatefamelist_ack_pre ) {
int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_updatefamelist_ack_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
@@ -5045,6 +5236,7 @@ void HP_chrif_keepalive(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_keepalive_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_keepalive_pre[hIndex].func;
preHookFunc(&fd);
@@ -5070,6 +5262,7 @@ void HP_chrif_keepalive_ack(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_keepalive_ack_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_keepalive_ack_pre[hIndex].func;
preHookFunc(&fd);
@@ -5095,6 +5288,7 @@ void HP_chrif_deadopt(int father_id, int mother_id, int child_id) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_deadopt_pre ) {
void (*preHookFunc) (int *father_id, int *mother_id, int *child_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_deadopt_pre[hIndex].func;
preHookFunc(&father_id, &mother_id, &child_id);
@@ -5120,6 +5314,7 @@ void HP_chrif_authfail(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_authfail_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_authfail_pre[hIndex].func;
preHookFunc(&fd);
@@ -5145,6 +5340,7 @@ void HP_chrif_on_ready(void) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_on_ready_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_on_ready_pre[hIndex].func;
preHookFunc();
@@ -5170,6 +5366,7 @@ void HP_chrif_on_disconnect(void) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_on_disconnect_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_on_disconnect_pre[hIndex].func;
preHookFunc();
@@ -5196,6 +5393,7 @@ int HP_chrif_parse(int fd) {
int retVal___ = 0;
if( HPMHooks.count.HP_chrif_parse_pre ) {
int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_parse_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
@@ -5221,6 +5419,7 @@ void HP_chrif_save_scdata_single(int account_id, int char_id, short type, struct
int hIndex = 0;
if( HPMHooks.count.HP_chrif_save_scdata_single_pre ) {
void (*preHookFunc) (int *account_id, int *char_id, short *type, struct status_change_entry *sce);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_save_scdata_single_pre[hIndex].func;
preHookFunc(&account_id, &char_id, &type, sce);
@@ -5246,6 +5445,7 @@ void HP_chrif_del_scdata_single(int account_id, int char_id, short type) {
int hIndex = 0;
if( HPMHooks.count.HP_chrif_del_scdata_single_pre ) {
void (*preHookFunc) (int *account_id, int *char_id, short *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chrif_del_scdata_single_pre[hIndex].func;
preHookFunc(&account_id, &char_id, &type);
@@ -5273,6 +5473,7 @@ int HP_clif_init(bool minimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_init_pre ) {
int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_init_pre[hIndex].func;
retVal___ = preHookFunc(&minimal);
@@ -5298,6 +5499,7 @@ void HP_clif_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_final_pre[hIndex].func;
preHookFunc();
@@ -5324,6 +5526,7 @@ bool HP_clif_setip(const char *ip) {
bool retVal___ = false;
if( HPMHooks.count.HP_clif_setip_pre ) {
bool (*preHookFunc) (const char *ip);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_setip_pre[hIndex].func;
retVal___ = preHookFunc(ip);
@@ -5350,6 +5553,7 @@ bool HP_clif_setbindip(const char *ip) {
bool retVal___ = false;
if( HPMHooks.count.HP_clif_setbindip_pre ) {
bool (*preHookFunc) (const char *ip);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_setbindip_pre[hIndex].func;
retVal___ = preHookFunc(ip);
@@ -5375,6 +5579,7 @@ void HP_clif_setport(uint16 port) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_setport_pre ) {
void (*preHookFunc) (uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_setport_pre[hIndex].func;
preHookFunc(&port);
@@ -5401,6 +5606,7 @@ uint32 HP_clif_refresh_ip(void) {
uint32 retVal___ = 0;
if( HPMHooks.count.HP_clif_refresh_ip_pre ) {
uint32 (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_refresh_ip_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -5427,6 +5633,7 @@ bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_tar
bool retVal___ = false;
if( HPMHooks.count.HP_clif_send_pre ) {
bool (*preHookFunc) (const void *buf, int *len, struct block_list *bl, enum send_target *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_send_pre[hIndex].func;
retVal___ = preHookFunc(buf, &len, bl, &type);
@@ -5453,6 +5660,7 @@ int HP_clif_send_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_send_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_clif_send_sub_pre[hIndex].func;
@@ -5485,6 +5693,7 @@ int HP_clif_parse(int fd) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_parse_pre ) {
int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_parse_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
@@ -5511,6 +5720,7 @@ unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) {
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_clif_parse_cmd_pre ) {
unsigned short (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_cmd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_parse_cmd_pre[hIndex].func;
retVal___ = preHookFunc(&fd, sd);
@@ -5537,6 +5747,7 @@ unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) {
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_clif_decrypt_cmd_pre ) {
unsigned short (*preHookFunc) (int *cmd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_decrypt_cmd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_decrypt_cmd_pre[hIndex].func;
retVal___ = preHookFunc(&cmd, sd);
@@ -5562,6 +5773,7 @@ void HP_clif_authok(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_authok_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_authok_pre[hIndex].func;
preHookFunc(sd);
@@ -5587,6 +5799,7 @@ void HP_clif_authrefuse(int fd, uint8 error_code) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_authrefuse_pre ) {
void (*preHookFunc) (int *fd, uint8 *error_code);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_authrefuse_pre[hIndex].func;
preHookFunc(&fd, &error_code);
@@ -5612,6 +5825,7 @@ void HP_clif_authfail_fd(int fd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_authfail_fd_pre ) {
void (*preHookFunc) (int *fd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_authfail_fd_pre[hIndex].func;
preHookFunc(&fd, &type);
@@ -5637,6 +5851,7 @@ void HP_clif_charselectok(int id, uint8 ok) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_charselectok_pre ) {
void (*preHookFunc) (int *id, uint8 *ok);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_charselectok_pre[hIndex].func;
preHookFunc(&id, &ok);
@@ -5662,6 +5877,7 @@ void HP_clif_dropflooritem(struct flooritem_data *fitem) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_dropflooritem_pre ) {
void (*preHookFunc) (struct flooritem_data *fitem);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_dropflooritem_pre[hIndex].func;
preHookFunc(fitem);
@@ -5687,6 +5903,7 @@ void HP_clif_clearflooritem(struct flooritem_data *fitem, int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearflooritem_pre ) {
void (*preHookFunc) (struct flooritem_data *fitem, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearflooritem_pre[hIndex].func;
preHookFunc(fitem, &fd);
@@ -5712,6 +5929,7 @@ void HP_clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_additem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_additem_pre[hIndex].func;
preHookFunc(sd, &n, &amount, &fail);
@@ -5737,6 +5955,7 @@ void HP_clif_dropitem(struct map_session_data *sd, int n, int amount) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_dropitem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_dropitem_pre[hIndex].func;
preHookFunc(sd, &n, &amount);
@@ -5762,6 +5981,7 @@ void HP_clif_delitem(struct map_session_data *sd, int n, int amount, short reaso
int hIndex = 0;
if( HPMHooks.count.HP_clif_delitem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, short *reason);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_delitem_pre[hIndex].func;
preHookFunc(sd, &n, &amount, &reason);
@@ -5787,6 +6007,7 @@ void HP_clif_takeitem(struct block_list *src, struct block_list *dst) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_takeitem_pre ) {
void (*preHookFunc) (struct block_list *src, struct block_list *dst);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_takeitem_pre[hIndex].func;
preHookFunc(src, dst);
@@ -5812,6 +6033,7 @@ void HP_clif_arrowequip(struct map_session_data *sd, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_arrowequip_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_arrowequip_pre[hIndex].func;
preHookFunc(sd, &val);
@@ -5837,6 +6059,7 @@ void HP_clif_arrow_fail(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_arrow_fail_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_arrow_fail_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -5862,6 +6085,7 @@ void HP_clif_use_card(struct map_session_data *sd, int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_use_card_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_use_card_pre[hIndex].func;
preHookFunc(sd, &idx);
@@ -5887,6 +6111,7 @@ void HP_clif_cart_additem(struct map_session_data *sd, int n, int amount, int fa
int hIndex = 0;
if( HPMHooks.count.HP_clif_cart_additem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cart_additem_pre[hIndex].func;
preHookFunc(sd, &n, &amount, &fail);
@@ -5912,6 +6137,7 @@ void HP_clif_cart_delitem(struct map_session_data *sd, int n, int amount) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cart_delitem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cart_delitem_pre[hIndex].func;
preHookFunc(sd, &n, &amount);
@@ -5937,6 +6163,7 @@ void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQ
int hIndex = 0;
if( HPMHooks.count.HP_clif_equipitemack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_equipitemack_pre[hIndex].func;
preHookFunc(sd, &n, &pos, &result);
@@ -5962,6 +6189,7 @@ void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_
int hIndex = 0;
if( HPMHooks.count.HP_clif_unequipitemack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_unequipitemack_pre[hIndex].func;
preHookFunc(sd, &n, &pos, &result);
@@ -5987,6 +6215,7 @@ void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool
int hIndex = 0;
if( HPMHooks.count.HP_clif_useitemack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount, bool *ok);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_useitemack_pre[hIndex].func;
preHookFunc(sd, &index, &amount, &ok);
@@ -6012,6 +6241,7 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_addcards_pre ) {
void (*preHookFunc) (unsigned char *buf, struct item *item);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_addcards_pre[hIndex].func;
preHookFunc(buf, item);
@@ -6037,6 +6267,7 @@ void HP_clif_addcards2(unsigned short *cards, struct item *item) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_addcards2_pre ) {
void (*preHookFunc) (unsigned short *cards, struct item *item);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_addcards2_pre[hIndex].func;
preHookFunc(cards, item);
@@ -6062,6 +6293,7 @@ void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_dat
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_sub_pre ) {
void (*preHookFunc) (unsigned char *buf, int *n, struct item *i, struct item_data *id, int *equip);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_sub_pre[hIndex].func;
preHookFunc(buf, &n, i, id, &equip);
@@ -6087,6 +6319,7 @@ void HP_clif_getareachar_item(struct map_session_data *sd, struct flooritem_data
int hIndex = 0;
if( HPMHooks.count.HP_clif_getareachar_item_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_getareachar_item_pre[hIndex].func;
preHookFunc(sd, fitem);
@@ -6112,6 +6345,7 @@ void HP_clif_cart_additem_ack(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cart_additem_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cart_additem_ack_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -6137,6 +6371,7 @@ void HP_clif_cashshop_load(void) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cashshop_load_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cashshop_load_pre[hIndex].func;
preHookFunc();
@@ -6162,6 +6397,7 @@ void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid
int hIndex = 0;
if( HPMHooks.count.HP_clif_package_announce_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *containerid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_package_announce_pre[hIndex].func;
preHookFunc(sd, &nameid, &containerid);
@@ -6187,6 +6423,7 @@ void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short name
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_drop_announce_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, char *monsterName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_drop_announce_pre[hIndex].func;
preHookFunc(sd, &nameid, monsterName);
@@ -6212,6 +6449,7 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearunit_single_pre ) {
void (*preHookFunc) (int *id, clr_type *type, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_single_pre[hIndex].func;
preHookFunc(&id, &type, &fd);
@@ -6237,6 +6475,7 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearunit_area_pre ) {
void (*preHookFunc) (struct block_list *bl, clr_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_area_pre[hIndex].func;
preHookFunc(bl, &type);
@@ -6262,6 +6501,7 @@ void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick)
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearunit_delayed_pre ) {
void (*preHookFunc) (struct block_list *bl, clr_type *type, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_pre[hIndex].func;
preHookFunc(bl, &type, &tick);
@@ -6287,6 +6527,7 @@ void HP_clif_walkok(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_walkok_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_walkok_pre[hIndex].func;
preHookFunc(sd);
@@ -6312,6 +6553,7 @@ void HP_clif_move(struct unit_data *ud) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_move_pre ) {
void (*preHookFunc) (struct unit_data *ud);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_move_pre[hIndex].func;
preHookFunc(ud);
@@ -6337,6 +6579,7 @@ void HP_clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data
int hIndex = 0;
if( HPMHooks.count.HP_clif_move2_pre ) {
void (*preHookFunc) (struct block_list *bl, struct view_data *vd, struct unit_data *ud);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_move2_pre[hIndex].func;
preHookFunc(bl, vd, ud);
@@ -6362,6 +6605,7 @@ void HP_clif_blown(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_blown_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_blown_pre[hIndex].func;
preHookFunc(bl);
@@ -6387,6 +6631,7 @@ void HP_clif_slide(struct block_list *bl, int x, int y) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_slide_pre ) {
void (*preHookFunc) (struct block_list *bl, int *x, int *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_slide_pre[hIndex].func;
preHookFunc(bl, &x, &y);
@@ -6412,6 +6657,7 @@ void HP_clif_fixpos(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_fixpos_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_fixpos_pre[hIndex].func;
preHookFunc(bl);
@@ -6437,6 +6683,7 @@ void HP_clif_changelook(struct block_list *bl, int type, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changelook_pre ) {
void (*preHookFunc) (struct block_list *bl, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changelook_pre[hIndex].func;
preHookFunc(bl, &type, &val);
@@ -6462,6 +6709,7 @@ void HP_clif_changetraplook(struct block_list *bl, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changetraplook_pre ) {
void (*preHookFunc) (struct block_list *bl, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changetraplook_pre[hIndex].func;
preHookFunc(bl, &val);
@@ -6487,6 +6735,7 @@ void HP_clif_refreshlook(struct block_list *bl, int id, int type, int val, enum
int hIndex = 0;
if( HPMHooks.count.HP_clif_refreshlook_pre ) {
void (*preHookFunc) (struct block_list *bl, int *id, int *type, int *val, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refreshlook_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_refreshlook_pre[hIndex].func;
preHookFunc(bl, &id, &type, &val, &target);
@@ -6512,6 +6761,7 @@ void HP_clif_class_change(struct block_list *bl, int class_, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_class_change_pre ) {
void (*preHookFunc) (struct block_list *bl, int *class_, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_class_change_pre[hIndex].func;
preHookFunc(bl, &class_, &type);
@@ -6537,6 +6787,7 @@ void HP_clif_skill_delunit(struct skill_unit *su) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_delunit_pre ) {
void (*preHookFunc) (struct skill_unit *su);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_delunit_pre[hIndex].func;
preHookFunc(su);
@@ -6562,6 +6813,7 @@ void HP_clif_skillunit_update(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skillunit_update_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skillunit_update_pre[hIndex].func;
preHookFunc(bl);
@@ -6588,6 +6840,7 @@ int HP_clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_clearunit_delayed_sub_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -6613,6 +6866,7 @@ void HP_clif_set_unit_idle(struct block_list *bl, struct map_session_data *tsd,
int hIndex = 0;
if( HPMHooks.count.HP_clif_set_unit_idle_pre ) {
void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_set_unit_idle_pre[hIndex].func;
preHookFunc(bl, tsd, &target);
@@ -6638,6 +6892,7 @@ void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_spawn_unit_pre ) {
void (*preHookFunc) (struct block_list *bl, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_spawn_unit_pre[hIndex].func;
preHookFunc(bl, &target);
@@ -6663,6 +6918,7 @@ void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_spawn_unit2_pre ) {
void (*preHookFunc) (struct block_list *bl, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_spawn_unit2_pre[hIndex].func;
preHookFunc(bl, &target);
@@ -6688,6 +6944,7 @@ void HP_clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd,
int hIndex = 0;
if( HPMHooks.count.HP_clif_set_unit_idle2_pre ) {
void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_set_unit_idle2_pre[hIndex].func;
preHookFunc(bl, tsd, &target);
@@ -6713,6 +6970,7 @@ void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *ts
int hIndex = 0;
if( HPMHooks.count.HP_clif_set_unit_walking_pre ) {
void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_walking_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_set_unit_walking_pre[hIndex].func;
preHookFunc(bl, tsd, ud, &target);
@@ -6739,6 +6997,7 @@ int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damag
int retVal___ = 0;
if( HPMHooks.count.HP_clif_calc_walkdelay_pre ) {
int (*preHookFunc) (struct block_list *bl, int *delay, int *type, int *damage, int *div_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_calc_walkdelay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_calc_walkdelay_pre[hIndex].func;
retVal___ = preHookFunc(bl, &delay, &type, &damage, &div_);
@@ -6764,6 +7023,7 @@ void HP_clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su,
int hIndex = 0;
if( HPMHooks.count.HP_clif_getareachar_skillunit_pre ) {
void (*preHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_pre[hIndex].func;
preHookFunc(bl, su, &target);
@@ -6789,6 +7049,7 @@ void HP_clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl
int hIndex = 0;
if( HPMHooks.count.HP_clif_getareachar_unit_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_getareachar_unit_pre[hIndex].func;
preHookFunc(sd, bl);
@@ -6814,6 +7075,7 @@ void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearchar_skillunit_pre ) {
void (*preHookFunc) (struct skill_unit *su, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearchar_skillunit_pre[hIndex].func;
preHookFunc(su, &fd);
@@ -6840,6 +7102,7 @@ int HP_clif_getareachar(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_getareachar_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_clif_getareachar_pre[hIndex].func;
@@ -6871,6 +7134,7 @@ void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum s
int hIndex = 0;
if( HPMHooks.count.HP_clif_graffiti_entry_pre ) {
void (*preHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_graffiti_entry_pre[hIndex].func;
preHookFunc(bl, su, &target);
@@ -6897,6 +7161,7 @@ bool HP_clif_spawn(struct block_list *bl) {
bool retVal___ = false;
if( HPMHooks.count.HP_clif_spawn_pre ) {
bool (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_spawn_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -6922,6 +7187,7 @@ void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changemap_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *m, int *x, int *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changemap_pre[hIndex].func;
preHookFunc(sd, &m, &x, &y);
@@ -6947,6 +7213,7 @@ void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_ta
int hIndex = 0;
if( HPMHooks.count.HP_clif_changemapcell_pre ) {
void (*preHookFunc) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapcell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changemapcell_pre[hIndex].func;
preHookFunc(&fd, &m, &x, &y, &type, &target);
@@ -6972,6 +7239,7 @@ void HP_clif_map_property(struct map_session_data *sd, enum map_property propert
int hIndex = 0;
if( HPMHooks.count.HP_clif_map_property_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum map_property *property);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_map_property_pre[hIndex].func;
preHookFunc(sd, &property);
@@ -6997,6 +7265,7 @@ void HP_clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum, int ty
int hIndex = 0;
if( HPMHooks.count.HP_clif_pvpset_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *pvprank, int *pvpnum, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pvpset_pre[hIndex].func;
preHookFunc(sd, &pvprank, &pvpnum, &type);
@@ -7022,6 +7291,7 @@ void HP_clif_map_property_mapall(int mapid, enum map_property property) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_map_property_mapall_pre ) {
void (*preHookFunc) (int *mapid, enum map_property *property);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_map_property_mapall_pre[hIndex].func;
preHookFunc(&mapid, &property);
@@ -7047,6 +7317,7 @@ void HP_clif_bossmapinfo(int fd, struct mob_data *md, short flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bossmapinfo_pre ) {
void (*preHookFunc) (int *fd, struct mob_data *md, short *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bossmapinfo_pre[hIndex].func;
preHookFunc(&fd, md, &flag);
@@ -7072,6 +7343,7 @@ void HP_clif_map_type(struct map_session_data *sd, enum map_type type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_map_type_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum map_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_map_type_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -7097,6 +7369,7 @@ void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_maptypeproperty2_pre ) {
void (*preHookFunc) (struct block_list *bl, enum send_target *t);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_maptypeproperty2_pre[hIndex].func;
preHookFunc(bl, &t);
@@ -7122,6 +7395,7 @@ void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_ind
int hIndex = 0;
if( HPMHooks.count.HP_clif_changemapserver_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changemapserver_pre[hIndex].func;
preHookFunc(sd, &map_index, &x, &y, &ip, &port);
@@ -7147,6 +7421,7 @@ void HP_clif_npcbuysell(struct map_session_data *sd, int id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_npcbuysell_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_npcbuysell_pre[hIndex].func;
preHookFunc(sd, &id);
@@ -7172,6 +7447,7 @@ void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_buylist_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buylist_pre[hIndex].func;
preHookFunc(sd, nd);
@@ -7197,6 +7473,7 @@ void HP_clif_selllist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_selllist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_selllist_pre[hIndex].func;
preHookFunc(sd);
@@ -7222,6 +7499,7 @@ void HP_clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cashshop_show_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cashshop_show_pre[hIndex].func;
preHookFunc(sd, nd);
@@ -7247,6 +7525,7 @@ void HP_clif_npc_buy_result(struct map_session_data *sd, unsigned char result) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_npc_buy_result_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_npc_buy_result_pre[hIndex].func;
preHookFunc(sd, &result);
@@ -7272,6 +7551,7 @@ void HP_clif_npc_sell_result(struct map_session_data *sd, unsigned char result)
int hIndex = 0;
if( HPMHooks.count.HP_clif_npc_sell_result_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_npc_sell_result_pre[hIndex].func;
preHookFunc(sd, &result);
@@ -7297,6 +7577,7 @@ void HP_clif_cashshop_ack(struct map_session_data *sd, int error) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cashshop_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *error);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cashshop_ack_pre[hIndex].func;
preHookFunc(sd, &error);
@@ -7322,6 +7603,7 @@ void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes)
int hIndex = 0;
if( HPMHooks.count.HP_clif_scriptmes_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_scriptmes_pre[hIndex].func;
preHookFunc(sd, &npcid, mes);
@@ -7347,6 +7629,7 @@ void HP_clif_scriptnext(struct map_session_data *sd, int npcid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_scriptnext_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_scriptnext_pre[hIndex].func;
preHookFunc(sd, &npcid);
@@ -7372,6 +7655,7 @@ void HP_clif_scriptclose(struct map_session_data *sd, int npcid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_scriptclose_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_scriptclose_pre[hIndex].func;
preHookFunc(sd, &npcid);
@@ -7397,6 +7681,7 @@ void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes)
int hIndex = 0;
if( HPMHooks.count.HP_clif_scriptmenu_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_scriptmenu_pre[hIndex].func;
preHookFunc(sd, &npcid, mes);
@@ -7422,6 +7707,7 @@ void HP_clif_scriptinput(struct map_session_data *sd, int npcid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_scriptinput_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_scriptinput_pre[hIndex].func;
preHookFunc(sd, &npcid);
@@ -7447,6 +7733,7 @@ void HP_clif_scriptinputstr(struct map_session_data *sd, int npcid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_scriptinputstr_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_scriptinputstr_pre[hIndex].func;
preHookFunc(sd, &npcid);
@@ -7472,6 +7759,7 @@ void HP_clif_cutin(struct map_session_data *sd, const char *image, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cutin_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *image, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cutin_pre[hIndex].func;
preHookFunc(sd, image, &type);
@@ -7497,6 +7785,7 @@ void HP_clif_sendfakenpc(struct map_session_data *sd, int npcid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_sendfakenpc_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_sendfakenpc_pre[hIndex].func;
preHookFunc(sd, &npcid);
@@ -7522,6 +7811,7 @@ void HP_clif_scriptclear(struct map_session_data *sd, int npcid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_scriptclear_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_scriptclear_pre[hIndex].func;
preHookFunc(sd, &npcid);
@@ -7547,6 +7837,7 @@ void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x,
int hIndex = 0;
if( HPMHooks.count.HP_clif_viewpoint_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *npc_id, int *type, int *x, int *y, int *id, int *color);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewpoint_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_viewpoint_pre[hIndex].func;
preHookFunc(sd, &npc_id, &type, &x, &y, &id, &color);
@@ -7573,6 +7864,7 @@ int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, i
int retVal___ = 0;
if( HPMHooks.count.HP_clif_damage_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *dst, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, dst, &sdelay, &ddelay, &damage, &div, &type, &damage2);
@@ -7598,6 +7890,7 @@ void HP_clif_sitting(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_sitting_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_sitting_pre[hIndex].func;
preHookFunc(bl);
@@ -7623,6 +7916,7 @@ void HP_clif_standing(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_standing_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_standing_pre[hIndex].func;
preHookFunc(bl);
@@ -7648,6 +7942,7 @@ void HP_clif_arrow_create_list(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_arrow_create_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_arrow_create_list_pre[hIndex].func;
preHookFunc(sd);
@@ -7669,10 +7964,37 @@ void HP_clif_arrow_create_list(struct map_session_data *sd) {
}
return;
}
+void HP_clif_refresh_storagewindow(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_refresh_storagewindow_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.refresh_storagewindow(sd);
+ }
+ if( HPMHooks.count.HP_clif_refresh_storagewindow_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
void HP_clif_refresh(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_refresh_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_refresh_pre[hIndex].func;
preHookFunc(sd);
@@ -7698,6 +8020,7 @@ void HP_clif_fame_blacksmith(struct map_session_data *sd, int points) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_fame_blacksmith_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_fame_blacksmith_pre[hIndex].func;
preHookFunc(sd, &points);
@@ -7723,6 +8046,7 @@ void HP_clif_fame_alchemist(struct map_session_data *sd, int points) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_fame_alchemist_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_fame_alchemist_pre[hIndex].func;
preHookFunc(sd, &points);
@@ -7748,6 +8072,7 @@ void HP_clif_fame_taekwon(struct map_session_data *sd, int points) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_fame_taekwon_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_fame_taekwon_pre[hIndex].func;
preHookFunc(sd, &points);
@@ -7773,6 +8098,7 @@ void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_ranklist_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum fame_list_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_ranklist_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -7798,6 +8124,7 @@ void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_typ
int hIndex = 0;
if( HPMHooks.count.HP_clif_update_rankingpoint_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum fame_list_type *type, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_update_rankingpoint_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_update_rankingpoint_pre[hIndex].func;
preHookFunc(sd, &type, &points);
@@ -7823,6 +8150,7 @@ void HP_clif_pRanklist(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pRanklist_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pRanklist_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -7848,6 +8176,7 @@ void HP_clif_hotkeys(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_hotkeys_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_hotkeys_pre[hIndex].func;
preHookFunc(sd);
@@ -7874,6 +8203,7 @@ int HP_clif_insight(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_insight_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_clif_insight_pre[hIndex].func;
@@ -7906,6 +8236,7 @@ int HP_clif_outsight(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_outsight_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_clif_outsight_pre[hIndex].func;
@@ -7937,6 +8268,7 @@ void HP_clif_skillcastcancel(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skillcastcancel_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skillcastcancel_pre[hIndex].func;
preHookFunc(bl);
@@ -7962,6 +8294,7 @@ void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum usesk
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_fail_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_fail_pre[hIndex].func;
preHookFunc(sd, &skill_id, &cause, &btype);
@@ -7987,6 +8320,7 @@ void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsign
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_cooldown_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *duration);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_cooldown_pre[hIndex].func;
preHookFunc(sd, &skill_id, &duration);
@@ -8012,6 +8346,7 @@ void HP_clif_skill_memomessage(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_memomessage_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_memomessage_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -8037,6 +8372,7 @@ void HP_clif_skill_mapinfomessage(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_mapinfomessage_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_mapinfomessage_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -8062,6 +8398,7 @@ void HP_clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, i
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_produce_mix_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *trigger);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_produce_mix_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_produce_mix_list_pre[hIndex].func;
preHookFunc(sd, &skill_id, &trigger);
@@ -8087,6 +8424,7 @@ void HP_clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill
int hIndex = 0;
if( HPMHooks.count.HP_clif_cooking_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *trigger, uint16 *skill_id, int *qty, int *list_type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooking_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cooking_list_pre[hIndex].func;
preHookFunc(sd, &trigger, &skill_id, &qty, &list_type);
@@ -8112,6 +8450,7 @@ void HP_clif_autospell(struct map_session_data *sd, uint16 skill_lv) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_autospell_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_autospell_pre[hIndex].func;
preHookFunc(sd, &skill_lv);
@@ -8137,6 +8476,7 @@ void HP_clif_combo_delay(struct block_list *bl, int wait) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_combo_delay_pre ) {
void (*preHookFunc) (struct block_list *bl, int *wait);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_combo_delay_pre[hIndex].func;
preHookFunc(bl, &wait);
@@ -8162,6 +8502,7 @@ void HP_clif_status_change(struct block_list *bl, int type, int flag, int tick,
int hIndex = 0;
if( HPMHooks.count.HP_clif_status_change_pre ) {
void (*preHookFunc) (struct block_list *bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_status_change_pre[hIndex].func;
preHookFunc(bl, &type, &flag, &tick, &val1, &val2, &val3);
@@ -8187,6 +8528,7 @@ void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_car
int hIndex = 0;
if( HPMHooks.count.HP_clif_insert_card_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx_equip, int *idx_card, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insert_card_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_insert_card_pre[hIndex].func;
preHookFunc(sd, &idx_equip, &idx_card, &flag);
@@ -8212,6 +8554,7 @@ void HP_clif_inventorylist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_inventorylist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_inventorylist_pre[hIndex].func;
preHookFunc(sd);
@@ -8237,6 +8580,7 @@ void HP_clif_equiplist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_equiplist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_equiplist_pre[hIndex].func;
preHookFunc(sd);
@@ -8262,6 +8606,7 @@ void HP_clif_cartlist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cartlist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cartlist_pre[hIndex].func;
preHookFunc(sd);
@@ -8287,6 +8632,7 @@ void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_favorite_item_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_favorite_item_pre[hIndex].func;
preHookFunc(sd, &index);
@@ -8312,6 +8658,7 @@ void HP_clif_clearcart(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearcart_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearcart_pre[hIndex].func;
preHookFunc(&fd);
@@ -8337,6 +8684,7 @@ void HP_clif_item_identify_list(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_identify_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_identify_list_pre[hIndex].func;
preHookFunc(sd);
@@ -8362,6 +8710,7 @@ void HP_clif_item_identified(struct map_session_data *sd, int idx, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_identified_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_identified_pre[hIndex].func;
preHookFunc(sd, &idx, &flag);
@@ -8387,6 +8736,7 @@ void HP_clif_item_repair_list(struct map_session_data *sd, struct map_session_da
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_repair_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd, int *lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repair_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_repair_list_pre[hIndex].func;
preHookFunc(sd, dstsd, &lv);
@@ -8412,6 +8762,7 @@ void HP_clif_item_repaireffect(struct map_session_data *sd, int idx, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_repaireffect_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_repaireffect_pre[hIndex].func;
preHookFunc(sd, &idx, &flag);
@@ -8437,6 +8788,7 @@ void HP_clif_item_damaged(struct map_session_data *sd, unsigned short position)
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_damaged_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *position);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_damaged_pre[hIndex].func;
preHookFunc(sd, &position);
@@ -8462,6 +8814,7 @@ void HP_clif_item_refine_list(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_refine_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_refine_list_pre[hIndex].func;
preHookFunc(sd);
@@ -8487,6 +8840,7 @@ void HP_clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 ski
int hIndex = 0;
if( HPMHooks.count.HP_clif_item_skill_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_skill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_item_skill_pre[hIndex].func;
preHookFunc(sd, &skill_id, &skill_lv);
@@ -8512,6 +8866,7 @@ void HP_clif_mvp_item(struct map_session_data *sd, int nameid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mvp_item_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mvp_item_pre[hIndex].func;
preHookFunc(sd, &nameid);
@@ -8537,6 +8892,7 @@ void HP_clif_mvp_exp(struct map_session_data *sd, unsigned int exp) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mvp_exp_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *exp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mvp_exp_pre[hIndex].func;
preHookFunc(sd, &exp);
@@ -8562,6 +8918,7 @@ void HP_clif_mvp_noitem(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mvp_noitem_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mvp_noitem_pre[hIndex].func;
preHookFunc(sd);
@@ -8587,6 +8944,7 @@ void HP_clif_changed_dir(struct block_list *bl, enum send_target target) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changed_dir_pre ) {
void (*preHookFunc) (struct block_list *bl, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changed_dir_pre[hIndex].func;
preHookFunc(bl, &target);
@@ -8612,6 +8970,7 @@ void HP_clif_charnameack(int fd, struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_charnameack_pre ) {
void (*preHookFunc) (int *fd, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_charnameack_pre[hIndex].func;
preHookFunc(&fd, bl);
@@ -8637,6 +8996,7 @@ void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_monster_hp_bar_pre ) {
void (*preHookFunc) (struct mob_data *md, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_monster_hp_bar_pre[hIndex].func;
preHookFunc(md, sd);
@@ -8663,6 +9023,7 @@ int HP_clif_hpmeter(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_hpmeter_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_hpmeter_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -8688,6 +9049,7 @@ void HP_clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp)
int hIndex = 0;
if( HPMHooks.count.HP_clif_hpmeter_single_pre ) {
void (*preHookFunc) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_hpmeter_single_pre[hIndex].func;
preHookFunc(&fd, &id, &hp, &maxhp);
@@ -8714,6 +9076,7 @@ int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_hpmeter_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_clif_hpmeter_sub_pre[hIndex].func;
@@ -8745,6 +9108,7 @@ void HP_clif_upgrademessage(int fd, int result, int item_id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_upgrademessage_pre ) {
void (*preHookFunc) (int *fd, int *result, int *item_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_upgrademessage_pre[hIndex].func;
preHookFunc(&fd, &result, &item_id);
@@ -8770,6 +9134,7 @@ void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand,
int hIndex = 0;
if( HPMHooks.count.HP_clif_get_weapon_view_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_get_weapon_view_pre[hIndex].func;
preHookFunc(sd, rhand, lhand);
@@ -8795,6 +9160,7 @@ void HP_clif_gospel_info(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_gospel_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_gospel_info_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -8820,6 +9186,7 @@ void HP_clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_feel_req_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_feel_req_pre[hIndex].func;
preHookFunc(&fd, sd, &skill_lv);
@@ -8845,6 +9212,7 @@ void HP_clif_starskill(struct map_session_data *sd, const char *mapname, int mon
int hIndex = 0;
if( HPMHooks.count.HP_clif_starskill_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *mapname, int *monster_id, unsigned char *star, unsigned char *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_starskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_starskill_pre[hIndex].func;
preHookFunc(sd, mapname, &monster_id, &star, &result);
@@ -8870,6 +9238,7 @@ void HP_clif_feel_info(struct map_session_data *sd, unsigned char feel_level, un
int hIndex = 0;
if( HPMHooks.count.HP_clif_feel_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *feel_level, unsigned char *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_feel_info_pre[hIndex].func;
preHookFunc(sd, &feel_level, &type);
@@ -8895,6 +9264,7 @@ void HP_clif_hate_info(struct map_session_data *sd, unsigned char hate_level, in
int hIndex = 0;
if( HPMHooks.count.HP_clif_hate_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *hate_level, int *class_, unsigned char *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hate_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_hate_info_pre[hIndex].func;
preHookFunc(sd, &hate_level, &class_, &type);
@@ -8920,6 +9290,7 @@ void HP_clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char
int hIndex = 0;
if( HPMHooks.count.HP_clif_mission_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *mob_id, unsigned char *progress);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mission_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mission_info_pre[hIndex].func;
preHookFunc(sd, &mob_id, &progress);
@@ -8945,6 +9316,7 @@ void HP_clif_feel_hate_reset(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_feel_hate_reset_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_feel_hate_reset_pre[hIndex].func;
preHookFunc(sd);
@@ -8970,6 +9342,7 @@ void HP_clif_partytickack(struct map_session_data *sd, bool flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_partytickack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, bool *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_partytickack_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -8995,6 +9368,7 @@ void HP_clif_equiptickack(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_equiptickack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_equiptickack_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -9020,6 +9394,7 @@ void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data
int hIndex = 0;
if( HPMHooks.count.HP_clif_viewequip_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_viewequip_ack_pre[hIndex].func;
preHookFunc(sd, tsd);
@@ -9045,6 +9420,7 @@ void HP_clif_equpcheckbox(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_equpcheckbox_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_equpcheckbox_pre[hIndex].func;
preHookFunc(sd);
@@ -9070,6 +9446,7 @@ void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type
int hIndex = 0;
if( HPMHooks.count.HP_clif_displayexp_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *exp, char *type, bool *is_quest);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_displayexp_pre[hIndex].func;
preHookFunc(sd, &exp, &type, &is_quest);
@@ -9095,6 +9472,7 @@ void HP_clif_font(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_font_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_font_pre[hIndex].func;
preHookFunc(sd);
@@ -9120,6 +9498,7 @@ void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsign
int hIndex = 0;
if( HPMHooks.count.HP_clif_progressbar_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *color, unsigned int *second);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_progressbar_pre[hIndex].func;
preHookFunc(sd, &color, &second);
@@ -9145,6 +9524,7 @@ void HP_clif_progressbar_abort(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_progressbar_abort_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_progressbar_abort_pre[hIndex].func;
preHookFunc(sd);
@@ -9170,6 +9550,7 @@ void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int valu
int hIndex = 0;
if( HPMHooks.count.HP_clif_showdigit_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_showdigit_pre[hIndex].func;
preHookFunc(sd, &type, &value);
@@ -9196,6 +9577,7 @@ int HP_clif_elementalconverter_list(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_elementalconverter_list_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_elementalconverter_list_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -9222,6 +9604,7 @@ int HP_clif_spellbook_list(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_spellbook_list_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_spellbook_list_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -9248,6 +9631,7 @@ int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short
int retVal___ = 0;
if( HPMHooks.count.HP_clif_magicdecoy_list_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv, short *x, short *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_magicdecoy_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_magicdecoy_list_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_lv, &x, &y);
@@ -9274,6 +9658,7 @@ int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_poison_list_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_poison_list_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_lv);
@@ -9300,6 +9685,7 @@ int HP_clif_autoshadowspell_list(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_autoshadowspell_list_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_autoshadowspell_list_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -9326,6 +9712,7 @@ int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, u
int retVal___ = 0;
if( HPMHooks.count.HP_clif_skill_itemlistwindow_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_itemlistwindow_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_itemlistwindow_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
@@ -9351,6 +9738,7 @@ void HP_clif_sc_load(struct block_list *bl, int tid, enum send_target target, in
int hIndex = 0;
if( HPMHooks.count.HP_clif_sc_load_pre ) {
void (*preHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_load_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_sc_load_pre[hIndex].func;
preHookFunc(bl, &tid, &target, &type, &val1, &val2, &val3);
@@ -9376,6 +9764,7 @@ void HP_clif_sc_end(struct block_list *bl, int tid, enum send_target target, int
int hIndex = 0;
if( HPMHooks.count.HP_clif_sc_end_pre ) {
void (*preHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_sc_end_pre[hIndex].func;
preHookFunc(bl, &tid, &target, &type);
@@ -9401,6 +9790,7 @@ void HP_clif_initialstatus(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_initialstatus_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_initialstatus_pre[hIndex].func;
preHookFunc(sd);
@@ -9426,6 +9816,7 @@ void HP_clif_cooldown_list(int fd, struct skill_cd *cd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_cooldown_list_pre ) {
void (*preHookFunc) (int *fd, struct skill_cd *cd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_cooldown_list_pre[hIndex].func;
preHookFunc(&fd, cd);
@@ -9451,6 +9842,7 @@ void HP_clif_updatestatus(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_updatestatus_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_updatestatus_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -9476,6 +9868,7 @@ void HP_clif_changestatus(struct map_session_data *sd, int type, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changestatus_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changestatus_pre[hIndex].func;
preHookFunc(sd, &type, &val);
@@ -9501,6 +9894,7 @@ void HP_clif_statusupack(struct map_session_data *sd, int type, int ok, int val)
int hIndex = 0;
if( HPMHooks.count.HP_clif_statusupack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type, int *ok, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_statusupack_pre[hIndex].func;
preHookFunc(sd, &type, &ok, &val);
@@ -9526,6 +9920,7 @@ void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_movetoattack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_movetoattack_pre[hIndex].func;
preHookFunc(sd, bl);
@@ -9551,6 +9946,7 @@ void HP_clif_solved_charname(int fd, int charid, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_solved_charname_pre ) {
void (*preHookFunc) (int *fd, int *charid, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_solved_charname_pre[hIndex].func;
preHookFunc(&fd, &charid, name);
@@ -9576,6 +9972,7 @@ void HP_clif_charnameupdate(struct map_session_data *ssd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_charnameupdate_pre ) {
void (*preHookFunc) (struct map_session_data *ssd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_charnameupdate_pre[hIndex].func;
preHookFunc(ssd);
@@ -9602,6 +9999,7 @@ int HP_clif_delayquit(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_delayquit_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_delayquit_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -9627,6 +10025,7 @@ void HP_clif_getareachar_pc(struct map_session_data *sd, struct map_session_data
int hIndex = 0;
if( HPMHooks.count.HP_clif_getareachar_pc_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_getareachar_pc_pre[hIndex].func;
preHookFunc(sd, dstsd);
@@ -9652,6 +10051,7 @@ void HP_clif_disconnect_ack(struct map_session_data *sd, short result) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_disconnect_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_disconnect_ack_pre[hIndex].func;
preHookFunc(sd, &result);
@@ -9677,6 +10077,7 @@ void HP_clif_PVPInfo(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PVPInfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PVPInfo_pre[hIndex].func;
preHookFunc(sd);
@@ -9702,6 +10103,7 @@ void HP_clif_blacksmith(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_blacksmith_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_blacksmith_pre[hIndex].func;
preHookFunc(sd);
@@ -9727,6 +10129,7 @@ void HP_clif_alchemist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_alchemist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_alchemist_pre[hIndex].func;
preHookFunc(sd);
@@ -9752,6 +10155,7 @@ void HP_clif_taekwon(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_taekwon_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_taekwon_pre[hIndex].func;
preHookFunc(sd);
@@ -9777,6 +10181,7 @@ void HP_clif_ranking_pk(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_ranking_pk_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_ranking_pk_pre[hIndex].func;
preHookFunc(sd);
@@ -9802,6 +10207,7 @@ void HP_clif_quitsave(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_quitsave_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quitsave_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -9827,6 +10233,7 @@ void HP_clif_misceffect(struct block_list *bl, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_misceffect_pre ) {
void (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_misceffect_pre[hIndex].func;
preHookFunc(bl, &type);
@@ -9852,6 +10259,7 @@ void HP_clif_changeoption(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changeoption_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changeoption_pre[hIndex].func;
preHookFunc(bl);
@@ -9877,6 +10285,7 @@ void HP_clif_changeoption2(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changeoption2_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changeoption2_pre[hIndex].func;
preHookFunc(bl);
@@ -9902,6 +10311,7 @@ void HP_clif_emotion(struct block_list *bl, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_emotion_pre ) {
void (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_emotion_pre[hIndex].func;
preHookFunc(bl, &type);
@@ -9927,6 +10337,7 @@ void HP_clif_talkiebox(struct block_list *bl, const char *talkie) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_talkiebox_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *talkie);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_talkiebox_pre[hIndex].func;
preHookFunc(bl, talkie);
@@ -9952,6 +10363,7 @@ void HP_clif_wedding_effect(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_wedding_effect_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_wedding_effect_pre[hIndex].func;
preHookFunc(bl);
@@ -9977,6 +10389,7 @@ void HP_clif_divorced(struct map_session_data *sd, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_divorced_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_divorced_pre[hIndex].func;
preHookFunc(sd, name);
@@ -10002,6 +10415,7 @@ void HP_clif_callpartner(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_callpartner_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_callpartner_pre[hIndex].func;
preHookFunc(sd);
@@ -10028,6 +10442,7 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 t
int retVal___ = 0;
if( HPMHooks.count.HP_clif_skill_damage_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type);
@@ -10054,6 +10469,7 @@ int HP_clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint1
int retVal___ = 0;
if( HPMHooks.count.HP_clif_skill_nodamage_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *dst, uint16 *skill_id, int *heal, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_nodamage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_nodamage_pre[hIndex].func;
retVal___ = preHookFunc(src, dst, &skill_id, &heal, &fail);
@@ -10079,6 +10495,7 @@ void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, i
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_poseffect_pre ) {
void (*preHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_poseffect_pre[hIndex].func;
preHookFunc(src, &skill_id, &val, &x, &y, &tick);
@@ -10104,6 +10521,7 @@ void HP_clif_skill_estimation(struct map_session_data *sd, struct block_list *ds
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_estimation_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct block_list *dst);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_estimation_pre[hIndex].func;
preHookFunc(sd, dst);
@@ -10129,6 +10547,7 @@ void HP_clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, uint1
int hIndex = 0;
if( HPMHooks.count.HP_clif_skill_warppoint_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, unsigned short *map1, unsigned short *map2, unsigned short *map3, unsigned short *map4);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_warppoint_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skill_warppoint_pre[hIndex].func;
preHookFunc(sd, &skill_id, &skill_lv, &map1, &map2, &map3, &map4);
@@ -10154,6 +10573,7 @@ void HP_clif_skillcasting(struct block_list *bl, int src_id, int dst_id, int dst
int hIndex = 0;
if( HPMHooks.count.HP_clif_skillcasting_pre ) {
void (*preHookFunc) (struct block_list *bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, int *property, int *casttime);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcasting_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skillcasting_pre[hIndex].func;
preHookFunc(bl, &src_id, &dst_id, &dst_x, &dst_y, &skill_id, &property, &casttime);
@@ -10179,6 +10599,7 @@ void HP_clif_produce_effect(struct map_session_data *sd, int flag, int nameid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_produce_effect_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_produce_effect_pre[hIndex].func;
preHookFunc(sd, &flag, &nameid);
@@ -10204,6 +10625,7 @@ void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_devotion_pre ) {
void (*preHookFunc) (struct block_list *src, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_devotion_pre[hIndex].func;
preHookFunc(src, tsd);
@@ -10229,6 +10651,7 @@ void HP_clif_spiritball(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_spiritball_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_spiritball_pre[hIndex].func;
preHookFunc(bl);
@@ -10254,6 +10677,7 @@ void HP_clif_spiritball_single(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_spiritball_single_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_spiritball_single_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -10279,6 +10703,7 @@ void HP_clif_bladestop(struct block_list *src, int dst_id, int active) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bladestop_pre ) {
void (*preHookFunc) (struct block_list *src, int *dst_id, int *active);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bladestop_pre[hIndex].func;
preHookFunc(src, &dst_id, &active);
@@ -10304,6 +10729,7 @@ void HP_clif_mvp_effect(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mvp_effect_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mvp_effect_pre[hIndex].func;
preHookFunc(sd);
@@ -10329,6 +10755,7 @@ void HP_clif_heal(int fd, int type, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_heal_pre ) {
void (*preHookFunc) (int *fd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_heal_pre[hIndex].func;
preHookFunc(&fd, &type, &val);
@@ -10354,6 +10781,7 @@ void HP_clif_resurrection(struct block_list *bl, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_resurrection_pre ) {
void (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_resurrection_pre[hIndex].func;
preHookFunc(bl, &type);
@@ -10379,6 +10807,7 @@ void HP_clif_refine(int fd, int fail, int index, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_refine_pre ) {
void (*preHookFunc) (int *fd, int *fail, int *index, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_refine_pre[hIndex].func;
preHookFunc(&fd, &fail, &index, &val);
@@ -10404,6 +10833,7 @@ void HP_clif_weather(int16 m) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_weather_pre ) {
void (*preHookFunc) (int16 *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_weather_pre[hIndex].func;
preHookFunc(&m);
@@ -10429,6 +10859,7 @@ void HP_clif_specialeffect(struct block_list *bl, int type, enum send_target tar
int hIndex = 0;
if( HPMHooks.count.HP_clif_specialeffect_pre ) {
void (*preHookFunc) (struct block_list *bl, int *type, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_specialeffect_pre[hIndex].func;
preHookFunc(bl, &type, &target);
@@ -10454,6 +10885,7 @@ void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_specialeffect_single_pre ) {
void (*preHookFunc) (struct block_list *bl, int *type, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_specialeffect_single_pre[hIndex].func;
preHookFunc(bl, &type, &fd);
@@ -10479,6 +10911,7 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num,
int hIndex = 0;
if( HPMHooks.count.HP_clif_specialeffect_value_pre ) {
void (*preHookFunc) (struct block_list *bl, int *effect_id, int *num, send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_pre[hIndex].func;
preHookFunc(bl, &effect_id, &num, &target);
@@ -10504,6 +10937,7 @@ void HP_clif_millenniumshield(struct block_list *bl, short shields) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_millenniumshield_pre ) {
void (*preHookFunc) (struct block_list *bl, short *shields);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_millenniumshield_pre[hIndex].func;
preHookFunc(bl, &shields);
@@ -10529,6 +10963,7 @@ void HP_clif_charm(struct map_session_data *sd, short type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_charm_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_charm_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -10554,6 +10989,7 @@ void HP_clif_charm_single(int fd, struct map_session_data *sd, short type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_charm_single_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd, short *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_charm_single_pre[hIndex].func;
preHookFunc(&fd, sd, &type);
@@ -10579,6 +11015,7 @@ void HP_clif_snap(struct block_list *bl, short x, short y) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_snap_pre ) {
void (*preHookFunc) (struct block_list *bl, short *x, short *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_snap_pre[hIndex].func;
preHookFunc(bl, &x, &y);
@@ -10604,6 +11041,7 @@ void HP_clif_weather_check(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_weather_check_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_weather_check_pre[hIndex].func;
preHookFunc(sd);
@@ -10629,6 +11067,7 @@ void HP_clif_playBGM(struct map_session_data *sd, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_playBGM_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_playBGM_pre[hIndex].func;
preHookFunc(sd, name);
@@ -10654,6 +11093,7 @@ void HP_clif_soundeffect(struct map_session_data *sd, struct block_list *bl, con
int hIndex = 0;
if( HPMHooks.count.HP_clif_soundeffect_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, const char *name, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_soundeffect_pre[hIndex].func;
preHookFunc(sd, bl, name, &type);
@@ -10679,6 +11119,7 @@ void HP_clif_soundeffectall(struct block_list *bl, const char *name, int type, e
int hIndex = 0;
if( HPMHooks.count.HP_clif_soundeffectall_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *name, int *type, enum send_target *coverage);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffectall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_soundeffectall_pre[hIndex].func;
preHookFunc(bl, name, &type, &coverage);
@@ -10704,6 +11145,7 @@ void HP_clif_GlobalMessage(struct block_list *bl, const char *message) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_GlobalMessage_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_GlobalMessage_pre[hIndex].func;
preHookFunc(bl, message);
@@ -10729,6 +11171,7 @@ void HP_clif_createchat(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_createchat_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_createchat_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -10754,6 +11197,7 @@ void HP_clif_dispchat(struct chat_data *cd, int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_dispchat_pre ) {
void (*preHookFunc) (struct chat_data *cd, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_dispchat_pre[hIndex].func;
preHookFunc(cd, &fd);
@@ -10779,6 +11223,7 @@ void HP_clif_joinchatfail(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_joinchatfail_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_joinchatfail_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -10804,6 +11249,7 @@ void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_joinchatok_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct chat_data *cd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_joinchatok_pre[hIndex].func;
preHookFunc(sd, cd);
@@ -10829,6 +11275,7 @@ void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_addchat_pre ) {
void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_addchat_pre[hIndex].func;
preHookFunc(cd, sd);
@@ -10854,6 +11301,7 @@ void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd)
int hIndex = 0;
if( HPMHooks.count.HP_clif_changechatowner_pre ) {
void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changechatowner_pre[hIndex].func;
preHookFunc(cd, sd);
@@ -10879,6 +11327,7 @@ void HP_clif_clearchat(struct chat_data *cd, int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_clearchat_pre ) {
void (*preHookFunc) (struct chat_data *cd, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_clearchat_pre[hIndex].func;
preHookFunc(cd, &fd);
@@ -10904,6 +11353,7 @@ void HP_clif_leavechat(struct chat_data *cd, struct map_session_data *sd, bool f
int hIndex = 0;
if( HPMHooks.count.HP_clif_leavechat_pre ) {
void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd, bool *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_leavechat_pre[hIndex].func;
preHookFunc(cd, sd, &flag);
@@ -10929,6 +11379,7 @@ void HP_clif_changechatstatus(struct chat_data *cd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_changechatstatus_pre ) {
void (*preHookFunc) (struct chat_data *cd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_changechatstatus_pre[hIndex].func;
preHookFunc(cd);
@@ -10954,6 +11405,7 @@ void HP_clif_wis_message(int fd, const char *nick, const char *mes, size_t mes_l
int hIndex = 0;
if( HPMHooks.count.HP_clif_wis_message_pre ) {
void (*preHookFunc) (int *fd, const char *nick, const char *mes, size_t *mes_len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_wis_message_pre[hIndex].func;
preHookFunc(&fd, nick, mes, &mes_len);
@@ -10979,6 +11431,7 @@ void HP_clif_wis_end(int fd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_wis_end_pre ) {
void (*preHookFunc) (int *fd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_wis_end_pre[hIndex].func;
preHookFunc(&fd, &flag);
@@ -11004,6 +11457,7 @@ void HP_clif_disp_message(struct block_list *src, const char *mes, size_t len, e
int hIndex = 0;
if( HPMHooks.count.HP_clif_disp_message_pre ) {
void (*preHookFunc) (struct block_list *src, const char *mes, size_t *len, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_disp_message_pre[hIndex].func;
preHookFunc(src, mes, &len, &target);
@@ -11029,6 +11483,7 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, size_t len, int t
int hIndex = 0;
if( HPMHooks.count.HP_clif_broadcast_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *mes, size_t *len, int *type, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_broadcast_pre[hIndex].func;
preHookFunc(bl, mes, &len, &type, &target);
@@ -11054,6 +11509,7 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, size_t len, unsi
int hIndex = 0;
if( HPMHooks.count.HP_clif_broadcast2_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_broadcast2_pre[hIndex].func;
preHookFunc(bl, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target);
@@ -11079,6 +11535,7 @@ void HP_clif_messagecolor(struct block_list *bl, unsigned int color, const char
int hIndex = 0;
if( HPMHooks.count.HP_clif_messagecolor_pre ) {
void (*preHookFunc) (struct block_list *bl, unsigned int *color, const char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_messagecolor_pre[hIndex].func;
preHookFunc(bl, &color, msg);
@@ -11104,6 +11561,7 @@ void HP_clif_disp_overhead(struct block_list *bl, const char *mes) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_disp_overhead_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_disp_overhead_pre[hIndex].func;
preHookFunc(bl, mes);
@@ -11129,6 +11587,7 @@ void HP_clif_msg(struct map_session_data *sd, unsigned short id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_msg_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_msg_pre[hIndex].func;
preHookFunc(sd, &id);
@@ -11154,6 +11613,7 @@ void HP_clif_msg_value(struct map_session_data *sd, unsigned short id, int value
int hIndex = 0;
if( HPMHooks.count.HP_clif_msg_value_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *id, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_msg_value_pre[hIndex].func;
preHookFunc(sd, &id, &value);
@@ -11179,6 +11639,7 @@ void HP_clif_msg_skill(struct map_session_data *sd, uint16 skill_id, int msg_id)
int hIndex = 0;
if( HPMHooks.count.HP_clif_msg_skill_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_msg_skill_pre[hIndex].func;
preHookFunc(sd, &skill_id, &msg_id);
@@ -11204,6 +11665,7 @@ void HP_clif_msgtable(int fd, int line) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_msgtable_pre ) {
void (*preHookFunc) (int *fd, int *line);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func;
preHookFunc(&fd, &line);
@@ -11229,6 +11691,7 @@ void HP_clif_msgtable_num(int fd, int line, int num) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_msgtable_num_pre ) {
void (*preHookFunc) (int *fd, int *line, int *num);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func;
preHookFunc(&fd, &line, &num);
@@ -11254,6 +11717,7 @@ void HP_clif_message(const int fd, const char *mes) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_message_pre ) {
void (*preHookFunc) (const int *fd, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_message_pre[hIndex].func;
preHookFunc(&fd, mes);
@@ -11279,6 +11743,7 @@ void HP_clif_messageln(const int fd, const char *mes) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_messageln_pre ) {
void (*preHookFunc) (const int *fd, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_messageln_pre[hIndex].func;
preHookFunc(&fd, mes);
@@ -11305,6 +11770,7 @@ int HP_clif_colormes(int fd, enum clif_colors color, const char *msg) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_colormes_pre ) {
int (*preHookFunc) (int *fd, enum clif_colors *color, const char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_colormes_pre[hIndex].func;
retVal___ = preHookFunc(&fd, &color, msg);
@@ -11331,6 +11797,7 @@ bool HP_clif_process_message(struct map_session_data *sd, int format, char **nam
bool retVal___ = false;
if( HPMHooks.count.HP_clif_process_message_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_process_message_pre[hIndex].func;
retVal___ = preHookFunc(sd, &format, name_, namelen_, message_, messagelen_);
@@ -11356,6 +11823,7 @@ void HP_clif_wisexin(struct map_session_data *sd, int type, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_wisexin_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_wisexin_pre[hIndex].func;
preHookFunc(sd, &type, &flag);
@@ -11381,6 +11849,7 @@ void HP_clif_wisall(struct map_session_data *sd, int type, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_wisall_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_wisall_pre[hIndex].func;
preHookFunc(sd, &type, &flag);
@@ -11406,6 +11875,7 @@ void HP_clif_PMIgnoreList(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PMIgnoreList_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PMIgnoreList_pre[hIndex].func;
preHookFunc(sd);
@@ -11431,6 +11901,7 @@ void HP_clif_ShowScript(struct block_list *bl, const char *message) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_ShowScript_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_ShowScript_pre[hIndex].func;
preHookFunc(bl, message);
@@ -11456,6 +11927,7 @@ void HP_clif_traderequest(struct map_session_data *sd, const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_traderequest_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_traderequest_pre[hIndex].func;
preHookFunc(sd, name);
@@ -11481,6 +11953,7 @@ void HP_clif_tradestart(struct map_session_data *sd, uint8 type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_tradestart_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint8 *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_tradestart_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -11506,6 +11979,7 @@ void HP_clif_tradeadditem(struct map_session_data *sd, struct map_session_data *
int hIndex = 0;
if( HPMHooks.count.HP_clif_tradeadditem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeadditem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_tradeadditem_pre[hIndex].func;
preHookFunc(sd, tsd, &index, &amount);
@@ -11531,6 +12005,7 @@ void HP_clif_tradeitemok(struct map_session_data *sd, int index, int fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_tradeitemok_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *index, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_tradeitemok_pre[hIndex].func;
preHookFunc(sd, &index, &fail);
@@ -11556,6 +12031,7 @@ void HP_clif_tradedeal_lock(struct map_session_data *sd, int fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_tradedeal_lock_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_tradedeal_lock_pre[hIndex].func;
preHookFunc(sd, &fail);
@@ -11581,6 +12057,7 @@ void HP_clif_tradecancelled(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_tradecancelled_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_tradecancelled_pre[hIndex].func;
preHookFunc(sd);
@@ -11606,6 +12083,7 @@ void HP_clif_tradecompleted(struct map_session_data *sd, int fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_tradecompleted_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_tradecompleted_pre[hIndex].func;
preHookFunc(sd, &fail);
@@ -11631,6 +12109,7 @@ void HP_clif_tradeundo(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_tradeundo_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_tradeundo_pre[hIndex].func;
preHookFunc(sd);
@@ -11656,6 +12135,7 @@ void HP_clif_openvendingreq(struct map_session_data *sd, int num) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_openvendingreq_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *num);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_openvendingreq_pre[hIndex].func;
preHookFunc(sd, &num);
@@ -11681,6 +12161,7 @@ void HP_clif_showvendingboard(struct block_list *bl, const char *message, int fd
int hIndex = 0;
if( HPMHooks.count.HP_clif_showvendingboard_pre ) {
void (*preHookFunc) (struct block_list *bl, const char *message, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_showvendingboard_pre[hIndex].func;
preHookFunc(bl, message, &fd);
@@ -11706,6 +12187,7 @@ void HP_clif_closevendingboard(struct block_list *bl, int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_closevendingboard_pre ) {
void (*preHookFunc) (struct block_list *bl, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_closevendingboard_pre[hIndex].func;
preHookFunc(bl, &fd);
@@ -11731,6 +12213,7 @@ void HP_clif_vendinglist(struct map_session_data *sd, unsigned int id, struct s_
int hIndex = 0;
if( HPMHooks.count.HP_clif_vendinglist_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *id, struct s_vending *vending_list);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendinglist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_vendinglist_pre[hIndex].func;
preHookFunc(sd, &id, vending_list);
@@ -11756,6 +12239,7 @@ void HP_clif_buyvending(struct map_session_data *sd, int index, int amount, int
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyvending_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyvending_pre[hIndex].func;
preHookFunc(sd, &index, &amount, &fail);
@@ -11781,6 +12265,7 @@ void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending *
int hIndex = 0;
if( HPMHooks.count.HP_clif_openvending_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *id, struct s_vending *vending_list);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvending_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_openvending_pre[hIndex].func;
preHookFunc(sd, &id, vending_list);
@@ -11806,6 +12291,7 @@ void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_vendingreport_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_vendingreport_pre[hIndex].func;
preHookFunc(sd, &index, &amount);
@@ -11831,6 +12317,7 @@ void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int it
int hIndex = 0;
if( HPMHooks.count.HP_clif_storagelist_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct item *items, int *items_length);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_storagelist_pre[hIndex].func;
preHookFunc(sd, items, &items_length);
@@ -11856,6 +12343,7 @@ void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int ma
int hIndex = 0;
if( HPMHooks.count.HP_clif_updatestorageamount_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *amount, int *max_amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_updatestorageamount_pre[hIndex].func;
preHookFunc(sd, &amount, &max_amount);
@@ -11881,6 +12369,7 @@ void HP_clif_storageitemadded(struct map_session_data *sd, struct item *i, int i
int hIndex = 0;
if( HPMHooks.count.HP_clif_storageitemadded_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct item *i, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemadded_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_storageitemadded_pre[hIndex].func;
preHookFunc(sd, i, &index, &amount);
@@ -11906,6 +12395,7 @@ void HP_clif_storageitemremoved(struct map_session_data *sd, int index, int amou
int hIndex = 0;
if( HPMHooks.count.HP_clif_storageitemremoved_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_storageitemremoved_pre[hIndex].func;
preHookFunc(sd, &index, &amount);
@@ -11931,6 +12421,7 @@ void HP_clif_storageclose(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_storageclose_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_storageclose_pre[hIndex].func;
preHookFunc(sd);
@@ -11956,6 +12447,7 @@ void HP_clif_skillinfoblock(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skillinfoblock_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skillinfoblock_pre[hIndex].func;
preHookFunc(sd);
@@ -11981,6 +12473,7 @@ void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv,
int hIndex = 0;
if( HPMHooks.count.HP_clif_skillup_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *skill_lv, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skillup_pre[hIndex].func;
preHookFunc(sd, &skill_id, &skill_lv, &flag);
@@ -12006,6 +12499,7 @@ void HP_clif_skillinfo(struct map_session_data *sd, int skill_id, int inf) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_skillinfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *inf);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_skillinfo_pre[hIndex].func;
preHookFunc(sd, &skill_id, &inf);
@@ -12031,6 +12525,7 @@ void HP_clif_addskill(struct map_session_data *sd, int id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_addskill_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_addskill_pre[hIndex].func;
preHookFunc(sd, &id);
@@ -12056,6 +12551,7 @@ void HP_clif_deleteskill(struct map_session_data *sd, int id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_deleteskill_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_deleteskill_pre[hIndex].func;
preHookFunc(sd, &id);
@@ -12081,6 +12577,7 @@ void HP_clif_party_created(struct map_session_data *sd, int result) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_created_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_created_pre[hIndex].func;
preHookFunc(sd, &result);
@@ -12106,6 +12603,7 @@ void HP_clif_party_member_info(struct party_data *p, struct map_session_data *sd
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_member_info_pre ) {
void (*preHookFunc) (struct party_data *p, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_member_info_pre[hIndex].func;
preHookFunc(p, sd);
@@ -12131,6 +12629,7 @@ void HP_clif_party_info(struct party_data *p, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_info_pre ) {
void (*preHookFunc) (struct party_data *p, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_info_pre[hIndex].func;
preHookFunc(p, sd);
@@ -12156,6 +12655,7 @@ void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data *
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_invite_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_invite_pre[hIndex].func;
preHookFunc(sd, tsd);
@@ -12181,6 +12681,7 @@ void HP_clif_party_inviteack(struct map_session_data *sd, const char *nick, int
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_inviteack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *nick, int *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_inviteack_pre[hIndex].func;
preHookFunc(sd, nick, &result);
@@ -12206,6 +12707,7 @@ void HP_clif_party_option(struct party_data *p, struct map_session_data *sd, int
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_option_pre ) {
void (*preHookFunc) (struct party_data *p, struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_option_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_option_pre[hIndex].func;
preHookFunc(p, sd, &flag);
@@ -12231,6 +12733,7 @@ void HP_clif_party_withdraw(struct party_data *p, struct map_session_data *sd, i
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_withdraw_pre ) {
void (*preHookFunc) (struct party_data *p, struct map_session_data *sd, int *account_id, const char *name, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_withdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_withdraw_pre[hIndex].func;
preHookFunc(p, sd, &account_id, name, &flag);
@@ -12256,6 +12759,7 @@ void HP_clif_party_message(struct party_data *p, int account_id, const char *mes
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_message_pre ) {
void (*preHookFunc) (struct party_data *p, int *account_id, const char *mes, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_message_pre[hIndex].func;
preHookFunc(p, &account_id, mes, &len);
@@ -12281,6 +12785,7 @@ void HP_clif_party_xy(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_xy_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_xy_pre[hIndex].func;
preHookFunc(sd);
@@ -12306,6 +12811,7 @@ void HP_clif_party_xy_single(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_xy_single_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_xy_single_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -12331,6 +12837,7 @@ void HP_clif_party_hp(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_hp_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_hp_pre[hIndex].func;
preHookFunc(sd);
@@ -12356,6 +12863,7 @@ void HP_clif_party_xy_remove(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_xy_remove_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_xy_remove_pre[hIndex].func;
preHookFunc(sd);
@@ -12381,6 +12889,7 @@ void HP_clif_party_show_picker(struct map_session_data *sd, struct item *item_da
int hIndex = 0;
if( HPMHooks.count.HP_clif_party_show_picker_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct item *item_data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_party_show_picker_pre[hIndex].func;
preHookFunc(sd, item_data);
@@ -12406,6 +12915,7 @@ void HP_clif_partyinvitationstate(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_partyinvitationstate_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_pre[hIndex].func;
preHookFunc(sd);
@@ -12431,6 +12941,7 @@ void HP_clif_guild_created(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_created_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_created_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -12456,6 +12967,7 @@ void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_belonginfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_belonginfo_pre[hIndex].func;
preHookFunc(sd, g);
@@ -12481,6 +12993,7 @@ void HP_clif_guild_masterormember(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_masterormember_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_masterormember_pre[hIndex].func;
preHookFunc(sd);
@@ -12506,6 +13019,7 @@ void HP_clif_guild_basicinfo(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_basicinfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_pre[hIndex].func;
preHookFunc(sd);
@@ -12531,6 +13045,7 @@ void HP_clif_guild_allianceinfo(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_allianceinfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_allianceinfo_pre[hIndex].func;
preHookFunc(sd);
@@ -12556,6 +13071,7 @@ void HP_clif_guild_memberlist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_memberlist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_memberlist_pre[hIndex].func;
preHookFunc(sd);
@@ -12581,6 +13097,7 @@ void HP_clif_guild_skillinfo(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_skillinfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_pre[hIndex].func;
preHookFunc(sd);
@@ -12606,6 +13123,7 @@ void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_send_onlineinfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_send_onlineinfo_pre[hIndex].func;
preHookFunc(sd);
@@ -12631,6 +13149,7 @@ void HP_clif_guild_memberlogin_notice(struct guild *g, int idx, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_memberlogin_notice_pre ) {
void (*preHookFunc) (struct guild *g, int *idx, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_memberlogin_notice_pre[hIndex].func;
preHookFunc(g, &idx, &flag);
@@ -12656,6 +13175,7 @@ void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_invite_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_invite_pre[hIndex].func;
preHookFunc(sd, g);
@@ -12681,6 +13201,7 @@ void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_inviteack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_inviteack_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -12706,6 +13227,7 @@ void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const ch
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_leave_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *name, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_leave_pre[hIndex].func;
preHookFunc(sd, name, mes);
@@ -12731,6 +13253,7 @@ void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, cons
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_expulsion_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *name, const char *mes, int *account_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_expulsion_pre[hIndex].func;
preHookFunc(sd, name, mes, &account_id);
@@ -12756,6 +13279,7 @@ void HP_clif_guild_positionchanged(struct guild *g, int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_positionchanged_pre ) {
void (*preHookFunc) (struct guild *g, int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_positionchanged_pre[hIndex].func;
preHookFunc(g, &idx);
@@ -12781,6 +13305,7 @@ void HP_clif_guild_memberpositionchanged(struct guild *g, int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_memberpositionchanged_pre ) {
void (*preHookFunc) (struct guild *g, int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_memberpositionchanged_pre[hIndex].func;
preHookFunc(g, &idx);
@@ -12806,6 +13331,7 @@ void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_emblem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_emblem_pre[hIndex].func;
preHookFunc(sd, g);
@@ -12831,6 +13357,7 @@ void HP_clif_guild_emblem_area(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_emblem_area_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_emblem_area_pre[hIndex].func;
preHookFunc(bl);
@@ -12856,6 +13383,7 @@ void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_notice_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_notice_pre[hIndex].func;
preHookFunc(sd, g);
@@ -12881,6 +13409,7 @@ void HP_clif_guild_message(struct guild *g, int account_id, const char *mes, int
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_message_pre ) {
void (*preHookFunc) (struct guild *g, int *account_id, const char *mes, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_message_pre[hIndex].func;
preHookFunc(g, &account_id, mes, &len);
@@ -12906,6 +13435,7 @@ void HP_clif_guild_reqalliance(struct map_session_data *sd, int account_id, cons
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_reqalliance_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_reqalliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_reqalliance_pre[hIndex].func;
preHookFunc(sd, &account_id, name);
@@ -12931,6 +13461,7 @@ void HP_clif_guild_allianceack(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_allianceack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_allianceack_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -12956,6 +13487,7 @@ void HP_clif_guild_delalliance(struct map_session_data *sd, int guild_id, int fl
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_delalliance_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_delalliance_pre[hIndex].func;
preHookFunc(sd, &guild_id, &flag);
@@ -12981,6 +13513,7 @@ void HP_clif_guild_oppositionack(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_oppositionack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_oppositionack_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -13006,6 +13539,7 @@ void HP_clif_guild_broken(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_broken_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_broken_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -13031,6 +13565,7 @@ void HP_clif_guild_xy(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_xy_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_xy_pre[hIndex].func;
preHookFunc(sd);
@@ -13056,6 +13591,7 @@ void HP_clif_guild_xy_single(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_xy_single_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_xy_single_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -13081,6 +13617,7 @@ void HP_clif_guild_xy_remove(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_xy_remove_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_xy_remove_pre[hIndex].func;
preHookFunc(sd);
@@ -13106,6 +13643,7 @@ void HP_clif_guild_positionnamelist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_positionnamelist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_pre[hIndex].func;
preHookFunc(sd);
@@ -13131,6 +13669,7 @@ void HP_clif_guild_positioninfolist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_positioninfolist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_pre[hIndex].func;
preHookFunc(sd);
@@ -13156,6 +13695,7 @@ void HP_clif_guild_expulsionlist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_guild_expulsionlist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_guild_expulsionlist_pre[hIndex].func;
preHookFunc(sd);
@@ -13182,6 +13722,7 @@ bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) {
bool retVal___ = false;
if( HPMHooks.count.HP_clif_validate_emblem_pre ) {
bool (*preHookFunc) (const uint8 *emblem, unsigned long *emblem_len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_validate_emblem_pre[hIndex].func;
retVal___ = preHookFunc(emblem, &emblem_len);
@@ -13207,6 +13748,7 @@ void HP_clif_bg_hp(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bg_hp_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bg_hp_pre[hIndex].func;
preHookFunc(sd);
@@ -13232,6 +13774,7 @@ void HP_clif_bg_xy(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bg_xy_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bg_xy_pre[hIndex].func;
preHookFunc(sd);
@@ -13257,6 +13800,7 @@ void HP_clif_bg_xy_remove(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bg_xy_remove_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bg_xy_remove_pre[hIndex].func;
preHookFunc(sd);
@@ -13282,6 +13826,7 @@ void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *n
int hIndex = 0;
if( HPMHooks.count.HP_clif_bg_message_pre ) {
void (*preHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, size_t *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bg_message_pre[hIndex].func;
preHookFunc(bgd, &src_id, name, mes, &len);
@@ -13307,6 +13852,7 @@ void HP_clif_bg_updatescore(int16 m) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bg_updatescore_pre ) {
void (*preHookFunc) (int16 *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bg_updatescore_pre[hIndex].func;
preHookFunc(&m);
@@ -13332,6 +13878,7 @@ void HP_clif_bg_updatescore_single(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bg_updatescore_single_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bg_updatescore_single_pre[hIndex].func;
preHookFunc(sd);
@@ -13357,6 +13904,7 @@ void HP_clif_sendbgemblem_area(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_sendbgemblem_area_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_pre[hIndex].func;
preHookFunc(sd);
@@ -13382,6 +13930,7 @@ void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_sendbgemblem_single_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_sendbgemblem_single_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -13408,6 +13957,7 @@ int HP_clif_instance(int instance_id, int type, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_instance_pre ) {
int (*preHookFunc) (int *instance_id, int *type, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_instance_pre[hIndex].func;
retVal___ = preHookFunc(&instance_id, &type, &flag);
@@ -13433,6 +13983,7 @@ void HP_clif_instance_join(int fd, int instance_id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_instance_join_pre ) {
void (*preHookFunc) (int *fd, int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_instance_join_pre[hIndex].func;
preHookFunc(&fd, &instance_id);
@@ -13458,6 +14009,7 @@ void HP_clif_instance_leave(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_instance_leave_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_instance_leave_pre[hIndex].func;
preHookFunc(&fd);
@@ -13483,6 +14035,7 @@ void HP_clif_catch_process(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_catch_process_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_catch_process_pre[hIndex].func;
preHookFunc(sd);
@@ -13508,6 +14061,7 @@ void HP_clif_pet_roulette(struct map_session_data *sd, int data) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pet_roulette_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pet_roulette_pre[hIndex].func;
preHookFunc(sd, &data);
@@ -13533,6 +14087,7 @@ void HP_clif_sendegg(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_sendegg_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_sendegg_pre[hIndex].func;
preHookFunc(sd);
@@ -13558,6 +14113,7 @@ void HP_clif_send_petstatus(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_send_petstatus_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_send_petstatus_pre[hIndex].func;
preHookFunc(sd);
@@ -13583,6 +14139,7 @@ void HP_clif_send_petdata(struct map_session_data *sd, struct pet_data *pd, int
int hIndex = 0;
if( HPMHooks.count.HP_clif_send_petdata_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd, int *type, int *param);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_send_petdata_pre[hIndex].func;
preHookFunc(sd, pd, &type, &param);
@@ -13608,6 +14165,7 @@ void HP_clif_pet_emotion(struct pet_data *pd, int param) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pet_emotion_pre ) {
void (*preHookFunc) (struct pet_data *pd, int *param);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pet_emotion_pre[hIndex].func;
preHookFunc(pd, &param);
@@ -13633,6 +14191,7 @@ void HP_clif_pet_food(struct map_session_data *sd, int foodid, int fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pet_food_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pet_food_pre[hIndex].func;
preHookFunc(sd, &foodid, &fail);
@@ -13659,6 +14218,7 @@ int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_friendslist_toggle_sub_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_sub_pre[hIndex].func;
@@ -13690,6 +14250,7 @@ void HP_clif_friendslist_send(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_friendslist_send_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_friendslist_send_pre[hIndex].func;
preHookFunc(sd);
@@ -13715,6 +14276,7 @@ void HP_clif_friendslist_reqack(struct map_session_data *sd, struct map_session_
int hIndex = 0;
if( HPMHooks.count.HP_clif_friendslist_reqack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *f_sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_reqack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_friendslist_reqack_pre[hIndex].func;
preHookFunc(sd, f_sd, &type);
@@ -13740,6 +14302,7 @@ void HP_clif_friendslist_toggle(struct map_session_data *sd, int account_id, int
int hIndex = 0;
if( HPMHooks.count.HP_clif_friendslist_toggle_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *online);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_pre[hIndex].func;
preHookFunc(sd, &account_id, &char_id, &online);
@@ -13765,6 +14328,7 @@ void HP_clif_friendlist_req(struct map_session_data *sd, int account_id, int cha
int hIndex = 0;
if( HPMHooks.count.HP_clif_friendlist_req_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendlist_req_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_friendlist_req_pre[hIndex].func;
preHookFunc(sd, &account_id, &char_id, name);
@@ -13786,13 +14350,14 @@ void HP_clif_friendlist_req(struct map_session_data *sd, int account_id, int cha
}
return;
}
-void HP_clif_GM_kickack(struct map_session_data *sd, int id) {
+void HP_clif_GM_kickack(struct map_session_data *sd, int result) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_GM_kickack_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, int *id);
+ void (*preHookFunc) (struct map_session_data *sd, int *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_GM_kickack_pre[hIndex].func;
- preHookFunc(sd, &id);
+ preHookFunc(sd, &result);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -13800,13 +14365,13 @@ void HP_clif_GM_kickack(struct map_session_data *sd, int id) {
}
}
{
- HPMHooks.source.clif.GM_kickack(sd, id);
+ HPMHooks.source.clif.GM_kickack(sd, result);
}
if( HPMHooks.count.HP_clif_GM_kickack_post ) {
- void (*postHookFunc) (struct map_session_data *sd, int *id);
+ void (*postHookFunc) (struct map_session_data *sd, int *result);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_GM_kickack_post[hIndex].func;
- postHookFunc(sd, &id);
+ postHookFunc(sd, &result);
}
}
return;
@@ -13815,6 +14380,7 @@ void HP_clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd)
int hIndex = 0;
if( HPMHooks.count.HP_clif_GM_kick_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_GM_kick_pre[hIndex].func;
preHookFunc(sd, tsd);
@@ -13840,6 +14406,7 @@ void HP_clif_manner_message(struct map_session_data *sd, uint32 type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_manner_message_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint32 *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_manner_message_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -13865,6 +14432,7 @@ void HP_clif_GM_silence(struct map_session_data *sd, struct map_session_data *ts
int hIndex = 0;
if( HPMHooks.count.HP_clif_GM_silence_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, uint8 *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_silence_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_GM_silence_pre[hIndex].func;
preHookFunc(sd, tsd, &type);
@@ -13890,6 +14458,7 @@ void HP_clif_account_name(struct map_session_data *sd, int account_id, const cha
int hIndex = 0;
if( HPMHooks.count.HP_clif_account_name_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *accname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_account_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_account_name_pre[hIndex].func;
preHookFunc(sd, &account_id, accname);
@@ -13915,6 +14484,7 @@ void HP_clif_check(int fd, struct map_session_data *pl_sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_check_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *pl_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_check_pre[hIndex].func;
preHookFunc(&fd, pl_sd);
@@ -13940,6 +14510,7 @@ void HP_clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int fla
int hIndex = 0;
if( HPMHooks.count.HP_clif_hominfo_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct homun_data *hd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_hominfo_pre[hIndex].func;
preHookFunc(sd, hd, &flag);
@@ -13965,6 +14536,7 @@ void HP_clif_homskillinfoblock(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_homskillinfoblock_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_pre[hIndex].func;
preHookFunc(sd);
@@ -13990,6 +14562,7 @@ void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_homskillup_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_homskillup_pre[hIndex].func;
preHookFunc(sd, &skill_id);
@@ -14015,6 +14588,7 @@ void HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_hom_food_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_hom_food_pre[hIndex].func;
preHookFunc(sd, &foodid, &fail);
@@ -14040,6 +14614,7 @@ void HP_clif_send_homdata(struct map_session_data *sd, int state, int param) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_send_homdata_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *state, int *param);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_send_homdata_pre[hIndex].func;
preHookFunc(sd, &state, &param);
@@ -14065,6 +14640,7 @@ void HP_clif_quest_send_list(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_send_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_send_list_pre[hIndex].func;
preHookFunc(sd);
@@ -14090,6 +14666,7 @@ void HP_clif_quest_send_mission(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_send_mission_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_send_mission_pre[hIndex].func;
preHookFunc(sd);
@@ -14115,6 +14692,7 @@ void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_add_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct quest *qd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_add_pre[hIndex].func;
preHookFunc(sd, qd);
@@ -14140,6 +14718,7 @@ void HP_clif_quest_delete(struct map_session_data *sd, int quest_id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_delete_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *quest_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_delete_pre[hIndex].func;
preHookFunc(sd, &quest_id);
@@ -14165,6 +14744,7 @@ void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_update_status_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *quest_id, bool *active);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_status_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_update_status_pre[hIndex].func;
preHookFunc(sd, &quest_id, &active);
@@ -14190,6 +14770,7 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_update_objective_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct quest *qd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_update_objective_pre[hIndex].func;
preHookFunc(sd, qd);
@@ -14215,6 +14796,7 @@ void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_show_event_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, short *state, short *color);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_show_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_show_event_pre[hIndex].func;
preHookFunc(sd, bl, &state, &color);
@@ -14240,6 +14822,7 @@ void HP_clif_mail_window(int fd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_window_pre ) {
void (*preHookFunc) (int *fd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_window_pre[hIndex].func;
preHookFunc(&fd, &flag);
@@ -14265,6 +14848,7 @@ void HP_clif_mail_read(struct map_session_data *sd, int mail_id) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_read_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *mail_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_read_pre[hIndex].func;
preHookFunc(sd, &mail_id);
@@ -14290,6 +14874,7 @@ void HP_clif_mail_delete(int fd, int mail_id, short fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_delete_pre ) {
void (*preHookFunc) (int *fd, int *mail_id, short *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_delete_pre[hIndex].func;
preHookFunc(&fd, &mail_id, &fail);
@@ -14315,6 +14900,7 @@ void HP_clif_mail_return(int fd, int mail_id, short fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_return_pre ) {
void (*preHookFunc) (int *fd, int *mail_id, short *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_return_pre[hIndex].func;
preHookFunc(&fd, &mail_id, &fail);
@@ -14340,6 +14926,7 @@ void HP_clif_mail_send(int fd, bool fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_send_pre ) {
void (*preHookFunc) (int *fd, bool *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_send_pre[hIndex].func;
preHookFunc(&fd, &fail);
@@ -14365,6 +14952,7 @@ void HP_clif_mail_new(int fd, int mail_id, const char *sender, const char *title
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_new_pre ) {
void (*preHookFunc) (int *fd, int *mail_id, const char *sender, const char *title);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_new_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_new_pre[hIndex].func;
preHookFunc(&fd, &mail_id, sender, title);
@@ -14390,6 +14978,7 @@ void HP_clif_mail_refreshinbox(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_refreshinbox_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_pre[hIndex].func;
preHookFunc(sd);
@@ -14415,6 +15004,7 @@ void HP_clif_mail_getattachment(int fd, uint8 flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_getattachment_pre ) {
void (*preHookFunc) (int *fd, uint8 *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_getattachment_pre[hIndex].func;
preHookFunc(&fd, &flag);
@@ -14440,6 +15030,7 @@ void HP_clif_mail_setattachment(int fd, int index, uint8 flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mail_setattachment_pre ) {
void (*preHookFunc) (int *fd, int *index, uint8 *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mail_setattachment_pre[hIndex].func;
preHookFunc(&fd, &index, &flag);
@@ -14465,6 +15056,7 @@ void HP_clif_auction_openwindow(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_auction_openwindow_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_auction_openwindow_pre[hIndex].func;
preHookFunc(sd);
@@ -14490,6 +15082,7 @@ void HP_clif_auction_results(struct map_session_data *sd, short count, short pag
int hIndex = 0;
if( HPMHooks.count.HP_clif_auction_results_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *count, short *pages, uint8 *buf);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_auction_results_pre[hIndex].func;
preHookFunc(sd, &count, &pages, buf);
@@ -14515,6 +15108,7 @@ void HP_clif_auction_message(int fd, unsigned char flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_auction_message_pre ) {
void (*preHookFunc) (int *fd, unsigned char *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_auction_message_pre[hIndex].func;
preHookFunc(&fd, &flag);
@@ -14540,6 +15134,7 @@ void HP_clif_auction_close(int fd, unsigned char flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_auction_close_pre ) {
void (*preHookFunc) (int *fd, unsigned char *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_auction_close_pre[hIndex].func;
preHookFunc(&fd, &flag);
@@ -14565,6 +15160,7 @@ void HP_clif_auction_setitem(int fd, int index, bool fail) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_auction_setitem_pre ) {
void (*preHookFunc) (int *fd, int *index, bool *fail);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_auction_setitem_pre[hIndex].func;
preHookFunc(&fd, &index, &fail);
@@ -14590,6 +15186,7 @@ void HP_clif_mercenary_info(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mercenary_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mercenary_info_pre[hIndex].func;
preHookFunc(sd);
@@ -14615,6 +15212,7 @@ void HP_clif_mercenary_skillblock(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mercenary_skillblock_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_pre[hIndex].func;
preHookFunc(sd);
@@ -14640,6 +15238,7 @@ void HP_clif_mercenary_message(struct map_session_data *sd, int message) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mercenary_message_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mercenary_message_pre[hIndex].func;
preHookFunc(sd, &message);
@@ -14665,6 +15264,7 @@ void HP_clif_mercenary_updatestatus(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_mercenary_updatestatus_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_mercenary_updatestatus_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -14690,6 +15290,7 @@ void HP_clif_rental_time(int fd, int nameid, int seconds) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_rental_time_pre ) {
void (*preHookFunc) (int *fd, int *nameid, int *seconds);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_rental_time_pre[hIndex].func;
preHookFunc(&fd, &nameid, &seconds);
@@ -14715,6 +15316,7 @@ void HP_clif_rental_expired(int fd, int index, int nameid) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_rental_expired_pre ) {
void (*preHookFunc) (int *fd, int *index, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_rental_expired_pre[hIndex].func;
preHookFunc(&fd, &index, &nameid);
@@ -14740,6 +15342,7 @@ void HP_clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingRegisterAck_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -14765,6 +15368,7 @@ void HP_clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteAck_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -14790,6 +15394,7 @@ void HP_clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info **result
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingSearchAck_pre ) {
void (*preHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSearchAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingSearchAck_pre[hIndex].func;
preHookFunc(&fd, results, &count, &more_result);
@@ -14815,6 +15420,7 @@ void HP_clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_pre[hIndex].func;
preHookFunc(sd, pb_ad);
@@ -14840,6 +15446,7 @@ void HP_clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteNotify_pre[hIndex].func;
preHookFunc(sd, &index);
@@ -14865,6 +15472,7 @@ void HP_clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_pre[hIndex].func;
preHookFunc(sd, pb_ad);
@@ -14890,6 +15498,7 @@ void HP_clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyRecruitRegisterAck_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -14915,6 +15524,7 @@ void HP_clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteAck_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -14940,6 +15550,7 @@ void HP_clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info **result
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre ) {
void (*preHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyRecruitSearchAck_pre[hIndex].func;
preHookFunc(&fd, results, &count, &more_result);
@@ -14965,6 +15576,7 @@ void HP_clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyRecruitUpdateNotify_pre[hIndex].func;
preHookFunc(sd, pb_ad);
@@ -14990,6 +15602,7 @@ void HP_clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteNotify_pre[hIndex].func;
preHookFunc(sd, &index);
@@ -15015,6 +15628,7 @@ void HP_clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyRecruitInsertNotify_pre[hIndex].func;
preHookFunc(sd, pb_ad);
@@ -15040,6 +15654,7 @@ void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre ) {
void (*preHookFunc) (int *index, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingVolunteerInfo_pre[hIndex].func;
preHookFunc(&index, sd);
@@ -15065,6 +15680,7 @@ void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_da
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre ) {
void (*preHookFunc) (unsigned int *aid, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_pre[hIndex].func;
preHookFunc(&aid, sd);
@@ -15090,6 +15706,7 @@ void HP_clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd)
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre ) {
void (*preHookFunc) (int *index, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingCancelVolunteer_pre[hIndex].func;
preHookFunc(&index, sd);
@@ -15115,6 +15732,7 @@ void HP_clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre ) {
void (*preHookFunc) (int *index, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingAddFilteringList_pre[hIndex].func;
preHookFunc(&index, sd);
@@ -15140,6 +15758,7 @@ void HP_clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd)
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre ) {
void (*preHookFunc) (int *gid, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingSubFilteringList_pre[hIndex].func;
preHookFunc(&gid, sd);
@@ -15165,6 +15784,7 @@ void HP_clif_buyingstore_open(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_open_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_open_pre[hIndex].func;
preHookFunc(sd);
@@ -15190,6 +15810,7 @@ void HP_clif_buyingstore_open_failed(struct map_session_data *sd, unsigned short
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_open_failed_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *result, unsigned int *weight);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_failed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_open_failed_pre[hIndex].func;
preHookFunc(sd, &result, &weight);
@@ -15215,6 +15836,7 @@ void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_myitemlist_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_pre[hIndex].func;
preHookFunc(sd);
@@ -15240,6 +15862,7 @@ void HP_clif_buyingstore_entry(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_entry_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_pre[hIndex].func;
preHookFunc(sd);
@@ -15265,6 +15888,7 @@ void HP_clif_buyingstore_entry_single(struct map_session_data *sd, struct map_se
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_entry_single_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_single_pre[hIndex].func;
preHookFunc(sd, pl_sd);
@@ -15290,6 +15914,7 @@ void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_pre[hIndex].func;
preHookFunc(sd);
@@ -15315,6 +15940,7 @@ void HP_clif_buyingstore_disappear_entry_single(struct map_session_data *sd, str
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_single_pre[hIndex].func;
preHookFunc(sd, pl_sd);
@@ -15340,6 +15966,7 @@ void HP_clif_buyingstore_itemlist(struct map_session_data *sd, struct map_sessio
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_itemlist_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_itemlist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_itemlist_pre[hIndex].func;
preHookFunc(sd, pl_sd);
@@ -15365,6 +15992,7 @@ void HP_clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short r
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *result);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_buyer_pre[hIndex].func;
preHookFunc(sd, &result);
@@ -15390,6 +16018,7 @@ void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_update_item_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_update_item_pre[hIndex].func;
preHookFunc(sd, &nameid, &amount);
@@ -15415,6 +16044,7 @@ void HP_clif_buyingstore_delete_item(struct map_session_data *sd, short index, u
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_delete_item_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *index, unsigned short *amount, int *price);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_delete_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_delete_item_pre[hIndex].func;
preHookFunc(sd, &index, &amount, &price);
@@ -15440,6 +16070,7 @@ void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short
int hIndex = 0;
if( HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *result, unsigned short *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_seller_pre[hIndex].func;
preHookFunc(sd, &result, &nameid);
@@ -15465,6 +16096,7 @@ void HP_clif_search_store_info_ack(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_search_store_info_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_search_store_info_ack_pre[hIndex].func;
preHookFunc(sd);
@@ -15490,6 +16122,7 @@ void HP_clif_search_store_info_failed(struct map_session_data *sd, unsigned char
int hIndex = 0;
if( HPMHooks.count.HP_clif_search_store_info_failed_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *reason);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_search_store_info_failed_pre[hIndex].func;
preHookFunc(sd, &reason);
@@ -15515,6 +16148,7 @@ void HP_clif_open_search_store_info(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_open_search_store_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_open_search_store_info_pre[hIndex].func;
preHookFunc(sd);
@@ -15540,6 +16174,7 @@ void HP_clif_search_store_info_click_ack(struct map_session_data *sd, short x, s
int hIndex = 0;
if( HPMHooks.count.HP_clif_search_store_info_click_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *x, short *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_click_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_search_store_info_click_ack_pre[hIndex].func;
preHookFunc(sd, &x, &y);
@@ -15565,6 +16200,7 @@ void HP_clif_elemental_info(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_elemental_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_elemental_info_pre[hIndex].func;
preHookFunc(sd);
@@ -15590,6 +16226,7 @@ void HP_clif_elemental_updatestatus(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_elemental_updatestatus_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_elemental_updatestatus_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -15615,6 +16252,7 @@ void HP_clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_A
int hIndex = 0;
if( HPMHooks.count.HP_clif_bgqueue_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bgqueue_ack_pre[hIndex].func;
preHookFunc(sd, &response, &arena_id);
@@ -15640,6 +16278,7 @@ void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUN
int hIndex = 0;
if( HPMHooks.count.HP_clif_bgqueue_notice_delete_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bgqueue_notice_delete_pre[hIndex].func;
preHookFunc(sd, &response, name);
@@ -15665,6 +16304,7 @@ void HP_clif_bgqueue_update_info(struct map_session_data *sd, unsigned char aren
int hIndex = 0;
if( HPMHooks.count.HP_clif_bgqueue_update_info_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *arena_id, int *position);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_update_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bgqueue_update_info_pre[hIndex].func;
preHookFunc(sd, &arena_id, &position);
@@ -15690,6 +16330,7 @@ void HP_clif_bgqueue_joined(struct map_session_data *sd, int pos) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bgqueue_joined_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bgqueue_joined_pre[hIndex].func;
preHookFunc(sd, &pos);
@@ -15715,6 +16356,7 @@ void HP_clif_bgqueue_pcleft(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bgqueue_pcleft_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_pre[hIndex].func;
preHookFunc(sd);
@@ -15740,6 +16382,7 @@ void HP_clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char are
int hIndex = 0;
if( HPMHooks.count.HP_clif_bgqueue_battlebegins_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *arena_id, enum send_target *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_battlebegins_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bgqueue_battlebegins_pre[hIndex].func;
preHookFunc(sd, &arena_id, &target);
@@ -15765,6 +16408,7 @@ void HP_clif_adopt_reply(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_adopt_reply_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_adopt_reply_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -15790,6 +16434,7 @@ void HP_clif_adopt_request(struct map_session_data *sd, struct map_session_data
int hIndex = 0;
if( HPMHooks.count.HP_clif_adopt_request_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *src, int *p_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_request_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_adopt_request_pre[hIndex].func;
preHookFunc(sd, src, &p_id);
@@ -15815,6 +16460,7 @@ void HP_clif_readbook(int fd, int book_id, int page) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_readbook_pre ) {
void (*preHookFunc) (int *fd, int *book_id, int *page);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_readbook_pre[hIndex].func;
preHookFunc(&fd, &book_id, &page);
@@ -15840,6 +16486,7 @@ void HP_clif_notify_time(struct map_session_data *sd, int64 time) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_notify_time_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int64 *time);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_notify_time_pre[hIndex].func;
preHookFunc(sd, &time);
@@ -15865,6 +16512,7 @@ void HP_clif_user_count(struct map_session_data *sd, int count) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_user_count_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_user_count_pre[hIndex].func;
preHookFunc(sd, &count);
@@ -15890,6 +16538,7 @@ void HP_clif_noask_sub(struct map_session_data *src, struct map_session_data *ta
int hIndex = 0;
if( HPMHooks.count.HP_clif_noask_sub_pre ) {
void (*preHookFunc) (struct map_session_data *src, struct map_session_data *target, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_noask_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_noask_sub_pre[hIndex].func;
preHookFunc(src, target, &type);
@@ -15915,6 +16564,7 @@ void HP_clif_bc_ready(void) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bc_ready_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bc_ready_pre[hIndex].func;
preHookFunc();
@@ -15941,6 +16591,7 @@ int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_undisguise_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_undisguise_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -15966,6 +16617,7 @@ void HP_clif_chsys_create(struct hChSysCh *channel, char *name, char *pass, unsi
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_create_pre ) {
void (*preHookFunc) (struct hChSysCh *channel, char *name, char *pass, unsigned char *color);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_create_pre[hIndex].func;
preHookFunc(channel, name, pass, &color);
@@ -15991,6 +16643,7 @@ void HP_clif_chsys_msg(struct hChSysCh *channel, struct map_session_data *sd, ch
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_msg_pre ) {
void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_msg_pre[hIndex].func;
preHookFunc(channel, sd, msg);
@@ -16016,6 +16669,7 @@ void HP_clif_chsys_msg2(struct hChSysCh *channel, char *msg) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_msg2_pre ) {
void (*preHookFunc) (struct hChSysCh *channel, char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_msg2_pre[hIndex].func;
preHookFunc(channel, msg);
@@ -16041,6 +16695,7 @@ void HP_clif_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, c
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_send_pre ) {
void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, const char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_send_pre[hIndex].func;
preHookFunc(channel, sd, msg);
@@ -16066,6 +16721,7 @@ void HP_clif_chsys_join(struct hChSysCh *channel, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_join_pre ) {
void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_join_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_join_pre[hIndex].func;
preHookFunc(channel, sd);
@@ -16091,6 +16747,7 @@ void HP_clif_chsys_left(struct hChSysCh *channel, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_left_pre ) {
void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_left_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_left_pre[hIndex].func;
preHookFunc(channel, sd);
@@ -16116,6 +16773,7 @@ void HP_clif_chsys_delete(struct hChSysCh *channel) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_delete_pre ) {
void (*preHookFunc) (struct hChSysCh *channel);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_delete_pre[hIndex].func;
preHookFunc(channel);
@@ -16141,6 +16799,7 @@ void HP_clif_chsys_mjoin(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_mjoin_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_mjoin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_mjoin_pre[hIndex].func;
preHookFunc(sd);
@@ -16166,6 +16825,7 @@ void HP_clif_chsys_quit(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_quit_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_quit_pre[hIndex].func;
preHookFunc(sd);
@@ -16191,6 +16851,7 @@ void HP_clif_chsys_quitg(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_quitg_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quitg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_quitg_pre[hIndex].func;
preHookFunc(sd);
@@ -16216,6 +16877,7 @@ void HP_clif_chsys_gjoin(struct guild *g1, struct guild *g2) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_gjoin_pre ) {
void (*preHookFunc) (struct guild *g1, struct guild *g2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gjoin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_gjoin_pre[hIndex].func;
preHookFunc(g1, g2);
@@ -16241,6 +16903,7 @@ void HP_clif_chsys_gleave(struct guild *g1, struct guild *g2) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chsys_gleave_pre ) {
void (*preHookFunc) (struct guild *g1, struct guild *g2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gleave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chsys_gleave_pre[hIndex].func;
preHookFunc(g1, g2);
@@ -16266,6 +16929,7 @@ void HP_clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_AC
int hIndex = 0;
if( HPMHooks.count.HP_clif_bank_deposit_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK *reason);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bank_deposit_pre[hIndex].func;
preHookFunc(sd, &reason);
@@ -16291,6 +16955,7 @@ void HP_clif_bank_withdraw(struct map_session_data *sd, enum e_BANKING_WITHDRAW_
int hIndex = 0;
if( HPMHooks.count.HP_clif_bank_withdraw_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK *reason);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bank_withdraw_pre[hIndex].func;
preHookFunc(sd, &reason);
@@ -16316,6 +16981,7 @@ void HP_clif_show_modifiers(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_show_modifiers_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_show_modifiers_pre[hIndex].func;
preHookFunc(sd);
@@ -16341,6 +17007,7 @@ void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index)
int hIndex = 0;
if( HPMHooks.count.HP_clif_notify_bounditem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned short *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_notify_bounditem_pre[hIndex].func;
preHookFunc(sd, &index);
@@ -16367,6 +17034,7 @@ int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *
int retVal___ = 0;
if( HPMHooks.count.HP_clif_delay_damage_pre ) {
int (*preHookFunc) (int64 *tick, struct block_list *src, struct block_list *dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_delay_damage_pre[hIndex].func;
retVal___ = preHookFunc(&tick, src, dst, &sdelay, &ddelay, &in_damage, &div, &type);
@@ -16393,6 +17061,7 @@ int HP_clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_clif_delay_damage_sub_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_delay_damage_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -16418,6 +17087,7 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_npc_market_open_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_npc_market_open_pre[hIndex].func;
preHookFunc(sd, nd);
@@ -16443,6 +17113,7 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_
int hIndex = 0;
if( HPMHooks.count.HP_clif_npc_market_purchase_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct packet_npc_market_purchase *req, unsigned char *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;
preHookFunc(sd, req, &response);
@@ -16468,6 +17139,7 @@ void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pWantToConnection_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pWantToConnection_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16493,6 +17165,7 @@ void HP_clif_pLoadEndAck(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pLoadEndAck_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pLoadEndAck_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16518,6 +17191,7 @@ void HP_clif_pTickSend(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTickSend_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTickSend_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16543,6 +17217,7 @@ void HP_clif_pHotkey(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pHotkey_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pHotkey_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16568,6 +17243,7 @@ void HP_clif_pProgressbar(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pProgressbar_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pProgressbar_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16593,6 +17269,7 @@ void HP_clif_pWalkToXY(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pWalkToXY_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pWalkToXY_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16618,6 +17295,7 @@ void HP_clif_pQuitGame(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pQuitGame_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pQuitGame_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16643,6 +17321,7 @@ void HP_clif_pGetCharNameRequest(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGetCharNameRequest_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGetCharNameRequest_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16668,6 +17347,7 @@ void HP_clif_pGlobalMessage(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGlobalMessage_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGlobalMessage_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16693,6 +17373,7 @@ void HP_clif_pMapMove(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMapMove_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMapMove_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16718,6 +17399,7 @@ void HP_clif_pChangeDir(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChangeDir_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChangeDir_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16743,6 +17425,7 @@ void HP_clif_pEmotion(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pEmotion_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pEmotion_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16768,6 +17451,7 @@ void HP_clif_pHowManyConnections(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pHowManyConnections_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pHowManyConnections_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16793,6 +17477,7 @@ void HP_clif_pActionRequest(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pActionRequest_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pActionRequest_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16818,6 +17503,7 @@ void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, in
int hIndex = 0;
if( HPMHooks.count.HP_clif_pActionRequest_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pActionRequest_sub_pre[hIndex].func;
preHookFunc(sd, &action_type, &target_id, &tick);
@@ -16843,6 +17529,7 @@ void HP_clif_pRestart(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pRestart_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pRestart_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16868,6 +17555,7 @@ void HP_clif_pWisMessage(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pWisMessage_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pWisMessage_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16893,6 +17581,7 @@ void HP_clif_pBroadcast(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBroadcast_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBroadcast_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16918,6 +17607,7 @@ void HP_clif_pTakeItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTakeItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTakeItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16943,6 +17633,7 @@ void HP_clif_pDropItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pDropItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pDropItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16968,6 +17659,7 @@ void HP_clif_pUseItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -16993,6 +17685,7 @@ void HP_clif_pEquipItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pEquipItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pEquipItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17018,6 +17711,7 @@ void HP_clif_pUnequipItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUnequipItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUnequipItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17043,6 +17737,7 @@ void HP_clif_pNpcClicked(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcClicked_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcClicked_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17068,6 +17763,7 @@ void HP_clif_pNpcBuySellSelected(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcBuySellSelected_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcBuySellSelected_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17093,6 +17789,7 @@ void HP_clif_pNpcBuyListSend(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcBuyListSend_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcBuyListSend_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17118,6 +17815,7 @@ void HP_clif_pNpcSellListSend(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcSellListSend_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcSellListSend_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17143,6 +17841,7 @@ void HP_clif_pCreateChatRoom(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCreateChatRoom_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCreateChatRoom_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17168,6 +17867,7 @@ void HP_clif_pChatAddMember(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChatAddMember_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChatAddMember_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17193,6 +17893,7 @@ void HP_clif_pChatRoomStatusChange(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChatRoomStatusChange_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChatRoomStatusChange_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17218,6 +17919,7 @@ void HP_clif_pChangeChatOwner(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChangeChatOwner_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChangeChatOwner_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17243,6 +17945,7 @@ void HP_clif_pKickFromChat(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pKickFromChat_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pKickFromChat_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17268,6 +17971,7 @@ void HP_clif_pChatLeave(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChatLeave_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChatLeave_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17293,6 +17997,7 @@ void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTradeRequest_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTradeRequest_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17318,6 +18023,7 @@ void HP_clif_chann_config_read(void) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_chann_config_read_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chann_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_chann_config_read_pre[hIndex].func;
preHookFunc();
@@ -17343,6 +18049,7 @@ void HP_clif_pTradeAck(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTradeAck_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTradeAck_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17368,6 +18075,7 @@ void HP_clif_pTradeAddItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTradeAddItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTradeAddItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17393,6 +18101,7 @@ void HP_clif_pTradeOk(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTradeOk_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTradeOk_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17418,6 +18127,7 @@ void HP_clif_pTradeCancel(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTradeCancel_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTradeCancel_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17443,6 +18153,7 @@ void HP_clif_pTradeCommit(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTradeCommit_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTradeCommit_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17468,6 +18179,7 @@ void HP_clif_pStopAttack(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pStopAttack_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pStopAttack_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17493,6 +18205,7 @@ void HP_clif_pPutItemToCart(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPutItemToCart_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPutItemToCart_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17518,6 +18231,7 @@ void HP_clif_pGetItemFromCart(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGetItemFromCart_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGetItemFromCart_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17543,6 +18257,7 @@ void HP_clif_pRemoveOption(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pRemoveOption_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pRemoveOption_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17568,6 +18283,7 @@ void HP_clif_pChangeCart(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChangeCart_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChangeCart_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17593,6 +18309,7 @@ void HP_clif_pStatusUp(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pStatusUp_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pStatusUp_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17618,6 +18335,7 @@ void HP_clif_pSkillUp(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSkillUp_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSkillUp_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17643,6 +18361,7 @@ void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToId_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17668,6 +18387,7 @@ void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToId_homun_pre ) {
void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_homun_pre[hIndex].func;
preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &target_id);
@@ -17693,6 +18413,7 @@ void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_sessi
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre ) {
void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_mercenary_pre[hIndex].func;
preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &target_id);
@@ -17718,6 +18439,7 @@ void HP_clif_pUseSkillToPos(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToPos_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17743,6 +18465,7 @@ void HP_clif_pUseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToPosSub_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosSub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosSub_pre[hIndex].func;
preHookFunc(&fd, sd, &skill_lv, &skill_id, &x, &y, &skillmoreinfo);
@@ -17768,6 +18491,7 @@ void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre ) {
void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_homun_pre[hIndex].func;
preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
@@ -17793,6 +18517,7 @@ void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_sess
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre ) {
void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_mercenary_pre[hIndex].func;
preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
@@ -17818,6 +18543,7 @@ void HP_clif_pUseSkillToPosMoreInfo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosMoreInfo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17843,6 +18569,7 @@ void HP_clif_pUseSkillMap(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseSkillMap_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseSkillMap_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17868,6 +18595,7 @@ void HP_clif_pRequestMemo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pRequestMemo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pRequestMemo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17893,6 +18621,7 @@ void HP_clif_pProduceMix(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pProduceMix_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pProduceMix_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17918,6 +18647,7 @@ void HP_clif_pCooking(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCooking_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCooking_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17943,6 +18673,7 @@ void HP_clif_pRepairItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pRepairItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pRepairItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17968,6 +18699,7 @@ void HP_clif_pWeaponRefine(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pWeaponRefine_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pWeaponRefine_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -17993,6 +18725,7 @@ void HP_clif_pNpcSelectMenu(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcSelectMenu_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcSelectMenu_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18018,6 +18751,7 @@ void HP_clif_pNpcNextClicked(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcNextClicked_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcNextClicked_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18043,6 +18777,7 @@ void HP_clif_pNpcAmountInput(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcAmountInput_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcAmountInput_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18068,6 +18803,7 @@ void HP_clif_pNpcStringInput(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcStringInput_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcStringInput_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18093,6 +18829,7 @@ void HP_clif_pNpcCloseClicked(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNpcCloseClicked_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNpcCloseClicked_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18118,6 +18855,7 @@ void HP_clif_pItemIdentify(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pItemIdentify_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pItemIdentify_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18143,6 +18881,7 @@ void HP_clif_pSelectArrow(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSelectArrow_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSelectArrow_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18168,6 +18907,7 @@ void HP_clif_pAutoSpell(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAutoSpell_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAutoSpell_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18193,6 +18933,7 @@ void HP_clif_pUseCard(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pUseCard_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pUseCard_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18218,6 +18959,7 @@ void HP_clif_pInsertCard(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pInsertCard_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pInsertCard_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18243,6 +18985,7 @@ void HP_clif_pSolveCharName(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSolveCharName_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSolveCharName_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18268,6 +19011,7 @@ void HP_clif_pResetChar(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pResetChar_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pResetChar_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18293,6 +19037,7 @@ void HP_clif_pLocalBroadcast(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pLocalBroadcast_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pLocalBroadcast_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18318,6 +19063,7 @@ void HP_clif_pMoveToKafra(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMoveToKafra_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMoveToKafra_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18343,6 +19089,7 @@ void HP_clif_pMoveFromKafra(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMoveFromKafra_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafra_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18368,6 +19115,7 @@ void HP_clif_pMoveToKafraFromCart(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMoveToKafraFromCart_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18393,6 +19141,7 @@ void HP_clif_pMoveFromKafraToCart(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafraToCart_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18418,6 +19167,7 @@ void HP_clif_pCloseKafra(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCloseKafra_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCloseKafra_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18443,6 +19193,7 @@ void HP_clif_pStoragePassword(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pStoragePassword_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pStoragePassword_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18468,6 +19219,7 @@ void HP_clif_pCreateParty(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCreateParty_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCreateParty_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18493,6 +19245,7 @@ void HP_clif_pCreateParty2(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCreateParty2_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCreateParty2_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18518,6 +19271,7 @@ void HP_clif_pPartyInvite(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyInvite_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyInvite_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18543,6 +19297,7 @@ void HP_clif_pPartyInvite2(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyInvite2_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyInvite2_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18568,6 +19323,7 @@ void HP_clif_pReplyPartyInvite(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pReplyPartyInvite_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18593,6 +19349,7 @@ void HP_clif_pReplyPartyInvite2(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pReplyPartyInvite2_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite2_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18618,6 +19375,7 @@ void HP_clif_pLeaveParty(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pLeaveParty_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pLeaveParty_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18643,6 +19401,7 @@ void HP_clif_pRemovePartyMember(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pRemovePartyMember_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pRemovePartyMember_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18668,6 +19427,7 @@ void HP_clif_pPartyChangeOption(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyChangeOption_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyChangeOption_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18693,6 +19453,7 @@ void HP_clif_pPartyMessage(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyMessage_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyMessage_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18718,6 +19479,7 @@ void HP_clif_pPartyChangeLeader(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyChangeLeader_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyChangeLeader_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18743,6 +19505,7 @@ void HP_clif_pPartyBookingRegisterReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRegisterReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18768,6 +19531,7 @@ void HP_clif_pPartyBookingSearchReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSearchReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18793,6 +19557,7 @@ void HP_clif_pPartyBookingDeleteReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingDeleteReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18818,6 +19583,7 @@ void HP_clif_pPartyBookingUpdateReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingUpdateReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18843,6 +19609,7 @@ void HP_clif_pPartyRecruitRegisterReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitRegisterReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18868,6 +19635,7 @@ void HP_clif_pPartyRecruitSearchReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitSearchReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18893,6 +19661,7 @@ void HP_clif_pPartyRecruitDeleteReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitDeleteReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18918,6 +19687,7 @@ void HP_clif_pPartyRecruitUpdateReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitUpdateReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18943,6 +19713,7 @@ void HP_clif_pCloseVending(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCloseVending_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCloseVending_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18968,6 +19739,7 @@ void HP_clif_pVendingListReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pVendingListReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pVendingListReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -18993,6 +19765,7 @@ void HP_clif_pPurchaseReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPurchaseReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19018,6 +19791,7 @@ void HP_clif_pPurchaseReq2(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPurchaseReq2_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq2_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19043,6 +19817,7 @@ void HP_clif_pOpenVending(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pOpenVending_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pOpenVending_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19068,6 +19843,7 @@ void HP_clif_pCreateGuild(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCreateGuild_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCreateGuild_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19093,6 +19869,7 @@ void HP_clif_pGuildCheckMaster(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildCheckMaster_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildCheckMaster_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19118,6 +19895,7 @@ void HP_clif_pGuildRequestInfo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildRequestInfo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildRequestInfo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19143,6 +19921,7 @@ void HP_clif_pGuildChangePositionInfo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildChangePositionInfo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19168,6 +19947,7 @@ void HP_clif_pGuildChangeMemberPosition(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildChangeMemberPosition_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19193,6 +19973,7 @@ void HP_clif_pGuildRequestEmblem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildRequestEmblem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildRequestEmblem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19218,6 +19999,7 @@ void HP_clif_pGuildChangeEmblem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildChangeEmblem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildChangeEmblem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19243,6 +20025,7 @@ void HP_clif_pGuildChangeNotice(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildChangeNotice_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildChangeNotice_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19268,6 +20051,7 @@ void HP_clif_pGuildInvite(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildInvite_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildInvite_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19293,6 +20077,7 @@ void HP_clif_pGuildReplyInvite(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildReplyInvite_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildReplyInvite_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19318,6 +20103,7 @@ void HP_clif_pGuildLeave(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildLeave_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildLeave_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19343,6 +20129,7 @@ void HP_clif_pGuildExpulsion(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildExpulsion_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildExpulsion_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19368,6 +20155,7 @@ void HP_clif_pGuildMessage(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildMessage_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildMessage_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19393,6 +20181,7 @@ void HP_clif_pGuildRequestAlliance(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildRequestAlliance_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildRequestAlliance_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19418,6 +20207,7 @@ void HP_clif_pGuildReplyAlliance(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildReplyAlliance_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildReplyAlliance_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19443,6 +20233,7 @@ void HP_clif_pGuildDelAlliance(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildDelAlliance_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildDelAlliance_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19468,6 +20259,7 @@ void HP_clif_pGuildOpposition(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildOpposition_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildOpposition_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19493,6 +20285,7 @@ void HP_clif_pGuildBreak(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildBreak_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildBreak_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19518,6 +20311,7 @@ void HP_clif_pPetMenu(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPetMenu_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPetMenu_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19543,6 +20337,7 @@ void HP_clif_pCatchPet(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCatchPet_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCatchPet_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19568,6 +20363,7 @@ void HP_clif_pSelectEgg(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSelectEgg_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSelectEgg_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19593,6 +20389,7 @@ void HP_clif_pSendEmotion(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSendEmotion_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSendEmotion_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19618,6 +20415,7 @@ void HP_clif_pChangePetName(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChangePetName_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChangePetName_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19643,6 +20441,7 @@ void HP_clif_pGMKick(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMKick_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMKick_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19668,6 +20467,7 @@ void HP_clif_pGMKickAll(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMKickAll_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMKickAll_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19693,6 +20493,7 @@ void HP_clif_pGMShift(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMShift_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMShift_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19718,6 +20519,7 @@ void HP_clif_pGMRemove2(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMRemove2_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMRemove2_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19743,6 +20545,7 @@ void HP_clif_pGMRecall(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMRecall_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMRecall_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19768,6 +20571,7 @@ void HP_clif_pGMRecall2(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMRecall2_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMRecall2_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19793,6 +20597,7 @@ void HP_clif_pGM_Monster_Item(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGM_Monster_Item_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGM_Monster_Item_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19818,6 +20623,7 @@ void HP_clif_pGMHide(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMHide_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMHide_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19843,6 +20649,7 @@ void HP_clif_pGMReqNoChat(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMReqNoChat_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMReqNoChat_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19868,6 +20675,7 @@ void HP_clif_pGMRc(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMRc_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMRc_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19893,6 +20701,7 @@ void HP_clif_pGMReqAccountName(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMReqAccountName_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMReqAccountName_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19918,6 +20727,7 @@ void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMChangeMapType_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMChangeMapType_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19943,6 +20753,7 @@ void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGMFullStrip_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19968,6 +20779,7 @@ void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPMIgnore_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPMIgnore_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -19993,6 +20805,7 @@ void HP_clif_pPMIgnoreAll(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPMIgnoreAll_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreAll_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20018,6 +20831,7 @@ void HP_clif_pPMIgnoreList(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPMIgnoreList_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreList_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20043,6 +20857,7 @@ void HP_clif_pNoviceDoriDori(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNoviceDoriDori_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNoviceDoriDori_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20068,6 +20883,7 @@ void HP_clif_pNoviceExplosionSpirits(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNoviceExplosionSpirits_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20093,6 +20909,7 @@ void HP_clif_pFriendsListAdd(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pFriendsListAdd_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pFriendsListAdd_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20118,6 +20935,7 @@ void HP_clif_pFriendsListReply(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pFriendsListReply_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pFriendsListReply_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20143,6 +20961,7 @@ void HP_clif_pFriendsListRemove(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pFriendsListRemove_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pFriendsListRemove_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20168,6 +20987,7 @@ void HP_clif_pPVPInfo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPVPInfo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPVPInfo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20193,6 +21013,7 @@ void HP_clif_pBlacksmith(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBlacksmith_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBlacksmith_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20218,6 +21039,7 @@ void HP_clif_pAlchemist(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAlchemist_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAlchemist_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20243,6 +21065,7 @@ void HP_clif_pTaekwon(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pTaekwon_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pTaekwon_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20268,6 +21091,7 @@ void HP_clif_pRankingPk(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pRankingPk_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pRankingPk_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20293,6 +21117,7 @@ void HP_clif_pFeelSaveOk(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pFeelSaveOk_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pFeelSaveOk_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20318,6 +21143,7 @@ void HP_clif_pChangeHomunculusName(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pChangeHomunculusName_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pChangeHomunculusName_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20343,6 +21169,7 @@ void HP_clif_pHomMoveToMaster(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pHomMoveToMaster_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pHomMoveToMaster_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20368,6 +21195,7 @@ void HP_clif_pHomMoveTo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pHomMoveTo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pHomMoveTo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20393,6 +21221,7 @@ void HP_clif_pHomAttack(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pHomAttack_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pHomAttack_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20418,6 +21247,7 @@ void HP_clif_pHomMenu(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pHomMenu_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pHomMenu_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20443,6 +21273,7 @@ void HP_clif_pAutoRevive(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAutoRevive_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAutoRevive_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20468,6 +21299,7 @@ void HP_clif_pCheck(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCheck_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCheck_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20493,6 +21325,7 @@ void HP_clif_pMail_refreshinbox(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_refreshinbox_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_refreshinbox_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20518,6 +21351,7 @@ void HP_clif_pMail_read(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_read_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_read_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20543,6 +21377,7 @@ void HP_clif_pMail_getattach(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_getattach_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_getattach_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20568,6 +21403,7 @@ void HP_clif_pMail_delete(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_delete_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_delete_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20593,6 +21429,7 @@ void HP_clif_pMail_return(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_return_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_return_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20618,6 +21455,7 @@ void HP_clif_pMail_setattach(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_setattach_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_setattach_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20643,6 +21481,7 @@ void HP_clif_pMail_winopen(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_winopen_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_winopen_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20668,6 +21507,7 @@ void HP_clif_pMail_send(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMail_send_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMail_send_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20693,6 +21533,7 @@ void HP_clif_pAuction_cancelreg(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_cancelreg_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_cancelreg_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20718,6 +21559,7 @@ void HP_clif_pAuction_setitem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_setitem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_setitem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20743,6 +21585,7 @@ void HP_clif_pAuction_register(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_register_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_register_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20768,6 +21611,7 @@ void HP_clif_pAuction_cancel(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_cancel_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_cancel_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20793,6 +21637,7 @@ void HP_clif_pAuction_close(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_close_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_close_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20818,6 +21663,7 @@ void HP_clif_pAuction_bid(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_bid_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_bid_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20843,6 +21689,7 @@ void HP_clif_pAuction_search(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_search_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_search_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20868,6 +21715,7 @@ void HP_clif_pAuction_buysell(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAuction_buysell_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAuction_buysell_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20893,6 +21741,7 @@ void HP_clif_pcashshop_buy(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pcashshop_buy_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pcashshop_buy_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20918,6 +21767,7 @@ void HP_clif_pAdopt_request(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAdopt_request_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAdopt_request_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20943,6 +21793,7 @@ void HP_clif_pAdopt_reply(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pAdopt_reply_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pAdopt_reply_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20968,6 +21819,7 @@ void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pViewPlayerEquip_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pViewPlayerEquip_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -20993,6 +21845,7 @@ void HP_clif_pEquipTick(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pEquipTick_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pEquipTick_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21018,6 +21871,7 @@ void HP_clif_pquestStateAck(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pquestStateAck_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pquestStateAck_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21043,6 +21897,7 @@ void HP_clif_pmercenary_action(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pmercenary_action_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pmercenary_action_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21068,6 +21923,7 @@ void HP_clif_pBattleChat(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBattleChat_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBattleChat_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21093,6 +21949,7 @@ void HP_clif_pLessEffect(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pLessEffect_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pLessEffect_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21118,6 +21975,7 @@ void HP_clif_pItemListWindowSelected(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pItemListWindowSelected_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pItemListWindowSelected_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21143,6 +22001,7 @@ void HP_clif_pReqOpenBuyingStore(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pReqOpenBuyingStore_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21168,6 +22027,7 @@ void HP_clif_pReqCloseBuyingStore(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pReqCloseBuyingStore_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21193,6 +22053,7 @@ void HP_clif_pReqClickBuyingStore(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pReqClickBuyingStore_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pReqClickBuyingStore_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21218,6 +22079,7 @@ void HP_clif_pReqTradeBuyingStore(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pReqTradeBuyingStore_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21243,6 +22105,7 @@ void HP_clif_pSearchStoreInfo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSearchStoreInfo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21268,6 +22131,7 @@ void HP_clif_pSearchStoreInfoNextPage(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoNextPage_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21293,6 +22157,7 @@ void HP_clif_pCloseSearchStoreInfo(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCloseSearchStoreInfo_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21318,6 +22183,7 @@ void HP_clif_pSearchStoreInfoListItemClick(int fd, struct map_session_data *sd)
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoListItemClick_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21343,6 +22209,7 @@ void HP_clif_pDebug(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pDebug_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pDebug_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21368,6 +22235,7 @@ void HP_clif_pSkillSelectMenu(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pSkillSelectMenu_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pSkillSelectMenu_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21393,6 +22261,7 @@ void HP_clif_pMoveItem(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pMoveItem_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pMoveItem_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21418,6 +22287,7 @@ void HP_clif_pDull(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pDull_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pDull_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21443,6 +22313,7 @@ void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBGQueueRegister_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBGQueueRegister_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21468,6 +22339,7 @@ void HP_clif_pBGQueueCheckState(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBGQueueCheckState_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBGQueueCheckState_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21493,6 +22365,7 @@ void HP_clif_pBGQueueRevokeReq(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBGQueueRevokeReq_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21518,6 +22391,7 @@ void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBGQueueBattleBeginAck_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21543,6 +22417,7 @@ void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCashShopOpen_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21568,6 +22443,7 @@ void HP_clif_pCashShopClose(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCashShopClose_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCashShopClose_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21593,6 +22469,7 @@ void HP_clif_pCashShopReqTab(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCashShopReqTab_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCashShopReqTab_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21618,6 +22495,7 @@ void HP_clif_pCashShopSchedule(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCashShopSchedule_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCashShopSchedule_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21643,6 +22521,7 @@ void HP_clif_pCashShopBuy(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pCashShopBuy_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pCashShopBuy_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21668,6 +22547,7 @@ void HP_clif_pPartyTick(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyTick_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyTick_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21693,6 +22573,7 @@ void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pGuildInvite2_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pGuildInvite2_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21718,6 +22599,7 @@ void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingAddFilter_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21743,6 +22625,7 @@ void HP_clif_pPartyBookingSubFilter(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSubFilter_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21768,6 +22651,7 @@ void HP_clif_pPartyBookingReqVolunteer(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingReqVolunteer_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21793,6 +22677,7 @@ void HP_clif_pPartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRefuseVolunteer_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21818,6 +22703,7 @@ void HP_clif_pPartyBookingCancelVolunteer(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pPartyBookingCancelVolunteer_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21843,6 +22729,7 @@ void HP_clif_pBankDeposit(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBankDeposit_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBankDeposit_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21868,6 +22755,7 @@ void HP_clif_pBankWithdraw(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBankWithdraw_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBankWithdraw_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21893,6 +22781,7 @@ void HP_clif_pBankCheck(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBankCheck_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBankCheck_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21918,6 +22807,7 @@ void HP_clif_pBankOpen(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBankOpen_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBankOpen_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21943,6 +22833,7 @@ void HP_clif_pBankClose(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pBankClose_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pBankClose_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21968,6 +22859,7 @@ void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNPCShopClosed_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNPCShopClosed_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -21993,6 +22885,7 @@ void HP_clif_pNPCMarketClosed(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNPCMarketClosed_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNPCMarketClosed_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -22018,6 +22911,7 @@ void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pNPCMarketPurchase_pre ) {
void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_pNPCMarketPurchase_pre[hIndex].func;
preHookFunc(&fd, sd);
@@ -22045,6 +22939,7 @@ int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) {
int retVal___ = 0;
if( HPMHooks.count.HP_duel_create_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const unsigned int *maxpl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_create_pre[hIndex].func;
retVal___ = preHookFunc(sd, &maxpl);
@@ -22070,6 +22965,7 @@ void HP_duel_invite(const unsigned int did, struct map_session_data *sd, struct
int hIndex = 0;
if( HPMHooks.count.HP_duel_invite_pre ) {
void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd, struct map_session_data *target_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_invite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_invite_pre[hIndex].func;
preHookFunc(&did, sd, target_sd);
@@ -22095,6 +22991,7 @@ void HP_duel_accept(const unsigned int did, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_duel_accept_pre ) {
void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_accept_pre[hIndex].func;
preHookFunc(&did, sd);
@@ -22120,6 +23017,7 @@ void HP_duel_reject(const unsigned int did, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_duel_reject_pre ) {
void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_reject_pre[hIndex].func;
preHookFunc(&did, sd);
@@ -22145,6 +23043,7 @@ void HP_duel_leave(const unsigned int did, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_duel_leave_pre ) {
void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_leave_pre[hIndex].func;
preHookFunc(&did, sd);
@@ -22170,6 +23069,7 @@ void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_duel_showinfo_pre ) {
void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_showinfo_pre[hIndex].func;
preHookFunc(&did, sd);
@@ -22196,6 +23096,7 @@ int HP_duel_checktime(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_duel_checktime_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_checktime_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -22221,6 +23122,7 @@ void HP_duel_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_duel_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -22246,6 +23148,7 @@ void HP_duel_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_duel_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_duel_final_pre[hIndex].func;
preHookFunc();
@@ -22273,6 +23176,7 @@ int HP_elemental_init(bool minimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_init_pre ) {
int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_init_pre[hIndex].func;
retVal___ = preHookFunc(&minimal);
@@ -22298,6 +23202,7 @@ void HP_elemental_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_elemental_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_final_pre[hIndex].func;
preHookFunc();
@@ -22324,6 +23229,7 @@ bool HP_elemental_class(int class_) {
bool retVal___ = false;
if( HPMHooks.count.HP_elemental_class_pre ) {
bool (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_class_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -22350,6 +23256,7 @@ struct view_data* HP_elemental_get_viewdata(int class_) {
struct view_data* retVal___ = NULL;
if( HPMHooks.count.HP_elemental_get_viewdata_pre ) {
struct view_data* (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_get_viewdata_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -22376,6 +23283,7 @@ int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int li
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_create_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_create_pre[hIndex].func;
retVal___ = preHookFunc(sd, &class_, &lifetime);
@@ -22402,6 +23310,7 @@ int HP_elemental_data_received(struct s_elemental *ele, bool flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_data_received_pre ) {
int (*preHookFunc) (struct s_elemental *ele, bool *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_data_received_pre[hIndex].func;
retVal___ = preHookFunc(ele, &flag);
@@ -22428,6 +23337,7 @@ int HP_elemental_save(struct elemental_data *ed) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_save_pre ) {
int (*preHookFunc) (struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_save_pre[hIndex].func;
retVal___ = preHookFunc(ed);
@@ -22454,6 +23364,7 @@ int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_change_mode_ack_pre ) {
int (*preHookFunc) (struct elemental_data *ed, int *mode);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_change_mode_ack_pre[hIndex].func;
retVal___ = preHookFunc(ed, &mode);
@@ -22480,6 +23391,7 @@ int HP_elemental_change_mode(struct elemental_data *ed, int mode) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_change_mode_pre ) {
int (*preHookFunc) (struct elemental_data *ed, int *mode);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_change_mode_pre[hIndex].func;
retVal___ = preHookFunc(ed, &mode);
@@ -22505,6 +23417,7 @@ void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) {
int hIndex = 0;
if( HPMHooks.count.HP_elemental_heal_pre ) {
void (*preHookFunc) (struct elemental_data *ed, int *hp, int *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_heal_pre[hIndex].func;
preHookFunc(ed, &hp, &sp);
@@ -22531,6 +23444,7 @@ int HP_elemental_dead(struct elemental_data *ed) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_dead_pre ) {
int (*preHookFunc) (struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_dead_pre[hIndex].func;
retVal___ = preHookFunc(ed);
@@ -22557,6 +23471,7 @@ int HP_elemental_delete(struct elemental_data *ed, int reply) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_delete_pre ) {
int (*preHookFunc) (struct elemental_data *ed, int *reply);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_delete_pre[hIndex].func;
retVal___ = preHookFunc(ed, &reply);
@@ -22582,6 +23497,7 @@ void HP_elemental_summon_stop(struct elemental_data *ed) {
int hIndex = 0;
if( HPMHooks.count.HP_elemental_summon_stop_pre ) {
void (*preHookFunc) (struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_summon_stop_pre[hIndex].func;
preHookFunc(ed);
@@ -22608,6 +23524,7 @@ int HP_elemental_get_lifetime(struct elemental_data *ed) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_get_lifetime_pre ) {
int (*preHookFunc) (struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_get_lifetime_pre[hIndex].func;
retVal___ = preHookFunc(ed);
@@ -22634,6 +23551,7 @@ int HP_elemental_unlocktarget(struct elemental_data *ed) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_unlocktarget_pre ) {
int (*preHookFunc) (struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_unlocktarget_pre[hIndex].func;
retVal___ = preHookFunc(ed);
@@ -22660,6 +23578,7 @@ int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_skillnotok_pre ) {
int (*preHookFunc) (uint16 *skill_id, struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_skillnotok_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, ed);
@@ -22686,6 +23605,7 @@ int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl)
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_set_target_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_set_target_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_set_target_pre[hIndex].func;
retVal___ = preHookFunc(sd, bl);
@@ -22712,6 +23632,7 @@ int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id)
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_clean_single_effect_pre ) {
int (*preHookFunc) (struct elemental_data *ed, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_clean_single_effect_pre[hIndex].func;
retVal___ = preHookFunc(ed, &skill_id);
@@ -22738,6 +23659,7 @@ int HP_elemental_clean_effect(struct elemental_data *ed) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_clean_effect_pre ) {
int (*preHookFunc) (struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_clean_effect_pre[hIndex].func;
retVal___ = preHookFunc(ed);
@@ -22764,6 +23686,7 @@ int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, int64
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_action_pre ) {
int (*preHookFunc) (struct elemental_data *ed, struct block_list *bl, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_action_pre[hIndex].func;
retVal___ = preHookFunc(ed, bl, &tick);
@@ -22791,6 +23714,7 @@ struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint
memset(&retVal___, '\0', sizeof(struct skill_condition));
if( HPMHooks.count.HP_elemental_skill_get_requirements_pre ) {
struct skill_condition (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skill_get_requirements_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_skill_get_requirements_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -22817,6 +23741,7 @@ int HP_elemental_read_skilldb(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_read_skilldb_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_read_skilldb_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -22842,6 +23767,7 @@ void HP_elemental_reload_db(void) {
int hIndex = 0;
if( HPMHooks.count.HP_elemental_reload_db_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_reload_db_pre[hIndex].func;
preHookFunc();
@@ -22867,6 +23793,7 @@ void HP_elemental_reload_skilldb(void) {
int hIndex = 0;
if( HPMHooks.count.HP_elemental_reload_skilldb_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_reload_skilldb_pre[hIndex].func;
preHookFunc();
@@ -22893,6 +23820,7 @@ int HP_elemental_search_index(int class_) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_search_index_pre ) {
int (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_search_index_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -22918,6 +23846,7 @@ void HP_elemental_summon_init(struct elemental_data *ed) {
int hIndex = 0;
if( HPMHooks.count.HP_elemental_summon_init_pre ) {
void (*preHookFunc) (struct elemental_data *ed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_summon_init_pre[hIndex].func;
preHookFunc(ed);
@@ -22944,6 +23873,7 @@ int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_summon_end_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_summon_end_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -22970,6 +23900,7 @@ int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_activesearch_pre[hIndex].func;
@@ -23002,6 +23933,7 @@ int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_ai_sub_timer_pre ) {
int (*preHookFunc) (struct elemental_data *ed, struct map_session_data *sd, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_pre[hIndex].func;
retVal___ = preHookFunc(ed, sd, &tick);
@@ -23028,6 +23960,7 @@ int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_elemental_ai_sub_foreachclient_pre[hIndex].func;
@@ -23060,6 +23993,7 @@ int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_ai_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_ai_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -23086,6 +24020,7 @@ int HP_elemental_read_db(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_elemental_read_db_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_elemental_read_db_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -23112,6 +24047,7 @@ void HP_guild_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -23137,6 +24073,7 @@ void HP_guild_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_final_pre[hIndex].func;
preHookFunc();
@@ -23163,6 +24100,7 @@ int HP_guild_skill_get_max(int id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_skill_get_max_pre ) {
int (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_skill_get_max_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -23189,6 +24127,7 @@ int HP_guild_checkskill(struct guild *g, int id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_checkskill_pre ) {
int (*preHookFunc) (struct guild *g, int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_checkskill_pre[hIndex].func;
retVal___ = preHookFunc(g, &id);
@@ -23215,6 +24154,7 @@ int HP_guild_check_skill_require(struct guild *g, int id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_check_skill_require_pre ) {
int (*preHookFunc) (struct guild *g, int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_check_skill_require_pre[hIndex].func;
retVal___ = preHookFunc(g, &id);
@@ -23241,6 +24181,7 @@ int HP_guild_checkcastles(struct guild *g) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_checkcastles_pre ) {
int (*preHookFunc) (struct guild *g);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_checkcastles_pre[hIndex].func;
retVal___ = preHookFunc(g);
@@ -23267,6 +24208,7 @@ bool HP_guild_isallied(int guild_id, int guild_id2) {
bool retVal___ = false;
if( HPMHooks.count.HP_guild_isallied_pre ) {
bool (*preHookFunc) (int *guild_id, int *guild_id2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_isallied_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &guild_id2);
@@ -23293,6 +24235,7 @@ struct guild* HP_guild_search(int guild_id) {
struct guild* retVal___ = NULL;
if( HPMHooks.count.HP_guild_search_pre ) {
struct guild* (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_search_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -23319,6 +24262,7 @@ struct guild* HP_guild_searchname(char *str) {
struct guild* retVal___ = NULL;
if( HPMHooks.count.HP_guild_searchname_pre ) {
struct guild* (*preHookFunc) (char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_searchname_pre[hIndex].func;
retVal___ = preHookFunc(str);
@@ -23345,6 +24289,7 @@ struct guild_castle* HP_guild_castle_search(int gcid) {
struct guild_castle* retVal___ = NULL;
if( HPMHooks.count.HP_guild_castle_search_pre ) {
struct guild_castle* (*preHookFunc) (int *gcid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_castle_search_pre[hIndex].func;
retVal___ = preHookFunc(&gcid);
@@ -23371,6 +24316,7 @@ struct guild_castle* HP_guild_mapname2gc(const char *mapname) {
struct guild_castle* retVal___ = NULL;
if( HPMHooks.count.HP_guild_mapname2gc_pre ) {
struct guild_castle* (*preHookFunc) (const char *mapname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_mapname2gc_pre[hIndex].func;
retVal___ = preHookFunc(mapname);
@@ -23397,6 +24343,7 @@ struct guild_castle* HP_guild_mapindex2gc(short map_index) {
struct guild_castle* retVal___ = NULL;
if( HPMHooks.count.HP_guild_mapindex2gc_pre ) {
struct guild_castle* (*preHookFunc) (short *map_index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_mapindex2gc_pre[hIndex].func;
retVal___ = preHookFunc(&map_index);
@@ -23423,6 +24370,7 @@ struct map_session_data* HP_guild_getavailablesd(struct guild *g) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_guild_getavailablesd_pre ) {
struct map_session_data* (*preHookFunc) (struct guild *g);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_getavailablesd_pre[hIndex].func;
retVal___ = preHookFunc(g);
@@ -23449,6 +24397,7 @@ int HP_guild_getindex(struct guild *g, int account_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_getindex_pre ) {
int (*preHookFunc) (struct guild *g, int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_getindex_pre[hIndex].func;
retVal___ = preHookFunc(g, &account_id, &char_id);
@@ -23475,6 +24424,7 @@ int HP_guild_getposition(struct guild *g, struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_getposition_pre ) {
int (*preHookFunc) (struct guild *g, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_getposition_pre[hIndex].func;
retVal___ = preHookFunc(g, sd);
@@ -23501,6 +24451,7 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_guild_payexp_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd, unsigned int *exp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_payexp_pre[hIndex].func;
retVal___ = preHookFunc(sd, &exp);
@@ -23527,6 +24478,7 @@ int HP_guild_getexp(struct map_session_data *sd, int exp) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_getexp_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *exp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_getexp_pre[hIndex].func;
retVal___ = preHookFunc(sd, &exp);
@@ -23553,6 +24505,7 @@ int HP_guild_create(struct map_session_data *sd, const char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_create_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_create_pre[hIndex].func;
retVal___ = preHookFunc(sd, name);
@@ -23579,6 +24532,7 @@ int HP_guild_created(int account_id, int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_created_pre ) {
int (*preHookFunc) (int *account_id, int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_created_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &guild_id);
@@ -23605,6 +24559,7 @@ int HP_guild_request_info(int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_request_info_pre ) {
int (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_request_info_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -23631,6 +24586,7 @@ int HP_guild_recv_noinfo(int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_recv_noinfo_pre ) {
int (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_recv_noinfo_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -23657,6 +24613,7 @@ int HP_guild_recv_info(struct guild *sg) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_recv_info_pre ) {
int (*preHookFunc) (struct guild *sg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_recv_info_pre[hIndex].func;
retVal___ = preHookFunc(sg);
@@ -23683,6 +24640,7 @@ int HP_guild_npc_request_info(int guild_id, const char *ev) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_npc_request_info_pre ) {
int (*preHookFunc) (int *guild_id, const char *ev);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_npc_request_info_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, ev);
@@ -23709,6 +24667,7 @@ int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_invite_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_invite_pre[hIndex].func;
retVal___ = preHookFunc(sd, tsd);
@@ -23735,6 +24694,7 @@ int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_reply_invite_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_invite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_reply_invite_pre[hIndex].func;
retVal___ = preHookFunc(sd, &guild_id, &flag);
@@ -23760,6 +24720,7 @@ void HP_guild_member_joined(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_member_joined_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_member_joined_pre[hIndex].func;
preHookFunc(sd);
@@ -23786,6 +24747,7 @@ int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_member_added_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_added_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_member_added_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag);
@@ -23812,6 +24774,7 @@ int HP_guild_leave(struct map_session_data *sd, int guild_id, int account_id, in
int retVal___ = 0;
if( HPMHooks.count.HP_guild_leave_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_leave_pre[hIndex].func;
retVal___ = preHookFunc(sd, &guild_id, &account_id, &char_id, mes);
@@ -23838,6 +24801,7 @@ int HP_guild_member_withdraw(int guild_id, int account_id, int char_id, int flag
int retVal___ = 0;
if( HPMHooks.count.HP_guild_member_withdraw_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_withdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_member_withdraw_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, name, mes);
@@ -23864,6 +24828,7 @@ int HP_guild_expulsion(struct map_session_data *sd, int guild_id, int account_id
int retVal___ = 0;
if( HPMHooks.count.HP_guild_expulsion_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expulsion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_expulsion_pre[hIndex].func;
retVal___ = preHookFunc(sd, &guild_id, &account_id, &char_id, mes);
@@ -23890,6 +24855,7 @@ int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_skillup_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_skillup_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -23915,6 +24881,7 @@ void HP_guild_block_skill(struct map_session_data *sd, int time) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_block_skill_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *time);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_block_skill_pre[hIndex].func;
preHookFunc(sd, &time);
@@ -23941,6 +24908,7 @@ int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *t
int retVal___ = 0;
if( HPMHooks.count.HP_guild_reqalliance_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_reqalliance_pre[hIndex].func;
retVal___ = preHookFunc(sd, tsd);
@@ -23967,6 +24935,7 @@ int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int
int retVal___ = 0;
if( HPMHooks.count.HP_guild_reply_reqalliance_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_reqalliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_reply_reqalliance_pre[hIndex].func;
retVal___ = preHookFunc(sd, &account_id, &flag);
@@ -23993,6 +24962,7 @@ int HP_guild_allianceack(int guild_id1, int guild_id2, int account_id1, int acco
int retVal___ = 0;
if( HPMHooks.count.HP_guild_allianceack_pre ) {
int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_allianceack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_allianceack_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2);
@@ -24019,6 +24989,7 @@ int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_delalliance_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_delalliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_delalliance_pre[hIndex].func;
retVal___ = preHookFunc(sd, &guild_id, &flag);
@@ -24045,6 +25016,7 @@ int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *ts
int retVal___ = 0;
if( HPMHooks.count.HP_guild_opposition_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_opposition_pre[hIndex].func;
retVal___ = preHookFunc(sd, tsd);
@@ -24071,6 +25043,7 @@ int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_check_alliance_pre ) {
int (*preHookFunc) (int *guild_id1, int *guild_id2, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_check_alliance_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id1, &guild_id2, &flag);
@@ -24097,6 +25070,7 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_send_memberinfoshort_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *online);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_send_memberinfoshort_pre[hIndex].func;
retVal___ = preHookFunc(sd, &online);
@@ -24123,6 +25097,7 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int
int retVal___ = 0;
if( HPMHooks.count.HP_guild_recv_memberinfoshort_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_);
@@ -24149,6 +25124,7 @@ int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, sh
int retVal___ = 0;
if( HPMHooks.count.HP_guild_change_memberposition_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_memberposition_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_change_memberposition_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &idx);
@@ -24175,6 +25151,7 @@ int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_memberposition_changed_pre ) {
int (*preHookFunc) (struct guild *g, int *idx, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_memberposition_changed_pre[hIndex].func;
retVal___ = preHookFunc(g, &idx, &pos);
@@ -24201,6 +25178,7 @@ int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, cons
int retVal___ = 0;
if( HPMHooks.count.HP_guild_change_position_pre ) {
int (*preHookFunc) (int *guild_id, int *idx, int *mode, int *exp_mode, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_position_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_change_position_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &idx, &mode, &exp_mode, name);
@@ -24227,6 +25205,7 @@ int HP_guild_position_changed(int guild_id, int idx, struct guild_position *p) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_position_changed_pre ) {
int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_position_changed_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &idx, p);
@@ -24253,6 +25232,7 @@ int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char
int retVal___ = 0;
if( HPMHooks.count.HP_guild_change_notice_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *guild_id, const char *mes1, const char *mes2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_notice_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_change_notice_pre[hIndex].func;
retVal___ = preHookFunc(sd, &guild_id, mes1, mes2);
@@ -24279,6 +25259,7 @@ int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_notice_changed_pre ) {
int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_notice_changed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_notice_changed_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, mes1, mes2);
@@ -24305,6 +25286,7 @@ int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *dat
int retVal___ = 0;
if( HPMHooks.count.HP_guild_change_emblem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *len, const char *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_emblem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_change_emblem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &len, data);
@@ -24331,6 +25313,7 @@ int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *da
int retVal___ = 0;
if( HPMHooks.count.HP_guild_emblem_changed_pre ) {
int (*preHookFunc) (int *len, int *guild_id, int *emblem_id, const char *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_emblem_changed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_emblem_changed_pre[hIndex].func;
retVal___ = preHookFunc(&len, &guild_id, &emblem_id, data);
@@ -24357,6 +25340,7 @@ int HP_guild_send_message(struct map_session_data *sd, const char *mes, int len)
int retVal___ = 0;
if( HPMHooks.count.HP_guild_send_message_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_send_message_pre[hIndex].func;
retVal___ = preHookFunc(sd, mes, &len);
@@ -24383,6 +25367,7 @@ int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len
int retVal___ = 0;
if( HPMHooks.count.HP_guild_recv_message_pre ) {
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);
@@ -24409,6 +25394,7 @@ int HP_guild_send_dot_remove(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_send_dot_remove_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_send_dot_remove_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -24435,6 +25421,7 @@ int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_skillupack_pre ) {
int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_skillupack_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &skill_id, &account_id);
@@ -24461,6 +25448,7 @@ int HP_guild_dobreak(struct map_session_data *sd, char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_dobreak_pre ) {
int (*preHookFunc) (struct map_session_data *sd, char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_dobreak_pre[hIndex].func;
retVal___ = preHookFunc(sd, name);
@@ -24487,6 +25475,7 @@ int HP_guild_broken(int guild_id, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_broken_pre ) {
int (*preHookFunc) (int *guild_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_broken_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &flag);
@@ -24513,6 +25502,7 @@ int HP_guild_gm_change(int guild_id, struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_gm_change_pre ) {
int (*preHookFunc) (int *guild_id, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_gm_change_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, sd);
@@ -24539,6 +25529,7 @@ int HP_guild_gm_changed(int guild_id, int account_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_gm_changed_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_changed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_gm_changed_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id);
@@ -24564,6 +25555,7 @@ void HP_guild_castle_map_init(void) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_castle_map_init_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_castle_map_init_pre[hIndex].func;
preHookFunc();
@@ -24590,6 +25582,7 @@ int HP_guild_castledatasave(int castle_id, int index, int value) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_castledatasave_pre ) {
int (*preHookFunc) (int *castle_id, int *index, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_castledatasave_pre[hIndex].func;
retVal___ = preHookFunc(&castle_id, &index, &value);
@@ -24616,6 +25609,7 @@ int HP_guild_castledataloadack(int len, struct guild_castle *gc) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_castledataloadack_pre ) {
int (*preHookFunc) (int *len, struct guild_castle *gc);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_castledataloadack_pre[hIndex].func;
retVal___ = preHookFunc(&len, gc);
@@ -24641,6 +25635,7 @@ void HP_guild_castle_reconnect(int castle_id, int index, int value) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_castle_reconnect_pre ) {
void (*preHookFunc) (int *castle_id, int *index, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_castle_reconnect_pre[hIndex].func;
preHookFunc(&castle_id, &index, &value);
@@ -24666,6 +25661,7 @@ void HP_guild_agit_start(void) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_agit_start_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_agit_start_pre[hIndex].func;
preHookFunc();
@@ -24691,6 +25687,7 @@ void HP_guild_agit_end(void) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_agit_end_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_agit_end_pre[hIndex].func;
preHookFunc();
@@ -24716,6 +25713,7 @@ void HP_guild_agit2_start(void) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_agit2_start_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_agit2_start_pre[hIndex].func;
preHookFunc();
@@ -24741,6 +25739,7 @@ void HP_guild_agit2_end(void) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_agit2_end_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_agit2_end_pre[hIndex].func;
preHookFunc();
@@ -24766,6 +25765,7 @@ void HP_guild_flag_add(struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_flag_add_pre ) {
void (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_flag_add_pre[hIndex].func;
preHookFunc(nd);
@@ -24791,6 +25791,7 @@ void HP_guild_flag_remove(struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_flag_remove_pre ) {
void (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_flag_remove_pre[hIndex].func;
preHookFunc(nd);
@@ -24816,6 +25817,7 @@ void HP_guild_flags_clear(void) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_flags_clear_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_flags_clear_pre[hIndex].func;
preHookFunc();
@@ -24841,6 +25843,7 @@ void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16
int hIndex = 0;
if( HPMHooks.count.HP_guild_aura_refresh_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_aura_refresh_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_aura_refresh_pre[hIndex].func;
preHookFunc(sd, &skill_id, &skill_lv);
@@ -24866,6 +25869,7 @@ void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_retrieveitembound_pre ) {
void (*preHookFunc) (int *char_id, int *aid, int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_retrieveitembound_pre[hIndex].func;
preHookFunc(&char_id, &aid, &guild_id);
@@ -24892,6 +25896,7 @@ int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_payexp_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_payexp_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -24918,6 +25923,7 @@ TBL_PC* HP_guild_sd_check(int guild_id, int account_id, int char_id) {
TBL_PC* retVal___ = NULL;
if( HPMHooks.count.HP_guild_sd_check_pre ) {
TBL_PC* (*preHookFunc) (int *guild_id, int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_sd_check_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id);
@@ -24944,6 +25950,7 @@ bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_guild_read_guildskill_tree_db_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_read_guildskill_tree_db_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -24970,6 +25977,7 @@ bool HP_guild_read_castledb(char *str[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_guild_read_castledb_pre ) {
bool (*preHookFunc) (char *str[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_read_castledb_pre[hIndex].func;
retVal___ = preHookFunc(str, &columns, &current);
@@ -24996,6 +26004,7 @@ int HP_guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_payexp_timer_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_payexp_timer_sub_pre[hIndex].func;
@@ -25028,6 +26037,7 @@ int HP_guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_send_xy_timer_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_send_xy_timer_sub_pre[hIndex].func;
@@ -25060,6 +26070,7 @@ int HP_guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_send_xy_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_send_xy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -25087,6 +26098,7 @@ DBData HP_guild_create_expcache(DBKey key, va_list args) {
memset(&retVal___, '\0', sizeof(DBData));
if( HPMHooks.count.HP_guild_create_expcache_pre ) {
DBData (*preHookFunc) (DBKey *key, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_guild_create_expcache_pre[hIndex].func;
@@ -25119,6 +26131,7 @@ int HP_guild_eventlist_db_final(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_eventlist_db_final_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_eventlist_db_final_pre[hIndex].func;
@@ -25151,6 +26164,7 @@ int HP_guild_expcache_db_final(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_expcache_db_final_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_expcache_db_final_pre[hIndex].func;
@@ -25183,6 +26197,7 @@ int HP_guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_castle_db_final_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_castle_db_final_pre[hIndex].func;
@@ -25215,6 +26230,7 @@ int HP_guild_broken_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_broken_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_broken_sub_pre[hIndex].func;
@@ -25247,6 +26263,7 @@ int HP_guild_castle_broken_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_castle_broken_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_castle_broken_sub_pre[hIndex].func;
@@ -25278,6 +26295,7 @@ void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_makemember_pre ) {
void (*preHookFunc) (struct guild_member *m, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_makemember_pre[hIndex].func;
preHookFunc(m, sd);
@@ -25304,6 +26322,7 @@ int HP_guild_check_member(struct guild *g) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_check_member_pre ) {
int (*preHookFunc) (struct guild *g);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_check_member_pre[hIndex].func;
retVal___ = preHookFunc(g);
@@ -25330,6 +26349,7 @@ int HP_guild_get_alliance_count(struct guild *g, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_guild_get_alliance_count_pre ) {
int (*preHookFunc) (struct guild *g, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_get_alliance_count_pre[hIndex].func;
retVal___ = preHookFunc(g, &flag);
@@ -25355,6 +26375,7 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) {
int hIndex = 0;
if( HPMHooks.count.HP_guild_castle_reconnect_sub_pre ) {
void (*preHookFunc) (void *key, void *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_guild_castle_reconnect_sub_pre[hIndex].func;
@@ -25388,6 +26409,7 @@ struct guild_storage* HP_gstorage_id2storage(int guild_id) {
struct guild_storage* retVal___ = NULL;
if( HPMHooks.count.HP_gstorage_id2storage_pre ) {
struct guild_storage* (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_id2storage_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -25414,6 +26436,7 @@ struct guild_storage* HP_gstorage_id2storage2(int guild_id) {
struct guild_storage* retVal___ = NULL;
if( HPMHooks.count.HP_gstorage_id2storage2_pre ) {
struct guild_storage* (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_id2storage2_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -25439,6 +26462,7 @@ void HP_gstorage_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_gstorage_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -25464,6 +26488,7 @@ void HP_gstorage_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_gstorage_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_final_pre[hIndex].func;
preHookFunc();
@@ -25490,6 +26515,7 @@ int HP_gstorage_delete(int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_delete_pre ) {
int (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_delete_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -25516,6 +26542,7 @@ int HP_gstorage_open(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_open_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_open_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -25542,6 +26569,7 @@ int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor,
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_additem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_additem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_additem_pre[hIndex].func;
retVal___ = preHookFunc(sd, stor, item_data, &amount);
@@ -25568,6 +26596,7 @@ int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor,
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_delitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, int *n, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_delitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, stor, &n, &amount);
@@ -25594,6 +26623,7 @@ int HP_gstorage_add(struct map_session_data *sd, int index, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_add_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_add_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -25620,6 +26650,7 @@ int HP_gstorage_get(struct map_session_data *sd, int index, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_get_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_get_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -25646,6 +26677,7 @@ int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount)
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_addfromcart_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_addfromcart_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -25672,6 +26704,7 @@ int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_gettocart_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_gettocart_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -25698,6 +26731,7 @@ int HP_gstorage_close(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_close_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_close_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -25724,6 +26758,7 @@ int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_pc_quit_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_pc_quit_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -25750,6 +26785,7 @@ int HP_gstorage_save(int account_id, int guild_id, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_save_pre ) {
int (*preHookFunc) (int *account_id, int *guild_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_save_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &guild_id, &flag);
@@ -25776,6 +26812,7 @@ int HP_gstorage_saved(int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_gstorage_saved_pre ) {
int (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_gstorage_saved_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -25803,6 +26840,7 @@ DBData HP_gstorage_create(DBKey key, va_list args) {
memset(&retVal___, '\0', sizeof(DBData));
if( HPMHooks.count.HP_gstorage_create_pre ) {
DBData (*preHookFunc) (DBKey *key, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_gstorage_create_pre[hIndex].func;
@@ -25835,6 +26873,7 @@ void HP_homun_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -25860,6 +26899,7 @@ void HP_homun_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_final_pre[hIndex].func;
preHookFunc();
@@ -25885,6 +26925,7 @@ void HP_homun_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_reload_pre[hIndex].func;
preHookFunc();
@@ -25910,6 +26951,7 @@ void HP_homun_reload_skill(void) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_reload_skill_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_reload_skill_pre[hIndex].func;
preHookFunc();
@@ -25936,6 +26978,7 @@ struct view_data* HP_homun_get_viewdata(int class_) {
struct view_data* retVal___ = NULL;
if( HPMHooks.count.HP_homun_get_viewdata_pre ) {
struct view_data* (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_get_viewdata_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -25962,6 +27005,7 @@ enum homun_type HP_homun_class2type(int class_) {
enum homun_type retVal___ = HT_INVALID;
if( HPMHooks.count.HP_homun_class2type_pre ) {
enum homun_type (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_class2type_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -25987,6 +27031,7 @@ void HP_homun_damaged(struct homun_data *hd) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_damaged_pre ) {
void (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_damaged_pre[hIndex].func;
preHookFunc(hd);
@@ -26013,6 +27058,7 @@ int HP_homun_dead(struct homun_data *hd) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_dead_pre ) {
int (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_dead_pre[hIndex].func;
retVal___ = preHookFunc(hd);
@@ -26039,6 +27085,7 @@ int HP_homun_vaporize(struct map_session_data *sd, enum homun_state flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_vaporize_pre ) {
int (*preHookFunc) (struct map_session_data *sd, enum homun_state *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_vaporize_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -26065,6 +27112,7 @@ int HP_homun_delete(struct homun_data *hd, int emote) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_delete_pre ) {
int (*preHookFunc) (struct homun_data *hd, int *emote);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_delete_pre[hIndex].func;
retVal___ = preHookFunc(hd, &emote);
@@ -26091,6 +27139,7 @@ int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_checkskill_pre ) {
int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_checkskill_pre[hIndex].func;
retVal___ = preHookFunc(hd, &skill_id);
@@ -26117,6 +27166,7 @@ int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_calc_skilltree_pre ) {
int (*preHookFunc) (struct homun_data *hd, int *flag_evolve);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_calc_skilltree_pre[hIndex].func;
retVal___ = preHookFunc(hd, &flag_evolve);
@@ -26143,6 +27193,7 @@ int HP_homun_skill_tree_get_max(int id, int b_class) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_skill_tree_get_max_pre ) {
int (*preHookFunc) (int *id, int *b_class);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_skill_tree_get_max_pre[hIndex].func;
retVal___ = preHookFunc(&id, &b_class);
@@ -26168,6 +27219,7 @@ void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_skillup_pre ) {
void (*preHookFunc) (struct homun_data *hd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_skillup_pre[hIndex].func;
preHookFunc(hd, &skill_id);
@@ -26194,6 +27246,7 @@ bool HP_homun_levelup(struct homun_data *hd) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_levelup_pre ) {
bool (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_levelup_pre[hIndex].func;
retVal___ = preHookFunc(hd);
@@ -26220,6 +27273,7 @@ int HP_homun_change_class(struct homun_data *hd, short class_) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_change_class_pre ) {
int (*preHookFunc) (struct homun_data *hd, short *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_change_class_pre[hIndex].func;
retVal___ = preHookFunc(hd, &class_);
@@ -26246,6 +27300,7 @@ bool HP_homun_evolve(struct homun_data *hd) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_evolve_pre ) {
bool (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_evolve_pre[hIndex].func;
retVal___ = preHookFunc(hd);
@@ -26272,6 +27327,7 @@ bool HP_homun_mutate(struct homun_data *hd, int homun_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_mutate_pre ) {
bool (*preHookFunc) (struct homun_data *hd, int *homun_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_mutate_pre[hIndex].func;
retVal___ = preHookFunc(hd, &homun_id);
@@ -26298,6 +27354,7 @@ int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_gainexp_pre ) {
int (*preHookFunc) (struct homun_data *hd, unsigned int *exp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_gainexp_pre[hIndex].func;
retVal___ = preHookFunc(hd, &exp);
@@ -26324,6 +27381,7 @@ unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_homun_add_intimacy_pre ) {
unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_add_intimacy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_add_intimacy_pre[hIndex].func;
retVal___ = preHookFunc(hd, &value);
@@ -26350,6 +27408,7 @@ unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_homun_consume_intimacy_pre ) {
unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_consume_intimacy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_consume_intimacy_pre[hIndex].func;
retVal___ = preHookFunc(hd, &value);
@@ -26375,6 +27434,7 @@ void HP_homun_healed(struct homun_data *hd) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_healed_pre ) {
void (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_healed_pre[hIndex].func;
preHookFunc(hd);
@@ -26400,6 +27460,7 @@ void HP_homun_save(struct homun_data *hd) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_save_pre ) {
void (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_save_pre[hIndex].func;
preHookFunc(hd);
@@ -26426,6 +27487,7 @@ unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num)
unsigned char retVal___ = 0;
if( HPMHooks.count.HP_homun_menu_pre ) {
unsigned char (*preHookFunc) (struct map_session_data *sd, unsigned char *menu_num);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_menu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_menu_pre[hIndex].func;
retVal___ = preHookFunc(sd, &menu_num);
@@ -26452,6 +27514,7 @@ bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_feed_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_feed_pre[hIndex].func;
retVal___ = preHookFunc(sd, hd);
@@ -26478,6 +27541,7 @@ int HP_homun_hunger_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_hunger_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_hunger_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -26503,6 +27567,7 @@ void HP_homun_hunger_timer_delete(struct homun_data *hd) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_hunger_timer_delete_pre ) {
void (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_hunger_timer_delete_pre[hIndex].func;
preHookFunc(hd);
@@ -26529,6 +27594,7 @@ int HP_homun_change_name(struct map_session_data *sd, char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_change_name_pre ) {
int (*preHookFunc) (struct map_session_data *sd, char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_change_name_pre[hIndex].func;
retVal___ = preHookFunc(sd, name);
@@ -26555,6 +27621,7 @@ bool HP_homun_change_name_ack(struct map_session_data *sd, char *name, int flag)
bool retVal___ = false;
if( HPMHooks.count.HP_homun_change_name_ack_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, char *name, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_change_name_ack_pre[hIndex].func;
retVal___ = preHookFunc(sd, name, &flag);
@@ -26581,6 +27648,7 @@ int HP_homun_db_search(int key, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_homun_db_search_pre ) {
int (*preHookFunc) (int *key, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_db_search_pre[hIndex].func;
retVal___ = preHookFunc(&key, &type);
@@ -26607,6 +27675,7 @@ bool HP_homun_create(struct map_session_data *sd, struct s_homunculus *hom) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_create_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, struct s_homunculus *hom);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_create_pre[hIndex].func;
retVal___ = preHookFunc(sd, hom);
@@ -26632,6 +27701,7 @@ void HP_homun_init_timers(struct homun_data *hd) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_init_timers_pre ) {
void (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_init_timers_pre[hIndex].func;
preHookFunc(hd);
@@ -26658,6 +27728,7 @@ bool HP_homun_call(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_call_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_call_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -26684,6 +27755,7 @@ bool HP_homun_recv_data(int account_id, struct s_homunculus *sh, int flag) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_recv_data_pre ) {
bool (*preHookFunc) (int *account_id, struct s_homunculus *sh, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_recv_data_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, sh, &flag);
@@ -26710,6 +27782,7 @@ bool HP_homun_creation_request(struct map_session_data *sd, int class_) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_creation_request_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_creation_request_pre[hIndex].func;
retVal___ = preHookFunc(sd, &class_);
@@ -26736,6 +27809,7 @@ bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x,
bool retVal___ = false;
if( HPMHooks.count.HP_homun_ressurect_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, unsigned char *per, short *x, short *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_ressurect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_ressurect_pre[hIndex].func;
retVal___ = preHookFunc(sd, &per, &x, &y);
@@ -26761,6 +27835,7 @@ void HP_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_revive_pre ) {
void (*preHookFunc) (struct homun_data *hd, unsigned int *hp, unsigned int *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_revive_pre[hIndex].func;
preHookFunc(hd, &hp, &sp);
@@ -26786,6 +27861,7 @@ void HP_homun_stat_reset(struct homun_data *hd) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_stat_reset_pre ) {
void (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_stat_reset_pre[hIndex].func;
preHookFunc(hd);
@@ -26812,6 +27888,7 @@ bool HP_homun_shuffle(struct homun_data *hd) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_shuffle_pre ) {
bool (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_shuffle_pre[hIndex].func;
retVal___ = preHookFunc(hd);
@@ -26838,6 +27915,7 @@ bool HP_homun_read_db_sub(char *str[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_read_db_sub_pre ) {
bool (*preHookFunc) (char *str[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_read_db_sub_pre[hIndex].func;
retVal___ = preHookFunc(str, &columns, &current);
@@ -26863,6 +27941,7 @@ void HP_homun_read_db(void) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_read_db_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_read_db_pre[hIndex].func;
preHookFunc();
@@ -26889,6 +27968,7 @@ bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_homun_read_skill_db_sub_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_read_skill_db_sub_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -26914,6 +27994,7 @@ void HP_homun_skill_db_read(void) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_skill_db_read_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_skill_db_read_pre[hIndex].func;
preHookFunc();
@@ -26939,6 +28020,7 @@ void HP_homun_exp_db_read(void) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_exp_db_read_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_exp_db_read_pre[hIndex].func;
preHookFunc();
@@ -26964,6 +28046,7 @@ void HP_homun_addspiritball(struct homun_data *hd, int max) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_addspiritball_pre ) {
void (*preHookFunc) (struct homun_data *hd, int *max);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_addspiritball_pre[hIndex].func;
preHookFunc(hd, &max);
@@ -26989,6 +28072,7 @@ void HP_homun_delspiritball(struct homun_data *hd, int count, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_homun_delspiritball_pre ) {
void (*preHookFunc) (struct homun_data *hd, int *count, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_homun_delspiritball_pre[hIndex].func;
preHookFunc(hd, &count, &type);
@@ -27010,11 +28094,39 @@ void HP_homun_delspiritball(struct homun_data *hd, int count, int type) {
}
return;
}
+int8 HP_homun_get_intimacy_grade(struct homun_data *hd) {
+ int hIndex = 0;
+ int8 retVal___ = 0;
+ if( HPMHooks.count.HP_homun_get_intimacy_grade_pre ) {
+ int8 (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_pre[hIndex].func;
+ retVal___ = preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.get_intimacy_grade(hd);
+ }
+ if( HPMHooks.count.HP_homun_get_intimacy_grade_post ) {
+ int8 (*postHookFunc) (int8 retVal___, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd);
+ }
+ }
+ return retVal___;
+}
/* instance */
void HP_instance_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -27040,6 +28152,7 @@ void HP_instance_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_final_pre[hIndex].func;
preHookFunc();
@@ -27065,6 +28178,7 @@ void HP_instance_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_reload_pre[hIndex].func;
preHookFunc();
@@ -27091,6 +28205,7 @@ int HP_instance_create(int party_id, const char *name, enum instance_owner_type
int retVal___ = 0;
if( HPMHooks.count.HP_instance_create_pre ) {
int (*preHookFunc) (int *party_id, const char *name, enum instance_owner_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_create_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, name, &type);
@@ -27117,6 +28232,7 @@ int HP_instance_add_map(const char *name, int instance_id, bool usebasename, con
int retVal___ = 0;
if( HPMHooks.count.HP_instance_add_map_pre ) {
int (*preHookFunc) (const char *name, int *instance_id, bool *usebasename, const char *map_name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_add_map_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_add_map_pre[hIndex].func;
retVal___ = preHookFunc(name, &instance_id, &usebasename, map_name);
@@ -27142,6 +28258,7 @@ void HP_instance_del_map(int16 m) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_del_map_pre ) {
void (*preHookFunc) (int16 *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_del_map_pre[hIndex].func;
preHookFunc(&m);
@@ -27168,6 +28285,7 @@ int HP_instance_map2imap(int16 m, int instance_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_instance_map2imap_pre ) {
int (*preHookFunc) (int16 *m, int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_map2imap_pre[hIndex].func;
retVal___ = preHookFunc(&m, &instance_id);
@@ -27194,6 +28312,7 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_instance_mapid2imapid_pre ) {
int (*preHookFunc) (int16 *m, int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_mapid2imapid_pre[hIndex].func;
retVal___ = preHookFunc(&m, &instance_id);
@@ -27220,6 +28339,7 @@ int HP_instance_mapname2imap(const char *map_name, int instance_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_instance_mapname2imap_pre ) {
int (*preHookFunc) (const char *map_name, int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_mapname2imap_pre[hIndex].func;
retVal___ = preHookFunc(map_name, &instance_id);
@@ -27246,6 +28366,7 @@ int HP_instance_map_npcsub(struct block_list *bl, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_instance_map_npcsub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_instance_map_npcsub_pre[hIndex].func;
@@ -27278,6 +28399,7 @@ int HP_instance_init_npc(struct block_list *bl, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_instance_init_npc_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_instance_init_npc_pre[hIndex].func;
@@ -27309,6 +28431,7 @@ void HP_instance_destroy(int instance_id) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_destroy_pre ) {
void (*preHookFunc) (int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_destroy_pre[hIndex].func;
preHookFunc(&instance_id);
@@ -27334,6 +28457,7 @@ void HP_instance_start(int instance_id) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_start_pre ) {
void (*preHookFunc) (int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_start_pre[hIndex].func;
preHookFunc(&instance_id);
@@ -27359,6 +28483,7 @@ void HP_instance_check_idle(int instance_id) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_check_idle_pre ) {
void (*preHookFunc) (int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_check_idle_pre[hIndex].func;
preHookFunc(&instance_id);
@@ -27384,6 +28509,7 @@ void HP_instance_check_kick(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_check_kick_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_check_kick_pre[hIndex].func;
preHookFunc(sd);
@@ -27409,6 +28535,7 @@ void HP_instance_set_timeout(int instance_id, unsigned int progress_timeout, uns
int hIndex = 0;
if( HPMHooks.count.HP_instance_set_timeout_pre ) {
void (*preHookFunc) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_set_timeout_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_set_timeout_pre[hIndex].func;
preHookFunc(&instance_id, &progress_timeout, &idle_timeout);
@@ -27435,6 +28562,7 @@ bool HP_instance_valid(int instance_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_instance_valid_pre ) {
bool (*preHookFunc) (int *instance_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_valid_pre[hIndex].func;
retVal___ = preHookFunc(&instance_id);
@@ -27461,6 +28589,7 @@ int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_instance_destroy_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_instance_destroy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -27488,6 +28617,7 @@ int HP_intif_parse(int fd) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_parse_pre ) {
int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_parse_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
@@ -27509,14 +28639,15 @@ int HP_intif_parse(int fd) {
}
return retVal___;
}
-int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name) {
+int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_intif_create_pet_pre ) {
- int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incuvate, char *pet_name);
+ int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func;
- retVal___ = preHookFunc(&account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incuvate, pet_name);
+ retVal___ = preHookFunc(&account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -27524,13 +28655,13 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l
}
}
{
- retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incuvate, pet_name);
+ retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
}
if( HPMHooks.count.HP_intif_create_pet_post ) {
- int (*postHookFunc) (int retVal___, int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incuvate, char *pet_name);
+ int (*postHookFunc) (int retVal___, int *account_id, int *char_id, short *pet_type, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char *pet_name);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incuvate, pet_name);
+ retVal___ = postHookFunc(retVal___, &account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name);
}
}
return retVal___;
@@ -27540,6 +28671,7 @@ int HP_intif_broadcast(const char *mes, size_t len, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_broadcast_pre ) {
int (*preHookFunc) (const char *mes, size_t *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);
@@ -27566,6 +28698,7 @@ int HP_intif_broadcast2(const char *mes, size_t len, unsigned int fontColor, sho
int retVal___ = 0;
if( HPMHooks.count.HP_intif_broadcast2_pre ) {
int (*preHookFunc) (const char *mes, size_t *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);
@@ -27592,6 +28725,7 @@ int HP_intif_main_message(struct map_session_data *sd, const char *message) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_main_message_pre ) {
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);
@@ -27618,6 +28752,7 @@ int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, siz
int retVal___ = 0;
if( HPMHooks.count.HP_intif_wis_message_pre ) {
int (*preHookFunc) (struct map_session_data *sd, char *nick, char *mes, size_t *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);
@@ -27644,6 +28779,7 @@ int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_wis_message_to_gm_pre ) {
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);
@@ -27670,6 +28806,7 @@ int HP_intif_saveregistry(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_saveregistry_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_saveregistry_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -27696,6 +28833,7 @@ int HP_intif_request_registry(struct map_session_data *sd, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_request_registry_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_registry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_request_registry_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -27722,6 +28860,7 @@ int HP_intif_request_guild_storage(int account_id, int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_request_guild_storage_pre ) {
int (*preHookFunc) (int *account_id, int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_request_guild_storage_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &guild_id);
@@ -27748,6 +28887,7 @@ int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_send_guild_storage_pre ) {
int (*preHookFunc) (int *account_id, struct guild_storage *gstor);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_send_guild_storage_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, gstor);
@@ -27774,6 +28914,7 @@ int HP_intif_create_party(struct party_member *member, char *name, int item, int
int retVal___ = 0;
if( HPMHooks.count.HP_intif_create_party_pre ) {
int (*preHookFunc) (struct party_member *member, char *name, int *item, int *item2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_create_party_pre[hIndex].func;
retVal___ = preHookFunc(member, name, &item, &item2);
@@ -27800,6 +28941,7 @@ int HP_intif_request_partyinfo(int party_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_request_partyinfo_pre ) {
int (*preHookFunc) (int *party_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_request_partyinfo_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &char_id);
@@ -27826,6 +28968,7 @@ int HP_intif_party_addmember(int party_id, struct party_member *member) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_party_addmember_pre ) {
int (*preHookFunc) (int *party_id, struct party_member *member);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_party_addmember_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, member);
@@ -27852,6 +28995,7 @@ int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item)
int retVal___ = 0;
if( HPMHooks.count.HP_intif_party_changeoption_pre ) {
int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changeoption_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_party_changeoption_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &exp, &item);
@@ -27878,6 +29022,7 @@ int HP_intif_party_leave(int party_id, int account_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_party_leave_pre ) {
int (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_party_leave_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &char_id);
@@ -27904,6 +29049,7 @@ int HP_intif_party_changemap(struct map_session_data *sd, int online) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_party_changemap_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *online);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_party_changemap_pre[hIndex].func;
retVal___ = preHookFunc(sd, &online);
@@ -27930,6 +29076,7 @@ int HP_intif_break_party(int party_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_break_party_pre ) {
int (*preHookFunc) (int *party_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_break_party_pre[hIndex].func;
retVal___ = preHookFunc(&party_id);
@@ -27956,6 +29103,7 @@ int HP_intif_party_message(int party_id, int account_id, const char *mes, int le
int retVal___ = 0;
if( HPMHooks.count.HP_intif_party_message_pre ) {
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);
@@ -27982,6 +29130,7 @@ int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_party_leaderchange_pre ) {
int (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leaderchange_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_party_leaderchange_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &char_id);
@@ -28008,6 +29157,7 @@ int HP_intif_guild_create(const char *name, const struct guild_member *master) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_create_pre ) {
int (*preHookFunc) (const char *name, const struct guild_member *master);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_create_pre[hIndex].func;
retVal___ = preHookFunc(name, master);
@@ -28034,6 +29184,7 @@ int HP_intif_guild_request_info(int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_request_info_pre ) {
int (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_request_info_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -28060,6 +29211,7 @@ int HP_intif_guild_addmember(int guild_id, struct guild_member *m) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_addmember_pre ) {
int (*preHookFunc) (int *guild_id, struct guild_member *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_addmember_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, m);
@@ -28086,6 +29238,7 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_leave_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_leave_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, mes);
@@ -28112,6 +29265,7 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_memberinfoshort_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_);
@@ -28138,6 +29292,7 @@ int HP_intif_guild_break(int guild_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_break_pre ) {
int (*preHookFunc) (int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_break_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id);
@@ -28164,6 +29319,7 @@ int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int le
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_message_pre ) {
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);
@@ -28190,6 +29346,7 @@ int HP_intif_guild_change_gm(int guild_id, const char *name, size_t len) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_change_gm_pre ) {
int (*preHookFunc) (int *guild_id, const char *name, size_t *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_change_gm_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, name, &len);
@@ -28216,6 +29373,7 @@ int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, in
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_change_basicinfo_pre ) {
int (*preHookFunc) (int *guild_id, int *type, const void *data, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_basicinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_change_basicinfo_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &type, data, &len);
@@ -28242,6 +29400,7 @@ int HP_intif_guild_change_memberinfo(int guild_id, int account_id, int char_id,
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_change_memberinfo_pre ) {
int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_memberinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_change_memberinfo_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, data, &len);
@@ -28268,6 +29427,7 @@ int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_position_pre ) {
int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_position_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_position_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &idx, p);
@@ -28294,6 +29454,7 @@ int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int ma
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_skillup_pre ) {
int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id, int *max);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_skillup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_skillup_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &skill_id, &account_id, &max);
@@ -28320,6 +29481,7 @@ int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_alliance_pre ) {
int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_alliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_alliance_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag);
@@ -28346,6 +29508,7 @@ int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_notice_pre ) {
int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_notice_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_notice_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, mes1, mes2);
@@ -28372,6 +29535,7 @@ int HP_intif_guild_emblem(int guild_id, int len, const char *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_emblem_pre ) {
int (*preHookFunc) (int *guild_id, int *len, const char *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_emblem_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, &len, data);
@@ -28398,6 +29562,7 @@ int HP_intif_guild_castle_dataload(int num, int *castle_ids) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_castle_dataload_pre ) {
int (*preHookFunc) (int *num, int *castle_ids);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_castle_dataload_pre[hIndex].func;
retVal___ = preHookFunc(&num, castle_ids);
@@ -28424,6 +29589,7 @@ int HP_intif_guild_castle_datasave(int castle_id, int index, int value) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_castle_datasave_pre ) {
int (*preHookFunc) (int *castle_id, int *index, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_castle_datasave_pre[hIndex].func;
retVal___ = preHookFunc(&castle_id, &index, &value);
@@ -28449,6 +29615,7 @@ void HP_intif_itembound_req(int char_id, int aid, int guild_id) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_itembound_req_pre ) {
void (*preHookFunc) (int *char_id, int *aid, int *guild_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_itembound_req_pre[hIndex].func;
preHookFunc(&char_id, &aid, &guild_id);
@@ -28475,6 +29642,7 @@ int HP_intif_request_petdata(int account_id, int char_id, int pet_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_request_petdata_pre ) {
int (*preHookFunc) (int *account_id, int *char_id, int *pet_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_petdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_request_petdata_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &char_id, &pet_id);
@@ -28501,6 +29669,7 @@ int HP_intif_save_petdata(int account_id, struct s_pet *p) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_save_petdata_pre ) {
int (*preHookFunc) (int *account_id, struct s_pet *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_save_petdata_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, p);
@@ -28527,6 +29696,7 @@ int HP_intif_delete_petdata(int pet_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_delete_petdata_pre ) {
int (*preHookFunc) (int *pet_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_delete_petdata_pre[hIndex].func;
retVal___ = preHookFunc(&pet_id);
@@ -28553,6 +29723,7 @@ int HP_intif_rename(struct map_session_data *sd, int type, char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_rename_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_rename_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, name);
@@ -28579,6 +29750,7 @@ int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_homunculus_create_pre ) {
int (*preHookFunc) (int *account_id, struct s_homunculus *sh);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_homunculus_create_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, sh);
@@ -28605,6 +29777,7 @@ bool HP_intif_homunculus_requestload(int account_id, int homun_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_intif_homunculus_requestload_pre ) {
bool (*preHookFunc) (int *account_id, int *homun_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_homunculus_requestload_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, &homun_id);
@@ -28631,6 +29804,7 @@ int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_homunculus_requestsave_pre ) {
int (*preHookFunc) (int *account_id, struct s_homunculus *sh);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_homunculus_requestsave_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, sh);
@@ -28657,6 +29831,7 @@ int HP_intif_homunculus_requestdelete(int homun_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_homunculus_requestdelete_pre ) {
int (*preHookFunc) (int *homun_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_homunculus_requestdelete_pre[hIndex].func;
retVal___ = preHookFunc(&homun_id);
@@ -28682,6 +29857,7 @@ void HP_intif_request_questlog(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_request_questlog_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_request_questlog_pre[hIndex].func;
preHookFunc(sd);
@@ -28708,6 +29884,7 @@ int HP_intif_quest_save(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_quest_save_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_quest_save_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -28734,6 +29911,7 @@ int HP_intif_mercenary_create(struct s_mercenary *merc) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_mercenary_create_pre ) {
int (*preHookFunc) (struct s_mercenary *merc);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_mercenary_create_pre[hIndex].func;
retVal___ = preHookFunc(merc);
@@ -28760,6 +29938,7 @@ int HP_intif_mercenary_request(int merc_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_mercenary_request_pre ) {
int (*preHookFunc) (int *merc_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_mercenary_request_pre[hIndex].func;
retVal___ = preHookFunc(&merc_id, &char_id);
@@ -28786,6 +29965,7 @@ int HP_intif_mercenary_delete(int merc_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_mercenary_delete_pre ) {
int (*preHookFunc) (int *merc_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_mercenary_delete_pre[hIndex].func;
retVal___ = preHookFunc(&merc_id);
@@ -28812,6 +29992,7 @@ int HP_intif_mercenary_save(struct s_mercenary *merc) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_mercenary_save_pre ) {
int (*preHookFunc) (struct s_mercenary *merc);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_mercenary_save_pre[hIndex].func;
retVal___ = preHookFunc(merc);
@@ -28838,6 +30019,7 @@ int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Mail_requestinbox_pre ) {
int (*preHookFunc) (int *char_id, unsigned char *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Mail_requestinbox_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &flag);
@@ -28864,6 +30046,7 @@ int HP_intif_Mail_read(int mail_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Mail_read_pre ) {
int (*preHookFunc) (int *mail_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Mail_read_pre[hIndex].func;
retVal___ = preHookFunc(&mail_id);
@@ -28890,6 +30073,7 @@ int HP_intif_Mail_getattach(int char_id, int mail_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Mail_getattach_pre ) {
int (*preHookFunc) (int *char_id, int *mail_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Mail_getattach_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &mail_id);
@@ -28916,6 +30100,7 @@ int HP_intif_Mail_delete(int char_id, int mail_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Mail_delete_pre ) {
int (*preHookFunc) (int *char_id, int *mail_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Mail_delete_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &mail_id);
@@ -28942,6 +30127,7 @@ int HP_intif_Mail_return(int char_id, int mail_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Mail_return_pre ) {
int (*preHookFunc) (int *char_id, int *mail_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Mail_return_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &mail_id);
@@ -28968,6 +30154,7 @@ int HP_intif_Mail_send(int account_id, struct mail_message *msg) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Mail_send_pre ) {
int (*preHookFunc) (int *account_id, struct mail_message *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Mail_send_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, msg);
@@ -28994,6 +30181,7 @@ int HP_intif_Auction_requestlist(int char_id, short type, int price, const char
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Auction_requestlist_pre ) {
int (*preHookFunc) (int *char_id, short *type, int *price, const char *searchtext, short *page);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_requestlist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Auction_requestlist_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &type, &price, searchtext, &page);
@@ -29020,6 +30208,7 @@ int HP_intif_Auction_register(struct auction_data *auction) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Auction_register_pre ) {
int (*preHookFunc) (struct auction_data *auction);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Auction_register_pre[hIndex].func;
retVal___ = preHookFunc(auction);
@@ -29046,6 +30235,7 @@ int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Auction_cancel_pre ) {
int (*preHookFunc) (int *char_id, unsigned int *auction_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Auction_cancel_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &auction_id);
@@ -29072,6 +30262,7 @@ int HP_intif_Auction_close(int char_id, unsigned int auction_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Auction_close_pre ) {
int (*preHookFunc) (int *char_id, unsigned int *auction_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Auction_close_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &auction_id);
@@ -29098,6 +30289,7 @@ int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id,
int retVal___ = 0;
if( HPMHooks.count.HP_intif_Auction_bid_pre ) {
int (*preHookFunc) (int *char_id, const char *name, unsigned int *auction_id, int *bid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_bid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_Auction_bid_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, name, &auction_id, &bid);
@@ -29124,6 +30316,7 @@ int HP_intif_elemental_create(struct s_elemental *ele) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_elemental_create_pre ) {
int (*preHookFunc) (struct s_elemental *ele);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_elemental_create_pre[hIndex].func;
retVal___ = preHookFunc(ele);
@@ -29150,6 +30343,7 @@ int HP_intif_elemental_request(int ele_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_elemental_request_pre ) {
int (*preHookFunc) (int *ele_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_elemental_request_pre[hIndex].func;
retVal___ = preHookFunc(&ele_id, &char_id);
@@ -29176,6 +30370,7 @@ int HP_intif_elemental_delete(int ele_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_elemental_delete_pre ) {
int (*preHookFunc) (int *ele_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_elemental_delete_pre[hIndex].func;
retVal___ = preHookFunc(&ele_id);
@@ -29202,6 +30397,7 @@ int HP_intif_elemental_save(struct s_elemental *ele) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_elemental_save_pre ) {
int (*preHookFunc) (struct s_elemental *ele);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_elemental_save_pre[hIndex].func;
retVal___ = preHookFunc(ele);
@@ -29227,6 +30423,7 @@ void HP_intif_request_accinfo(int u_fd, int aid, int group_lv, char *query) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_request_accinfo_pre ) {
void (*preHookFunc) (int *u_fd, int *aid, int *group_lv, char *query);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_accinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_request_accinfo_pre[hIndex].func;
preHookFunc(&u_fd, &aid, &group_lv, query);
@@ -29253,6 +30450,7 @@ int HP_intif_CheckForCharServer(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_CheckForCharServer_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_CheckForCharServer_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -29278,6 +30476,7 @@ void HP_intif_pWisMessage(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pWisMessage_pre ) {
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);
@@ -29303,6 +30502,7 @@ void HP_intif_pWisEnd(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pWisEnd_pre ) {
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);
@@ -29329,6 +30529,7 @@ int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) {
int retVal___ = 0;
if( HPMHooks.count.HP_intif_pWisToGM_sub_pre ) {
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;
@@ -29360,6 +30561,7 @@ void HP_intif_pWisToGM(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pWisToGM_pre ) {
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);
@@ -29385,6 +30587,7 @@ void HP_intif_pRegisters(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pRegisters_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pRegisters_pre[hIndex].func;
preHookFunc(&fd);
@@ -29410,6 +30613,7 @@ void HP_intif_pChangeNameOk(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pChangeNameOk_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pChangeNameOk_pre[hIndex].func;
preHookFunc(&fd);
@@ -29435,6 +30639,7 @@ void HP_intif_pMessageToFD(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMessageToFD_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMessageToFD_pre[hIndex].func;
preHookFunc(&fd);
@@ -29460,6 +30665,7 @@ void HP_intif_pLoadGuildStorage(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pLoadGuildStorage_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pLoadGuildStorage_pre[hIndex].func;
preHookFunc(&fd);
@@ -29485,6 +30691,7 @@ void HP_intif_pSaveGuildStorage(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pSaveGuildStorage_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pSaveGuildStorage_pre[hIndex].func;
preHookFunc(&fd);
@@ -29510,6 +30717,7 @@ void HP_intif_pPartyCreated(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyCreated_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pPartyCreated_pre[hIndex].func;
preHookFunc(&fd);
@@ -29535,6 +30743,7 @@ void HP_intif_pPartyInfo(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyInfo_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pPartyInfo_pre[hIndex].func;
preHookFunc(&fd);
@@ -29560,6 +30769,7 @@ void HP_intif_pPartyMemberAdded(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyMemberAdded_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pPartyMemberAdded_pre[hIndex].func;
preHookFunc(&fd);
@@ -29585,6 +30795,7 @@ void HP_intif_pPartyOptionChanged(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyOptionChanged_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pPartyOptionChanged_pre[hIndex].func;
preHookFunc(&fd);
@@ -29610,6 +30821,7 @@ void HP_intif_pPartyMemberWithdraw(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pPartyMemberWithdraw_pre[hIndex].func;
preHookFunc(&fd);
@@ -29635,6 +30847,7 @@ void HP_intif_pPartyMove(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyMove_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pPartyMove_pre[hIndex].func;
preHookFunc(&fd);
@@ -29660,6 +30873,7 @@ void HP_intif_pPartyBroken(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyBroken_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pPartyBroken_pre[hIndex].func;
preHookFunc(&fd);
@@ -29685,6 +30899,7 @@ void HP_intif_pPartyMessage(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pPartyMessage_pre ) {
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);
@@ -29710,6 +30925,7 @@ void HP_intif_pGuildCreated(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildCreated_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildCreated_pre[hIndex].func;
preHookFunc(&fd);
@@ -29735,6 +30951,7 @@ void HP_intif_pGuildInfo(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildInfo_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildInfo_pre[hIndex].func;
preHookFunc(&fd);
@@ -29760,6 +30977,7 @@ void HP_intif_pGuildMemberAdded(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildMemberAdded_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildMemberAdded_pre[hIndex].func;
preHookFunc(&fd);
@@ -29785,6 +31003,7 @@ void HP_intif_pGuildMemberWithdraw(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildMemberWithdraw_pre[hIndex].func;
preHookFunc(&fd);
@@ -29810,6 +31029,7 @@ void HP_intif_pGuildMemberInfoShort(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoShort_pre[hIndex].func;
preHookFunc(&fd);
@@ -29835,6 +31055,7 @@ void HP_intif_pGuildBroken(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildBroken_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildBroken_pre[hIndex].func;
preHookFunc(&fd);
@@ -29860,6 +31081,7 @@ void HP_intif_pGuildMessage(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildMessage_pre ) {
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);
@@ -29885,6 +31107,7 @@ void HP_intif_pGuildBasicInfoChanged(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildBasicInfoChanged_pre[hIndex].func;
preHookFunc(&fd);
@@ -29910,6 +31133,7 @@ void HP_intif_pGuildMemberInfoChanged(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoChanged_pre[hIndex].func;
preHookFunc(&fd);
@@ -29935,6 +31159,7 @@ void HP_intif_pGuildPosition(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildPosition_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildPosition_pre[hIndex].func;
preHookFunc(&fd);
@@ -29960,6 +31185,7 @@ void HP_intif_pGuildSkillUp(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildSkillUp_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildSkillUp_pre[hIndex].func;
preHookFunc(&fd);
@@ -29985,6 +31211,7 @@ void HP_intif_pGuildAlliance(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildAlliance_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildAlliance_pre[hIndex].func;
preHookFunc(&fd);
@@ -30010,6 +31237,7 @@ void HP_intif_pGuildNotice(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildNotice_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildNotice_pre[hIndex].func;
preHookFunc(&fd);
@@ -30035,6 +31263,7 @@ void HP_intif_pGuildEmblem(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildEmblem_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildEmblem_pre[hIndex].func;
preHookFunc(&fd);
@@ -30060,6 +31289,7 @@ void HP_intif_pGuildCastleDataLoad(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildCastleDataLoad_pre[hIndex].func;
preHookFunc(&fd);
@@ -30085,6 +31315,7 @@ void HP_intif_pGuildMasterChanged(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pGuildMasterChanged_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pGuildMasterChanged_pre[hIndex].func;
preHookFunc(&fd);
@@ -30110,6 +31341,7 @@ void HP_intif_pQuestLog(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pQuestLog_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pQuestLog_pre[hIndex].func;
preHookFunc(&fd);
@@ -30135,6 +31367,7 @@ void HP_intif_pQuestSave(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pQuestSave_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pQuestSave_pre[hIndex].func;
preHookFunc(&fd);
@@ -30160,6 +31393,7 @@ void HP_intif_pMailInboxReceived(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMailInboxReceived_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMailInboxReceived_pre[hIndex].func;
preHookFunc(&fd);
@@ -30185,6 +31419,7 @@ void HP_intif_pMailNew(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMailNew_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMailNew_pre[hIndex].func;
preHookFunc(&fd);
@@ -30210,6 +31445,7 @@ void HP_intif_pMailGetAttach(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMailGetAttach_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMailGetAttach_pre[hIndex].func;
preHookFunc(&fd);
@@ -30235,6 +31471,7 @@ void HP_intif_pMailDelete(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMailDelete_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMailDelete_pre[hIndex].func;
preHookFunc(&fd);
@@ -30260,6 +31497,7 @@ void HP_intif_pMailReturn(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMailReturn_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMailReturn_pre[hIndex].func;
preHookFunc(&fd);
@@ -30285,6 +31523,7 @@ void HP_intif_pMailSend(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMailSend_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMailSend_pre[hIndex].func;
preHookFunc(&fd);
@@ -30310,6 +31549,7 @@ void HP_intif_pAuctionResults(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pAuctionResults_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pAuctionResults_pre[hIndex].func;
preHookFunc(&fd);
@@ -30335,6 +31575,7 @@ void HP_intif_pAuctionRegister(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pAuctionRegister_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pAuctionRegister_pre[hIndex].func;
preHookFunc(&fd);
@@ -30360,6 +31601,7 @@ void HP_intif_pAuctionCancel(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pAuctionCancel_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pAuctionCancel_pre[hIndex].func;
preHookFunc(&fd);
@@ -30385,6 +31627,7 @@ void HP_intif_pAuctionClose(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pAuctionClose_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pAuctionClose_pre[hIndex].func;
preHookFunc(&fd);
@@ -30410,6 +31653,7 @@ void HP_intif_pAuctionMessage(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pAuctionMessage_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pAuctionMessage_pre[hIndex].func;
preHookFunc(&fd);
@@ -30435,6 +31679,7 @@ void HP_intif_pAuctionBid(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pAuctionBid_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pAuctionBid_pre[hIndex].func;
preHookFunc(&fd);
@@ -30460,6 +31705,7 @@ void HP_intif_pItembound_ack(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pItembound_ack_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pItembound_ack_pre[hIndex].func;
preHookFunc(&fd);
@@ -30485,6 +31731,7 @@ void HP_intif_pMercenaryReceived(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMercenaryReceived_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMercenaryReceived_pre[hIndex].func;
preHookFunc(&fd);
@@ -30510,6 +31757,7 @@ void HP_intif_pMercenaryDeleted(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMercenaryDeleted_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMercenaryDeleted_pre[hIndex].func;
preHookFunc(&fd);
@@ -30535,6 +31783,7 @@ void HP_intif_pMercenarySaved(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pMercenarySaved_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pMercenarySaved_pre[hIndex].func;
preHookFunc(&fd);
@@ -30560,6 +31809,7 @@ void HP_intif_pElementalReceived(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pElementalReceived_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pElementalReceived_pre[hIndex].func;
preHookFunc(&fd);
@@ -30585,6 +31835,7 @@ void HP_intif_pElementalDeleted(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pElementalDeleted_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pElementalDeleted_pre[hIndex].func;
preHookFunc(&fd);
@@ -30610,6 +31861,7 @@ void HP_intif_pElementalSaved(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pElementalSaved_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pElementalSaved_pre[hIndex].func;
preHookFunc(&fd);
@@ -30635,6 +31887,7 @@ void HP_intif_pCreatePet(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pCreatePet_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pCreatePet_pre[hIndex].func;
preHookFunc(&fd);
@@ -30660,6 +31913,7 @@ void HP_intif_pRecvPetData(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pRecvPetData_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pRecvPetData_pre[hIndex].func;
preHookFunc(&fd);
@@ -30685,6 +31939,7 @@ void HP_intif_pSavePetOk(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pSavePetOk_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pSavePetOk_pre[hIndex].func;
preHookFunc(&fd);
@@ -30710,6 +31965,7 @@ void HP_intif_pDeletePetOk(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pDeletePetOk_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pDeletePetOk_pre[hIndex].func;
preHookFunc(&fd);
@@ -30735,6 +31991,7 @@ void HP_intif_pCreateHomunculus(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pCreateHomunculus_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pCreateHomunculus_pre[hIndex].func;
preHookFunc(&fd);
@@ -30760,6 +32017,7 @@ void HP_intif_pRecvHomunculusData(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pRecvHomunculusData_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pRecvHomunculusData_pre[hIndex].func;
preHookFunc(&fd);
@@ -30785,6 +32043,7 @@ void HP_intif_pSaveHomunculusOk(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pSaveHomunculusOk_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pSaveHomunculusOk_pre[hIndex].func;
preHookFunc(&fd);
@@ -30810,6 +32069,7 @@ void HP_intif_pDeleteHomunculusOk(int fd) {
int hIndex = 0;
if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre ) {
void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_pDeleteHomunculusOk_pre[hIndex].func;
preHookFunc(&fd);
@@ -30836,6 +32096,7 @@ void HP_ircbot_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -30861,6 +32122,7 @@ void HP_ircbot_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_final_pre[hIndex].func;
preHookFunc();
@@ -30887,6 +32149,7 @@ int HP_ircbot_parse(int fd) {
int retVal___ = 0;
if( HPMHooks.count.HP_ircbot_parse_pre ) {
int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_parse_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
@@ -30912,6 +32175,7 @@ void HP_ircbot_parse_sub(int fd, char *str) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_parse_sub_pre ) {
void (*preHookFunc) (int *fd, char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_parse_sub_pre[hIndex].func;
preHookFunc(&fd, str);
@@ -30937,6 +32201,7 @@ void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_parse_source_pre ) {
void (*preHookFunc) (char *source, char *nick, char *ident, char *host);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_parse_source_pre[hIndex].func;
preHookFunc(source, nick, ident, host);
@@ -30963,6 +32228,7 @@ struct irc_func* HP_ircbot_func_search(char *function_name) {
struct irc_func* retVal___ = NULL;
if( HPMHooks.count.HP_ircbot_func_search_pre ) {
struct irc_func* (*preHookFunc) (char *function_name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_func_search_pre[hIndex].func;
retVal___ = preHookFunc(function_name);
@@ -30989,6 +32255,7 @@ int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_ircbot_connect_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_connect_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -31015,6 +32282,7 @@ int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_ircbot_identify_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_identify_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -31041,6 +32309,7 @@ int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_ircbot_join_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_join_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -31066,6 +32335,7 @@ void HP_ircbot_send(char *str) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_send_pre ) {
void (*preHookFunc) (char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_send_pre[hIndex].func;
preHookFunc(str);
@@ -31091,6 +32361,7 @@ void HP_ircbot_relay(char *name, const char *msg) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_relay_pre ) {
void (*preHookFunc) (char *name, const char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_relay_pre[hIndex].func;
preHookFunc(name, msg);
@@ -31116,6 +32387,7 @@ void HP_ircbot_pong(int fd, char *cmd, char *source, char *target, char *msg) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_pong_pre ) {
void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_pong_pre[hIndex].func;
preHookFunc(&fd, cmd, source, target, msg);
@@ -31141,6 +32413,7 @@ void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg)
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_privmsg_pre ) {
void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_privmsg_pre[hIndex].func;
preHookFunc(&fd, cmd, source, target, msg);
@@ -31166,6 +32439,7 @@ void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_userjoin_pre ) {
void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_userjoin_pre[hIndex].func;
preHookFunc(&fd, cmd, source, target, msg);
@@ -31191,6 +32465,7 @@ void HP_ircbot_userleave(int fd, char *cmd, char *source, char *target, char *ms
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_userleave_pre ) {
void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_userleave_pre[hIndex].func;
preHookFunc(&fd, cmd, source, target, msg);
@@ -31216,6 +32491,7 @@ void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_usernick_pre ) {
void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_usernick_pre[hIndex].func;
preHookFunc(&fd, cmd, source, target, msg);
@@ -31242,6 +32518,7 @@ void HP_itemdb_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -31267,6 +32544,7 @@ void HP_itemdb_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_final_pre[hIndex].func;
preHookFunc();
@@ -31292,6 +32570,7 @@ void HP_itemdb_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_reload_pre[hIndex].func;
preHookFunc();
@@ -31317,6 +32596,7 @@ void HP_itemdb_name_constants(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_name_constants_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_name_constants_pre[hIndex].func;
preHookFunc();
@@ -31342,6 +32622,7 @@ void HP_itemdb_read_groups(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_read_groups_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_read_groups_pre[hIndex].func;
preHookFunc();
@@ -31367,6 +32648,7 @@ void HP_itemdb_read_chains(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_read_chains_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_read_chains_pre[hIndex].func;
preHookFunc();
@@ -31392,6 +32674,7 @@ void HP_itemdb_read_packages(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_read_packages_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_read_packages_pre[hIndex].func;
preHookFunc();
@@ -31417,6 +32700,7 @@ void HP_itemdb_write_cached_packages(const char *config_filename) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_write_cached_packages_pre ) {
void (*preHookFunc) (const char *config_filename);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_write_cached_packages_pre[hIndex].func;
preHookFunc(config_filename);
@@ -31443,6 +32727,7 @@ bool HP_itemdb_read_cached_packages(const char *config_filename) {
bool retVal___ = false;
if( HPMHooks.count.HP_itemdb_read_cached_packages_pre ) {
bool (*preHookFunc) (const char *config_filename);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_read_cached_packages_pre[hIndex].func;
retVal___ = preHookFunc(config_filename);
@@ -31469,6 +32754,7 @@ struct item_data* HP_itemdb_name2id(const char *str) {
struct item_data* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_name2id_pre ) {
struct item_data* (*preHookFunc) (const char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_name2id_pre[hIndex].func;
retVal___ = preHookFunc(str);
@@ -31495,6 +32781,7 @@ struct item_data* HP_itemdb_search_name(const char *name) {
struct item_data* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_search_name_pre ) {
struct item_data* (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_search_name_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -31521,6 +32808,7 @@ int HP_itemdb_search_name_array(struct item_data **data, int size, const char *s
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_search_name_array_pre ) {
int (*preHookFunc) (struct item_data **data, int *size, const char *str, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_search_name_array_pre[hIndex].func;
retVal___ = preHookFunc(data, &size, str, &flag);
@@ -31547,6 +32835,7 @@ struct item_data* HP_itemdb_load(int nameid) {
struct item_data* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_load_pre ) {
struct item_data* (*preHookFunc) (int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_load_pre[hIndex].func;
retVal___ = preHookFunc(&nameid);
@@ -31573,6 +32862,7 @@ struct item_data* HP_itemdb_search(int nameid) {
struct item_data* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_search_pre ) {
struct item_data* (*preHookFunc) (int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_search_pre[hIndex].func;
retVal___ = preHookFunc(&nameid);
@@ -31599,6 +32889,7 @@ struct item_data* HP_itemdb_exists(int nameid) {
struct item_data* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_exists_pre ) {
struct item_data* (*preHookFunc) (int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_exists_pre[hIndex].func;
retVal___ = preHookFunc(&nameid);
@@ -31625,6 +32916,7 @@ bool HP_itemdb_in_group(struct item_group *group, int nameid) {
bool retVal___ = false;
if( HPMHooks.count.HP_itemdb_in_group_pre ) {
bool (*preHookFunc) (struct item_group *group, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_in_group_pre[hIndex].func;
retVal___ = preHookFunc(group, &nameid);
@@ -31651,6 +32943,7 @@ int HP_itemdb_group_item(struct item_group *group) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_group_item_pre ) {
int (*preHookFunc) (struct item_group *group);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_group_item_pre[hIndex].func;
retVal___ = preHookFunc(group);
@@ -31677,6 +32970,7 @@ int HP_itemdb_chain_item(unsigned short chain_id, int *rate) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_chain_item_pre ) {
int (*preHookFunc) (unsigned short *chain_id, int *rate);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_chain_item_pre[hIndex].func;
retVal___ = preHookFunc(&chain_id, rate);
@@ -31702,6 +32996,7 @@ void HP_itemdb_package_item(struct map_session_data *sd, struct item_package *pa
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_package_item_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct item_package *package);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_package_item_pre[hIndex].func;
preHookFunc(sd, package);
@@ -31728,6 +33023,7 @@ int HP_itemdb_searchname_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_searchname_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_itemdb_searchname_sub_pre[hIndex].func;
@@ -31760,6 +33056,7 @@ int HP_itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_searchname_array_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_itemdb_searchname_array_sub_pre[hIndex].func;
@@ -31792,6 +33089,7 @@ int HP_itemdb_searchrandomid(struct item_group *group) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_searchrandomid_pre ) {
int (*preHookFunc) (struct item_group *group);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_pre[hIndex].func;
retVal___ = preHookFunc(group);
@@ -31818,6 +33116,7 @@ const char* HP_itemdb_typename(int type) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_typename_pre ) {
const char* (*preHookFunc) (int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_typename_pre[hIndex].func;
retVal___ = preHookFunc(&type);
@@ -31843,6 +33142,7 @@ void HP_itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_jobid2mapid_pre ) {
void (*preHookFunc) (unsigned int *bclass, unsigned int *jobmask);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_pre[hIndex].func;
preHookFunc(bclass, &jobmask);
@@ -31868,6 +33168,7 @@ void HP_itemdb_create_dummy_data(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_create_dummy_data_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_create_dummy_data_pre[hIndex].func;
preHookFunc();
@@ -31894,6 +33195,7 @@ struct item_data* HP_itemdb_create_item_data(int nameid) {
struct item_data* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_create_item_data_pre ) {
struct item_data* (*preHookFunc) (int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_create_item_data_pre[hIndex].func;
retVal___ = preHookFunc(&nameid);
@@ -31920,6 +33222,7 @@ int HP_itemdb_isequip(int nameid) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isequip_pre ) {
int (*preHookFunc) (int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isequip_pre[hIndex].func;
retVal___ = preHookFunc(&nameid);
@@ -31946,6 +33249,7 @@ int HP_itemdb_isequip2(struct item_data *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isequip2_pre ) {
int (*preHookFunc) (struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isequip2_pre[hIndex].func;
retVal___ = preHookFunc(data);
@@ -31972,6 +33276,7 @@ int HP_itemdb_isstackable(int nameid) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isstackable_pre ) {
int (*preHookFunc) (int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isstackable_pre[hIndex].func;
retVal___ = preHookFunc(&nameid);
@@ -31998,6 +33303,7 @@ int HP_itemdb_isstackable2(struct item_data *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isstackable2_pre ) {
int (*preHookFunc) (struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isstackable2_pre[hIndex].func;
retVal___ = preHookFunc(data);
@@ -32024,6 +33330,7 @@ int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isdropable_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isdropable_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &unused);
@@ -32050,6 +33357,7 @@ int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_cantrade_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_cantrade_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &gmlv2);
@@ -32076,6 +33384,7 @@ int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_canpartnertrade_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &gmlv2);
@@ -32102,6 +33411,7 @@ int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_cansell_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_cansell_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &unused);
@@ -32128,6 +33438,7 @@ int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_cancartstore_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_cancartstore_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &unused);
@@ -32154,6 +33465,7 @@ int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_canstore_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_canstore_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &unused);
@@ -32180,6 +33492,7 @@ int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_canguildstore_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_canguildstore_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &unused);
@@ -32206,6 +33519,7 @@ int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_canmail_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_canmail_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &unused);
@@ -32232,6 +33546,7 @@ int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_canauction_sub_pre ) {
int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_canauction_sub_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &unused);
@@ -32258,6 +33573,7 @@ int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func )
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isrestricted_pre ) {
int (*preHookFunc) (struct item *item, int *gmlv, int *gmlv2, int ( *func ) (struct item_data *, int, int));
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isrestricted_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isrestricted_pre[hIndex].func;
retVal___ = preHookFunc(item, &gmlv, &gmlv2, func);
@@ -32284,6 +33600,7 @@ int HP_itemdb_isidentified(int nameid) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isidentified_pre ) {
int (*preHookFunc) (int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isidentified_pre[hIndex].func;
retVal___ = preHookFunc(&nameid);
@@ -32310,6 +33627,7 @@ int HP_itemdb_isidentified2(struct item_data *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_isidentified2_pre ) {
int (*preHookFunc) (struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_isidentified2_pre[hIndex].func;
retVal___ = preHookFunc(data);
@@ -32331,167 +33649,12 @@ int HP_itemdb_isidentified2(struct item_data *data) {
}
return retVal___;
}
-bool HP_itemdb_read_itemavail(char *str[], int columns, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_itemdb_read_itemavail_pre ) {
- bool (*preHookFunc) (char *str[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemavail_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_itemavail_pre[hIndex].func;
- retVal___ = preHookFunc(str, &columns, &current);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.itemdb.read_itemavail(str, columns, current);
- }
- if( HPMHooks.count.HP_itemdb_read_itemavail_post ) {
- bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemavail_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_itemavail_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, str, &columns, &current);
- }
- }
- return retVal___;
-}
-bool HP_itemdb_read_itemtrade(char *str[], int columns, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_itemdb_read_itemtrade_pre ) {
- bool (*preHookFunc) (char *str[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemtrade_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_itemtrade_pre[hIndex].func;
- retVal___ = preHookFunc(str, &columns, &current);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.itemdb.read_itemtrade(str, columns, current);
- }
- if( HPMHooks.count.HP_itemdb_read_itemtrade_post ) {
- bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemtrade_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_itemtrade_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, str, &columns, &current);
- }
- }
- return retVal___;
-}
-bool HP_itemdb_read_itemdelay(char *str[], int columns, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_itemdb_read_itemdelay_pre ) {
- bool (*preHookFunc) (char *str[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemdelay_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_itemdelay_pre[hIndex].func;
- retVal___ = preHookFunc(str, &columns, &current);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.itemdb.read_itemdelay(str, columns, current);
- }
- if( HPMHooks.count.HP_itemdb_read_itemdelay_post ) {
- bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemdelay_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_itemdelay_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, str, &columns, &current);
- }
- }
- return retVal___;
-}
-bool HP_itemdb_read_stack(char *fields[], int columns, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_itemdb_read_stack_pre ) {
- bool (*preHookFunc) (char *fields[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_stack_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_stack_pre[hIndex].func;
- retVal___ = preHookFunc(fields, &columns, &current);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.itemdb.read_stack(fields, columns, current);
- }
- if( HPMHooks.count.HP_itemdb_read_stack_post ) {
- bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_stack_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_stack_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fields, &columns, &current);
- }
- }
- return retVal___;
-}
-bool HP_itemdb_read_buyingstore(char *fields[], int columns, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_itemdb_read_buyingstore_pre ) {
- bool (*preHookFunc) (char *fields[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_buyingstore_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_buyingstore_pre[hIndex].func;
- retVal___ = preHookFunc(fields, &columns, &current);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.itemdb.read_buyingstore(fields, columns, current);
- }
- if( HPMHooks.count.HP_itemdb_read_buyingstore_post ) {
- bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_buyingstore_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_buyingstore_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fields, &columns, &current);
- }
- }
- return retVal___;
-}
-bool HP_itemdb_read_nouse(char *fields[], int columns, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_itemdb_read_nouse_pre ) {
- bool (*preHookFunc) (char *fields[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_nouse_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_nouse_pre[hIndex].func;
- retVal___ = preHookFunc(fields, &columns, &current);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.itemdb.read_nouse(fields, columns, current);
- }
- if( HPMHooks.count.HP_itemdb_read_nouse_post ) {
- bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_nouse_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_nouse_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fields, &columns, &current);
- }
- }
- return retVal___;
-}
int HP_itemdb_combo_split_atoi(char *str, int *val) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_combo_split_atoi_pre ) {
int (*preHookFunc) (char *str, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_combo_split_atoi_pre[hIndex].func;
retVal___ = preHookFunc(str, val);
@@ -32517,6 +33680,7 @@ void HP_itemdb_read_combos(void) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_read_combos_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_read_combos_pre[hIndex].func;
preHookFunc();
@@ -32543,6 +33707,7 @@ int HP_itemdb_gendercheck(struct item_data *id) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_gendercheck_pre ) {
int (*preHookFunc) (struct item_data *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_gendercheck_pre[hIndex].func;
retVal___ = preHookFunc(id);
@@ -32569,6 +33734,7 @@ int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source)
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_validate_entry_pre ) {
int (*preHookFunc) (struct item_data *entry, int *n, const char *source);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_validate_entry_pre[hIndex].func;
retVal___ = preHookFunc(entry, &n, source);
@@ -32595,6 +33761,7 @@ int HP_itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_readdb_sql_sub_pre ) {
int (*preHookFunc) (Sql *handle, int *n, const char *source);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_sql_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_readdb_sql_sub_pre[hIndex].func;
retVal___ = preHookFunc(handle, &n, source);
@@ -32621,6 +33788,7 @@ int HP_itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *sour
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre ) {
int (*preHookFunc) (config_setting_t *it, int *n, const char *source);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_sub_pre[hIndex].func;
retVal___ = preHookFunc(it, &n, source);
@@ -32647,6 +33815,7 @@ int HP_itemdb_readdb_libconfig(const char *filename) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_readdb_libconfig_pre ) {
int (*preHookFunc) (const char *filename);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_pre[hIndex].func;
retVal___ = preHookFunc(filename);
@@ -32673,6 +33842,7 @@ int HP_itemdb_readdb_sql(const char *tablename) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_readdb_sql_pre ) {
int (*preHookFunc) (const char *tablename);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_sql_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_readdb_sql_pre[hIndex].func;
retVal___ = preHookFunc(tablename);
@@ -32694,14 +33864,15 @@ int HP_itemdb_readdb_sql(const char *tablename) {
}
return retVal___;
}
-uint64 HP_itemdb_unique_id(int8 flag, int64 value) {
+uint64 HP_itemdb_unique_id(struct map_session_data *sd) {
int hIndex = 0;
uint64 retVal___ = 0;
if( HPMHooks.count.HP_itemdb_unique_id_pre ) {
- uint64 (*preHookFunc) (int8 *flag, int64 *value);
+ uint64 (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_unique_id_pre[hIndex].func;
- retVal___ = preHookFunc(&flag, &value);
+ retVal___ = preHookFunc(sd);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -32709,39 +33880,13 @@ uint64 HP_itemdb_unique_id(int8 flag, int64 value) {
}
}
{
- retVal___ = HPMHooks.source.itemdb.unique_id(flag, value);
+ retVal___ = HPMHooks.source.itemdb.unique_id(sd);
}
if( HPMHooks.count.HP_itemdb_unique_id_post ) {
- uint64 (*postHookFunc) (uint64 retVal___, int8 *flag, int64 *value);
+ uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_itemdb_unique_id_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &flag, &value);
- }
- }
- return retVal___;
-}
-int HP_itemdb_uid_load(void) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_itemdb_uid_load_pre ) {
- int (*preHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_uid_load_pre[hIndex].func;
- retVal___ = preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.itemdb.uid_load();
- }
- if( HPMHooks.count.HP_itemdb_uid_load_post ) {
- int (*postHookFunc) (int retVal___);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_uid_load_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
+ retVal___ = postHookFunc(retVal___, sd);
}
}
return retVal___;
@@ -32750,6 +33895,7 @@ void HP_itemdb_read(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_read_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_read_pre[hIndex].func;
preHookFunc(&minimal);
@@ -32775,6 +33921,7 @@ void HP_itemdb_destroy_item_data(struct item_data *self, int free_self) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_destroy_item_data_pre ) {
void (*preHookFunc) (struct item_data *self, int *free_self);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_destroy_item_data_pre[hIndex].func;
preHookFunc(self, &free_self);
@@ -32801,6 +33948,7 @@ int HP_itemdb_final_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_itemdb_final_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_itemdb_final_sub_pre[hIndex].func;
@@ -32832,6 +33980,7 @@ void HP_itemdb_clear(bool total) {
int hIndex = 0;
if( HPMHooks.count.HP_itemdb_clear_pre ) {
void (*preHookFunc) (bool *total);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_clear_pre[hIndex].func;
preHookFunc(&total);
@@ -32858,6 +34007,7 @@ struct item_combo* HP_itemdb_id2combo(unsigned short id) {
struct item_combo* retVal___ = NULL;
if( HPMHooks.count.HP_itemdb_id2combo_pre ) {
struct item_combo* (*preHookFunc) (unsigned short *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_itemdb_id2combo_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -32884,6 +34034,7 @@ void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amou
int hIndex = 0;
if( HPMHooks.count.HP_logs_pick_pc_pre ) {
void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_pick_pc_pre[hIndex].func;
preHookFunc(sd, &type, &amount, itm, data);
@@ -32909,6 +34060,7 @@ void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, str
int hIndex = 0;
if( HPMHooks.count.HP_logs_pick_mob_pre ) {
void (*preHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_pick_mob_pre[hIndex].func;
preHookFunc(md, &type, &amount, itm, data);
@@ -32934,6 +34086,7 @@ void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_
int hIndex = 0;
if( HPMHooks.count.HP_logs_zeny_pre ) {
void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_zeny_pre[hIndex].func;
preHookFunc(sd, &type, src_sd, &amount);
@@ -32959,6 +34112,7 @@ void HP_logs_npc(struct map_session_data *sd, const char *message) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_npc_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_npc_pre[hIndex].func;
preHookFunc(sd, message);
@@ -32984,6 +34138,7 @@ void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_acc
int hIndex = 0;
if( HPMHooks.count.HP_logs_chat_pre ) {
void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_chat_pre[hIndex].func;
preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message);
@@ -33009,6 +34164,7 @@ void HP_logs_atcommand(struct map_session_data *sd, const char *message) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_atcommand_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_atcommand_pre[hIndex].func;
preHookFunc(sd, message);
@@ -33034,6 +34190,7 @@ void HP_logs_branch(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_branch_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_branch_pre[hIndex].func;
preHookFunc(sd);
@@ -33059,6 +34216,7 @@ void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp)
int hIndex = 0;
if( HPMHooks.count.HP_logs_mvpdrop_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_mvpdrop_pre[hIndex].func;
preHookFunc(sd, &monster_id, log_mvp);
@@ -33084,6 +34242,7 @@ void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct
int hIndex = 0;
if( HPMHooks.count.HP_logs_pick_sub_pre ) {
void (*preHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_pick_sub_pre[hIndex].func;
preHookFunc(&id, &m, &type, &amount, itm, data);
@@ -33109,6 +34268,7 @@ void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct
int hIndex = 0;
if( HPMHooks.count.HP_logs_zeny_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_zeny_sub_pre[hIndex].func;
preHookFunc(sd, &type, src_sd, &amount);
@@ -33134,6 +34294,7 @@ void HP_logs_npc_sub(struct map_session_data *sd, const char *message) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_npc_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_npc_sub_pre[hIndex].func;
preHookFunc(sd, message);
@@ -33159,6 +34320,7 @@ void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src
int hIndex = 0;
if( HPMHooks.count.HP_logs_chat_sub_pre ) {
void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_chat_sub_pre[hIndex].func;
preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message);
@@ -33184,6 +34346,7 @@ void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_atcommand_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_atcommand_sub_pre[hIndex].func;
preHookFunc(sd, message);
@@ -33209,6 +34372,7 @@ void HP_logs_branch_sub(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_branch_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_branch_sub_pre[hIndex].func;
preHookFunc(sd);
@@ -33234,6 +34398,7 @@ void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_m
int hIndex = 0;
if( HPMHooks.count.HP_logs_mvpdrop_sub_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_pre[hIndex].func;
preHookFunc(sd, &monster_id, log_mvp);
@@ -33260,6 +34425,7 @@ int HP_logs_config_read(const char *cfgName) {
int retVal___ = 0;
if( HPMHooks.count.HP_logs_config_read_pre ) {
int (*preHookFunc) (const char *cfgName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_config_read_pre[hIndex].func;
retVal___ = preHookFunc(cfgName);
@@ -33285,6 +34451,7 @@ void HP_logs_config_done(void) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_config_done_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_config_done_pre[hIndex].func;
preHookFunc();
@@ -33310,6 +34477,7 @@ void HP_logs_sql_init(void) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_sql_init_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_sql_init_pre[hIndex].func;
preHookFunc();
@@ -33335,6 +34503,7 @@ void HP_logs_sql_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_logs_sql_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_sql_final_pre[hIndex].func;
preHookFunc();
@@ -33361,6 +34530,7 @@ char HP_logs_picktype2char(e_log_pick_type type) {
char retVal___ = 0;
if( HPMHooks.count.HP_logs_picktype2char_pre ) {
char (*preHookFunc) (e_log_pick_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_picktype2char_pre[hIndex].func;
retVal___ = preHookFunc(&type);
@@ -33387,6 +34557,7 @@ char HP_logs_chattype2char(e_log_chat_type type) {
char retVal___ = 0;
if( HPMHooks.count.HP_logs_chattype2char_pre ) {
char (*preHookFunc) (e_log_chat_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_chattype2char_pre[hIndex].func;
retVal___ = preHookFunc(&type);
@@ -33413,6 +34584,7 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat
bool retVal___ = false;
if( HPMHooks.count.HP_logs_should_log_item_pre ) {
bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func;
retVal___ = preHookFunc(&nameid, &amount, &refine, id);
@@ -33439,6 +34611,7 @@ void HP_mail_clear(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_mail_clear_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_clear_pre[hIndex].func;
preHookFunc(sd);
@@ -33465,6 +34638,7 @@ int HP_mail_removeitem(struct map_session_data *sd, short flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_mail_removeitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, short *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_removeitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -33491,6 +34665,7 @@ int HP_mail_removezeny(struct map_session_data *sd, short flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_mail_removezeny_pre ) {
int (*preHookFunc) (struct map_session_data *sd, short *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_removezeny_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -33517,6 +34692,7 @@ unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount)
unsigned char retVal___ = 0;
if( HPMHooks.count.HP_mail_setitem_pre ) {
unsigned char (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_setitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &idx, &amount);
@@ -33543,6 +34719,7 @@ bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg
bool retVal___ = false;
if( HPMHooks.count.HP_mail_setattachment_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_setattachment_pre[hIndex].func;
retVal___ = preHookFunc(sd, msg);
@@ -33568,6 +34745,7 @@ void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *i
int hIndex = 0;
if( HPMHooks.count.HP_mail_getattachment_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *zeny, struct item *item);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_getattachment_pre[hIndex].func;
preHookFunc(sd, &zeny, item);
@@ -33594,6 +34772,7 @@ int HP_mail_openmail(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_mail_openmail_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_openmail_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -33619,6 +34798,7 @@ void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg)
int hIndex = 0;
if( HPMHooks.count.HP_mail_deliveryfail_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_deliveryfail_pre[hIndex].func;
preHookFunc(sd, msg);
@@ -33645,6 +34825,7 @@ bool HP_mail_invalid_operation(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_mail_invalid_operation_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mail_invalid_operation_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -33671,6 +34852,7 @@ void HP_map_zone_init(void) {
int hIndex = 0;
if( HPMHooks.count.HP_map_zone_init_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_init_pre[hIndex].func;
preHookFunc();
@@ -33696,6 +34878,7 @@ void HP_map_zone_remove(int m) {
int hIndex = 0;
if( HPMHooks.count.HP_map_zone_remove_pre ) {
void (*preHookFunc) (int *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_remove_pre[hIndex].func;
preHookFunc(&m);
@@ -33721,6 +34904,7 @@ void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, con
int hIndex = 0;
if( HPMHooks.count.HP_map_zone_apply_pre ) {
void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_apply_pre[hIndex].func;
preHookFunc(&m, zone, start, buffer, filepath);
@@ -33746,6 +34930,7 @@ void HP_map_zone_change(int m, struct map_zone_data *zone, const char *start, co
int hIndex = 0;
if( HPMHooks.count.HP_map_zone_change_pre ) {
void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_change_pre[hIndex].func;
preHookFunc(&m, zone, start, buffer, filepath);
@@ -33771,6 +34956,7 @@ void HP_map_zone_change2(int m, struct map_zone_data *zone) {
int hIndex = 0;
if( HPMHooks.count.HP_map_zone_change2_pre ) {
void (*preHookFunc) (int *m, struct map_zone_data *zone);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_change2_pre[hIndex].func;
preHookFunc(&m, zone);
@@ -33797,6 +34983,7 @@ int HP_map_getcell(int16 m, int16 x, int16 y, cell_chk cellchk) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_getcell_pre ) {
int (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_chk *cellchk);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_getcell_pre[hIndex].func;
retVal___ = preHookFunc(&m, &x, &y, &cellchk);
@@ -33822,6 +35009,7 @@ void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) {
int hIndex = 0;
if( HPMHooks.count.HP_map_setgatcell_pre ) {
void (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *gat);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_setgatcell_pre[hIndex].func;
preHookFunc(&m, &x, &y, &gat);
@@ -33847,6 +35035,7 @@ void HP_map_cellfromcache(struct map_data *m) {
int hIndex = 0;
if( HPMHooks.count.HP_map_cellfromcache_pre ) {
void (*preHookFunc) (struct map_data *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_cellfromcache_pre[hIndex].func;
preHookFunc(m);
@@ -33872,6 +35061,7 @@ void HP_map_setusers(int p1) {
int hIndex = 0;
if( HPMHooks.count.HP_map_setusers_pre ) {
void (*preHookFunc) (int *p1);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_setusers_pre[hIndex].func;
preHookFunc(&p1);
@@ -33898,6 +35088,7 @@ int HP_map_getusers(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_getusers_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_getusers_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -33924,6 +35115,7 @@ int HP_map_usercount(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_usercount_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_usercount_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -33950,6 +35142,7 @@ int HP_map_freeblock(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_freeblock_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_freeblock_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -33976,6 +35169,7 @@ int HP_map_freeblock_lock(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_freeblock_lock_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_freeblock_lock_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -34002,6 +35196,7 @@ int HP_map_freeblock_unlock(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_freeblock_unlock_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_freeblock_unlock_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -34028,6 +35223,7 @@ int HP_map_addblock(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_addblock_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addblock_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -34054,6 +35250,7 @@ int HP_map_delblock(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_delblock_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_delblock_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -34080,6 +35277,7 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_moveblock_pre ) {
int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_moveblock_pre[hIndex].func;
retVal___ = preHookFunc(bl, &x1, &y1, &tick);
@@ -34106,6 +35304,7 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_count_oncell_pre ) {
int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_count_oncell_pre[hIndex].func;
retVal___ = preHookFunc(&m, &x, &y, &type);
@@ -34132,6 +35331,7 @@ struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int1
struct skill_unit* retVal___ = NULL;
if( HPMHooks.count.HP_map_find_skill_unit_oncell_pre ) {
struct skill_unit* (*preHookFunc) (struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_pre[hIndex].func;
retVal___ = preHookFunc(target, &x, &y, &skill_id, out_unit, &flag);
@@ -34158,6 +35358,7 @@ int HP_map_get_new_object_id(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_get_new_object_id_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_get_new_object_id_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -34184,6 +35385,7 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y,
int retVal___ = 0;
if( HPMHooks.count.HP_map_search_freecell_pre ) {
int (*preHookFunc) (struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_search_freecell_pre[hIndex].func;
retVal___ = preHookFunc(src, &m, x, y, &rx, &ry, &flag);
@@ -34210,6 +35412,7 @@ int HP_map_quit(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_quit_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_quit_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -34236,6 +35439,7 @@ bool HP_map_addnpc(int16 m, struct npc_data *nd) {
bool retVal___ = false;
if( HPMHooks.count.HP_map_addnpc_pre ) {
bool (*preHookFunc) (int16 *m, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addnpc_pre[hIndex].func;
retVal___ = preHookFunc(&m, nd);
@@ -34262,6 +35466,7 @@ int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -34288,6 +35493,7 @@ int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_removemobs_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_removemobs_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -34313,6 +35519,7 @@ void HP_map_clearflooritem(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_map_clearflooritem_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_clearflooritem_pre[hIndex].func;
preHookFunc(bl);
@@ -34339,6 +35546,7 @@ int HP_map_addflooritem(struct item *item_data, int amount, int16 m, int16 x, in
int retVal___ = 0;
if( HPMHooks.count.HP_map_addflooritem_pre ) {
int (*preHookFunc) (struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addflooritem_pre[hIndex].func;
retVal___ = preHookFunc(item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags);
@@ -34364,6 +35572,7 @@ void HP_map_addnickdb(int charid, const char *nick) {
int hIndex = 0;
if( HPMHooks.count.HP_map_addnickdb_pre ) {
void (*preHookFunc) (int *charid, const char *nick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addnickdb_pre[hIndex].func;
preHookFunc(&charid, nick);
@@ -34389,6 +35598,7 @@ void HP_map_delnickdb(int charid, const char *nick) {
int hIndex = 0;
if( HPMHooks.count.HP_map_delnickdb_pre ) {
void (*preHookFunc) (int *charid, const char *nick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_delnickdb_pre[hIndex].func;
preHookFunc(&charid, nick);
@@ -34414,6 +35624,7 @@ void HP_map_reqnickdb(struct map_session_data *sd, int charid) {
int hIndex = 0;
if( HPMHooks.count.HP_map_reqnickdb_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *charid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_reqnickdb_pre[hIndex].func;
preHookFunc(sd, &charid);
@@ -34440,6 +35651,7 @@ const char* HP_map_charid2nick(int charid) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_map_charid2nick_pre ) {
const char* (*preHookFunc) (int *charid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_charid2nick_pre[hIndex].func;
retVal___ = preHookFunc(&charid);
@@ -34466,6 +35678,7 @@ struct map_session_data* HP_map_charid2sd(int charid) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_charid2sd_pre ) {
struct map_session_data* (*preHookFunc) (int *charid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_charid2sd_pre[hIndex].func;
retVal___ = preHookFunc(&charid);
@@ -34491,6 +35704,7 @@ void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args)
int hIndex = 0;
if( HPMHooks.count.HP_map_vforeachpc_pre ) {
void (*preHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_vforeachpc_pre[hIndex].func;
@@ -34522,6 +35736,7 @@ void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_li
int hIndex = 0;
if( HPMHooks.count.HP_map_vforeachmob_pre ) {
void (*preHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_vforeachmob_pre[hIndex].func;
@@ -34553,6 +35768,7 @@ void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_li
int hIndex = 0;
if( HPMHooks.count.HP_map_vforeachnpc_pre ) {
void (*preHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_vforeachnpc_pre[hIndex].func;
@@ -34584,6 +35800,7 @@ void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), v
int hIndex = 0;
if( HPMHooks.count.HP_map_vforeachregen_pre ) {
void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_vforeachregen_pre[hIndex].func;
@@ -34615,6 +35832,7 @@ void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va
int hIndex = 0;
if( HPMHooks.count.HP_map_vforeachiddb_pre ) {
void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_vforeachiddb_pre[hIndex].func;
@@ -34647,6 +35865,7 @@ int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachinrange_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforeachinrange_pre[hIndex].func;
@@ -34679,6 +35898,7 @@ int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), st
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachinshootrange_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_pre[hIndex].func;
@@ -34711,6 +35931,7 @@ int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m,
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachinarea_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforeachinarea_pre[hIndex].func;
@@ -34743,6 +35964,7 @@ int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforcountinrange_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforcountinrange_pre[hIndex].func;
@@ -34775,6 +35997,7 @@ int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforcountinarea_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforcountinarea_pre[hIndex].func;
@@ -34807,6 +36030,7 @@ int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), stru
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachinmovearea_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_pre[hIndex].func;
@@ -34839,6 +36063,7 @@ int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m,
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachincell_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforeachincell_pre[hIndex].func;
@@ -34871,6 +36096,7 @@ int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m,
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachinpath_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforeachinpath_pre[hIndex].func;
@@ -34903,6 +36129,7 @@ int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m,
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachinmap_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_vforeachinmap_pre[hIndex].func;
@@ -34935,6 +36162,7 @@ int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int1
int retVal___ = 0;
if( HPMHooks.count.HP_map_vforeachininstance_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_vforeachininstance_pre[hIndex].func;
@@ -34967,6 +36195,7 @@ struct map_session_data* HP_map_id2sd(int id) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2sd_pre ) {
struct map_session_data* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2sd_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -34993,6 +36222,7 @@ struct mob_data* HP_map_id2md(int id) {
struct mob_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2md_pre ) {
struct mob_data* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2md_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35019,6 +36249,7 @@ struct npc_data* HP_map_id2nd(int id) {
struct npc_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2nd_pre ) {
struct npc_data* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2nd_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35045,6 +36276,7 @@ struct homun_data* HP_map_id2hd(int id) {
struct homun_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2hd_pre ) {
struct homun_data* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2hd_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35071,6 +36303,7 @@ struct mercenary_data* HP_map_id2mc(int id) {
struct mercenary_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2mc_pre ) {
struct mercenary_data* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2mc_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35097,6 +36330,7 @@ struct chat_data* HP_map_id2cd(int id) {
struct chat_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2cd_pre ) {
struct chat_data* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2cd_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35123,6 +36357,7 @@ struct block_list* HP_map_id2bl(int id) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2bl_pre ) {
struct block_list* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2bl_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35149,6 +36384,7 @@ bool HP_map_blid_exists(int id) {
bool retVal___ = false;
if( HPMHooks.count.HP_map_blid_exists_pre ) {
bool (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_blid_exists_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35175,6 +36411,7 @@ int16 HP_map_mapindex2mapid(unsigned short map_index) {
int16 retVal___ = 0;
if( HPMHooks.count.HP_map_mapindex2mapid_pre ) {
int16 (*preHookFunc) (unsigned short *map_index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func;
retVal___ = preHookFunc(&map_index);
@@ -35201,6 +36438,7 @@ int16 HP_map_mapname2mapid(const char *name) {
int16 retVal___ = 0;
if( HPMHooks.count.HP_map_mapname2mapid_pre ) {
int16 (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_mapname2mapid_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -35227,6 +36465,7 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_mapname2ipport_pre ) {
int (*preHookFunc) (unsigned short *name, uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_mapname2ipport_pre[hIndex].func;
retVal___ = preHookFunc(&name, ip, port);
@@ -35253,6 +36492,7 @@ int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_setipport_pre ) {
int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func;
retVal___ = preHookFunc(&map_index, &ip, &port);
@@ -35279,6 +36519,7 @@ int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_eraseipport_pre ) {
int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func;
retVal___ = preHookFunc(&map_index, &ip, &port);
@@ -35305,6 +36546,7 @@ int HP_map_eraseallipport(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_eraseallipport_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_eraseallipport_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -35330,6 +36572,7 @@ void HP_map_addiddb(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_map_addiddb_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addiddb_pre[hIndex].func;
preHookFunc(bl);
@@ -35355,6 +36598,7 @@ void HP_map_deliddb(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_map_deliddb_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_deliddb_pre[hIndex].func;
preHookFunc(bl);
@@ -35381,6 +36625,7 @@ struct map_session_data* HP_map_nick2sd(const char *nick) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_nick2sd_pre ) {
struct map_session_data* (*preHookFunc) (const char *nick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_nick2sd_pre[hIndex].func;
retVal___ = preHookFunc(nick);
@@ -35407,6 +36652,7 @@ struct mob_data* HP_map_getmob_boss(int16 m) {
struct mob_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_getmob_boss_pre ) {
struct mob_data* (*preHookFunc) (int16 *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_getmob_boss_pre[hIndex].func;
retVal___ = preHookFunc(&m);
@@ -35433,6 +36679,7 @@ struct mob_data* HP_map_id2boss(int id) {
struct mob_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_id2boss_pre ) {
struct mob_data* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_id2boss_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -35458,6 +36705,7 @@ void HP_map_reloadnpc(bool clear, const char *const *extra_scripts, int extra_sc
int hIndex = 0;
if( HPMHooks.count.HP_map_reloadnpc_pre ) {
void (*preHookFunc) (bool *clear, const char *const *extra_scripts, int *extra_scripts_count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_reloadnpc_pre[hIndex].func;
preHookFunc(&clear, extra_scripts, &extra_scripts_count);
@@ -35484,6 +36732,7 @@ int HP_map_check_dir(int s_dir, int t_dir) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_check_dir_pre ) {
int (*preHookFunc) (int *s_dir, int *t_dir);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_check_dir_pre[hIndex].func;
retVal___ = preHookFunc(&s_dir, &t_dir);
@@ -35510,6 +36759,7 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) {
uint8 retVal___ = 0;
if( HPMHooks.count.HP_map_calc_dir_pre ) {
uint8 (*preHookFunc) (struct block_list *src, int16 *x, int16 *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_calc_dir_pre[hIndex].func;
retVal___ = preHookFunc(src, &x, &y);
@@ -35536,6 +36786,7 @@ int HP_map_random_dir(struct block_list *bl, short *x, short *y) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_random_dir_pre ) {
int (*preHookFunc) (struct block_list *bl, short *x, short *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_random_dir_pre[hIndex].func;
retVal___ = preHookFunc(bl, x, y);
@@ -35562,6 +36813,7 @@ int HP_map_cleanup_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_cleanup_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_cleanup_sub_pre[hIndex].func;
@@ -35594,6 +36846,7 @@ int HP_map_delmap(char *mapname) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_delmap_pre ) {
int (*preHookFunc) (char *mapname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_delmap_pre[hIndex].func;
retVal___ = preHookFunc(mapname);
@@ -35619,6 +36872,7 @@ void HP_map_flags_init(void) {
int hIndex = 0;
if( HPMHooks.count.HP_map_flags_init_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_flags_init_pre[hIndex].func;
preHookFunc();
@@ -35645,6 +36899,7 @@ bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shoota
bool retVal___ = false;
if( HPMHooks.count.HP_map_iwall_set_pre ) {
bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_iwall_set_pre[hIndex].func;
retVal___ = preHookFunc(&m, &x, &y, &size, &dir, &shootable, wall_name);
@@ -35670,6 +36925,7 @@ void HP_map_iwall_get(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_map_iwall_get_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_iwall_get_pre[hIndex].func;
preHookFunc(sd);
@@ -35695,6 +36951,7 @@ void HP_map_iwall_remove(const char *wall_name) {
int hIndex = 0;
if( HPMHooks.count.HP_map_iwall_remove_pre ) {
void (*preHookFunc) (const char *wall_name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_iwall_remove_pre[hIndex].func;
preHookFunc(wall_name);
@@ -35721,6 +36978,7 @@ int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_addmobtolist_pre ) {
int (*preHookFunc) (unsigned short *m, struct spawn_data *spawn);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addmobtolist_pre[hIndex].func;
retVal___ = preHookFunc(&m, spawn);
@@ -35746,6 +37004,7 @@ void HP_map_spawnmobs(int16 m) {
int hIndex = 0;
if( HPMHooks.count.HP_map_spawnmobs_pre ) {
void (*preHookFunc) (int16 *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_spawnmobs_pre[hIndex].func;
preHookFunc(&m);
@@ -35771,6 +37030,7 @@ void HP_map_removemobs(int16 m) {
int hIndex = 0;
if( HPMHooks.count.HP_map_removemobs_pre ) {
void (*preHookFunc) (int16 *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_removemobs_pre[hIndex].func;
preHookFunc(&m);
@@ -35796,6 +37056,7 @@ void HP_map_addmap2db(struct map_data *m) {
int hIndex = 0;
if( HPMHooks.count.HP_map_addmap2db_pre ) {
void (*preHookFunc) (struct map_data *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addmap2db_pre[hIndex].func;
preHookFunc(m);
@@ -35821,6 +37082,7 @@ void HP_map_removemapdb(struct map_data *m) {
int hIndex = 0;
if( HPMHooks.count.HP_map_removemapdb_pre ) {
void (*preHookFunc) (struct map_data *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_removemapdb_pre[hIndex].func;
preHookFunc(m);
@@ -35846,6 +37108,7 @@ void HP_map_clean(int i) {
int hIndex = 0;
if( HPMHooks.count.HP_map_clean_pre ) {
void (*preHookFunc) (int *i);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_clean_pre[hIndex].func;
preHookFunc(&i);
@@ -35871,6 +37134,7 @@ void HP_map_do_shutdown(void) {
int hIndex = 0;
if( HPMHooks.count.HP_map_do_shutdown_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_do_shutdown_pre[hIndex].func;
preHookFunc();
@@ -35897,6 +37161,7 @@ int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_freeblock_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_freeblock_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -35923,6 +37188,7 @@ int HP_map_searchrandfreecell(int16 m, int16 *x, int16 *y, int stack) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_searchrandfreecell_pre ) {
int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *stack);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_searchrandfreecell_pre[hIndex].func;
retVal___ = preHookFunc(&m, x, y, &stack);
@@ -35949,6 +37215,7 @@ int HP_map_count_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_count_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_count_sub_pre[hIndex].func;
@@ -35982,6 +37249,7 @@ DBData HP_map_create_charid2nick(DBKey key, va_list args) {
memset(&retVal___, '\0', sizeof(DBData));
if( HPMHooks.count.HP_map_create_charid2nick_pre ) {
DBData (*preHookFunc) (DBKey *key, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_create_charid2nick_pre[hIndex].func;
@@ -36014,6 +37282,7 @@ int HP_map_removemobs_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_removemobs_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_removemobs_sub_pre[hIndex].func;
@@ -36047,6 +37316,7 @@ struct mapcell HP_map_gat2cell(int gat) {
memset(&retVal___, '\0', sizeof(struct mapcell));
if( HPMHooks.count.HP_map_gat2cell_pre ) {
struct mapcell (*preHookFunc) (int *gat);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_gat2cell_pre[hIndex].func;
retVal___ = preHookFunc(&gat);
@@ -36073,6 +37343,7 @@ int HP_map_cell2gat(struct mapcell cell) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_cell2gat_pre ) {
int (*preHookFunc) (struct mapcell *cell);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_cell2gat_pre[hIndex].func;
retVal___ = preHookFunc(&cell);
@@ -36099,6 +37370,7 @@ int HP_map_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_getcellp_pre ) {
int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_getcellp_pre[hIndex].func;
retVal___ = preHookFunc(m, &x, &y, &cellchk);
@@ -36124,6 +37396,7 @@ void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
int hIndex = 0;
if( HPMHooks.count.HP_map_setcell_pre ) {
void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_setcell_pre[hIndex].func;
preHookFunc(&m, &x, &y, &cell, &flag);
@@ -36150,6 +37423,7 @@ int HP_map_sub_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk)
int retVal___ = 0;
if( HPMHooks.count.HP_map_sub_getcellp_pre ) {
int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_sub_getcellp_pre[hIndex].func;
retVal___ = preHookFunc(m, &x, &y, &cellchk);
@@ -36175,6 +37449,7 @@ void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
int hIndex = 0;
if( HPMHooks.count.HP_map_sub_setcell_pre ) {
void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_sub_setcell_pre[hIndex].func;
preHookFunc(&m, &x, &y, &cell, &flag);
@@ -36200,6 +37475,7 @@ void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *
int hIndex = 0;
if( HPMHooks.count.HP_map_iwall_nextxy_pre ) {
void (*preHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_iwall_nextxy_pre[hIndex].func;
preHookFunc(&x, &y, &dir, &pos, x1, y1);
@@ -36227,6 +37503,7 @@ DBData HP_map_create_map_data_other_server(DBKey key, va_list args) {
memset(&retVal___, '\0', sizeof(DBData));
if( HPMHooks.count.HP_map_create_map_data_other_server_pre ) {
DBData (*preHookFunc) (DBKey *key, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_pre[hIndex].func;
@@ -36259,6 +37536,7 @@ int HP_map_eraseallipport_sub(DBKey key, DBData *data, va_list va) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_eraseallipport_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list va);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_pre; hIndex++ ) {
va_list va___copy; va_copy(va___copy, va);
preHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_pre[hIndex].func;
@@ -36291,6 +37569,7 @@ char* HP_map_init_mapcache(FILE *fp) {
char* retVal___ = NULL;
if( HPMHooks.count.HP_map_init_mapcache_pre ) {
char* (*preHookFunc) (FILE *fp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_init_mapcache_pre[hIndex].func;
retVal___ = preHookFunc(fp);
@@ -36317,6 +37596,7 @@ int HP_map_readfromcache(struct map_data *m, char *buffer) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_readfromcache_pre ) {
int (*preHookFunc) (struct map_data *m, char *buffer);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_readfromcache_pre[hIndex].func;
retVal___ = preHookFunc(m, buffer);
@@ -36343,6 +37623,7 @@ int HP_map_addmap(const char *mapname) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_addmap_pre ) {
int (*preHookFunc) (const char *mapname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_addmap_pre[hIndex].func;
retVal___ = preHookFunc(mapname);
@@ -36368,6 +37649,7 @@ void HP_map_delmapid(int id) {
int hIndex = 0;
if( HPMHooks.count.HP_map_delmapid_pre ) {
void (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_delmapid_pre[hIndex].func;
preHookFunc(&id);
@@ -36393,6 +37675,7 @@ void HP_map_zone_db_clear(void) {
int hIndex = 0;
if( HPMHooks.count.HP_map_zone_db_clear_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_db_clear_pre[hIndex].func;
preHookFunc();
@@ -36418,6 +37701,7 @@ void HP_map_list_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_map_list_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_list_final_pre[hIndex].func;
preHookFunc();
@@ -36444,6 +37728,7 @@ int HP_map_waterheight(char *mapname) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_waterheight_pre ) {
int (*preHookFunc) (char *mapname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_waterheight_pre[hIndex].func;
retVal___ = preHookFunc(mapname);
@@ -36470,6 +37755,7 @@ int HP_map_readgat(struct map_data *m) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_readgat_pre ) {
int (*preHookFunc) (struct map_data *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_readgat_pre[hIndex].func;
retVal___ = preHookFunc(m);
@@ -36496,6 +37782,7 @@ int HP_map_readallmaps(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_readallmaps_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_readallmaps_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -36522,6 +37809,7 @@ int HP_map_config_read(char *cfgName) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_config_read_pre ) {
int (*preHookFunc) (char *cfgName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_config_read_pre[hIndex].func;
retVal___ = preHookFunc(cfgName);
@@ -36548,6 +37836,7 @@ int HP_map_config_read_sub(char *cfgName) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_config_read_sub_pre ) {
int (*preHookFunc) (char *cfgName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_config_read_sub_pre[hIndex].func;
retVal___ = preHookFunc(cfgName);
@@ -36573,6 +37862,7 @@ void HP_map_reloadnpc_sub(char *cfgName) {
int hIndex = 0;
if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) {
void (*preHookFunc) (char *cfgName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func;
preHookFunc(cfgName);
@@ -36599,6 +37889,7 @@ int HP_map_inter_config_read(char *cfgName) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_inter_config_read_pre ) {
int (*preHookFunc) (char *cfgName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func;
retVal___ = preHookFunc(cfgName);
@@ -36625,6 +37916,7 @@ int HP_map_sql_init(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_sql_init_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_sql_init_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -36651,6 +37943,7 @@ int HP_map_sql_close(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_sql_close_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_sql_close_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -36677,6 +37970,7 @@ bool HP_map_zone_mf_cache(int m, char *flag, char *params) {
bool retVal___ = false;
if( HPMHooks.count.HP_map_zone_mf_cache_pre ) {
bool (*preHookFunc) (int *m, char *flag, char *params);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_mf_cache_pre[hIndex].func;
retVal___ = preHookFunc(&m, flag, params);
@@ -36703,6 +37997,7 @@ unsigned short HP_map_zone_str2itemid(const char *name) {
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_map_zone_str2itemid_pre ) {
unsigned short (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_str2itemid_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -36729,6 +38024,7 @@ unsigned short HP_map_zone_str2skillid(const char *name) {
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_map_zone_str2skillid_pre ) {
unsigned short (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_str2skillid_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -36755,6 +38051,7 @@ enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype
enum bl_type retVal___ = BL_NUL;
if( HPMHooks.count.HP_map_zone_bl_type_pre ) {
enum bl_type (*preHookFunc) (const char *entry, enum map_zone_skill_subtype *subtype);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_zone_bl_type_pre[hIndex].func;
retVal___ = preHookFunc(entry, subtype);
@@ -36780,6 +38077,7 @@ void HP_map_read_zone_db(void) {
int hIndex = 0;
if( HPMHooks.count.HP_map_read_zone_db_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_read_zone_db_pre[hIndex].func;
preHookFunc();
@@ -36806,6 +38104,7 @@ int HP_map_db_final(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_db_final_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_db_final_pre[hIndex].func;
@@ -36838,6 +38137,7 @@ int HP_map_nick_db_final(DBKey key, DBData *data, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_nick_db_final_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_map_nick_db_final_pre[hIndex].func;
@@ -36870,6 +38170,7 @@ int HP_map_cleanup_db_sub(DBKey key, DBData *data, va_list va) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_cleanup_db_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list va);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_pre; hIndex++ ) {
va_list va___copy; va_copy(va___copy, va);
preHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_pre[hIndex].func;
@@ -36902,6 +38203,7 @@ int HP_map_abort_sub(struct map_session_data *sd, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_abort_sub_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_map_abort_sub_pre[hIndex].func;
@@ -36933,6 +38235,7 @@ void HP_map_helpscreen(bool do_exit) {
int hIndex = 0;
if( HPMHooks.count.HP_map_helpscreen_pre ) {
void (*preHookFunc) (bool *do_exit);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_helpscreen_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_helpscreen_pre[hIndex].func;
preHookFunc(&do_exit);
@@ -36958,6 +38261,7 @@ void HP_map_versionscreen(bool do_exit) {
int hIndex = 0;
if( HPMHooks.count.HP_map_versionscreen_pre ) {
void (*preHookFunc) (bool *do_exit);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_versionscreen_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_versionscreen_pre[hIndex].func;
preHookFunc(&do_exit);
@@ -36984,6 +38288,7 @@ bool HP_map_arg_next_value(const char *option, int i, int argc, bool must) {
bool retVal___ = false;
if( HPMHooks.count.HP_map_arg_next_value_pre ) {
bool (*preHookFunc) (const char *option, int *i, int *argc, bool *must);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_arg_next_value_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_arg_next_value_pre[hIndex].func;
retVal___ = preHookFunc(option, &i, &argc, &must);
@@ -37005,38 +38310,14 @@ bool HP_map_arg_next_value(const char *option, int i, int argc, bool must) {
}
return retVal___;
}
-void HP_map_addblcell(struct block_list *bl) {
- int hIndex = 0;
- if( HPMHooks.count.HP_map_addblcell_pre ) {
- void (*preHookFunc) (struct block_list *bl);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_map_addblcell_pre[hIndex].func;
- preHookFunc(bl);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.map.addblcell(bl);
- }
- if( HPMHooks.count.HP_map_addblcell_post ) {
- void (*postHookFunc) (struct block_list *bl);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_map_addblcell_post[hIndex].func;
- postHookFunc(bl);
- }
- }
- return;
-}
-void HP_map_delblcell(struct block_list *bl) {
+void HP_map_update_cell_bl(struct block_list *bl, bool increase) {
int hIndex = 0;
- if( HPMHooks.count.HP_map_delblcell_pre ) {
- void (*preHookFunc) (struct block_list *bl);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_map_delblcell_pre[hIndex].func;
- preHookFunc(bl);
+ if( HPMHooks.count.HP_map_update_cell_bl_pre ) {
+ void (*preHookFunc) (struct block_list *bl, bool *increase);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_update_cell_bl_pre[hIndex].func;
+ preHookFunc(bl, &increase);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -37044,13 +38325,13 @@ void HP_map_delblcell(struct block_list *bl) {
}
}
{
- HPMHooks.source.map.delblcell(bl);
+ HPMHooks.source.map.update_cell_bl(bl, increase);
}
- if( HPMHooks.count.HP_map_delblcell_post ) {
- void (*postHookFunc) (struct block_list *bl);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_map_delblcell_post[hIndex].func;
- postHookFunc(bl);
+ if( HPMHooks.count.HP_map_update_cell_bl_post ) {
+ void (*postHookFunc) (struct block_list *bl, bool *increase);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_update_cell_bl_post[hIndex].func;
+ postHookFunc(bl, &increase);
}
}
return;
@@ -37060,6 +38341,7 @@ int HP_map_get_new_bonus_id(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_map_get_new_bonus_id_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -37085,6 +38367,7 @@ void HP_map_add_questinfo(int m, struct questinfo *qi) {
int hIndex = 0;
if( HPMHooks.count.HP_map_add_questinfo_pre ) {
void (*preHookFunc) (int *m, struct questinfo *qi);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func;
preHookFunc(&m, qi);
@@ -37111,6 +38394,7 @@ bool HP_map_remove_questinfo(int m, struct npc_data *nd) {
bool retVal___ = false;
if( HPMHooks.count.HP_map_remove_questinfo_pre ) {
bool (*preHookFunc) (int *m, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_remove_questinfo_pre[hIndex].func;
retVal___ = preHookFunc(&m, nd);
@@ -37137,6 +38421,7 @@ struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_z
struct map_zone_data* retVal___ = NULL;
if( HPMHooks.count.HP_map_merge_zone_pre ) {
struct map_zone_data* (*preHookFunc) (struct map_zone_data *main, struct map_zone_data *other);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_merge_zone_pre[hIndex].func;
retVal___ = preHookFunc(main, other);
@@ -37164,6 +38449,7 @@ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types
struct s_mapiterator* retVal___ = NULL;
if( HPMHooks.count.HP_mapit_alloc_pre ) {
struct s_mapiterator* (*preHookFunc) (enum e_mapitflags *flags, enum bl_type *types);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapit_alloc_pre[hIndex].func;
retVal___ = preHookFunc(&flags, &types);
@@ -37189,6 +38475,7 @@ void HP_mapit_free(struct s_mapiterator *iter) {
int hIndex = 0;
if( HPMHooks.count.HP_mapit_free_pre ) {
void (*preHookFunc) (struct s_mapiterator *iter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapit_free_pre[hIndex].func;
preHookFunc(iter);
@@ -37215,6 +38502,7 @@ struct block_list* HP_mapit_first(struct s_mapiterator *iter) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_mapit_first_pre ) {
struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapit_first_pre[hIndex].func;
retVal___ = preHookFunc(iter);
@@ -37241,6 +38529,7 @@ struct block_list* HP_mapit_last(struct s_mapiterator *iter) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_mapit_last_pre ) {
struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapit_last_pre[hIndex].func;
retVal___ = preHookFunc(iter);
@@ -37267,6 +38556,7 @@ struct block_list* HP_mapit_next(struct s_mapiterator *iter) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_mapit_next_pre ) {
struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapit_next_pre[hIndex].func;
retVal___ = preHookFunc(iter);
@@ -37293,6 +38583,7 @@ struct block_list* HP_mapit_prev(struct s_mapiterator *iter) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_mapit_prev_pre ) {
struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapit_prev_pre[hIndex].func;
retVal___ = preHookFunc(iter);
@@ -37319,6 +38610,7 @@ bool HP_mapit_exists(struct s_mapiterator *iter) {
bool retVal___ = false;
if( HPMHooks.count.HP_mapit_exists_pre ) {
bool (*preHookFunc) (struct s_mapiterator *iter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapit_exists_pre[hIndex].func;
retVal___ = preHookFunc(iter);
@@ -37345,6 +38637,7 @@ void HP_mapreg_init(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mapreg_init_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_init_pre[hIndex].func;
preHookFunc();
@@ -37370,6 +38663,7 @@ void HP_mapreg_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mapreg_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_final_pre[hIndex].func;
preHookFunc();
@@ -37396,6 +38690,7 @@ int HP_mapreg_readreg(int64 uid) {
int retVal___ = 0;
if( HPMHooks.count.HP_mapreg_readreg_pre ) {
int (*preHookFunc) (int64 *uid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_readreg_pre[hIndex].func;
retVal___ = preHookFunc(&uid);
@@ -37422,6 +38717,7 @@ char* HP_mapreg_readregstr(int64 uid) {
char* retVal___ = NULL;
if( HPMHooks.count.HP_mapreg_readregstr_pre ) {
char* (*preHookFunc) (int64 *uid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_readregstr_pre[hIndex].func;
retVal___ = preHookFunc(&uid);
@@ -37448,6 +38744,7 @@ bool HP_mapreg_setreg(int64 uid, int val) {
bool retVal___ = false;
if( HPMHooks.count.HP_mapreg_setreg_pre ) {
bool (*preHookFunc) (int64 *uid, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_setreg_pre[hIndex].func;
retVal___ = preHookFunc(&uid, &val);
@@ -37474,6 +38771,7 @@ bool HP_mapreg_setregstr(int64 uid, const char *str) {
bool retVal___ = false;
if( HPMHooks.count.HP_mapreg_setregstr_pre ) {
bool (*preHookFunc) (int64 *uid, const char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_setregstr_pre[hIndex].func;
retVal___ = preHookFunc(&uid, str);
@@ -37499,6 +38797,7 @@ void HP_mapreg_load(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mapreg_load_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_load_pre[hIndex].func;
preHookFunc();
@@ -37524,6 +38823,7 @@ void HP_mapreg_save(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mapreg_save_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_save_pre[hIndex].func;
preHookFunc();
@@ -37550,6 +38850,7 @@ int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mapreg_save_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_save_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -37576,6 +38877,7 @@ int HP_mapreg_destroyreg(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mapreg_destroyreg_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mapreg_destroyreg_pre[hIndex].func;
@@ -37607,6 +38909,7 @@ void HP_mapreg_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mapreg_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_reload_pre[hIndex].func;
preHookFunc();
@@ -37633,6 +38936,7 @@ bool HP_mapreg_config_read(const char *w1, const char *w2) {
bool retVal___ = false;
if( HPMHooks.count.HP_mapreg_config_read_pre ) {
bool (*preHookFunc) (const char *w1, const char *w2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func;
retVal___ = preHookFunc(w1, w2);
@@ -37659,6 +38963,7 @@ void HP_mercenary_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_mercenary_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -37685,6 +38990,7 @@ bool HP_mercenary_class(int class_) {
bool retVal___ = false;
if( HPMHooks.count.HP_mercenary_class_pre ) {
bool (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_class_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -37711,6 +39017,7 @@ struct view_data* HP_mercenary_get_viewdata(int class_) {
struct view_data* retVal___ = NULL;
if( HPMHooks.count.HP_mercenary_get_viewdata_pre ) {
struct view_data* (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -37737,6 +39044,7 @@ int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int li
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_create_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_create_pre[hIndex].func;
retVal___ = preHookFunc(sd, &class_, &lifetime);
@@ -37763,6 +39071,7 @@ int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_data_received_pre ) {
int (*preHookFunc) (struct s_mercenary *merc, bool *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_data_received_pre[hIndex].func;
retVal___ = preHookFunc(merc, &flag);
@@ -37789,6 +39098,7 @@ int HP_mercenary_save(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_save_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_save_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -37814,6 +39124,7 @@ void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) {
int hIndex = 0;
if( HPMHooks.count.HP_mercenary_heal_pre ) {
void (*preHookFunc) (struct mercenary_data *md, int *hp, int *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_heal_pre[hIndex].func;
preHookFunc(md, &hp, &sp);
@@ -37840,6 +39151,7 @@ int HP_mercenary_dead(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_dead_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_dead_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -37866,6 +39178,7 @@ int HP_mercenary_delete(struct mercenary_data *md, int reply) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_delete_pre ) {
int (*preHookFunc) (struct mercenary_data *md, int *reply);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_delete_pre[hIndex].func;
retVal___ = preHookFunc(md, &reply);
@@ -37891,6 +39204,7 @@ void HP_mercenary_contract_stop(struct mercenary_data *md) {
int hIndex = 0;
if( HPMHooks.count.HP_mercenary_contract_stop_pre ) {
void (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_contract_stop_pre[hIndex].func;
preHookFunc(md);
@@ -37917,6 +39231,7 @@ int HP_mercenary_get_lifetime(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_get_lifetime_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -37943,6 +39258,7 @@ int HP_mercenary_get_guild(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_get_guild_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_get_guild_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -37969,6 +39285,7 @@ int HP_mercenary_get_faith(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_get_faith_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_get_faith_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -37995,6 +39312,7 @@ int HP_mercenary_set_faith(struct mercenary_data *md, int value) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_set_faith_pre ) {
int (*preHookFunc) (struct mercenary_data *md, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_set_faith_pre[hIndex].func;
retVal___ = preHookFunc(md, &value);
@@ -38021,6 +39339,7 @@ int HP_mercenary_get_calls(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_get_calls_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_get_calls_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -38047,6 +39366,7 @@ int HP_mercenary_set_calls(struct mercenary_data *md, int value) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_set_calls_pre ) {
int (*preHookFunc) (struct mercenary_data *md, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_set_calls_pre[hIndex].func;
retVal___ = preHookFunc(md, &value);
@@ -38073,6 +39393,7 @@ int HP_mercenary_kills(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_kills_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_kills_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -38099,6 +39420,7 @@ int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_checkskill_pre ) {
int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_checkskill_pre[hIndex].func;
retVal___ = preHookFunc(md, &skill_id);
@@ -38125,6 +39447,7 @@ int HP_mercenary_read_db(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_read_db_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_read_db_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -38151,6 +39474,7 @@ int HP_mercenary_read_skilldb(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_read_skilldb_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -38177,6 +39501,7 @@ int HP_mercenary_killbonus(struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_killbonus_pre ) {
int (*preHookFunc) (struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_killbonus_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -38203,6 +39528,7 @@ int HP_mercenary_search_index(int class_) {
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_search_index_pre ) {
int (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_search_index_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -38229,6 +39555,7 @@ int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data)
int retVal___ = 0;
if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -38255,6 +39582,7 @@ bool HP_mercenary_read_db_sub(char *str[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_mercenary_read_db_sub_pre ) {
bool (*preHookFunc) (char *str[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_pre[hIndex].func;
retVal___ = preHookFunc(str, &columns, &current);
@@ -38281,6 +39609,7 @@ bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_mercenary_read_skill_db_sub_pre ) {
bool (*preHookFunc) (char *str[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_pre[hIndex].func;
retVal___ = preHookFunc(str, &columns, &current);
@@ -38308,6 +39637,7 @@ int HP_mob_init(bool mimimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_init_pre ) {
int (*preHookFunc) (bool *mimimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_init_pre[hIndex].func;
retVal___ = preHookFunc(&mimimal);
@@ -38334,6 +39664,7 @@ int HP_mob_final(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_final_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_final_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -38359,6 +39690,7 @@ void HP_mob_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_reload_pre[hIndex].func;
preHookFunc();
@@ -38385,6 +39717,7 @@ struct mob_db* HP_mob_db(int index) {
struct mob_db* retVal___ = NULL;
if( HPMHooks.count.HP_mob_db_pre ) {
struct mob_db* (*preHookFunc) (int *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_db_pre[hIndex].func;
retVal___ = preHookFunc(&index);
@@ -38411,6 +39744,7 @@ struct mob_chat* HP_mob_chat(short id) {
struct mob_chat* retVal___ = NULL;
if( HPMHooks.count.HP_mob_chat_pre ) {
struct mob_chat* (*preHookFunc) (short *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_chat_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -38437,6 +39771,7 @@ int HP_mob_makedummymobdb(int p1) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_makedummymobdb_pre ) {
int (*preHookFunc) (int *p1);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_makedummymobdb_pre[hIndex].func;
retVal___ = preHookFunc(&p1);
@@ -38463,6 +39798,7 @@ int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -38489,6 +39825,7 @@ int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_skill_id2skill_idx_pre ) {
int (*preHookFunc) (int *class_, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_pre[hIndex].func;
retVal___ = preHookFunc(&class_, &skill_id);
@@ -38515,6 +39852,7 @@ int HP_mob_db_searchname(const char *str) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_db_searchname_pre ) {
int (*preHookFunc) (const char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_db_searchname_pre[hIndex].func;
retVal___ = preHookFunc(str);
@@ -38541,6 +39879,7 @@ int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int
int retVal___ = 0;
if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) {
int (*preHookFunc) (struct mob_db *monster, const char *str, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_pre[hIndex].func;
retVal___ = preHookFunc(monster, str, &flag);
@@ -38566,6 +39905,7 @@ void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_mvptomb_create_pre ) {
void (*preHookFunc) (struct mob_data *md, char *killer, time_t *time);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_mvptomb_create_pre[hIndex].func;
preHookFunc(md, killer, &time);
@@ -38591,6 +39931,7 @@ void HP_mob_mvptomb_destroy(struct mob_data *md) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_mvptomb_destroy_pre ) {
void (*preHookFunc) (struct mob_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_pre[hIndex].func;
preHookFunc(md);
@@ -38617,6 +39958,7 @@ int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str,
int retVal___ = 0;
if( HPMHooks.count.HP_mob_db_searchname_array_pre ) {
int (*preHookFunc) (struct mob_db **data, int *size, const char *str, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_pre[hIndex].func;
retVal___ = preHookFunc(data, &size, str, &flag);
@@ -38643,6 +39985,7 @@ int HP_mob_db_checkid(const int id) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_db_checkid_pre ) {
int (*preHookFunc) (const int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_db_checkid_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -38669,6 +40012,7 @@ struct view_data* HP_mob_get_viewdata(int class_) {
struct view_data* retVal___ = NULL;
if( HPMHooks.count.HP_mob_get_viewdata_pre ) {
struct view_data* (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_get_viewdata_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -38695,6 +40039,7 @@ int HP_mob_parse_dataset(struct spawn_data *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_parse_dataset_pre ) {
int (*preHookFunc) (struct spawn_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_parse_dataset_pre[hIndex].func;
retVal___ = preHookFunc(data);
@@ -38721,6 +40066,7 @@ struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) {
struct mob_data* retVal___ = NULL;
if( HPMHooks.count.HP_mob_spawn_dataset_pre ) {
struct mob_data* (*preHookFunc) (struct spawn_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_spawn_dataset_pre[hIndex].func;
retVal___ = preHookFunc(data);
@@ -38747,6 +40093,7 @@ int HP_mob_get_random_id(int type, int flag, int lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_get_random_id_pre ) {
int (*preHookFunc) (int *type, int *flag, int *lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_get_random_id_pre[hIndex].func;
retVal___ = preHookFunc(&type, &flag, &lv);
@@ -38773,6 +40120,7 @@ bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_ksprotected_pre ) {
bool (*preHookFunc) (struct block_list *src, struct block_list *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ksprotected_pre[hIndex].func;
retVal___ = preHookFunc(src, target);
@@ -38799,6 +40147,7 @@ struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x,
struct mob_data* retVal___ = NULL;
if( HPMHooks.count.HP_mob_once_spawn_sub_pre ) {
struct mob_data* (*preHookFunc) (struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_pre[hIndex].func;
retVal___ = preHookFunc(bl, &m, &x, &y, mobname, &class_, event, &size, &ai);
@@ -38825,6 +40174,7 @@ int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, co
int retVal___ = 0;
if( HPMHooks.count.HP_mob_once_spawn_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_once_spawn_pre[hIndex].func;
retVal___ = preHookFunc(sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai);
@@ -38851,6 +40201,7 @@ int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16
int retVal___ = 0;
if( HPMHooks.count.HP_mob_once_spawn_area_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_once_spawn_area_pre[hIndex].func;
retVal___ = preHookFunc(sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai);
@@ -38877,6 +40228,7 @@ int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mob
int retVal___ = 0;
if( HPMHooks.count.HP_mob_spawn_guardian_pre ) {
int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_pre[hIndex].func;
retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &guardian, &has_index);
@@ -38903,6 +40255,7 @@ int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname,
int retVal___ = 0;
if( HPMHooks.count.HP_mob_spawn_bg_pre ) {
int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_spawn_bg_pre[hIndex].func;
retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &bg_id);
@@ -38929,6 +40282,7 @@ int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int
int retVal___ = 0;
if( HPMHooks.count.HP_mob_can_reach_pre ) {
int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *range, int *state);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_can_reach_pre[hIndex].func;
retVal___ = preHookFunc(md, bl, &range, &state);
@@ -38955,6 +40309,7 @@ int HP_mob_linksearch(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_linksearch_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_linksearch_pre[hIndex].func;
@@ -38987,6 +40342,7 @@ int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_delayspawn_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_delayspawn_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39013,6 +40369,7 @@ int HP_mob_setdelayspawn(struct mob_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_setdelayspawn_pre ) {
int (*preHookFunc) (struct mob_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_setdelayspawn_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -39039,6 +40396,7 @@ int HP_mob_count_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_count_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_count_sub_pre[hIndex].func;
@@ -39071,6 +40429,7 @@ int HP_mob_spawn(struct mob_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_spawn_pre ) {
int (*preHookFunc) (struct mob_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_spawn_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -39097,6 +40456,7 @@ int HP_mob_can_changetarget(struct mob_data *md, struct block_list *target, int
int retVal___ = 0;
if( HPMHooks.count.HP_mob_can_changetarget_pre ) {
int (*preHookFunc) (struct mob_data *md, struct block_list *target, int *mode);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_can_changetarget_pre[hIndex].func;
retVal___ = preHookFunc(md, target, &mode);
@@ -39123,6 +40483,7 @@ int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_target_pre ) {
int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *dist);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_target_pre[hIndex].func;
retVal___ = preHookFunc(md, bl, &dist);
@@ -39149,6 +40510,7 @@ int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_pre[hIndex].func;
@@ -39181,6 +40543,7 @@ int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_pre[hIndex].func;
@@ -39213,6 +40576,7 @@ int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_pre[hIndex].func;
@@ -39245,6 +40609,7 @@ int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_pre[hIndex].func;
@@ -39277,6 +40642,7 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_warpchase_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_warpchase_sub_pre[hIndex].func;
@@ -39309,6 +40675,7 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) {
int (*preHookFunc) (struct mob_data *md, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -39335,6 +40702,7 @@ int HP_mob_unlocktarget(struct mob_data *md, int64 tick) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_unlocktarget_pre ) {
int (*preHookFunc) (struct mob_data *md, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_unlocktarget_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -39361,6 +40729,7 @@ int HP_mob_randomwalk(struct mob_data *md, int64 tick) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_randomwalk_pre ) {
int (*preHookFunc) (struct mob_data *md, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_randomwalk_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -39387,6 +40756,7 @@ int HP_mob_warpchase(struct mob_data *md, struct block_list *target) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_warpchase_pre ) {
int (*preHookFunc) (struct mob_data *md, struct block_list *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_warpchase_pre[hIndex].func;
retVal___ = preHookFunc(md, target);
@@ -39413,6 +40783,7 @@ bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) {
bool (*preHookFunc) (struct mob_data *md, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick);
@@ -39439,6 +40810,7 @@ int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_hard_timer_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_pre[hIndex].func;
@@ -39471,6 +40843,7 @@ int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_foreachclient_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_pre[hIndex].func;
@@ -39503,6 +40876,7 @@ int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_sub_lazy_pre ) {
int (*preHookFunc) (struct mob_data *md, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_pre[hIndex].func;
@@ -39535,6 +40909,7 @@ int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_lazy_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_lazy_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39561,6 +40936,7 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_ai_hard_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_ai_hard_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39587,6 +40963,7 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data
struct item_drop* retVal___ = NULL;
if( HPMHooks.count.HP_mob_setdropitem_pre ) {
struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func;
retVal___ = preHookFunc(&nameid, &qty, data);
@@ -39613,6 +40990,7 @@ struct item_drop* HP_mob_setlootitem(struct item *item) {
struct item_drop* retVal___ = NULL;
if( HPMHooks.count.HP_mob_setlootitem_pre ) {
struct item_drop* (*preHookFunc) (struct item *item);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_setlootitem_pre[hIndex].func;
retVal___ = preHookFunc(item);
@@ -39639,6 +41017,7 @@ int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_delay_item_drop_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_delay_item_drop_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39664,6 +41043,7 @@ void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct
int hIndex = 0;
if( HPMHooks.count.HP_mob_item_drop_pre ) {
void (*preHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_item_drop_pre[hIndex].func;
preHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag);
@@ -39690,6 +41070,7 @@ int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_timer_delete_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_timer_delete_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39716,6 +41097,7 @@ int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_deleteslave_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_pre[hIndex].func;
@@ -39748,6 +41130,7 @@ int HP_mob_deleteslave(struct mob_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_deleteslave_pre ) {
int (*preHookFunc) (struct mob_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_deleteslave_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -39774,6 +41157,7 @@ int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_respawn_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_respawn_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -39799,6 +41183,7 @@ void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
int hIndex = 0;
if( HPMHooks.count.HP_mob_log_damage_pre ) {
void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_log_damage_pre[hIndex].func;
preHookFunc(md, src, &damage);
@@ -39824,6 +41209,7 @@ void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_damage_pre ) {
void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_damage_pre[hIndex].func;
preHookFunc(md, src, &damage);
@@ -39850,6 +41236,7 @@ int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_dead_pre ) {
int (*preHookFunc) (struct mob_data *md, struct block_list *src, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_dead_pre[hIndex].func;
retVal___ = preHookFunc(md, src, &type);
@@ -39875,6 +41262,7 @@ void HP_mob_revive(struct mob_data *md, unsigned int hp) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_revive_pre ) {
void (*preHookFunc) (struct mob_data *md, unsigned int *hp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_revive_pre[hIndex].func;
preHookFunc(md, &hp);
@@ -39901,6 +41289,7 @@ int HP_mob_guardian_guildchange(struct mob_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_guardian_guildchange_pre ) {
int (*preHookFunc) (struct mob_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -39927,6 +41316,7 @@ int HP_mob_random_class(int *value, size_t count) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_random_class_pre ) {
int (*preHookFunc) (int *value, size_t *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_random_class_pre[hIndex].func;
retVal___ = preHookFunc(value, &count);
@@ -39953,6 +41343,7 @@ int HP_mob_class_change(struct mob_data *md, int class_) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_class_change_pre ) {
int (*preHookFunc) (struct mob_data *md, int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_class_change_pre[hIndex].func;
retVal___ = preHookFunc(md, &class_);
@@ -39978,6 +41369,7 @@ void HP_mob_heal(struct mob_data *md, unsigned int heal) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_heal_pre ) {
void (*preHookFunc) (struct mob_data *md, unsigned int *heal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_heal_pre[hIndex].func;
preHookFunc(md, &heal);
@@ -40004,6 +41396,7 @@ int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_warpslave_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_warpslave_sub_pre[hIndex].func;
@@ -40036,6 +41429,7 @@ int HP_mob_warpslave(struct block_list *bl, int range) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_warpslave_pre ) {
int (*preHookFunc) (struct block_list *bl, int *range);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_warpslave_pre[hIndex].func;
retVal___ = preHookFunc(bl, &range);
@@ -40062,6 +41456,7 @@ int HP_mob_countslave_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_countslave_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_countslave_sub_pre[hIndex].func;
@@ -40094,6 +41489,7 @@ int HP_mob_countslave(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_countslave_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_countslave_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -40120,6 +41516,7 @@ int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skil
int retVal___ = 0;
if( HPMHooks.count.HP_mob_summonslave_pre ) {
int (*preHookFunc) (struct mob_data *md2, int *value, int *amount, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_summonslave_pre[hIndex].func;
retVal___ = preHookFunc(md2, value, &amount, &skill_id);
@@ -40146,6 +41543,7 @@ int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_getfriendhprate_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_pre[hIndex].func;
@@ -40178,6 +41576,7 @@ struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_mob_getfriendhprate_pre ) {
struct block_list* (*preHookFunc) (struct mob_data *md, int *min_rate, int *max_rate);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_pre[hIndex].func;
retVal___ = preHookFunc(md, &min_rate, &max_rate);
@@ -40204,6 +41603,7 @@ struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) {
struct block_list* retVal___ = NULL;
if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre ) {
struct block_list* (*preHookFunc) (struct mob_data *md, int *rate);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_pre[hIndex].func;
retVal___ = preHookFunc(md, &rate);
@@ -40230,6 +41630,7 @@ int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_getfriendstatus_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_pre[hIndex].func;
@@ -40262,6 +41663,7 @@ struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond
struct mob_data* retVal___ = NULL;
if( HPMHooks.count.HP_mob_getfriendstatus_pre ) {
struct mob_data* (*preHookFunc) (struct mob_data *md, int *cond1, int *cond2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_pre[hIndex].func;
retVal___ = preHookFunc(md, &cond1, &cond2);
@@ -40288,6 +41690,7 @@ int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_skill_use_pre ) {
int (*preHookFunc) (struct mob_data *md, int64 *tick, int *event);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_skill_use_pre[hIndex].func;
retVal___ = preHookFunc(md, &tick, &event);
@@ -40314,6 +41717,7 @@ int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick,
int retVal___ = 0;
if( HPMHooks.count.HP_mob_skill_event_pre ) {
int (*preHookFunc) (struct mob_data *md, struct block_list *src, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_skill_event_pre[hIndex].func;
retVal___ = preHookFunc(md, src, &tick, &flag);
@@ -40340,6 +41744,7 @@ int HP_mob_is_clone(int class_) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_is_clone_pre ) {
int (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_is_clone_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -40366,6 +41771,7 @@ int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, c
int retVal___ = 0;
if( HPMHooks.count.HP_mob_clone_spawn_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_clone_spawn_pre[hIndex].func;
retVal___ = preHookFunc(sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration);
@@ -40392,6 +41798,7 @@ int HP_mob_clone_delete(struct mob_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_clone_delete_pre ) {
int (*preHookFunc) (struct mob_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_clone_delete_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -40418,6 +41825,7 @@ unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short ra
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_mob_drop_adjust_pre ) {
unsigned int (*preHookFunc) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_drop_adjust_pre[hIndex].func;
retVal___ = preHookFunc(&baserate, &rate_adjust, &rate_min, &rate_max);
@@ -40443,6 +41851,7 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_item_dropratio_adjust_pre ) {
void (*preHookFunc) (int *nameid, int *mob_id, int *rate_adjust);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_pre[hIndex].func;
preHookFunc(&nameid, &mob_id, rate_adjust);
@@ -40469,6 +41878,7 @@ bool HP_mob_parse_dbrow(char **str) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_parse_dbrow_pre ) {
bool (*preHookFunc) (char **str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_parse_dbrow_pre[hIndex].func;
retVal___ = preHookFunc(str);
@@ -40495,6 +41905,7 @@ bool HP_mob_readdb_sub(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_readdb_sub_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_readdb_sub_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -40520,6 +41931,7 @@ void HP_mob_readdb(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_readdb_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_readdb_pre[hIndex].func;
preHookFunc();
@@ -40546,6 +41958,7 @@ int HP_mob_read_sqldb(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_read_sqldb_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_read_sqldb_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -40571,6 +41984,7 @@ void HP_mob_name_constants(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_name_constants_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_name_constants_pre[hIndex].func;
preHookFunc();
@@ -40597,6 +42011,7 @@ bool HP_mob_readdb_mobavail(char *str[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_readdb_mobavail_pre ) {
bool (*preHookFunc) (char *str[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_pre[hIndex].func;
retVal___ = preHookFunc(str, &columns, &current);
@@ -40623,6 +42038,7 @@ int HP_mob_read_randommonster(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_read_randommonster_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_read_randommonster_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -40649,6 +42065,7 @@ bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last
bool retVal___ = false;
if( HPMHooks.count.HP_mob_parse_row_chatdb_pre ) {
bool (*preHookFunc) (char **str, const char *source, int *line, int *last_msg_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_pre[hIndex].func;
retVal___ = preHookFunc(str, source, &line, last_msg_id);
@@ -40674,6 +42091,7 @@ void HP_mob_readchatdb(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_readchatdb_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_readchatdb_pre[hIndex].func;
preHookFunc();
@@ -40700,6 +42118,7 @@ bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_parse_row_mobskilldb_pre ) {
bool (*preHookFunc) (char **str, int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_pre[hIndex].func;
retVal___ = preHookFunc(str, &columns, &current);
@@ -40725,6 +42144,7 @@ void HP_mob_readskilldb(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_readskilldb_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_readskilldb_pre[hIndex].func;
preHookFunc();
@@ -40751,6 +42171,7 @@ int HP_mob_read_sqlskilldb(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_mob_read_sqlskilldb_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -40777,6 +42198,7 @@ bool HP_mob_readdb_race2(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_readdb_race2_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_readdb_race2_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -40803,6 +42225,7 @@ bool HP_mob_readdb_itemratio(char *str[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_mob_readdb_itemratio_pre ) {
bool (*preHookFunc) (char *str[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_pre[hIndex].func;
retVal___ = preHookFunc(str, &columns, &current);
@@ -40828,6 +42251,7 @@ void HP_mob_load(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_load_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_load_pre[hIndex].func;
preHookFunc(&minimal);
@@ -40853,6 +42277,7 @@ void HP_mob_clear_spawninfo(void) {
int hIndex = 0;
if( HPMHooks.count.HP_mob_clear_spawninfo_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_pre[hIndex].func;
preHookFunc();
@@ -40880,6 +42305,7 @@ int HP_npc_init(bool minimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_init_pre ) {
int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_init_pre[hIndex].func;
retVal___ = preHookFunc(&minimal);
@@ -40906,6 +42332,7 @@ int HP_npc_final(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_final_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_final_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -40932,6 +42359,7 @@ int HP_npc_get_new_npc_id(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_get_new_npc_id_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -40958,6 +42386,7 @@ struct view_data* HP_npc_get_viewdata(int class_) {
struct view_data* retVal___ = NULL;
if( HPMHooks.count.HP_npc_get_viewdata_pre ) {
struct view_data* (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_get_viewdata_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -40984,6 +42413,7 @@ int HP_npc_isnear_sub(struct block_list *bl, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_isnear_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_npc_isnear_sub_pre[hIndex].func;
@@ -41016,6 +42446,7 @@ bool HP_npc_isnear(struct block_list *bl) {
bool retVal___ = false;
if( HPMHooks.count.HP_npc_isnear_pre ) {
bool (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_isnear_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -41042,6 +42473,7 @@ int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_ontouch_event_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_ontouch_event_pre[hIndex].func;
retVal___ = preHookFunc(sd, nd);
@@ -41068,6 +42500,7 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_ontouch2_event_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_ontouch2_event_pre[hIndex].func;
retVal___ = preHookFunc(sd, nd);
@@ -41094,6 +42527,7 @@ int HP_npc_enable_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_enable_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_npc_enable_sub_pre[hIndex].func;
@@ -41126,6 +42560,7 @@ int HP_npc_enable(const char *name, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_enable_pre ) {
int (*preHookFunc) (const char *name, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_enable_pre[hIndex].func;
retVal___ = preHookFunc(name, &flag);
@@ -41152,6 +42587,7 @@ struct npc_data* HP_npc_name2id(const char *name) {
struct npc_data* retVal___ = NULL;
if( HPMHooks.count.HP_npc_name2id_pre ) {
struct npc_data* (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_name2id_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -41178,6 +42614,7 @@ int HP_npc_event_dequeue(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_dequeue_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_dequeue_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -41205,6 +42642,7 @@ DBData HP_npc_event_export_create(DBKey key, va_list args) {
memset(&retVal___, '\0', sizeof(DBData));
if( HPMHooks.count.HP_npc_event_export_create_pre ) {
DBData (*preHookFunc) (DBKey *key, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_npc_event_export_create_pre[hIndex].func;
@@ -41237,6 +42675,7 @@ int HP_npc_event_export(struct npc_data *nd, int i) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_export_pre ) {
int (*preHookFunc) (struct npc_data *nd, int *i);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_export_pre[hIndex].func;
retVal___ = preHookFunc(nd, &i);
@@ -41263,6 +42702,7 @@ int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const c
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_sub_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct event_data *ev, const char *eventname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_sub_pre[hIndex].func;
retVal___ = preHookFunc(sd, ev, eventname);
@@ -41288,6 +42728,7 @@ void HP_npc_event_doall_sub(void *key, void *data, va_list ap) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_event_doall_sub_pre ) {
void (*preHookFunc) (void *key, void *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_npc_event_doall_sub_pre[hIndex].func;
@@ -41320,6 +42761,7 @@ int HP_npc_event_do(const char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_do_pre ) {
int (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_do_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -41346,6 +42788,7 @@ int HP_npc_event_doall_id(const char *name, int rid) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_doall_id_pre ) {
int (*preHookFunc) (const char *name, int *rid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_doall_id_pre[hIndex].func;
retVal___ = preHookFunc(name, &rid);
@@ -41372,6 +42815,7 @@ int HP_npc_event_doall(const char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_doall_pre ) {
int (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_doall_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -41398,6 +42842,7 @@ int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_do_clock_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_do_clock_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -41419,13 +42864,14 @@ int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
-void HP_npc_event_do_oninit(void) {
+void HP_npc_event_do_oninit(bool reload) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_event_do_oninit_pre ) {
- void (*preHookFunc) (void);
+ void (*preHookFunc) (bool *reload);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_do_oninit_pre[hIndex].func;
- preHookFunc();
+ preHookFunc(&reload);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -41433,13 +42879,13 @@ void HP_npc_event_do_oninit(void) {
}
}
{
- HPMHooks.source.npc.event_do_oninit();
+ HPMHooks.source.npc.event_do_oninit(reload);
}
if( HPMHooks.count.HP_npc_event_do_oninit_post ) {
- void (*postHookFunc) (void);
+ void (*postHookFunc) (bool *reload);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_event_do_oninit_post[hIndex].func;
- postHookFunc();
+ postHookFunc(&reload);
}
}
return;
@@ -41449,6 +42895,7 @@ int HP_npc_timerevent_export(struct npc_data *nd, int i) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_timerevent_export_pre ) {
int (*preHookFunc) (struct npc_data *nd, int *i);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_timerevent_export_pre[hIndex].func;
retVal___ = preHookFunc(nd, &i);
@@ -41475,6 +42922,7 @@ int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_timerevent_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_timerevent_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -41501,6 +42949,7 @@ int HP_npc_timerevent_start(struct npc_data *nd, int rid) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_timerevent_start_pre ) {
int (*preHookFunc) (struct npc_data *nd, int *rid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_timerevent_start_pre[hIndex].func;
retVal___ = preHookFunc(nd, &rid);
@@ -41527,6 +42976,7 @@ int HP_npc_timerevent_stop(struct npc_data *nd) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_timerevent_stop_pre ) {
int (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_timerevent_stop_pre[hIndex].func;
retVal___ = preHookFunc(nd);
@@ -41552,6 +43002,7 @@ void HP_npc_timerevent_quit(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_timerevent_quit_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_timerevent_quit_pre[hIndex].func;
preHookFunc(sd);
@@ -41578,6 +43029,7 @@ int64 HP_npc_gettimerevent_tick(struct npc_data *nd) {
int64 retVal___ = 0;
if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) {
int64 (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_pre[hIndex].func;
retVal___ = preHookFunc(nd);
@@ -41604,6 +43056,7 @@ int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_settimerevent_tick_pre ) {
int (*preHookFunc) (struct npc_data *nd, int *newtimer);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_pre[hIndex].func;
retVal___ = preHookFunc(nd, &newtimer);
@@ -41630,6 +43083,7 @@ int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch
int retVal___ = 0;
if( HPMHooks.count.HP_npc_event_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const char *eventname, int *ontouch);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_event_pre[hIndex].func;
retVal___ = preHookFunc(sd, eventname, &ontouch);
@@ -41656,6 +43110,7 @@ int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_touch_areanpc_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_pre[hIndex].func;
@@ -41688,6 +43143,7 @@ int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_touchnext_areanpc_pre ) {
int (*preHookFunc) (struct map_session_data *sd, bool *leavemap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_pre[hIndex].func;
retVal___ = preHookFunc(sd, &leavemap);
@@ -41714,6 +43170,7 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y)
int retVal___ = 0;
if( HPMHooks.count.HP_npc_touch_areanpc_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_pre[hIndex].func;
retVal___ = preHookFunc(sd, &m, &x, &y);
@@ -41740,6 +43197,7 @@ int HP_npc_touch_areanpc2(struct mob_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_touch_areanpc2_pre ) {
int (*preHookFunc) (struct mob_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_pre[hIndex].func;
retVal___ = preHookFunc(md);
@@ -41766,6 +43224,7 @@ int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_check_areanpc_pre ) {
int (*preHookFunc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_check_areanpc_pre[hIndex].func;
retVal___ = preHookFunc(&flag, &m, &x, &y, &range);
@@ -41792,6 +43251,7 @@ struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list
struct npc_data* retVal___ = NULL;
if( HPMHooks.count.HP_npc_checknear_pre ) {
struct npc_data* (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_checknear_pre[hIndex].func;
retVal___ = preHookFunc(sd, bl);
@@ -41818,6 +43278,7 @@ int HP_npc_globalmessage(const char *name, const char *mes) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_globalmessage_pre ) {
int (*preHookFunc) (const char *name, const char *mes);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_globalmessage_pre[hIndex].func;
retVal___ = preHookFunc(name, mes);
@@ -41843,6 +43304,7 @@ void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_run_tomb_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_run_tomb_pre[hIndex].func;
preHookFunc(sd, nd);
@@ -41869,6 +43331,7 @@ int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_click_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_click_pre[hIndex].func;
retVal___ = preHookFunc(sd, nd);
@@ -41895,6 +43358,7 @@ int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_scriptcont_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *id, bool *closing);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_scriptcont_pre[hIndex].func;
retVal___ = preHookFunc(sd, &id, &closing);
@@ -41921,6 +43385,7 @@ int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_buysellsel_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *id, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_buysellsel_pre[hIndex].func;
retVal___ = preHookFunc(sd, &id, &type);
@@ -41947,6 +43412,7 @@ int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count,
int retVal___ = 0;
if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *points, int *count, unsigned short *item_list);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_pre[hIndex].func;
retVal___ = preHookFunc(sd, &points, &count, item_list);
@@ -41973,6 +43439,7 @@ int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_
int retVal___ = 0;
if( HPMHooks.count.HP_npc_buylist_sub_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_buylist_sub_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, item_list, nd);
@@ -41999,6 +43466,7 @@ int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int
int retVal___ = 0;
if( HPMHooks.count.HP_npc_cashshop_buy_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_cashshop_buy_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid, &amount, &points);
@@ -42025,6 +43493,7 @@ int HP_npc_buylist(struct map_session_data *sd, int n, unsigned short *item_list
int retVal___ = 0;
if( HPMHooks.count.HP_npc_buylist_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, item_list);
@@ -42051,6 +43520,7 @@ int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item
int retVal___ = 0;
if( HPMHooks.count.HP_npc_selllist_sub_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_selllist_sub_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, item_list, nd);
@@ -42077,6 +43547,7 @@ int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_lis
int retVal___ = 0;
if( HPMHooks.count.HP_npc_selllist_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, item_list);
@@ -42103,6 +43574,7 @@ int HP_npc_remove_map(struct npc_data *nd) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_remove_map_pre ) {
int (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_remove_map_pre[hIndex].func;
retVal___ = preHookFunc(nd);
@@ -42129,6 +43601,7 @@ int HP_npc_unload_ev(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_unload_ev_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_npc_unload_ev_pre[hIndex].func;
@@ -42161,6 +43634,7 @@ int HP_npc_unload_ev_label(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_unload_ev_label_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_npc_unload_ev_label_pre[hIndex].func;
@@ -42193,6 +43667,7 @@ int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_unload_dup_sub_pre ) {
int (*preHookFunc) (struct npc_data *nd, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_pre[hIndex].func;
@@ -42224,6 +43699,7 @@ void HP_npc_unload_duplicates(struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_unload_duplicates_pre ) {
void (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_unload_duplicates_pre[hIndex].func;
preHookFunc(nd);
@@ -42250,6 +43726,7 @@ int HP_npc_unload(struct npc_data *nd, bool single) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_unload_pre ) {
int (*preHookFunc) (struct npc_data *nd, bool *single);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_unload_pre[hIndex].func;
retVal___ = preHookFunc(nd, &single);
@@ -42275,6 +43752,7 @@ void HP_npc_clearsrcfile(void) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_clearsrcfile_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_clearsrcfile_pre[hIndex].func;
preHookFunc();
@@ -42300,6 +43778,7 @@ void HP_npc_addsrcfile(const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_addsrcfile_pre ) {
void (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_addsrcfile_pre[hIndex].func;
preHookFunc(name);
@@ -42325,6 +43804,7 @@ void HP_npc_delsrcfile(const char *name) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_delsrcfile_pre ) {
void (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_delsrcfile_pre[hIndex].func;
preHookFunc(name);
@@ -42350,6 +43830,7 @@ void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start,
int hIndex = 0;
if( HPMHooks.count.HP_npc_parsename_pre ) {
void (*preHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parsename_pre[hIndex].func;
preHookFunc(nd, name, start, buffer, filepath);
@@ -42376,6 +43857,7 @@ int HP_npc_parseview(const char *w4, const char *start, const char *buffer, cons
int retVal___ = 0;
if( HPMHooks.count.HP_npc_parseview_pre ) {
int (*preHookFunc) (const char *w4, const char *start, const char *buffer, const char *filepath);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parseview_pre[hIndex].func;
retVal___ = preHookFunc(w4, start, buffer, filepath);
@@ -42402,6 +43884,7 @@ bool HP_npc_viewisid(const char *viewid) {
bool retVal___ = false;
if( HPMHooks.count.HP_npc_viewisid_pre ) {
bool (*preHookFunc) (const char *viewid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_viewisid_pre[hIndex].func;
retVal___ = preHookFunc(viewid);
@@ -42428,6 +43911,7 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho
struct npc_data* retVal___ = NULL;
if( HPMHooks.count.HP_npc_add_warp_pre ) {
struct npc_data* (*preHookFunc) (char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_add_warp_pre[hIndex].func;
retVal___ = preHookFunc(name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y);
@@ -42449,14 +43933,15 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho
}
return retVal___;
}
-const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_warp_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_warp_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42464,25 +43949,26 @@ const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char
}
}
{
- retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_warp_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_warp_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
}
}
return retVal___;
}
-const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_shop_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_shop_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42490,13 +43976,13 @@ const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char
}
}
{
- retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_shop_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_shop_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
}
}
return retVal___;
@@ -42505,6 +43991,7 @@ void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filep
int hIndex = 0;
if( HPMHooks.count.HP_npc_convertlabel_db_pre ) {
void (*preHookFunc) (struct npc_label_list *label_list, const char *filepath);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_convertlabel_db_pre[hIndex].func;
preHookFunc(label_list, filepath);
@@ -42526,14 +44013,15 @@ void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filep
}
return;
}
-const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_skip_script_pre ) {
- const char* (*preHookFunc) (const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (const char *start, const char *buffer, const char *filepath, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_skip_script_pre[hIndex].func;
- retVal___ = preHookFunc(start, buffer, filepath);
+ retVal___ = preHookFunc(start, buffer, filepath, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42541,25 +44029,26 @@ const char* HP_npc_skip_script(const char *start, const char *buffer, const char
}
}
{
- retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_skip_script_post ) {
- const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_skip_script_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, start, buffer, filepath, retval);
}
}
return retVal___;
}
-const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options) {
+const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_script_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_script_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42567,25 +44056,26 @@ const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const ch
}
}
{
- retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, options);
+ retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, options, retval);
}
if( HPMHooks.count.HP_npc_parse_script_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_script_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval);
}
}
return retVal___;
}
-const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_duplicate_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_duplicate_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42593,13 +44083,13 @@ const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const
}
}
{
- retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath, options, retval);
}
if( HPMHooks.count.HP_npc_parse_duplicate_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_duplicate_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval);
}
}
return retVal___;
@@ -42609,6 +44099,7 @@ int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_duplicate4instance_pre ) {
int (*preHookFunc) (struct npc_data *snd, int16 *m);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_duplicate4instance_pre[hIndex].func;
retVal___ = preHookFunc(snd, &m);
@@ -42634,6 +44125,7 @@ void HP_npc_setcells(struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_setcells_pre ) {
void (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_setcells_pre[hIndex].func;
preHookFunc(nd);
@@ -42660,6 +44152,7 @@ int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_unsetcells_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_pre[hIndex].func;
@@ -42691,6 +44184,7 @@ void HP_npc_unsetcells(struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_unsetcells_pre ) {
void (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_unsetcells_pre[hIndex].func;
preHookFunc(nd);
@@ -42716,6 +44210,7 @@ void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_movenpc_pre ) {
void (*preHookFunc) (struct npc_data *nd, int16 *x, int16 *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_movenpc_pre[hIndex].func;
preHookFunc(nd, &x, &y);
@@ -42741,6 +44236,7 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_setdisplayname_pre ) {
void (*preHookFunc) (struct npc_data *nd, const char *newname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_setdisplayname_pre[hIndex].func;
preHookFunc(nd, newname);
@@ -42766,6 +44262,7 @@ void HP_npc_setclass(struct npc_data *nd, short class_) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_setclass_pre ) {
void (*preHookFunc) (struct npc_data *nd, short *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func;
preHookFunc(nd, &class_);
@@ -42792,6 +44289,7 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons
int retVal___ = 0;
if( HPMHooks.count.HP_npc_do_atcmd_event_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const char *command, const char *message, const char *eventname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_pre[hIndex].func;
retVal___ = preHookFunc(sd, command, message, eventname);
@@ -42813,14 +44311,15 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons
}
return retVal___;
}
-const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_function_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_function_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42828,13 +44327,13 @@ const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const
}
}
{
- retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_function_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_function_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
}
}
return retVal___;
@@ -42843,6 +44342,7 @@ void HP_npc_parse_mob2(struct spawn_data *mobspawn) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_parse_mob2_pre ) {
void (*preHookFunc) (struct spawn_data *mobspawn);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_mob2_pre[hIndex].func;
preHookFunc(mobspawn);
@@ -42864,14 +44364,15 @@ void HP_npc_parse_mob2(struct spawn_data *mobspawn) {
}
return;
}
-const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_mob_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_mob_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42879,25 +44380,26 @@ const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char
}
}
{
- retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_mob_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_mob_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
}
}
return retVal___;
}
-const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_mapflag_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_mapflag_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42905,13 +44407,13 @@ const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const c
}
}
{
- retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_mapflag_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_mapflag_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
}
}
return retVal___;
@@ -42921,6 +44423,7 @@ int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_parsesrcfile_pre ) {
int (*preHookFunc) (const char *filepath, bool *runOnInit);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parsesrcfile_pre[hIndex].func;
retVal___ = preHookFunc(filepath, &runOnInit);
@@ -42947,6 +44450,7 @@ int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_script_event_pre ) {
int (*preHookFunc) (struct map_session_data *sd, enum npce_event *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_script_event_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -42972,6 +44476,7 @@ void HP_npc_read_event_script(void) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_read_event_script_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_read_event_script_pre[hIndex].func;
preHookFunc();
@@ -42998,6 +44503,7 @@ int HP_npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_path_db_clear_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_pre[hIndex].func;
@@ -43030,6 +44536,7 @@ int HP_npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_pre[hIndex].func;
@@ -43062,6 +44569,7 @@ int HP_npc_reload(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_reload_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_reload_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -43088,6 +44596,7 @@ bool HP_npc_unloadfile(const char *filepath) {
bool retVal___ = false;
if( HPMHooks.count.HP_npc_unloadfile_pre ) {
bool (*preHookFunc) (const char *filepath);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_unloadfile_pre[hIndex].func;
retVal___ = preHookFunc(filepath);
@@ -43113,6 +44622,7 @@ void HP_npc_do_clear_npc(void) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_do_clear_npc_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_do_clear_npc_pre[hIndex].func;
preHookFunc();
@@ -43138,6 +44648,7 @@ void HP_npc_debug_warps_sub(struct npc_data *nd) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_debug_warps_sub_pre ) {
void (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_pre[hIndex].func;
preHookFunc(nd);
@@ -43163,6 +44674,7 @@ void HP_npc_debug_warps(void) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_debug_warps_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_debug_warps_pre[hIndex].func;
preHookFunc();
@@ -43188,6 +44700,7 @@ void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd)
int hIndex = 0;
if( HPMHooks.count.HP_npc_trader_count_funds_pre ) {
void (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_trader_count_funds_pre[hIndex].func;
preHookFunc(nd, sd);
@@ -43214,6 +44727,7 @@ bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int pri
bool retVal___ = false;
if( HPMHooks.count.HP_npc_trader_pay_pre ) {
bool (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd, int *price, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_trader_pay_pre[hIndex].func;
retVal___ = preHookFunc(nd, sd, &price, &points);
@@ -43239,6 +44753,7 @@ void HP_npc_trader_update(int master) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_trader_update_pre ) {
void (*preHookFunc) (int *master);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_trader_update_pre[hIndex].func;
preHookFunc(&master);
@@ -43265,6 +44780,7 @@ int HP_npc_market_buylist(struct map_session_data *sd, unsigned short list_size,
int retVal___ = 0;
if( HPMHooks.count.HP_npc_market_buylist_pre ) {
int (*preHookFunc) (struct map_session_data *sd, unsigned short *list_size, struct packet_npc_market_purchase *p);
+ *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;
retVal___ = preHookFunc(sd, &list_size, p);
@@ -43291,6 +44807,7 @@ bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) {
bool retVal___ = false;
if( HPMHooks.count.HP_npc_trader_open_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_trader_open_pre[hIndex].func;
retVal___ = preHookFunc(sd, nd);
@@ -43316,6 +44833,7 @@ void HP_npc_market_fromsql(void) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_market_fromsql_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_market_fromsql_pre[hIndex].func;
preHookFunc();
@@ -43341,6 +44859,7 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_market_tosql_pre ) {
void (*preHookFunc) (struct npc_data *nd, unsigned short *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_market_tosql_pre[hIndex].func;
preHookFunc(nd, &index);
@@ -43366,6 +44885,7 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_market_delfromsql_pre ) {
void (*preHookFunc) (struct npc_data *nd, unsigned short *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_pre[hIndex].func;
preHookFunc(nd, &index);
@@ -43391,6 +44911,7 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_market_delfromsql_sub_pre ) {
void (*preHookFunc) (const char *npcname, unsigned short *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func;
preHookFunc(npcname, &index);
@@ -43417,6 +44938,7 @@ int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -43443,6 +44965,7 @@ void HP_party_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_party_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -43468,6 +44991,7 @@ void HP_party_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_party_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_final_pre[hIndex].func;
preHookFunc();
@@ -43494,6 +45018,7 @@ struct party_data* HP_party_search(int party_id) {
struct party_data* retVal___ = NULL;
if( HPMHooks.count.HP_party_search_pre ) {
struct party_data* (*preHookFunc) (int *party_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_search_pre[hIndex].func;
retVal___ = preHookFunc(&party_id);
@@ -43520,6 +45045,7 @@ struct party_data* HP_party_searchname(const char *str) {
struct party_data* retVal___ = NULL;
if( HPMHooks.count.HP_party_searchname_pre ) {
struct party_data* (*preHookFunc) (const char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_searchname_pre[hIndex].func;
retVal___ = preHookFunc(str);
@@ -43546,6 +45072,7 @@ int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_getmemberid_pre ) {
int (*preHookFunc) (struct party_data *p, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_getmemberid_pre[hIndex].func;
retVal___ = preHookFunc(p, sd);
@@ -43572,6 +45099,7 @@ struct map_session_data* HP_party_getavailablesd(struct party_data *p) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_party_getavailablesd_pre ) {
struct map_session_data* (*preHookFunc) (struct party_data *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_getavailablesd_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -43598,6 +45126,7 @@ int HP_party_create(struct map_session_data *sd, char *name, int item, int item2
int retVal___ = 0;
if( HPMHooks.count.HP_party_create_pre ) {
int (*preHookFunc) (struct map_session_data *sd, char *name, int *item, int *item2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_create_pre[hIndex].func;
retVal___ = preHookFunc(sd, name, &item, &item2);
@@ -43623,6 +45152,7 @@ void HP_party_created(int account_id, int char_id, int fail, int party_id, char
int hIndex = 0;
if( HPMHooks.count.HP_party_created_pre ) {
void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_created_pre[hIndex].func;
preHookFunc(&account_id, &char_id, &fail, &party_id, name);
@@ -43649,6 +45179,7 @@ int HP_party_request_info(int party_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_request_info_pre ) {
int (*preHookFunc) (int *party_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_request_info_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &char_id);
@@ -43675,6 +45206,7 @@ int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_invite_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_invite_pre[hIndex].func;
retVal___ = preHookFunc(sd, tsd);
@@ -43700,6 +45232,7 @@ void HP_party_member_joined(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_party_member_joined_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_member_joined_pre[hIndex].func;
preHookFunc(sd);
@@ -43726,6 +45259,7 @@ int HP_party_member_added(int party_id, int account_id, int char_id, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_member_added_pre ) {
int (*preHookFunc) (int *party_id, int *account_id, int *char_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_member_added_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &char_id, &flag);
@@ -43752,6 +45286,7 @@ int HP_party_leave(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_leave_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_leave_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -43778,6 +45313,7 @@ int HP_party_removemember(struct map_session_data *sd, int account_id, char *nam
int retVal___ = 0;
if( HPMHooks.count.HP_party_removemember_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *account_id, char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_removemember_pre[hIndex].func;
retVal___ = preHookFunc(sd, &account_id, name);
@@ -43804,6 +45340,7 @@ int HP_party_member_withdraw(int party_id, int account_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_member_withdraw_pre ) {
int (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_member_withdraw_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &char_id);
@@ -43829,6 +45366,7 @@ void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag)
int hIndex = 0;
if( HPMHooks.count.HP_party_reply_invite_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *party_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_reply_invite_pre[hIndex].func;
preHookFunc(sd, &party_id, &flag);
@@ -43855,6 +45393,7 @@ int HP_party_recv_noinfo(int party_id, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_recv_noinfo_pre ) {
int (*preHookFunc) (int *party_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_recv_noinfo_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &char_id);
@@ -43881,6 +45420,7 @@ int HP_party_recv_info(struct party *sp, int char_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_recv_info_pre ) {
int (*preHookFunc) (struct party *sp, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_recv_info_pre[hIndex].func;
retVal___ = preHookFunc(sp, &char_id);
@@ -43907,6 +45447,7 @@ int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned sh
int retVal___ = 0;
if( HPMHooks.count.HP_party_recv_movemap_pre ) {
int (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_recv_movemap_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &char_id, &mapid, &online, &lv);
@@ -43933,6 +45474,7 @@ int HP_party_broken(int party_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_broken_pre ) {
int (*preHookFunc) (int *party_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_broken_pre[hIndex].func;
retVal___ = preHookFunc(&party_id);
@@ -43959,6 +45501,7 @@ int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int
int retVal___ = 0;
if( HPMHooks.count.HP_party_optionchanged_pre ) {
int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_optionchanged_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &exp, &item, &flag);
@@ -43985,6 +45528,7 @@ int HP_party_changeoption(struct map_session_data *sd, int exp, int item) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_changeoption_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *exp, int *item);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_changeoption_pre[hIndex].func;
retVal___ = preHookFunc(sd, &exp, &item);
@@ -44011,6 +45555,7 @@ bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data
bool retVal___ = false;
if( HPMHooks.count.HP_party_changeleader_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, struct map_session_data *t_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_changeleader_pre[hIndex].func;
retVal___ = preHookFunc(sd, t_sd);
@@ -44036,6 +45581,7 @@ void HP_party_send_movemap(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_party_send_movemap_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_movemap_pre[hIndex].func;
preHookFunc(sd);
@@ -44061,6 +45607,7 @@ void HP_party_send_levelup(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_party_send_levelup_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_levelup_pre[hIndex].func;
preHookFunc(sd);
@@ -44087,6 +45634,7 @@ int HP_party_send_logout(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_send_logout_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_logout_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -44113,6 +45661,7 @@ int HP_party_send_message(struct map_session_data *sd, const char *mes, int len)
int retVal___ = 0;
if( HPMHooks.count.HP_party_send_message_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_message_pre[hIndex].func;
retVal___ = preHookFunc(sd, mes, &len);
@@ -44139,6 +45688,7 @@ int HP_party_recv_message(int party_id, int account_id, const char *mes, int len
int retVal___ = 0;
if( HPMHooks.count.HP_party_recv_message_pre ) {
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);
@@ -44165,6 +45715,7 @@ int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill
int retVal___ = 0;
if( HPMHooks.count.HP_party_skill_check_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_skill_check_pre[hIndex].func;
retVal___ = preHookFunc(sd, &party_id, &skill_id, &skill_lv);
@@ -44191,6 +45742,7 @@ int HP_party_send_xy_clear(struct party_data *p) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_send_xy_clear_pre ) {
int (*preHookFunc) (struct party_data *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_xy_clear_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -44217,6 +45769,7 @@ int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned in
int retVal___ = 0;
if( HPMHooks.count.HP_party_exp_share_pre ) {
int (*preHookFunc) (struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_exp_share_pre[hIndex].func;
retVal___ = preHookFunc(p, src, &base_exp, &job_exp, &zeny);
@@ -44243,6 +45796,7 @@ int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struc
int retVal___ = 0;
if( HPMHooks.count.HP_party_share_loot_pre ) {
int (*preHookFunc) (struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_share_loot_pre[hIndex].func;
retVal___ = preHookFunc(p, sd, item_data, &first_charid);
@@ -44269,6 +45823,7 @@ int HP_party_send_dot_remove(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_send_dot_remove_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_dot_remove_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -44295,6 +45850,7 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_sub_count_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_party_sub_count_pre[hIndex].func;
@@ -44327,6 +45883,7 @@ int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_sub_count_chorus_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_party_sub_count_chorus_pre[hIndex].func;
@@ -44358,6 +45915,7 @@ void HP_party_booking_register(struct map_session_data *sd, short level, short m
int hIndex = 0;
if( HPMHooks.count.HP_party_booking_register_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_booking_register_pre[hIndex].func;
preHookFunc(sd, &level, &mapid, job);
@@ -44383,6 +45941,7 @@ void HP_party_booking_update(struct map_session_data *sd, short *job) {
int hIndex = 0;
if( HPMHooks.count.HP_party_booking_update_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *job);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_booking_update_pre[hIndex].func;
preHookFunc(sd, job);
@@ -44408,6 +45967,7 @@ void HP_party_booking_search(struct map_session_data *sd, short level, short map
int hIndex = 0;
if( HPMHooks.count.HP_party_booking_search_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_booking_search_pre[hIndex].func;
preHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount);
@@ -44433,6 +45993,7 @@ void HP_party_recruit_register(struct map_session_data *sd, short level, const c
int hIndex = 0;
if( HPMHooks.count.HP_party_recruit_register_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_recruit_register_pre[hIndex].func;
preHookFunc(sd, &level, notice);
@@ -44458,6 +46019,7 @@ void HP_party_recruit_update(struct map_session_data *sd, const char *notice) {
int hIndex = 0;
if( HPMHooks.count.HP_party_recruit_update_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *notice);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_recruit_update_pre[hIndex].func;
preHookFunc(sd, notice);
@@ -44483,6 +46045,7 @@ void HP_party_recruit_search(struct map_session_data *sd, short level, short map
int hIndex = 0;
if( HPMHooks.count.HP_party_recruit_search_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_recruit_search_pre[hIndex].func;
preHookFunc(sd, &level, &mapid, &lastindex, &resultcount);
@@ -44509,6 +46072,7 @@ bool HP_party_booking_delete(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_party_booking_delete_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_booking_delete_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -44535,6 +46099,7 @@ int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struc
int retVal___ = 0;
if( HPMHooks.count.HP_party_vforeachsamemap_pre ) {
int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_party_vforeachsamemap_pre[hIndex].func;
@@ -44567,6 +46132,7 @@ int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_send_xy_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_send_xy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -44592,6 +46158,7 @@ void HP_party_fill_member(struct party_member *member, struct map_session_data *
int hIndex = 0;
if( HPMHooks.count.HP_party_fill_member_pre ) {
void (*preHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_fill_member_pre[hIndex].func;
preHookFunc(member, sd, &leader);
@@ -44618,6 +46185,7 @@ TBL_PC* HP_party_sd_check(int party_id, int account_id, int char_id) {
TBL_PC* retVal___ = NULL;
if( HPMHooks.count.HP_party_sd_check_pre ) {
TBL_PC* (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_sd_check_pre[hIndex].func;
retVal___ = preHookFunc(&party_id, &account_id, &char_id);
@@ -44643,6 +46211,7 @@ void HP_party_check_state(struct party_data *p) {
int hIndex = 0;
if( HPMHooks.count.HP_party_check_state_pre ) {
void (*preHookFunc) (struct party_data *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_check_state_pre[hIndex].func;
preHookFunc(p);
@@ -44669,6 +46238,7 @@ struct party_booking_ad_info* HP_party_create_booking_data(void) {
struct party_booking_ad_info* retVal___ = NULL;
if( HPMHooks.count.HP_party_create_booking_data_pre ) {
struct party_booking_ad_info* (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_party_create_booking_data_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -44695,6 +46265,7 @@ int HP_party_db_final(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_party_db_final_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_party_db_final_pre[hIndex].func;
@@ -44728,6 +46299,7 @@ int HP_path_blownpos(int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count)
int retVal___ = 0;
if( HPMHooks.count.HP_path_blownpos_pre ) {
int (*preHookFunc) (int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func;
retVal___ = preHookFunc(&m, &x0, &y0, &dx, &dy, &count);
@@ -44754,6 +46326,7 @@ bool HP_path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int1
bool retVal___ = false;
if( HPMHooks.count.HP_path_search_pre ) {
bool (*preHookFunc) (struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func;
retVal___ = preHookFunc(wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell);
@@ -44780,6 +46353,7 @@ bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0
bool retVal___ = false;
if( HPMHooks.count.HP_path_search_long_pre ) {
bool (*preHookFunc) (struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_path_search_long_pre[hIndex].func;
retVal___ = preHookFunc(spd, &m, &x0, &y0, &x1, &y1, &cell);
@@ -44806,6 +46380,7 @@ int HP_path_check_distance(int dx, int dy, int distance) {
int retVal___ = 0;
if( HPMHooks.count.HP_path_check_distance_pre ) {
int (*preHookFunc) (int *dx, int *dy, int *distance);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_path_check_distance_pre[hIndex].func;
retVal___ = preHookFunc(&dx, &dy, &distance);
@@ -44832,6 +46407,7 @@ unsigned int HP_path_distance(int dx, int dy) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_path_distance_pre ) {
unsigned int (*preHookFunc) (int *dx, int *dy);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_path_distance_pre[hIndex].func;
retVal___ = preHookFunc(&dx, &dy);
@@ -44858,6 +46434,7 @@ void HP_pcg_init(void) {
int hIndex = 0;
if( HPMHooks.count.HP_pcg_init_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_init_pre[hIndex].func;
preHookFunc();
@@ -44883,6 +46460,7 @@ void HP_pcg_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_pcg_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_final_pre[hIndex].func;
preHookFunc();
@@ -44908,6 +46486,7 @@ void HP_pcg_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_pcg_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_reload_pre[hIndex].func;
preHookFunc();
@@ -44934,6 +46513,7 @@ GroupSettings* HP_pcg_get_dummy_group(void) {
GroupSettings* retVal___ = NULL;
if( HPMHooks.count.HP_pcg_get_dummy_group_pre ) {
GroupSettings* (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -44960,6 +46540,7 @@ bool HP_pcg_exists(int group_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_pcg_exists_pre ) {
bool (*preHookFunc) (int *group_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_exists_pre[hIndex].func;
retVal___ = preHookFunc(&group_id);
@@ -44986,6 +46567,7 @@ GroupSettings* HP_pcg_id2group(int group_id) {
GroupSettings* retVal___ = NULL;
if( HPMHooks.count.HP_pcg_id2group_pre ) {
GroupSettings* (*preHookFunc) (int *group_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_id2group_pre[hIndex].func;
retVal___ = preHookFunc(&group_id);
@@ -45012,6 +46594,7 @@ bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) {
bool retVal___ = false;
if( HPMHooks.count.HP_pcg_has_permission_pre ) {
bool (*preHookFunc) (GroupSettings *group, unsigned int *permission);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_has_permission_pre[hIndex].func;
retVal___ = preHookFunc(group, &permission);
@@ -45038,6 +46621,7 @@ bool HP_pcg_should_log_commands(GroupSettings *group) {
bool retVal___ = false;
if( HPMHooks.count.HP_pcg_should_log_commands_pre ) {
bool (*preHookFunc) (GroupSettings *group);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_should_log_commands_pre[hIndex].func;
retVal___ = preHookFunc(group);
@@ -45064,6 +46648,7 @@ const char* HP_pcg_get_name(GroupSettings *group) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_pcg_get_name_pre ) {
const char* (*preHookFunc) (GroupSettings *group);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_get_name_pre[hIndex].func;
retVal___ = preHookFunc(group);
@@ -45090,6 +46675,7 @@ int HP_pcg_get_level(GroupSettings *group) {
int retVal___ = 0;
if( HPMHooks.count.HP_pcg_get_level_pre ) {
int (*preHookFunc) (GroupSettings *group);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_get_level_pre[hIndex].func;
retVal___ = preHookFunc(group);
@@ -45116,6 +46702,7 @@ int HP_pcg_get_idx(GroupSettings *group) {
int retVal___ = 0;
if( HPMHooks.count.HP_pcg_get_idx_pre ) {
int (*preHookFunc) (GroupSettings *group);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pcg_get_idx_pre[hIndex].func;
retVal___ = preHookFunc(group);
@@ -45142,6 +46729,7 @@ void HP_pc_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -45167,6 +46755,7 @@ void HP_pc_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_final_pre[hIndex].func;
preHookFunc();
@@ -45193,6 +46782,7 @@ struct map_session_data* HP_pc_get_dummy_sd(void) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_pc_get_dummy_sd_pre ) {
struct map_session_data* (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -45219,6 +46809,7 @@ int HP_pc_class2idx(int class_) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_class2idx_pre ) {
int (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_class2idx_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -45245,6 +46836,7 @@ bool HP_pc_can_give_items(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_pc_can_give_items_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_items_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_can_give_items_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45271,6 +46863,7 @@ bool HP_pc_can_give_bound_items(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_pc_can_give_bound_items_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_bound_items_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_can_give_bound_items_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45292,11 +46885,66 @@ bool HP_pc_can_give_bound_items(struct map_session_data *sd) {
}
return retVal___;
}
+bool HP_pc_can_talk(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_pc_can_talk_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_can_talk_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.can_talk(sd);
+ }
+ if( HPMHooks.count.HP_pc_can_talk_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_can_talk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_can_attack(struct map_session_data *sd, int target_id) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_pc_can_attack_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, int *target_id);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_can_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &target_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.can_attack(sd, target_id);
+ }
+ if( HPMHooks.count.HP_pc_can_attack_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_can_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &target_id);
+ }
+ }
+ return retVal___;
+}
bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_pc_can_use_command_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const char *command);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_can_use_command_pre[hIndex].func;
retVal___ = preHookFunc(sd, command);
@@ -45323,6 +46971,7 @@ int HP_pc_set_group(struct map_session_data *sd, int group_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_set_group_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *group_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_set_group_pre[hIndex].func;
retVal___ = preHookFunc(sd, &group_id);
@@ -45349,6 +46998,7 @@ bool HP_pc_should_log_commands(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_pc_should_log_commands_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_should_log_commands_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45375,6 +47025,7 @@ int HP_pc_setrestartvalue(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setrestartvalue_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setrestartvalue_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -45401,6 +47052,7 @@ int HP_pc_makesavestatus(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_makesavestatus_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_makesavestatus_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45426,6 +47078,7 @@ void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_respawn_pre ) {
void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func;
preHookFunc(sd, &clrtype);
@@ -45452,6 +47105,7 @@ int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setnewpc_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setnewpc_pre[hIndex].func;
retVal___ = preHookFunc(sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd);
@@ -45478,6 +47132,7 @@ bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_
bool retVal___ = false;
if( HPMHooks.count.HP_pc_authok_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_authok_pre[hIndex].func;
retVal___ = preHookFunc(sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers);
@@ -45503,6 +47158,7 @@ void HP_pc_authfail(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_authfail_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_authfail_pre[hIndex].func;
preHookFunc(sd);
@@ -45529,6 +47185,7 @@ int HP_pc_reg_received(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_reg_received_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_reg_received_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45555,6 +47212,7 @@ int HP_pc_isequip(struct map_session_data *sd, int n) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_isequip_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_isequip_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n);
@@ -45581,6 +47239,7 @@ int HP_pc_equippoint(struct map_session_data *sd, int n) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_equippoint_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_equippoint_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n);
@@ -45607,6 +47266,7 @@ int HP_pc_setinventorydata(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setinventorydata_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setinventorydata_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45633,6 +47293,7 @@ int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkskill_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkskill_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -45659,6 +47320,7 @@ int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkskill2_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkskill2_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index);
@@ -45685,6 +47347,7 @@ int HP_pc_checkallowskill(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkallowskill_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkallowskill_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45711,6 +47374,7 @@ int HP_pc_checkequip(struct map_session_data *sd, int pos) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkequip_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkequip_pre[hIndex].func;
retVal___ = preHookFunc(sd, &pos);
@@ -45737,6 +47401,7 @@ int HP_pc_calc_skilltree(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_calc_skilltree_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45763,6 +47428,7 @@ int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45789,6 +47455,7 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_clean_skilltree_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_clean_skilltree_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45815,6 +47482,7 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setpos_pre ) {
int (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func;
retVal___ = preHookFunc(sd, &map_index, &x, &y, &clrtype);
@@ -45841,6 +47509,7 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setsavepoint_pre ) {
int (*preHookFunc) (struct map_session_data *sd, short *map_index, int *x, int *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func;
retVal___ = preHookFunc(sd, &map_index, &x, &y);
@@ -45867,6 +47536,7 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_randomwarp_pre ) {
int (*preHookFunc) (struct map_session_data *sd, clr_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -45893,6 +47563,7 @@ int HP_pc_memo(struct map_session_data *sd, int pos) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_memo_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_memo_pre[hIndex].func;
retVal___ = preHookFunc(sd, &pos);
@@ -45919,6 +47590,7 @@ int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkadditem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkadditem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid, &amount);
@@ -45945,6 +47617,7 @@ int HP_pc_inventoryblank(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_inventoryblank_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_inventoryblank_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -45971,6 +47644,7 @@ int HP_pc_search_inventory(struct map_session_data *sd, int item_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_search_inventory_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *item_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_search_inventory_pre[hIndex].func;
retVal___ = preHookFunc(sd, &item_id);
@@ -45997,6 +47671,7 @@ int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty
int retVal___ = 0;
if( HPMHooks.count.HP_pc_payzeny_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_payzeny_pre[hIndex].func;
retVal___ = preHookFunc(sd, &zeny, &type, tsd);
@@ -46023,6 +47698,7 @@ int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amoun
int retVal___ = 0;
if( HPMHooks.count.HP_pc_additem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_additem_pre[hIndex].func;
retVal___ = preHookFunc(sd, item_data, &amount, &log_type);
@@ -46049,6 +47725,7 @@ int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty
int retVal___ = 0;
if( HPMHooks.count.HP_pc_getzeny_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_getzeny_pre[hIndex].func;
retVal___ = preHookFunc(sd, &zeny, &type, tsd);
@@ -46075,6 +47752,7 @@ int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, shor
int retVal___ = 0;
if( HPMHooks.count.HP_pc_delitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_delitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, &amount, &type, &reason, &log_type);
@@ -46101,6 +47779,7 @@ int HP_pc_paycash(struct map_session_data *sd, int price, int points) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_paycash_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *price, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_paycash_pre[hIndex].func;
retVal___ = preHookFunc(sd, &price, &points);
@@ -46127,6 +47806,7 @@ int HP_pc_getcash(struct map_session_data *sd, int cash, int points) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_getcash_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *cash, int *points);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_getcash_pre[hIndex].func;
retVal___ = preHookFunc(sd, &cash, &points);
@@ -46153,6 +47833,7 @@ int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int
int retVal___ = 0;
if( HPMHooks.count.HP_pc_cart_additem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_cart_additem_pre[hIndex].func;
retVal___ = preHookFunc(sd, item_data, &amount, &log_type);
@@ -46179,6 +47860,7 @@ int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type,
int retVal___ = 0;
if( HPMHooks.count.HP_pc_cart_delitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_cart_delitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, &amount, &type, &log_type);
@@ -46205,6 +47887,7 @@ int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_putitemtocart_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_putitemtocart_pre[hIndex].func;
retVal___ = preHookFunc(sd, &idx, &amount);
@@ -46231,6 +47914,7 @@ int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_getitemfromcart_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_getitemfromcart_pre[hIndex].func;
retVal___ = preHookFunc(sd, &idx, &amount);
@@ -46257,6 +47941,7 @@ int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_cartitem_amount_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_cartitem_amount_pre[hIndex].func;
retVal___ = preHookFunc(sd, &idx, &amount);
@@ -46283,6 +47968,7 @@ int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_takeitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_takeitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, fitem);
@@ -46309,6 +47995,7 @@ int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_dropitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_dropitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, &amount);
@@ -46335,6 +48022,7 @@ bool HP_pc_isequipped(struct map_session_data *sd, int nameid) {
bool retVal___ = false;
if( HPMHooks.count.HP_pc_isequipped_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_isequipped_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -46361,6 +48049,7 @@ bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2
bool retVal___ = false;
if( HPMHooks.count.HP_pc_can_Adopt_pre ) {
bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_can_Adopt_pre[hIndex].func;
retVal___ = preHookFunc(p1_sd, p2_sd, b_sd);
@@ -46387,6 +48076,7 @@ bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_
bool retVal___ = false;
if( HPMHooks.count.HP_pc_adoption_pre ) {
bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_adoption_pre[hIndex].func;
retVal___ = preHookFunc(p1_sd, p2_sd, b_sd);
@@ -46413,6 +48103,7 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_updateweightstatus_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_updateweightstatus_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -46439,6 +48130,7 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc
int retVal___ = 0;
if( HPMHooks.count.HP_pc_addautobonus_pre ) {
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);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func;
retVal___ = preHookFunc(bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill);
@@ -46465,6 +48157,7 @@ int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_exeautobonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_exeautobonus_pre[hIndex].func;
retVal___ = preHookFunc(sd, bonus);
@@ -46491,6 +48184,7 @@ int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_endautobonus_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_endautobonus_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -46517,6 +48211,7 @@ int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, c
int retVal___ = 0;
if( HPMHooks.count.HP_pc_delautobonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_delautobonus_pre[hIndex].func;
retVal___ = preHookFunc(sd, bonus, &max, &restore);
@@ -46543,6 +48238,7 @@ int HP_pc_bonus(struct map_session_data *sd, int type, int val) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &val);
@@ -46569,6 +48265,7 @@ int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus2_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus2_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &type2, &val);
@@ -46595,6 +48292,7 @@ int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, in
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus3_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus3_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &type2, &type3, &val);
@@ -46621,6 +48319,7 @@ int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, in
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus4_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus4_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &val);
@@ -46647,6 +48346,7 @@ int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, in
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus5_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus5_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &type5, &val);
@@ -46673,6 +48373,7 @@ int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_skill_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *id, int *level, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_skill_pre[hIndex].func;
retVal___ = preHookFunc(sd, &id, &level, &flag);
@@ -46699,6 +48400,7 @@ int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip)
int retVal___ = 0;
if( HPMHooks.count.HP_pc_insert_card_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_insert_card_pre[hIndex].func;
retVal___ = preHookFunc(sd, &idx_card, &idx_equip);
@@ -46725,6 +48427,7 @@ int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16
int retVal___ = 0;
if( HPMHooks.count.HP_pc_steal_item_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_steal_item_pre[hIndex].func;
retVal___ = preHookFunc(sd, bl, &skill_lv);
@@ -46751,6 +48454,7 @@ int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_steal_coin_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_steal_coin_pre[hIndex].func;
retVal___ = preHookFunc(sd, bl);
@@ -46777,6 +48481,7 @@ int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_modifybuyvalue_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *orig_value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_pre[hIndex].func;
retVal___ = preHookFunc(sd, &orig_value);
@@ -46803,6 +48508,7 @@ int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_modifysellvalue_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *orig_value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_modifysellvalue_pre[hIndex].func;
retVal___ = preHookFunc(sd, &orig_value);
@@ -46829,6 +48535,7 @@ int HP_pc_follow(struct map_session_data *sd, int target_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_follow_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *target_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_follow_pre[hIndex].func;
retVal___ = preHookFunc(sd, &target_id);
@@ -46855,6 +48562,7 @@ int HP_pc_stop_following(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_stop_following_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_stop_following_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -46881,6 +48589,7 @@ unsigned int HP_pc_maxbaselv(struct map_session_data *sd) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_pc_maxbaselv_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_maxbaselv_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -46907,6 +48616,7 @@ unsigned int HP_pc_maxjoblv(struct map_session_data *sd) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_pc_maxjoblv_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_maxjoblv_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -46933,6 +48643,7 @@ int HP_pc_checkbaselevelup(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkbaselevelup_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -46959,6 +48670,7 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkjoblevelup_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -46980,11 +48692,12 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) {
+bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_pc_gainexp_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
+ bool (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func;
retVal___ = preHookFunc(sd, src, &base_exp, &job_exp, &is_quest);
@@ -46998,7 +48711,7 @@ int HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned
retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest);
}
if( HPMHooks.count.HP_pc_gainexp_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, src, &base_exp, &job_exp, &is_quest);
@@ -47011,6 +48724,7 @@ unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_pc_nextbaseexp_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47037,6 +48751,7 @@ unsigned int HP_pc_thisbaseexp(struct map_session_data *sd) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_pc_thisbaseexp_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47063,6 +48778,7 @@ unsigned int HP_pc_nextjobexp(struct map_session_data *sd) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_pc_nextjobexp_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47089,6 +48805,7 @@ unsigned int HP_pc_thisjobexp(struct map_session_data *sd) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_pc_thisjobexp_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47115,6 +48832,7 @@ int HP_pc_gets_status_point(int level) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_gets_status_point_pre ) {
int (*preHookFunc) (int *level);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_gets_status_point_pre[hIndex].func;
retVal___ = preHookFunc(&level);
@@ -47141,6 +48859,7 @@ int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_need_status_point_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_need_status_point_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &val);
@@ -47167,6 +48886,7 @@ int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_maxparameterincrease_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -47193,6 +48913,7 @@ bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) {
bool retVal___ = false;
if( HPMHooks.count.HP_pc_statusup_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *type, int *increase);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &increase);
@@ -47219,6 +48940,7 @@ int HP_pc_statusup2(struct map_session_data *sd, int type, int val) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_statusup2_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_statusup2_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &val);
@@ -47245,6 +48967,7 @@ int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_skillup_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_skillup_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -47271,6 +48994,7 @@ int HP_pc_allskillup(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_allskillup_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_allskillup_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47297,6 +49021,7 @@ int HP_pc_resetlvl(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_resetlvl_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_resetlvl_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -47323,6 +49048,7 @@ int HP_pc_resetstate(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_resetstate_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_resetstate_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47349,6 +49075,7 @@ int HP_pc_resetskill(struct map_session_data *sd, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_resetskill_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_resetskill_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -47375,6 +49102,7 @@ int HP_pc_resetfeel(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_resetfeel_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_resetfeel_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47401,6 +49129,7 @@ int HP_pc_resethate(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_resethate_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_resethate_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47427,6 +49156,7 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_equipitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, int *req_pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_equipitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, &req_pos);
@@ -47453,6 +49183,7 @@ int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_unequipitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_unequipitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, &flag);
@@ -47479,6 +49210,7 @@ int HP_pc_checkitem(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkitem_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47505,6 +49237,7 @@ int HP_pc_useitem(struct map_session_data *sd, int n) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_useitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_useitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n);
@@ -47531,6 +49264,7 @@ int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_skillatk_bonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -47557,6 +49291,7 @@ int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_skillheal_bonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -47583,6 +49318,7 @@ int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_skillheal2_bonus_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -47608,6 +49344,7 @@ void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned
int hIndex = 0;
if( HPMHooks.count.HP_pc_damage_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_damage_pre[hIndex].func;
preHookFunc(sd, src, &hp, &sp);
@@ -47634,6 +49371,7 @@ int HP_pc_dead(struct map_session_data *sd, struct block_list *src) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_dead_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct block_list *src);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_dead_pre[hIndex].func;
retVal___ = preHookFunc(sd, src);
@@ -47659,6 +49397,7 @@ void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp)
int hIndex = 0;
if( HPMHooks.count.HP_pc_revive_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_revive_pre[hIndex].func;
preHookFunc(sd, &hp, &sp);
@@ -47684,6 +49423,7 @@ void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, i
int hIndex = 0;
if( HPMHooks.count.HP_pc_heal_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_heal_pre[hIndex].func;
preHookFunc(sd, &hp, &sp, &type);
@@ -47710,6 +49450,7 @@ int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_itemheal_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *itemid, int *hp, int *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_itemheal_pre[hIndex].func;
retVal___ = preHookFunc(sd, &itemid, &hp, &sp);
@@ -47736,6 +49477,7 @@ int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_percentheal_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *hp, int *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_percentheal_pre[hIndex].func;
retVal___ = preHookFunc(sd, &hp, &sp);
@@ -47762,6 +49504,7 @@ int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_jobchange_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *job, int *upper);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_jobchange_pre[hIndex].func;
retVal___ = preHookFunc(sd, &job, &upper);
@@ -47788,6 +49531,7 @@ int HP_pc_setoption(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setoption_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setoption_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -47814,6 +49558,7 @@ int HP_pc_setcart(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setcart_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setcart_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -47840,6 +49585,7 @@ int HP_pc_setfalcon(struct map_session_data *sd, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setfalcon_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -47866,6 +49612,7 @@ int HP_pc_setriding(struct map_session_data *sd, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setriding_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setriding_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -47887,37 +49634,38 @@ int HP_pc_setriding(struct map_session_data *sd, int flag) {
}
return retVal___;
}
-int HP_pc_setmadogear(struct map_session_data *sd, int flag) {
+void HP_pc_setmadogear(struct map_session_data *sd, int flag) {
int hIndex = 0;
- int retVal___ = 0;
if( HPMHooks.count.HP_pc_setmadogear_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &flag);
+ preHookFunc(sd, &flag);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.pc.setmadogear(sd, flag);
+ HPMHooks.source.pc.setmadogear(sd, flag);
}
if( HPMHooks.count.HP_pc_setmadogear_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &flag);
+ postHookFunc(sd, &flag);
}
}
- return retVal___;
+ return;
}
int HP_pc_changelook(struct map_session_data *sd, int type, int val) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_changelook_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_changelook_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &val);
@@ -47944,6 +49692,7 @@ int HP_pc_equiplookall(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_equiplookall_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_equiplookall_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -47970,6 +49719,7 @@ int HP_pc_readparam(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_readparam_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_readparam_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -47996,6 +49746,7 @@ int HP_pc_setparam(struct map_session_data *sd, int type, int val) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setparam_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setparam_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &val);
@@ -48022,6 +49773,7 @@ int HP_pc_readreg(struct map_session_data *sd, int64 reg) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_readreg_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int64 *reg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_readreg_pre[hIndex].func;
retVal___ = preHookFunc(sd, &reg);
@@ -48047,6 +49799,7 @@ void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_setreg_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setreg_pre[hIndex].func;
preHookFunc(sd, &reg, &val);
@@ -48073,6 +49826,7 @@ char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) {
char* retVal___ = NULL;
if( HPMHooks.count.HP_pc_readregstr_pre ) {
char* (*preHookFunc) (struct map_session_data *sd, int64 *reg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_readregstr_pre[hIndex].func;
retVal___ = preHookFunc(sd, &reg);
@@ -48098,6 +49852,7 @@ void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_setregstr_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setregstr_pre[hIndex].func;
preHookFunc(sd, &reg, str);
@@ -48124,6 +49879,7 @@ int HP_pc_readregistry(struct map_session_data *sd, int64 reg) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_readregistry_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int64 *reg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_readregistry_pre[hIndex].func;
retVal___ = preHookFunc(sd, &reg);
@@ -48150,6 +49906,7 @@ int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setregistry_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setregistry_pre[hIndex].func;
retVal___ = preHookFunc(sd, &reg, &val);
@@ -48176,6 +49933,7 @@ char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) {
char* retVal___ = NULL;
if( HPMHooks.count.HP_pc_readregistry_str_pre ) {
char* (*preHookFunc) (struct map_session_data *sd, int64 *reg);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_readregistry_str_pre[hIndex].func;
retVal___ = preHookFunc(sd, &reg);
@@ -48202,6 +49960,7 @@ int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *va
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setregistry_str_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setregistry_str_pre[hIndex].func;
retVal___ = preHookFunc(sd, &reg, val);
@@ -48228,6 +49987,7 @@ int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name)
int retVal___ = 0;
if( HPMHooks.count.HP_pc_addeventtimer_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *tick, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_addeventtimer_pre[hIndex].func;
retVal___ = preHookFunc(sd, &tick, name);
@@ -48254,6 +50014,7 @@ int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_deleventtimer_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_deleventtimer_pre[hIndex].func;
retVal___ = preHookFunc(sd, name);
@@ -48280,6 +50041,7 @@ int HP_pc_cleareventtimer(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_cleareventtimer_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_cleareventtimer_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48306,6 +50068,7 @@ int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int
int retVal___ = 0;
if( HPMHooks.count.HP_pc_addeventtimercount_pre ) {
int (*preHookFunc) (struct map_session_data *sd, const char *name, int *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_addeventtimercount_pre[hIndex].func;
retVal___ = preHookFunc(sd, name, &tick);
@@ -48332,6 +50095,7 @@ int HP_pc_calc_pvprank(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_calc_pvprank_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48358,6 +50122,7 @@ int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48384,6 +50149,7 @@ int HP_pc_ismarried(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_ismarried_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_ismarried_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48410,6 +50176,7 @@ int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd)
int retVal___ = 0;
if( HPMHooks.count.HP_pc_marriage_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_marriage_pre[hIndex].func;
retVal___ = preHookFunc(sd, dstsd);
@@ -48436,6 +50203,7 @@ int HP_pc_divorce(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_divorce_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_divorce_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48462,6 +50230,7 @@ struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_pc_get_partner_pre ) {
struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_get_partner_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48488,6 +50257,7 @@ struct map_session_data* HP_pc_get_father(struct map_session_data *sd) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_pc_get_father_pre ) {
struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_get_father_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48514,6 +50284,7 @@ struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_pc_get_mother_pre ) {
struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_get_mother_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48540,6 +50311,7 @@ struct map_session_data* HP_pc_get_child(struct map_session_data *sd) {
struct map_session_data* retVal___ = NULL;
if( HPMHooks.count.HP_pc_get_child_pre ) {
struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_get_child_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -48565,6 +50337,7 @@ void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_bleeding_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bleeding_pre[hIndex].func;
preHookFunc(sd, &diff_tick);
@@ -48590,6 +50363,7 @@ void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_regen_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_regen_pre[hIndex].func;
preHookFunc(sd, &diff_tick);
@@ -48615,6 +50389,7 @@ void HP_pc_setstand(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_setstand_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setstand_pre[hIndex].func;
preHookFunc(sd);
@@ -48641,6 +50416,7 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_candrop_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct item *item);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_candrop_pre[hIndex].func;
retVal___ = preHookFunc(sd, item);
@@ -48667,6 +50443,7 @@ int HP_pc_jobid2mapid(unsigned short b_class) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_jobid2mapid_pre ) {
int (*preHookFunc) (unsigned short *b_class);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func;
retVal___ = preHookFunc(&b_class);
@@ -48693,6 +50470,7 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_mapid2jobid_pre ) {
int (*preHookFunc) (unsigned short *class_, int *sex);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func;
retVal___ = preHookFunc(&class_, &sex);
@@ -48719,6 +50497,7 @@ const char* HP_pc_job_name(int class_) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_pc_job_name_pre ) {
const char* (*preHookFunc) (int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_job_name_pre[hIndex].func;
retVal___ = preHookFunc(&class_);
@@ -48744,6 +50523,7 @@ void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_setinvincibletimer_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_pre[hIndex].func;
preHookFunc(sd, &val);
@@ -48769,6 +50549,7 @@ void HP_pc_delinvincibletimer(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_delinvincibletimer_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_pre[hIndex].func;
preHookFunc(sd);
@@ -48795,6 +50576,7 @@ int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_addspiritball_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_addspiritball_pre[hIndex].func;
retVal___ = preHookFunc(sd, &interval, &max);
@@ -48821,6 +50603,7 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_delspiritball_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *count, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_delspiritball_pre[hIndex].func;
retVal___ = preHookFunc(sd, &count, &type);
@@ -48846,6 +50629,7 @@ void HP_pc_addfame(struct map_session_data *sd, int count) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_addfame_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_addfame_pre[hIndex].func;
preHookFunc(sd, &count);
@@ -48872,6 +50656,7 @@ unsigned char HP_pc_famerank(int char_id, int job) {
unsigned char retVal___ = 0;
if( HPMHooks.count.HP_pc_famerank_pre ) {
unsigned char (*preHookFunc) (int *char_id, int *job);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famerank_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_famerank_pre[hIndex].func;
retVal___ = preHookFunc(&char_id, &job);
@@ -48898,6 +50683,7 @@ int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *
int retVal___ = 0;
if( HPMHooks.count.HP_pc_set_hate_mob_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *pos, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_set_hate_mob_pre[hIndex].func;
retVal___ = preHookFunc(sd, &pos, bl);
@@ -48924,6 +50710,7 @@ int HP_pc_readdb(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_readdb_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_readdb_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -48950,6 +50737,7 @@ int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_map_day_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_map_day_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -48976,6 +50764,7 @@ int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_map_night_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_map_night_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49001,6 +50790,7 @@ void HP_pc_inventory_rentals(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_inventory_rentals_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_inventory_rentals_pre[hIndex].func;
preHookFunc(sd);
@@ -49027,6 +50817,7 @@ int HP_pc_inventory_rental_clear(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_inventory_rental_clear_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -49052,6 +50843,7 @@ void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_inventory_rental_add_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *seconds);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_pre[hIndex].func;
preHookFunc(sd, &seconds);
@@ -49078,6 +50870,7 @@ int HP_pc_disguise(struct map_session_data *sd, int class_) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_disguise_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_disguise_pre[hIndex].func;
retVal___ = preHookFunc(sd, &class_);
@@ -49104,6 +50897,7 @@ bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) {
bool retVal___ = false;
if( HPMHooks.count.HP_pc_isautolooting_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_isautolooting_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -49129,6 +50923,7 @@ void HP_pc_overheat(struct map_session_data *sd, int val) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_overheat_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_overheat_pre[hIndex].func;
preHookFunc(sd, &val);
@@ -49155,6 +50950,7 @@ int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_banding_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_banding_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_lv);
@@ -49180,6 +50976,7 @@ void HP_pc_itemcd_do(struct map_session_data *sd, bool load) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_itemcd_do_pre ) {
void (*preHookFunc) (struct map_session_data *sd, bool *load);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_itemcd_do_pre[hIndex].func;
preHookFunc(sd, &load);
@@ -49206,6 +51003,7 @@ int HP_pc_load_combo(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_load_combo_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_load_combo_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -49232,6 +51030,7 @@ int HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type
int retVal___ = 0;
if( HPMHooks.count.HP_pc_add_charm_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func;
retVal___ = preHookFunc(sd, &interval, &max, &type);
@@ -49258,6 +51057,7 @@ int HP_pc_del_charm(struct map_session_data *sd, int count, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_del_charm_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *count, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func;
retVal___ = preHookFunc(sd, &count, &type);
@@ -49283,6 +51083,7 @@ void HP_pc_baselevelchanged(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_baselevelchanged_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_baselevelchanged_pre[hIndex].func;
preHookFunc(sd);
@@ -49309,6 +51110,7 @@ int HP_pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, i
int retVal___ = 0;
if( HPMHooks.count.HP_pc_level_penalty_mod_pre ) {
int (*preHookFunc) (int *diff, unsigned char *race, unsigned short *mode, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_pre[hIndex].func;
retVal___ = preHookFunc(&diff, &race, &mode, &type);
@@ -49335,6 +51137,7 @@ int HP_pc_calc_skillpoint(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_calc_skillpoint_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -49361,6 +51164,7 @@ int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_invincible_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_invincible_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49387,6 +51191,7 @@ int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_spiritball_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_spiritball_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49413,6 +51218,7 @@ int HP_pc_check_banding(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_check_banding_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_pc_check_banding_pre[hIndex].func;
@@ -49445,6 +51251,7 @@ int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49470,6 +51277,7 @@ void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_check_skilltree_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_check_skilltree_pre[hIndex].func;
preHookFunc(sd, &skill_id);
@@ -49496,6 +51304,7 @@ int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus_autospell_pre ) {
int (*preHookFunc) (struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_pre[hIndex].func;
retVal___ = preHookFunc(spell, &max, &id, &lv, &rate, &flag, &card_id);
@@ -49522,6 +51331,7 @@ int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus_autospell_onskill_pre ) {
int (*preHookFunc) (struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_pre[hIndex].func;
retVal___ = preHookFunc(spell, &max, &src_skill, &id, &lv, &rate, &card_id);
@@ -49548,6 +51358,7 @@ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, sho
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus_addeff_pre ) {
int (*preHookFunc) (struct s_addeffect *effect, int *max, enum sc_type *id, short *rate, short *arrow_rate, unsigned char *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_pre[hIndex].func;
retVal___ = preHookFunc(effect, &max, &id, &rate, &arrow_rate, &flag);
@@ -49574,6 +51385,7 @@ int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus_addeff_onskill_pre ) {
int (*preHookFunc) (struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_pre[hIndex].func;
retVal___ = preHookFunc(effect, &max, &id, &rate, &skill_id, &target);
@@ -49600,6 +51412,7 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh
int retVal___ = 0;
if( HPMHooks.count.HP_pc_bonus_item_drop_pre ) {
int (*preHookFunc) (struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_pre[hIndex].func;
retVal___ = preHookFunc(drop, &max, &id, &group, &race, &rate);
@@ -49625,6 +51438,7 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned
int hIndex = 0;
if( HPMHooks.count.HP_pc_calcexp_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func;
preHookFunc(sd, base_exp, job_exp, src);
@@ -49651,6 +51465,7 @@ int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_respawn_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_respawn_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49677,6 +51492,7 @@ int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_jobchange_killclone_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_pre[hIndex].func;
@@ -49709,6 +51525,7 @@ int HP_pc_getstat(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_getstat_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_getstat_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -49735,6 +51552,7 @@ int HP_pc_setstat(struct map_session_data *sd, int type, int val) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setstat_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setstat_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type, &val);
@@ -49761,6 +51579,7 @@ int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_eventtimer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_eventtimer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49787,6 +51606,7 @@ int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_daynight_timer_sub_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_pre[hIndex].func;
@@ -49819,6 +51639,7 @@ int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_charm_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_charm_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49845,6 +51666,7 @@ bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_pc_readdb_levelpenalty_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -49871,6 +51693,7 @@ int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_autosave_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_autosave_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49897,6 +51720,7 @@ int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_follow_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_follow_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -49922,6 +51746,7 @@ void HP_pc_read_skill_tree(void) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_read_skill_tree_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_read_skill_tree_pre[hIndex].func;
preHookFunc();
@@ -49948,6 +51773,7 @@ int HP_pc_isUseitem(struct map_session_data *sd, int n) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_isUseitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_isUseitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n);
@@ -49974,6 +51800,7 @@ int HP_pc_show_steal(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_show_steal_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_pc_show_steal_pre[hIndex].func;
@@ -50006,6 +51833,7 @@ int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_checkcombo_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_checkcombo_pre[hIndex].func;
retVal___ = preHookFunc(sd, data);
@@ -50032,6 +51860,7 @@ int HP_pc_calcweapontype(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_calcweapontype_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_calcweapontype_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -50058,6 +51887,7 @@ int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_removecombo_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct item_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_removecombo_pre[hIndex].func;
retVal___ = preHookFunc(sd, data);
@@ -50083,6 +51913,7 @@ void HP_pc_bank_deposit(struct map_session_data *sd, int money) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_bank_deposit_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *money);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bank_deposit_pre[hIndex].func;
preHookFunc(sd, &money);
@@ -50108,6 +51939,7 @@ void HP_pc_bank_withdraw(struct map_session_data *sd, int money) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_bank_withdraw_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *money);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bank_withdraw_pre[hIndex].func;
preHookFunc(sd, &money);
@@ -50133,6 +51965,7 @@ void HP_pc_rental_expire(struct map_session_data *sd, int i) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_rental_expire_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *i);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_rental_expire_pre[hIndex].func;
preHookFunc(sd, &i);
@@ -50158,6 +51991,7 @@ void HP_pc_scdata_received(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_scdata_received_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_scdata_received_pre[hIndex].func;
preHookFunc(sd);
@@ -50183,6 +52017,7 @@ void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type)
int hIndex = 0;
if( HPMHooks.count.HP_pc_bound_clear_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_bound_clear_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -50209,6 +52044,7 @@ int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_expiration_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_expiration_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -50235,6 +52071,7 @@ int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pc_global_expiration_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -50260,6 +52097,7 @@ void HP_pc_expire_check(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_expire_check_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_expire_check_pre[hIndex].func;
preHookFunc(sd);
@@ -50285,6 +52123,7 @@ void HP_pc_autotrade_load(void) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_autotrade_load_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_autotrade_load_pre[hIndex].func;
preHookFunc();
@@ -50310,6 +52149,7 @@ void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_upd
int hIndex = 0;
if( HPMHooks.count.HP_pc_autotrade_update_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action *action);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_autotrade_update_pre[hIndex].func;
preHookFunc(sd, &action);
@@ -50335,6 +52175,7 @@ void HP_pc_autotrade_start(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_autotrade_start_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_autotrade_start_pre[hIndex].func;
preHookFunc(sd);
@@ -50360,6 +52201,7 @@ void HP_pc_autotrade_prepare(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_autotrade_prepare_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_pre[hIndex].func;
preHookFunc(sd);
@@ -50385,6 +52227,7 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_autotrade_populate_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_autotrade_populate_pre[hIndex].func;
preHookFunc(sd);
@@ -50412,6 +52255,7 @@ int HP_pet_init(bool minimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_init_pre ) {
int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_init_pre[hIndex].func;
retVal___ = preHookFunc(&minimal);
@@ -50438,6 +52282,7 @@ int HP_pet_final(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_final_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_final_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -50464,6 +52309,7 @@ int HP_pet_hungry_val(struct pet_data *pd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_hungry_val_pre ) {
int (*preHookFunc) (struct pet_data *pd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_hungry_val_pre[hIndex].func;
retVal___ = preHookFunc(pd);
@@ -50489,6 +52335,7 @@ void HP_pet_set_intimate(struct pet_data *pd, int value) {
int hIndex = 0;
if( HPMHooks.count.HP_pet_set_intimate_pre ) {
void (*preHookFunc) (struct pet_data *pd, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_set_intimate_pre[hIndex].func;
preHookFunc(pd, &value);
@@ -50515,6 +52362,7 @@ int HP_pet_create_egg(struct map_session_data *sd, int item_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_create_egg_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *item_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_create_egg_pre[hIndex].func;
retVal___ = preHookFunc(sd, &item_id);
@@ -50541,6 +52389,7 @@ int HP_pet_unlocktarget(struct pet_data *pd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_unlocktarget_pre ) {
int (*preHookFunc) (struct pet_data *pd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_unlocktarget_pre[hIndex].func;
retVal___ = preHookFunc(pd);
@@ -50567,6 +52416,7 @@ int HP_pet_attackskill(struct pet_data *pd, int target_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_attackskill_pre ) {
int (*preHookFunc) (struct pet_data *pd, int *target_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_attackskill_pre[hIndex].func;
retVal___ = preHookFunc(pd, &target_id);
@@ -50593,6 +52443,7 @@ int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int
int retVal___ = 0;
if( HPMHooks.count.HP_pet_target_check_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_target_check_pre[hIndex].func;
retVal___ = preHookFunc(sd, bl, &type);
@@ -50619,6 +52470,7 @@ int HP_pet_sc_check(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_sc_check_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_sc_check_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -50645,6 +52497,7 @@ int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_hungry_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_hungry_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -50671,6 +52524,7 @@ int HP_pet_search_petDB_index(int key, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_search_petDB_index_pre ) {
int (*preHookFunc) (int *key, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_search_petDB_index_pre[hIndex].func;
retVal___ = preHookFunc(&key, &type);
@@ -50697,6 +52551,7 @@ int HP_pet_hungry_timer_delete(struct pet_data *pd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_hungry_timer_delete_pre ) {
int (*preHookFunc) (struct pet_data *pd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_pre[hIndex].func;
retVal___ = preHookFunc(pd);
@@ -50723,6 +52578,7 @@ int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_performance_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_performance_pre[hIndex].func;
retVal___ = preHookFunc(sd, pd);
@@ -50749,6 +52605,7 @@ int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_return_egg_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_return_egg_pre[hIndex].func;
retVal___ = preHookFunc(sd, pd);
@@ -50775,6 +52632,7 @@ int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_data_init_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_data_init_pre[hIndex].func;
retVal___ = preHookFunc(sd, petinfo);
@@ -50801,6 +52659,7 @@ int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_birth_process_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_birth_process_pre[hIndex].func;
retVal___ = preHookFunc(sd, petinfo);
@@ -50827,6 +52686,7 @@ int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_recv_petdata_pre ) {
int (*preHookFunc) (int *account_id, struct s_pet *p, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_recv_petdata_pre[hIndex].func;
retVal___ = preHookFunc(&account_id, p, &flag);
@@ -50853,6 +52713,7 @@ int HP_pet_select_egg(struct map_session_data *sd, short egg_index) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_select_egg_pre ) {
int (*preHookFunc) (struct map_session_data *sd, short *egg_index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_select_egg_pre[hIndex].func;
retVal___ = preHookFunc(sd, &egg_index);
@@ -50879,6 +52740,7 @@ int HP_pet_catch_process1(struct map_session_data *sd, int target_class) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_catch_process1_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *target_class);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_catch_process1_pre[hIndex].func;
retVal___ = preHookFunc(sd, &target_class);
@@ -50905,6 +52767,7 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_catch_process2_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *target_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_catch_process2_pre[hIndex].func;
retVal___ = preHookFunc(sd, &target_id);
@@ -50926,14 +52789,15 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) {
}
return retVal___;
}
-int HP_pet_get_egg(int account_id, int pet_id, int flag) {
+bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_pet_get_egg_pre ) {
- int (*preHookFunc) (int *account_id, int *pet_id, int *flag);
+ bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func;
- retVal___ = preHookFunc(&account_id, &pet_id, &flag);
+ retVal___ = preHookFunc(&account_id, &pet_class, &pet_id);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -50941,13 +52805,13 @@ int HP_pet_get_egg(int account_id, int pet_id, int flag) {
}
}
{
- retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_id, flag);
+ retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id);
}
if( HPMHooks.count.HP_pet_get_egg_post ) {
- int (*postHookFunc) (int retVal___, int *account_id, int *pet_id, int *flag);
+ bool (*postHookFunc) (bool retVal___, int *account_id, short *pet_class, int *pet_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &account_id, &pet_id, &flag);
+ retVal___ = postHookFunc(retVal___, &account_id, &pet_class, &pet_id);
}
}
return retVal___;
@@ -50957,6 +52821,7 @@ int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_unequipitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_unequipitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, pd);
@@ -50983,6 +52848,7 @@ int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_food_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_food_pre[hIndex].func;
retVal___ = preHookFunc(sd, pd);
@@ -51009,6 +52875,7 @@ int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_pre[hIndex].func;
@@ -51041,6 +52908,7 @@ int HP_pet_menu(struct map_session_data *sd, int menunum) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_menu_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *menunum);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_menu_pre[hIndex].func;
retVal___ = preHookFunc(sd, &menunum);
@@ -51067,6 +52935,7 @@ int HP_pet_change_name(struct map_session_data *sd, char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_change_name_pre ) {
int (*preHookFunc) (struct map_session_data *sd, char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_change_name_pre[hIndex].func;
retVal___ = preHookFunc(sd, name);
@@ -51093,6 +52962,7 @@ int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_change_name_ack_pre ) {
int (*preHookFunc) (struct map_session_data *sd, char *name, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_change_name_ack_pre[hIndex].func;
retVal___ = preHookFunc(sd, name, &flag);
@@ -51119,6 +52989,7 @@ int HP_pet_equipitem(struct map_session_data *sd, int index) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_equipitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_equipitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index);
@@ -51145,6 +53016,7 @@ int HP_pet_randomwalk(struct pet_data *pd, int64 tick) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_randomwalk_pre ) {
int (*preHookFunc) (struct pet_data *pd, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_randomwalk_pre[hIndex].func;
retVal___ = preHookFunc(pd, &tick);
@@ -51171,6 +53043,7 @@ int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 t
int retVal___ = 0;
if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) {
int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_pre[hIndex].func;
retVal___ = preHookFunc(pd, sd, &tick);
@@ -51197,6 +53070,7 @@ int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_ai_sub_foreachclient_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_pre[hIndex].func;
@@ -51229,6 +53103,7 @@ int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_ai_hard_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_ai_hard_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -51255,6 +53130,7 @@ int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_delay_item_drop_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_delay_item_drop_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -51281,6 +53157,7 @@ int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_lootitem_drop_pre ) {
int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_lootitem_drop_pre[hIndex].func;
retVal___ = preHookFunc(pd, sd);
@@ -51307,6 +53184,7 @@ int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -51333,6 +53211,7 @@ int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_recovery_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_recovery_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -51359,6 +53238,7 @@ int HP_pet_heal_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_heal_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_heal_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_heal_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -51385,6 +53265,7 @@ int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_skill_support_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_skill_support_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -51411,6 +53292,7 @@ int HP_pet_read_db(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_pet_read_db_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pet_read_db_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -51437,6 +53319,7 @@ void HP_quest_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_quest_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -51462,6 +53345,7 @@ void HP_quest_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_quest_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_final_pre[hIndex].func;
preHookFunc();
@@ -51487,6 +53371,7 @@ void HP_quest_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_quest_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_reload_pre[hIndex].func;
preHookFunc();
@@ -51513,6 +53398,7 @@ struct quest_db* HP_quest_db(int quest_id) {
struct quest_db* retVal___ = NULL;
if( HPMHooks.count.HP_quest_db_pre ) {
struct quest_db* (*preHookFunc) (int *quest_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_db_pre[hIndex].func;
retVal___ = preHookFunc(&quest_id);
@@ -51539,6 +53425,7 @@ int HP_quest_pc_login(TBL_PC *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_pc_login_pre ) {
int (*preHookFunc) (TBL_PC *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_pc_login_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -51565,6 +53452,7 @@ int HP_quest_add(TBL_PC *sd, int quest_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_add_pre ) {
int (*preHookFunc) (TBL_PC *sd, int *quest_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_add_pre[hIndex].func;
retVal___ = preHookFunc(sd, &quest_id);
@@ -51591,6 +53479,7 @@ int HP_quest_change(TBL_PC *sd, int qid1, int qid2) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_change_pre ) {
int (*preHookFunc) (TBL_PC *sd, int *qid1, int *qid2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_change_pre[hIndex].func;
retVal___ = preHookFunc(sd, &qid1, &qid2);
@@ -51617,6 +53506,7 @@ int HP_quest_delete(TBL_PC *sd, int quest_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_delete_pre ) {
int (*preHookFunc) (TBL_PC *sd, int *quest_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_delete_pre[hIndex].func;
retVal___ = preHookFunc(sd, &quest_id);
@@ -51643,6 +53533,7 @@ int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_update_objective_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_quest_update_objective_sub_pre[hIndex].func;
@@ -51674,6 +53565,7 @@ void HP_quest_update_objective(TBL_PC *sd, int mob_id) {
int hIndex = 0;
if( HPMHooks.count.HP_quest_update_objective_pre ) {
void (*preHookFunc) (TBL_PC *sd, int *mob_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_update_objective_pre[hIndex].func;
preHookFunc(sd, &mob_id);
@@ -51700,6 +53592,7 @@ int HP_quest_update_status(TBL_PC *sd, int quest_id, enum quest_state qs) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_update_status_pre ) {
int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_state *qs);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_update_status_pre[hIndex].func;
retVal___ = preHookFunc(sd, &quest_id, &qs);
@@ -51726,6 +53619,7 @@ int HP_quest_check(TBL_PC *sd, int quest_id, enum quest_check_type type) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_check_pre ) {
int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_check_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_check_pre[hIndex].func;
retVal___ = preHookFunc(sd, &quest_id, &type);
@@ -51751,6 +53645,7 @@ void HP_quest_clear(void) {
int hIndex = 0;
if( HPMHooks.count.HP_quest_clear_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_clear_pre[hIndex].func;
preHookFunc();
@@ -51777,6 +53672,7 @@ int HP_quest_read_db(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_quest_read_db_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_read_db_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -51803,6 +53699,7 @@ void HP_script_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_script_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -51828,6 +53725,7 @@ void HP_script_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_script_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_final_pre[hIndex].func;
preHookFunc();
@@ -51854,6 +53752,7 @@ int HP_script_reload(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_reload_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_reload_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -51875,14 +53774,15 @@ int HP_script_reload(void) {
}
return retVal___;
}
-struct script_code* HP_script_parse(const char *src, const char *file, int line, int options) {
+struct script_code* HP_script_parse(const char *src, const char *file, int line, int options, int *retval) {
int hIndex = 0;
struct script_code* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_pre ) {
- struct script_code* (*preHookFunc) (const char *src, const char *file, int *line, int *options);
+ struct script_code* (*preHookFunc) (const char *src, const char *file, int *line, int *options, int *retval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_pre[hIndex].func;
- retVal___ = preHookFunc(src, file, &line, &options);
+ retVal___ = preHookFunc(src, file, &line, &options, retval);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -51890,13 +53790,13 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line,
}
}
{
- retVal___ = HPMHooks.source.script.parse(src, file, line, options);
+ retVal___ = HPMHooks.source.script.parse(src, file, line, options, retval);
}
if( HPMHooks.count.HP_script_parse_post ) {
- struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int *line, int *options);
+ struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int *line, int *options, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_script_parse_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, src, file, &line, &options);
+ retVal___ = postHookFunc(retVal___, src, file, &line, &options, retval);
}
}
return retVal___;
@@ -51906,6 +53806,7 @@ bool HP_script_add_builtin(const struct script_function *buildin, bool override)
bool retVal___ = false;
if( HPMHooks.count.HP_script_add_builtin_pre ) {
bool (*preHookFunc) (const struct script_function *buildin, bool *override);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func;
retVal___ = preHookFunc(buildin, &override);
@@ -51931,6 +53832,7 @@ void HP_script_parse_builtin(void) {
int hIndex = 0;
if( HPMHooks.count.HP_script_parse_builtin_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_builtin_pre[hIndex].func;
preHookFunc();
@@ -51957,6 +53859,7 @@ const char* HP_script_parse_subexpr(const char *p, int limit) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_subexpr_pre ) {
const char* (*preHookFunc) (const char *p, int *limit);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_subexpr_pre[hIndex].func;
retVal___ = preHookFunc(p, &limit);
@@ -51983,6 +53886,7 @@ const char* HP_script_skip_space(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_skip_space_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_skip_space_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -52008,6 +53912,7 @@ void HP_script_error(const char *src, const char *file, int start_line, const ch
int hIndex = 0;
if( HPMHooks.count.HP_script_error_pre ) {
void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_error_pre[hIndex].func;
preHookFunc(src, file, &start_line, error_msg, error_pos);
@@ -52033,6 +53938,7 @@ void HP_script_warning(const char *src, const char *file, int start_line, const
int hIndex = 0;
if( HPMHooks.count.HP_script_warning_pre ) {
void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_warning_pre[hIndex].func;
preHookFunc(src, file, &start_line, error_msg, error_pos);
@@ -52059,6 +53965,7 @@ bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_s
bool retVal___ = false;
if( HPMHooks.count.HP_script_addScript_pre ) {
bool (*preHookFunc) (char *name, char *args, bool ( *func ) (struct script_state *st));
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_addScript_pre[hIndex].func;
retVal___ = preHookFunc(name, args, func);
@@ -52085,6 +53992,7 @@ int HP_script_conv_num(struct script_state *st, struct script_data *data) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_conv_num_pre ) {
int (*preHookFunc) (struct script_state *st, struct script_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_conv_num_pre[hIndex].func;
retVal___ = preHookFunc(st, data);
@@ -52111,6 +54019,7 @@ const char* HP_script_conv_str(struct script_state *st, struct script_data *data
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_conv_str_pre ) {
const char* (*preHookFunc) (struct script_state *st, struct script_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_conv_str_pre[hIndex].func;
retVal___ = preHookFunc(st, data);
@@ -52137,6 +54046,7 @@ TBL_PC* HP_script_rid2sd(struct script_state *st) {
TBL_PC* retVal___ = NULL;
if( HPMHooks.count.HP_script_rid2sd_pre ) {
TBL_PC* (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_rid2sd_pre[hIndex].func;
retVal___ = preHookFunc(st);
@@ -52162,6 +54072,7 @@ void HP_script_detach_rid(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_detach_rid_pre ) {
void (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_detach_rid_pre[hIndex].func;
preHookFunc(st);
@@ -52188,6 +54099,7 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ
struct script_data* retVal___ = NULL;
if( HPMHooks.count.HP_script_push_val_pre ) {
struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, int64 *val, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_push_val_pre[hIndex].func;
retVal___ = preHookFunc(stack, &type, &val, ref);
@@ -52214,6 +54126,7 @@ struct script_data* HP_script_get_val(struct script_state *st, struct script_dat
struct script_data* retVal___ = NULL;
if( HPMHooks.count.HP_script_get_val_pre ) {
struct script_data* (*preHookFunc) (struct script_state *st, struct script_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func;
retVal___ = preHookFunc(st, data);
@@ -52240,6 +54153,7 @@ void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db *ref)
void* retVal___ = NULL;
if( HPMHooks.count.HP_script_get_val2_pre ) {
void* (*preHookFunc) (struct script_state *st, int64 *uid, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_val2_pre[hIndex].func;
retVal___ = preHookFunc(st, &uid, ref);
@@ -52266,6 +54180,7 @@ struct script_data* HP_script_push_str(struct script_stack *stack, enum c_op typ
struct script_data* retVal___ = NULL;
if( HPMHooks.count.HP_script_push_str_pre ) {
struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, char *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_push_str_pre[hIndex].func;
retVal___ = preHookFunc(stack, &type, str);
@@ -52292,6 +54207,7 @@ struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) {
struct script_data* retVal___ = NULL;
if( HPMHooks.count.HP_script_push_copy_pre ) {
struct script_data* (*preHookFunc) (struct script_stack *stack, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_push_copy_pre[hIndex].func;
retVal___ = preHookFunc(stack, &pos);
@@ -52317,6 +54233,7 @@ void HP_script_pop_stack(struct script_state *st, int start, int end) {
int hIndex = 0;
if( HPMHooks.count.HP_script_pop_stack_pre ) {
void (*preHookFunc) (struct script_state *st, int *start, int *end);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_pop_stack_pre[hIndex].func;
preHookFunc(st, &start, &end);
@@ -52342,6 +54259,7 @@ void HP_script_set_constant(const char *name, int value, bool isparameter) {
int hIndex = 0;
if( HPMHooks.count.HP_script_set_constant_pre ) {
void (*preHookFunc) (const char *name, int *value, bool *isparameter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_set_constant_pre[hIndex].func;
preHookFunc(name, &value, &isparameter);
@@ -52367,6 +54285,7 @@ void HP_script_set_constant2(const char *name, int value, bool isparameter) {
int hIndex = 0;
if( HPMHooks.count.HP_script_set_constant2_pre ) {
void (*preHookFunc) (const char *name, int *value, bool *isparameter);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_set_constant2_pre[hIndex].func;
preHookFunc(name, &value, &isparameter);
@@ -52393,6 +54312,7 @@ bool HP_script_get_constant(const char *name, int *value) {
bool retVal___ = false;
if( HPMHooks.count.HP_script_get_constant_pre ) {
bool (*preHookFunc) (const char *name, int *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_constant_pre[hIndex].func;
retVal___ = preHookFunc(name, value);
@@ -52418,6 +54338,7 @@ void HP_script_label_add(int key, int pos) {
int hIndex = 0;
if( HPMHooks.count.HP_script_label_add_pre ) {
void (*preHookFunc) (int *key, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_label_add_pre[hIndex].func;
preHookFunc(&key, &pos);
@@ -52443,6 +54364,7 @@ void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) {
int hIndex = 0;
if( HPMHooks.count.HP_script_run_pre ) {
void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_run_pre[hIndex].func;
preHookFunc(rootscript, &pos, &rid, &oid);
@@ -52468,6 +54390,7 @@ void HP_script_run_main(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_run_main_pre ) {
void (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_run_main_pre[hIndex].func;
preHookFunc(st);
@@ -52494,6 +54417,7 @@ int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_run_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_run_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -52520,6 +54444,7 @@ int HP_script_set_var(struct map_session_data *sd, char *name, void *val) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_set_var_pre ) {
int (*preHookFunc) (struct map_session_data *sd, char *name, void *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_set_var_pre[hIndex].func;
retVal___ = preHookFunc(sd, name, val);
@@ -52545,6 +54470,7 @@ void HP_script_stop_instances(struct script_code *code) {
int hIndex = 0;
if( HPMHooks.count.HP_script_stop_instances_pre ) {
void (*preHookFunc) (struct script_code *code);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_stop_instances_pre[hIndex].func;
preHookFunc(code);
@@ -52570,6 +54496,7 @@ void HP_script_free_code(struct script_code *code) {
int hIndex = 0;
if( HPMHooks.count.HP_script_free_code_pre ) {
void (*preHookFunc) (struct script_code *code);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_free_code_pre[hIndex].func;
preHookFunc(code);
@@ -52595,6 +54522,7 @@ void HP_script_free_vars(struct DBMap *var_storage) {
int hIndex = 0;
if( HPMHooks.count.HP_script_free_vars_pre ) {
void (*preHookFunc) (struct DBMap *var_storage);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_free_vars_pre[hIndex].func;
preHookFunc(var_storage);
@@ -52621,6 +54549,7 @@ struct script_state* HP_script_alloc_state(struct script_code *rootscript, int p
struct script_state* retVal___ = NULL;
if( HPMHooks.count.HP_script_alloc_state_pre ) {
struct script_state* (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_alloc_state_pre[hIndex].func;
retVal___ = preHookFunc(rootscript, &pos, &rid, &oid);
@@ -52646,6 +54575,7 @@ void HP_script_free_state(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_free_state_pre ) {
void (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_free_state_pre[hIndex].func;
preHookFunc(st);
@@ -52671,6 +54601,7 @@ void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) {
int hIndex = 0;
if( HPMHooks.count.HP_script_add_pending_ref_pre ) {
void (*preHookFunc) (struct script_state *st, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_add_pending_ref_pre[hIndex].func;
preHookFunc(st, ref);
@@ -52696,6 +54627,7 @@ void HP_script_run_autobonus(const char *autobonus, int id, int pos) {
int hIndex = 0;
if( HPMHooks.count.HP_script_run_autobonus_pre ) {
void (*preHookFunc) (const char *autobonus, int *id, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_run_autobonus_pre[hIndex].func;
preHookFunc(autobonus, &id, &pos);
@@ -52721,6 +54653,7 @@ void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, v
int hIndex = 0;
if( HPMHooks.count.HP_script_cleararray_pc_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *varname, void *value);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_cleararray_pc_pre[hIndex].func;
preHookFunc(sd, varname, value);
@@ -52746,6 +54679,7 @@ void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uin
int hIndex = 0;
if( HPMHooks.count.HP_script_setarray_pc_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *varname, uint32 *idx, void *value, int *refcache);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_setarray_pc_pre[hIndex].func;
preHookFunc(sd, varname, &idx, value, refcache);
@@ -52772,6 +54706,7 @@ int HP_script_config_read(char *cfgName) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_config_read_pre ) {
int (*preHookFunc) (char *cfgName);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_config_read_pre[hIndex].func;
retVal___ = preHookFunc(cfgName);
@@ -52798,6 +54733,7 @@ int HP_script_add_str(const char *p) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_add_str_pre ) {
int (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_add_str_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -52824,6 +54760,7 @@ const char* HP_script_get_str(int id) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_get_str_pre ) {
const char* (*preHookFunc) (int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_str_pre[hIndex].func;
retVal___ = preHookFunc(&id);
@@ -52850,6 +54787,7 @@ int HP_script_search_str(const char *p) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_search_str_pre ) {
int (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_search_str_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -52875,6 +54813,7 @@ void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, co
int hIndex = 0;
if( HPMHooks.count.HP_script_setd_sub_pre ) {
void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_setd_sub_pre[hIndex].func;
preHookFunc(st, sd, varname, &elem, value, ref);
@@ -52900,6 +54839,7 @@ void HP_script_attach_state(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_attach_state_pre ) {
void (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_attach_state_pre[hIndex].func;
preHookFunc(st);
@@ -52926,6 +54866,7 @@ struct hQueue* HP_script_queue(int idx) {
struct hQueue* retVal___ = NULL;
if( HPMHooks.count.HP_script_queue_pre ) {
struct hQueue* (*preHookFunc) (int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_queue_pre[hIndex].func;
retVal___ = preHookFunc(&idx);
@@ -52952,6 +54893,7 @@ bool HP_script_queue_add(int idx, int var) {
bool retVal___ = false;
if( HPMHooks.count.HP_script_queue_add_pre ) {
bool (*preHookFunc) (int *idx, int *var);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_queue_add_pre[hIndex].func;
retVal___ = preHookFunc(&idx, &var);
@@ -52978,6 +54920,7 @@ bool HP_script_queue_del(int idx) {
bool retVal___ = false;
if( HPMHooks.count.HP_script_queue_del_pre ) {
bool (*preHookFunc) (int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_queue_del_pre[hIndex].func;
retVal___ = preHookFunc(&idx);
@@ -53004,6 +54947,7 @@ bool HP_script_queue_remove(int idx, int var) {
bool retVal___ = false;
if( HPMHooks.count.HP_script_queue_remove_pre ) {
bool (*preHookFunc) (int *idx, int *var);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_queue_remove_pre[hIndex].func;
retVal___ = preHookFunc(&idx, &var);
@@ -53030,6 +54974,7 @@ int HP_script_queue_create(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_queue_create_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_queue_create_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -53055,6 +55000,7 @@ void HP_script_queue_clear(int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_script_queue_clear_pre ) {
void (*preHookFunc) (int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_queue_clear_pre[hIndex].func;
preHookFunc(&idx);
@@ -53081,6 +55027,7 @@ const char* HP_script_parse_curly_close(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_curly_close_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_curly_close_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53107,6 +55054,7 @@ const char* HP_script_parse_syntax_close(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_syntax_close_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53133,6 +55081,7 @@ const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_syntax_close_sub_pre ) {
const char* (*preHookFunc) (const char *p, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_pre[hIndex].func;
retVal___ = preHookFunc(p, flag);
@@ -53159,6 +55108,7 @@ const char* HP_script_parse_syntax(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_syntax_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_syntax_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53185,6 +55135,7 @@ c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) {
c_op retVal___ = C_NOP;
if( HPMHooks.count.HP_script_get_com_pre ) {
c_op (*preHookFunc) (unsigned char *scriptbuf, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_com_pre[hIndex].func;
retVal___ = preHookFunc(scriptbuf, pos);
@@ -53211,6 +55162,7 @@ int HP_script_get_num(unsigned char *scriptbuf, int *pos) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_get_num_pre ) {
int (*preHookFunc) (unsigned char *scriptbuf, int *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_num_pre[hIndex].func;
retVal___ = preHookFunc(scriptbuf, pos);
@@ -53237,6 +55189,7 @@ const char* HP_script_op2name(int op) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_op2name_pre ) {
const char* (*preHookFunc) (int *op);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_op2name_pre[hIndex].func;
retVal___ = preHookFunc(&op);
@@ -53262,6 +55215,7 @@ void HP_script_reportsrc(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_reportsrc_pre ) {
void (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_reportsrc_pre[hIndex].func;
preHookFunc(st);
@@ -53287,6 +55241,7 @@ void HP_script_reportdata(struct script_data *data) {
int hIndex = 0;
if( HPMHooks.count.HP_script_reportdata_pre ) {
void (*preHookFunc) (struct script_data *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_reportdata_pre[hIndex].func;
preHookFunc(data);
@@ -53312,6 +55267,7 @@ void HP_script_reportfunc(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_reportfunc_pre ) {
void (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_reportfunc_pre[hIndex].func;
preHookFunc(st);
@@ -53337,6 +55293,7 @@ void HP_script_disp_warning_message(const char *mes, const char *pos) {
int hIndex = 0;
if( HPMHooks.count.HP_script_disp_warning_message_pre ) {
void (*preHookFunc) (const char *mes, const char *pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_disp_warning_message_pre[hIndex].func;
preHookFunc(mes, pos);
@@ -53362,6 +55319,7 @@ void HP_script_check_event(struct script_state *st, const char *evt) {
int hIndex = 0;
if( HPMHooks.count.HP_script_check_event_pre ) {
void (*preHookFunc) (struct script_state *st, const char *evt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_check_event_pre[hIndex].func;
preHookFunc(st, evt);
@@ -53388,6 +55346,7 @@ unsigned int HP_script_calc_hash(const char *p) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_script_calc_hash_pre ) {
unsigned int (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_calc_hash_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53413,6 +55372,7 @@ void HP_script_addb(int a) {
int hIndex = 0;
if( HPMHooks.count.HP_script_addb_pre ) {
void (*preHookFunc) (int *a);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_addb_pre[hIndex].func;
preHookFunc(&a);
@@ -53438,6 +55398,7 @@ void HP_script_addc(int a) {
int hIndex = 0;
if( HPMHooks.count.HP_script_addc_pre ) {
void (*preHookFunc) (int *a);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_addc_pre[hIndex].func;
preHookFunc(&a);
@@ -53463,6 +55424,7 @@ void HP_script_addi(int a) {
int hIndex = 0;
if( HPMHooks.count.HP_script_addi_pre ) {
void (*preHookFunc) (int *a);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_addi_pre[hIndex].func;
preHookFunc(&a);
@@ -53488,6 +55450,7 @@ void HP_script_addl(int l) {
int hIndex = 0;
if( HPMHooks.count.HP_script_addl_pre ) {
void (*preHookFunc) (int *l);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_addl_pre[hIndex].func;
preHookFunc(&l);
@@ -53513,6 +55476,7 @@ void HP_script_set_label(int l, int pos, const char *script_pos) {
int hIndex = 0;
if( HPMHooks.count.HP_script_set_label_pre ) {
void (*preHookFunc) (int *l, int *pos, const char *script_pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_set_label_pre[hIndex].func;
preHookFunc(&l, &pos, script_pos);
@@ -53539,6 +55503,7 @@ const char* HP_script_skip_word(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_skip_word_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_skip_word_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53565,6 +55530,7 @@ int HP_script_add_word(const char *p) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_add_word_pre ) {
int (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_add_word_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53591,6 +55557,7 @@ const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_cu
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_callfunc_pre ) {
const char* (*preHookFunc) (const char *p, int *require_paren, int *is_custom);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_callfunc_pre[hIndex].func;
retVal___ = preHookFunc(p, &require_paren, &is_custom);
@@ -53616,6 +55583,7 @@ void HP_script_parse_nextline(bool first, const char *p) {
int hIndex = 0;
if( HPMHooks.count.HP_script_parse_nextline_pre ) {
void (*preHookFunc) (bool *first, const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_nextline_pre[hIndex].func;
preHookFunc(&first, p);
@@ -53642,6 +55610,7 @@ const char* HP_script_parse_variable(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_variable_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_variable_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53668,6 +55637,7 @@ const char* HP_script_parse_simpleexpr(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_simpleexpr_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53694,6 +55664,7 @@ const char* HP_script_parse_expr(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_expr_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_expr_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53720,6 +55691,7 @@ const char* HP_script_parse_line(const char *p) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_parse_line_pre ) {
const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_parse_line_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -53745,6 +55717,7 @@ void HP_script_read_constdb(void) {
int hIndex = 0;
if( HPMHooks.count.HP_script_read_constdb_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_read_constdb_pre[hIndex].func;
preHookFunc();
@@ -53771,6 +55744,7 @@ const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_print_line_pre ) {
const char* (*preHookFunc) (StringBuf *buf, const char *p, const char *mark, int *line);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_print_line_pre[hIndex].func;
retVal___ = preHookFunc(buf, p, mark, &line);
@@ -53796,6 +55770,7 @@ void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *fil
int hIndex = 0;
if( HPMHooks.count.HP_script_errorwarning_sub_pre ) {
void (*preHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_errorwarning_sub_pre[hIndex].func;
preHookFunc(buf, src, file, &start_line, error_msg, error_pos);
@@ -53822,6 +55797,7 @@ int HP_script_set_reg(struct script_state *st, TBL_PC *sd, int64 num, const char
int retVal___ = 0;
if( HPMHooks.count.HP_script_set_reg_pre ) {
int (*preHookFunc) (struct script_state *st, TBL_PC *sd, int64 *num, const char *name, const void *value, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_set_reg_pre[hIndex].func;
retVal___ = preHookFunc(st, sd, &num, name, value, ref);
@@ -53847,6 +55823,7 @@ void HP_script_stack_expand(struct script_stack *stack) {
int hIndex = 0;
if( HPMHooks.count.HP_script_stack_expand_pre ) {
void (*preHookFunc) (struct script_stack *stack);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_stack_expand_pre[hIndex].func;
preHookFunc(stack);
@@ -53873,6 +55850,7 @@ struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct sc
struct script_data* retVal___ = NULL;
if( HPMHooks.count.HP_script_push_retinfo_pre ) {
struct script_data* (*preHookFunc) (struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_push_retinfo_pre[hIndex].func;
retVal___ = preHookFunc(stack, ri, ref);
@@ -53898,6 +55876,7 @@ void HP_script_op_3(struct script_state *st, int op) {
int hIndex = 0;
if( HPMHooks.count.HP_script_op_3_pre ) {
void (*preHookFunc) (struct script_state *st, int *op);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_op_3_pre[hIndex].func;
preHookFunc(st, &op);
@@ -53923,6 +55902,7 @@ void HP_script_op_2str(struct script_state *st, int op, const char *s1, const ch
int hIndex = 0;
if( HPMHooks.count.HP_script_op_2str_pre ) {
void (*preHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_op_2str_pre[hIndex].func;
preHookFunc(st, &op, s1, s2);
@@ -53948,6 +55928,7 @@ void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) {
int hIndex = 0;
if( HPMHooks.count.HP_script_op_2num_pre ) {
void (*preHookFunc) (struct script_state *st, int *op, int *i1, int *i2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_op_2num_pre[hIndex].func;
preHookFunc(st, &op, &i1, &i2);
@@ -53973,6 +55954,7 @@ void HP_script_op_2(struct script_state *st, int op) {
int hIndex = 0;
if( HPMHooks.count.HP_script_op_2_pre ) {
void (*preHookFunc) (struct script_state *st, int *op);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_op_2_pre[hIndex].func;
preHookFunc(st, &op);
@@ -53998,6 +55980,7 @@ void HP_script_op_1(struct script_state *st, int op) {
int hIndex = 0;
if( HPMHooks.count.HP_script_op_1_pre ) {
void (*preHookFunc) (struct script_state *st, int *op);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_op_1_pre[hIndex].func;
preHookFunc(st, &op);
@@ -54023,6 +56006,7 @@ void HP_script_check_buildin_argtype(struct script_state *st, int func) {
int hIndex = 0;
if( HPMHooks.count.HP_script_check_buildin_argtype_pre ) {
void (*preHookFunc) (struct script_state *st, int *func);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_pre[hIndex].func;
preHookFunc(st, &func);
@@ -54048,6 +56032,7 @@ void HP_script_detach_state(struct script_state *st, bool dequeue_event) {
int hIndex = 0;
if( HPMHooks.count.HP_script_detach_state_pre ) {
void (*preHookFunc) (struct script_state *st, bool *dequeue_event);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_detach_state_pre[hIndex].func;
preHookFunc(st, &dequeue_event);
@@ -54074,6 +56059,7 @@ int HP_script_db_free_code_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_db_free_code_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_db_free_code_sub_pre[hIndex].func;
@@ -54105,6 +56091,7 @@ void HP_script_add_autobonus(const char *autobonus) {
int hIndex = 0;
if( HPMHooks.count.HP_script_add_autobonus_pre ) {
void (*preHookFunc) (const char *autobonus);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_add_autobonus_pre[hIndex].func;
preHookFunc(autobonus);
@@ -54131,6 +56118,7 @@ int HP_script_menu_countoptions(const char *str, int max_count, int *total) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_menu_countoptions_pre ) {
int (*preHookFunc) (const char *str, int *max_count, int *total);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_menu_countoptions_pre[hIndex].func;
retVal___ = preHookFunc(str, &max_count, total);
@@ -54157,6 +56145,7 @@ int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_areawarp_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_pre[hIndex].func;
@@ -54189,6 +56178,7 @@ int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_pre[hIndex].func;
@@ -54220,6 +56210,7 @@ void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int
int hIndex = 0;
if( HPMHooks.count.HP_script_buildin_delitem_delete_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_pre[hIndex].func;
preHookFunc(sd, &idx, amount, &delete_items);
@@ -54246,6 +56237,7 @@ bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item *
bool retVal___ = false;
if( HPMHooks.count.HP_script_buildin_delitem_search_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, struct item *it, bool *exact_match);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_pre[hIndex].func;
retVal___ = preHookFunc(sd, it, &exact_match);
@@ -54272,6 +56264,7 @@ int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_pre[hIndex].func;
@@ -54304,6 +56297,7 @@ int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_killmonster_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_pre[hIndex].func;
@@ -54336,6 +56330,7 @@ int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_pre[hIndex].func;
@@ -54368,6 +56363,7 @@ int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_pre[hIndex].func;
@@ -54400,6 +56396,7 @@ int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_announce_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_pre[hIndex].func;
@@ -54432,6 +56429,7 @@ int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_getareausers_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_pre[hIndex].func;
@@ -54464,6 +56462,7 @@ int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_pre[hIndex].func;
@@ -54496,6 +56495,7 @@ int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_mapflag_pvp_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_pre[hIndex].func;
@@ -54528,6 +56528,7 @@ int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_pvpoff_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_pre[hIndex].func;
@@ -54560,6 +56561,7 @@ int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_l
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_pre[hIndex].func;
@@ -54592,6 +56594,7 @@ int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list a
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_pre[hIndex].func;
@@ -54624,6 +56627,7 @@ int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_mobcount_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_pre[hIndex].func;
@@ -54656,6 +56660,7 @@ int HP_script_playbgm_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_playbgm_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_playbgm_sub_pre[hIndex].func;
@@ -54688,6 +56693,7 @@ int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre ) {
int (*preHookFunc) (struct map_session_data *sd, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_script_playbgm_foreachpc_sub_pre[hIndex].func;
@@ -54720,6 +56726,7 @@ int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_soundeffect_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_soundeffect_sub_pre[hIndex].func;
@@ -54752,6 +56759,7 @@ int HP_script_buildin_query_sql_sub(struct script_state *st, Sql *handle) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_query_sql_sub_pre ) {
int (*preHookFunc) (struct script_state *st, Sql *handle);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_pre[hIndex].func;
retVal___ = preHookFunc(st, handle);
@@ -54778,6 +56786,7 @@ int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_pre[hIndex].func;
@@ -54810,6 +56819,7 @@ int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_pre[hIndex].func;
@@ -54842,6 +56852,7 @@ int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_cleanfloor_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_pre[hIndex].func;
@@ -54874,6 +56885,7 @@ int HP_script_run_func(struct script_state *st) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_run_func_pre ) {
int (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_run_func_pre[hIndex].func;
retVal___ = preHookFunc(st);
@@ -54900,6 +56912,7 @@ const char* HP_script_getfuncname(struct script_state *st) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_script_getfuncname_pre ) {
const char* (*preHookFunc) (struct script_state *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_getfuncname_pre[hIndex].func;
retVal___ = preHookFunc(st);
@@ -54926,6 +56939,7 @@ unsigned int HP_script_calc_hash_ci(const char *p) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_script_calc_hash_ci_pre ) {
unsigned int (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_calc_hash_ci_pre[hIndex].func;
retVal___ = preHookFunc(p);
@@ -54952,6 +56966,7 @@ struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_d
struct reg_db* retVal___ = NULL;
if( HPMHooks.count.HP_script_array_src_pre ) {
struct reg_db* (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_src_pre[hIndex].func;
retVal___ = preHookFunc(st, sd, name, ref);
@@ -54977,6 +56992,7 @@ void HP_script_array_update(struct reg_db *src, int64 num, bool empty) {
int hIndex = 0;
if( HPMHooks.count.HP_script_array_update_pre ) {
void (*preHookFunc) (struct reg_db *src, int64 *num, bool *empty);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_update_pre[hIndex].func;
preHookFunc(src, &num, &empty);
@@ -55002,6 +57018,7 @@ void HP_script_array_delete(struct reg_db *src, struct script_array *sa) {
int hIndex = 0;
if( HPMHooks.count.HP_script_array_delete_pre ) {
void (*preHookFunc) (struct reg_db *src, struct script_array *sa);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_delete_pre[hIndex].func;
preHookFunc(src, sa);
@@ -55027,6 +57044,7 @@ void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa,
int hIndex = 0;
if( HPMHooks.count.HP_script_array_remove_member_pre ) {
void (*preHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_remove_member_pre[hIndex].func;
preHookFunc(src, sa, &idx);
@@ -55052,6 +57070,7 @@ void HP_script_array_add_member(struct script_array *sa, unsigned int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_script_array_add_member_pre ) {
void (*preHookFunc) (struct script_array *sa, unsigned int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_add_member_pre[hIndex].func;
preHookFunc(sa, &idx);
@@ -55078,6 +57097,7 @@ unsigned int HP_script_array_size(struct script_state *st, struct map_session_da
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_script_array_size_pre ) {
unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_size_pre[hIndex].func;
retVal___ = preHookFunc(st, sd, name, ref);
@@ -55104,6 +57124,7 @@ unsigned int HP_script_array_highest_key(struct script_state *st, struct map_ses
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_script_array_highest_key_pre ) {
unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_highest_key_pre[hIndex].func;
retVal___ = preHookFunc(st, sd, name, ref);
@@ -55130,6 +57151,7 @@ int HP_script_array_free_db(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_array_free_db_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_array_free_db_pre[hIndex].func;
@@ -55161,6 +57183,7 @@ void HP_script_array_ensure_zero(struct script_state *st, struct map_session_dat
int hIndex = 0;
if( HPMHooks.count.HP_script_array_ensure_zero_pre ) {
void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *uid, struct reg_db *ref);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_ensure_zero_pre[hIndex].func;
preHookFunc(st, sd, &uid, ref);
@@ -55186,6 +57209,7 @@ void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct
int hIndex = 0;
if( HPMHooks.count.HP_script_reg_destroy_single_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int64 *reg, struct script_reg_state *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_reg_destroy_single_pre[hIndex].func;
preHookFunc(sd, &reg, data);
@@ -55212,6 +57236,7 @@ int HP_script_reg_destroy(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_script_reg_destroy_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_script_reg_destroy_pre[hIndex].func;
@@ -55243,6 +57268,7 @@ void HP_script_generic_ui_array_expand(unsigned int plus) {
int hIndex = 0;
if( HPMHooks.count.HP_script_generic_ui_array_expand_pre ) {
void (*preHookFunc) (unsigned int *plus);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_pre[hIndex].func;
preHookFunc(&plus);
@@ -55269,6 +57295,7 @@ unsigned int* HP_script_array_cpy_list(struct script_array *sa) {
unsigned int* retVal___ = NULL;
if( HPMHooks.count.HP_script_array_cpy_list_pre ) {
unsigned int* (*preHookFunc) (struct script_array *sa);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_array_cpy_list_pre[hIndex].func;
retVal___ = preHookFunc(sa);
@@ -55294,6 +57321,7 @@ void HP_script_hardcoded_constants(void) {
int hIndex = 0;
if( HPMHooks.count.HP_script_hardcoded_constants_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_hardcoded_constants_pre[hIndex].func;
preHookFunc();
@@ -55320,6 +57348,7 @@ unsigned short HP_script_mapindexname2id(struct script_state *st, const char *na
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_script_mapindexname2id_pre ) {
unsigned short (*preHookFunc) (struct script_state *st, const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_mapindexname2id_pre[hIndex].func;
retVal___ = preHookFunc(st, name);
@@ -55347,6 +57376,7 @@ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigne
bool retVal___ = false;
if( HPMHooks.count.HP_searchstore_open_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, unsigned int *uses, unsigned short *effect);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_open_pre[hIndex].func;
retVal___ = preHookFunc(sd, &uses, &effect);
@@ -55372,6 +57402,7 @@ void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsig
int hIndex = 0;
if( HPMHooks.count.HP_searchstore_query_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_query_pre[hIndex].func;
preHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count);
@@ -55398,6 +57429,7 @@ bool HP_searchstore_querynext(struct map_session_data *sd) {
bool retVal___ = false;
if( HPMHooks.count.HP_searchstore_querynext_pre ) {
bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_querynext_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -55423,6 +57455,7 @@ void HP_searchstore_next(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_searchstore_next_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_next_pre[hIndex].func;
preHookFunc(sd);
@@ -55448,6 +57481,7 @@ void HP_searchstore_clear(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_searchstore_clear_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_clear_pre[hIndex].func;
preHookFunc(sd);
@@ -55473,6 +57507,7 @@ void HP_searchstore_close(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_searchstore_close_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_close_pre[hIndex].func;
preHookFunc(sd);
@@ -55498,6 +57533,7 @@ void HP_searchstore_click(struct map_session_data *sd, int account_id, int store
int hIndex = 0;
if( HPMHooks.count.HP_searchstore_click_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_click_pre[hIndex].func;
preHookFunc(sd, &account_id, &store_id, &nameid);
@@ -55524,6 +57560,7 @@ bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_searchstore_queryremote_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, int *account_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_queryremote_pre[hIndex].func;
retVal___ = preHookFunc(sd, &account_id);
@@ -55549,6 +57586,7 @@ void HP_searchstore_clearremote(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_searchstore_clearremote_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_clearremote_pre[hIndex].func;
preHookFunc(sd);
@@ -55575,6 +57613,7 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i
bool retVal___ = false;
if( HPMHooks.count.HP_searchstore_result_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func;
retVal___ = preHookFunc(sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine);
@@ -55602,6 +57641,7 @@ int HP_skill_init(bool minimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_init_pre ) {
int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_init_pre[hIndex].func;
retVal___ = preHookFunc(&minimal);
@@ -55628,6 +57668,7 @@ int HP_skill_final(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_final_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_final_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -55653,6 +57694,7 @@ void HP_skill_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_reload_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_reload_pre[hIndex].func;
preHookFunc();
@@ -55678,6 +57720,7 @@ void HP_skill_read_db(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_read_db_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_read_db_pre[hIndex].func;
preHookFunc(&minimal);
@@ -55704,6 +57747,7 @@ int HP_skill_get_index(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_index_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_index_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -55730,6 +57774,7 @@ int HP_skill_get_type(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_type_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_type_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -55756,6 +57801,7 @@ int HP_skill_get_hit(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_hit_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_hit_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -55782,6 +57828,7 @@ int HP_skill_get_inf(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_inf_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_inf_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -55808,6 +57855,7 @@ int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_ele_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_ele_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -55834,6 +57882,7 @@ int HP_skill_get_nk(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_nk_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_nk_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -55860,6 +57909,7 @@ int HP_skill_get_max(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_max_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_max_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -55886,6 +57936,7 @@ int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_range_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_range_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -55912,6 +57963,7 @@ int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_range2_pre ) {
int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_range2_pre[hIndex].func;
retVal___ = preHookFunc(bl, &skill_id, &skill_lv);
@@ -55938,6 +57990,7 @@ int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_splash_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_splash_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -55964,6 +58017,7 @@ int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_hp_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_hp_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -55990,6 +58044,7 @@ int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_mhp_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_mhp_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56016,6 +58071,7 @@ int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_sp_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_sp_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56042,6 +58098,7 @@ int HP_skill_get_state(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_state_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_state_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56068,6 +58125,7 @@ int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_spiritball_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_spiritball_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56094,6 +58152,7 @@ int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_zeny_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_zeny_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56120,6 +58179,7 @@ int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_num_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_num_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56146,6 +58206,7 @@ int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_cast_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_cast_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56172,6 +58233,7 @@ int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_delay_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_delay_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56198,6 +58260,7 @@ int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_walkdelay_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_walkdelay_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56224,6 +58287,7 @@ int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_time_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_time_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56250,6 +58314,7 @@ int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_time2_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_time2_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56276,6 +58341,7 @@ int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_castnodex_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_castnodex_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56302,6 +58368,7 @@ int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_delaynodex_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_delaynodex_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56328,6 +58395,7 @@ int HP_skill_get_castdef(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_castdef_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_castdef_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56354,6 +58422,7 @@ int HP_skill_get_weapontype(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_weapontype_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_weapontype_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56380,6 +58449,7 @@ int HP_skill_get_ammotype(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_ammotype_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_ammotype_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56406,6 +58476,7 @@ int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_ammo_qty_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56432,6 +58503,7 @@ int HP_skill_get_unit_id(uint16 skill_id, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_unit_id_pre ) {
int (*preHookFunc) (uint16 *skill_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_id_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &flag);
@@ -56458,6 +58530,7 @@ int HP_skill_get_inf2(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_inf2_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_inf2_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56484,6 +58557,7 @@ int HP_skill_get_castcancel(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_castcancel_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_castcancel_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56510,6 +58584,7 @@ int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_maxcount_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_maxcount_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56536,6 +58611,7 @@ int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_blewcount_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_blewcount_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56562,6 +58638,7 @@ int HP_skill_get_unit_flag(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_unit_flag_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_flag_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56588,6 +58665,7 @@ int HP_skill_get_unit_target(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_unit_target_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_target_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56614,6 +58692,7 @@ int HP_skill_get_unit_interval(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_unit_interval_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_interval_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56640,6 +58719,7 @@ int HP_skill_get_unit_bl_target(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_unit_bl_target_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56666,6 +58746,7 @@ int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_unit_layout_type_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56692,6 +58773,7 @@ int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_unit_range_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_range_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56718,6 +58800,7 @@ int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_cooldown_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_cooldown_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -56744,6 +58827,7 @@ int HP_skill_tree_get_max(uint16 skill_id, int b_class) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_tree_get_max_pre ) {
int (*preHookFunc) (uint16 *skill_id, int *b_class);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_tree_get_max_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &b_class);
@@ -56770,6 +58854,7 @@ const char* HP_skill_get_name(uint16 skill_id) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_skill_get_name_pre ) {
const char* (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_name_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56796,6 +58881,7 @@ const char* HP_skill_get_desc(uint16 skill_id) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_skill_get_desc_pre ) {
const char* (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_desc_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56821,6 +58907,7 @@ void HP_skill_chk(uint16 *skill_id) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_chk_pre ) {
void (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_chk_pre[hIndex].func;
preHookFunc(skill_id);
@@ -56847,6 +58934,7 @@ int HP_skill_get_casttype(uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_casttype_pre ) {
int (*preHookFunc) (uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_casttype_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56873,6 +58961,7 @@ int HP_skill_get_casttype2(uint16 index) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_casttype2_pre ) {
int (*preHookFunc) (uint16 *index);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_casttype2_pre[hIndex].func;
retVal___ = preHookFunc(&index);
@@ -56899,6 +58988,7 @@ bool HP_skill_is_combo(int skill_id) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_is_combo_pre ) {
bool (*preHookFunc) (int *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_is_combo_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -56925,6 +59015,7 @@ int HP_skill_name2id(const char *name) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_name2id_pre ) {
int (*preHookFunc) (const char *name);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_name2id_pre[hIndex].func;
retVal___ = preHookFunc(name);
@@ -56951,6 +59042,7 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_isammotype_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -56977,6 +59069,7 @@ int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_id_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_id_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -57003,6 +59096,7 @@ int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_pos_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_pos_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -57029,6 +59123,7 @@ int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const cha
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_map_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, const char *mapname);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_map_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, mapname);
@@ -57055,6 +59150,7 @@ int HP_skill_cleartimerskill(struct block_list *src) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_cleartimerskill_pre ) {
int (*preHookFunc) (struct block_list *src);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_pre[hIndex].func;
retVal___ = preHookFunc(src);
@@ -57081,6 +59177,7 @@ int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x
int retVal___ = 0;
if( HPMHooks.count.HP_skill_addtimerskill_pre ) {
int (*preHookFunc) (struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_addtimerskill_pre[hIndex].func;
retVal___ = preHookFunc(src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag);
@@ -57107,6 +59204,7 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui
int retVal___ = 0;
if( HPMHooks.count.HP_skill_additional_effect_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_additional_effect_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick);
@@ -57133,6 +59231,7 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list
int retVal___ = 0;
if( HPMHooks.count.HP_skill_counter_additional_effect_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &tick);
@@ -57159,6 +59258,7 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count,
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blown_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blown_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &count, &dir, &flag);
@@ -57185,6 +59285,7 @@ int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate,
int retVal___ = 0;
if( HPMHooks.count.HP_skill_break_equip_pre ) {
int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_break_equip_pre[hIndex].func;
retVal___ = preHookFunc(bl, &where, &rate, &flag);
@@ -57211,6 +59312,7 @@ int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate,
int retVal___ = 0;
if( HPMHooks.count.HP_skill_strip_equip_pre ) {
int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_strip_equip_pre[hIndex].func;
retVal___ = preHookFunc(bl, &where, &rate, &lv, &time);
@@ -57237,6 +59339,7 @@ struct skill_unit_group* HP_skill_id2group(int group_id) {
struct skill_unit_group* retVal___ = NULL;
if( HPMHooks.count.HP_skill_id2group_pre ) {
struct skill_unit_group* (*preHookFunc) (int *group_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_id2group_pre[hIndex].func;
retVal___ = preHookFunc(&group_id);
@@ -57263,6 +59366,7 @@ struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 ski
struct skill_unit_group* retVal___ = NULL;
if( HPMHooks.count.HP_skill_unitsetting_pre ) {
struct skill_unit_group* (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unitsetting_pre[hIndex].func;
retVal___ = preHookFunc(src, &skill_id, &skill_lv, &x, &y, &flag);
@@ -57289,6 +59393,7 @@ struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, in
struct skill_unit* retVal___ = NULL;
if( HPMHooks.count.HP_skill_initunit_pre ) {
struct skill_unit* (*preHookFunc) (struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_initunit_pre[hIndex].func;
retVal___ = preHookFunc(group, &idx, &x, &y, &val1, &val2);
@@ -57315,6 +59420,7 @@ int HP_skill_delunit(struct skill_unit *su) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_delunit_pre ) {
int (*preHookFunc) (struct skill_unit *su);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_delunit_pre[hIndex].func;
retVal___ = preHookFunc(su);
@@ -57341,6 +59447,7 @@ struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int cou
struct skill_unit_group* retVal___ = NULL;
if( HPMHooks.count.HP_skill_init_unitgroup_pre ) {
struct skill_unit_group* (*preHookFunc) (struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_init_unitgroup_pre[hIndex].func;
retVal___ = preHookFunc(src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval);
@@ -57367,6 +59474,7 @@ int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int
int retVal___ = 0;
if( HPMHooks.count.HP_skill_del_unitgroup_pre ) {
int (*preHookFunc) (struct skill_unit_group *group, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_del_unitgroup_pre[hIndex].func;
retVal___ = preHookFunc(group, file, &line, func);
@@ -57393,6 +59501,7 @@ int HP_skill_clear_unitgroup(struct block_list *src) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_clear_unitgroup_pre ) {
int (*preHookFunc) (struct block_list *src);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_pre[hIndex].func;
retVal___ = preHookFunc(src);
@@ -57419,6 +59528,7 @@ int HP_skill_clear_group(struct block_list *bl, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_clear_group_pre ) {
int (*preHookFunc) (struct block_list *bl, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_clear_group_pre[hIndex].func;
retVal___ = preHookFunc(bl, &flag);
@@ -57445,6 +59555,7 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 t
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onplace_pre ) {
int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onplace_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &tick);
@@ -57471,6 +59582,7 @@ int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) {
int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &damage, &tick);
@@ -57497,6 +59609,7 @@ int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_cast_fix_pre ) {
int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_cast_fix_pre[hIndex].func;
retVal___ = preHookFunc(bl, &skill_id, &skill_lv);
@@ -57523,6 +59636,7 @@ int HP_skill_cast_fix_sc(struct block_list *bl, int time) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_cast_fix_sc_pre ) {
int (*preHookFunc) (struct block_list *bl, int *time);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_pre[hIndex].func;
retVal___ = preHookFunc(bl, &time);
@@ -57549,6 +59663,7 @@ int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, ui
int retVal___ = 0;
if( HPMHooks.count.HP_skill_vf_cast_fix_pre ) {
int (*preHookFunc) (struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_pre[hIndex].func;
retVal___ = preHookFunc(bl, &time, &skill_id, &skill_lv);
@@ -57575,6 +59690,7 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
int retVal___ = 0;
if( HPMHooks.count.HP_skill_delay_fix_pre ) {
int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_delay_fix_pre[hIndex].func;
retVal___ = preHookFunc(bl, &skill_id, &skill_lv);
@@ -57601,6 +59717,7 @@ int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_condition_castbegin_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
@@ -57627,6 +59744,7 @@ int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_i
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_condition_castend_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
@@ -57653,6 +59771,7 @@ int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, u
int retVal___ = 0;
if( HPMHooks.count.HP_skill_consume_requirement_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_consume_requirement_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, &skill_lv, &type);
@@ -57680,6 +59799,7 @@ struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uin
memset(&retVal___, '\0', sizeof(struct skill_condition));
if( HPMHooks.count.HP_skill_get_requirement_pre ) {
struct skill_condition (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_requirement_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
@@ -57706,6 +59826,7 @@ int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_pc_partner_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_pc_partner_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, skill_lv, &range, &cast_flag);
@@ -57732,6 +59853,7 @@ int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_move_pre ) {
int (*preHookFunc) (struct block_list *bl, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_move_pre[hIndex].func;
retVal___ = preHookFunc(bl, &tick, &flag);
@@ -57758,6 +59880,7 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onleft_pre ) {
int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onleft_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, bl, &tick);
@@ -57784,6 +59907,7 @@ int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tic
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onout_pre ) {
int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onout_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &tick);
@@ -57810,6 +59934,7 @@ int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_move_unit_group_pre ) {
int (*preHookFunc) (struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_pre[hIndex].func;
retVal___ = preHookFunc(group, &m, &dx, &dy);
@@ -57836,6 +59961,7 @@ int HP_skill_sit(struct map_session_data *sd, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_sit_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_sit_pre[hIndex].func;
retVal___ = preHookFunc(sd, &type);
@@ -57861,6 +59987,7 @@ void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint1
int hIndex = 0;
if( HPMHooks.count.HP_skill_brandishspear_pre ) {
void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_brandishspear_pre[hIndex].func;
preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -57886,6 +60013,7 @@ void HP_skill_repairweapon(struct map_session_data *sd, int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_repairweapon_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_repairweapon_pre[hIndex].func;
preHookFunc(sd, &idx);
@@ -57911,6 +60039,7 @@ void HP_skill_identify(struct map_session_data *sd, int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_identify_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_identify_pre[hIndex].func;
preHookFunc(sd, &idx);
@@ -57936,6 +60065,7 @@ void HP_skill_weaponrefine(struct map_session_data *sd, int idx) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_weaponrefine_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_weaponrefine_pre[hIndex].func;
preHookFunc(sd, &idx);
@@ -57962,6 +60092,7 @@ int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_autospell_pre ) {
int (*preHookFunc) (struct map_session_data *md, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_autospell_pre[hIndex].func;
retVal___ = preHookFunc(md, &skill_id);
@@ -57988,6 +60119,7 @@ int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16
int retVal___ = 0;
if( HPMHooks.count.HP_skill_calc_heal_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_calc_heal_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &heal);
@@ -58014,6 +60146,7 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *
bool retVal___ = false;
if( HPMHooks.count.HP_skill_check_cloaking_pre ) {
bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_cloaking_pre[hIndex].func;
retVal___ = preHookFunc(bl, sce);
@@ -58035,11 +60168,72 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *
}
return retVal___;
}
+int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_skill_check_cloaking_end_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, 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.skill.check_cloaking_end(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_check_cloaking_end_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_can_cloak(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_skill_can_cloak_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_can_cloak_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.can_cloak(sd);
+ }
+ if( HPMHooks.count.HP_skill_can_cloak_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_can_cloak_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
int HP_skill_enchant_elemental_end(struct block_list *bl, int type) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_enchant_elemental_end_pre ) {
int (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_pre[hIndex].func;
retVal___ = preHookFunc(bl, &type);
@@ -58066,6 +60260,7 @@ int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_not_ok_pre ) {
int (*preHookFunc) (uint16 *skill_id, struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_not_ok_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, sd);
@@ -58092,6 +60287,7 @@ int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_not_ok_hom_pre ) {
int (*preHookFunc) (uint16 *skill_id, struct homun_data *hd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_not_ok_hom_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, hd);
@@ -58118,6 +60314,7 @@ int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_not_ok_mercenary_pre ) {
int (*preHookFunc) (uint16 *skill_id, struct mercenary_data *md);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, md);
@@ -58144,6 +60341,7 @@ int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_chastle_mob_changetarget_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_pre[hIndex].func;
@@ -58176,6 +60374,7 @@ int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigge
int retVal___ = 0;
if( HPMHooks.count.HP_skill_can_produce_mix_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *trigger, int *qty);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_can_produce_mix_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid, &trigger, &qty);
@@ -58202,6 +60401,7 @@ int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int namei
int retVal___ = 0;
if( HPMHooks.count.HP_skill_produce_mix_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_produce_mix_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty);
@@ -58228,6 +60428,7 @@ int HP_skill_arrow_create(struct map_session_data *sd, int nameid) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_arrow_create_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_arrow_create_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -58254,6 +60455,7 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl,
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_nodamage_id_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -58280,6 +60482,7 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_damage_id_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -58306,6 +60509,7 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id,
int retVal___ = 0;
if( HPMHooks.count.HP_skill_castend_pos2_pre ) {
int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_castend_pos2_pre[hIndex].func;
retVal___ = preHookFunc(src, &x, &y, &skill_id, &skill_lv, &tick, &flag);
@@ -58332,6 +60536,7 @@ int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tic
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockpc_start_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockpc_start_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id, &tick);
@@ -58358,6 +60563,7 @@ int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick)
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockhomun_start_pre ) {
int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id, int *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockhomun_start_pre[hIndex].func;
retVal___ = preHookFunc(hd, &skill_id, &tick);
@@ -58384,6 +60590,7 @@ int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tic
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockmerc_start_pre ) {
int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id, int *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockmerc_start_pre[hIndex].func;
retVal___ = preHookFunc(md, &skill_id, &tick);
@@ -58410,6 +60617,7 @@ int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *
int retVal___ = 0;
if( HPMHooks.count.HP_skill_attack_pre ) {
int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_attack_pre[hIndex].func;
retVal___ = preHookFunc(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag);
@@ -58436,6 +60644,7 @@ int HP_skill_attack_area(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_attack_area_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_attack_area_pre[hIndex].func;
@@ -58468,6 +60677,7 @@ int HP_skill_area_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_area_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_area_sub_pre[hIndex].func;
@@ -58500,6 +60710,7 @@ int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, u
int retVal___ = 0;
if( HPMHooks.count.HP_skill_area_sub_count_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_area_sub_count_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &tick, &flag);
@@ -58526,6 +60737,7 @@ int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_unit_range_pre ) {
int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_unit_range_pre[hIndex].func;
retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv);
@@ -58552,6 +60764,7 @@ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_unit_range_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_pre[hIndex].func;
@@ -58584,6 +60797,7 @@ int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_unit_range2_pre ) {
int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_pre[hIndex].func;
retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv);
@@ -58610,6 +60824,7 @@ int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_unit_range2_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_pre[hIndex].func;
@@ -58641,6 +60856,7 @@ void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_toggle_magicpower_pre ) {
void (*preHookFunc) (struct block_list *bl, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_pre[hIndex].func;
preHookFunc(bl, &skill_id);
@@ -58667,6 +60883,7 @@ int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int ty
int retVal___ = 0;
if( HPMHooks.count.HP_skill_magic_reflect_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_magic_reflect_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &type);
@@ -58693,6 +60910,7 @@ int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, ui
int retVal___ = 0;
if( HPMHooks.count.HP_skill_onskillusage_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_onskillusage_pre[hIndex].func;
retVal___ = preHookFunc(sd, bl, &skill_id, &tick);
@@ -58719,6 +60937,7 @@ int HP_skill_cell_overlap(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_cell_overlap_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_cell_overlap_pre[hIndex].func;
@@ -58751,6 +60970,7 @@ int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_timerskill_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_timerskill_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -58777,6 +60997,7 @@ int HP_skill_trap_splash(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_trap_splash_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_trap_splash_pre[hIndex].func;
@@ -58809,6 +61030,7 @@ int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_condition_mercenary_pre ) {
int (*preHookFunc) (struct block_list *bl, int *skill_id, int *lv, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_pre[hIndex].func;
retVal___ = preHookFunc(bl, &skill_id, &lv, &type);
@@ -58835,6 +61057,7 @@ struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) {
struct skill_unit_group* retVal___ = NULL;
if( HPMHooks.count.HP_skill_locate_element_field_pre ) {
struct skill_unit_group* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_locate_element_field_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -58861,6 +61084,7 @@ int HP_skill_graffitiremover(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_graffitiremover_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_graffitiremover_pre[hIndex].func;
@@ -58893,6 +61117,7 @@ int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_activate_reverberation_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_activate_reverberation_pre[hIndex].func;
@@ -58925,6 +61150,7 @@ int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_dance_overlap_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_pre[hIndex].func;
@@ -58957,6 +61183,7 @@ int HP_skill_dance_overlap(struct skill_unit *su, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_dance_overlap_pre ) {
int (*preHookFunc) (struct skill_unit *su, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_dance_overlap_pre[hIndex].func;
retVal___ = preHookFunc(su, &flag);
@@ -58983,6 +61210,7 @@ struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 ski
struct s_skill_unit_layout* retVal___ = NULL;
if( HPMHooks.count.HP_skill_get_unit_layout_pre ) {
struct s_skill_unit_layout* (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv, src, &x, &y);
@@ -59009,6 +61237,7 @@ int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_frostjoke_scream_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_pre[hIndex].func;
@@ -59041,6 +61270,7 @@ int HP_skill_greed(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_greed_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_greed_pre[hIndex].func;
@@ -59073,6 +61303,7 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_destroy_trap_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_destroy_trap_pre[hIndex].func;
@@ -59105,6 +61336,7 @@ int HP_skill_icewall_block(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_icewall_block_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_icewall_block_pre[hIndex].func;
@@ -59137,6 +61369,7 @@ struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_l
struct skill_unit_group_tickset* retVal___ = NULL;
if( HPMHooks.count.HP_skill_unitgrouptickset_search_pre ) {
struct skill_unit_group_tickset* (*preHookFunc) (struct block_list *bl, struct skill_unit_group *group, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_pre[hIndex].func;
retVal___ = preHookFunc(bl, group, &tick);
@@ -59163,6 +61396,7 @@ bool HP_skill_dance_switch(struct skill_unit *su, int flag) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_dance_switch_pre ) {
bool (*preHookFunc) (struct skill_unit *su, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_dance_switch_pre[hIndex].func;
retVal___ = preHookFunc(su, &flag);
@@ -59189,6 +61423,7 @@ int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_condition_char_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_pre[hIndex].func;
@@ -59221,6 +61456,7 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_pre[hIndex].func;
@@ -59252,6 +61488,7 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y
int hIndex = 0;
if( HPMHooks.count.HP_skill_brandishspear_first_pre ) {
void (*preHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_brandishspear_first_pre[hIndex].func;
preHookFunc(tc, &dir, &x, &y);
@@ -59277,6 +61514,7 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_brandishspear_dir_pre ) {
void (*preHookFunc) (struct square *tc, uint8 *dir, int *are);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_pre[hIndex].func;
preHookFunc(tc, &dir, &are);
@@ -59303,6 +61541,7 @@ int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_fixed_cast_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -59329,6 +61568,7 @@ int HP_skill_sit_count(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_sit_count_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_sit_count_pre[hIndex].func;
@@ -59361,6 +61601,7 @@ int HP_skill_sit_in(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_sit_in_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_sit_in_pre[hIndex].func;
@@ -59393,6 +61634,7 @@ int HP_skill_sit_out(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_sit_out_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_sit_out_pre[hIndex].func;
@@ -59424,6 +61666,7 @@ void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 ski
int hIndex = 0;
if( HPMHooks.count.HP_skill_unitsetmapcell_pre ) {
void (*preHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_pre[hIndex].func;
preHookFunc(src, &skill_id, &skill_lv, &cell, &flag);
@@ -59450,6 +61693,7 @@ int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, i
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) {
int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &tick);
@@ -59476,6 +61720,7 @@ int HP_skill_unit_effect(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_effect_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_unit_effect_pre[hIndex].func;
@@ -59508,6 +61753,7 @@ int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_pre[hIndex].func;
@@ -59540,6 +61786,7 @@ int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_move_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_unit_move_sub_pre[hIndex].func;
@@ -59572,6 +61819,7 @@ int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockpc_end_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockpc_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -59598,6 +61846,7 @@ int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockhomun_end_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockhomun_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -59624,6 +61873,7 @@ int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockmerc_end_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockmerc_end_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -59650,6 +61900,7 @@ int HP_skill_split_atoi(char *str, int *val) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_split_atoi_pre ) {
int (*preHookFunc) (char *str, int *val);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_split_atoi_pre[hIndex].func;
retVal___ = preHookFunc(str, val);
@@ -59676,6 +61927,7 @@ int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_unit_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -59702,6 +61954,7 @@ int HP_skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_unit_timer_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_pre[hIndex].func;
@@ -59733,6 +61986,7 @@ void HP_skill_init_unit_layout(void) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_init_unit_layout_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_pre[hIndex].func;
preHookFunc();
@@ -59759,6 +62013,7 @@ bool HP_skill_parse_row_skilldb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_skilldb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59785,6 +62040,7 @@ bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_requiredb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59811,6 +62067,7 @@ bool HP_skill_parse_row_castdb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_castdb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59837,6 +62094,7 @@ bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_castnodexdb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59863,6 +62121,7 @@ bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_unitdb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59889,6 +62148,7 @@ bool HP_skill_parse_row_producedb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_producedb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59915,6 +62175,7 @@ bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_createarrowdb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59941,6 +62202,7 @@ bool HP_skill_parse_row_abradb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_abradb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59967,6 +62229,7 @@ bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_spellbookdb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -59993,6 +62256,7 @@ bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current)
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre ) {
bool (*preHookFunc) (char *split[], int *column, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_pre[hIndex].func;
retVal___ = preHookFunc(split, &column, &current);
@@ -60019,6 +62283,7 @@ bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_reproducedb_pre ) {
bool (*preHookFunc) (char *split[], int *column, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_pre[hIndex].func;
retVal___ = preHookFunc(split, &column, &current);
@@ -60045,6 +62310,7 @@ bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_improvisedb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -60071,6 +62337,7 @@ bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current
bool retVal___ = false;
if( HPMHooks.count.HP_skill_parse_row_changematerialdb_pre ) {
bool (*preHookFunc) (char *split[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_pre[hIndex].func;
retVal___ = preHookFunc(split, &columns, &current);
@@ -60096,6 +62363,7 @@ void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 ski
int hIndex = 0;
if( HPMHooks.count.HP_skill_usave_add_pre ) {
void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_usave_add_pre[hIndex].func;
preHookFunc(sd, &skill_id, &skill_lv);
@@ -60121,6 +62389,7 @@ void HP_skill_usave_trigger(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_usave_trigger_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_usave_trigger_pre[hIndex].func;
preHookFunc(sd);
@@ -60146,6 +62415,7 @@ void HP_skill_cooldown_load(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_cooldown_load_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_cooldown_load_pre[hIndex].func;
preHookFunc(sd);
@@ -60172,6 +62442,7 @@ int HP_skill_spellbook(struct map_session_data *sd, int nameid) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_spellbook_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_spellbook_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -60198,6 +62469,7 @@ int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_
int retVal___ = 0;
if( HPMHooks.count.HP_skill_block_check_pre ) {
int (*preHookFunc) (struct block_list *bl, enum sc_type *type, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_block_check_pre[hIndex].func;
retVal___ = preHookFunc(bl, &type, &skill_id);
@@ -60224,6 +62496,7 @@ int HP_skill_detonator(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_detonator_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_skill_detonator_pre[hIndex].func;
@@ -60256,6 +62529,7 @@ bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry
bool retVal___ = false;
if( HPMHooks.count.HP_skill_check_camouflage_pre ) {
bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_camouflage_pre[hIndex].func;
retVal___ = preHookFunc(bl, sce);
@@ -60282,6 +62556,7 @@ int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_magicdecoy_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_magicdecoy_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -60308,6 +62583,7 @@ int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_poisoningweapon_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_poisoningweapon_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -60334,6 +62610,7 @@ int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_select_menu_pre ) {
int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_select_menu_pre[hIndex].func;
retVal___ = preHookFunc(sd, &skill_id);
@@ -60360,6 +62637,7 @@ int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_
int retVal___ = 0;
if( HPMHooks.count.HP_skill_elementalanalysis_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, &skill_lv, item_list);
@@ -60386,6 +62664,7 @@ int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short *
int retVal___ = 0;
if( HPMHooks.count.HP_skill_changematerial_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, item_list);
@@ -60412,6 +62691,7 @@ int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_elemental_type_pre ) {
int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_elemental_type_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id, &skill_lv);
@@ -60437,6 +62717,7 @@ void HP_skill_cooldown_save(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_skill_cooldown_save_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_cooldown_save_pre[hIndex].func;
preHookFunc(sd);
@@ -60463,6 +62744,7 @@ int HP_skill_get_new_group_id(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_skill_get_new_group_id_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_get_new_group_id_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -60489,6 +62771,7 @@ bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) {
bool retVal___ = false;
if( HPMHooks.count.HP_skill_check_shadowform_pre ) {
bool (*preHookFunc) (struct block_list *bl, int64 *damage, int *hit);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_check_shadowform_pre[hIndex].func;
retVal___ = preHookFunc(bl, &damage, &hit);
@@ -60516,6 +62799,7 @@ int HP_status_init(bool minimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_init_pre ) {
int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_init_pre[hIndex].func;
retVal___ = preHookFunc(&minimal);
@@ -60541,6 +62825,7 @@ void HP_status_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_status_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_final_pre[hIndex].func;
preHookFunc();
@@ -60567,6 +62852,7 @@ int HP_status_get_refine_chance(enum refine_type wlv, int refine) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_refine_chance_pre ) {
int (*preHookFunc) (enum refine_type *wlv, int *refine);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func;
retVal___ = preHookFunc(&wlv, &refine);
@@ -60593,6 +62879,7 @@ sc_type HP_status_skill2sc(int skill_id) {
sc_type retVal___ = SC_NONE;
if( HPMHooks.count.HP_status_skill2sc_pre ) {
sc_type (*preHookFunc) (int *skill_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_skill2sc_pre[hIndex].func;
retVal___ = preHookFunc(&skill_id);
@@ -60619,6 +62906,7 @@ int HP_status_sc2skill(sc_type sc) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_sc2skill_pre ) {
int (*preHookFunc) (sc_type *sc);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_sc2skill_pre[hIndex].func;
retVal___ = preHookFunc(&sc);
@@ -60645,6 +62933,7 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) {
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_status_sc2scb_flag_pre ) {
unsigned int (*preHookFunc) (sc_type *sc);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_sc2scb_flag_pre[hIndex].func;
retVal___ = preHookFunc(&sc);
@@ -60671,6 +62960,7 @@ int HP_status_type2relevant_bl_types(int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_type2relevant_bl_types_pre ) {
int (*preHookFunc) (int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func;
retVal___ = preHookFunc(&type);
@@ -60697,6 +62987,7 @@ int HP_status_get_sc_type(sc_type idx) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_sc_type_pre ) {
int (*preHookFunc) (sc_type *idx);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_sc_type_pre[hIndex].func;
retVal___ = preHookFunc(&idx);
@@ -60723,6 +63014,7 @@ int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp
int retVal___ = 0;
if( HPMHooks.count.HP_status_damage_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_damage_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &hp, &sp, &walkdelay, &flag);
@@ -60749,6 +63041,7 @@ int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_charge_pre ) {
int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_charge_pre[hIndex].func;
retVal___ = preHookFunc(bl, &hp, &sp);
@@ -60775,6 +63068,7 @@ int HP_status_percent_change(struct block_list *src, struct block_list *target,
int retVal___ = 0;
if( HPMHooks.count.HP_status_percent_change_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_percent_change_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &hp_rate, &sp_rate, &flag);
@@ -60801,6 +63095,7 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_set_hp_pre ) {
int (*preHookFunc) (struct block_list *bl, unsigned int *hp, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_set_hp_pre[hIndex].func;
retVal___ = preHookFunc(bl, &hp, &flag);
@@ -60827,6 +63122,7 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_set_sp_pre ) {
int (*preHookFunc) (struct block_list *bl, unsigned int *sp, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_set_sp_pre[hIndex].func;
retVal___ = preHookFunc(bl, &sp, &flag);
@@ -60853,6 +63149,7 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_heal_pre ) {
int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_heal_pre[hIndex].func;
retVal___ = preHookFunc(bl, &hp, &sp, &flag);
@@ -60879,6 +63176,7 @@ int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char
int retVal___ = 0;
if( HPMHooks.count.HP_status_revive_pre ) {
int (*preHookFunc) (struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_revive_pre[hIndex].func;
retVal___ = preHookFunc(bl, &per_hp, &per_sp);
@@ -60905,6 +63203,7 @@ int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned
int retVal___ = 0;
if( HPMHooks.count.HP_status_fixed_revive_pre ) {
int (*preHookFunc) (struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_fixed_revive_pre[hIndex].func;
retVal___ = preHookFunc(bl, &per_hp, &per_sp);
@@ -60931,6 +63230,7 @@ struct regen_data* HP_status_get_regen_data(struct block_list *bl) {
struct regen_data* retVal___ = NULL;
if( HPMHooks.count.HP_status_get_regen_data_pre ) {
struct regen_data* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_regen_data_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -60957,6 +63257,7 @@ struct status_data* HP_status_get_status_data(struct block_list *bl) {
struct status_data* retVal___ = NULL;
if( HPMHooks.count.HP_status_get_status_data_pre ) {
struct status_data* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_status_data_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -60983,6 +63284,7 @@ struct status_data* HP_status_get_base_status(struct block_list *bl) {
struct status_data* retVal___ = NULL;
if( HPMHooks.count.HP_status_get_base_status_pre ) {
struct status_data* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_base_status_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61009,6 +63311,7 @@ const char* HP_status_get_name(struct block_list *bl) {
const char* retVal___ = NULL;
if( HPMHooks.count.HP_status_get_name_pre ) {
const char* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_name_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61035,6 +63338,7 @@ int HP_status_get_class(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_class_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_class_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61061,6 +63365,7 @@ int HP_status_get_lv(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_lv_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_lv_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61087,6 +63392,7 @@ defType HP_status_get_def(struct block_list *bl) {
defType retVal___ = 0;
if( HPMHooks.count.HP_status_get_def_pre ) {
defType (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_def_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61113,6 +63419,7 @@ unsigned short HP_status_get_speed(struct block_list *bl) {
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_get_speed_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_speed_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61139,6 +63446,7 @@ unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status
unsigned char retVal___ = 0;
if( HPMHooks.count.HP_status_calc_attack_element_pre ) {
unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_attack_element_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &element);
@@ -61165,6 +63473,7 @@ int HP_status_get_party_id(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_party_id_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_party_id_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61191,6 +63500,7 @@ int HP_status_get_guild_id(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_guild_id_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_guild_id_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61217,6 +63527,7 @@ int HP_status_get_emblem_id(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_emblem_id_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_emblem_id_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61243,6 +63554,7 @@ int HP_status_get_mexp(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_mexp_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_mexp_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61269,6 +63581,7 @@ int HP_status_get_race2(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_race2_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_race2_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61295,6 +63608,7 @@ struct view_data* HP_status_get_viewdata(struct block_list *bl) {
struct view_data* retVal___ = NULL;
if( HPMHooks.count.HP_status_get_viewdata_pre ) {
struct view_data* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_viewdata_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61320,6 +63634,7 @@ void HP_status_set_viewdata(struct block_list *bl, int class_) {
int hIndex = 0;
if( HPMHooks.count.HP_status_set_viewdata_pre ) {
void (*preHookFunc) (struct block_list *bl, int *class_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_set_viewdata_pre[hIndex].func;
preHookFunc(bl, &class_);
@@ -61345,6 +63660,7 @@ void HP_status_change_init(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_status_change_init_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_init_pre[hIndex].func;
preHookFunc(bl);
@@ -61371,6 +63687,7 @@ struct status_change* HP_status_get_sc(struct block_list *bl) {
struct status_change* retVal___ = NULL;
if( HPMHooks.count.HP_status_get_sc_pre ) {
struct status_change* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_sc_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61397,6 +63714,7 @@ int HP_status_isdead(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_isdead_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_isdead_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61423,6 +63741,7 @@ int HP_status_isimmune(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_isimmune_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_isimmune_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -61449,6 +63768,7 @@ int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_sc_def_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_sc_def_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &type, &rate, &tick, &flag);
@@ -61475,6 +63795,7 @@ int HP_status_change_start(struct block_list *src, struct block_list *bl, enum s
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_start_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func;
retVal___ = preHookFunc(src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag);
@@ -61501,6 +63822,7 @@ int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, con
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_end__pre ) {
int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_end__pre[hIndex].func;
retVal___ = preHookFunc(bl, &type, &tid, file, &line);
@@ -61527,6 +63849,7 @@ int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -61553,6 +63876,7 @@ int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -61579,6 +63903,7 @@ int HP_status_change_timer_sub(struct block_list *bl, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_timer_sub_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_status_change_timer_sub_pre[hIndex].func;
@@ -61611,6 +63936,7 @@ int HP_status_change_clear(struct block_list *bl, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_clear_pre ) {
int (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_clear_pre[hIndex].func;
retVal___ = preHookFunc(bl, &type);
@@ -61637,6 +63963,7 @@ int HP_status_change_clear_buffs(struct block_list *bl, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_clear_buffs_pre ) {
int (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_clear_buffs_pre[hIndex].func;
retVal___ = preHookFunc(bl, &type);
@@ -61662,6 +63989,7 @@ void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status
int hIndex = 0;
if( HPMHooks.count.HP_status_calc_bl__pre ) {
void (*preHookFunc) (struct block_list *bl, enum scb_flag *flag, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_bl__pre[hIndex].func;
preHookFunc(bl, &flag, &opt);
@@ -61688,6 +64016,7 @@ int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_mob__pre ) {
int (*preHookFunc) (struct mob_data *md, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_mob__pre[hIndex].func;
retVal___ = preHookFunc(md, &opt);
@@ -61714,6 +64043,7 @@ int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_pet__pre ) {
int (*preHookFunc) (struct pet_data *pd, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_pet__pre[hIndex].func;
retVal___ = preHookFunc(pd, &opt);
@@ -61740,6 +64070,7 @@ int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt)
int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_pc__pre ) {
int (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_pc__pre[hIndex].func;
retVal___ = preHookFunc(sd, &opt);
@@ -61766,6 +64097,7 @@ int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt
int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_homunculus__pre ) {
int (*preHookFunc) (struct homun_data *hd, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_homunculus__pre[hIndex].func;
retVal___ = preHookFunc(hd, &opt);
@@ -61792,6 +64124,7 @@ int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt
int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_mercenary__pre ) {
int (*preHookFunc) (struct mercenary_data *md, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_mercenary__pre[hIndex].func;
retVal___ = preHookFunc(md, &opt);
@@ -61818,6 +64151,7 @@ int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt
int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_elemental__pre ) {
int (*preHookFunc) (struct elemental_data *ed, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_elemental__pre[hIndex].func;
retVal___ = preHookFunc(ed, &opt);
@@ -61843,6 +64177,7 @@ void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int leve
int hIndex = 0;
if( HPMHooks.count.HP_status_calc_misc_pre ) {
void (*preHookFunc) (struct block_list *bl, struct status_data *st, int *level);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func;
preHookFunc(bl, st, &level);
@@ -61868,6 +64203,7 @@ void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct
int hIndex = 0;
if( HPMHooks.count.HP_status_calc_regen_pre ) {
void (*preHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_regen_pre[hIndex].func;
preHookFunc(bl, st, regen);
@@ -61893,6 +64229,7 @@ void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen,
int hIndex = 0;
if( HPMHooks.count.HP_status_calc_regen_rate_pre ) {
void (*preHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_regen_rate_pre[hIndex].func;
preHookFunc(bl, regen, sc);
@@ -61919,6 +64256,7 @@ int HP_status_check_skilluse(struct block_list *src, struct block_list *target,
int retVal___ = 0;
if( HPMHooks.count.HP_status_check_skilluse_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_check_skilluse_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &skill_id, &flag);
@@ -61945,6 +64283,7 @@ int HP_status_check_visibility(struct block_list *src, struct block_list *target
int retVal___ = 0;
if( HPMHooks.count.HP_status_check_visibility_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_check_visibility_pre[hIndex].func;
retVal___ = preHookFunc(src, target);
@@ -61971,6 +64310,7 @@ int HP_status_change_spread(struct block_list *src, struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_change_spread_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_change_spread_pre[hIndex].func;
retVal___ = preHookFunc(src, bl);
@@ -61997,6 +64337,7 @@ defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int
defType retVal___ = 0;
if( HPMHooks.count.HP_status_calc_def_pre ) {
defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_def_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &def, &viewable);
@@ -62023,6 +64364,7 @@ short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int d
short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_def2_pre ) {
short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def2, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_def2_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &def2, &viewable);
@@ -62049,6 +64391,7 @@ defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int
defType retVal___ = 0;
if( HPMHooks.count.HP_status_calc_mdef_pre ) {
defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_mdef_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &mdef, &viewable);
@@ -62075,6 +64418,7 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int
short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_mdef2_pre ) {
short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_mdef2_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &mdef2, &viewable);
@@ -62101,6 +64445,7 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_batk_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *batk, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &batk, &viewable);
@@ -62127,6 +64472,7 @@ unsigned short HP_status_base_matk(const struct status_data *st, int level) {
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_base_matk_pre ) {
unsigned short (*preHookFunc) (const struct status_data *st, int *level);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func;
retVal___ = preHookFunc(st, &level);
@@ -62153,6 +64499,7 @@ int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, in
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_weapon_atk_pre ) {
int (*preHookFunc) (struct block_list *src, struct weapon_atk *watk, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_weapon_atk_pre[hIndex].func;
retVal___ = preHookFunc(src, watk, &flag);
@@ -62179,6 +64526,7 @@ int HP_status_get_total_mdef(struct block_list *src) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_total_mdef_pre ) {
int (*preHookFunc) (struct block_list *src);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_total_mdef_pre[hIndex].func;
retVal___ = preHookFunc(src);
@@ -62205,6 +64553,7 @@ int HP_status_get_total_def(struct block_list *src) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_total_def_pre ) {
int (*preHookFunc) (struct block_list *src);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_total_def_pre[hIndex].func;
retVal___ = preHookFunc(src);
@@ -62231,6 +64580,7 @@ int HP_status_get_matk(struct block_list *src, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_get_matk_pre ) {
int (*preHookFunc) (struct block_list *src, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_get_matk_pre[hIndex].func;
retVal___ = preHookFunc(src, &flag);
@@ -62252,11 +64602,38 @@ int HP_status_get_matk(struct block_list *src, int flag) {
}
return retVal___;
}
+void HP_status_update_matk(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_update_matk_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_update_matk_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.update_matk(bl);
+ }
+ if( HPMHooks.count.HP_status_update_matk_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_update_matk_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
int HP_status_readdb(void) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_status_readdb_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_readdb_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -62282,6 +64659,7 @@ void HP_status_initChangeTables(void) {
int hIndex = 0;
if( HPMHooks.count.HP_status_initChangeTables_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_initChangeTables_pre[hIndex].func;
preHookFunc();
@@ -62307,6 +64685,7 @@ void HP_status_initDummyData(void) {
int hIndex = 0;
if( HPMHooks.count.HP_status_initDummyData_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_initDummyData_pre[hIndex].func;
preHookFunc();
@@ -62333,6 +64712,7 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s
int retVal___ = 0;
if( HPMHooks.count.HP_status_base_amotion_pc_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct status_data *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_base_amotion_pc_pre[hIndex].func;
retVal___ = preHookFunc(sd, st);
@@ -62359,6 +64739,7 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_base_atk_pre ) {
unsigned short (*preHookFunc) (const struct block_list *bl, const struct status_data *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func;
retVal___ = preHookFunc(bl, st);
@@ -62384,6 +64765,7 @@ void HP_status_calc_sigma(void) {
int hIndex = 0;
if( HPMHooks.count.HP_status_calc_sigma_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_sigma_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_sigma_pre[hIndex].func;
preHookFunc();
@@ -62410,6 +64792,7 @@ unsigned int HP_status_base_pc_maxhp(struct map_session_data *sd, struct status_
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_status_base_pc_maxhp_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxhp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_base_pc_maxhp_pre[hIndex].func;
retVal___ = preHookFunc(sd, st);
@@ -62436,6 +64819,7 @@ unsigned int HP_status_base_pc_maxsp(struct map_session_data *sd, struct status_
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_status_base_pc_maxsp_pre ) {
unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxsp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_base_pc_maxsp_pre[hIndex].func;
retVal___ = preHookFunc(sd, st);
@@ -62462,6 +64846,7 @@ int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_npc__pre ) {
int (*preHookFunc) (struct npc_data *nd, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_npc__pre[hIndex].func;
retVal___ = preHookFunc(nd, &opt);
@@ -62488,6 +64873,7 @@ unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *s
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_str_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *str);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_str_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &str);
@@ -62514,6 +64900,7 @@ unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *s
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_agi_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *agi);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_agi_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &agi);
@@ -62540,6 +64927,7 @@ unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *s
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_vit_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *vit);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_vit_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &vit);
@@ -62566,6 +64954,7 @@ unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *s
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_int_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *int_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_int_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &int_);
@@ -62592,6 +64981,7 @@ unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *s
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_dex_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dex);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_dex_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &dex);
@@ -62618,6 +65008,7 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_luk_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *luk);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_luk_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &luk);
@@ -62644,6 +65035,7 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_watk_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *watk, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &watk, &viewable);
@@ -62670,6 +65062,7 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_matk_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &matk, &viewable);
@@ -62696,6 +65089,7 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc,
signed short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_hit_pre ) {
signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *hit, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &hit, &viewable);
@@ -62722,6 +65116,7 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change
signed short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_critical_pre ) {
signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *critical, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &critical, &viewable);
@@ -62748,6 +65143,7 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc
signed short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_flee_pre ) {
signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &flee, &viewable);
@@ -62774,6 +65170,7 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s
signed short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_flee2_pre ) {
signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &flee2, &viewable);
@@ -62800,6 +65197,7 @@ unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_speed_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *speed);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_speed_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &speed);
@@ -62826,6 +65224,7 @@ short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc,
short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_aspd_rate_pre ) {
short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd_rate);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &aspd_rate);
@@ -62852,6 +65251,7 @@ unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_chang
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_dmotion_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dmotion);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_dmotion_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &dmotion);
@@ -62878,6 +65278,7 @@ short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short
short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_aspd_pre ) {
short (*preHookFunc) (struct block_list *bl, struct status_change *sc, short *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_aspd_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &flag);
@@ -62904,6 +65305,7 @@ short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, i
short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_fix_aspd_pre ) {
short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &aspd);
@@ -62930,6 +65332,7 @@ unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *s
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_maxhp_pre ) {
unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, uint64 *maxhp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_maxhp_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &maxhp);
@@ -62956,6 +65359,7 @@ unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *s
unsigned int retVal___ = 0;
if( HPMHooks.count.HP_status_calc_maxsp_pre ) {
unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, unsigned int *maxsp);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_maxsp_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &maxsp);
@@ -62982,6 +65386,7 @@ unsigned char HP_status_calc_element(struct block_list *bl, struct status_change
unsigned char retVal___ = 0;
if( HPMHooks.count.HP_status_calc_element_pre ) {
unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_element_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &element);
@@ -63008,6 +65413,7 @@ unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_cha
unsigned char retVal___ = 0;
if( HPMHooks.count.HP_status_calc_element_lv_pre ) {
unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_element_lv_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &lv);
@@ -63034,6 +65440,7 @@ unsigned short HP_status_calc_mode(struct block_list *bl, struct status_change *
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_mode_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mode);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_mode_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &mode);
@@ -63060,6 +65467,7 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change
unsigned short retVal___ = 0;
if( HPMHooks.count.HP_status_calc_ematk_pre ) {
unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func;
retVal___ = preHookFunc(bl, sc, &matk);
@@ -63085,6 +65493,7 @@ void HP_status_calc_bl_main(struct block_list *bl, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_status_calc_bl_main_pre ) {
void (*preHookFunc) (struct block_list *bl, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_bl_main_pre[hIndex].func;
preHookFunc(bl, &flag);
@@ -63110,6 +65519,7 @@ void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int d
int hIndex = 0;
if( HPMHooks.count.HP_status_display_add_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_display_add_pre[hIndex].func;
preHookFunc(sd, &type, &dval1, &dval2, &dval3);
@@ -63135,6 +65545,7 @@ void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) {
int hIndex = 0;
if( HPMHooks.count.HP_status_display_remove_pre ) {
void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_display_remove_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -63161,6 +65572,7 @@ int HP_status_natural_heal(struct block_list *bl, va_list args) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_natural_heal_pre ) {
int (*preHookFunc) (struct block_list *bl, va_list args);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_pre; hIndex++ ) {
va_list args___copy; va_copy(args___copy, args);
preHookFunc = HPMHooks.list.HP_status_natural_heal_pre[hIndex].func;
@@ -63193,6 +65605,7 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_status_natural_heal_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_natural_heal_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -63219,6 +65632,7 @@ bool HP_status_readdb_job1(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_status_readdb_job1_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job1_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_readdb_job1_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -63245,6 +65659,7 @@ bool HP_status_readdb_job2(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_status_readdb_job2_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_readdb_job2_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -63271,6 +65686,7 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_status_readdb_sizefix_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_readdb_sizefix_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -63297,6 +65713,7 @@ bool HP_status_readdb_refine(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_status_readdb_refine_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_readdb_refine_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -63323,6 +65740,7 @@ bool HP_status_readdb_scconfig(char *fields[], int columns, int current) {
bool retVal___ = false;
if( HPMHooks.count.HP_status_readdb_scconfig_pre ) {
bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_readdb_scconfig_pre[hIndex].func;
retVal___ = preHookFunc(fields, &columns, &current);
@@ -63349,6 +65767,7 @@ void HP_storage_reconnect(void) {
int hIndex = 0;
if( HPMHooks.count.HP_storage_reconnect_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_reconnect_pre[hIndex].func;
preHookFunc();
@@ -63375,6 +65794,7 @@ int HP_storage_delitem(struct map_session_data *sd, int n, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_storage_delitem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_delitem_pre[hIndex].func;
retVal___ = preHookFunc(sd, &n, &amount);
@@ -63401,6 +65821,7 @@ int HP_storage_open(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_storage_open_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_open_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -63427,6 +65848,7 @@ int HP_storage_add(struct map_session_data *sd, int index, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_storage_add_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_add_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -63453,6 +65875,7 @@ int HP_storage_get(struct map_session_data *sd, int index, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_storage_get_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_get_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -63479,6 +65902,7 @@ int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int
int retVal___ = 0;
if( HPMHooks.count.HP_storage_additem_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_additem_pre[hIndex].func;
retVal___ = preHookFunc(sd, item_data, &amount);
@@ -63505,6 +65929,7 @@ int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_storage_addfromcart_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_addfromcart_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -63531,6 +65956,7 @@ int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) {
int retVal___ = 0;
if( HPMHooks.count.HP_storage_gettocart_pre ) {
int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_gettocart_pre[hIndex].func;
retVal___ = preHookFunc(sd, &index, &amount);
@@ -63556,6 +65982,7 @@ void HP_storage_close(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_storage_close_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_close_pre[hIndex].func;
preHookFunc(sd);
@@ -63581,6 +66008,7 @@ void HP_storage_pc_quit(struct map_session_data *sd, int flag) {
int hIndex = 0;
if( HPMHooks.count.HP_storage_pc_quit_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_pc_quit_pre[hIndex].func;
preHookFunc(sd, &flag);
@@ -63602,14 +66030,15 @@ void HP_storage_pc_quit(struct map_session_data *sd, int flag) {
}
return;
}
-int HP_storage_comp_item(const void *_i1, const void *_i2) {
+int HP_storage_comp_item(const void *i1_, const void *i2_) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_storage_comp_item_pre ) {
- int (*preHookFunc) (const void *_i1, const void *_i2);
+ int (*preHookFunc) (const void *i1_, const void *i2_);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_comp_item_pre[hIndex].func;
- retVal___ = preHookFunc(_i1, _i2);
+ retVal___ = preHookFunc(i1_, i2_);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -63617,13 +66046,13 @@ int HP_storage_comp_item(const void *_i1, const void *_i2) {
}
}
{
- retVal___ = HPMHooks.source.storage.comp_item(_i1, _i2);
+ retVal___ = HPMHooks.source.storage.comp_item(i1_, i2_);
}
if( HPMHooks.count.HP_storage_comp_item_post ) {
- int (*postHookFunc) (int retVal___, const void *_i1, const void *_i2);
+ int (*postHookFunc) (int retVal___, const void *i1_, const void *i2_);
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_storage_comp_item_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, _i1, _i2);
+ retVal___ = postHookFunc(retVal___, i1_, i2_);
}
}
return retVal___;
@@ -63632,6 +66061,7 @@ void HP_storage_sortitem(struct item *items, unsigned int size) {
int hIndex = 0;
if( HPMHooks.count.HP_storage_sortitem_pre ) {
void (*preHookFunc) (struct item *items, unsigned int *size);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_storage_sortitem_pre[hIndex].func;
preHookFunc(items, &size);
@@ -63658,6 +66088,7 @@ int HP_storage_reconnect_sub(DBKey key, DBData *data, va_list ap) {
int retVal___ = 0;
if( HPMHooks.count.HP_storage_reconnect_sub_pre ) {
int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_pre; hIndex++ ) {
va_list ap___copy; va_copy(ap___copy, ap);
preHookFunc = HPMHooks.list.HP_storage_reconnect_sub_pre[hIndex].func;
@@ -63690,6 +66121,7 @@ void HP_trade_request(struct map_session_data *sd, struct map_session_data *targ
int hIndex = 0;
if( HPMHooks.count.HP_trade_request_pre ) {
void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *target_sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_request_pre[hIndex].func;
preHookFunc(sd, target_sd);
@@ -63715,6 +66147,7 @@ void HP_trade_ack(struct map_session_data *sd, int type) {
int hIndex = 0;
if( HPMHooks.count.HP_trade_ack_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_ack_pre[hIndex].func;
preHookFunc(sd, &type);
@@ -63741,6 +66174,7 @@ int HP_trade_check_impossible(struct map_session_data *sd) {
int retVal___ = 0;
if( HPMHooks.count.HP_trade_check_impossible_pre ) {
int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_check_impossible_pre[hIndex].func;
retVal___ = preHookFunc(sd);
@@ -63767,6 +66201,7 @@ int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) {
int retVal___ = 0;
if( HPMHooks.count.HP_trade_check_pre ) {
int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_check_pre[hIndex].func;
retVal___ = preHookFunc(sd, tsd);
@@ -63792,6 +66227,7 @@ void HP_trade_additem(struct map_session_data *sd, short index, short amount) {
int hIndex = 0;
if( HPMHooks.count.HP_trade_additem_pre ) {
void (*preHookFunc) (struct map_session_data *sd, short *index, short *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_additem_pre[hIndex].func;
preHookFunc(sd, &index, &amount);
@@ -63817,6 +66253,7 @@ void HP_trade_addzeny(struct map_session_data *sd, int amount) {
int hIndex = 0;
if( HPMHooks.count.HP_trade_addzeny_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *amount);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_addzeny_pre[hIndex].func;
preHookFunc(sd, &amount);
@@ -63842,6 +66279,7 @@ void HP_trade_ok(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_trade_ok_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_ok_pre[hIndex].func;
preHookFunc(sd);
@@ -63867,6 +66305,7 @@ void HP_trade_cancel(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_trade_cancel_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_cancel_pre[hIndex].func;
preHookFunc(sd);
@@ -63892,6 +66331,7 @@ void HP_trade_commit(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_trade_commit_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_trade_commit_pre[hIndex].func;
preHookFunc(sd);
@@ -63919,6 +66359,7 @@ int HP_unit_init(bool minimal) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_init_pre ) {
int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_init_pre[hIndex].func;
retVal___ = preHookFunc(&minimal);
@@ -63945,6 +66386,7 @@ int HP_unit_final(void) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_final_pre ) {
int (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_final_pre[hIndex].func;
retVal___ = preHookFunc();
@@ -63971,6 +66413,7 @@ struct unit_data* HP_unit_bl2ud(struct block_list *bl) {
struct unit_data* retVal___ = NULL;
if( HPMHooks.count.HP_unit_bl2ud_pre ) {
struct unit_data* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_bl2ud_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -63997,6 +66440,7 @@ struct unit_data* HP_unit_bl2ud2(struct block_list *bl) {
struct unit_data* retVal___ = NULL;
if( HPMHooks.count.HP_unit_bl2ud2_pre ) {
struct unit_data* (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_bl2ud2_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64023,6 +66467,7 @@ int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_attack_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_attack_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -64049,6 +66494,7 @@ int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_walktoxy_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -64075,6 +66521,7 @@ int HP_unit_walktoxy_sub(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_walktoxy_sub_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_walktoxy_sub_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64101,6 +66548,7 @@ int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_delay_walktoxy_timer_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -64127,6 +66575,7 @@ int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_walktoxy_pre ) {
int (*preHookFunc) (struct block_list *bl, short *x, short *y, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_walktoxy_pre[hIndex].func;
retVal___ = preHookFunc(bl, &x, &y, &flag);
@@ -64153,6 +66602,7 @@ int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_walktobl_sub_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_walktobl_sub_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -64179,6 +66629,7 @@ int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, i
int retVal___ = 0;
if( HPMHooks.count.HP_unit_walktobl_pre ) {
int (*preHookFunc) (struct block_list *bl, struct block_list *tbl, int *range, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_walktobl_pre[hIndex].func;
retVal___ = preHookFunc(bl, tbl, &range, &flag);
@@ -64200,14 +66651,15 @@ int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, i
}
return retVal___;
}
-int HP_unit_run(struct block_list *bl) {
+bool HP_unit_run(struct block_list *bl, struct map_session_data *sd, enum sc_type type) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_unit_run_pre ) {
- int (*preHookFunc) (struct block_list *bl);
+ bool (*preHookFunc) (struct block_list *bl, struct map_session_data *sd, enum sc_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_run_pre[hIndex].func;
- retVal___ = preHookFunc(bl);
+ retVal___ = preHookFunc(bl, sd, &type);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -64215,48 +66667,49 @@ int HP_unit_run(struct block_list *bl) {
}
}
{
- retVal___ = HPMHooks.source.unit.run(bl);
+ retVal___ = HPMHooks.source.unit.run(bl, sd, type);
}
if( HPMHooks.count.HP_unit_run_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *bl);
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct map_session_data *sd, enum sc_type *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_run_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, bl);
+ retVal___ = postHookFunc(retVal___, bl, sd, &type);
}
}
return retVal___;
}
-int HP_unit_wugdash(struct block_list *bl, struct map_session_data *sd) {
+void HP_unit_run_hit(struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_unit_wugdash_pre ) {
- int (*preHookFunc) (struct block_list *bl, struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_wugdash_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_unit_wugdash_pre[hIndex].func;
- retVal___ = preHookFunc(bl, sd);
+ if( HPMHooks.count.HP_unit_run_hit_pre ) {
+ void (*preHookFunc) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_run_hit_pre[hIndex].func;
+ preHookFunc(bl, sc, sd, &type);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.unit.wugdash(bl, sd);
+ HPMHooks.source.unit.run_hit(bl, sc, sd, type);
}
- if( HPMHooks.count.HP_unit_wugdash_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_wugdash_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_unit_wugdash_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, bl, sd);
+ if( HPMHooks.count.HP_unit_run_hit_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_run_hit_post[hIndex].func;
+ postHookFunc(bl, sc, sd, &type);
}
}
- return retVal___;
+ return;
}
int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_unit_escape_pre ) {
int (*preHookFunc) (struct block_list *bl, struct block_list *target, short *dist);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_escape_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_escape_pre[hIndex].func;
retVal___ = preHookFunc(bl, target, &dist);
@@ -64283,6 +66736,7 @@ int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, b
int retVal___ = 0;
if( HPMHooks.count.HP_unit_movepos_pre ) {
int (*preHookFunc) (struct block_list *bl, short *dst_x, short *dst_y, int *easy, bool *checkpath);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_movepos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_movepos_pre[hIndex].func;
retVal___ = preHookFunc(bl, &dst_x, &dst_y, &easy, &checkpath);
@@ -64309,6 +66763,7 @@ int HP_unit_setdir(struct block_list *bl, unsigned char dir) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_setdir_pre ) {
int (*preHookFunc) (struct block_list *bl, unsigned char *dir);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_setdir_pre[hIndex].func;
retVal___ = preHookFunc(bl, &dir);
@@ -64335,6 +66790,7 @@ uint8 HP_unit_getdir(struct block_list *bl) {
uint8 retVal___ = 0;
if( HPMHooks.count.HP_unit_getdir_pre ) {
uint8 (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_getdir_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64361,6 +66817,7 @@ int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_blown_pre ) {
int (*preHookFunc) (struct block_list *bl, int *dx, int *dy, int *count, int *flag);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_blown_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_blown_pre[hIndex].func;
retVal___ = preHookFunc(bl, &dx, &dy, &count, &flag);
@@ -64387,6 +66844,7 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type
int retVal___ = 0;
if( HPMHooks.count.HP_unit_warp_pre ) {
int (*preHookFunc) (struct block_list *bl, short *m, short *x, short *y, clr_type *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_warp_pre[hIndex].func;
retVal___ = preHookFunc(bl, &m, &x, &y, &type);
@@ -64413,6 +66871,7 @@ int HP_unit_stop_walking(struct block_list *bl, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_stop_walking_pre ) {
int (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_stop_walking_pre[hIndex].func;
retVal___ = preHookFunc(bl, &type);
@@ -64439,6 +66898,7 @@ int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id,
int retVal___ = 0;
if( HPMHooks.count.HP_unit_skilluse_id_pre ) {
int (*preHookFunc) (struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_skilluse_id_pre[hIndex].func;
retVal___ = preHookFunc(src, &target_id, &skill_id, &skill_lv);
@@ -64465,6 +66925,7 @@ int HP_unit_is_walking(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_is_walking_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_is_walking_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64491,6 +66952,7 @@ int HP_unit_can_move(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_can_move_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_can_move_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64517,6 +66979,7 @@ int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_resume_running_pre ) {
int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_resume_running_pre[hIndex].func;
retVal___ = preHookFunc(&tid, &tick, &id, &data);
@@ -64543,6 +67006,7 @@ int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type
int retVal___ = 0;
if( HPMHooks.count.HP_unit_set_walkdelay_pre ) {
int (*preHookFunc) (struct block_list *bl, int64 *tick, int *delay, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_set_walkdelay_pre[hIndex].func;
retVal___ = preHookFunc(bl, &tick, &delay, &type);
@@ -64569,6 +67033,7 @@ int HP_unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id,
int retVal___ = 0;
if( HPMHooks.count.HP_unit_skilluse_id2_pre ) {
int (*preHookFunc) (struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_skilluse_id2_pre[hIndex].func;
retVal___ = preHookFunc(src, &target_id, &skill_id, &skill_lv, &casttime, &castcancel);
@@ -64595,6 +67060,7 @@ int HP_unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, u
int retVal___ = 0;
if( HPMHooks.count.HP_unit_skilluse_pos_pre ) {
int (*preHookFunc) (struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_skilluse_pos_pre[hIndex].func;
retVal___ = preHookFunc(src, &skill_x, &skill_y, &skill_id, &skill_lv);
@@ -64621,6 +67087,7 @@ int HP_unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y,
int retVal___ = 0;
if( HPMHooks.count.HP_unit_skilluse_pos2_pre ) {
int (*preHookFunc) (struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_skilluse_pos2_pre[hIndex].func;
retVal___ = preHookFunc(src, &skill_x, &skill_y, &skill_id, &skill_lv, &casttime, &castcancel);
@@ -64647,6 +67114,7 @@ int HP_unit_set_target(struct unit_data *ud, int target_id) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_set_target_pre ) {
int (*preHookFunc) (struct unit_data *ud, int *target_id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_set_target_pre[hIndex].func;
retVal___ = preHookFunc(ud, &target_id);
@@ -64673,6 +67141,7 @@ int HP_unit_stop_attack(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_stop_attack_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_stop_attack_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64699,6 +67168,7 @@ int HP_unit_unattackable(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_unattackable_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_unattackable_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64725,6 +67195,7 @@ int HP_unit_attack(struct block_list *src, int target_id, int continuous) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_attack_pre ) {
int (*preHookFunc) (struct block_list *src, int *target_id, int *continuous);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_attack_pre[hIndex].func;
retVal___ = preHookFunc(src, &target_id, &continuous);
@@ -64751,6 +67222,7 @@ int HP_unit_cancel_combo(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_cancel_combo_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_cancel_combo_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64777,6 +67249,7 @@ bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) {
bool retVal___ = false;
if( HPMHooks.count.HP_unit_can_reach_pos_pre ) {
bool (*preHookFunc) (struct block_list *bl, int *x, int *y, int *easy);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_pos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_can_reach_pos_pre[hIndex].func;
retVal___ = preHookFunc(bl, &x, &y, &easy);
@@ -64803,6 +67276,7 @@ bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int ran
bool retVal___ = false;
if( HPMHooks.count.HP_unit_can_reach_bl_pre ) {
bool (*preHookFunc) (struct block_list *bl, struct block_list *tbl, int *range, int *easy, short *x, short *y);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_bl_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_can_reach_bl_pre[hIndex].func;
retVal___ = preHookFunc(bl, tbl, &range, &easy, x, y);
@@ -64829,6 +67303,7 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_calc_pos_pre ) {
int (*preHookFunc) (struct block_list *bl, int *tx, int *ty, uint8 *dir);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_calc_pos_pre[hIndex].func;
retVal___ = preHookFunc(bl, &tx, &ty, &dir);
@@ -64855,6 +67330,7 @@ int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_attack_timer_sub_pre ) {
int (*preHookFunc) (struct block_list *src, int *tid, int64 *tick);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_attack_timer_sub_pre[hIndex].func;
retVal___ = preHookFunc(src, &tid, &tick);
@@ -64881,6 +67357,7 @@ int HP_unit_skillcastcancel(struct block_list *bl, int type) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_skillcastcancel_pre ) {
int (*preHookFunc) (struct block_list *bl, int *type);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_skillcastcancel_pre[hIndex].func;
retVal___ = preHookFunc(bl, &type);
@@ -64906,6 +67383,7 @@ void HP_unit_dataset(struct block_list *bl) {
int hIndex = 0;
if( HPMHooks.count.HP_unit_dataset_pre ) {
void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_dataset_pre[hIndex].func;
preHookFunc(bl);
@@ -64932,6 +67410,7 @@ int HP_unit_counttargeted(struct block_list *bl) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_counttargeted_pre ) {
int (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_counttargeted_pre[hIndex].func;
retVal___ = preHookFunc(bl);
@@ -64958,6 +67437,7 @@ int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int sde
int retVal___ = 0;
if( HPMHooks.count.HP_unit_fixdamage_pre ) {
int (*preHookFunc) (struct block_list *src, struct block_list *target, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_fixdamage_pre[hIndex].func;
retVal___ = preHookFunc(src, target, &sdelay, &ddelay, &damage, &div, &type, &damage2);
@@ -64984,6 +67464,7 @@ int HP_unit_changeviewsize(struct block_list *bl, short size) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_changeviewsize_pre ) {
int (*preHookFunc) (struct block_list *bl, short *size);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_changeviewsize_pre[hIndex].func;
retVal___ = preHookFunc(bl, &size);
@@ -65010,6 +67491,7 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file
int retVal___ = 0;
if( HPMHooks.count.HP_unit_remove_map_pre ) {
int (*preHookFunc) (struct block_list *bl, clr_type *clrtype, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_remove_map_pre[hIndex].func;
retVal___ = preHookFunc(bl, &clrtype, file, &line, func);
@@ -65035,6 +67517,7 @@ void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) {
int hIndex = 0;
if( HPMHooks.count.HP_unit_remove_map_pc_pre ) {
void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_remove_map_pc_pre[hIndex].func;
preHookFunc(sd, &clrtype);
@@ -65060,6 +67543,7 @@ void HP_unit_free_pc(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_unit_free_pc_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_free_pc_pre[hIndex].func;
preHookFunc(sd);
@@ -65086,6 +67570,7 @@ int HP_unit_free(struct block_list *bl, clr_type clrtype) {
int retVal___ = 0;
if( HPMHooks.count.HP_unit_free_pre ) {
int (*preHookFunc) (struct block_list *bl, clr_type *clrtype);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_free_pre[hIndex].func;
retVal___ = preHookFunc(bl, &clrtype);
@@ -65112,6 +67597,7 @@ void HP_vending_init(bool minimal) {
int hIndex = 0;
if( HPMHooks.count.HP_vending_init_pre ) {
void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_init_pre[hIndex].func;
preHookFunc(&minimal);
@@ -65137,6 +67623,7 @@ void HP_vending_final(void) {
int hIndex = 0;
if( HPMHooks.count.HP_vending_final_pre ) {
void (*preHookFunc) (void);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_final_pre[hIndex].func;
preHookFunc();
@@ -65162,6 +67649,7 @@ void HP_vending_close(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_vending_close_pre ) {
void (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_close_pre[hIndex].func;
preHookFunc(sd);
@@ -65187,6 +67675,7 @@ void HP_vending_open(struct map_session_data *sd, const char *message, const uin
int hIndex = 0;
if( HPMHooks.count.HP_vending_open_pre ) {
void (*preHookFunc) (struct map_session_data *sd, const char *message, const uint8 *data, int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_open_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_open_pre[hIndex].func;
preHookFunc(sd, message, data, &count);
@@ -65212,6 +67701,7 @@ void HP_vending_list(struct map_session_data *sd, unsigned int id) {
int hIndex = 0;
if( HPMHooks.count.HP_vending_list_pre ) {
void (*preHookFunc) (struct map_session_data *sd, unsigned int *id);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_list_pre[hIndex].func;
preHookFunc(sd, &id);
@@ -65237,6 +67727,7 @@ void HP_vending_purchase(struct map_session_data *sd, int aid, unsigned int uid,
int hIndex = 0;
if( HPMHooks.count.HP_vending_purchase_pre ) {
void (*preHookFunc) (struct map_session_data *sd, int *aid, unsigned int *uid, const uint8 *data, int *count);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_purchase_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_purchase_pre[hIndex].func;
preHookFunc(sd, &aid, &uid, data, &count);
@@ -65263,6 +67754,7 @@ bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) {
bool retVal___ = false;
if( HPMHooks.count.HP_vending_search_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_search_pre[hIndex].func;
retVal___ = preHookFunc(sd, &nameid);
@@ -65289,6 +67781,7 @@ bool HP_vending_searchall(struct map_session_data *sd, const struct s_search_sto
bool retVal___ = false;
if( HPMHooks.count.HP_vending_searchall_pre ) {
bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_vending_searchall_pre[hIndex].func;
retVal___ = preHookFunc(sd, s);
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index 0f1698d2a..77040d567 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -1,3 +1,8 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
+# @configure_input@
+
################ PLUGIN CONFIGURATION ##############################
# #
# When you add a plugin, add its name here: #
@@ -50,7 +55,7 @@ $(ALLPLUGINS): %: ../../plugins/%@DLLEXT@
buildclean:
@echo " CLEAN plugins (build temp files)"
@rm -rf *.o
-
+
clean: buildclean
@echo " CLEAN plugins"
@rm -rf ../../plugins/*@DLLEXT@
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 46d654e0d..751f4be8a 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -1,20 +1,22 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#include "../common/cbasetypes.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
+#include "../config/core.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
#include "../common/HPMi.h"
+#include "../common/cbasetypes.h"
+#include "../common/conf.h"
#include "../common/malloc.h"
#include "../common/mmo.h"
-#include "../common/conf.h"
-#include "../config/core.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
#include "../map/clif.h"
-#include "../map/pc.h"
-#include "../map/map.h"
#include "../map/itemdb.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include "../map/map.h"
+#include "../map/pc.h"
#include "../common/HPMDataCheck.h"
@@ -49,76 +51,236 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
struct item_data *it = NULL;
if( (it = itemdb->exists(itemdb_readdb_libconfig_sub(entry,n,source))) ) {
- char e_name[ITEM_NAME_LENGTH*2+1], e_jname[ITEM_NAME_LENGTH*2+1];
+ char e_name[ITEM_NAME_LENGTH*2+1];
const char *bonus = NULL;
char *str;
int i32;
- unsigned int ui32, job = 0, upper = 0;
+ unsigned int ui32;
config_setting_t *t = NULL;
+ StringBuf buf;
+ StrBuf->Init(&buf);
+
+ // id
+ StrBuf->Printf(&buf, "'%u',", it->nameid);
+
+ // name_english
SQL->EscapeString(NULL, e_name, it->name);
- SQL->EscapeString(NULL, e_jname, it->jname);
- if( it->script ) { libconfig->setting_lookup_string(entry, "Script", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[0].len ) { tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000; RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); }
- if( it->equip_script ) { libconfig->setting_lookup_string(entry, "OnEquipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[1].len ) { tosql.buf[1].len = tosql.buf[1].len + strlen(str) + 1000; RECREATE(tosql.buf[1].p,char,tosql.buf[1].len); } SQL->EscapeString(NULL, tosql.buf[1].p, str); }
- if( it->unequip_script ) { libconfig->setting_lookup_string(entry, "OnUnequipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[2].len ) { tosql.buf[2].len = tosql.buf[2].len + strlen(str) + 1000; RECREATE(tosql.buf[2].p,char,tosql.buf[2].len); } SQL->EscapeString(NULL, tosql.buf[2].p, str); }
+ StrBuf->Printf(&buf, "'%s',", e_name);
+ // name_japanese
+ SQL->EscapeString(NULL, e_name, it->jname);
+ StrBuf->Printf(&buf, "'%s',", e_name);
+
+ // type
+ StrBuf->Printf(&buf, "'%u',", it->flag.delay_consume?IT_DELAYCONSUME:it->type);
+
+ // price_buy
+ StrBuf->Printf(&buf, "'%u',", it->value_buy);
+
+ // price_sell
+ StrBuf->Printf(&buf, "'%u',", it->value_sell);
+
+ // weight
+ StrBuf->Printf(&buf, "'%u',", it->weight);
+
+ // atk
+ StrBuf->Printf(&buf, "'%u',", it->atk);
+
+ // matk
+ StrBuf->Printf(&buf, "'%u',", it->matk);
+
+ // defence
+ StrBuf->Printf(&buf, "'%u',", it->def);
+
+ // range
+ StrBuf->Printf(&buf, "'%u',", it->range);
+
+ // slots
+ StrBuf->Printf(&buf, "'%u',", it->slot);
+
+ // equip_jobs
if( libconfig->setting_lookup_int(entry, "Job", &i32) ) // This is an unsigned value, do not check for >= 0
ui32 = (unsigned int)i32;
else
ui32 = UINT_MAX;
-
- job = ui32;
-
+ StrBuf->Printf(&buf, "'%u',", ui32);
+
+ // equip_upper
if( libconfig->setting_lookup_int(entry, "Upper", &i32) && i32 >= 0 )
ui32 = (unsigned int)i32;
else
ui32 = ITEMUPPER_ALL;
+ StrBuf->Printf(&buf, "'%u',", ui32);
- upper = ui32;
-
- /* check if we have the equip_level_max, if so we send it -- otherwise we send NULL */
+ // equip_genders
+ StrBuf->Printf(&buf, "'%u',", it->sex);
+
+ // equip_locations
+ StrBuf->Printf(&buf, "'%u',", it->equip);
+
+ // weapon_level
+ StrBuf->Printf(&buf, "'%u',", it->wlv);
+
+ // equip_level_min
+ StrBuf->Printf(&buf, "'%u',", it->elv);
+
+ // equip_level_max
if( (t = libconfig->setting_get_member(entry, "EquipLv")) && config_setting_is_aggregate(t) && libconfig->setting_length(t) >= 2 )
- fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%s','%s','%s');\n",
- tosql.db_name,it->nameid,e_name,e_jname,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,job,upper,it->sex,it->equip,it->wlv,it->elv,it->elvmax,it->flag.no_refine?0:1,it->look,it->flag.bindonequip?1:0,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:"");
+ StrBuf->Printf(&buf, "'%u',", it->elvmax);
else
- fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',NULL,'%u','%u','%u','%s','%s','%s');\n",
- tosql.db_name,it->nameid,e_name,e_jname,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,job,upper,it->sex,it->equip,it->wlv,it->elv,it->flag.no_refine?0:1,it->look,it->flag.bindonequip?1:0,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:"");
+ StrBuf->AppendStr(&buf, "NULL,");
+
+ // refineable
+ StrBuf->Printf(&buf, "'%u',", it->flag.no_refine?0:1);
+
+ // view
+ StrBuf->Printf(&buf, "'%u',", it->look);
+
+ // bindonequip
+ StrBuf->Printf(&buf, "'%u',", it->flag.bindonequip?1:0);
+
+ // buyingstore
+ StrBuf->Printf(&buf, "'%u',", it->flag.buyingstore?1:0);
+
+ // delay
+ StrBuf->Printf(&buf, "'%u',", it->delay);
+
+ // trade_flag
+ StrBuf->Printf(&buf, "'%u',", it->flag.trade_restriction);
+
+ // trade_group
+ if (it->flag.trade_restriction != ITR_NONE && it->gm_lv_trade_override > 0 && it->gm_lv_trade_override < 100) {
+ StrBuf->Printf(&buf, "'%u',", it->gm_lv_trade_override);
+ } else {
+ StrBuf->AppendStr(&buf, "NULL,");
+ }
+
+ // nouse_flag
+ StrBuf->Printf(&buf, "'%u',", it->item_usage.flag);
+
+ // nouse_group
+ if (it->item_usage.flag != INR_NONE && it->item_usage.override > 0 && it->item_usage.override < 100) {
+ StrBuf->Printf(&buf, "'%u',", it->item_usage.override);
+ } else {
+ StrBuf->AppendStr(&buf, "NULL,");
+ }
+
+ // stack_amount
+ StrBuf->Printf(&buf, "'%u',", it->stack.amount);
+
+ // stack_flag
+ if (it->stack.amount) {
+ uint32 value = 0; // FIXME: Use an enum
+ value |= it->stack.inventory ? 1 : 0;
+ value |= it->stack.cart ? 2 : 0;
+ value |= it->stack.storage ? 4 : 0;
+ value |= it->stack.guildstorage ? 8 : 0;
+ StrBuf->Printf(&buf, "'%u',", value);
+ } else {
+ StrBuf->AppendStr(&buf, "NULL,");
+ }
+
+ // sprite
+ if (it->flag.available) {
+ StrBuf->Printf(&buf, "'%u',", it->view_id);
+ } else {
+ StrBuf->AppendStr(&buf, "NULL,");
+ }
+
+ // script
+ if (it->script) {
+ libconfig->setting_lookup_string(entry, "Script", &bonus);
+ hstr(bonus);
+ str = tosql.buf[3].p;
+ if (strlen(str) > tosql.buf[0].len) {
+ tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000;
+ RECREATE(tosql.buf[0].p,char,tosql.buf[0].len);
+ }
+ SQL->EscapeString(NULL, tosql.buf[0].p, str);
+ }
+ StrBuf->Printf(&buf, "'%s',", it->script?tosql.buf[0].p:"");
+
+ // equip_script
+ if (it->equip_script) {
+ libconfig->setting_lookup_string(entry, "OnEquipScript", &bonus);
+ hstr(bonus);
+ str = tosql.buf[3].p;
+ if (strlen(str) > tosql.buf[1].len) {
+ tosql.buf[1].len = tosql.buf[1].len + strlen(str) + 1000;
+ RECREATE(tosql.buf[1].p,char,tosql.buf[1].len);
+ }
+ SQL->EscapeString(NULL, tosql.buf[1].p, str);
+ }
+ StrBuf->Printf(&buf, "'%s',", it->equip_script?tosql.buf[1].p:"");
+
+ // unequip_script
+ if (it->unequip_script) {
+ libconfig->setting_lookup_string(entry, "OnUnequipScript", &bonus);
+ hstr(bonus);
+ str = tosql.buf[3].p;
+ if (strlen(str) > tosql.buf[2].len) {
+ tosql.buf[2].len = tosql.buf[2].len + strlen(str) + 1000;
+ RECREATE(tosql.buf[2].p,char,tosql.buf[2].len);
+ }
+ SQL->EscapeString(NULL, tosql.buf[2].p, str);
+ }
+ StrBuf->Printf(&buf, "'%s'", it->unequip_script?tosql.buf[2].p:"");
+
+ fprintf(tosql.fp, "REPLACE INTO `%s` VALUES (%s);\n", tosql.db_name, StrBuf->Value(&buf));
+
+ StrBuf->Destroy(&buf);
}
-
+
return it?it->nameid:0;
}
void totable(void) {
- fprintf(tosql.fp,"#\n"
- "# Table structure for table `%s`\n"
- "#\n"
+ fprintf(tosql.fp,
+ "-- NOTE: This file was auto-generated and should never be manually edited,\n"
+ "-- as it will get overwritten. If you need to modify this file,\n"
+ "-- please consider modifying the corresponding .conf file inside\n"
+ "-- the db folder, and then re-run the db2sql plugin.\n"
+ "\n"
+ "--\n"
+ "-- Table structure for table `%s`\n"
+ "--\n"
"\n"
"DROP TABLE IF EXISTS `%s`;\n"
"CREATE TABLE `%s` (\n"
- " `id` smallint(5) unsigned NOT NULL DEFAULT '0',\n"
- " `name_english` varchar(50) NOT NULL DEFAULT '',\n"
- " `name_japanese` varchar(50) NOT NULL DEFAULT '',\n"
- " `type` tinyint(2) unsigned NOT NULL DEFAULT '0',\n"
- " `price_buy` mediumint(10) DEFAULT NULL,\n"
- " `price_sell` mediumint(10) DEFAULT NULL,\n"
- " `weight` smallint(5) unsigned DEFAULT NULL,\n"
- " `atk` smallint(5) unsigned DEFAULT NULL,\n"
- " `matk` smallint(5) unsigned DEFAULT NULL,\n"
- " `defence` smallint(5) unsigned DEFAULT NULL,\n"
- " `range` tinyint(2) unsigned DEFAULT NULL,\n"
- " `slots` tinyint(2) unsigned DEFAULT NULL,\n"
- " `equip_jobs` int(12) unsigned DEFAULT NULL,\n"
- " `equip_upper` tinyint(8) unsigned DEFAULT NULL,\n"
- " `equip_genders` tinyint(2) unsigned DEFAULT NULL,\n"
- " `equip_locations` smallint(4) unsigned DEFAULT NULL,\n"
- " `weapon_level` tinyint(2) unsigned DEFAULT NULL,\n"
- " `equip_level_min` smallint(5) unsigned DEFAULT NULL,\n"
- " `equip_level_max` smallint(5) unsigned DEFAULT NULL,\n"
- " `refineable` tinyint(1) unsigned DEFAULT NULL,\n"
- " `view` smallint(3) unsigned DEFAULT NULL,\n"
- " `bindonequip` tinyint(1) unsigned DEFAULT NULL,\n"
- " `script` text,\n"
- " `equip_script` text,\n"
- " `unequip_script` text,\n"
+ " `id` smallint(5) UNSIGNED NOT NULL DEFAULT '0',\n"
+ " `name_english` varchar(50) NOT NULL DEFAULT '',\n"
+ " `name_japanese` varchar(50) NOT NULL DEFAULT '',\n"
+ " `type` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',\n"
+ " `price_buy` mediumint(10) DEFAULT NULL,\n"
+ " `price_sell` mediumint(10) DEFAULT NULL,\n"
+ " `weight` smallint(5) UNSIGNED DEFAULT NULL,\n"
+ " `atk` smallint(5) UNSIGNED DEFAULT NULL,\n"
+ " `matk` smallint(5) UNSIGNED DEFAULT NULL,\n"
+ " `defence` smallint(5) UNSIGNED DEFAULT NULL,\n"
+ " `range` tinyint(2) UNSIGNED DEFAULT NULL,\n"
+ " `slots` tinyint(2) UNSIGNED DEFAULT NULL,\n"
+ " `equip_jobs` int(12) UNSIGNED DEFAULT NULL,\n"
+ " `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL,\n"
+ " `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL,\n"
+ " `equip_locations` smallint(4) UNSIGNED DEFAULT NULL,\n"
+ " `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL,\n"
+ " `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL,\n"
+ " `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL,\n"
+ " `refineable` tinyint(1) UNSIGNED DEFAULT NULL,\n"
+ " `view` smallint(3) UNSIGNED DEFAULT NULL,\n"
+ " `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,\n"
+ " `buyingstore` tinyint(1) UNSIGNED DEFAULT NULL,\n"
+ " `delay` mediumint(9) UNSIGNED DEFAULT NULL,\n"
+ " `trade_flag` smallint(4) UNSIGNED DEFAULT NULL,\n"
+ " `trade_group` smallint(3) UNSIGNED DEFAULT NULL,\n"
+ " `nouse_flag` smallint(4) UNSIGNED DEFAULT NULL,\n"
+ " `nouse_group` smallint(4) UNSIGNED DEFAULT NULL,\n"
+ " `stack_amount` mediumint(6) UNSIGNED DEFAULT NULL,\n"
+ " `stack_flag` tinyint(2) UNSIGNED DEFAULT NULL,\n"
+ " `sprite` mediumint(6) UNSIGNED DEFAULT NULL,\n"
+ " `script` text,\n"
+ " `equip_script` text,\n"
+ " `unequip_script` text,\n"
" PRIMARY KEY (`id`)\n"
") ENGINE=MyISAM;\n"
"\n",tosql.db_name,tosql.db_name,tosql.db_name);
@@ -196,9 +358,9 @@ HPExport void server_preinit (void) {
strlib = GET_SYMBOL("strlib");
iMalloc = GET_SYMBOL("iMalloc");
libconfig = GET_SYMBOL("libconfig");
-
+ StrBuf = GET_SYMBOL("StrBuf");
- addArg("--db2sql",false,db2sql_arg,NULL);
+ addArg("--db2sql",false,db2sql_arg,NULL);
}
HPExport void plugin_init (void) {
addCPCommand("server:tools:db2sql",db2sql);
diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c
index 32b30d69a..d121e9492 100644
--- a/src/plugins/dbghelpplug.c
+++ b/src/plugins/dbghelpplug.c
@@ -1,23 +1,29 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// Ported from eAthena Dev Team's version @ http://eathena-project.googlecode.com/svn/trunk/src/plugins/dbghelpplug.c
// See the LICENSE file
-// dbghelpplug.dll Hercules Plugin
+// Portions Copyright (c) Athena Dev Teams
+
+// Ported from eAthena Dev Team's version @ http://eathena-project.googlecode.com/svn/trunk/src/plugins/dbghelpplug.c
+// Currently supported dbghelp 5.1
#include <stdio.h>
#include <string.h>
+#include "../common/sysinfo.h"
#include "../common/HPMi.h"
+#include "../common/HPMDataCheck.h"
+
+/**
+ * Plugin basic information
+ **/
HPExport struct hplugin_info pinfo = {
- "DBGHelpPlug", // Plugin name
- SERVER_TYPE_MAP,// Which server types this plugin works with?
- "0.3", // Plugin version
- HPM_VERSION, // HPM Version (don't change, macro is automatically updated)
+ "Debug Help",
+ SERVER_TYPE_ALL,
+ "0.5",
+ HPM_VERSION,
};
-#ifdef _WIN32
-
/////////////////////////////////////////////////////////////////////
-// Include files
+// Include files
//
#include <assert.h>
@@ -32,13 +38,12 @@ HPExport struct hplugin_info pinfo = {
#include <time.h>
/////////////////////////////////////////////////////////////////////
-// Types from Cvconst.h (DIA SDK)
+// Types from Cvconst.h (DIA SDK)
//
#ifdef _NO_CVCONST_H
-typedef enum _BasicType
-{
+typedef enum _BasicType {
btNoType = 0,
btVoid = 1,
btChar = 2,
@@ -66,7 +71,7 @@ typedef enum _UdtKind
UdtUnion
} UdtKind;
/*
-typedef enum _SymTag {
+typedef enum _SymTag {
SymTagNull = 0,
SymTagExe = 1,
SymTagCompiland = 2,
@@ -102,6 +107,7 @@ typedef enum _SymTag {
*/
#endif /* _NO_CVCONST_H */
+struct sysinfo_interface *sysinfo;
/////////////////////////////////////////////////////////////////////
// dbghelp function prototypes
@@ -214,6 +220,10 @@ typedef struct _InternalData {
"Please report the crash in the bug tracker:\n" \
"http://hercules.ws/board/tracker/\n"
+// Print object children?
+// WARNING: This will generate huge dump files!
+//#define DBG_PRINT_CHILDREN
+
/////////////////////////////////////////////////////////////////////
// Global variables
@@ -235,7 +245,7 @@ SYMGETMODULEBASE SymGetModuleBase_ = NULL;
/////////////////////////////////////////////////////////////////////
// Code
-/// Writes the minidump to file. The callback function will at the
+/// Writes the minidump to file. The callback function will at the
/// same time write the list of modules to the log file.
///
/// @param file Filename of the minidump
@@ -324,7 +334,7 @@ Dhp__PrintModuleInfoCallback(
return TRUE;
}
-/// Prints details about the current process, platform and exception
+/// Prints details about the current process, platform and exception
/// information to the log file.
///
/// @param exception Exception info
@@ -336,25 +346,25 @@ Dhp__PrintProcessInfo(
CONTEXT* context,
FILE* log_file)
{
- OSVERSIONINFOA oi;
LPSTR cmd_line;
fprintf(log_file,
- "\nProcess info:\n");
+ "\nProcess information:\n");
// print the command line
cmd_line = GetCommandLineA();
if( cmd_line )
fprintf(log_file,
- "Cmd line: %s\n",
+ "Command line: %s\n",
cmd_line);
- // print information about the OS
- oi.dwOSVersionInfoSize = sizeof(oi);
- GetVersionExA(&oi);
- fprintf(log_file,
- "Platform: Windows OS version %d.%d build %d %s\n",
- oi.dwMajorVersion, oi.dwMinorVersion, oi.dwBuildNumber, oi.szCSDVersion);
+ // Print system information
+ if( sysinfo ) {
+ fprintf(log_file,
+ "Platform: %s\n CPU: %s\nApplication architecture: %s\nCompiler: %s\n%s: %s\n",
+ sysinfo->osversion(), sysinfo->cpu(), (sysinfo->is64bit())?"x64":"x86",
+ sysinfo->compiler(), sysinfo->vcstype(), sysinfo->vcsrevision_src());
+ }
// print the exception code
if( exception )
@@ -418,7 +428,7 @@ Dhp__PrintProcessInfo(
{
fprintf(log_file,
"eip=%08x esp=%08x ebp=%08x iopl=%1x %s %s %s %s %s %s %s %s %s %s\n",
- context->Eip, context->Esp, context->Ebp,
+ context->Eip, context->Esp, context->Ebp,
(context->EFlags >> 12) & 3, // IOPL level value
context->EFlags & 0x00100000 ? "vip" : " ", // VIP (virtual interrupt pending)
context->EFlags & 0x00080000 ? "vif" : " ", // VIF (virtual interrupt flag)
@@ -487,7 +497,7 @@ Dhp__PrintTypeName(
switch( symtag )
{
case SymTagEnum:
- {
+ {
WCHAR* pwszTypeName;
if( SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_GET_SYMNAME, &pwszTypeName) )
@@ -945,6 +955,12 @@ Dhp__PrintDataValue(
BYTE b = 0;
for( i = 0; i < length; ++i )
b += p[i]; // add to make sure it's not optimized out in release mode
+
+ // Don't continue if there's no valid data
+ if( b == 0 ) {
+ fprintf(log_file, "<no data>");
+ return;
+ }
}
__except( EXCEPTION_EXECUTE_HANDLER )
{
@@ -1007,7 +1023,7 @@ Dhp__PrintDataValue(
fprintf(log_file, "0x%p", *(void**)pVariable);
if( SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_GET_TYPE, &childTypeIndex) &&
- SymGetTypeInfo_(hProcess, modBase, childTypeIndex, TI_GET_SYMTAG, &childSymtag) &&
+ SymGetTypeInfo_(hProcess, modBase, childTypeIndex, TI_GET_SYMTAG, &childSymtag) &&
childSymtag != SymTagPointerType )
{
DWORD childBasetype;
@@ -1047,6 +1063,7 @@ Dhp__PrintDataValue(
Dhp__PrintValueBytes(log_file, (BYTE*)pVariable, length);
break;
}
+ LocalFree(&childSymtag);
if( !SymGetTypeInfo_( hProcess, modBase, typeIndex, TI_GET_COUNT, &count) )
{
fprintf(log_file, "<count not found>");
@@ -1066,29 +1083,30 @@ Dhp__PrintDataValue(
}
break;
default:
-#if 0
- {//## TODO show children of structs/unions
- TI_FINDCHILDREN_PARAMS* children;
- DWORD childCount;
+#ifdef DBG_PRINT_CHILDREN
+ {
+ TI_FINDCHILDREN_PARAMS *children = NULL;
+ size_t childrenSize;
+ DWORD childCount = 0;
DWORD i;
// count children
- if( !SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_GET_CHILDRENCOUNT, &childCount) )
- {
- fprintf(log_file, "<child count not found>");
+ if( !SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_GET_CHILDRENCOUNT, &childCount)
+ || !childCount ) {
+ fprintf(log_file, "<no children found>");
Dhp__PrintValueBytes(log_file, (BYTE*)pVariable, length);
- break;
+ return;
}
// Prepare to get an array of "TypeIds", representing each of the children.
// SymGetTypeInfo(TI_FINDCHILDREN) expects more memory than just a
// TI_FINDCHILDREN_PARAMS struct has. Use derivation to accomplish this.
- children = (TI_FINDCHILDREN_PARAMS*)LocalAlloc(LMEM_FIXED, sizeof(TI_FINDCHILDREN_PARAMS)+childCount*sizeof(ULONG));
+ childrenSize = sizeof(TI_FINDCHILDREN_PARAMS)+childCount*sizeof(ULONG);
+ children = (TI_FINDCHILDREN_PARAMS*)LocalAlloc(LMEM_ZEROINIT, childrenSize);
children->Count = childCount;
- children->Start= 0;
// Get the array of TypeIds, one for each child type
- if( !SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_FINDCHILDREN, &children) )
+ if( !SymGetTypeInfo_(hProcess, modBase, typeIndex, TI_FINDCHILDREN, children) || !children )
{
fprintf(log_file, "<children not found>");
Dhp__PrintValueBytes(log_file, (BYTE*)pVariable, length);
@@ -1097,15 +1115,15 @@ Dhp__PrintDataValue(
}
// Iterate through each of the children
- fprintf(log_file, "{");
+ fprintf(log_file, "\n{");
for( i = 0; i < childCount; ++i )
{
DWORD childOffset;
- DWORD childTypeid;
- WCHAR* childName;
+ WCHAR *childName = NULL;
+ DWORD childTypeId;
DWORD_PTR pData;
- if( i > 0 ) fprintf(log_file, ",");
+ fprintf(log_file, "\n\t");
// Get the offset of the child member, relative to its parent
if( !SymGetTypeInfo_(hProcess, modBase, children->ChildId[i], TI_GET_OFFSET, &childOffset) )
@@ -1114,30 +1132,26 @@ Dhp__PrintDataValue(
continue;
}
- // Get the real "TypeId" of the child.
- if( !SymGetTypeInfo_(hProcess, modBase, children->ChildId[i], TI_GET_TYPEID, &childTypeid) )
- {
- fprintf(log_file, "<child typeid not found>");
- continue;
- }
-
// Calculate the address of the member
pData = (DWORD_PTR)pVariable;
pData += childOffset;
- // print name of the child
- if( !SymGetTypeInfo_(hProcess, modBase, childTypeid, TI_GET_SYMNAME, &childName) )
- {
- fprintf(log_file, "<child symname not found>");
- continue;
+ if( !SymGetTypeInfo_(hProcess, modBase, children->ChildId[i], TI_GET_SYMNAME, &childName) ) {
+ fprintf(log_file, "<child symbol name not found>");
+ continue;
}
fprintf(log_file, "%ws=", childName);
LocalFree(childName);
+ if( !SymGetTypeInfo_(hProcess, modBase, children->ChildId[i], TI_GET_TYPEID, &childTypeId) ) {
+ fprintf(log_file, "<child type id not found>");
+ continue;
+ }
+
// print contents of the child
- Dhp__PrintDataContents(childTypeid, (PVOID)pData, interData);
+ Dhp__PrintDataContents(childTypeId, (PVOID)pData, pInterData);
}
- fprintf(log_file, "}");
+ fprintf(log_file, "\n}");
LocalFree(children);
}
@@ -1277,9 +1291,9 @@ Dhp__PrintSymbolInfo(
assert( pSymInfo != NULL );
assert( pInterData != NULL );
- switch( pSymInfo->Tag )
+ switch( pSymInfo->Tag )
{
- case SymTagData: Dhp__PrintDataInfo( pSymInfo, pInterData ); break;
+ case SymTagData: Dhp__PrintDataInfo( pSymInfo, pInterData ); break;
default: /*fprintf(pInterData->log_file, "<unsupported symtag %d>", pSymInfo->Tag);*/ break;
}
}
@@ -1431,7 +1445,8 @@ Dhp__PrintFunctionDetails(
pInterData->log_locals = FALSE;
pInterData->log_globals = FALSE;
pInterData->nr_of_var = 0;
- SymEnumSymbols_(hProcess, 0, 0, Dhp__EnumSymbolsCallback, pInterData);
+ if( !SymEnumSymbols_(hProcess, 0, 0, Dhp__EnumSymbolsCallback, pInterData) )
+ fprintf(log_file, "<failed enumerating symbols>");
fprintf(log_file,
")");
@@ -1463,7 +1478,8 @@ Dhp__PrintFunctionDetails(
pInterData->log_locals = TRUE;
pInterData->log_globals = FALSE;
pInterData->nr_of_var = 0;
- SymEnumSymbols_(hProcess, 0, 0, Dhp__EnumSymbolsCallback, pInterData);
+ if( !SymEnumSymbols_(hProcess, 0, 0, Dhp__EnumSymbolsCallback, pInterData) )
+ fprintf(log_file, "!!failed enumerating symbols!!");
pInterData->nr_of_frame = ++nr_of_frame;
LocalFree(pSymbolInfo);
@@ -1611,7 +1627,10 @@ Dhp__LoadDbghelpDll()
// Initialize the dbghelp DLL with the default path and automatic
// module enumeration (and loading of symbol tables) for this process.
- SymInitialize_(GetCurrentProcess(), NULL, TRUE);
+ if( !SymInitialize_(GetCurrentProcess(), NULL, TRUE) ) {
+ printf("Failed to initialize symbols. Error: %u\n", GetLastError());
+ return FALSE;
+ }
return TRUE;
}
@@ -1630,7 +1649,8 @@ Dhp__LoadDbghelpDll()
static VOID
Dhp__UnloadDbghlpDll()
{
- SymCleanup_(GetCurrentProcess());
+ if( !SymCleanup_(GetCurrentProcess()) )
+ printf("Failed to cleanup symbols! Error: %u\n", GetLastError());
FreeLibrary(dbghelp_dll);
dbghelp_dll = NULL;
@@ -1768,49 +1788,25 @@ Dhp__UnhandledExceptionFilter(PEXCEPTION_POINTERS ptrs)
return EXCEPTION_EXECUTE_HANDLER;
}
-
/////////////////////////////////////////////////////////////////////
-// DLL stuff
-#if !defined(DBG_EMBEDDED)
+// Plugin
/// Previous exception filter.
static LPTOP_LEVEL_EXCEPTION_FILTER previousFilter;
-#if defined(__GNUC__)
-// GNU : define DLL load/unload functions
-static void Dhp__OnStartup(void) __attribute__((constructor));
-static void Dhp__OnExit(void) __attribute__((destructor));
-#endif /* defined(__GNUC__) */
-
-/// Installs as the unhandled exception handler.
-void Dhp__OnStartup(void)
-{
- // Install the unhandled exception filter function
+/**
+ * Initializes plugin
+ * Installs a new unhandled exception filter (Dhp__UnhandledExceptionFilter)
+ **/
+HPExport void plugin_init (void) {
previousFilter = SetUnhandledExceptionFilter(Dhp__UnhandledExceptionFilter);
+ sysinfo = GET_SYMBOL("sysinfo");
}
-/// Uninstalls the handler.
-void Dhp__OnExit(void)
-{
+/**
+ * Finalizes plugin
+ * Uninstalls the handler
+ **/
+HPExport void plugin_final (void) {
SetUnhandledExceptionFilter(previousFilter);
}
-
-#if !defined(__GNUC__)
-// Windows : invoke DLL load/unload functions
-BOOL APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
-{
- switch( dwReason )
- {
- case DLL_PROCESS_ATTACH: Dhp__OnStartup(); break;
- case DLL_PROCESS_DETACH: Dhp__OnExit(); break;
- }
- return TRUE;
-}
-#endif /* !defined(__GNUC__) */
-#endif /* !defined(DBG_EMBEDDED) */
-
-HPExport void plugin_init (void) {
-}
-
-#endif /* _WIN32 */
-
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 819aae08c..84df88e06 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -3,17 +3,17 @@
// Sample Hercules Plugin
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
#include "../common/HPMi.h"
+#include "../common/malloc.h"
#include "../common/mmo.h"
#include "../common/socket.h"
-#include "../common/malloc.h"
-#include "../map/script.h"
-#include "../map/pc.h"
-#include "../map/clif.h"
#include "../common/strlib.h"
+#include "../map/clif.h"
+#include "../map/pc.h"
+#include "../map/script.h"
#include "../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index c70997c63..dea126e46 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -1,9 +1,14 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
+# @configure_input@
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -17,9 +22,10 @@ MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o
MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
MT19937AR_INCLUDE = -I$(MT19937AR_D)
-TEST_SPINLOCK_OBJ=obj/test_spinlock.o
-TEST_SPINLOCK_H=
-TEST_SPINLOCK_DEPENDS=$(TEST_SPINLOCK_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ)
+TEST_SPINLOCK_OBJ = obj/test_spinlock.o
+TEST_SPINLOCK_C = test_spinlock.c
+TEST_SPINLOCK_H =
+TEST_SPINLOCK_DEPENDS = $(TEST_SPINLOCK_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
@SET_MAKE@
@@ -44,30 +50,33 @@ clean: buildclean
Makefile: Makefile.in
@$(MAKE) -C ../.. src/test/Makefile
+$(SYSINFO_INC): $(TEST_SPINLOCK_C) $(TEST_SPINLOCK_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
# object directories
obj:
@echo " MKDIR obj"
@-mkdir obj
-
+
#executables
test_spinlock: $(TEST_SPINLOCK_DEPENDS) Makefile
@echo " LD $@"
- @$(CC) @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
- $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @$(CC) @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_DEPENDS) @LIBS@ @MYSQL_LIBS@
-# login object files
+# object files
-obj/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj
+obj/%.o: %.c $(TEST_SPINLOCK_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj
@echo " CC $<"
- @$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DWITH_SQL @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DWITH_SQL @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(COMMON_D)/obj_all/common.a:
@echo " MAKE $@"
@$(MAKE) -C $(COMMON_D) sql
-
+
$(COMMON_D)/obj_sql/common_sql.a:
@echo " MAKE $@"
@$(MAKE) -C $(COMMON_D) sql
diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c
index 878ee8bab..19a25f9d2 100644
--- a/src/test/test_spinlock.c
+++ b/src/test/test_spinlock.c
@@ -8,13 +8,13 @@
#include <stdio.h>
#include <stdlib.h>
-//
-// Simple test for the spinlock implementation to see if it works properly..
+//
+// Simple test for the spinlock implementation to see if it works properly..
//
-#define THRC 32 //thread Count
+#define THRC 32 //thread Count
#define PERINC 100000
#define LOOPS 47
@@ -43,7 +43,7 @@ static void *worker(void *p){
int do_init(int argc, char **argv){
- rAthread t[THRC];
+ rAthread *t[THRC];
int j, i;
int ok;
@@ -66,7 +66,7 @@ int do_init(int argc, char **argv){
while(1){
- if(InterlockedCompareExchange(&done_threads, THRC, THRC) == THRC)
+ if(InterlockedCompareExchange(&done_threads, THRC, THRC) == THRC)
break;
rathread_yield();
@@ -86,7 +86,7 @@ int do_init(int argc, char **argv){
if(ok != LOOPS){
- ShowFatalError("Test failed.\n");
+ ShowFatalError("Test failed.\n");
exit(1);
}else{
ShowStatus("Test passed.\n");
@@ -98,16 +98,17 @@ return 0;
}//end: do_init()
-void do_abort(){
+void do_abort(void) {
}//end: do_abort()
-void set_server_type(){
- SERVER_TYPE = ATHENA_SERVER_NONE;
+void set_server_type(void) {
+ SERVER_TYPE = SERVER_TYPE_UNKNOWN;
}//end: set_server_type()
-void do_final(){
+int do_final(void) {
+ return EXIT_SUCCESS;
}//end: do_final()
diff --git a/src/tool/CMakeLists.txt b/src/tool/CMakeLists.txt
deleted file mode 100644
index a54ffa0e2..000000000
--- a/src/tool/CMakeLists.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-
-#
-# mapcache
-#
-if( WITH_ZLIB )
- option( BUILD_MAPCACHE "build mapcache executable" ON )
-else()
- message( STATUS "Disabled mapcache target (required ZLIB)" )
-endif()
-if( BUILD_MAPCACHE )
-message( STATUS "Creating target mapcache" )
-set( COMMON_HEADERS
- ${COMMON_MINI_HEADERS}
- "${COMMON_SOURCE_DIR}/des.h"
- "${COMMON_SOURCE_DIR}/grfio.h"
- "${COMMON_SOURCE_DIR}/utils.h"
- )
-set( COMMON_SOURCES
- ${COMMON_MINI_SOURCES}
- "${COMMON_SOURCE_DIR}/des.c"
- "${COMMON_SOURCE_DIR}/grfio.c"
- "${COMMON_SOURCE_DIR}/utils.c"
- )
-set( MAPCACHE_SOURCES
- "${CMAKE_CURRENT_SOURCE_DIR}/mapcache.c"
- )
-set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${COMMON_MINI_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS}" )
-set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${MAPCACHE_SOURCES} )
-source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} )
-source_group( mapcache FILES ${MAPCACHE_SOURCES} )
-add_executable( mapcache ${SOURCE_FILES} )
-include_directories( ${INCLUDE_DIRS} )
-target_link_libraries( mapcache ${LIBRARIES} )
-set_target_properties( mapcache PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_mapcache DESCRIPTION "mapcache generator" DISPLAY_NAME "mapcache" GROUP Runtime )
- install( TARGETS mapcache
- DESTINATION "."
- COMPONENT Runtime_mapcache )
-endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} mapcache CACHE INTERNAL "" )
-message( STATUS "Creating target mapcache - done" )
-endif( BUILD_MAPCACHE )
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index 3d0de1122..127d3841b 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -1,12 +1,14 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
+# @configure_input@
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
-COMMON_OBJ = $(addprefix $(COMMON_D)/obj_all/, des.o grfio.o malloc.o \
- nullpo.o miniconsole.o minicore.o showmsg.o strlib.o utils.o)
-COMMON_H = $(addprefix $(COMMON_D)/, cbasetypes.h console.h core.h des.h \
- grfio.h malloc.h mmo.h nullpo.h showmsg.h strlib.h utils.h)
+COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -16,6 +18,9 @@ LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \
LIBCONFIG_INCLUDE = -I$(LIBCONFIG_D)
MAPCACHE_OBJ = obj_all/mapcache.o
+MAPCACHE_C = mapcache.c
+MAPCACHE_H =
+MAPCACHE_DEPENDS = $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ $(SYSINFO_INC))
@SET_MAKE@
@@ -29,9 +34,9 @@ all: mapcache Makefile
mapcache: ../../mapcache@EXEEXT@
-../../mapcache@EXEEXT@: $(MAPCACHE_OBJ) $(COMMON_OBJ) $(LIBCONFIG_OBJ) Makefile
+../../mapcache@EXEEXT@: $(MAPCACHE_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @LDFLAGS@ $(LIBCONFIG_INCLUDE) -o ../../mapcache@EXEEXT@ $(MAPCACHE_OBJ) $(COMMON_OBJ) $(LIBCONFIG_OBJ) @LIBS@
+ @$(CC) @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_DEPENDS) @LIBS@
buildclean:
@echo " CLEAN tool (build temp files)"
@@ -55,22 +60,22 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/tool/Makefile
+$(SYSINFO_INC): $(MAPCACHE_C) $(MAPCACHE_H) $(COMMON_H) $(CONFIG_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
obj_all:
@echo " MKDIR obj_all"
@-mkdir obj_all
-obj_all/%.o: %.c $(COMMON_H) $(CONFIG_H) $(LIBCONFIG_H) | obj_all
+obj_all/%.o: %.c $(MAPCACHE_H) $(COMMON_H) $(CONFIG_H) $(LIBCONFIG_H) | obj_all
@echo " CC $<"
- @$(CC) @CFLAGS@ $(LIBCONFIG_INCLUDE) @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(LIBCONFIG_INCLUDE) @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing common object files
-$(COMMON_D)/obj_all/%.o:
- @echo " MAKE $@"
- @$(MAKE) -C $(COMMON_D) sql
-
-$(COMMON_D)/obj_all/mini%.o:
+$(COMMON_D)/obj_all/common_mini.a:
@echo " MAKE $@"
- @$(MAKE) -C $(COMMON_D) sql
+ @$(MAKE) -C $(COMMON_D) common_mini
$(LIBCONFIG_OBJ):
@echo " MAKE $@"
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index caa55c87a..96d51aec6 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -1,18 +1,21 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#include "../common/cbasetypes.h"
-#include "../common/grfio.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
+#define HERCULES_CORE
-#include "../config/renewal.h"
+#include "../config/core.h" // RENEWAL
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "../common/cbasetypes.h"
+#include "../common/grfio.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/utils.h"
+
#ifndef _WIN32
#include <unistd.h>
#endif
@@ -49,60 +52,10 @@ struct map_info {
int32 len;
};
-
-/*************************************
-* Big-endian compatibility functions *
-*************************************/
-
-// Converts an int16 from current machine order to little-endian
-int16 MakeShortLE(int16 val)
-{
- unsigned char buf[2];
- buf[0] = (unsigned char)( (val & 0x00FF) );
- buf[1] = (unsigned char)( (val & 0xFF00) >> 0x08 );
- return *((int16*)buf);
-}
-
-// Converts an int32 from current machine order to little-endian
-int32 MakeLongLE(int32 val)
-{
- unsigned char buf[4];
- buf[0] = (unsigned char)( (val & 0x000000FF) );
- buf[1] = (unsigned char)( (val & 0x0000FF00) >> 0x08 );
- buf[2] = (unsigned char)( (val & 0x00FF0000) >> 0x10 );
- buf[3] = (unsigned char)( (val & 0xFF000000) >> 0x18 );
- return *((int32*)buf);
-}
-
-// Reads an uint16 in little-endian from the buffer
-uint16 GetUShort(const unsigned char* buf)
-{
- return ( ((uint16)(buf[0])) )
- |( ((uint16)(buf[1])) << 0x08 );
-}
-
-// Reads an uint32 in little-endian from the buffer
-uint32 GetULong(const unsigned char* buf)
-{
- return ( ((uint32)(buf[0])) )
- |( ((uint32)(buf[1])) << 0x08 )
- |( ((uint32)(buf[2])) << 0x10 )
- |( ((uint32)(buf[3])) << 0x18 );
-}
-
-// Reads an int32 in little-endian from the buffer
-int32 GetLong(const unsigned char* buf)
-{
- return (int32)GetULong(buf);
-}
-
-// Reads a float (32 bits) from the buffer
-float GetFloat(const unsigned char* buf)
-{
- uint32 val = GetULong(buf);
- return *((float*)(void*)&val);
-}
-
+ /*************************************
+ * Big-endian compatibility functions *
+ * Moved to utils.h *
+ *************************************/
// Reads a map from GRF's GAT and RSW files
int read_map(char *name, struct map_data *m)