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

[svn] *** Source: MaNGOS ***
* Fixed build extractor at Windows Vista. Author: Vladimir
* Fixed comment text and code indentifiers spelling. Author: Vladimir & Paradox.
* Access cached member lists in guild handlers instead of querying the DB. Author: Hunuza
* Small fixes in send/received packet and simple code cleanup also. Author: Vladimir
* Not output error at loading empty character_ticket table. Author: Vladimir
* Not reset display model at shapeshift aura remove if it not set at apply. Author: Arthorius
* Applied props to few files.

Original author: visagalis
Date: 2008-11-14 16:28:45-06:00

Files:
1 modified

Legend:

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

    r213 r229  
    216216    &Aura::HandleShieldBlockValue,                          //158 SPELL_AURA_MOD_SHIELD_BLOCKVALUE 
    217217    &Aura::HandleNoImmediateEffect,                         //159 SPELL_AURA_NO_PVP_CREDIT      only for Honorless Target spell 
    218     &Aura::HandleNoImmediateEffect,                         //160 SPELL_AURA_MOD_AOE_AVOIDANCE                 implemended in Unit::MagicSpellHitResult 
     218    &Aura::HandleNoImmediateEffect,                         //160 SPELL_AURA_MOD_AOE_AVOIDANCE                 implemented in Unit::MagicSpellHitResult 
    219219    &Aura::HandleNoImmediateEffect,                         //161 SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT 
    220220    &Aura::HandleAuraPowerBurn,                             //162 SPELL_AURA_POWER_BURN_MANA 
     
    230230    &Aura::HandleAuraModIncreaseMountedSpeed,               //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK 
    231231    &Aura::HandleUnused,                                    //173 SPELL_AURA_ALLOW_CHAMPION_SPELLS  only for Proclaim Champion spell 
    232     &Aura::HandleModSpellDamagePercentFromStat,             //174 SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT  implemented in Unit::SpellBaseDamageBonus (by defeult intelect, dependent from SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT) 
     232    &Aura::HandleModSpellDamagePercentFromStat,             //174 SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT  implemented in Unit::SpellBaseDamageBonus (by default intellect, dependent from SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT) 
    233233    &Aura::HandleModSpellHealingPercentFromStat,            //175 SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT implemented in Unit::SpellBaseHealingBonus 
    234234    &Aura::HandleSpiritOfRedemption,                        //176 SPELL_AURA_SPIRIT_OF_REDEMPTION   only for Spirit of Redemption spell, die at aura end 
     
    243243    &Aura::HandleNoImmediateEffect,                         //185 SPELL_AURA_MOD_ATTACKER_RANGED_HIT_CHANCE implemented in Unit::RollMeleeOutcomeAgainst 
    244244    &Aura::HandleNoImmediateEffect,                         //186 SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE  implemented in Unit::MagicSpellHitResult 
    245     &Aura::HandleNoImmediateEffect,                         //187 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE  implemended in Unit::GetUnitCriticalChance 
     245    &Aura::HandleNoImmediateEffect,                         //187 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE  implemented in Unit::GetUnitCriticalChance 
    246246    &Aura::HandleNoImmediateEffect,                         //188 SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_CHANCE implemented in Unit::GetUnitCriticalChance 
    247247    &Aura::HandleModRating,                                 //189 SPELL_AURA_MOD_RATING 
     
    10551055        } 
    10561056    } 
    1057     else if(sameaura)                                       // decrease count for spell, only for same aura effect, or this spell auras in remove proccess. 
     1057    else if(sameaura)                                       // decrease count for spell, only for same aura effect, or this spell auras in remove process. 
    10581058        UpdateSlotCounterAndDuration(false); 
    10591059} 
     
    12051205    uint64 originalCasterGUID = GetCasterGUID(); 
    12061206 
    1207     SpellEntry const *triggredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); 
     1207    SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); 
    12081208    SpellEntry const *auraSpellInfo = GetSpellProto(); 
    12091209    uint32 auraId = auraSpellInfo->Id; 
    12101210 
    12111211    // specific code for cases with no trigger spell provided in field 
    1212     if (triggredSpellInfo == NULL) 
     1212    if (triggeredSpellInfo == NULL) 
    12131213    { 
    12141214        switch(auraSpellInfo->SpellFamilyName) 
     
    12181218                switch(auraId) 
    12191219                { 
    1220                     // Firestone Passive (1-5 rangs) 
     1220                    // Firestone Passive (1-5 ranks) 
    12211221                    case 758: 
    12221222                    case 17945: 
     
    12521252//                    // Polymorphic Ray 
    12531253//                    case 6965: break; 
    1254 //                    // Fire Nova (1-7 Rangs) 
     1254//                    // Fire Nova (1-7 ranks) 
    12551255//                    case 8350: 
    12561256//                    case 8508: 
     
    18241824        } 
    18251825        // Reget trigger spell proto 
    1826         triggredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); 
    1827         if(triggredSpellInfo == NULL) 
     1826        triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); 
     1827        if(triggeredSpellInfo == NULL) 
    18281828        { 
    18291829            sLog.outError("Aura::TriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",GetId(),GetEffIndex()); 
     
    18331833    else 
    18341834    { 
    1835         // Spell exist but require costum code 
     1835        // Spell exist but require custom code 
    18361836        switch(auraId) 
    18371837        { 
     
    18431843                // 1) target show casting at each triggered cast: target don't must show casting animation for any triggered spell 
    18441844                //      but must show affect apply like item casting 
    1845                 // 2) maybe aura must be replace by new with accumulative stat mods insteed stacking 
     1845                // 2) maybe aura must be replace by new with accumulative stat mods instead stacking 
    18461846 
    18471847                // prevent cast by triggered auras 
     
    18501850 
    18511851                // stop triggering after each affected stats lost > 90 
    1852                 int32 intelectLoss = 0; 
     1852                int32 intellectLoss = 0; 
    18531853                int32 spiritLoss = 0; 
    18541854 
     
    18601860                        switch((*i)->GetModifier()->m_miscvalue) 
    18611861                        { 
    1862                             case STAT_INTELLECT: intelectLoss += (*i)->GetModifier()->m_amount; break; 
     1862                            case STAT_INTELLECT: intellectLoss += (*i)->GetModifier()->m_amount; break; 
    18631863                            case STAT_SPIRIT:    spiritLoss   += (*i)->GetModifier()->m_amount; break; 
    18641864                            default: break; 
     
    18671867                } 
    18681868 
    1869                 if(intelectLoss <= -90 && spiritLoss <= -90) 
     1869                if(intellectLoss <= -90 && spiritLoss <= -90) 
    18701870                    return; 
    18711871 
     
    18821882        } 
    18831883    } 
    1884     m_target->CastSpell(target, triggredSpellInfo, true, 0, this, originalCasterGUID); 
     1884    m_target->CastSpell(target, triggeredSpellInfo, true, 0, this, originalCasterGUID); 
    18851885    /*// All ok cast by default case 
    1886     Spell *spell = new Spell(m_target, triggredSpellInfo, true, originalCasterGUID ); 
     1886    Spell *spell = new Spell(m_target, triggeredSpellInfo, true, originalCasterGUID ); 
    18871887 
    18881888    SpellCastTargets targets; 
     
    20092009        if(GetId()==45934) 
    20102010        { 
    2011             // Kill target if dispeled 
     2011            // Kill target if dispelled 
    20122012            if (m_removeMode==AURA_REMOVE_BY_DISPEL) 
    20132013                m_target->DealDamage(m_target, m_target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); 
     
    25662566    else 
    25672567    { 
    2568         m_target->SetDisplayId(m_target->GetNativeDisplayId()); 
     2568        if(modelid > 0) 
     2569            m_target->SetDisplayId(m_target->GetNativeDisplayId()); 
    25692570        m_target->SetByteValue(UNIT_FIELD_BYTES_2, 3, FORM_NONE); 
    25702571        if(m_target->getClass() == CLASS_DRUID) 
     
    27172718            for(Unit::AuraList::const_iterator i = otherTransforms.begin();i != otherTransforms.end(); ++i) 
    27182719            { 
    2719                 // negative auras are prefered 
     2720                // negative auras are preferred 
    27202721                if(!IsPositiveSpell((*i)->GetSpellProto()->Id)) 
    27212722                { 
     
    31173118        return; 
    31183119 
    3119     // main-hand attack speed already set to special value for feral form already and don't must chnage and reset at remove. 
     3120    // main-hand attack speed already set to special value for feral form already and don't must change and reset at remove. 
    31203121    if (((Player *)m_target)->IsInFeralForm()) 
    31213122        return; 
     
    34393440            { 
    34403441                uint32 state = currentSpell->getState(); 
    3441                 // Stop spells on prepere or casting state 
     3442                // Stop spells on prepare or casting state 
    34423443                if ( state == SPELL_STATE_PREPARING || state == SPELL_STATE_CASTING ) 
    34433444                { 
     
    40124013                    float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE); 
    40134014                    float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE); 
    4014                     // WARNING! in 3.0 multipler 0.00743f change to 0.6 
     4015                    // WARNING! in 3.0 multiplier 0.00743f change to 0.6 
    40154016                    m_modifier.m_amount+=int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.00743f); 
    40164017                } 
     
    40404041            if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL) 
    40414042            { 
    4042                 // $AP * min(0.06*$cp, 0.24)/6 [Yes, there is no difference, wheather 4 or 5 CPs are being used] 
     4043                // $AP * min(0.06*$cp, 0.24)/6 [Yes, there is no difference, whether 4 or 5 CPs are being used] 
    40434044                if (apply && !loading && caster && caster->GetTypeId() == TYPEID_PLAYER) 
    40444045                { 
     
    40934094            if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL) 
    40944095            { 
    4095                 // Dmg/tick = $AP*min(0.01*$cp, 0.03) [Like Rip: only the first three CP inrease the contribution from AP] 
     4096                // Dmg/tick = $AP*min(0.01*$cp, 0.03) [Like Rip: only the first three CP increase the contribution from AP] 
    40964097                if (apply && !loading && caster && caster->GetTypeId() == TYPEID_PLAYER) 
    40974098                { 
     
    44234424    if(m_modifier.m_miscvalue != SPELL_SCHOOL_MASK_NORMAL) 
    44244425    { 
    4425         // support required adding replace UpdateArmor by loop by UpdateResistence at intelect update 
     4426        // support required adding replace UpdateArmor by loop by UpdateResistence at intellect update 
    44264427        // and include in UpdateResistence same code as in UpdateArmor for aura mod apply. 
    4427         sLog.outError("Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) need adding support for non-armor resistences!"); 
     4428        sLog.outError("Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) need adding support for non-armor resistances!"); 
    44284429        return; 
    44294430    } 
     
    48884889    { 
    48894890        // support required adding UpdateAttackPowerAndDamage calls at stat update 
    4890         sLog.outError("Aura SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT (212) need support non-intelect stats!"); 
     4891        sLog.outError("Aura SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT (212) need support non-intellect stats!"); 
    48914892        return; 
    48924893    }