Changeset 257 for trunk/src/game/SpellAuras.cpp
- Timestamp:
- 11/19/08 13:51:33 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/SpellAuras.cpp
r252 r257 171 171 &Aura::HandleNoImmediateEffect, //113 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN implemented in Unit::MeleeDamageBonus 172 172 &Aura::HandleNoImmediateEffect, //114 SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT implemented in Unit::MeleeDamageBonus 173 &Aura::Handle AuraHealing, //115 SPELL_AURA_MOD_HEALING173 &Aura::HandleNoImmediateEffect, //115 SPELL_AURA_MOD_HEALING implemented in Unit::SpellBaseHealingBonusForVictim 174 174 &Aura::HandleNoImmediateEffect, //116 SPELL_AURA_MOD_REGEN_DURING_COMBAT 175 175 &Aura::HandleNoImmediateEffect, //117 SPELL_AURA_MOD_MECHANIC_RESISTANCE implemented in Unit::MagicSpellHitResult 176 &Aura::Handle AuraHealingPct, //118 SPELL_AURA_MOD_HEALING_PCT176 &Aura::HandleNoImmediateEffect, //118 SPELL_AURA_MOD_HEALING_PCT implemented in Unit::SpellHealingBonus 177 177 &Aura::HandleUnused, //119 SPELL_AURA_SHARE_PET_TRACKING useless 178 178 &Aura::HandleAuraUntrackable, //120 SPELL_AURA_UNTRACKABLE … … 192 192 &Aura::HandleAuraModRegenInterrupt, //134 SPELL_AURA_MOD_MANA_REGEN_INTERRUPT 193 193 &Aura::HandleModHealingDone, //135 SPELL_AURA_MOD_HEALING_DONE 194 &Aura::Handle AuraHealingPct,//136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus194 &Aura::HandleNoImmediateEffect, //136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus 195 195 &Aura::HandleModTotalPercentStat, //137 SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE 196 196 &Aura::HandleHaste, //138 SPELL_AURA_MOD_HASTE … … 221 221 &Aura::HandleNoImmediateEffect, //163 SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE 222 222 &Aura::HandleUnused, //164 useless, only one test spell 223 &Aura::Handle AuraAttackPowerAttacker,//165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus223 &Aura::HandleNoImmediateEffect, //165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus 224 224 &Aura::HandleAuraModAttackPowerPercent, //166 SPELL_AURA_MOD_ATTACK_POWER_PCT 225 225 &Aura::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT … … 2000 2000 } 2001 2001 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 2002 2012 // Dark Fiend 2003 2013 if(GetId()==45934) … … 2295 2305 void Aura::HandleAuraMounted(bool apply, bool Real) 2296 2306 { 2307 // only at real add/remove aura 2308 if(!Real) 2309 return; 2310 2297 2311 if(apply) 2298 2312 { … … 2694 2708 else 2695 2709 { 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); 2697 2713 2698 2714 // Dragonmaw Illusion (set mount model also) … … 3590 3606 /*** MODIFY SPEED ***/ 3591 3607 /*********************************************************/ 3592 void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real)3608 void Aura::HandleAuraModIncreaseSpeed(bool /*apply*/, bool Real) 3593 3609 { 3594 3610 // all applied/removed only at real aura add/remove … … 3599 3615 } 3600 3616 3601 void Aura::HandleAuraModIncreaseMountedSpeed(bool apply, bool Real)3617 void Aura::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real) 3602 3618 { 3603 3619 // all applied/removed only at real aura add/remove … … 3638 3654 } 3639 3655 3640 void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real)3656 void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real) 3641 3657 { 3642 3658 // all applied/removed only at real aura add/remove … … 3647 3663 } 3648 3664 3649 void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)3665 void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real) 3650 3666 { 3651 3667 // all applied/removed only at real aura add/remove … … 3658 3674 } 3659 3675 3660 void Aura::HandleAuraModUseNormalSpeed(bool apply, bool Real)3676 void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real) 3661 3677 { 3662 3678 // all applied/removed only at real aura add/remove … … 4343 4359 } 4344 4360 4345 void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real)4361 void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real) 4346 4362 { 4347 4363 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4354 4370 } 4355 4371 4356 void Aura::HandleModSpellHealingPercentFromStat(bool apply, bool Real)4372 void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real) 4357 4373 { 4358 4374 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4372 4388 } 4373 4389 4374 void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real)4390 void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real) 4375 4391 { 4376 4392 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4383 4399 } 4384 4400 4385 void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real)4401 void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real) 4386 4402 { 4387 4403 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4392 4408 } 4393 4409 4394 void Aura::HandleModHealingDone(bool apply, bool Real)4410 void Aura::HandleModHealingDone(bool /*apply*/, bool Real) 4395 4411 { 4396 4412 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4432 4448 } 4433 4449 4434 void Aura::HandleAuraModResistenceOfStatPercent(bool apply, bool Real)4450 void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real) 4435 4451 { 4436 4452 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4567 4583 } 4568 4584 4569 void Aura::HandleModPowerRegenPCT(bool apply, bool Real)4585 void Aura::HandleModPowerRegenPCT(bool /*apply*/, bool Real) 4570 4586 { 4571 4587 // spells required only Real aura add/remove … … 4581 4597 } 4582 4598 4583 void Aura::HandleModManaRegen(bool apply, bool Real)4599 void Aura::HandleModManaRegen(bool /*apply*/, bool Real) 4584 4600 { 4585 4601 // spells required only Real aura add/remove … … 4668 4684 /********************************/ 4669 4685 4670 void Aura::HandleAuraModParryPercent(bool apply, bool Real)4686 void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real) 4671 4687 { 4672 4688 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4676 4692 } 4677 4693 4678 void Aura::HandleAuraModDodgePercent(bool apply, bool Real)4694 void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real) 4679 4695 { 4680 4696 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4685 4701 } 4686 4702 4687 void Aura::HandleAuraModBlockPercent(bool apply, bool Real)4703 void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real) 4688 4704 { 4689 4705 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4694 4710 } 4695 4711 4696 void Aura::HandleAuraModRegenInterrupt(bool apply, bool Real)4712 void Aura::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real) 4697 4713 { 4698 4714 // spells required only Real aura add/remove … … 4762 4778 } 4763 4779 4764 void Aura::HandleModSpellCritChanceShool(bool apply, bool Real)4780 void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real) 4765 4781 { 4766 4782 // spells required only Real aura add/remove … … 4842 4858 4843 4859 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/remove4849 if(!Real)4850 return;4851 Unit *caster = GetCaster();4852 4853 if (!caster)4854 return;4855 4856 // Hunter's Mark4857 if (m_spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags & 0x0000000000000400LL)4858 {4859 // Check Improved Hunter's Mark bonus on caster4860 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 52404865 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 aura4870 m_modifier.m_amount = mod->m_amount * ranged_bonus / 100;4871 m_currentBasePoints = m_modifier.m_amount;4872 break;4873 }4874 }4875 return;4876 }4877 4860 } 4878 4861 … … 5324 5307 } 5325 5308 5326 void Aura::HandleAuraModExpertise(bool apply, bool Real)5309 void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real) 5327 5310 { 5328 5311 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 5347 5330 if (m_target->GetTypeId() == TYPEID_PLAYER && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_SPELL)==SPELL_SCHOOL_MASK_SPELL) 5348 5331 m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply); 5349 }5350 5351 //HandleNoImmediateEffect auras implementation to support new stat system5352 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);5360 5332 } 5361 5333