diff --git a/src/game/Entities/StatSystem.cpp b/src/game/Entities/StatSystem.cpp index 40e6baf8591..08a11d5674d 100644 --- a/src/game/Entities/StatSystem.cpp +++ b/src/game/Entities/StatSystem.cpp @@ -365,7 +365,7 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, fl float weapon_mindamage = GetBaseWeaponDamage(attType, MINDAMAGE, index); float weapon_maxdamage = GetBaseWeaponDamage(attType, MAXDAMAGE, index); - if (IsNoWeaponShapeShift()) // check if player is in shapeshift which doesnt use weapon + if (IsAttackSpeedOverridenShapeShift()) // forms with no override on attack speed use normal weapon damage { uint32 lvl = GetLevel(); if (lvl > 60) diff --git a/src/game/Entities/Unit.cpp b/src/game/Entities/Unit.cpp index 8165c4a3861..e31ebaf3e7f 100644 --- a/src/game/Entities/Unit.cpp +++ b/src/game/Entities/Unit.cpp @@ -11278,6 +11278,16 @@ bool Unit::IsNoWeaponShapeShift() const return false; } +bool Unit::IsWeaponSpeedOverridenShapeShift() const +{ + // Mirroring clientside gameplay logic + if (ShapeshiftForm form = GetShapeshiftForm()) + if (SpellShapeshiftFormEntry const* entry = sSpellShapeshiftFormStore.LookupEntry(form)) + return entry->attackSpeed > 0; + + return false; +} + SpellAuraHolder* Unit::GetSpellAuraHolder(uint32 spellid) const { SpellAuraHolderMap::const_iterator itr = m_spellAuraHolders.find(spellid); diff --git a/src/game/Entities/Unit.h b/src/game/Entities/Unit.h index 06787bdbe73..b6fce6d9bbd 100644 --- a/src/game/Entities/Unit.h +++ b/src/game/Entities/Unit.h @@ -1219,7 +1219,7 @@ class Unit : public WorldObject */ bool CanUseEquippedWeapon(WeaponAttackType attackType) const { - if (IsNoWeaponShapeShift()) + if (IsAttackSpeedOverridenShapeShift()) return false; switch (attackType) @@ -2015,6 +2015,7 @@ class Unit : public WorldObject bool IsShapeShifted() const; bool IsNoWeaponShapeShift() const; + bool IsAttackSpeedOverridenShapeShift() const; bool IsInDisallowedMountForm() const {