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/SpellMgr.h

    r102 r110  
    635635} 
    636636 
     637enum SpellExtraInfoType 
     638{ 
     639    SPELL_EXTRA_INFO_MAX_TARGETS, 
     640    SPELL_EXTRA_INFO_CONE_TYPE, 
     641    SPELL_EXTRA_INFO_SHARE_DAMAGE 
     642}; 
     643 
     644struct SpellExtraInfo 
     645{ 
     646    uint32 info[3]; 
     647}; 
     648 
     649typedef std::map<uint32, SpellExtraInfo> SpellExtraInfoMap; 
     650 
    637651class SpellMgr 
    638652{ 
     
    831845            else 
    832846                return NULL; 
     847        } 
     848 
     849        uint32 GetSpellExtraInfo(uint32 spell_id, uint32 type) const 
     850        { 
     851            SpellExtraInfoMap::const_iterator itr = mSpellExtraInfoMap.find(spell_id); 
     852            if(itr != mSpellExtraInfoMap.end()) 
     853                return itr->second.info[type]; 
     854            else 
     855                return 0; 
    833856        } 
    834857 
     
    849872        void LoadSkillLineAbilityMap(); 
    850873        void LoadSpellPetAuras(); 
     874        void LoadSpellExtraInfo(); 
    851875 
    852876    private: 
     
    862886        SkillLineAbilityMap mSkillLineAbilityMap; 
    863887        SpellPetAuraMap     mSpellPetAuraMap; 
     888        SpellExtraInfoMap   mSpellExtraInfoMap; 
    864889}; 
    865890