Core/Creature: merged creature extra flag for offhand attacks
This commit is contained in:
1 parent
f943ac6d06
commit
6ecb9746b1
4 files changed
+15
-9
No files matched your search
@@ -5560,9 +5560,10 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
|
||||
SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
}
|
||||
|
||||
// delay offhand weapon attack to next attack time
|
||||
// delay offhand weapon attack by 50% of the base attack time
|
||||
if (haveOffhandWeapon() && GetTypeId() != TYPEID_PLAYER)
|
||||
resetAttackTimer(OFF_ATTACK);
|
||||
setAttackTimer(OFF_ATTACK, std::max(getAttackTimer(OFF_ATTACK), getAttackTimer(BASE_ATTACK) + uint32(CalculatePct(GetFloatValue(UNIT_FIELD_BASEATTACKTIME), 50))));
|
||||
|
||||
|
||||
if (meleeAttack)
|
||||
SendMeleeAttackStart(victim);
|
||||
|
||||
Reference in new issue
Block a user