if you change skill->attack from BF_MISC into BF_WEAPON,
then you should also change the damage calculation from battle_calc_misc_attack function into battle_calc_weapon_attack function
src/map/battle.c | 15 ++++++++-------
src/map/skill.c | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/map/battle.c b/src/map/battle.c
index 1b7bf909e..4193c8cd0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4130,13 +4130,6 @@ static struct Damage battle_calc_misc_attack(struct block_list *src, struct bloc
case NPC_EVILLAND:
md.damage = skill->calc_heal(src,target,skill_id,skill_lv,false);
break;
- case RK_DRAGONBREATH:
- case RK_DRAGONBREATH_WATER:
- md.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv;
- RE_LVL_MDMOD(150);
- if (sd) md.damage = md.damage * (95 + 5 * pc->checkskill(sd,RK_DRAGONTRAINING)) / 100;
- md.flag |= BF_LONG|BF_WEAPON;
- break;
/**
* Ranger
**/
@@ -4960,6 +4953,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
break;
}
break;
+
+ case RK_DRAGONBREATH:
+ case RK_DRAGONBREATH_WATER:
+ wd.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv;
+ wd.damage = wd.damage * status->get_lv(src) / 150;
+ if (sd) wd.damage = wd.damage * (95 + 5 * pc->checkskill(sd,RK_DRAGONTRAINING)) / 100;
+ wd.flag |= BF_LONG|BF_WEAPON;
+ break;
default:
{
i = (flag.cri
diff --git a/src/map/skill.c b/src/map/skill.c
index 633a73d67..4121d66e7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4937,7 +4937,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl
if( (tsc = status->get_sc(bl)) && (tsc->data[SC_HIDING] )) {
clif->skill_nodamage(src,src,skill_id,skill_lv,1);
} else
- skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag);
+ skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
}
break;
case NPC_SELFDESTRUCTION: {
but how you want to change the damage formula is totally up to you ...