-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move skill_onskillusage from skill_attack to skill_castend #8266
base: master
Are you sure you want to change the base?
Conversation
src/map/skill.cpp
Outdated
@@ -7181,7 7179,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint | |||
{// consume arrow on last invocation to this skill. | |||
battle_consume_ammo(sd, skill_id, skill_lv); | |||
} | |||
|
|||
skill_onskillusage(sd,bl,skill_id,skill_lv); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be skill_onskillusage(sd, bl, skill_id, tick); ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes correct!
src/map/skill.cpp
Outdated
@@ -7181,7 7179,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint | |||
{// consume arrow on last invocation to this skill. | |||
battle_consume_ammo(sd, skill_id, skill_lv); | |||
} | |||
|
|||
skill_onskillusage(sd,bl,skill_id,skill_lv); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes correct!
@@ -4138,8 4138,6 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list * | |||
} | |||
break; | |||
} | |||
if( sd ) | |||
skill_onskillusage(sd, bl, skill_id, tick); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solves the problem, but seems to generate another one.
This bonus has stopped working:
bonus4 bAutoSpellOnSkill,"RK_DRAGONBREATH_WATER","NPC_ACIDBREATH",getskilllv("RK_DRAGONBREATH_WATER"),1000;
bonus4 bAutoSpellOnSkill,"RK_DRAGONBREATH","NPC_THUNDERBREATH",getskilllv("RK_DRAGONBREATH"),1000;
Probably a skill calling another skill of a different type fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works perfectly, my only problem is that one skill breaks the animation of the other allowing them to spam.
Fixes #8256