mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Core/Unit): dodges, parries and critters not increasing weapon skills (#5895)
This fixes not getting skill ups from attacking an enemy and them parrying your attack or dodging it. This also fixes attacking a critter and not getting weapon skill ups. Previously Dodge and Parry were only giving a chance to increase the victims DEFENSE skill. I changed it so it will proc on victim and attacker. for weapon and defense skills Also, critters were being checked to not give weapon skill ups on purpose but I removed the check.
This commit is contained in:
@@ -15535,14 +15535,14 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
!target->IsPet()
|
||||
)
|
||||
{
|
||||
// On melee based hit/miss/resist need update skill (for victim and attacker)
|
||||
if (procExtra & (PROC_EX_NORMAL_HIT | PROC_EX_MISS | PROC_EX_RESIST))
|
||||
// On melee based hit/miss/resist/parry/dodge need to update skill (for victim and attacker)
|
||||
if (procExtra & (PROC_EX_NORMAL_HIT | PROC_EX_MISS | PROC_EX_RESIST | PROC_EX_PARRY | PROC_EX_DODGE))
|
||||
{
|
||||
if (target->GetTypeId() != TYPEID_PLAYER && !target->IsCritter())
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
ToPlayer()->UpdateCombatSkills(target, attType, isVictim);
|
||||
}
|
||||
// Update defence if player is victim and parry/dodge/block
|
||||
else if (isVictim && procExtra & (PROC_EX_DODGE | PROC_EX_PARRY | PROC_EX_BLOCK))
|
||||
// Update defence if player is victim and we block
|
||||
else if (isVictim && procExtra & (PROC_EX_BLOCK))
|
||||
ToPlayer()->UpdateCombatSkills(target, attType, true);
|
||||
}
|
||||
// If exist crit/parry/dodge/block need update aura state (for victim and attacker)
|
||||
|
||||
Reference in New Issue
Block a user