mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[9865] Add support split damage for spells 66765, 67333.
Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also small cleanup in mangos_spell_check.sql
This commit is contained in:
parent
fc91380b25
commit
c4ee01422d
3 changed files with 20 additions and 7 deletions
|
|
@ -4990,6 +4990,23 @@ void Spell::EffectWeaponDmg(SpellEffectIndex eff_idx)
|
|||
int32 spell_bonus = 0; // bonus specific for spell
|
||||
switch(m_spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
switch(m_spellInfo->Id) // for spells with divided damage to targets
|
||||
{
|
||||
case 66765: case 67333: // Meteor Fists
|
||||
{
|
||||
uint32 count = 0;
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if(ihit->effectMask & (1<<eff_idx))
|
||||
++count;
|
||||
|
||||
totalDamagePercentMod /= float(count); // divide to all targets
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// Devastate bonus and sunder armor refresh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue