Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.
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
System specs (please complete the following information):
OS: Windows
Hercules Version [e.g. v2018.09.22] 26457909e94c910489077ce2643beb08cab33807
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.
Describe the bug In a particular part of the skill code, in function
skill_attack
,dmg.flag
is being compared withATK_BLOCK
which is adamage_lv
type enum.dmg.flag
is intended for use with theBF_*
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 checkingdmg.dmg_lv
instead ofdmg.flag
is also intended becauseskill->additional_effect
checks for thedmg.dmg_lv
in the previous line of code. therefore leading toskill->counter_additional_effect
when the function returns.Screenshots
System specs (please complete the following information):
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.