fix(Core/Unit): Exclude Sword Specialization and Hack and Slash from … (#13706)
* fix(Core/Unit): Exclude Sword Specialization and Hack and Slash from the extra attack range check * fix logic
This commit is contained in:
@@ -469,7 +469,8 @@ void Unit::Update(uint32 p_time)
|
|||||||
extraAttacksTargets.erase(itr);
|
extraAttacksTargets.erase(itr);
|
||||||
if (Unit* victim = ObjectAccessor::GetUnit(*this, targetGuid))
|
if (Unit* victim = ObjectAccessor::GetUnit(*this, targetGuid))
|
||||||
{
|
{
|
||||||
if (victim->IsWithinMeleeRange(this))
|
if (_lastExtraAttackSpell == SPELL_SWORD_SPECIALIZATION || _lastExtraAttackSpell == SPELL_HACK_AND_SLASH
|
||||||
|
|| victim->IsWithinMeleeRange(this))
|
||||||
{
|
{
|
||||||
HandleProcExtraAttackFor(victim, count);
|
HandleProcExtraAttackFor(victim, count);
|
||||||
}
|
}
|
||||||
@@ -9376,7 +9377,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||||||
|
|
||||||
// Patch 2.2.0 Sword Specialization (Warrior, Rogue) extra attack can no longer proc additional extra attacks
|
// Patch 2.2.0 Sword Specialization (Warrior, Rogue) extra attack can no longer proc additional extra attacks
|
||||||
// 3.3.5 Sword Specialization (Warrior), Hack and Slash (Rogue)
|
// 3.3.5 Sword Specialization (Warrior), Hack and Slash (Rogue)
|
||||||
if (lastExtraAttackSpell == 16459 || lastExtraAttackSpell == 66923)
|
if (lastExtraAttackSpell == SPELL_SWORD_SPECIALIZATION || lastExtraAttackSpell == SPELL_HACK_AND_SLASH)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -717,6 +717,12 @@ enum MeleeHitOutcome
|
|||||||
MELEE_HIT_GLANCING, MELEE_HIT_CRIT, MELEE_HIT_CRUSHING, MELEE_HIT_NORMAL
|
MELEE_HIT_GLANCING, MELEE_HIT_CRIT, MELEE_HIT_CRUSHING, MELEE_HIT_NORMAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ExtraAttackSpells
|
||||||
|
{
|
||||||
|
SPELL_SWORD_SPECIALIZATION = 16459,
|
||||||
|
SPELL_HACK_AND_SLASH = 66923
|
||||||
|
};
|
||||||
|
|
||||||
class DispelInfo
|
class DispelInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user