diff --git a/src/game/Entities/StatSystem.cpp b/src/game/Entities/StatSystem.cpp index bb30698df38..825ffa0e5a2 100644 --- a/src/game/Entities/StatSystem.cpp +++ b/src/game/Entities/StatSystem.cpp @@ -430,7 +430,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 d1f32790375..bd346f64cd9 100644 --- a/src/game/Entities/Unit.cpp +++ b/src/game/Entities/Unit.cpp @@ -12205,6 +12205,16 @@ bool Unit::IsNoWeaponShapeShift() const return false; } +bool Unit::IsAttackSpeedOverridenShapeShift() 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 25474bfab13..278c7322bc5 100644 --- a/src/game/Entities/Unit.h +++ b/src/game/Entities/Unit.h @@ -1268,7 +1268,7 @@ class Unit : public WorldObject */ bool CanUseEquippedWeapon(WeaponAttackType attackType) const { - if (IsNoWeaponShapeShift()) + if (IsAttackSpeedOverridenShapeShift()) return false; switch (attackType) @@ -2084,6 +2084,7 @@ class Unit : public WorldObject bool IsShapeShifted() const; bool IsNoWeaponShapeShift() const; + bool IsAttackSpeedOverridenShapeShift() const; bool IsInDisallowedMountForm() const {