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

[svn] Remove isVisible function. Check stealth and invisible in canAttack();
Use new remove aura by interrupt flag function.

Original author: megamage
Date: 2008-11-07 09:36:46-06:00

Files:
1 modified

Legend:

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

    r185 r186  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    10061006            { 
    10071007                //do not remove feign death 
    1008                 unit->RemoveInterruptableAura(AURA_INTERRUPT_FLAG_STEALTH + AURA_INTERRUPT_FLAG_DAMAGE); 
     1008                unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_STEALTH + AURA_INTERRUPT_FLAG_DAMAGE); 
    10091009            } 
    10101010        } 
     
    21482148    if ( !m_IsTriggeredSpell && isSpellBreakStealth(m_spellInfo) ) 
    21492149    { 
    2150         m_caster->RemoveInterruptableAura(AURA_INTERRUPT_FLAG_STEALTH); 
     2150        m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_STEALTH); 
    21512151    } 
    21522152 
     
    22072207{ 
    22082208    SetExecutedCurrently(true); 
    2209      
     2209 
    22102210    uint8 castResult = 0; 
    22112211 
     
    23222322        handle_immediate(); 
    23232323    } 
    2324      
     2324 
    23252325    SetExecutedCurrently(false); 
    23262326} 
     
    30833083    WorldObject* target = NULL; 
    30843084 
    3085     // select first not rsusted target from target list for _0_ effect 
     3085    // select first not resisted target from target list for _0_ effect 
    30863086    if(!m_UniqueTargetInfo.empty()) 
    30873087    { 
     
    33413341    for(TriggerSpells::iterator si=m_TriggerSpells.begin(); si!=m_TriggerSpells.end(); ++si) 
    33423342    { 
    3343         Spell* spell = new Spell(m_caster, (*si), true, m_originalCasterGUID, this->m_selfContainer); 
     3343        Spell* spell = new Spell(m_caster, (*si), true, m_originalCasterGUID, m_selfContainer); 
    33443344        spell->prepare(&m_targets);                         // use original spell original targets 
    33453345    } 
     
    33983398        if(m_spellInfo->TargetAuraStateNot && target->HasAuraState(AuraState(m_spellInfo->TargetAuraStateNot))) 
    33993399            return SPELL_FAILED_TARGET_AURASTATE; 
    3400  
    34013400 
    34023401        if(target != m_caster) 
     
    40774076        return SPELL_FAILED_CASTER_DEAD; 
    40784077 
    4079     if(m_caster->IsNonMeleeSpellCasted(false))              //prevent spellcast interuption by another spellcast 
     4078    if(m_caster->IsNonMeleeSpellCasted(false))              //prevent spellcast interruption by another spellcast 
    40804079        return SPELL_FAILED_SPELL_IN_PROGRESS; 
    40814080    if(m_caster->isInCombat() && IsNonCombatSpell(m_spellInfo)) 
     
    41694168                dispel_immune |= GetDispellMask(DispelType(m_spellInfo->EffectMiscValue[i])); 
    41704169        } 
    4171         //immune movement impairement and loss of control 
     4170        //immune movement impairment and loss of control 
    41724171        if(m_spellInfo->Id==(uint32)42292) 
    41734172            mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK; 
     
    46514650 
    46524651                uint32 item_quality = itemProto->Quality; 
    4653                 // 2.0.x addon: Check player enchanting level agains the item desenchanting requirements 
     4652                // 2.0.x addon: Check player enchanting level against the item disenchanting requirements 
    46544653                uint32 item_disenchantskilllevel = itemProto->RequiredDisenchantSkill; 
    46554654                if (item_disenchantskilllevel == uint32(-1))