[Bug Fix] Fix can_riposte parameter in DoMeleeSkillAttackDmg (#3792)

# Note
- `can_riposte` logic was reverse, setting to `true` caused the attack to not be able to be riposted, the opposite of the intended functionality.
This commit is contained in:
Alex King
2023-12-18 22:27:58 -05:00
committed by GitHub
parent 75a627a3a2
commit b3bd44cd76
2 changed files with 9 additions and 10 deletions
+8 -9
View File
@@ -2385,7 +2385,7 @@ int Mob::TryAssassinate(Mob *defender, EQ::skills::SkillType skillInUse)
}
void Mob::DoMeleeSkillAttackDmg(Mob *other, int32 weapon_damage, EQ::skills::SkillType skillinuse, int16 chance_mod,
int16 focus, bool CanRiposte, int ReuseTime)
int16 focus, bool can_riposte, int ReuseTime)
{
if (!CanDoSpecialAttack(other)) {
return;
@@ -2425,15 +2425,14 @@ void Mob::DoMeleeSkillAttackDmg(Mob *other, int32 weapon_damage, EQ::skills::Ski
}
DamageHitInfo my_hit {};
my_hit.base_damage = weapon_damage;
my_hit.min_damage = 0;
my_hit.damage_done = 1;
my_hit.skill = skillinuse;
my_hit.offense = offense(my_hit.skill);
my_hit.tohit = GetTotalToHit(my_hit.skill, chance_mod);
// slot range exclude ripe etc ...
my_hit.hand = CanRiposte ? EQ::invslot::slotRange : EQ::invslot::slotPrimary;
my_hit.base_damage = weapon_damage;
my_hit.min_damage = 0;
my_hit.damage_done = 1;
my_hit.skill = skillinuse;
my_hit.offense = offense(my_hit.skill);
my_hit.tohit = GetTotalToHit(my_hit.skill, chance_mod);
my_hit.hand = can_riposte ? EQ::invslot::slotPrimary : EQ::invslot::slotRange;
if (IsNPC()) {
my_hit.min_damage = CastToNPC()->GetMinDamage();