Changeset 173 for trunk/src/game/Spell.h

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

[svn] * Avoid access to bag item prototype for getting bag size, use related item update field instead as more fast source.
* Better check client inventory pos data received in some client packets to skip invalid cases.
* Removed some unnecessary database queries.
* Make guid lookup for adding ignore async.
* Added two parameter versions of the AsyncQuery? function
* Make queries for adding friends async. - Hunuza
* Replace some PQuery() calls with more simple Query() - Hunuza
* Mark spell as executed instead of deleteable to solve crash.
*** Source mangos.

**Its a big commit. so test with care... or without care.... whatever floats your boat.

Original author: KingPin?
Date: 2008-11-05 20:10:19-06:00

Files:
1 modified

Legend:

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

    r145 r173  
    397397        bool IsRangedAttackResetSpell() const { return !m_IsTriggeredSpell && IsRangedSpell() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); } 
    398398 
    399         bool IsDeletable() const { return m_deletable; } 
    400         void SetDeletable(bool deletable) { m_deletable = deletable; } 
     399        bool IsDeletable() const { return !m_referencedFromCurrentSpell && !m_executedCurrently; } 
     400        void SetReferencedFromCurrent(bool yes) { m_referencedFromCurrentSpell = yes; } 
     401        void SetExecutedCurrently(bool yes) { m_executedCurrently = yes; } 
    401402        uint64 GetDelayStart() const { return m_delayStart; } 
    402403        void SetDelayStart(uint64 m_time) { m_delayStart = m_time; } 
     
    450451 
    451452        // These vars are used in both delayed spell system and modified immediate spell system 
    452         bool m_deletable;                                   // is the spell pending deletion or must be updated till permitted to delete? 
     453        bool m_referencedFromCurrentSpell;                  // mark as references to prevent deleted and access by dead pointers 
     454        bool m_executedCurrently;                           // mark as executed to prevent deleted and access by dead pointers 
    453455        bool m_needSpellLog;                                // need to send spell log? 
    454456        uint8 m_applyMultiplierMask;                        // by effect: damage multiplier needed? 
     
    657659        virtual bool Execute(uint64 e_time, uint32 p_time); 
    658660        virtual void Abort(uint64 e_time); 
     661        virtual bool IsDeletable() const; 
    659662    protected: 
    660663        Spell* m_Spell;