[Cleanup] Remove extraneous check for NegateAttacks in SE_NegateAttacks (#3228)

# Notes
- We checked both, we only need to check one.
This commit is contained in:
Alex King 2023-04-05 11:12:02 -04:00 committed by GitHub
parent 66cadd599b
commit 1f29a40e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3201,8 +3201,13 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
case SE_NegateAttacks:
{
if (!new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_EXISTS] ||
((new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_EXISTS] && new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_MAX_DMG_ABSORB_PER_HIT]) && (new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_MAX_DMG_ABSORB_PER_HIT] < max_value))){
if (
!new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_EXISTS] ||
(
new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_MAX_DMG_ABSORB_PER_HIT] &&
new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_MAX_DMG_ABSORB_PER_HIT] < max_value
)
) {
new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_EXISTS] = 1;
new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_BUFFSLOT] = buffslot;
new_bonus->NegateAttacks[SBIndex::NEGATE_ATK_MAX_DMG_ABSORB_PER_HIT] = max_value;