Implement Disarm effects for creatures (#1482)
* Added threat generation to Warrior Disarm * Prevent NPC usage of melee weapon damage skills while disarmed * Now reduce creature mainhand damage by 60% while they are under a disarm effect * Revert "Added threat generation to Warrior Disarm" This reverts commit 19454276697c65785ebc827553b37561a99b902e. * All disarm skills now apply additional threat to their target, rather than just Warrior's disarm * Adjusted check for feral form with recent merge
This commit is contained in:
@@ -772,6 +772,13 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType)
|
||||
float weapon_mindamage = GetWeaponDamageRange(attType, MINDAMAGE);
|
||||
float weapon_maxdamage = GetWeaponDamageRange(attType, MAXDAMAGE);
|
||||
|
||||
// Disarm effects. Only applies to mobs with a weapon equipped. Sources suggest a
|
||||
// ~60% damage reduction on mobs which can be disarmed and have a weapon
|
||||
// http://wowwiki.wikia.com/wiki/Attumen_the_Huntsman?oldid=1377353
|
||||
// http://wowwiki.wikia.com/wiki/Disarm?direction=prev&oldid=200198
|
||||
if (HasWeapon() && !CanUseEquippedWeapon(attType))
|
||||
total_pct *= 0.4f;
|
||||
|
||||
/* AP for units is 30% of base damage.
|
||||
* ie if AP is reduced to 0, attack will be reduced of 30%
|
||||
* We have to ignore creatures that don't have AP set in database (we would divide by 0)
|
||||
|
||||
Reference in New Issue
Block a user