diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking.c | 170 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc | 32 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc | 8 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 66 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc | 78 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 100 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 25 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 635 | ||||
-rw-r--r-- | src/plugins/Makefile.in | 7 | ||||
-rw-r--r-- | src/plugins/db2sql.c | 36 | ||||
-rw-r--r-- | src/plugins/dbghelpplug.c | 13 | ||||
-rw-r--r-- | src/plugins/sample.c | 24 |
15 files changed, 786 insertions, 424 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index c6fb6462d..e15cc363d 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -2,99 +2,99 @@ // See the LICENSE file // Sample Hercules Plugin -#include <stdio.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/HPMi.h" +#include "common/db.h" +#include "common/malloc.h" +#include "common/mmo.h" +#include "common/socket.h" #if defined (HPMHOOKING_LOGIN) #define HPM_SERVER_TYPE SERVER_TYPE_LOGIN -#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc" -#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_login.GetSymbol.inc" -#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_login.Hooks.inc" -#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_login.HookingPoints.inc" -#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_login.sources.inc" -#include "../login/login.h" +#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_login.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_login.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_login.Hooks.inc" +#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_login.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_login.sources.inc" +#include "login/login.h" #elif defined (HPMHOOKING_CHAR) #define HPM_SERVER_TYPE SERVER_TYPE_CHAR -#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc" -#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_char.GetSymbol.inc" -#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_char.Hooks.inc" -#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_char.HookingPoints.inc" -#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_char.sources.inc" -#include "../char/char.h" -#include "../char/geoip.h" -#include "../char/int_auction.h" -#include "../char/int_elemental.h" -#include "../char/int_guild.h" -#include "../char/int_homun.h" -#include "../char/int_mail.h" -#include "../char/int_mercenary.h" -#include "../char/int_party.h" -#include "../char/int_pet.h" -#include "../char/int_quest.h" -#include "../char/int_storage.h" -#include "../char/inter.h" -#include "../char/loginif.h" -#include "../char/mapif.h" -#include "../char/pincode.h" +#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_char.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_char.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_char.Hooks.inc" +#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_char.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_char.sources.inc" +#include "char/char.h" +#include "char/geoip.h" +#include "char/int_auction.h" +#include "char/int_elemental.h" +#include "char/int_guild.h" +#include "char/int_homun.h" +#include "char/int_mail.h" +#include "char/int_mercenary.h" +#include "char/int_party.h" +#include "char/int_pet.h" +#include "char/int_quest.h" +#include "char/int_storage.h" +#include "char/inter.h" +#include "char/loginif.h" +#include "char/mapif.h" +#include "char/pincode.h" #elif defined (HPMHOOKING_MAP) #define HPM_SERVER_TYPE SERVER_TYPE_MAP -#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc" -#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_map.GetSymbol.inc" -#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_map.Hooks.inc" -#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_map.HookingPoints.inc" -#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_map.sources.inc" -#include "../map/atcommand.h" -#include "../map/battle.h" -#include "../map/battleground.h" -#include "../map/channel.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/storage.h" -#include "../map/trade.h" -#include "../map/unit.h" +#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_map.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_map.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_map.Hooks.inc" +#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_map.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_map.sources.inc" +#include "map/atcommand.h" +#include "map/battle.h" +#include "map/battleground.h" +#include "map/channel.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/storage.h" +#include "map/trade.h" +#include "map/unit.h" #else #define HPM_SERVER_TYPE SERVER_TYPE_UNKNOWN -#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking.HPMHooksCore.inc" -#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking.GetSymbol.inc" -#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking.Hooks.inc" -#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking.HookingPoints.inc" -#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking.sources.inc" +#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking.Hooks.inc" +#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking.sources.inc" #error HPMHooking plugin needs to be compiled for a specific server type. Please make sure your Makefiles are up to date. #endif -#include "../common/HPMDataCheck.h" +#include "common/HPMDataCheck.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> HPExport struct hplugin_info pinfo = { "HPMHooking", // Plugin name @@ -134,13 +134,13 @@ HPExport void server_post_final (void) { HPM_HP_final(); } -HPExport bool Hooked (bool *fr) { +HPExport const char *Hooked (bool *fr) { HPMforce_return = fr; - DB = GET_SYMBOL("DB"); - iMalloc = GET_SYMBOL("iMalloc"); + if (!(DB = GET_SYMBOL("DB"))) return "DB"; + if (!(iMalloc = GET_SYMBOL("iMalloc"))) return "iMalloc"; #include HPM_SYMBOL_INCLUDE HPM_HP_load(); - return true; + return NULL; } diff --git a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc index 6d6db24ae..af7df2980 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc @@ -4,19 +4,19 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. -if( !(chr = GET_SYMBOL("chr") ) ) return false; -if( !(geoip = GET_SYMBOL("geoip") ) ) return false; -if( !(inter_auction = GET_SYMBOL("inter_auction") ) ) return false; -if( !(inter_elemental = GET_SYMBOL("inter_elemental") ) ) return false; -if( !(inter_guild = GET_SYMBOL("inter_guild") ) ) return false; -if( !(inter_homunculus = GET_SYMBOL("inter_homunculus") ) ) return false; -if( !(inter = GET_SYMBOL("inter") ) ) return false; -if( !(inter_mail = GET_SYMBOL("inter_mail") ) ) return false; -if( !(inter_mercenary = GET_SYMBOL("inter_mercenary") ) ) return false; -if( !(inter_party = GET_SYMBOL("inter_party") ) ) return false; -if( !(inter_pet = GET_SYMBOL("inter_pet") ) ) return false; -if( !(inter_quest = GET_SYMBOL("inter_quest") ) ) return false; -if( !(inter_storage = GET_SYMBOL("inter_storage") ) ) return false; -if( !(loginif = GET_SYMBOL("loginif") ) ) return false; -if( !(mapif = GET_SYMBOL("mapif") ) ) return false; -if( !(pincode = GET_SYMBOL("pincode") ) ) return false; +if( !(chr = GET_SYMBOL("chr") ) ) return "chr"; +if( !(geoip = GET_SYMBOL("geoip") ) ) return "geoip"; +if( !(inter_auction = GET_SYMBOL("inter_auction") ) ) return "inter_auction"; +if( !(inter_elemental = GET_SYMBOL("inter_elemental") ) ) return "inter_elemental"; +if( !(inter_guild = GET_SYMBOL("inter_guild") ) ) return "inter_guild"; +if( !(inter_homunculus = GET_SYMBOL("inter_homunculus") ) ) return "inter_homunculus"; +if( !(inter = GET_SYMBOL("inter") ) ) return "inter"; +if( !(inter_mail = GET_SYMBOL("inter_mail") ) ) return "inter_mail"; +if( !(inter_mercenary = GET_SYMBOL("inter_mercenary") ) ) return "inter_mercenary"; +if( !(inter_party = GET_SYMBOL("inter_party") ) ) return "inter_party"; +if( !(inter_pet = GET_SYMBOL("inter_pet") ) ) return "inter_pet"; +if( !(inter_quest = GET_SYMBOL("inter_quest") ) ) return "inter_quest"; +if( !(inter_storage = GET_SYMBOL("inter_storage") ) ) return "inter_storage"; +if( !(loginif = GET_SYMBOL("loginif") ) ) return "loginif"; +if( !(mapif = GET_SYMBOL("mapif") ) ) return "mapif"; +if( !(pincode = GET_SYMBOL("pincode") ) ) return "pincode"; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index e2838b610..09d6ce1b6 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -39,6 +39,8 @@ struct { struct HPMHookPoint *HP_chr_memitemdata_to_sql_post; struct HPMHookPoint *HP_chr_inventory_to_sql_pre; struct HPMHookPoint *HP_chr_inventory_to_sql_post; + struct HPMHookPoint *HP_chr_mmo_gender_pre; + struct HPMHookPoint *HP_chr_mmo_gender_post; struct HPMHookPoint *HP_chr_mmo_chars_fromsql_pre; struct HPMHookPoint *HP_chr_mmo_chars_fromsql_post; struct HPMHookPoint *HP_chr_mmo_char_fromsql_pre; @@ -173,6 +175,8 @@ struct { struct HPMHookPoint *HP_chr_unban_post; struct HPMHookPoint *HP_chr_ask_name_ack_pre; struct HPMHookPoint *HP_chr_ask_name_ack_post; + struct HPMHookPoint *HP_chr_changecharsex_pre; + struct HPMHookPoint *HP_chr_changecharsex_post; struct HPMHookPoint *HP_chr_parse_frommap_change_account_pre; struct HPMHookPoint *HP_chr_parse_frommap_change_account_post; struct HPMHookPoint *HP_chr_parse_frommap_fame_list_pre; @@ -934,6 +938,8 @@ struct { int HP_chr_memitemdata_to_sql_post; int HP_chr_inventory_to_sql_pre; int HP_chr_inventory_to_sql_post; + int HP_chr_mmo_gender_pre; + int HP_chr_mmo_gender_post; int HP_chr_mmo_chars_fromsql_pre; int HP_chr_mmo_chars_fromsql_post; int HP_chr_mmo_char_fromsql_pre; @@ -1068,6 +1074,8 @@ struct { int HP_chr_unban_post; int HP_chr_ask_name_ack_pre; int HP_chr_ask_name_ack_post; + int HP_chr_changecharsex_pre; + int HP_chr_changecharsex_post; int HP_chr_parse_frommap_change_account_pre; int HP_chr_parse_frommap_change_account_post; int HP_chr_parse_frommap_fame_list_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index aa279dbb4..631544248 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -23,6 +23,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->mmo_char_tosql, HP_chr_mmo_char_tosql) }, { HP_POP(chr->memitemdata_to_sql, HP_chr_memitemdata_to_sql) }, { HP_POP(chr->inventory_to_sql, HP_chr_inventory_to_sql) }, + { HP_POP(chr->mmo_gender, HP_chr_mmo_gender) }, { HP_POP(chr->mmo_chars_fromsql, HP_chr_mmo_chars_fromsql) }, { HP_POP(chr->mmo_char_fromsql, HP_chr_mmo_char_fromsql) }, { HP_POP(chr->mmo_char_sql_init, HP_chr_mmo_char_sql_init) }, @@ -90,6 +91,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->ban, HP_chr_ban) }, { HP_POP(chr->unban, HP_chr_unban) }, { HP_POP(chr->ask_name_ack, HP_chr_ask_name_ack) }, + { HP_POP(chr->changecharsex, HP_chr_changecharsex) }, { HP_POP(chr->parse_frommap_change_account, HP_chr_parse_frommap_change_account) }, { HP_POP(chr->parse_frommap_fame_list, HP_chr_parse_frommap_fame_list) }, { HP_POP(chr->parse_frommap_divorce_char, HP_chr_parse_frommap_divorce_char) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index ffa2cd7e2..c6cca0b0c 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -482,6 +482,33 @@ int HP_chr_inventory_to_sql(const struct item items[], int max, int id) { } return retVal___; } +int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_charstatus *p, char sex) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_chr_mmo_gender_pre ) { + int (*preHookFunc) (const struct char_session_data *sd, const struct mmo_charstatus *p, char *sex); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chr_mmo_gender_pre[hIndex].func; + retVal___ = preHookFunc(sd, p, &sex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.mmo_gender(sd, p, sex); + } + if( HPMHooks.count.HP_chr_mmo_gender_post ) { + int (*postHookFunc) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chr_mmo_gender_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, p, &sex); + } + } + return retVal___; +} int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { int hIndex = 0; int retVal___ = 0; @@ -2244,6 +2271,33 @@ void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result } return; } +int HP_chr_changecharsex(int char_id, int sex) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_chr_changecharsex_pre ) { + int (*preHookFunc) (int *char_id, int *sex); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chr_changecharsex_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &sex); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.changecharsex(char_id, sex); + } + if( HPMHooks.count.HP_chr_changecharsex_post ) { + int (*postHookFunc) (int retVal___, int *char_id, int *sex); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chr_changecharsex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &char_id, &sex); + } + } + return retVal___; +} void HP_chr_parse_frommap_change_account(int fd) { int hIndex = 0; if( HPMHooks.count.HP_chr_parse_frommap_change_account_pre ) { @@ -3653,14 +3707,14 @@ void HP_chr_login_map_server_ack(int fd, uint8 flag) { } return; } -void HP_chr_parse_char_login_map_server(int fd) { +void HP_chr_parse_char_login_map_server(int fd, uint32 ipl) { int hIndex = 0; if( HPMHooks.count.HP_chr_parse_char_login_map_server_pre ) { - void (*preHookFunc) (int *fd); + void (*preHookFunc) (int *fd, uint32 *ipl); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_pre[hIndex].func; - preHookFunc(&fd); + preHookFunc(&fd, &ipl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -3668,13 +3722,13 @@ void HP_chr_parse_char_login_map_server(int fd) { } } { - HPMHooks.source.chr.parse_char_login_map_server(fd); + HPMHooks.source.chr.parse_char_login_map_server(fd, ipl); } if( HPMHooks.count.HP_chr_parse_char_login_map_server_post ) { - void (*postHookFunc) (int *fd); + void (*postHookFunc) (int *fd, uint32 *ipl); for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(&fd, &ipl); } } return; diff --git a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc index 3348b5cde..fd9eeba8c 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc @@ -4,4 +4,4 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. -if( !(login = GET_SYMBOL("login") ) ) return false; +if( !(login = GET_SYMBOL("login") ) ) return "login"; diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 1ebd9fd1a..375b78e11 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -1418,14 +1418,14 @@ void HP_login_char_server_connection_status(int fd, struct login_session_data *s } return; } -void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip) { +void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip, uint32 ipl) { int hIndex = 0; if( HPMHooks.count.HP_login_parse_request_connection_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip); + void (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_login_parse_request_connection_pre[hIndex].func; - preHookFunc(&fd, sd, ip); + preHookFunc(&fd, sd, ip, &ipl); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -1433,13 +1433,13 @@ void HP_login_parse_request_connection(int fd, struct login_session_data *sd, co } } { - HPMHooks.source.login.parse_request_connection(fd, sd, ip); + HPMHooks.source.login.parse_request_connection(fd, sd, ip, ipl); } if( HPMHooks.count.HP_login_parse_request_connection_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd, const char *ip); + void (*postHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_login_parse_request_connection_post[hIndex].func; - postHookFunc(&fd, sd, ip); + postHookFunc(&fd, sd, ip, &ipl); } } return; diff --git a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc index 6b1b84c69..88fe7745a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc @@ -4,42 +4,42 @@ // NOTE: This file was auto-generated and should never be manually edited, // as it will get overwritten. -if( !(atcommand = GET_SYMBOL("atcommand") ) ) return false; -if( !(battle = GET_SYMBOL("battle") ) ) return false; -if( !(bg = GET_SYMBOL("battlegrounds") ) ) return false; -if( !(buyingstore = GET_SYMBOL("buyingstore") ) ) return false; -if( !(channel = GET_SYMBOL("channel") ) ) return false; -if( !(chat = GET_SYMBOL("chat") ) ) return false; -if( !(chrif = GET_SYMBOL("chrif") ) ) return false; -if( !(clif = GET_SYMBOL("clif") ) ) return false; -if( !(duel = GET_SYMBOL("duel") ) ) return false; -if( !(elemental = GET_SYMBOL("elemental") ) ) return false; -if( !(guild = GET_SYMBOL("guild") ) ) return false; -if( !(gstorage = GET_SYMBOL("gstorage") ) ) return false; -if( !(homun = GET_SYMBOL("homun") ) ) return false; -if( !(instance = GET_SYMBOL("instance") ) ) return false; -if( !(intif = GET_SYMBOL("intif") ) ) return false; -if( !(ircbot = GET_SYMBOL("ircbot") ) ) return false; -if( !(itemdb = GET_SYMBOL("itemdb") ) ) return false; -if( !(logs = GET_SYMBOL("logs") ) ) return false; -if( !(mail = GET_SYMBOL("mail") ) ) return false; -if( !(map = GET_SYMBOL("map") ) ) return false; -if( !(mapit = GET_SYMBOL("mapit") ) ) return false; -if( !(mapreg = GET_SYMBOL("mapreg") ) ) return false; -if( !(mercenary = GET_SYMBOL("mercenary") ) ) return false; -if( !(mob = GET_SYMBOL("mob") ) ) return false; -if( !(npc = GET_SYMBOL("npc") ) ) return false; -if( !(party = GET_SYMBOL("party") ) ) return false; -if( !(path = GET_SYMBOL("path") ) ) return false; -if( !(pcg = GET_SYMBOL("pc_groups") ) ) return false; -if( !(pc = GET_SYMBOL("pc") ) ) return false; -if( !(pet = GET_SYMBOL("pet") ) ) return false; -if( !(quest = GET_SYMBOL("quest") ) ) return false; -if( !(script = GET_SYMBOL("script") ) ) return false; -if( !(searchstore = GET_SYMBOL("searchstore") ) ) return false; -if( !(skill = GET_SYMBOL("skill") ) ) return false; -if( !(status = GET_SYMBOL("status") ) ) return false; -if( !(storage = GET_SYMBOL("storage") ) ) return false; -if( !(trade = GET_SYMBOL("trade") ) ) return false; -if( !(unit = GET_SYMBOL("unit") ) ) return false; -if( !(vending = GET_SYMBOL("vending") ) ) return false; +if( !(atcommand = GET_SYMBOL("atcommand") ) ) return "atcommand"; +if( !(battle = GET_SYMBOL("battle") ) ) return "battle"; +if( !(bg = GET_SYMBOL("battlegrounds") ) ) return "battlegrounds"; +if( !(buyingstore = GET_SYMBOL("buyingstore") ) ) return "buyingstore"; +if( !(channel = GET_SYMBOL("channel") ) ) return "channel"; +if( !(chat = GET_SYMBOL("chat") ) ) return "chat"; +if( !(chrif = GET_SYMBOL("chrif") ) ) return "chrif"; +if( !(clif = GET_SYMBOL("clif") ) ) return "clif"; +if( !(duel = GET_SYMBOL("duel") ) ) return "duel"; +if( !(elemental = GET_SYMBOL("elemental") ) ) return "elemental"; +if( !(guild = GET_SYMBOL("guild") ) ) return "guild"; +if( !(gstorage = GET_SYMBOL("gstorage") ) ) return "gstorage"; +if( !(homun = GET_SYMBOL("homun") ) ) return "homun"; +if( !(instance = GET_SYMBOL("instance") ) ) return "instance"; +if( !(intif = GET_SYMBOL("intif") ) ) return "intif"; +if( !(ircbot = GET_SYMBOL("ircbot") ) ) return "ircbot"; +if( !(itemdb = GET_SYMBOL("itemdb") ) ) return "itemdb"; +if( !(logs = GET_SYMBOL("logs") ) ) return "logs"; +if( !(mail = GET_SYMBOL("mail") ) ) return "mail"; +if( !(map = GET_SYMBOL("map") ) ) return "map"; +if( !(mapit = GET_SYMBOL("mapit") ) ) return "mapit"; +if( !(mapreg = GET_SYMBOL("mapreg") ) ) return "mapreg"; +if( !(mercenary = GET_SYMBOL("mercenary") ) ) return "mercenary"; +if( !(mob = GET_SYMBOL("mob") ) ) return "mob"; +if( !(npc = GET_SYMBOL("npc") ) ) return "npc"; +if( !(party = GET_SYMBOL("party") ) ) return "party"; +if( !(path = GET_SYMBOL("path") ) ) return "path"; +if( !(pcg = GET_SYMBOL("pc_groups") ) ) return "pc_groups"; +if( !(pc = GET_SYMBOL("pc") ) ) return "pc"; +if( !(pet = GET_SYMBOL("pet") ) ) return "pet"; +if( !(quest = GET_SYMBOL("quest") ) ) return "quest"; +if( !(script = GET_SYMBOL("script") ) ) return "script"; +if( !(searchstore = GET_SYMBOL("searchstore") ) ) return "searchstore"; +if( !(skill = GET_SYMBOL("skill") ) ) return "skill"; +if( !(status = GET_SYMBOL("status") ) ) return "status"; +if( !(storage = GET_SYMBOL("storage") ) ) return "storage"; +if( !(trade = GET_SYMBOL("trade") ) ) return "trade"; +if( !(unit = GET_SYMBOL("unit") ) ) return "unit"; +if( !(vending = GET_SYMBOL("vending") ) ) return "vending"; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index d92f2079f..f3e3711c1 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -99,6 +99,8 @@ struct { struct HPMHookPoint *HP_battle_attr_fix_post; struct HPMHookPoint *HP_battle_calc_cardfix_pre; struct HPMHookPoint *HP_battle_calc_cardfix_post; + struct HPMHookPoint *HP_battle_calc_cardfix2_pre; + struct HPMHookPoint *HP_battle_calc_cardfix2_post; struct HPMHookPoint *HP_battle_calc_elefix_pre; struct HPMHookPoint *HP_battle_calc_elefix_post; struct HPMHookPoint *HP_battle_calc_masteryfix_pre; @@ -235,6 +237,8 @@ struct { struct HPMHookPoint *HP_bg_send_xy_timer_post; struct HPMHookPoint *HP_bg_afk_timer_pre; struct HPMHookPoint *HP_bg_afk_timer_post; + struct HPMHookPoint *HP_bg_team_db_final_pre; + struct HPMHookPoint *HP_bg_team_db_final_post; struct HPMHookPoint *HP_bg_str2teamtype_pre; struct HPMHookPoint *HP_bg_str2teamtype_post; struct HPMHookPoint *HP_bg_config_read_pre; @@ -293,6 +297,8 @@ struct { struct HPMHookPoint *HP_channel_guild_leave_alliance_post; struct HPMHookPoint *HP_channel_quit_guild_pre; struct HPMHookPoint *HP_channel_quit_guild_post; + struct HPMHookPoint *HP_channel_irc_join_pre; + struct HPMHookPoint *HP_channel_irc_join_post; struct HPMHookPoint *HP_channel_config_read_pre; struct HPMHookPoint *HP_channel_config_read_post; struct HPMHookPoint *HP_chat_create_pc_chat_pre; @@ -927,26 +933,22 @@ struct { struct HPMHookPoint *HP_clif_broadcast_post; struct HPMHookPoint *HP_clif_broadcast2_pre; struct HPMHookPoint *HP_clif_broadcast2_post; + struct HPMHookPoint *HP_clif_messagecolor_self_pre; + struct HPMHookPoint *HP_clif_messagecolor_self_post; struct HPMHookPoint *HP_clif_messagecolor_pre; struct HPMHookPoint *HP_clif_messagecolor_post; struct HPMHookPoint *HP_clif_disp_overhead_pre; struct HPMHookPoint *HP_clif_disp_overhead_post; - struct HPMHookPoint *HP_clif_msg_pre; - struct HPMHookPoint *HP_clif_msg_post; - struct HPMHookPoint *HP_clif_msg_value_pre; - struct HPMHookPoint *HP_clif_msg_value_post; - struct HPMHookPoint *HP_clif_msg_skill_pre; - struct HPMHookPoint *HP_clif_msg_skill_post; struct HPMHookPoint *HP_clif_msgtable_pre; struct HPMHookPoint *HP_clif_msgtable_post; struct HPMHookPoint *HP_clif_msgtable_num_pre; struct HPMHookPoint *HP_clif_msgtable_num_post; + struct HPMHookPoint *HP_clif_msgtable_skill_pre; + struct HPMHookPoint *HP_clif_msgtable_skill_post; struct HPMHookPoint *HP_clif_message_pre; struct HPMHookPoint *HP_clif_message_post; struct HPMHookPoint *HP_clif_messageln_pre; struct HPMHookPoint *HP_clif_messageln_post; - struct HPMHookPoint *HP_clif_colormes_pre; - struct HPMHookPoint *HP_clif_colormes_post; struct HPMHookPoint *HP_clif_process_message_pre; struct HPMHookPoint *HP_clif_process_message_post; struct HPMHookPoint *HP_clif_wisexin_pre; @@ -1343,6 +1345,14 @@ struct { struct HPMHookPoint *HP_clif_parse_roulette_db_post; struct HPMHookPoint *HP_clif_roulette_generate_ack_pre; struct HPMHookPoint *HP_clif_roulette_generate_ack_post; + struct HPMHookPoint *HP_clif_openmergeitem_pre; + struct HPMHookPoint *HP_clif_openmergeitem_post; + struct HPMHookPoint *HP_clif_cancelmergeitem_pre; + struct HPMHookPoint *HP_clif_cancelmergeitem_post; + struct HPMHookPoint *HP_clif_comparemergeitem_pre; + struct HPMHookPoint *HP_clif_comparemergeitem_post; + struct HPMHookPoint *HP_clif_ackmergeitems_pre; + struct HPMHookPoint *HP_clif_ackmergeitems_post; struct HPMHookPoint *HP_clif_pWantToConnection_pre; struct HPMHookPoint *HP_clif_pWantToConnection_post; struct HPMHookPoint *HP_clif_pLoadEndAck_pre; @@ -3687,6 +3697,10 @@ struct { struct HPMHookPoint *HP_pc_skill_post; struct HPMHookPoint *HP_pc_insert_card_pre; struct HPMHookPoint *HP_pc_insert_card_post; + struct HPMHookPoint *HP_pc_can_insert_card_pre; + struct HPMHookPoint *HP_pc_can_insert_card_post; + struct HPMHookPoint *HP_pc_can_insert_card_into_pre; + struct HPMHookPoint *HP_pc_can_insert_card_into_post; struct HPMHookPoint *HP_pc_steal_item_pre; struct HPMHookPoint *HP_pc_steal_item_post; struct HPMHookPoint *HP_pc_steal_coin_pre; @@ -3859,6 +3873,8 @@ struct { struct HPMHookPoint *HP_pc_addspiritball_post; struct HPMHookPoint *HP_pc_delspiritball_pre; struct HPMHookPoint *HP_pc_delspiritball_post; + struct HPMHookPoint *HP_pc_getmaxspiritball_pre; + struct HPMHookPoint *HP_pc_getmaxspiritball_post; struct HPMHookPoint *HP_pc_addfame_pre; struct HPMHookPoint *HP_pc_addfame_post; struct HPMHookPoint *HP_pc_famerank_pre; @@ -3983,6 +3999,8 @@ struct { struct HPMHookPoint *HP_pc_autotrade_prepare_post; struct HPMHookPoint *HP_pc_autotrade_populate_pre; struct HPMHookPoint *HP_pc_autotrade_populate_post; + struct HPMHookPoint *HP_pc_check_job_name_pre; + struct HPMHookPoint *HP_pc_check_job_name_post; struct HPMHookPoint *HP_pet_init_pre; struct HPMHookPoint *HP_pet_init_post; struct HPMHookPoint *HP_pet_final_pre; @@ -4973,12 +4991,10 @@ struct { struct HPMHookPoint *HP_status_base_amotion_pc_post; struct HPMHookPoint *HP_status_base_atk_pre; struct HPMHookPoint *HP_status_base_atk_post; - struct HPMHookPoint *HP_status_calc_sigma_pre; - struct HPMHookPoint *HP_status_calc_sigma_post; - struct HPMHookPoint *HP_status_base_pc_maxhp_pre; - struct HPMHookPoint *HP_status_base_pc_maxhp_post; - struct HPMHookPoint *HP_status_base_pc_maxsp_pre; - struct HPMHookPoint *HP_status_base_pc_maxsp_post; + struct HPMHookPoint *HP_status_get_base_maxhp_pre; + struct HPMHookPoint *HP_status_get_base_maxhp_post; + struct HPMHookPoint *HP_status_get_base_maxsp_pre; + struct HPMHookPoint *HP_status_get_base_maxsp_post; struct HPMHookPoint *HP_status_calc_npc__pre; struct HPMHookPoint *HP_status_calc_npc__post; struct HPMHookPoint *HP_status_calc_str_pre; @@ -5037,8 +5053,6 @@ struct { struct HPMHookPoint *HP_status_natural_heal_post; struct HPMHookPoint *HP_status_natural_heal_timer_pre; struct HPMHookPoint *HP_status_natural_heal_timer_post; - struct HPMHookPoint *HP_status_readdb_job1_pre; - struct HPMHookPoint *HP_status_readdb_job1_post; struct HPMHookPoint *HP_status_readdb_job2_pre; struct HPMHookPoint *HP_status_readdb_job2_post; struct HPMHookPoint *HP_status_readdb_sizefix_pre; @@ -5047,6 +5061,10 @@ struct { struct HPMHookPoint *HP_status_readdb_refine_post; struct HPMHookPoint *HP_status_readdb_scconfig_pre; struct HPMHookPoint *HP_status_readdb_scconfig_post; + struct HPMHookPoint *HP_status_read_job_db_pre; + struct HPMHookPoint *HP_status_read_job_db_post; + struct HPMHookPoint *HP_status_read_job_db_sub_pre; + struct HPMHookPoint *HP_status_read_job_db_sub_post; struct HPMHookPoint *HP_storage_reconnect_pre; struct HPMHookPoint *HP_storage_reconnect_post; struct HPMHookPoint *HP_storage_delitem_pre; @@ -5300,6 +5318,8 @@ struct { int HP_battle_attr_fix_post; int HP_battle_calc_cardfix_pre; int HP_battle_calc_cardfix_post; + int HP_battle_calc_cardfix2_pre; + int HP_battle_calc_cardfix2_post; int HP_battle_calc_elefix_pre; int HP_battle_calc_elefix_post; int HP_battle_calc_masteryfix_pre; @@ -5436,6 +5456,8 @@ struct { int HP_bg_send_xy_timer_post; int HP_bg_afk_timer_pre; int HP_bg_afk_timer_post; + int HP_bg_team_db_final_pre; + int HP_bg_team_db_final_post; int HP_bg_str2teamtype_pre; int HP_bg_str2teamtype_post; int HP_bg_config_read_pre; @@ -5494,6 +5516,8 @@ struct { int HP_channel_guild_leave_alliance_post; int HP_channel_quit_guild_pre; int HP_channel_quit_guild_post; + int HP_channel_irc_join_pre; + int HP_channel_irc_join_post; int HP_channel_config_read_pre; int HP_channel_config_read_post; int HP_chat_create_pc_chat_pre; @@ -6128,26 +6152,22 @@ struct { int HP_clif_broadcast_post; int HP_clif_broadcast2_pre; int HP_clif_broadcast2_post; + int HP_clif_messagecolor_self_pre; + int HP_clif_messagecolor_self_post; int HP_clif_messagecolor_pre; int HP_clif_messagecolor_post; int HP_clif_disp_overhead_pre; int HP_clif_disp_overhead_post; - int HP_clif_msg_pre; - int HP_clif_msg_post; - int HP_clif_msg_value_pre; - int HP_clif_msg_value_post; - int HP_clif_msg_skill_pre; - int HP_clif_msg_skill_post; int HP_clif_msgtable_pre; int HP_clif_msgtable_post; int HP_clif_msgtable_num_pre; int HP_clif_msgtable_num_post; + int HP_clif_msgtable_skill_pre; + int HP_clif_msgtable_skill_post; int HP_clif_message_pre; int HP_clif_message_post; int HP_clif_messageln_pre; int HP_clif_messageln_post; - int HP_clif_colormes_pre; - int HP_clif_colormes_post; int HP_clif_process_message_pre; int HP_clif_process_message_post; int HP_clif_wisexin_pre; @@ -6544,6 +6564,14 @@ struct { int HP_clif_parse_roulette_db_post; int HP_clif_roulette_generate_ack_pre; int HP_clif_roulette_generate_ack_post; + int HP_clif_openmergeitem_pre; + int HP_clif_openmergeitem_post; + int HP_clif_cancelmergeitem_pre; + int HP_clif_cancelmergeitem_post; + int HP_clif_comparemergeitem_pre; + int HP_clif_comparemergeitem_post; + int HP_clif_ackmergeitems_pre; + int HP_clif_ackmergeitems_post; int HP_clif_pWantToConnection_pre; int HP_clif_pWantToConnection_post; int HP_clif_pLoadEndAck_pre; @@ -8888,6 +8916,10 @@ struct { int HP_pc_skill_post; int HP_pc_insert_card_pre; int HP_pc_insert_card_post; + int HP_pc_can_insert_card_pre; + int HP_pc_can_insert_card_post; + int HP_pc_can_insert_card_into_pre; + int HP_pc_can_insert_card_into_post; int HP_pc_steal_item_pre; int HP_pc_steal_item_post; int HP_pc_steal_coin_pre; @@ -9060,6 +9092,8 @@ struct { int HP_pc_addspiritball_post; int HP_pc_delspiritball_pre; int HP_pc_delspiritball_post; + int HP_pc_getmaxspiritball_pre; + int HP_pc_getmaxspiritball_post; int HP_pc_addfame_pre; int HP_pc_addfame_post; int HP_pc_famerank_pre; @@ -9184,6 +9218,8 @@ struct { int HP_pc_autotrade_prepare_post; int HP_pc_autotrade_populate_pre; int HP_pc_autotrade_populate_post; + int HP_pc_check_job_name_pre; + int HP_pc_check_job_name_post; int HP_pet_init_pre; int HP_pet_init_post; int HP_pet_final_pre; @@ -10174,12 +10210,10 @@ struct { int HP_status_base_amotion_pc_post; int HP_status_base_atk_pre; int HP_status_base_atk_post; - int HP_status_calc_sigma_pre; - int HP_status_calc_sigma_post; - int HP_status_base_pc_maxhp_pre; - int HP_status_base_pc_maxhp_post; - int HP_status_base_pc_maxsp_pre; - int HP_status_base_pc_maxsp_post; + int HP_status_get_base_maxhp_pre; + int HP_status_get_base_maxhp_post; + int HP_status_get_base_maxsp_pre; + int HP_status_get_base_maxsp_post; int HP_status_calc_npc__pre; int HP_status_calc_npc__post; int HP_status_calc_str_pre; @@ -10238,8 +10272,6 @@ struct { int HP_status_natural_heal_post; int HP_status_natural_heal_timer_pre; int HP_status_natural_heal_timer_post; - int HP_status_readdb_job1_pre; - int HP_status_readdb_job1_post; int HP_status_readdb_job2_pre; int HP_status_readdb_job2_post; int HP_status_readdb_sizefix_pre; @@ -10248,6 +10280,10 @@ struct { int HP_status_readdb_refine_post; int HP_status_readdb_scconfig_pre; int HP_status_readdb_scconfig_post; + int HP_status_read_job_db_pre; + int HP_status_read_job_db_post; + int HP_status_read_job_db_sub_pre; + int HP_status_read_job_db_sub_post; int HP_storage_reconnect_pre; int HP_storage_reconnect_post; int HP_storage_delitem_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index a3e4340be..4e23425ec 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -54,6 +54,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(battle->attr_ratio, HP_battle_attr_ratio) }, { HP_POP(battle->attr_fix, HP_battle_attr_fix) }, { HP_POP(battle->calc_cardfix, HP_battle_calc_cardfix) }, + { HP_POP(battle->calc_cardfix2, HP_battle_calc_cardfix2) }, { HP_POP(battle->calc_elefix, HP_battle_calc_elefix) }, { HP_POP(battle->calc_masteryfix, HP_battle_calc_masteryfix) }, { HP_POP(battle->calc_chorusbonus, HP_battle_calc_chorusbonus) }, @@ -123,6 +124,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(bg->send_xy_timer_sub, HP_bg_send_xy_timer_sub) }, { HP_POP(bg->send_xy_timer, HP_bg_send_xy_timer) }, { HP_POP(bg->afk_timer, HP_bg_afk_timer) }, + { HP_POP(bg->team_db_final, HP_bg_team_db_final) }, { HP_POP(bg->str2teamtype, HP_bg_str2teamtype) }, { HP_POP(bg->config_read, HP_bg_config_read) }, /* buyingstore */ @@ -154,6 +156,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(channel->guild_join_alliance, HP_channel_guild_join_alliance) }, { HP_POP(channel->guild_leave_alliance, HP_channel_guild_leave_alliance) }, { HP_POP(channel->quit_guild, HP_channel_quit_guild) }, + { HP_POP(channel->irc_join, HP_channel_irc_join) }, { HP_POP(channel->config_read, HP_channel_config_read) }, /* chat */ { HP_POP(chat->create_pc_chat, HP_chat_create_pc_chat) }, @@ -474,16 +477,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->disp_message, HP_clif_disp_message) }, { HP_POP(clif->broadcast, HP_clif_broadcast) }, { HP_POP(clif->broadcast2, HP_clif_broadcast2) }, + { HP_POP(clif->messagecolor_self, HP_clif_messagecolor_self) }, { HP_POP(clif->messagecolor, HP_clif_messagecolor) }, { HP_POP(clif->disp_overhead, HP_clif_disp_overhead) }, - { HP_POP(clif->msg, HP_clif_msg) }, - { HP_POP(clif->msg_value, HP_clif_msg_value) }, - { HP_POP(clif->msg_skill, HP_clif_msg_skill) }, { HP_POP(clif->msgtable, HP_clif_msgtable) }, { HP_POP(clif->msgtable_num, HP_clif_msgtable_num) }, + { HP_POP(clif->msgtable_skill, HP_clif_msgtable_skill) }, { HP_POP(clif->message, HP_clif_message) }, { HP_POP(clif->messageln, HP_clif_messageln) }, - { HP_POP(clif->colormes, HP_clif_colormes) }, { HP_POP(clif->process_message, HP_clif_process_message) }, { HP_POP(clif->wisexin, HP_clif_wisexin) }, { HP_POP(clif->wisall, HP_clif_wisall) }, @@ -682,6 +683,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) }, { HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) }, { HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) }, + { HP_POP(clif->openmergeitem, HP_clif_openmergeitem) }, + { HP_POP(clif->cancelmergeitem, HP_clif_cancelmergeitem) }, + { HP_POP(clif->comparemergeitem, HP_clif_comparemergeitem) }, + { HP_POP(clif->ackmergeitems, HP_clif_ackmergeitems) }, { HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) }, { HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) }, { HP_POP(clif->pTickSend, HP_clif_pTickSend) }, @@ -1875,6 +1880,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->bonus5, HP_pc_bonus5) }, { HP_POP(pc->skill, HP_pc_skill) }, { HP_POP(pc->insert_card, HP_pc_insert_card) }, + { HP_POP(pc->can_insert_card, HP_pc_can_insert_card) }, + { HP_POP(pc->can_insert_card_into, HP_pc_can_insert_card_into) }, { HP_POP(pc->steal_item, HP_pc_steal_item) }, { HP_POP(pc->steal_coin, HP_pc_steal_coin) }, { HP_POP(pc->modifybuyvalue, HP_pc_modifybuyvalue) }, @@ -1961,6 +1968,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->delinvincibletimer, HP_pc_delinvincibletimer) }, { HP_POP(pc->addspiritball, HP_pc_addspiritball) }, { HP_POP(pc->delspiritball, HP_pc_delspiritball) }, + { HP_POP(pc->getmaxspiritball, HP_pc_getmaxspiritball) }, { HP_POP(pc->addfame, HP_pc_addfame) }, { HP_POP(pc->famerank, HP_pc_famerank) }, { HP_POP(pc->set_hate_mob, HP_pc_set_hate_mob) }, @@ -2023,6 +2031,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->autotrade_start, HP_pc_autotrade_start) }, { HP_POP(pc->autotrade_prepare, HP_pc_autotrade_prepare) }, { HP_POP(pc->autotrade_populate, HP_pc_autotrade_populate) }, + { HP_POP(pc->check_job_name, HP_pc_check_job_name) }, /* pet */ { HP_POP(pet->init, HP_pet_init) }, { HP_POP(pet->final, HP_pet_final) }, @@ -2524,9 +2533,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->initDummyData, HP_status_initDummyData) }, { HP_POP(status->base_amotion_pc, HP_status_base_amotion_pc) }, { HP_POP(status->base_atk, HP_status_base_atk) }, - { HP_POP(status->calc_sigma, HP_status_calc_sigma) }, - { HP_POP(status->base_pc_maxhp, HP_status_base_pc_maxhp) }, - { HP_POP(status->base_pc_maxsp, HP_status_base_pc_maxsp) }, + { HP_POP(status->get_base_maxhp, HP_status_get_base_maxhp) }, + { HP_POP(status->get_base_maxsp, HP_status_get_base_maxsp) }, { HP_POP(status->calc_npc_, HP_status_calc_npc_) }, { HP_POP(status->calc_str, HP_status_calc_str) }, { HP_POP(status->calc_agi, HP_status_calc_agi) }, @@ -2556,11 +2564,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->display_remove, HP_status_display_remove) }, { HP_POP(status->natural_heal, HP_status_natural_heal) }, { HP_POP(status->natural_heal_timer, HP_status_natural_heal_timer) }, - { HP_POP(status->readdb_job1, HP_status_readdb_job1) }, { HP_POP(status->readdb_job2, HP_status_readdb_job2) }, { HP_POP(status->readdb_sizefix, HP_status_readdb_sizefix) }, { HP_POP(status->readdb_refine, HP_status_readdb_refine) }, { HP_POP(status->readdb_scconfig, HP_status_readdb_scconfig) }, + { HP_POP(status->read_job_db, HP_status_read_job_db) }, + { HP_POP(status->read_job_db_sub, HP_status_read_job_db_sub) }, /* storage */ { HP_POP(storage->reconnect, HP_storage_reconnect) }, { HP_POP(storage->delitem, HP_storage_delitem) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index c36525c21..85f477bec 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -1302,6 +1302,33 @@ int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct blo } return retVal___; } +int64 HP_battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int64 damage, int s_ele, int nk, int flag) { + int hIndex = 0; + int64 retVal___ = 0; + if( HPMHooks.count.HP_battle_calc_cardfix2_pre ) { + int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *s_ele, int *nk, int *flag); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_cardfix2_pre[hIndex].func; + retVal___ = preHookFunc(src, bl, &damage, &s_ele, &nk, &flag); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_cardfix2(src, bl, damage, s_ele, nk, flag); + } + if( HPMHooks.count.HP_battle_calc_cardfix2_post ) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 *damage, int *s_ele, int *nk, int *flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_cardfix2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, &damage, &s_ele, &nk, &flag); + } + } + return retVal___; +} int64 HP_battle_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) { int hIndex = 0; int64 retVal___ = 0; @@ -3154,6 +3181,39 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } +int HP_bg_team_db_final(DBKey key, DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_bg_team_db_final_pre ) { + int (*preHookFunc) (DBKey *key, DBData *data, va_list ap); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_bg_team_db_final_pre[hIndex].func; + retVal___ = preHookFunc(&key, data, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.bg.team_db_final(key, data, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_bg_team_db_final_post ) { + int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_bg_team_db_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} enum bg_queue_types HP_bg_str2teamtype(const char *str) { int hIndex = 0; enum bg_queue_types retVal___ = BGQT_INVALID; @@ -3921,6 +3981,32 @@ void HP_channel_quit_guild(struct map_session_data *sd) { } return; } +void HP_channel_irc_join(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_channel_irc_join_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_channel_irc_join_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.channel.irc_join(sd); + } + if( HPMHooks.count.HP_channel_irc_join_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_channel_irc_join_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} void HP_channel_config_read(void) { int hIndex = 0; if( HPMHooks.count.HP_channel_config_read_pre ) { @@ -5101,15 +5187,15 @@ bool HP_chrif_char_online(struct map_session_data *sd) { } return retVal___; } -bool HP_chrif_changesex(struct map_session_data *sd) { +bool HP_chrif_changesex(struct map_session_data *sd, bool change_account) { int hIndex = 0; bool retVal___ = false; if( HPMHooks.count.HP_chrif_changesex_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + bool (*preHookFunc) (struct map_session_data *sd, bool *change_account); *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); + retVal___ = preHookFunc(sd, &change_account); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -5117,13 +5203,13 @@ bool HP_chrif_changesex(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.chrif.changesex(sd); + retVal___ = HPMHooks.source.chrif.changesex(sd, change_account); } if( HPMHooks.count.HP_chrif_changesex_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, bool *change_account); for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_chrif_changesex_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + retVal___ = postHookFunc(retVal___, sd, &change_account); } } return retVal___; @@ -12295,10 +12381,36 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, size_t len, unsi } return; } -void HP_clif_messagecolor(struct block_list *bl, unsigned int color, const char *msg) { +void HP_clif_messagecolor_self(int fd, uint32 color, const char *msg) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_messagecolor_self_pre ) { + void (*preHookFunc) (int *fd, uint32 *color, const char *msg); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_messagecolor_self_pre[hIndex].func; + preHookFunc(&fd, &color, msg); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.messagecolor_self(fd, color, msg); + } + if( HPMHooks.count.HP_clif_messagecolor_self_post ) { + void (*postHookFunc) (int *fd, uint32 *color, const char *msg); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_messagecolor_self_post[hIndex].func; + postHookFunc(&fd, &color, msg); + } + } + return; +} +void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) { int hIndex = 0; if( HPMHooks.count.HP_clif_messagecolor_pre ) { - void (*preHookFunc) (struct block_list *bl, unsigned int *color, const char *msg); + void (*preHookFunc) (struct block_list *bl, uint32 *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; @@ -12313,7 +12425,7 @@ void HP_clif_messagecolor(struct block_list *bl, unsigned int color, const char HPMHooks.source.clif.messagecolor(bl, color, msg); } if( HPMHooks.count.HP_clif_messagecolor_post ) { - void (*postHookFunc) (struct block_list *bl, unsigned int *color, const char *msg); + void (*postHookFunc) (struct block_list *bl, uint32 *color, const char *msg); for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_clif_messagecolor_post[hIndex].func; postHookFunc(bl, &color, msg); @@ -12347,14 +12459,14 @@ void HP_clif_disp_overhead(struct block_list *bl, const char *mes) { } return; } -void HP_clif_msg(struct map_session_data *sd, unsigned short id) { +void HP_clif_msgtable(struct map_session_data *sd, unsigned short msg_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msg_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned short *id); + if( HPMHooks.count.HP_clif_msgtable_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *msg_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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func; + preHookFunc(sd, &msg_id); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -12362,25 +12474,25 @@ void HP_clif_msg(struct map_session_data *sd, unsigned short id) { } } { - HPMHooks.source.clif.msg(sd, id); + HPMHooks.source.clif.msgtable(sd, msg_id); } - if( HPMHooks.count.HP_clif_msg_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_msg_post[hIndex].func; - postHookFunc(sd, &id); + if( HPMHooks.count.HP_clif_msgtable_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *msg_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func; + postHookFunc(sd, &msg_id); } } return; } -void HP_clif_msg_value(struct map_session_data *sd, unsigned short id, int value) { +void HP_clif_msgtable_num(struct map_session_data *sd, unsigned short msg_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); + if( HPMHooks.count.HP_clif_msgtable_num_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *msg_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); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func; + preHookFunc(sd, &msg_id, &value); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -12388,24 +12500,24 @@ void HP_clif_msg_value(struct map_session_data *sd, unsigned short id, int value } } { - HPMHooks.source.clif.msg_value(sd, id, value); + HPMHooks.source.clif.msgtable_num(sd, msg_id, value); } - if( HPMHooks.count.HP_clif_msg_value_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short *id, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_msg_value_post[hIndex].func; - postHookFunc(sd, &id, &value); + if( HPMHooks.count.HP_clif_msgtable_num_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *msg_id, int *value); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func; + postHookFunc(sd, &msg_id, &value); } } return; } -void HP_clif_msg_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) { +void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msg_skill_pre ) { + if( HPMHooks.count.HP_clif_msgtable_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; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_skill_pre[hIndex].func; preHookFunc(sd, &skill_id, &msg_id); } if( *HPMforce_return ) { @@ -12414,69 +12526,17 @@ void HP_clif_msg_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) } } { - HPMHooks.source.clif.msg_skill(sd, skill_id, msg_id); + HPMHooks.source.clif.msgtable_skill(sd, skill_id, msg_id); } - if( HPMHooks.count.HP_clif_msg_skill_post ) { + if( HPMHooks.count.HP_clif_msgtable_skill_post ) { void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_msg_skill_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_skill_post[hIndex].func; postHookFunc(sd, &skill_id, &msg_id); } } return; } -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); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.clif.msgtable(fd, line); - } - if( HPMHooks.count.HP_clif_msgtable_post ) { - void (*postHookFunc) (int *fd, int *line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func; - postHookFunc(&fd, &line); - } - } - return; -} -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); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.clif.msgtable_num(fd, line, num); - } - if( HPMHooks.count.HP_clif_msgtable_num_post ) { - void (*postHookFunc) (int *fd, int *line, int *num); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func; - postHookFunc(&fd, &line, &num); - } - } - return; -} void HP_clif_message(const int fd, const char *mes) { int hIndex = 0; if( HPMHooks.count.HP_clif_message_pre ) { @@ -12529,33 +12589,6 @@ void HP_clif_messageln(const int fd, const char *mes) { } return; } -int HP_clif_colormes(int fd, enum clif_colors color, const char *msg) { - int hIndex = 0; - 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); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.clif.colormes(fd, color, msg); - } - if( HPMHooks.count.HP_clif_colormes_post ) { - int (*postHookFunc) (int retVal___, int *fd, enum clif_colors *color, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_colormes_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &color, msg); - } - } - return retVal___; -} bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) { int hIndex = 0; bool retVal___ = false; @@ -17718,6 +17751,111 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re } return; } +void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_openmergeitem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_openmergeitem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.openmergeitem(fd, sd); + } + if( HPMHooks.count.HP_clif_openmergeitem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_openmergeitem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cancelmergeitem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cancelmergeitem(fd, sd); + } + if( HPMHooks.count.HP_clif_cancelmergeitem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +int HP_clif_comparemergeitem(const void *a, const void *b) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_clif_comparemergeitem_pre ) { + int (*preHookFunc) (const void *a, const void *b); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_comparemergeitem_pre[hIndex].func; + retVal___ = preHookFunc(a, b); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.comparemergeitem(a, b); + } + if( HPMHooks.count.HP_clif_comparemergeitem_post ) { + int (*postHookFunc) (int retVal___, const void *a, const void *b); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_comparemergeitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, a, b); + } + } + return retVal___; +} +void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_ackmergeitems_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_ackmergeitems_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ackmergeitems(fd, sd); + } + if( HPMHooks.count.HP_clif_ackmergeitems_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_ackmergeitems_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { @@ -49323,6 +49461,60 @@ int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) } return retVal___; } +bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_insert_card_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *idx_card); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_insert_card_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx_card); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_insert_card(sd, idx_card); + } + if( HPMHooks.count.HP_pc_can_insert_card_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_insert_card_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx_card); + } + } + return retVal___; +} +bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int idx_equip) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_insert_card_into_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_pre[hIndex].func; + retVal___ = preHookFunc(sd, &idx_card, &idx_equip); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_insert_card_into(sd, idx_card, idx_equip); + } + if( HPMHooks.count.HP_pc_can_insert_card_into_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip); + } + } + return retVal___; +} int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; @@ -51628,6 +51820,33 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { } return retVal___; } +int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_pc_getmaxspiritball_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int *min); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_pre[hIndex].func; + retVal___ = preHookFunc(sd, &min); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.getmaxspiritball(sd, min); + } + if( HPMHooks.count.HP_pc_getmaxspiritball_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *min); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &min); + } + } + return retVal___; +} void HP_pc_addfame(struct map_session_data *sd, int count) { int hIndex = 0; if( HPMHooks.count.HP_pc_addfame_pre ) { @@ -52354,15 +52573,15 @@ int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_ } return retVal___; } -int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, short rate, short arrow_rate, unsigned char flag) { +int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration) { int hIndex = 0; 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); + int (*preHookFunc) (struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); *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); + retVal___ = preHookFunc(effect, &max, &id, &rate, &arrow_rate, &flag, &duration); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -52370,13 +52589,13 @@ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, sho } } { - retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag); + retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag, duration); } if( HPMHooks.count.HP_pc_bonus_addeff_post ) { - int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int *max, enum sc_type *id, short *rate, short *arrow_rate, unsigned char *flag); + int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_post[hIndex].func; - retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &arrow_rate, &flag); + retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &arrow_rate, &flag, &duration); } } return retVal___; @@ -53303,6 +53522,33 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) { } return; } +int HP_pc_check_job_name(const char *name) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_pc_check_job_name_pre ) { + int (*preHookFunc) (const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_check_job_name_pre[hIndex].func; + retVal___ = preHookFunc(name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.check_job_name(name); + } + if( HPMHooks.count.HP_pc_check_job_name_post ) { + int (*postHookFunc) (int retVal___, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_check_job_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} /* pet */ int HP_pet_init(bool minimal) { int hIndex = 0; @@ -66876,40 +67122,14 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat } return retVal___; } -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(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.status.calc_sigma(); - } - if( HPMHooks.count.HP_status_calc_sigma_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_sigma_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_calc_sigma_post[hIndex].func; - postHookFunc(); - } - } - return; -} -unsigned int HP_status_base_pc_maxhp(struct map_session_data *sd, struct status_data *st) { +unsigned int HP_status_get_base_maxhp(struct map_session_data *sd, struct status_data *st) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_base_pc_maxhp_pre ) { + if( HPMHooks.count.HP_status_get_base_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; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_base_maxhp_pre[hIndex].func; retVal___ = preHookFunc(sd, st); } if( *HPMforce_return ) { @@ -66918,25 +67138,25 @@ unsigned int HP_status_base_pc_maxhp(struct map_session_data *sd, struct status_ } } { - retVal___ = HPMHooks.source.status.base_pc_maxhp(sd, st); + retVal___ = HPMHooks.source.status.get_base_maxhp(sd, st); } - if( HPMHooks.count.HP_status_base_pc_maxhp_post ) { + if( HPMHooks.count.HP_status_get_base_maxhp_post ) { unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxhp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_base_pc_maxhp_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_base_maxhp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, st); } } return retVal___; } -unsigned int HP_status_base_pc_maxsp(struct map_session_data *sd, struct status_data *st) { +unsigned int HP_status_get_base_maxsp(struct map_session_data *sd, struct status_data *st) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_base_pc_maxsp_pre ) { + if( HPMHooks.count.HP_status_get_base_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; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_get_base_maxsp_pre[hIndex].func; retVal___ = preHookFunc(sd, st); } if( *HPMforce_return ) { @@ -66945,12 +67165,12 @@ unsigned int HP_status_base_pc_maxsp(struct map_session_data *sd, struct status_ } } { - retVal___ = HPMHooks.source.status.base_pc_maxsp(sd, st); + retVal___ = HPMHooks.source.status.get_base_maxsp(sd, st); } - if( HPMHooks.count.HP_status_base_pc_maxsp_post ) { + if( HPMHooks.count.HP_status_get_base_maxsp_post ) { unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxsp_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_base_pc_maxsp_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_get_base_maxsp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, st); } } @@ -67742,33 +67962,6 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -bool HP_status_readdb_job1(char *fields[], int columns, int current) { - int hIndex = 0; - 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, ¤t); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.status.readdb_job1(fields, columns, current); - } - if( HPMHooks.count.HP_status_readdb_job1_post ) { - bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job1_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_job1_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fields, &columns, ¤t); - } - } - return retVal___; -} bool HP_status_readdb_job2(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; @@ -67877,6 +68070,58 @@ bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { } return retVal___; } +void HP_status_read_job_db(void) { + int hIndex = 0; + if( HPMHooks.count.HP_status_read_job_db_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_read_job_db_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.read_job_db(); + } + if( HPMHooks.count.HP_status_read_job_db_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_read_job_db_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) { + int hIndex = 0; + if( HPMHooks.count.HP_status_read_job_db_sub_pre ) { + void (*preHookFunc) (int *idx, const char *name, config_setting_t *jdb); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_read_job_db_sub_pre[hIndex].func; + preHookFunc(&idx, name, jdb); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.read_job_db_sub(idx, name, jdb); + } + if( HPMHooks.count.HP_status_read_job_db_sub_post ) { + void (*postHookFunc) (int *idx, const char *name, config_setting_t *jdb); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_read_job_db_sub_post[hIndex].func; + postHookFunc(&idx, name, jdb); + } + } + return; +} /* storage */ void HP_storage_reconnect(void) { int hIndex = 0; diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 802d1015a..3184353d1 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -32,6 +32,9 @@ PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUG COMMON_D = ../common COMMON_H = $(wildcard $(COMMON_D)/*.h) +COMMON_INCLUDE = -I.. + +THIRDPARTY_INCLUDE = -I../../3rdparty CONFIG_D = ../config CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h) @@ -84,7 +87,7 @@ Makefile: Makefile.in ../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null) @echo " CC $<" - @$(CC) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< + @$(CC) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< ../../plugins/HPMHooking_login@DLLEXT@: HPMHOOKINGTYPE = LOGIN ../../plugins/HPMHooking_char@DLLEXT@: HPMHOOKINGTYPE = CHAR @@ -92,4 +95,4 @@ Makefile: Makefile.in ../../plugins/HPMHooking_%@DLLEXT@: HPMHooking.c $(ALL_H) $$(shell ls HPMHooking/*_%* HPMHooking/*_common* 2>/dev/null) @echo " CC $< ($(HPMHOOKINGTYPE))" - @$(CC) -DHPMHOOKING_$(HPMHOOKINGTYPE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< + @$(CC) -DHPMHOOKING_$(HPMHOOKINGTYPE) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 1e27058c0..2741ce468 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -1,25 +1,25 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#include "../config/core.h" +#include "config/core.h" + +#include "common/HPMi.h" +#include "common/cbasetypes.h" +#include "common/conf.h" +#include "common/malloc.h" +#include "common/mmo.h" +#include "common/strlib.h" +#include "common/timer.h" +#include "map/clif.h" +#include "map/itemdb.h" +#include "map/map.h" +#include "map/pc.h" + +#include "common/HPMDataCheck.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/strlib.h" -#include "../common/timer.h" -#include "../map/clif.h" -#include "../map/itemdb.h" -#include "../map/map.h" -#include "../map/pc.h" - -#include "../common/HPMDataCheck.h" - HPExport struct hplugin_info pinfo = { "DB2SQL", // Plugin name SERVER_TYPE_MAP, // Which server types this plugin works with? @@ -139,7 +139,10 @@ int db2sql(config_setting_t *entry, int n, const char *source) { // bindonequip StrBuf->Printf(&buf, "'%u',", it->flag.bindonequip?1:0); - + + // forceserial + StrBuf->Printf(&buf, "'%u',", it->flag.force_serial?1:0); + // buyingstore StrBuf->Printf(&buf, "'%u',", it->flag.buyingstore?1:0); @@ -269,6 +272,7 @@ void totable(void) { " `refineable` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `view` smallint(3) UNSIGNED DEFAULT NULL,\n" " `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,\n" + " `forceserial` 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" diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c index bf43c0b23..6ed16d7a6 100644 --- a/src/plugins/dbghelpplug.c +++ b/src/plugins/dbghelpplug.c @@ -5,12 +5,13 @@ // Ported from eAthena Dev Team's version @ http://eathena-project.googlecode.com/svn/trunk/src/plugins/dbghelpplug.c // Currently supported dbghelp 5.1 +#include "common/sysinfo.h" +#include "common/HPMi.h" + +#include "common/HPMDataCheck.h" + #include <stdio.h> #include <string.h> -#include "../common/sysinfo.h" -#include "../common/HPMi.h" - -#include "../common/HPMDataCheck.h" /** * Plugin basic information @@ -217,8 +218,8 @@ typedef struct _InternalData { // Extended information printed in the console #define DBG_EXTENDED_INFORMATION \ - "Please report the crash in the bug tracker:\n" \ - "http://hercules.ws/board/tracker/\n" + "Please report the crash in our Issues tracker:\n" \ + "https://github.com/HerculesWS/Hercules/issues\n" // Print object children? // WARNING: This will generate huge dump files! diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 03d32b1f3..b034775b0 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -2,21 +2,21 @@ // See the LICENSE file // Sample Hercules Plugin +#include "common/HPMi.h" +#include "common/malloc.h" +#include "common/mmo.h" +#include "common/socket.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) */ + #include <stdio.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/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) */ - HPExport struct hplugin_info pinfo = { "Sample", // Plugin name SERVER_TYPE_CHAR|SERVER_TYPE_LOGIN|SERVER_TYPE_MAP,// Which server types this plugin works with? @@ -107,7 +107,7 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd,int *n,int *amou if( my_pc_dropitem_storage ) {/* signs whether pre-hook did this */ char output[99]; safesnprintf(output,99,"[ Warning ] you can only drop 1 item at a time, capped from %d to 1",my_pc_dropitem_storage); - clif->colormes(sd->fd,COLOR_RED,output); + clif->messagecolor_self(sd->fd, COLOR_RED, output); } return 1; } |