summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-01 14:30:24 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-02 22:17:34 +0300
commit046ed2c6e94bc3016351cadb6f4d792807acb63d (patch)
tree4fa98033b59af09377134c77e1500138db078ae5 /src
parent2b4df46f3962e7eff3b810669b4fcf114a673503 (diff)
downloadhercules-046ed2c6e94bc3016351cadb6f4d792807acb63d.tar.gz
hercules-046ed2c6e94bc3016351cadb6f4d792807acb63d.tar.bz2
hercules-046ed2c6e94bc3016351cadb6f4d792807acb63d.tar.xz
hercules-046ed2c6e94bc3016351cadb6f4d792807acb63d.zip
Update HPM hooks.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
3 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 034b14b79..c2c6daf58 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -3399,6 +3399,8 @@ struct {
struct HPMHookPoint *HP_npc_market_delfromsql_post;
struct HPMHookPoint *HP_npc_market_delfromsql_sub_pre;
struct HPMHookPoint *HP_npc_market_delfromsql_sub_post;
+ struct HPMHookPoint *HP_npc_db_checkid_pre;
+ struct HPMHookPoint *HP_npc_db_checkid_post;
struct HPMHookPoint *HP_npc_secure_timeout_timer_pre;
struct HPMHookPoint *HP_npc_secure_timeout_timer_post;
struct HPMHookPoint *HP_party_init_pre;
@@ -8482,6 +8484,8 @@ struct {
int HP_npc_market_delfromsql_post;
int HP_npc_market_delfromsql_sub_pre;
int HP_npc_market_delfromsql_sub_post;
+ int HP_npc_db_checkid_pre;
+ int HP_npc_db_checkid_post;
int HP_npc_secure_timeout_timer_pre;
int HP_npc_secure_timeout_timer_post;
int HP_party_init_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 21f48134c..89ded9041 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1726,6 +1726,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(npc->market_tosql, HP_npc_market_tosql) },
{ HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) },
{ HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) },
+ { HP_POP(npc->db_checkid, HP_npc_db_checkid) },
{ HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) },
/* party */
{ HP_POP(party->init, HP_party_init) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 9078efe2e..ff08b8909 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -45435,6 +45435,33 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
}
return;
}
+bool HP_npc_db_checkid(const int id) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_npc_db_checkid_pre ) {
+ bool (*preHookFunc) (const int *id);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_db_checkid_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.db_checkid(id);
+ }
+ if( HPMHooks.count.HP_npc_db_checkid_post ) {
+ bool (*postHookFunc) (bool retVal___, const int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_db_checkid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;