Skip to content
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

Incorrect value comparison with damage flag which is purposed for BF_* value types. #3320

Open
sagunkho opened this issue Sep 14, 2024 · 1 comment

Comments

@sagunkho
Copy link
Member

sagunkho commented Sep 14, 2024

Describe the bug
In a particular part of the skill code, in function skill_attack, dmg.flag is being compared with ATK_BLOCK which is a damage_lv type enum. dmg.flag is intended for use with the BF_* type enumerator.

To Reproduce
There's no need to reproduce behavior, the code is quite evident.

Expected behavior
Find out the real reason for that check and recorrect it to compare with BF_* type if intended or compare dmg.dmg_lv with the damage_lv type enumator.
The change of checking dmg.dmg_lv instead of dmg.flag is also intended because skill->additional_effect checks for the dmg.dmg_lv in the previous line of code. therefore leading to skill->counter_additional_effect when the function returns.

Screenshots
Screenshot 2024-09-14 142521

System specs (please complete the following information):

  • OS: Windows
  • Hercules Version [e.g. v2018.09.22] 2645790
  • Mode: [renewal or pre-renewal?] renewal
  • Packet version: [e.g. 20101130] 20190530
  • Client type: [e.g. main, RE, zero, sak, ad] main

Plugins used or source modifications
none

Additional context
the version i'm using is from 2019 so its pretty old but I doubt someone has checked the code.

@skyleo
Copy link
Contributor

skyleo commented Oct 6, 2024

if( dmg.flag > ATK_BLOCK )

same still

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants