mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user