diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-10-05 07:38:42 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-10-05 07:38:42 +0200 |
commit | 6d5b8811b42669237939ccc468010b71fe463e37 (patch) | |
tree | 58548222005f3fd4d53439c59600ac937ae7efc8 /src/plugins/HPMHooking/HPMHooking.Hooks.inc | |
parent | a6c4c6384398a250099c86a1605d63f83f108905 (diff) | |
download | hercules-6d5b8811b42669237939ccc468010b71fe463e37.tar.gz hercules-6d5b8811b42669237939ccc468010b71fe463e37.tar.bz2 hercules-6d5b8811b42669237939ccc468010b71fe463e37.tar.xz hercules-6d5b8811b42669237939ccc468010b71fe463e37.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 4cc8bbf18..c4935ea1b 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -26430,14 +26430,14 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { return; } /* gstorage */ -struct guild_storage* HP_gstorage_id2storage(int guild_id) { +struct guild_storage* HP_gstorage_ensure(int guild_id) { int hIndex = 0; struct guild_storage* retVal___ = NULL; - if( HPMHooks.count.HP_gstorage_id2storage_pre ) { + if( HPMHooks.count.HP_gstorage_ensure_pre ) { struct guild_storage* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_gstorage_id2storage_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_gstorage_ensure_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } if( *HPMforce_return ) { @@ -26446,39 +26446,12 @@ struct guild_storage* HP_gstorage_id2storage(int guild_id) { } } { - retVal___ = HPMHooks.source.gstorage.id2storage(guild_id); + retVal___ = HPMHooks.source.gstorage.ensure(guild_id); } - if( HPMHooks.count.HP_gstorage_id2storage_post ) { + if( HPMHooks.count.HP_gstorage_ensure_post ) { struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_gstorage_id2storage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); - } - } - return retVal___; -} -struct guild_storage* HP_gstorage_id2storage2(int guild_id) { - int hIndex = 0; - struct guild_storage* retVal___ = NULL; - if( HPMHooks.count.HP_gstorage_id2storage2_pre ) { - struct guild_storage* (*preHookFunc) (int *guild_id); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_gstorage_id2storage2_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.gstorage.id2storage2(guild_id); - } - if( HPMHooks.count.HP_gstorage_id2storage2_post ) { - struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_gstorage_id2storage2_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_gstorage_ensure_post[hIndex].func; retVal___ = postHookFunc(retVal___, &guild_id); } } |