diff options
author | dastgirpojee <dastgirpojee@rocketmail.com> | 2015-01-11 10:13:44 +0530 |
---|---|---|
committer | dastgirpojee <dastgirpojee@rocketmail.com> | 2015-01-11 10:13:44 +0530 |
commit | 39318bbcb59a8885ad2df64681945906305b0a12 (patch) | |
tree | de31f9d26e8fd82ae72ed7093e2210fd6147a742 /src/map/battle.c | |
parent | e99cbac3f1d0354566da5887ab4f01c6737dd0de (diff) | |
parent | c1c42d4021a9eacd467f2c9a9c10a62c9c1ad7b2 (diff) | |
download | hercules-39318bbcb59a8885ad2df64681945906305b0a12.tar.gz hercules-39318bbcb59a8885ad2df64681945906305b0a12.tar.bz2 hercules-39318bbcb59a8885ad2df64681945906305b0a12.tar.xz hercules-39318bbcb59a8885ad2df64681945906305b0a12.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index de57e7d2c..edb5fd69f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -757,6 +757,9 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, case HT_FREEZINGTRAP: damage += 40 * pc->checkskill(sd, RA_RESEARCHTRAP); break; + default: + battle->calc_masteryfix_unknown(src, target, &skill_id, &skill_lv, &damage, &div, &left, &weapon); + break; } if( sc ){ // sc considered as masteries @@ -837,6 +840,10 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, return damage; } + +void battle_calc_masteryfix_unknown(struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon) { +} + /*========================================== * Elemental attribute fix. *------------------------------------------*/ @@ -1771,6 +1778,9 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block } } break; + default: + battle->calc_skillratio_magic_unknown(&attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag); + break; } break; case BF_WEAPON: @@ -2537,6 +2547,9 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block case MH_MAGMA_FLOW: skillratio += -100 + 100 * skill_lv; break; + default: + battle->calc_skillratio_weapon_unknown(&attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag); + break; } //Skill damage modifiers that stack linearly if(sc && skill_id != PA_SACRIFICE){ @@ -2581,6 +2594,13 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block return 0; return skillratio; } + +void battle_calc_skillratio_magic_unknown(int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag) { +} + +void battle_calc_skillratio_weapon_unknown(int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag) { +} + /*========================================== * Check damage trough status. * ATK may be MISS, BLOCKED FAIL, reduce, increase, end status... @@ -3938,6 +3958,9 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * } break; + default: + battle->calc_misc_attack_unknown(src, target, &skill_id, &skill_lv, &mflag, &md); + break; } if (nk&NK_SPLASHSPLIT){ // Divide ATK among targets @@ -4078,6 +4101,9 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * return md; } +void battle_calc_misc_attack_unknown(struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md) { +} + /*========================================== * battle_calc_weapon_attack (by Skotlex) *------------------------------------------*/ @@ -7262,4 +7288,8 @@ void battle_defaults(void) { battle->config_adjust = battle_adjust_conf; battle->get_enemy_area = battle_getenemyarea; battle->damage_area = battle_damage_area; + battle->calc_masteryfix_unknown = battle_calc_masteryfix_unknown; + battle->calc_skillratio_magic_unknown = battle_calc_skillratio_magic_unknown; + battle->calc_skillratio_weapon_unknown = battle_calc_skillratio_weapon_unknown; + battle->calc_misc_attack_unknown = battle_calc_misc_attack_unknown; } |