summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2014-05-08 17:16:42 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2014-05-08 17:16:42 +0200
commit6d0eb4fbed95a3cc0d6e198a74d4d3eaea5cb94f (patch)
treec2e5868d0b5f7d4835a344b52926f7ef4921c08c /src/plugins/HPMHooking
parentc4603a0335e5cfe49a600ff58c9060680b55360d (diff)
downloadhercules-6d0eb4fbed95a3cc0d6e198a74d4d3eaea5cb94f.tar.gz
hercules-6d0eb4fbed95a3cc0d6e198a74d4d3eaea5cb94f.tar.bz2
hercules-6d0eb4fbed95a3cc0d6e198a74d4d3eaea5cb94f.tar.xz
hercules-6d0eb4fbed95a3cc0d6e198a74d4d3eaea5cb94f.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc39
3 files changed, 38 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 61c510606..b6202d687 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -2125,6 +2125,8 @@ struct {
struct HPMHookPoint *HP_homun_addspiritball_post;
struct HPMHookPoint *HP_homun_delspiritball_pre;
struct HPMHookPoint *HP_homun_delspiritball_post;
+ struct HPMHookPoint *HP_homun_get_intimacy_grade_pre;
+ struct HPMHookPoint *HP_homun_get_intimacy_grade_post;
struct HPMHookPoint *HP_instance_init_pre;
struct HPMHookPoint *HP_instance_init_post;
struct HPMHookPoint *HP_instance_final_pre;
@@ -7164,6 +7166,8 @@ struct {
int HP_homun_addspiritball_post;
int HP_homun_delspiritball_pre;
int HP_homun_delspiritball_post;
+ int HP_homun_get_intimacy_grade_pre;
+ int HP_homun_get_intimacy_grade_post;
int HP_instance_init_pre;
int HP_instance_init_post;
int HP_instance_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 85ce07a21..47a651a49 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1077,6 +1077,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(homun->exp_db_read, HP_homun_exp_db_read) },
{ HP_POP(homun->addspiritball, HP_homun_addspiritball) },
{ HP_POP(homun->delspiritball, HP_homun_delspiritball) },
+ { HP_POP(homun->get_intimacy_grade, HP_homun_get_intimacy_grade) },
/* instance */
{ HP_POP(instance->init, HP_instance_init) },
{ HP_POP(instance->final, HP_instance_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index e563653a8..25798e992 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -28094,6 +28094,33 @@ void HP_homun_delspiritball(struct homun_data *hd, int count, int type) {
}
return;
}
+int8 HP_homun_get_intimacy_grade(struct homun_data *hd) {
+ int hIndex = 0;
+ int8 retVal___ = 0;
+ if( HPMHooks.count.HP_homun_get_intimacy_grade_pre ) {
+ int8 (*preHookFunc) (struct homun_data *hd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_pre[hIndex].func;
+ retVal___ = preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.get_intimacy_grade(hd);
+ }
+ if( HPMHooks.count.HP_homun_get_intimacy_grade_post ) {
+ int8 (*postHookFunc) (int8 retVal___, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd);
+ }
+ }
+ return retVal___;
+}
/* instance */
void HP_instance_init(bool minimal) {
int hIndex = 0;
@@ -44228,15 +44255,15 @@ const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const ch
}
return retVal___;
}
-const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_duplicate_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_duplicate_pre[hIndex].func;
- retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &options);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -44244,13 +44271,13 @@ const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const
}
}
{
- retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath, options);
}
if( HPMHooks.count.HP_npc_parse_duplicate_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_duplicate_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options);
}
}
return retVal___;