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

[svn] Fix: DOT and HOT only proc effects when hit, but not on every tick (I know there is a proc flag patch, but this is a very quick fix).
Change the structure of customattrmap. Use bit flag instead of uint32 for every attribute.

Original author: megamage
Date: 2008-11-08 11:26:44-06:00

Files:
1 modified

Legend:

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

    r157 r196  
    635635} 
    636636 
    637 enum SpellExtraAttributeType 
    638 { 
    639     SPELL_EXTRA_ATTR_MAX_TARGETS, 
    640     SPELL_EXTRA_ATTR_CONE_TYPE, 
    641     SPELL_EXTRA_ATTR_SHARE_DAMAGE 
    642 }; 
    643  
    644 struct SpellExtraAttribute 
    645 { 
    646     uint32 attr[3]; 
    647 }; 
    648  
    649 typedef std::map<uint32, SpellExtraAttribute> SpellExtraAttrMap; 
     637#define SPELL_ATTR_CU_PLAYERS_ONLY      0x00000001 
     638#define SPELL_ATTR_CU_CONE_BACK         0x00000002 
     639#define SPELL_ATTR_CU_CONE_LINE         0x00000004 
     640#define SPELL_ATTR_CU_SHARE_DAMAGE      0x00000008 
     641#define SPELL_ATTR_CU_EFFECT_HEAL       0x00000010 
     642#define SPELL_ATTR_CU_EFFECT_DAMAGE     0x00000020 
     643 
     644typedef std::map<uint32, uint32> SpellCustomAttrMap; 
    650645 
    651646typedef std::map<int32, std::vector<int32> > SpellLinkedMap; 
     
    849844        } 
    850845 
    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]; 
     846        uint32 GetSpellCustomAttr(uint32 spell_id) const 
     847        { 
     848            SpellCustomAttrMap::const_iterator itr = mSpellCustomAttrMap.find(spell_id); 
     849            if(itr != mSpellCustomAttrMap.end()) 
     850                return itr->second; 
    856851            else 
    857852                return 0; 
     
    880875        void LoadSkillLineAbilityMap(); 
    881876        void LoadSpellPetAuras(); 
    882         void LoadSpellExtraAttr(); 
     877        void LoadSpellCustomAttr(); 
    883878        void LoadSpellLinked(); 
    884879 
     
    895890        SkillLineAbilityMap mSkillLineAbilityMap; 
    896891        SpellPetAuraMap     mSpellPetAuraMap; 
    897         SpellExtraAttrMap   mSpellExtraAttrMap; 
     892        SpellCustomAttrMap  mSpellCustomAttrMap; 
    898893        SpellLinkedMap      mSpellLinkedMap; 
    899894};