Changeset 272 for trunk/src/game/SpellAuras.cpp
- Timestamp:
- 11/22/08 00:35:41 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/SpellAuras.cpp
r257 r272 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 NoImmediateEffect, //115 SPELL_AURA_MOD_HEALING implemented in Unit::SpellBaseHealingBonusForVictim173 &Aura::HandleAuraHealing, //115 SPELL_AURA_MOD_HEALING 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 NoImmediateEffect, //118 SPELL_AURA_MOD_HEALING_PCT implemented in Unit::SpellHealingBonus176 &Aura::HandleAuraHealingPct, //118 SPELL_AURA_MOD_HEALING_PCT 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 NoImmediateEffect,//136 SPELL_AURA_MOD_HEALING_DONE_PERCENT implemented in Unit::SpellHealingBonus194 &Aura::HandleAuraHealingPct, //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 NoImmediateEffect,//165 SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS implemented in Unit::MeleeDamageBonus223 &Aura::HandleAuraAttackPowerAttacker, //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 Resurrect2003 if(GetId()==2584)2004 {2005 // Waiting to resurrect spell cancel, we must remove player from resurrect queue2006 if(m_target->GetTypeId() == TYPEID_PLAYER)2007 if(BattleGround *bg = ((Player*)m_target)->GetBattleGround())2008 bg->RemovePlayerFromResurrectQueue(m_target->GetGUID());2009 return;2010 }2011 2012 2002 // Dark Fiend 2013 2003 if(GetId()==45934) … … 2305 2295 void Aura::HandleAuraMounted(bool apply, bool Real) 2306 2296 { 2307 // only at real add/remove aura2308 if(!Real)2309 return;2310 2311 2297 if(apply) 2312 2298 { … … 2708 2694 else 2709 2695 { 2710 // Will use the default model here 2711 if (uint32 modelid = ci->GetRandomValidModelId()) 2712 m_target->SetDisplayId(modelid); 2696 if (uint32 modelid = ci->GetRandomValidModelId()) m_target->SetDisplayId(modelid); 2713 2697 2714 2698 // Dragonmaw Illusion (set mount model also) … … 3606 3590 /*** MODIFY SPEED ***/ 3607 3591 /*********************************************************/ 3608 void Aura::HandleAuraModIncreaseSpeed(bool /*apply*/, bool Real)3592 void Aura::HandleAuraModIncreaseSpeed(bool apply, bool Real) 3609 3593 { 3610 3594 // all applied/removed only at real aura add/remove … … 3615 3599 } 3616 3600 3617 void Aura::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real)3601 void Aura::HandleAuraModIncreaseMountedSpeed(bool apply, bool Real) 3618 3602 { 3619 3603 // all applied/removed only at real aura add/remove … … 3654 3638 } 3655 3639 3656 void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real)3640 void Aura::HandleAuraModIncreaseSwimSpeed(bool apply, bool Real) 3657 3641 { 3658 3642 // all applied/removed only at real aura add/remove … … 3663 3647 } 3664 3648 3665 void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)3649 void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real) 3666 3650 { 3667 3651 // all applied/removed only at real aura add/remove … … 3674 3658 } 3675 3659 3676 void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)3660 void Aura::HandleAuraModUseNormalSpeed(bool apply, bool Real) 3677 3661 { 3678 3662 // all applied/removed only at real aura add/remove … … 4359 4343 } 4360 4344 4361 void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)4345 void Aura::HandleModSpellDamagePercentFromStat(bool apply, bool Real) 4362 4346 { 4363 4347 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4370 4354 } 4371 4355 4372 void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real)4356 void Aura::HandleModSpellHealingPercentFromStat(bool apply, bool Real) 4373 4357 { 4374 4358 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4388 4372 } 4389 4373 4390 void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real)4374 void Aura::HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real) 4391 4375 { 4392 4376 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4399 4383 } 4400 4384 4401 void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real)4385 void Aura::HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real) 4402 4386 { 4403 4387 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4408 4392 } 4409 4393 4410 void Aura::HandleModHealingDone(bool /*apply*/, bool Real)4394 void Aura::HandleModHealingDone(bool apply, bool Real) 4411 4395 { 4412 4396 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4448 4432 } 4449 4433 4450 void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)4434 void Aura::HandleAuraModResistenceOfStatPercent(bool apply, bool Real) 4451 4435 { 4452 4436 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 4583 4567 } 4584 4568 4585 void Aura::HandleModPowerRegenPCT(bool /*apply*/, bool Real)4569 void Aura::HandleModPowerRegenPCT(bool apply, bool Real) 4586 4570 { 4587 4571 // spells required only Real aura add/remove … … 4597 4581 } 4598 4582 4599 void Aura::HandleModManaRegen(bool /*apply*/, bool Real)4583 void Aura::HandleModManaRegen(bool apply, bool Real) 4600 4584 { 4601 4585 // spells required only Real aura add/remove … … 4684 4668 /********************************/ 4685 4669 4686 void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real)4670 void Aura::HandleAuraModParryPercent(bool apply, bool Real) 4687 4671 { 4688 4672 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4692 4676 } 4693 4677 4694 void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real)4678 void Aura::HandleAuraModDodgePercent(bool apply, bool Real) 4695 4679 { 4696 4680 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4701 4685 } 4702 4686 4703 void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real)4687 void Aura::HandleAuraModBlockPercent(bool apply, bool Real) 4704 4688 { 4705 4689 if(m_target->GetTypeId()!=TYPEID_PLAYER) … … 4710 4694 } 4711 4695 4712 void Aura::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real)4696 void Aura::HandleAuraModRegenInterrupt(bool apply, bool Real) 4713 4697 { 4714 4698 // spells required only Real aura add/remove … … 4778 4762 } 4779 4763 4780 void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real)4764 void Aura::HandleModSpellCritChanceShool(bool apply, bool Real) 4781 4765 { 4782 4766 // spells required only Real aura add/remove … … 4858 4842 4859 4843 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 } 4860 4877 } 4861 4878 … … 5307 5324 } 5308 5325 5309 void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real)5326 void Aura::HandleAuraModExpertise(bool apply, bool Real) 5310 5327 { 5311 5328 if(m_target->GetTypeId() != TYPEID_PLAYER) … … 5330 5347 if (m_target->GetTypeId() == TYPEID_PLAYER && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_SPELL)==SPELL_SCHOOL_MASK_SPELL) 5331 5348 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); 5332 5360 } 5333 5361