mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
fix(Core/Unit): fix Dual Wield for more creatures, CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK, creature disarm damage (#20015)
* enable CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK * sql set CREATURE_FLAG_EXTRA_USE_OFFHAND * use new HasOffHandWeaponForAttack instead of haveOffhandWeapon no longer requires m_CanDualwield set to use Offhand attack requires non-disarmed weapon in Offhand OR creature_flag_extra enabled Co-authored-by: Ovah <dreadkiller@gmx.de> Co-authored-by: Warlockbugs <warlockbugs@outlook.com> * Make shapeshift forms which dont override attack speed use weapon damage Co-authored-by: killerwife <killerwife@gmail.com> * SetEquipmentSlots turning off damage update when using template default Co-authored-by: killerwife <killerwife@gmail.com> * Setup DualWield & Damage On Equipment Updates, implement Set and GetVirtualItem Co-authored-by: Yatzii <47720837+Yatzii93@users.noreply.github.com> * creature disarm damage set disarm to reduce minmax damage by 50% instead of setting to 0 Co-authored-by: Warlockbugs <warlockbugs@outlook.com> --------- Co-authored-by: Ovah <dreadkiller@gmx.de> Co-authored-by: Warlockbugs <warlockbugs@outlook.com> Co-authored-by: killerwife <killerwife@gmail.com> Co-authored-by: Yatzii <47720837+Yatzii93@users.noreply.github.com>
This commit is contained in:
@@ -195,7 +195,7 @@ void Player::Update(uint32 p_time)
|
||||
|
||||
// prevent base and off attack in same time, delay attack at
|
||||
// 0.2 sec
|
||||
if (haveOffhandWeapon())
|
||||
if (HasOffhandWeaponForAttack())
|
||||
if (getAttackTimer(OFF_ATTACK) < ATTACK_DISPLAY_DELAY)
|
||||
setAttackTimer(OFF_ATTACK, ATTACK_DISPLAY_DELAY);
|
||||
|
||||
@@ -205,7 +205,7 @@ void Player::Update(uint32 p_time)
|
||||
}
|
||||
}
|
||||
|
||||
if (haveOffhandWeapon() && isAttackReady(OFF_ATTACK))
|
||||
if (HasOffhandWeaponForAttack() && isAttackReady(OFF_ATTACK))
|
||||
{
|
||||
if (!IsWithinMeleeRange(victim))
|
||||
setAttackTimer(OFF_ATTACK, 100);
|
||||
|
||||
Reference in New Issue
Block a user