Skip to content

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

@sagunkho

Description

@sagunkho

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions