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

[svn] Fix a compile error about M_PI_2.
Update Felmyst script to test new setActive function.
Fix the bug that priest's fear is unbreakable (dirty hack before find the correct way).
(some unfinished unused content included, just ignore them, will finish them later)

Original author: megamage
Date: 2008-10-27 10:57:53-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/SpellMgr.h

    r110 r122  
    635635} 
    636636 
    637 enum SpellExtraInfoType 
    638 { 
    639     SPELL_EXTRA_INFO_MAX_TARGETS, 
    640     SPELL_EXTRA_INFO_CONE_TYPE, 
    641     SPELL_EXTRA_INFO_SHARE_DAMAGE 
    642 }; 
    643  
    644 struct SpellExtraInfo 
    645 { 
    646     uint32 info[3]; 
    647 }; 
    648  
    649 typedef std::map<uint32, SpellExtraInfo> SpellExtraInfoMap; 
     637enum SpellExtraAttributeType 
     638{ 
     639    SPELL_EXTRA_ATTR_MAX_TARGETS, 
     640    SPELL_EXTRA_ATTR_CONE_TYPE, 
     641    SPELL_EXTRA_ATTR_SHARE_DAMAGE 
     642}; 
     643 
     644struct SpellExtraAttribute 
     645{ 
     646    uint32 attr[3]; 
     647}; 
     648 
     649typedef std::map<uint32, SpellExtraAttribute> SpellExtraAttrMap; 
     650 
     651typedef std::map<int32, int32> SpellLinkedMap; 
    650652 
    651653class SpellMgr 
     
    847849        } 
    848850 
    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]; 
     851        uint32 GetSpellExtraAttr(uint32 spell_id, uint32 type) const 
     852        { 
     853            SpellExtraAttrMap::const_iterator itr = mSpellExtraAttrMap.find(spell_id); 
     854            if(itr != mSpellExtraAttrMap.end()) 
     855                return itr->second.attr[type]; 
     856            else 
     857                return 0; 
     858        } 
     859 
     860        int32 GetSpellLinked(int32 spell_id) const 
     861        { 
     862            SpellLinkedMap::const_iterator itr = mSpellLinkedMap.find(spell_id); 
     863            if(itr != mSpellLinkedMap.end()) 
     864                return itr->second; 
    854865            else 
    855866                return 0; 
     
    872883        void LoadSkillLineAbilityMap(); 
    873884        void LoadSpellPetAuras(); 
    874         void LoadSpellExtraInfo(); 
     885        void LoadSpellExtraAttr(); 
     886        void LoadSpellLinked(); 
    875887 
    876888    private: 
     
    886898        SkillLineAbilityMap mSkillLineAbilityMap; 
    887899        SpellPetAuraMap     mSpellPetAuraMap; 
    888         SpellExtraInfoMap   mSpellExtraInfoMap; 
     900        SpellExtraAttrMap   mSpellExtraAttrMap; 
     901        SpellLinkedMap      mSpellLinkedMap; 
    889902}; 
    890903