*Fix Flametongue Weapon.
--HG-- branch : trunk
This commit is contained in:
@@ -6478,6 +6478,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
basepoints0 = int32(extra_attack_power/14.0f * GetAttackTime(BASE_ATTACK)/1000);
|
||||
triggered_spell_id = 25504;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
// apply cooldown before cast to prevent processing itself
|
||||
if( cooldown )
|
||||
@@ -6573,6 +6575,51 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
triggered_spell_id = 379;
|
||||
break;
|
||||
}
|
||||
// Flametongue Weapon (Passive)
|
||||
if (dummySpell->SpellFamilyFlags[0] & 0x200000)
|
||||
{
|
||||
if(GetTypeId()!=TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
if(!castItem || !castItem->IsEquipped())
|
||||
return false;
|
||||
|
||||
// firehit = dummySpell->EffectBasePoints[0] / ((4*19.25) * 1.3);
|
||||
float fire_onhit = dummySpell->EffectBasePoints[0] / 100.0;
|
||||
|
||||
float add_spellpower = SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE)
|
||||
+ SpellBaseDamageBonusForVictim(SPELL_SCHOOL_MASK_FIRE, pVictim);
|
||||
|
||||
// 1.3speed = 5%, 2.6speed = 10%, 4.0 speed = 15%, so, 1.0speed = 3.84%
|
||||
add_spellpower= add_spellpower / 100.0 * 3.84;
|
||||
|
||||
// Enchant on Off-Hand and ready?
|
||||
if ( castItem->GetSlot() == EQUIPMENT_SLOT_OFFHAND && isAttackReady(OFF_ATTACK))
|
||||
{
|
||||
float BaseWeaponSpeed = GetAttackTime(OFF_ATTACK)/1000.0;
|
||||
|
||||
// Value1: add the tooltip damage by swingspeed + Value2: add spelldmg by swingspeed
|
||||
basepoints0 = int32( (fire_onhit * BaseWeaponSpeed) + (add_spellpower * BaseWeaponSpeed) );
|
||||
triggered_spell_id = 10444;
|
||||
}
|
||||
|
||||
// Enchant on Main-Hand and ready?
|
||||
else if ( castItem->GetSlot() == EQUIPMENT_SLOT_MAINHAND && isAttackReady(BASE_ATTACK))
|
||||
{
|
||||
float BaseWeaponSpeed = GetAttackTime(BASE_ATTACK)/1000.0;
|
||||
|
||||
// Value1: add the tooltip damage by swingspeed + Value2: add spelldmg by swingspeed
|
||||
basepoints0 = int32( (fire_onhit * BaseWeaponSpeed) + (add_spellpower * BaseWeaponSpeed) );
|
||||
triggered_spell_id = 10444;
|
||||
}
|
||||
|
||||
// If not ready, we should return, shouldn't we?!
|
||||
else
|
||||
return false;
|
||||
|
||||
CastCustomSpell(pVictim,triggered_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
// Improved Water Shield
|
||||
if (dummySpell->SpellIconID == 2287)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user