diff options
author | panikon <panikon@zoho.com> | 2014-02-19 17:10:57 -0300 |
---|---|---|
committer | panikon <panikon@zoho.com> | 2014-02-19 17:10:57 -0300 |
commit | c4a9dd3f2804b75c1d49b5ab58a3ba80ea4303c2 (patch) | |
tree | 53b779650a2821dc8bf2a9deb00d5a03890449fe /src/plugins/HPMHooking | |
parent | 58544d7f610261a903b3e843a795efd7571b2d56 (diff) | |
parent | d0b9510cf0d7a47e53aa341462a1175326dfc09d (diff) | |
download | hercules-c4a9dd3f2804b75c1d49b5ab58a3ba80ea4303c2.tar.gz hercules-c4a9dd3f2804b75c1d49b5ab58a3ba80ea4303c2.tar.bz2 hercules-c4a9dd3f2804b75c1d49b5ab58a3ba80ea4303c2.tar.xz hercules-c4a9dd3f2804b75c1d49b5ab58a3ba80ea4303c2.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 16 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 140 |
3 files changed, 111 insertions, 49 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index ed58b79a3..22cd280de 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -97,6 +97,8 @@ struct { struct HPMHookPoint *HP_battle_calc_elefix_post; struct HPMHookPoint *HP_battle_calc_masteryfix_pre; struct HPMHookPoint *HP_battle_calc_masteryfix_post; + struct HPMHookPoint *HP_battle_calc_chorusbonus_pre; + struct HPMHookPoint *HP_battle_calc_chorusbonus_post; struct HPMHookPoint *HP_battle_calc_skillratio_pre; struct HPMHookPoint *HP_battle_calc_skillratio_post; struct HPMHookPoint *HP_battle_calc_sizefix_pre; @@ -3441,6 +3443,8 @@ struct { struct HPMHookPoint *HP_party_send_dot_remove_post; struct HPMHookPoint *HP_party_sub_count_pre; struct HPMHookPoint *HP_party_sub_count_post; + struct HPMHookPoint *HP_party_sub_count_chorus_pre; + struct HPMHookPoint *HP_party_sub_count_chorus_post; struct HPMHookPoint *HP_party_booking_register_pre; struct HPMHookPoint *HP_party_booking_register_post; struct HPMHookPoint *HP_party_booking_update_pre; @@ -4655,8 +4659,6 @@ struct { struct HPMHookPoint *HP_skill_get_elemental_type_post; struct HPMHookPoint *HP_skill_cooldown_save_pre; struct HPMHookPoint *HP_skill_cooldown_save_post; - struct HPMHookPoint *HP_skill_maelstrom_suction_pre; - struct HPMHookPoint *HP_skill_maelstrom_suction_post; struct HPMHookPoint *HP_skill_get_new_group_id_pre; struct HPMHookPoint *HP_skill_get_new_group_id_post; struct HPMHookPoint *HP_skill_check_shadowform_pre; @@ -4691,6 +4693,8 @@ struct { struct HPMHookPoint *HP_status_heal_post; struct HPMHookPoint *HP_status_revive_pre; struct HPMHookPoint *HP_status_revive_post; + struct HPMHookPoint *HP_status_fixed_revive_pre; + struct HPMHookPoint *HP_status_fixed_revive_post; struct HPMHookPoint *HP_status_get_regen_data_pre; struct HPMHookPoint *HP_status_get_regen_data_post; struct HPMHookPoint *HP_status_get_status_data_pre; @@ -5124,6 +5128,8 @@ struct { int HP_battle_calc_elefix_post; int HP_battle_calc_masteryfix_pre; int HP_battle_calc_masteryfix_post; + int HP_battle_calc_chorusbonus_pre; + int HP_battle_calc_chorusbonus_post; int HP_battle_calc_skillratio_pre; int HP_battle_calc_skillratio_post; int HP_battle_calc_sizefix_pre; @@ -8468,6 +8474,8 @@ struct { int HP_party_send_dot_remove_post; int HP_party_sub_count_pre; int HP_party_sub_count_post; + int HP_party_sub_count_chorus_pre; + int HP_party_sub_count_chorus_post; int HP_party_booking_register_pre; int HP_party_booking_register_post; int HP_party_booking_update_pre; @@ -9682,8 +9690,6 @@ struct { int HP_skill_get_elemental_type_post; int HP_skill_cooldown_save_pre; int HP_skill_cooldown_save_post; - int HP_skill_maelstrom_suction_pre; - int HP_skill_maelstrom_suction_post; int HP_skill_get_new_group_id_pre; int HP_skill_get_new_group_id_post; int HP_skill_check_shadowform_pre; @@ -9718,6 +9724,8 @@ struct { int HP_status_heal_post; int HP_status_revive_pre; int HP_status_revive_post; + int HP_status_fixed_revive_pre; + int HP_status_fixed_revive_post; int HP_status_get_regen_data_pre; int HP_status_get_regen_data_post; int HP_status_get_status_data_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index d43852d40..4e85449b1 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -53,6 +53,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(battle->calc_cardfix, HP_battle_calc_cardfix) }, { HP_POP(battle->calc_elefix, HP_battle_calc_elefix) }, { HP_POP(battle->calc_masteryfix, HP_battle_calc_masteryfix) }, + { HP_POP(battle->calc_chorusbonus, HP_battle_calc_chorusbonus) }, { HP_POP(battle->calc_skillratio, HP_battle_calc_skillratio) }, { HP_POP(battle->calc_sizefix, HP_battle_calc_sizefix) }, { HP_POP(battle->calc_weapon_damage, HP_battle_calc_weapon_damage) }, @@ -1748,6 +1749,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(party->share_loot, HP_party_share_loot) }, { HP_POP(party->send_dot_remove, HP_party_send_dot_remove) }, { HP_POP(party->sub_count, HP_party_sub_count) }, + { HP_POP(party->sub_count_chorus, HP_party_sub_count_chorus) }, { HP_POP(party->booking_register, HP_party_booking_register) }, { HP_POP(party->booking_update, HP_party_booking_update) }, { HP_POP(party->booking_search, HP_party_booking_search) }, @@ -2363,7 +2365,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->changematerial, HP_skill_changematerial) }, { HP_POP(skill->get_elemental_type, HP_skill_get_elemental_type) }, { HP_POP(skill->cooldown_save, HP_skill_cooldown_save) }, - { HP_POP(skill->maelstrom_suction, HP_skill_maelstrom_suction) }, { HP_POP(skill->get_new_group_id, HP_skill_get_new_group_id) }, { HP_POP(skill->check_shadowform, HP_skill_check_shadowform) }, /* status */ @@ -2382,6 +2383,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->set_sp, HP_status_set_sp) }, { HP_POP(status->heal, HP_status_heal) }, { HP_POP(status->revive, HP_status_revive) }, + { HP_POP(status->fixed_revive, HP_status_fixed_revive) }, { HP_POP(status->get_regen_data, HP_status_get_regen_data) }, { HP_POP(status->get_status_data, HP_status_get_status_data) }, { HP_POP(status->get_base_status, HP_status_get_base_status) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 488d40613..8a9bd1790 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -1230,6 +1230,32 @@ int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *targe } return retVal___; } +int HP_battle_calc_chorusbonus(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_battle_calc_chorusbonus_pre ) { + int (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_battle_calc_chorusbonus_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.calc_chorusbonus(sd); + } + if( HPMHooks.count.HP_battle_calc_chorusbonus_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_battle_calc_chorusbonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag) { int hIndex = 0; int retVal___ = 0; @@ -44288,6 +44314,38 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) { } return retVal___; } +int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_party_sub_count_chorus_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_party_sub_count_chorus_pre[hIndex].func; + retVal___ = preHookFunc(bl, ap___copy); + va_end(ap___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.party.sub_count_chorus(bl, ap___copy); + va_end(ap___copy); + } + if( HPMHooks.count.HP_party_sub_count_chorus_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_post; hIndex++ ) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_party_sub_count_chorus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} void HP_party_booking_register(struct map_session_data *sd, short level, short mapid, short *job) { int hIndex = 0; if( HPMHooks.count.HP_party_booking_register_pre ) { @@ -60290,38 +60348,6 @@ void HP_skill_cooldown_save(struct map_session_data *sd) { } return; } -int HP_skill_maelstrom_suction(struct block_list *bl, va_list ap) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_skill_maelstrom_suction_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_maelstrom_suction_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_skill_maelstrom_suction_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); - va_end(ap___copy); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.skill.maelstrom_suction(bl, ap___copy); - va_end(ap___copy); - } - if( HPMHooks.count.HP_skill_maelstrom_suction_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_maelstrom_suction_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_skill_maelstrom_suction_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, ap___copy); - va_end(ap___copy); - } - } - return retVal___; -} int HP_skill_get_new_group_id(void) { int hIndex = 0; int retVal___ = 0; @@ -60764,6 +60790,32 @@ int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char } return retVal___; } +int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned int per_sp) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_status_fixed_revive_pre ) { + int (*preHookFunc) (struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_status_fixed_revive_pre[hIndex].func; + retVal___ = preHookFunc(bl, &per_hp, &per_sp); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.fixed_revive(bl, per_hp, per_sp); + } + if( HPMHooks.count.HP_status_fixed_revive_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); + for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_status_fixed_revive_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp); + } + } + return retVal___; +} struct regen_data* HP_status_get_regen_data(struct block_list *bl) { int hIndex = 0; struct regen_data* retVal___ = NULL; @@ -61282,14 +61334,14 @@ int HP_status_isimmune(struct block_list *bl) { } return retVal___; } -int HP_status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { +int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_status_get_sc_def_pre ) { - int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); + int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_status_get_sc_def_pre[hIndex].func; - retVal___ = preHookFunc(bl, &type, &rate, &tick, &flag); + retVal___ = preHookFunc(src, bl, &type, &rate, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61297,25 +61349,25 @@ int HP_status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int } } { - retVal___ = HPMHooks.source.status.get_sc_def(bl, type, rate, tick, flag); + retVal___ = HPMHooks.source.status.get_sc_def(src, bl, type, rate, tick, flag); } if( HPMHooks.count.HP_status_get_sc_def_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_status_get_sc_def_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &type, &rate, &tick, &flag); + retVal___ = postHookFunc(retVal___, src, bl, &type, &rate, &tick, &flag); } } return retVal___; } -int HP_status_change_start(struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { +int HP_status_change_start(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_status_change_start_pre ) { - int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func; - retVal___ = preHookFunc(bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + retVal___ = preHookFunc(src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -61323,13 +61375,13 @@ int HP_status_change_start(struct block_list *bl, enum sc_type type, int rate, i } } { - retVal___ = HPMHooks.source.status.change_start(bl, type, rate, val1, val2, val3, val4, tick, flag); + retVal___ = HPMHooks.source.status.change_start(src, bl, type, rate, val1, val2, val3, val4, tick, flag); } if( HPMHooks.count.HP_status_change_start_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_status_change_start_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + retVal___ = postHookFunc(retVal___, src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); } } return retVal___; |