mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
*Fix the bug that Steady Shot make too much(over million) damage with these items: 42946, 44093.
--HG-- branch : trunk
This commit is contained in:
@@ -588,7 +588,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: should this be put on taken but not done?
|
||||
// TODO: should this be put on taken but not done?
|
||||
if(found)
|
||||
damage += m_spellInfo->EffectBasePoints[1];
|
||||
|
||||
@@ -598,7 +598,12 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
Item *item = ((Player*)m_caster)->GetWeaponForAttack(RANGED_ATTACK);
|
||||
if(item)
|
||||
{
|
||||
damage += urand(uint32(item->GetProto()->Damage->DamageMin), uint32(item->GetProto()->Damage->DamageMax));
|
||||
float dmg_min = item->GetProto()->Damage->DamageMin;
|
||||
float dmg_max = item->GetProto()->Damage->DamageMax;
|
||||
if(dmg_max == 0.0f && dmg_min > dmg_max)
|
||||
damage += uint32(dmg_min);
|
||||
else
|
||||
damage += urand(uint32(dmg_min), uint32(dmg_max));
|
||||
damage += ((Player*)m_caster)->GetAmmoDPS()*item->GetProto()->Delay/1000;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user