Skip to content

Commit

Permalink
[9865] Add support split damage for spells 66765, 67333.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also small cleanup in mangos_spell_check.sql
  • Loading branch information
Insider42 authored and VladimirMangos committed May 11, 2010
1 parent 3793bb1 commit 00db96b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
8 changes: 2 additions & 6 deletions sql/mangos_spell_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas
(24532,-1, -1, -1, -1, -1, -1, 30, -1,-1,'Burst of Energy', 'Spell::EffectEnergize'),
(24571,-1, -1, -1, -1, -1, -1, 30, -1,-1,'Blood Fury', 'Spell::EffectEnergize'),
(24575,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Brittle Armor', 'Spell::EffectTriggerSpell'),
(24950,-1, -1, -1, -1, -1, -1, 24, -1,-1,'Create Warsong Mark of Honor (Loser)','Spell::DoCreateItem'),
(24951,-1, -1, -1, -1, -1, -1, 24, -1,-1,'Create Warsong Mark of Honor (WInner)','Spell::DoCreateItem'),
(24952,-1, -1, -1, -1, -1, -1, 24, -1,-1,'Arathi Basin Mark of Honor (Loser)', 'Spell::DoCreateItem'),
(24953,-1, -1, -1, -1, -1, -1, 24, -1,-1,'Arathi Basin Mark of Honor (Winner)','Spell::DoCreateItem'),
(24954,-1, -1, -1, -1, -1, -1, 24, -1,-1,'Alterac Valley Mark of Honor (Loser)','Spell::DoCreateItem'),
(24955,-1, -1, -1, -1, -1, -1, 24, -1,-1,'Alterac Valley Mark of Honor (Winner)','Spell::DoCreateItem'),
(25535,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Fire Nova', 'Spell::EffectDummy'),
(25537,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Fire Nova', 'Spell::EffectDummy'),
(25546,11, -1, -1, 33, -1, -1, 3, -1,-1,'Fire Nova', 'Spell::EffectDummy'),
Expand Down Expand Up @@ -448,10 +442,12 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas
(63375,-1, -1, -1, -1, -1, -1, 30, -1,-1,'Improved Stormstrike', 'Spell::EffectEnergize'),
(64422, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor Slash', 'Spell::EffectSchoolDMG'),
(64688, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Meteor Slash', 'Spell::EffectSchoolDMG'),
(66765,-1, -1, -1, -1, -1, -1, 31, -1,-1,'Meteor Fists', 'Spell::EffectWeaponDmg'),
(67016,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Flask of the North', 'Spell::EffectDummy'),
(67017,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Flask of the North', 'Spell::EffectDummy'),
(67018,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Flask of the North', 'Spell::EffectDummy'),
(67019,-1, -1, -1, -1, -1, -1, 3, -1,-1,'Flask of the North', 'Spell::EffectDummy'),
(67333,-1, -1, -1, -1, -1, -1, 31, -1,-1,'Meteor Fists', 'Spell::EffectWeaponDmg'),
(67485, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Hand of Rekoning', 'Spell::EffectSchoolDMG'),
(68082,-1, -1, -1, -1, -1, -1, 30, -1,-1,'Glyph of Seal of Command', 'Spell::EffectEnergize'),
(70492, 0, -1, -1, -1, -1, -1, 2, -1,-1,'Ooze Eruption', 'Spell::EffectSchoolDMG'),
Expand Down
17 changes: 17 additions & 0 deletions src/game/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9864"
#define REVISION_NR "9865"
#endif // __REVISION_NR_H__

0 comments on commit 00db96b

Please sign in to comment.