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

[svn] Implement a new table (spell_disabled) to allow disabling some spells for players and / or creatures. To disable a spell for a players and pets, set 20 in the disable_mask, to disable for creatures, set 21. The comment field is optional. Original patch provided by Craker.

Original author: w12x
Date: 2008-10-21 03:58:38-05:00

Files:
1 modified

Legend:

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

    r79 r85  
    690690        static bool CheckDeclinedNames(std::wstring mainpart, DeclinedName const& names); 
    691691 
     692        void LoadSpellDisabledEntrys(); 
     693        bool IsPlayerSpellDisabled(uint32 spellid) { return (m_DisabledPlayerSpells.count(spellid) != 0); } 
     694        bool IsCreatureSpellDisabled(uint32 spellid) { return (m_DisabledCreatureSpells.count(spellid) != 0); } 
     695 
    692696        int GetIndexForLocale(LocaleConstant loc); 
    693697        LocaleConstant GetLocaleForIndex(int i); 
     
    798802        typedef std::set<std::string> ReservedNamesMap; 
    799803        ReservedNamesMap    m_ReservedNames; 
     804 
     805        std::set<uint32>    m_DisabledPlayerSpells; 
     806        std::set<uint32>    m_DisabledCreatureSpells; 
    800807 
    801808        GraveYardMap        mGraveYardMap;