summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-20 21:15:02 -0200
committershennetsind <ind@henn.et>2013-10-20 21:15:02 -0200
commitffe24e0c6a144011b7eb3287130d0c577e4c04a3 (patch)
treed43f05946432bac6ef6afac3a6b7310d1330d9ce
parent073023b06ca755644667bb57a34d8d05fba37b57 (diff)
parent68f8294f2c0f68dac181bffb427a2be8a52193f9 (diff)
downloadhercules-ffe24e0c6a144011b7eb3287130d0c577e4c04a3.tar.gz
hercules-ffe24e0c6a144011b7eb3287130d0c577e4c04a3.tar.bz2
hercules-ffe24e0c6a144011b7eb3287130d0c577e4c04a3.tar.xz
hercules-ffe24e0c6a144011b7eb3287130d0c577e4c04a3.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc115
3 files changed, 135 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 6fbb45016..8da24df17 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -2097,6 +2097,8 @@ struct {
struct HPMHookPoint *HP_instance_init_post;
struct HPMHookPoint *HP_instance_final_pre;
struct HPMHookPoint *HP_instance_final_post;
+ struct HPMHookPoint *HP_instance_reload_pre;
+ struct HPMHookPoint *HP_instance_reload_post;
struct HPMHookPoint *HP_instance_create_pre;
struct HPMHookPoint *HP_instance_create_post;
struct HPMHookPoint *HP_instance_add_map_pre;
@@ -2107,6 +2109,12 @@ struct {
struct HPMHookPoint *HP_instance_map2imap_post;
struct HPMHookPoint *HP_instance_mapid2imapid_pre;
struct HPMHookPoint *HP_instance_mapid2imapid_post;
+ struct HPMHookPoint *HP_instance_mapname2imap_pre;
+ struct HPMHookPoint *HP_instance_mapname2imap_post;
+ struct HPMHookPoint *HP_instance_map_npcsub_pre;
+ struct HPMHookPoint *HP_instance_map_npcsub_post;
+ struct HPMHookPoint *HP_instance_init_npc_pre;
+ struct HPMHookPoint *HP_instance_init_npc_post;
struct HPMHookPoint *HP_instance_destroy_pre;
struct HPMHookPoint *HP_instance_destroy_post;
struct HPMHookPoint *HP_instance_start_pre;
@@ -6978,6 +6986,8 @@ struct {
int HP_instance_init_post;
int HP_instance_final_pre;
int HP_instance_final_post;
+ int HP_instance_reload_pre;
+ int HP_instance_reload_post;
int HP_instance_create_pre;
int HP_instance_create_post;
int HP_instance_add_map_pre;
@@ -6988,6 +6998,12 @@ struct {
int HP_instance_map2imap_post;
int HP_instance_mapid2imapid_pre;
int HP_instance_mapid2imapid_post;
+ int HP_instance_mapname2imap_pre;
+ int HP_instance_mapname2imap_post;
+ int HP_instance_map_npcsub_pre;
+ int HP_instance_map_npcsub_post;
+ int HP_instance_init_npc_pre;
+ int HP_instance_init_npc_post;
int HP_instance_destroy_pre;
int HP_instance_destroy_post;
int HP_instance_start_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 6ca0002f4..a538da537 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1064,11 +1064,15 @@ struct HookingPointData HookingPoints[] = {
/* instance */
{ HP_POP(instance->init, HP_instance_init) },
{ HP_POP(instance->final, HP_instance_final) },
+ { HP_POP(instance->reload, HP_instance_reload) },
{ HP_POP(instance->create, HP_instance_create) },
{ HP_POP(instance->add_map, HP_instance_add_map) },
{ HP_POP(instance->del_map, HP_instance_del_map) },
{ HP_POP(instance->map2imap, HP_instance_map2imap) },
{ HP_POP(instance->mapid2imapid, HP_instance_mapid2imapid) },
+ { HP_POP(instance->mapname2imap, HP_instance_mapname2imap) },
+ { HP_POP(instance->map_npcsub, HP_instance_map_npcsub) },
+ { HP_POP(instance->init_npc, HP_instance_init_npc) },
{ HP_POP(instance->destroy, HP_instance_destroy) },
{ HP_POP(instance->start, HP_instance_start) },
{ HP_POP(instance->check_idle, HP_instance_check_idle) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 9a34af7b4..c3e234324 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -26694,6 +26694,31 @@ void HP_instance_final(void) {
}
return;
}
+void HP_instance_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.reload();
+ }
+ if( HPMHooks.count.HP_instance_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
int HP_instance_create(int party_id, const char *name, enum instance_owner_type type) {
int hIndex = 0;
int retVal___ = 0;
@@ -26823,6 +26848,96 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) {
}
return retVal___;
}
+int HP_instance_mapname2imap(const char *map_name, int instance_id) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_instance_mapname2imap_pre ) {
+ int (*preHookFunc) (const char *map_name, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_mapname2imap_pre[hIndex].func;
+ retVal___ = preHookFunc(map_name, &instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.mapname2imap(map_name, instance_id);
+ }
+ if( HPMHooks.count.HP_instance_mapname2imap_post ) {
+ int (*postHookFunc) (int retVal___, const char *map_name, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_mapname2imap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, map_name, &instance_id);
+ }
+ }
+ return retVal___;
+}
+int HP_instance_map_npcsub(struct block_list *bl, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_instance_map_npcsub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_instance_map_npcsub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.instance.map_npcsub(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_instance_map_npcsub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_instance_map_npcsub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_instance_init_npc(struct block_list *bl, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_instance_init_npc_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_instance_init_npc_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.instance.init_npc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_instance_init_npc_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_instance_init_npc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
void HP_instance_destroy(int instance_id) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_destroy_pre ) {