summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc28
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc7
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc81
3 files changed, 73 insertions, 43 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index b77505fbb..42a881a49 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -369,8 +369,8 @@ struct {
struct HPMHookPoint *HP_chrif_changedsex_post;
struct HPMHookPoint *HP_chrif_divorceack_pre;
struct HPMHookPoint *HP_chrif_divorceack_post;
- struct HPMHookPoint *HP_chrif_accountban_pre;
- struct HPMHookPoint *HP_chrif_accountban_post;
+ struct HPMHookPoint *HP_chrif_idbanned_pre;
+ struct HPMHookPoint *HP_chrif_idbanned_post;
struct HPMHookPoint *HP_chrif_recvfamelist_pre;
struct HPMHookPoint *HP_chrif_recvfamelist_post;
struct HPMHookPoint *HP_chrif_load_scdata_pre;
@@ -1561,6 +1561,8 @@ struct {
struct HPMHookPoint *HP_clif_pGMReqAccountName_post;
struct HPMHookPoint *HP_clif_pGMChangeMapType_pre;
struct HPMHookPoint *HP_clif_pGMChangeMapType_post;
+ struct HPMHookPoint *HP_clif_pGMFullStrip_pre;
+ struct HPMHookPoint *HP_clif_pGMFullStrip_post;
struct HPMHookPoint *HP_clif_pPMIgnore_pre;
struct HPMHookPoint *HP_clif_pPMIgnore_post;
struct HPMHookPoint *HP_clif_pPMIgnoreAll_pre;
@@ -2541,10 +2543,10 @@ struct {
struct HPMHookPoint *HP_itemdb_readdb_sql_sub_post;
struct HPMHookPoint *HP_itemdb_readdb_libconfig_sub_pre;
struct HPMHookPoint *HP_itemdb_readdb_libconfig_sub_post;
- struct HPMHookPoint *HP_itemdb_readdb_pre;
- struct HPMHookPoint *HP_itemdb_readdb_post;
- struct HPMHookPoint *HP_itemdb_read_sqldb_pre;
- struct HPMHookPoint *HP_itemdb_read_sqldb_post;
+ struct HPMHookPoint *HP_itemdb_readdb_libconfig_pre;
+ struct HPMHookPoint *HP_itemdb_readdb_libconfig_post;
+ struct HPMHookPoint *HP_itemdb_readdb_sql_pre;
+ 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;
@@ -5328,8 +5330,8 @@ struct {
int HP_chrif_changedsex_post;
int HP_chrif_divorceack_pre;
int HP_chrif_divorceack_post;
- int HP_chrif_accountban_pre;
- int HP_chrif_accountban_post;
+ int HP_chrif_idbanned_pre;
+ int HP_chrif_idbanned_post;
int HP_chrif_recvfamelist_pre;
int HP_chrif_recvfamelist_post;
int HP_chrif_load_scdata_pre;
@@ -6520,6 +6522,8 @@ struct {
int HP_clif_pGMReqAccountName_post;
int HP_clif_pGMChangeMapType_pre;
int HP_clif_pGMChangeMapType_post;
+ int HP_clif_pGMFullStrip_pre;
+ int HP_clif_pGMFullStrip_post;
int HP_clif_pPMIgnore_pre;
int HP_clif_pPMIgnore_post;
int HP_clif_pPMIgnoreAll_pre;
@@ -7500,10 +7504,10 @@ struct {
int HP_itemdb_readdb_sql_sub_post;
int HP_itemdb_readdb_libconfig_sub_pre;
int HP_itemdb_readdb_libconfig_sub_post;
- int HP_itemdb_readdb_pre;
- int HP_itemdb_readdb_post;
- int HP_itemdb_read_sqldb_pre;
- int HP_itemdb_read_sqldb_post;
+ int HP_itemdb_readdb_libconfig_pre;
+ int HP_itemdb_readdb_libconfig_post;
+ int HP_itemdb_readdb_sql_pre;
+ int HP_itemdb_readdb_sql_post;
int HP_itemdb_unique_id_pre;
int HP_itemdb_unique_id_post;
int HP_itemdb_uid_load_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 57c243913..2dead85db 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -193,7 +193,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chrif->changemapserverack, HP_chrif_changemapserverack) },
{ HP_POP(chrif->changedsex, HP_chrif_changedsex) },
{ HP_POP(chrif->divorceack, HP_chrif_divorceack) },
- { HP_POP(chrif->accountban, HP_chrif_accountban) },
+ { HP_POP(chrif->idbanned, HP_chrif_idbanned) },
{ HP_POP(chrif->recvfamelist, HP_chrif_recvfamelist) },
{ HP_POP(chrif->load_scdata, HP_chrif_load_scdata) },
{ HP_POP(chrif->update_ip, HP_chrif_update_ip) },
@@ -790,6 +790,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pGMRc, HP_clif_pGMRc) },
{ HP_POP(clif->pGMReqAccountName, HP_clif_pGMReqAccountName) },
{ HP_POP(clif->pGMChangeMapType, HP_clif_pGMChangeMapType) },
+ { HP_POP(clif->pGMFullStrip, HP_clif_pGMFullStrip) },
{ HP_POP(clif->pPMIgnore, HP_clif_pPMIgnore) },
{ HP_POP(clif->pPMIgnoreAll, HP_clif_pPMIgnoreAll) },
{ HP_POP(clif->pPMIgnoreList, HP_clif_pPMIgnoreList) },
@@ -1289,8 +1290,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(itemdb->validate_entry, HP_itemdb_validate_entry) },
{ HP_POP(itemdb->readdb_sql_sub, HP_itemdb_readdb_sql_sub) },
{ HP_POP(itemdb->readdb_libconfig_sub, HP_itemdb_readdb_libconfig_sub) },
- { HP_POP(itemdb->readdb, HP_itemdb_readdb) },
- { HP_POP(itemdb->read_sqldb, HP_itemdb_read_sqldb) },
+ { 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) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 5511959e9..836e4e124 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -4793,13 +4793,13 @@ int HP_chrif_divorceack(int char_id, int partner_id) {
}
return retVal___;
}
-int HP_chrif_accountban(int fd) {
+int HP_chrif_idbanned(int fd) {
int hIndex = 0;
int retVal___ = 0;
- if( HPMHooks.count.HP_chrif_accountban_pre ) {
+ if( HPMHooks.count.HP_chrif_idbanned_pre ) {
int (*preHookFunc) (int *fd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_chrif_accountban_pre[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_idbanned_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
}
if( *HPMforce_return ) {
@@ -4808,12 +4808,12 @@ int HP_chrif_accountban(int fd) {
}
}
{
- retVal___ = HPMHooks.source.chrif.accountban(fd);
+ retVal___ = HPMHooks.source.chrif.idbanned(fd);
}
- if( HPMHooks.count.HP_chrif_accountban_post ) {
+ if( HPMHooks.count.HP_chrif_idbanned_post ) {
int (*postHookFunc) (int retVal___, int *fd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_chrif_accountban_post[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_idbanned_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd);
}
}
@@ -19773,6 +19773,31 @@ void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) {
}
return;
}
+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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMFullStrip(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMFullStrip_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPMIgnore_pre ) {
@@ -32402,13 +32427,13 @@ int HP_itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *sour
}
return retVal___;
}
-int HP_itemdb_readdb(const char *filename) {
+int HP_itemdb_readdb_libconfig(const char *filename) {
int hIndex = 0;
int retVal___ = 0;
- if( HPMHooks.count.HP_itemdb_readdb_pre ) {
+ if( HPMHooks.count.HP_itemdb_readdb_libconfig_pre ) {
int (*preHookFunc) (const char *filename);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_readdb_pre[hIndex].func;
+ 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);
}
if( *HPMforce_return ) {
@@ -32417,25 +32442,25 @@ int HP_itemdb_readdb(const char *filename) {
}
}
{
- retVal___ = HPMHooks.source.itemdb.readdb(filename);
+ retVal___ = HPMHooks.source.itemdb.readdb_libconfig(filename);
}
- if( HPMHooks.count.HP_itemdb_readdb_post ) {
+ if( HPMHooks.count.HP_itemdb_readdb_libconfig_post ) {
int (*postHookFunc) (int retVal___, const char *filename);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_readdb_post[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_post[hIndex].func;
retVal___ = postHookFunc(retVal___, filename);
}
}
return retVal___;
}
-int HP_itemdb_read_sqldb(void) {
+int HP_itemdb_readdb_sql(const char *tablename) {
int hIndex = 0;
int retVal___ = 0;
- if( HPMHooks.count.HP_itemdb_read_sqldb_pre ) {
- int (*preHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_pre[hIndex].func;
- retVal___ = preHookFunc();
+ if( HPMHooks.count.HP_itemdb_readdb_sql_pre ) {
+ int (*preHookFunc) (const char *tablename);
+ 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);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -32443,13 +32468,13 @@ int HP_itemdb_read_sqldb(void) {
}
}
{
- retVal___ = HPMHooks.source.itemdb.read_sqldb();
+ retVal___ = HPMHooks.source.itemdb.readdb_sql(tablename);
}
- if( HPMHooks.count.HP_itemdb_read_sqldb_post ) {
- int (*postHookFunc) (int retVal___);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
+ if( HPMHooks.count.HP_itemdb_readdb_sql_post ) {
+ int (*postHookFunc) (int retVal___, const char *tablename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_sql_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_readdb_sql_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, tablename);
}
}
return retVal___;