[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. --HG-- branch : trunk
This commit is contained in:
+6
-3
@@ -396,8 +396,9 @@ class Spell
|
||||
bool IsMeleeAttackResetSpell() const { return !m_IsTriggeredSpell && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
|
||||
bool IsRangedAttackResetSpell() const { return !m_IsTriggeredSpell && IsRangedSpell() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
|
||||
|
||||
bool IsDeletable() const { return m_deletable; }
|
||||
void SetDeletable(bool deletable) { m_deletable = deletable; }
|
||||
bool IsDeletable() const { return !m_referencedFromCurrentSpell && !m_executedCurrently; }
|
||||
void SetReferencedFromCurrent(bool yes) { m_referencedFromCurrentSpell = yes; }
|
||||
void SetExecutedCurrently(bool yes) { m_executedCurrently = yes; }
|
||||
uint64 GetDelayStart() const { return m_delayStart; }
|
||||
void SetDelayStart(uint64 m_time) { m_delayStart = m_time; }
|
||||
uint64 GetDelayMoment() const { return m_delayMoment; }
|
||||
@@ -449,7 +450,8 @@ class Spell
|
||||
bool m_immediateHandled; // were immediate actions handled? (used by delayed spells only)
|
||||
|
||||
// These vars are used in both delayed spell system and modified immediate spell system
|
||||
bool m_deletable; // is the spell pending deletion or must be updated till permitted to delete?
|
||||
bool m_referencedFromCurrentSpell; // mark as references to prevent deleted and access by dead pointers
|
||||
bool m_executedCurrently; // mark as executed to prevent deleted and access by dead pointers
|
||||
bool m_needSpellLog; // need to send spell log?
|
||||
uint8 m_applyMultiplierMask; // by effect: damage multiplier needed?
|
||||
float m_damageMultipliers[3]; // by effect: damage multiplier
|
||||
@@ -656,6 +658,7 @@ class SpellEvent : public BasicEvent
|
||||
|
||||
virtual bool Execute(uint64 e_time, uint32 p_time);
|
||||
virtual void Abort(uint64 e_time);
|
||||
virtual bool IsDeletable() const;
|
||||
protected:
|
||||
Spell* m_Spell;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user