Show
Ignore:
Timestamp:
11/19/08 13:36:54 (17 years ago)
Author:
yumileroy
Message:

[svn] Add SpellExtraInfoMap?. Currently support:
Limited-number-of-players spell; shared damage spell; target-in-line cone spell (e.g. dark glare).
Change angle of cone spells from 120 degree to 60 degree.

Original author: megamage
Date: 2008-10-25 15:46:52-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/SpellEffects.cpp

    r106 r110  
    312312                } 
    313313 
     314                // Meteor like spells (divided damage to targets) 
     315                if(spellmgr.GetSpellExtraInfo(m_spellInfo->Id, SPELL_EXTRA_INFO_SHARE_DAMAGE)) 
     316                { 
     317                    uint32 count = 0; 
     318                    for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit) 
     319                        if(ihit->effectMask & (1<<effect_idx)) 
     320                            ++count; 
     321 
     322                    damage /= count;                    // divide to all targets 
     323                } 
     324 
    314325                switch(m_spellInfo->Id)                     // better way to check unknown 
    315326                { 
    316                     // Meteor like spells (divided damage to targets) 
    317                     case 24340: case 26558: case 28884:     // Meteor 
    318                     case 36837: case 38903: case 41276:     // Meteor 
    319                     case 26789:                             // Shard of the Fallen Star 
    320                     case 31436:                             // Malevolent Cleave 
    321                     case 35181:                             // Dive Bomb 
    322                     case 40810: case 43267: case 43268:     // Saber Lash 
    323                     case 42384:                             // Brutal Swipe 
    324                     case 45150:                             // Meteor Slash 
    325                     { 
    326                         uint32 count = 0; 
    327                         for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit) 
    328                             if(ihit->effectMask & (1<<effect_idx)) 
    329                                 ++count; 
    330  
    331                         damage /= count;                    // divide to all targets 
    332                         break; 
    333                     } 
    334327                    // percent from health with min 
    335328                    case 25599:                             // Thundercrash