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.cpp

    r168 r173  
    288288    m_magnetPair.first = false; 
    289289    m_magnetPair.second = NULL; 
    290     m_deletable = true; 
     290    m_referencedFromCurrentSpell = false; 
     291    m_executedCurrently = false; 
    291292    m_delayAtDamageCount = 0; 
    292293 
     
    22022203void Spell::cast(bool skipCheck) 
    22032204{ 
     2205    SetExecutedCurrently(true); 
     2206     
    22042207    uint8 castResult = 0; 
    22052208 
     
    22112214    { 
    22122215        cancel(); 
     2216        SetExecutedCurrently(false); 
    22132217        return; 
    22142218    } 
     
    22222226        SendCastResult(castResult); 
    22232227        finish(false); 
     2228        SetExecutedCurrently(false); 
    22242229        return; 
    22252230    } 
     
    22332238            SendCastResult(castResult); 
    22342239            finish(false); 
     2240            SetExecutedCurrently(false); 
    22352241            return; 
    22362242        } 
     
    22782284 
    22792285    if(m_spellState == SPELL_STATE_FINISHED)                // stop cast if spell marked as finish somewhere in Take*/FillTargetMap 
    2280         return; 
     2286    { 
     2287        SetExecutedCurrently(false); 
     2288        return; 
     2289    } 
    22812290 
    22822291    SendCastResult(castResult); 
     
    23102319        handle_immediate(); 
    23112320    } 
     2321     
     2322    SetExecutedCurrently(false); 
    23122323} 
    23132324 
     
    51275138        m_Spell->cancel(); 
    51285139} 
     5140 
     5141bool SpellEvent::IsDeletable() const 
     5142{ 
     5143    return m_Spell->IsDeletable(); 
     5144}