Core/Spells: issue/3744
Windfury and Flametongue should proc from abilities Signed-off-by: dr.skull <[email protected]>
This commit is contained in:
@@ -7070,7 +7070,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
triggered_spell_id = 28850;
|
||||
break;
|
||||
}
|
||||
// Windfury Weapon (Passive) 1-5 Ranks
|
||||
// Windfury Weapon (Passive) 1-8 Ranks
|
||||
case 33757:
|
||||
{
|
||||
Player* player = ToPlayer();
|
||||
@@ -7085,7 +7085,9 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
return false;
|
||||
|
||||
WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
|
||||
if ((attType != BASE_ATTACK && attType != OFF_ATTACK) || !isAttackReady(attType))
|
||||
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
|| attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK
|
||||
|| attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK)
|
||||
return false;
|
||||
|
||||
// Now compute real proc chance...
|
||||
@@ -7132,9 +7134,14 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
int32 extra_attack_power = CalculateSpellDamage(victim, windfurySpellInfo, 1);
|
||||
|
||||
// Value gained from additional AP
|
||||
basepoints0 = int32(extra_attack_power / 14.0f * GetAttackTime(BASE_ATTACK) / 1000);
|
||||
basepoints0 = int32(extra_attack_power / 14.0f * GetAttackTime(attType) / 1000);
|
||||
|
||||
if (procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK)
|
||||
triggered_spell_id = 25504;
|
||||
|
||||
if (procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|
||||
triggered_spell_id = 33750;
|
||||
|
||||
// apply cooldown before cast to prevent processing itself
|
||||
if (cooldown)
|
||||
player->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown);
|
||||
@@ -7371,6 +7378,13 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (GetTypeId() != TYPEID_PLAYER || !victim || !victim->isAlive() || !castItem || !castItem->IsEquipped())
|
||||
return false;
|
||||
|
||||
Player* player = ToPlayer();
|
||||
WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
|
||||
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
|| attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK
|
||||
|| attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK)
|
||||
return false;
|
||||
|
||||
float fire_onhit = float(CalculatePctF(dummySpell->Effects[EFFECT_0]. CalcValue(), 1.0f));
|
||||
|
||||
float add_spellpower = (float)(SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE)
|
||||
@@ -7380,7 +7394,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
ApplyPctF(add_spellpower, 3.84f);
|
||||
|
||||
// Enchant on Off-Hand and ready?
|
||||
if (castItem->GetSlot() == EQUIPMENT_SLOT_OFFHAND && isAttackReady(OFF_ATTACK))
|
||||
if (castItem->GetSlot() == EQUIPMENT_SLOT_OFFHAND && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|
||||
{
|
||||
float BaseWeaponSpeed = GetAttackTime(OFF_ATTACK) / 1000.0f;
|
||||
|
||||
@@ -7390,7 +7404,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
}
|
||||
|
||||
// Enchant on Main-Hand and ready?
|
||||
else if (castItem->GetSlot() == EQUIPMENT_SLOT_MAINHAND && isAttackReady(BASE_ATTACK))
|
||||
else if (castItem->GetSlot() == EQUIPMENT_SLOT_MAINHAND && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK)
|
||||
{
|
||||
float BaseWeaponSpeed = GetAttackTime(BASE_ATTACK) / 1000.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user