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

*Merge from Mangos
*[6833] More correct aura cancel for channeled spells. By VladimirMangos?.
*[6820] Cleanup spell proc event code. Avoid send same information by 2 ways to function. By VladimirMangos?.

Original author: megamage
Date: 2008-11-17 19:39:24-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/SpellHandler.cpp

    r233 r251  
    378378        return; 
    379379 
     380    // channeled spell case (it currently casted then) 
     381    if(IsChanneledSpell(spellInfo)) 
     382    { 
     383        if(Spell* spell = _player->m_currentSpells[CURRENT_CHANNELED_SPELL]) 
     384        { 
     385            if(spell->m_spellInfo->Id==spellId) 
     386            { 
     387                spell->cancel(); 
     388                spell->SetReferencedFromCurrent(false); 
     389                _player->m_currentSpells[CURRENT_CHANNELED_SPELL] = NULL; 
     390            } 
     391        } 
     392        return; 
     393    } 
     394 
     395    // non channeled case 
    380396    _player->RemoveAurasDueToSpellByCancel(spellId); 
    381  
    382     if (spellId == 2584)                                    // Waiting to resurrect spell cancel, we must remove player from resurrect queue 
    383     { 
    384         BattleGround *bg = _player->GetBattleGround(); 
    385         if(!bg) 
    386             return; 
    387         bg->RemovePlayerFromResurrectQueue(_player->GetGUID()); 
    388     } 
    389397} 
    390398