summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-11-15 04:00:54 +0100
committerAndrei Karas <akaras@inbox.ru>2014-11-15 11:47:30 +0300
commit61fc83fd7dd51e9a88ac7e6264692fcf561a37f7 (patch)
treeddaca2f239f7f96c6f96ec70f6af9fbe87e5c033 /src/plugins/HPMHooking
parent7456ee13ea06a28e1b9bf9d53ff7138fe40bf0aa (diff)
downloadhercules-61fc83fd7dd51e9a88ac7e6264692fcf561a37f7.tar.gz
hercules-61fc83fd7dd51e9a88ac7e6264692fcf561a37f7.tar.bz2
hercules-61fc83fd7dd51e9a88ac7e6264692fcf561a37f7.tar.xz
hercules-61fc83fd7dd51e9a88ac7e6264692fcf561a37f7.zip
Corrected an issue in the HPMHookGen when interfaces only have one member
- Fixed hooks/symbols generation for the inter_quest interface - Re-enabled strict mode Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc5
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc28
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.sources.inc1
5 files changed, 37 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc
index 02249550d..6d6db24ae 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc
@@ -15,6 +15,7 @@ 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;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 52ca7fc84..46a225568 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -499,6 +499,8 @@ struct {
struct HPMHookPoint *HP_inter_pet_delete__post;
struct HPMHookPoint *HP_inter_pet_parse_frommap_pre;
struct HPMHookPoint *HP_inter_pet_parse_frommap_post;
+ struct HPMHookPoint *HP_inter_quest_parse_frommap_pre;
+ struct HPMHookPoint *HP_inter_quest_parse_frommap_post;
struct HPMHookPoint *HP_inter_storage_tosql_pre;
struct HPMHookPoint *HP_inter_storage_tosql_post;
struct HPMHookPoint *HP_inter_storage_fromsql_pre;
@@ -1388,6 +1390,8 @@ struct {
int HP_inter_pet_delete__post;
int HP_inter_pet_parse_frommap_pre;
int HP_inter_pet_parse_frommap_post;
+ int HP_inter_quest_parse_frommap_pre;
+ int HP_inter_quest_parse_frommap_post;
int HP_inter_storage_tosql_pre;
int HP_inter_storage_tosql_post;
int HP_inter_storage_fromsql_pre;
@@ -1794,6 +1798,7 @@ struct {
struct inter_mercenary_interface inter_mercenary;
struct inter_party_interface inter_party;
struct inter_pet_interface inter_pet;
+ struct inter_quest_interface inter_quest;
struct inter_storage_interface inter_storage;
struct loginif_interface loginif;
struct mapif_interface mapif;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index f53ff207b..b1b64af18 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -263,6 +263,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter_pet->sql_final, HP_inter_pet_sql_final) },
{ HP_POP(inter_pet->delete_, HP_inter_pet_delete_) },
{ HP_POP(inter_pet->parse_frommap, HP_inter_pet_parse_frommap) },
+/* inter_quest */
+ { HP_POP(inter_quest->parse_frommap, HP_inter_quest_parse_frommap) },
/* inter_storage */
{ HP_POP(inter_storage->tosql, HP_inter_storage_tosql) },
{ HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 8a775ccfd..8a602686f 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -6612,6 +6612,34 @@ int HP_inter_pet_parse_frommap(int fd) {
}
return retVal___;
}
+/* inter_quest */
+int HP_inter_quest_parse_frommap(int fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_inter_quest_parse_frommap_pre ) {
+ int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_quest.parse_frommap(fd);
+ }
+ if( HPMHooks.count.HP_inter_quest_parse_frommap_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
/* inter_storage */
int HP_inter_storage_tosql(int account_id, struct storage_data *p) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
index 8d51ace0b..00700756c 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
@@ -15,6 +15,7 @@ memcpy(&HPMHooks.source.inter_mail, inter_mail, sizeof(struct inter_mail_interfa
memcpy(&HPMHooks.source.inter_mercenary, inter_mercenary, sizeof(struct inter_mercenary_interface));
memcpy(&HPMHooks.source.inter_party, inter_party, sizeof(struct inter_party_interface));
memcpy(&HPMHooks.source.inter_pet, inter_pet, sizeof(struct inter_pet_interface));
+memcpy(&HPMHooks.source.inter_quest, inter_quest, sizeof(struct inter_quest_interface));
memcpy(&HPMHooks.source.inter_storage, inter_storage, sizeof(struct inter_storage_interface));
memcpy(&HPMHooks.source.loginif, loginif, sizeof(struct loginif_interface));
memcpy(&HPMHooks.source.mapif, mapif, sizeof(struct mapif_interface));