rendered paste bodyIndex: game/Spell.cpp
===================================================================
--- game/Spell.cpp (revision 5224)
+++ game/Spell.cpp (working copy)
@@ -3744,7 +3744,7 @@
case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
{
if(m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_TARGET_NOT_PLAYER;
- if(m_spellInfo->rangeIndex == 1 || m_spellInfo->rangeIndex == 2 || m_spellInfo->rangeIndex == 7)
+ if(m_spellInfo->rangeIndex == 1 || m_spellInfo->rangeIndex == 2 || m_spellInfo->rangeIndex == 6 || m_spellInfo->rangeIndex == 7)
break;
Item *pItem = ((Player*)m_caster)->GetItemByPos( INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED );
if(!pItem || pItem->IsBroken() || pItem->GetProto()->Class != ITEM_CLASS_WEAPON )
Index: game/SpellEffects.cpp
===================================================================
--- game/SpellEffects.cpp (revision 5224)
+++ game/SpellEffects.cpp (working copy)
@@ -3193,7 +3193,7 @@
// FIXME: we also need select OFF_ATTACK if trigering some spell at offhand attack
else if(m_spellInfo->SpellVisual==3136 || m_spellInfo->SpellIconID==2293)
attType = BASE_ATTACK;
- else if(m_spellInfo->rangeIndex != 1 && m_spellInfo->rangeIndex != 2 && m_spellInfo->rangeIndex != 7)
+ else if(m_spellInfo->rangeIndex != 1 && m_spellInfo->rangeIndex != 2 && m_spellInfo->rangeIndex != 6 && m_spellInfo->rangeIndex != 7)
{
attType = RANGED_ATTACK;
@@ -3267,6 +3267,10 @@
}
}
+ // Windfury Weapon add damage again..
+ if ( m_spellInfo->Id == 25504 || m_spellInfo->Id == 33750 )
+ bonus += m_caster->CalculateDamage(attType);
+
// percent mod applied
bonus = int32(bonus *damagePercentMod);
Index: game/Unit.cpp
===================================================================
--- game/Unit.cpp (revision 5224)
+++ game/Unit.cpp (working copy)
@@ -4427,7 +4427,30 @@
CastSpell(pVictim,37378,true,castItem,triggeredByAura);
return;
}
+ // Windfury weapon
+ case 33757:
+ case 33756:
+ case 33755:
+ case 33754:
+ case 33727:
+ {
+ if(GetTypeId() != TYPEID_PLAYER || !pVictim || !pVictim->isAlive())
+ return;
+ // never proc from another windfury attack or the AP bonus will stack and we will get really huge criticals
+ if ( procSpell && ( procSpell->Id == 25504 || procSpell->Id == 33750) )
+ return;
+ // Main-Hand
+ int32 MainAPBonus = (int32)CalculateSpellDamage(dummySpell,0,dummySpell->EffectBasePoints[0],pVictim)/14 * GetAttackTime(BASE_ATTACK)/1000;
+ CastCustomSpell(pVictim,25504,&MainAPBonus,NULL,NULL,true,NULL,triggeredByAura);
+ ((Player*)this)->AddSpellCooldown(25504,0,time(NULL) + 3);
+
+ // Off-Hand
+ int32 OffAPBonus = (int32)CalculateSpellDamage(dummySpell,0,dummySpell->EffectBasePoints[0],pVictim)/14 * GetAttackTime(OFF_ATTACK)/1000;
+ CastCustomSpell(pVictim,33750,&OffAPBonus,NULL,NULL,true,NULL,triggeredByAura);
+ ((Player*)this)->AddSpellCooldown(33750,0,time(NULL) + 3);
+
+ }
default: break;
}