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

*Merge from Mangos. Add MapReference?. Author: hunuza.
*Also re-commit the patches reverted in 255.

Original author: megamage
Date: 2008-11-18 19:40:06-06:00

Files:
1 modified

Legend:

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

    r252 r257  
    171171    &Aura::HandleNoImmediateEffect,                         //113 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN implemented in Unit::MeleeDamageBonus 
    172172    &Aura::HandleNoImmediateEffect,                         //114 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT implemented in Unit::MeleeDamageBonus 
    173     &Aura::HandleAuraHealing,                               //115 SPELL_AURA_MOD_HEALING 
     173    &Aura::HandleNoImmediateEffect,                         //115 SPELL_AURA_MOD_HEALING                 implemented in Unit::SpellBaseHealingBonusForVictim 
    174174    &Aura::HandleNoImmediateEffect,                         //116 SPELL_AURA_MOD_REGEN_DURING_COMBAT 
    175175    &Aura::HandleNoImmediateEffect,                         //117 SPELL_AURA_MOD_MECHANIC_RESISTANCE     implemented in Unit::MagicSpellHitResult 
    176     &Aura::HandleAuraHealingPct,                            //118 SPELL_AURA_MOD_HEALING_PCT 
     176    &Aura::HandleNoImmediateEffect,                         //118 SPELL_AURA_MOD_HEALING_PCT             implemented in Unit::SpellHealingBonus 
    177177    &Aura::HandleUnused,                                    //119 SPELL_AURA_SHARE_PET_TRACKING useless 
    178178    &Aura::HandleAuraUntrackable,                           //120 SPELL_AURA_UNTRACKABLE 
     
    192192    &Aura::HandleAuraModRegenInterrupt,                     //134 SPELL_AURA_MOD_MANA_REGEN_INTERRUPT 
    193193    &Aura::HandleModHealingDone,                            //135 SPELL_AURA_MOD_HEALING_DONE 
    194     &Aura::HandleAuraHealingPct,                            //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT   implemented in Unit::SpellHealingBonus 
     194    &Aura::HandleNoImmediateEffect,                         //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT   implemented in Unit::SpellHealingBonus 
    195195    &Aura::HandleModTotalPercentStat,                       //137 SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE 
    196196    &Aura::HandleHaste,                                     //138 SPELL_AURA_MOD_HASTE 
     
    221221    &Aura::HandleNoImmediateEffect,                         //163 SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE 
    222222    &Aura::HandleUnused,                                    //164 useless, only one test spell 
    223     &Aura::HandleAuraAttackPowerAttacker,                   //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus 
     223    &Aura::HandleNoImmediateEffect,                         //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus 
    224224    &Aura::HandleAuraModAttackPowerPercent,                 //166 SPELL_AURA_MOD_ATTACK_POWER_PCT 
    225225    &Aura::HandleAuraModRangedAttackPowerPercent,           //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT 
     
    20002000        } 
    20012001 
     2002        // Waiting to Resurrect 
     2003        if(GetId()==2584) 
     2004        { 
     2005            // Waiting to resurrect spell cancel, we must remove player from resurrect queue 
     2006            if(m_target->GetTypeId() == TYPEID_PLAYER) 
     2007                if(BattleGround *bg = ((Player*)m_target)->GetBattleGround()) 
     2008                    bg->RemovePlayerFromResurrectQueue(m_target->GetGUID()); 
     2009            return; 
     2010        } 
     2011 
    20022012        // Dark Fiend 
    20032013        if(GetId()==45934) 
     
    22952305void Aura::HandleAuraMounted(bool apply, bool Real) 
    22962306{ 
     2307    // only at real add/remove aura 
     2308    if(!Real) 
     2309        return; 
     2310 
    22972311    if(apply) 
    22982312    { 
     
    26942708            else 
    26952709            { 
    2696                 if (uint32 modelid = ci->GetRandomValidModelId()) m_target->SetDisplayId(modelid); 
     2710                                                            // Will use the default model here 
     2711                if (uint32 modelid = ci->GetRandomValidModelId()) 
     2712                    m_target->SetDisplayId(modelid); 
    26972713 
    26982714                // Dragonmaw Illusion (set mount model also) 
     
    35903606/***                  MODIFY SPEED                     ***/ 
    35913607/*********************************************************/ 
    3592 void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real) 
     3608void Aura::HandleAuraModIncreaseSpeed(bool /*apply*/, bool Real) 
    35933609{ 
    35943610    // all applied/removed only at real aura add/remove 
     
    35993615} 
    36003616 
    3601 void Aura::HandleAuraModIncreaseMountedSpeed(bool apply, bool Real) 
     3617void Aura::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real) 
    36023618{ 
    36033619    // all applied/removed only at real aura add/remove 
     
    36383654} 
    36393655 
    3640 void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real) 
     3656void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real) 
    36413657{ 
    36423658    // all applied/removed only at real aura add/remove 
     
    36473663} 
    36483664 
    3649 void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real) 
     3665void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real) 
    36503666{ 
    36513667    // all applied/removed only at real aura add/remove 
     
    36583674} 
    36593675 
    3660 void Aura::HandleAuraModUseNormalSpeed(bool apply, bool Real) 
     3676void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real) 
    36613677{ 
    36623678    // all applied/removed only at real aura add/remove 
     
    43434359} 
    43444360 
    4345 void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real) 
     4361void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real) 
    43464362{ 
    43474363    if(m_target->GetTypeId() != TYPEID_PLAYER) 
     
    43544370} 
    43554371 
    4356 void Aura::HandleModSpellHealingPercentFromStat(bool apply, bool Real) 
     4372void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real) 
    43574373{ 
    43584374    if(m_target->GetTypeId() != TYPEID_PLAYER) 
     
    43724388} 
    43734389 
    4374 void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real) 
     4390void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real) 
    43754391{ 
    43764392    if(m_target->GetTypeId() != TYPEID_PLAYER) 
     
    43834399} 
    43844400 
    4385 void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real) 
     4401void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real) 
    43864402{ 
    43874403    if(m_target->GetTypeId() != TYPEID_PLAYER) 
     
    43924408} 
    43934409 
    4394 void Aura::HandleModHealingDone(bool apply, bool Real) 
     4410void Aura::HandleModHealingDone(bool /*apply*/, bool Real) 
    43954411{ 
    43964412    if(m_target->GetTypeId() != TYPEID_PLAYER) 
     
    44324448} 
    44334449 
    4434 void Aura::HandleAuraModResistenceOfStatPercent(bool apply, bool Real) 
     4450void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real) 
    44354451{ 
    44364452    if(m_target->GetTypeId() != TYPEID_PLAYER) 
     
    45674583} 
    45684584 
    4569 void Aura::HandleModPowerRegenPCT(bool apply, bool Real) 
     4585void Aura::HandleModPowerRegenPCT(bool /*apply*/, bool Real) 
    45704586{ 
    45714587    // spells required only Real aura add/remove 
     
    45814597} 
    45824598 
    4583 void Aura::HandleModManaRegen(bool apply, bool Real) 
     4599void Aura::HandleModManaRegen(bool /*apply*/, bool Real) 
    45844600{ 
    45854601    // spells required only Real aura add/remove 
     
    46684684/********************************/ 
    46694685 
    4670 void Aura::HandleAuraModParryPercent(bool apply, bool Real) 
     4686void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real) 
    46714687{ 
    46724688    if(m_target->GetTypeId()!=TYPEID_PLAYER) 
     
    46764692} 
    46774693 
    4678 void Aura::HandleAuraModDodgePercent(bool apply, bool Real) 
     4694void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real) 
    46794695{ 
    46804696    if(m_target->GetTypeId()!=TYPEID_PLAYER) 
     
    46854701} 
    46864702 
    4687 void Aura::HandleAuraModBlockPercent(bool apply, bool Real) 
     4703void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real) 
    46884704{ 
    46894705    if(m_target->GetTypeId()!=TYPEID_PLAYER) 
     
    46944710} 
    46954711 
    4696 void Aura::HandleAuraModRegenInterrupt(bool apply, bool Real) 
     4712void Aura::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real) 
    46974713{ 
    46984714    // spells required only Real aura add/remove 
     
    47624778} 
    47634779 
    4764 void Aura::HandleModSpellCritChanceShool(bool apply, bool Real) 
     4780void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real) 
    47654781{ 
    47664782    // spells required only Real aura add/remove 
     
    48424858 
    48434859    m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_modifier.m_amount), apply); 
    4844 } 
    4845  
    4846 void Aura::HandleAuraAttackPowerAttacker(bool apply, bool Real) 
    4847 { 
    4848     // spells required only Real aura add/remove 
    4849     if(!Real) 
    4850         return; 
    4851     Unit *caster = GetCaster(); 
    4852  
    4853     if (!caster) 
    4854         return; 
    4855  
    4856     // Hunter's Mark 
    4857     if (m_spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags & 0x0000000000000400LL) 
    4858     { 
    4859         // Check Improved Hunter's Mark bonus on caster 
    4860         Unit::AuraList const& mOverrideClassScript = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); 
    4861         for(Unit::AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i) 
    4862         { 
    4863             Modifier* mod = (*i)->GetModifier(); 
    4864             // mproved Hunter's Mark script from 5236 to 5240 
    4865             if (mod->m_miscvalue >= 5236 && mod->m_miscvalue <= 5240) 
    4866             { 
    4867                 // Get amount of ranged bonus for this spell.. 
    4868                 int32 ranged_bonus = caster->CalculateSpellDamage(m_spellProto, 1, m_spellProto->EffectBasePoints[1], m_target); 
    4869                 // Set melee attack power bonus % from ranged depends from Improved mask aura 
    4870                 m_modifier.m_amount = mod->m_amount * ranged_bonus / 100; 
    4871                 m_currentBasePoints = m_modifier.m_amount; 
    4872                 break; 
    4873             } 
    4874         } 
    4875         return; 
    4876     } 
    48774860} 
    48784861 
     
    53245307} 
    53255308 
    5326 void Aura::HandleAuraModExpertise(bool apply, bool Real) 
     5309void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real) 
    53275310{ 
    53285311    if(m_target->GetTypeId() != TYPEID_PLAYER) 
     
    53475330    if (m_target->GetTypeId() == TYPEID_PLAYER && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_SPELL)==SPELL_SCHOOL_MASK_SPELL) 
    53485331        m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply); 
    5349 } 
    5350  
    5351 //HandleNoImmediateEffect auras implementation to support new stat system 
    5352 void Aura::HandleAuraHealing(bool apply, bool Real) 
    5353 { 
    5354     //m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_VALUE, float(m_modifier.m_amount), apply); 
    5355 } 
    5356  
    5357 void Aura::HandleAuraHealingPct(bool apply, bool Real) 
    5358 { 
    5359     //m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_PCT, float(m_modifier.m_amount), apply); 
    53605332} 
    53615333