Changeset 279 for trunk/src/game/SpellAuras.cpp
- Timestamp:
- 11/22/08 00:36:22 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/SpellAuras.cpp
r274 r279 170 170 &Aura::HandleNoImmediateEffect, //113 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN implemented in Unit::MeleeDamageBonus 171 171 &Aura::HandleNoImmediateEffect, //114 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT implemented in Unit::MeleeDamageBonus 172 &Aura::Handle AuraHealing, //115 SPELL_AURA_MOD_HEALING172 &Aura::HandleNoImmediateEffect, //115 SPELL_AURA_MOD_HEALING implemented in Unit::SpellBaseHealingBonusForVictim 173 173 &Aura::HandleNoImmediateEffect, //116 SPELL_AURA_MOD_REGEN_DURING_COMBAT 174 174 &Aura::HandleNoImmediateEffect, //117 SPELL_AURA_MOD_MECHANIC_RESISTANCE implemented in Unit::MagicSpellHitResult 175 &Aura::Handle AuraHealingPct, //118 SPELL_AURA_MOD_HEALING_PCT175 &Aura::HandleNoImmediateEffect, //118 SPELL_AURA_MOD_HEALING_PCT implemented in Unit::SpellHealingBonus 176 176 &Aura::HandleUnused, //119 SPELL_AURA_SHARE_PET_TRACKING useless 177 177 &Aura::HandleAuraUntrackable, //120 SPELL_AURA_UNTRACKABLE … … 191 191 &Aura::HandleAuraModRegenInterrupt, //134 SPELL_AURA_MOD_MANA_REGEN_INTERRUPT 192 192 &Aura::HandleModHealingDone, //135 SPELL_AURA_MOD_HEALING_DONE 193 &Aura::Handle AuraHealingPct,//136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus193 &Aura::HandleNoImmediateEffect, //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus 194 194 &Aura::HandleModTotalPercentStat, //137 SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE 195 195 &Aura::HandleHaste, //138 SPELL_AURA_MOD_HASTE … … 220 220 &Aura::HandleNoImmediateEffect, //163 SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE 221 221 &Aura::HandleUnused, //164 useless, only one test spell 222 &Aura::Handle AuraAttackPowerAttacker,//165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus222 &Aura::HandleNoImmediateEffect, //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus 223 223 &Aura::HandleAuraModAttackPowerPercent, //166 SPELL_AURA_MOD_ATTACK_POWER_PCT 224 224 &Aura::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT … … 1999 1999 } 2000 2000 2001 // Waiting to Resurrect 2002 if(GetId()==2584) 2003 { 2004 // Waiting to resurrect spell cancel, we must remove player from resurrect queue 2005 if(m_target->GetTypeId() == TYPEID_PLAYER) 2006 if(BattleGround *bg = ((Player*)m_target)->GetBattleGround()) 2007 bg->RemovePlayerFromResurrectQueue(m_target->GetGUID()); 2008 return; 2009 } 2010 2001 2011 // Dark Fiend 2002 2012 if(GetId()==45934) … … 2287 2297 void Aura::HandleAuraMounted(bool apply, bool Real) 2288 2298 { 2299 // only at real add/remove aura 2300 if(!Real) 2301 return; 2302 2289 2303 if(apply) 2290 2304 { … … 2686 2700 else 2687 2701 { 2688 if (uint32 modelid = ci->GetRandomValidModelId()) m_target->SetDisplayId(modelid); 2702 // Will use the default model here 2703 if (uint32 modelid = ci->GetRandomValidModelId()) 2704 m_target->SetDisplayId(modelid); 2689 2705 2690 2706 // Dragonmaw Illusion (set mount model also) … … 3582 3598 /*** MODIFY SPEED ***/ 3583 3599 /*********************************************************/ 3584 void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real)3600 void Aura::HandleAuraModIncreaseSpeed(bool /*apply*/, bool Real) 3585 3601 { 3586 3602 // all applied/removed only at real aura add/remove … … 3591 3607 } 3592 3608 3593 void Aura::HandleAuraModIncreaseMountedSpeed(bool apply, bool Real)3609 void Aura::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real) 3594 3610 { 3595 3611 // all applied/removed only at real aura add/remove … … 3630 3646 } 3631 3647 3632 void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real)3648 void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real) 3633 3649 { 3634 3650 // all applied/removed only at real aura add/remove … … 3639 3655 } 3640 3656 3641 void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)3657 void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real) 3642 3658 { 3643 3659 // all applied/removed only at real aura add/remove … … 3650 3666 } 3651 3667 3652 void Aura::HandleAuraModUseNormalSpeed(bool apply, bool Real)3668 void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real) 3653 3669 { 3654 3670 // all applied/removed only at real aura add/remove … … 4335 4351 } 4336 4352 4337 void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real)4353 void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real) 4338 4354 { 4339 4355 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4346 4362 } 4347 4363 4348 void Aura::HandleModSpellHealingPercentFromStat(bool apply, bool Real)4364 void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real) 4349 4365 { 4350 4366 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4364 4380 } 4365 4381 4366 void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real)4382 void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real) 4367 4383 { 4368 4384 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4375 4391 } 4376 4392 4377 void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real)4393 void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real) 4378 4394 { 4379 4395 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4384 4400 } 4385 4401 4386 void Aura::HandleModHealingDone(bool apply, bool Real)4402 void Aura::HandleModHealingDone(bool /*apply*/, bool Real) 4387 4403 { 4388 4404 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4424 4440 } 4425 4441 4426 void Aura::HandleAuraModResistenceOfStatPercent(bool apply, bool Real)4442 void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real) 4427 4443 { 4428 4444 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4559 4575 } 4560 4576 4561 void Aura::HandleModPowerRegenPCT(bool apply, bool Real)4577 void Aura::HandleModPowerRegenPCT(bool /*apply*/, bool Real) 4562 4578 { 4563 4579 // spells required only Real aura add/remove … … 4573 4589 } 4574 4590 4575 void Aura::HandleModManaRegen(bool apply, bool Real)4591 void Aura::HandleModManaRegen(bool /*apply*/, bool Real) 4576 4592 { 4577 4593 // spells required only Real aura add/remove … … 4660 4676 /********************************/ 4661 4677 4662 void Aura::HandleAuraModParryPercent(bool apply, bool Real)4678 void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real) 4663 4679 { 4664 4680 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4668 4684 } 4669 4685 4670 void Aura::HandleAuraModDodgePercent(bool apply, bool Real)4686 void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real) 4671 4687 { 4672 4688 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4677 4693 } 4678 4694 4679 void Aura::HandleAuraModBlockPercent(bool apply, bool Real)4695 void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real) 4680 4696 { 4681 4697 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4686 4702 } 4687 4703 4688 void Aura::HandleAuraModRegenInterrupt(bool apply, bool Real)4704 void Aura::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real) 4689 4705 { 4690 4706 // spells required only Real aura add/remove … … 4754 4770 } 4755 4771 4756 void Aura::HandleModSpellCritChanceShool(bool apply, bool Real)4772 void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real) 4757 4773 { 4758 4774 // spells required only Real aura add/remove … … 4834 4850 4835 4851 m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_modifier.m_amount), apply); 4836 }4837 4838 void Aura::HandleAuraAttackPowerAttacker(bool apply, bool Real)4839 {4840 // spells required only Real aura add/remove4841 if(!Real)4842 return;4843 Unit *caster = GetCaster();4844 4845 if (!caster)4846 return;4847 4848 // Hunter's Mark4849 if (m_spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags & 0x0000000000000400LL)4850 {4851 // Check Improved Hunter's Mark bonus on caster4852 Unit::AuraList const& mOverrideClassScript = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);4853 for(Unit::AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)4854 {4855 Modifier* mod = (*i)->GetModifier();4856 // mproved Hunter's Mark script from 5236 to 52404857 if (mod->m_miscvalue >= 5236 && mod->m_miscvalue <= 5240)4858 {4859 // Get amount of ranged bonus for this spell..4860 int32 ranged_bonus = caster->CalculateSpellDamage(m_spellProto, 1, m_spellProto->EffectBasePoints[1], m_target);4861 // Set melee attack power bonus % from ranged depends from Improved mask aura4862 m_modifier.m_amount = mod->m_amount * ranged_bonus / 100;4863 m_currentBasePoints = m_modifier.m_amount;4864 break;4865 }4866 }4867 return;4868 }4869 4852 } 4870 4853 … … 5316 5299 } 5317 5300 5318 void Aura::HandleAuraModExpertise(bool apply, bool Real)5301 void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real) 5319 5302 { 5320 5303 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 5339 5322 if (m_target->GetTypeId() == TYPEID_PLAYER && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_SPELL)==SPELL_SCHOOL_MASK_SPELL) 5340 5323 m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply); 5341 }5342 5343 //HandleNoImmediateEffect auras implementation to support new stat system5344 void Aura::HandleAuraHealing(bool apply, bool Real)5345 {5346 //m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_VALUE, float(m_modifier.m_amount), apply);5347 }5348 5349 void Aura::HandleAuraHealingPct(bool apply, bool Real)5350 {5351 //m_target->HandleStatModifier(UNIT_MOD_HEALING, TOTAL_PCT, float(m_modifier.m_amount), apply);5352 5324 } 5353 5325