diff options
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r-- | src/game/SpellAuras.cpp | 659 |
1 files changed, 49 insertions, 610 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c641cd8a93c..71bf632b7bb 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -74,7 +74,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleInvisibility, // 18 SPELL_AURA_MOD_INVISIBILITY &Aura::HandleInvisibilityDetect, // 19 SPELL_AURA_MOD_INVISIBILITY_DETECTION &Aura::HandleAuraModTotalHealthPercentRegen, // 20 SPELL_AURA_OBS_MOD_HEALTH - &Aura::HandleAuraModTotalEnergyPercentRegen, // 21 SPELL_AURA_OBS_MOD_ENERGY + &Aura::HandleAuraModTotalEnergyPercentRegen, // 21 SPELL_AURA_OBS_MOD_ENERGY &Aura::HandleAuraModResistance, // 22 SPELL_AURA_MOD_RESISTANCE &Aura::HandlePeriodicTriggerSpell, // 23 SPELL_AURA_PERIODIC_TRIGGER_SPELL &Aura::HandlePeriodicEnergize, // 24 SPELL_AURA_PERIODIC_ENERGIZE @@ -398,7 +398,7 @@ m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1), m_upd { // Glyph of Thorns if (m_target == caster && m_spellProto->SpellFamilyName==SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x100) - if (AuraEffect * aurEff = m_target->GetDummyAura(57862)) + if (AuraEffect * aurEff = m_target->GetAuraEffect(57862, 0)) m_maxduration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS; modOwner->ApplySpellMod(GetId(), SPELLMOD_DURATION, m_maxduration); @@ -1870,43 +1870,13 @@ void AuraEffect::TriggerSpell() ((Player*)caster)->ApplyEnchantment(item,TEMP_ENCHANTMENT_SLOT,true); return; } -// // Periodic Mana Burn -// case 812: break; -// // Polymorphic Ray -// case 6965: break; -// // Fire Nova (1-7 ranks) -// case 8350: -// case 8508: -// case 8509: -// case 11312: -// case 11313: -// case 25540: -// case 25544: -// break; // Thaumaturgy Channel case 9712: trigger_spell_id = 21029; break; -// // Egan's Blaster -// case 17368: break; -// // Haunted -// case 18347: break; -// // Ranshalla Waiting -// case 18953: break; -// // Inferno -// case 19695: break; -// // Frostwolf Muzzle DND -// case 21794: break; -// // Alterac Ram Collar DND -// case 21866: break; -// // Celebras Waiting -// case 21916: break; - // Brood Affliction: Bronze case 23170: { m_target->CastSpell(m_target, 23171, true, 0, this); return; } -// // Mark of Frost -// case 23184: break; // Restoration case 23493: { @@ -1921,46 +1891,6 @@ void AuraEffect::TriggerSpell() } return; } -// // Stoneclaw Totem Passive TEST -// case 23792: break; -// // Axe Flurry -// case 24018: break; -// // Mark of Arlokk -// case 24210: break; -// // Restoration -// case 24379: break; -// // Happy Pet -// case 24716: break; -// // Dream Fog -// case 24780: break; -// // Cannon Prep -// case 24832: break; -// // Shadow Bolt Whirl -// case 24834: break; -// // Stink Trap -// case 24918: break; -// // Mark of Nature -// case 25041: break; -// // Agro Drones -// case 25152: break; -// // Consume -// case 25371: break; -// // Pain Spike -// case 25572: break; -// // Rotate 360 -// case 26009: break; -// // Rotate -360 -// case 26136: break; -// // Consume -// case 26196: break; -// // Berserk -// case 26615: break; -// // Defile -// case 27177: break; -// // Teleport: IF/UC -// case 27601: break; -// // Five Fat Finger Exploding Heart Technique -// case 27673: break; // Nitrous Boost case 27746: { @@ -1974,8 +1904,6 @@ void AuraEffect::TriggerSpell() return; } } break; -// // Steam Tank Passive -// case 27747: break; // Frost Blast case 27808: caster->CastCustomSpell(29879, SPELLVALUE_BASE_POINT0, (float)m_target->GetMaxHealth()*0.26f, m_target, true, NULL, this); @@ -1988,49 +1916,13 @@ void AuraEffect::TriggerSpell() m_target->CastCustomSpell(27820, SPELLVALUE_BASE_POINT0, -mana*4, NULL, true, NULL, this, caster->GetGUID()); } return; -// // Controller Timer -// case 28095: break; -// // Stalagg Chain -// case 28096: break; -// // Stalagg Tesla Passive -// case 28097: break; -// // Feugen Tesla Passive -// case 28109: break; -// // Feugen Chain -// case 28111: break; -// // Mark of Didier -// case 28114: break; -// // Communique Timer, camp -// case 28346: break; -// // Icebolt -// case 28522: break; -// // Silithyst -// case 29519: break; // Inoculate Nestlewood Owlkin case 29528: if(target->GetTypeId()!=TYPEID_UNIT)// prevent error reports in case ignored player target return; break; -// // Overload -// case 29768: break; -// // Return Fire -// case 29788: break; -// // Return Fire -// case 29793: break; -// // Return Fire -// case 29794: break; -// // Guardian of Icecrown Passive -// case 29897: break; // Feed Captured Animal case 29917: trigger_spell_id = 29916; break; -// // Flame Wreath -// case 29946: break; -// // Flame Wreath -// case 29947: break; -// // Mind Exhaustion Passive -// case 30025: break; -// // Nether Beam - Serenity -// case 30401: break; // Extract Gas case 30427: { @@ -2053,19 +1945,6 @@ void AuraEffect::TriggerSpell() } // Quake case 30576: trigger_spell_id = 30571; break; -// // Burning Maul -// case 30598: break; -// // Regeneration -// case 30799: -// case 30800: -// case 30801: -// break; -// // Despawn Self - Smoke cloud -// case 31269: break; -// // Time Rift Periodic -// case 31320: break; -// // Corrupt Medivh -// case 31326: break; // Doom case 31347: { @@ -2080,20 +1959,6 @@ void AuraEffect::TriggerSpell() caster->SummonCreature(17870, 0, 0, 0, caster->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); return; } -// // Bloodmyst Tesla -// case 31611: break; -// // Doomfire -// case 31944: break; -// // Teleport Test -// case 32236: break; -// // Earthquake -// case 32686: break; -// // Possess -// case 33401: break; -// // Draw Shadows -// case 33563: break; -// // Murmur's Touch -// case 33711: break; // Flame Quills case 34229: { @@ -2104,82 +1969,8 @@ void AuraEffect::TriggerSpell() caster->CastSpell(m_target,spell_id,true, NULL, this); return; } -// // Gravity Lapse -// case 34480: break; -// // Tornado -// case 34683: break; -// // Frostbite Rotate -// case 34748: break; -// // Arcane Flurry -// case 34821: break; -// // Interrupt Shutdown -// case 35016: break; -// // Interrupt Shutdown -// case 35176: break; -// // Inferno -// case 35268: break; -// // Salaadin's Tesla -// case 35515: break; -// // Ethereal Channel (Red) -// case 35518: break; -// // Nether Vapor -// case 35879: break; -// // Dark Portal Storm -// case 36018: break; -// // Burning Maul -// case 36056: break; -// // Living Grove Defender Lifespan -// case 36061: break; -// // Professor Dabiri Talks -// case 36064: break; -// // Kael Gaining Power -// case 36091: break; -// // They Must Burn Bomb Aura -// case 36344: break; -// // They Must Burn Bomb Aura (self) -// case 36350: break; -// // Stolen Ravenous Ravager Egg -// case 36401: break; -// // Activated Cannon -// case 36410: break; -// // Stolen Ravenous Ravager Egg -// case 36418: break; -// // Enchanted Weapons -// case 36510: break; -// // Cursed Scarab Periodic -// case 36556: break; -// // Cursed Scarab Despawn Periodic -// case 36561: break; -// // Vision Guide -// case 36573: break; -// // Cannon Charging (platform) -// case 36785: break; -// // Cannon Charging (self) -// case 36860: break; // Remote Toy case 37027: trigger_spell_id = 37029; break; -// // Mark of Death -// case 37125: break; -// // Arcane Flurry -// case 37268: break; -// // Spout -// case 37429: break; -// // Spout -// case 37430: break; -// // Karazhan - Chess NPC AI, Snapshot timer -// case 37440: break; -// // Karazhan - Chess NPC AI, action timer -// case 37504: break; -// // Karazhan - Chess: Is Square OCCUPIED aura (DND) -// case 39400: break; -// // Banish -// case 37546: break; -// // Shriveling Gaze -// case 37589: break; -// // Fake Aggro Radius (2 yd) -// case 37815: break; -// // Corrupt Medivh -// case 37853: break; // Eye of Grillok case 38495: { @@ -2199,93 +1990,18 @@ void AuraEffect::TriggerSpell() creatureTarget->ForcedDespawn(); return; } -// // Magic Sucker Device timer -// case 38672: break; -// // Tomb Guarding Charging -// case 38751: break; -// // Murmur's Touch -// case 38794: break; -// // Activate Nether-wraith Beacon (31742 Nether-wraith Beacon item) -// case 39105: break; -// // Drain World Tree Visual -// case 39140: break; -// // Quest - Dustin's Undead Dragon Visual aura -// case 39259: break; -// // Hellfire - The Exorcism, Jules releases darkness, aura -// case 39306: break; -// // Inferno -// case 39346: break; -// // Enchanted Weapons -// case 39489: break; -// // Shadow Bolt Whirl -// case 39630: break; -// // Shadow Bolt Whirl -// case 39634: break; -// // Shadow Inferno -// case 39645: break; // Tear of Azzinoth Summon Channel - it's not really supposed to do anything,and this only prevents the console spam case 39857: trigger_spell_id = 39856; break; -// // Soulgrinder Ritual Visual (Smashed) -// case 39974: break; -// // Simon Game Pre-game timer -// case 40041: break; -// // Knockdown Fel Cannon: The Aggro Check Aura -// case 40113: break; -// // Spirit Lance -// case 40157: break; -// // Demon Transform 2 -// case 40398: break; -// // Demon Transform 1 -// case 40511: break; -// // Ancient Flames -// case 40657: break; -// // Ethereal Ring Cannon: Cannon Aura -// case 40734: break; -// // Cage Trap -// case 40760: break; -// // Random Periodic -// case 40867: break; -// // Prismatic Shield -// case 40879: break; // Aura of Desire case 41350: { - Unit::AuraEffectList const& mMod = m_target->GetAurasByType(SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT); - for(Unit::AuraEffectList::const_iterator i = mMod.begin(); i != mMod.end(); ++i) - { - if ((*i)->GetId() == 41350) - { - (*i)->ApplyModifier(false); - (*i)->SetAmount((*i)->GetAmount()-5); - (*i)->ApplyModifier(true); - break; - } - } - }break; -// // Dementia -// case 41404: break; -// // Chaos Form -// case 41629: break; -// // Alert Drums -// case 42177: break; -// // Spout -// case 42581: break; -// // Spout -// case 42582: break; -// // Return to the Spirit Realm -// case 44035: break; -// // Curse of Boundless Agony -// case 45050: break; -// // Earthquake -// case 46240: break; - // Personalized Weather + AuraEffect * aurEff = GetParentAura()->GetPartAura(1); + aurEff->ApplyModifier(false, false, true); + aurEff->SetAmount(aurEff->GetAmount()-5); + aurEff->ApplyModifier(true, false, true); + break; + } case 46736: trigger_spell_id = 46737; break; -// // Stay Submerged -// case 46981: break; -// // Dragonblight Ram -// case 47015: break; -// // Party G.R.E.N.A.D.E. -// case 51510: break; default: break; } @@ -2304,32 +2020,6 @@ void AuraEffect::TriggerSpell() } break; } -// case SPELLFAMILY_WARRIOR: -// { -// switch(auraId) -// { -// // Wild Magic -// case 23410: break; -// // Corrupted Totems -// case 23425: break; -// default: -// break; -// } -// break; -// } -// case SPELLFAMILY_PRIEST: -// { -// switch(auraId) -// { -// // Blue Beam -// case 32930: break; -// // Fury of the Dreghood Elders -// case 35460: break; -// default: -// break; -// } - // break; - // } case SPELLFAMILY_DRUID: { switch(auraId) @@ -2388,32 +2078,6 @@ void AuraEffect::TriggerSpell() return; break; -// //Frost Trap Aura -// case 13810: -// return; -// //Rizzle's Frost Trap -// case 39900: -// return; -// // Tame spells -// case 19597: // Tame Ice Claw Bear -// case 19676: // Tame Snow Leopard -// case 19677: // Tame Large Crag Boar -// case 19678: // Tame Adult Plainstrider -// case 19679: // Tame Prairie Stalker -// case 19680: // Tame Swoop -// case 19681: // Tame Dire Mottled Boar -// case 19682: // Tame Surf Crawler -// case 19683: // Tame Armored Scorpid -// case 19684: // Tame Webwood Lurker -// case 19685: // Tame Nightsaber Stalker -// case 19686: // Tame Strigid Screecher -// case 30100: // Tame Crazed Dragonhawk -// case 30103: // Tame Elder Springpaw -// case 30104: // Tame Mistbat -// case 30647: // Tame Barbed Crawler -// case 30648: // Tame Greater Timberstrider -// case 30652: // Tame Nightstalker -// return; default: break; } @@ -2427,15 +2091,8 @@ void AuraEffect::TriggerSpell() case 28820: { // Need remove self if Lightning Shield not active - Unit::AuraMap const& auras = target->GetAuras(); - for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) - { - SpellEntry const* spell = itr->second->GetSpellProto(); - if( spell->SpellFamilyName == SPELLFAMILY_SHAMAN && - spell->SpellFamilyFlags[0] & 0x400) - return; - } - target->RemoveAurasDueToSpell(28820); + if (!target->GetAura(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN,0x400)) + target->RemoveAurasDueToSpell(28820); return; } // Totemic Mastery (Skyshatter Regalia (Shaman Tier 6) - bonus) @@ -2474,43 +2131,6 @@ void AuraEffect::TriggerSpell() // Spell exist but require custom code switch(auraId) { - // Curse of Idiocy - case 1010: - { - // TODO: spell casted by result in correct way mostly - // BUT: - // 1) target show casting at each triggered cast: target don't must show casting animation for any triggered spell - // but must show affect apply like item casting - // 2) maybe aura must be replace by new with accumulative stat mods instead stacking - - // prevent cast by triggered auras - if(GetCasterGUID() == m_target->GetGUID()) - return; - - // stop triggering after each affected stats lost > 90 - int32 intellectLoss = 0; - int32 spiritLoss = 0; - - Unit::AuraEffectList const& mModStat = m_target->GetAurasByType(SPELL_AURA_MOD_STAT); - for(Unit::AuraEffectList::const_iterator i = mModStat.begin(); i != mModStat.end(); ++i) - { - if ((*i)->GetId() == 1010) - { - switch((*i)->GetMiscValue()) - { - case STAT_INTELLECT: intellectLoss += (*i)->GetAmount(); break; - case STAT_SPIRIT: spiritLoss += (*i)->GetAmount(); break; - default: break; - } - } - } - - if(intellectLoss <= -90 && spiritLoss <= -90) - return; - - caster = target; - break; - } // Mana Tide case 16191: { @@ -2649,14 +2269,14 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount) } return; } - case 37096: // Blood Elf Disguise + case 37096: // Blood Elf Illusion { if(caster) { switch(caster->getGender()) { case GENDER_FEMALE: - caster->CastSpell(m_target,37095,true,NULL,this); + caster->CastSpell(m_target,37095,true,NULL,this); // Blood Elf Disguise break; case GENDER_MALE: caster->CastSpell(m_target,37093,true,NULL,this); @@ -3417,12 +3037,12 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun case FORM_BEAR: case FORM_DIREBEAR: case FORM_CAT: - if(AuraEffect* dummy = m_target->GetDummyAura(37315) ) + if(AuraEffect* dummy = m_target->GetAuraEffect(37315, 0) ) m_target->CastSpell(m_target,37316,true,NULL,dummy); break; // Nordrassil Regalia - bonus case FORM_MOONKIN: - if(AuraEffect* dummy = m_target->GetDummyAura(37324) ) + if(AuraEffect* dummy = m_target->GetAuraEffect(37324, 0) ) m_target->CastSpell(m_target,37325,true,NULL,dummy); break; case FORM_BATTLESTANCE: @@ -4551,23 +4171,18 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,GetMiscValue(),apply); // Bestial Wrath - if ( GetSpellProto()->SpellFamilyName == SPELLFAMILY_HUNTER && GetSpellProto()->Id == 19574) + if (GetSpellProto()->Id == 19574) { // The Beast Within cast on owner if talent present if ( Unit* owner = m_target->GetOwner() ) { // Search talent - Unit::AuraEffectList const& m_dummyAuras = owner->GetAurasByType(SPELL_AURA_DUMMY); - for(Unit::AuraEffectList::const_iterator i = m_dummyAuras.begin(); i != m_dummyAuras.end(); ++i) + if (owner->GetAuraEffect(34692, 0)) { - if ( (*i)->GetSpellProto()->SpellIconID == 2229 ) - { - if (apply) - owner->CastSpell(owner, 34471, true, 0, this); - else - owner->RemoveAurasDueToSpell(34471); - break; - } + if (apply) + owner->CastSpell(owner, 34471, true, 0, this); + else + owner->RemoveAurasDueToSpell(34471); } } } @@ -4606,7 +4221,7 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_DECREASE_SPEED,apply); } // Demonic Circle - else if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellProto->SpellIconID == 3221) + else if (GetId() == 48020) { if (m_target->GetTypeId() != TYPEID_PLAYER) return; @@ -4619,7 +4234,6 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA } } -//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect void AuraEffect::HandleAuraModEffectImmunity(bool apply, bool Real, bool /*changeAmount*/) { // when removing flag aura, handle flag drop @@ -4818,12 +4432,15 @@ void AuraEffect::HandleAuraPeriodicDummy(bool apply, bool Real, bool changeAmoun case SPELLFAMILY_HUNTER: { // Explosive Shot - if (apply && !loading && caster) + if (apply && !loading && caster && spell->SpellFamilyFlags[1] & 0x80000000) m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 14 / 100); break; } case SPELLFAMILY_DEATHKNIGHT: { + // Reaping + // Blood of the North + // Death Rune Mastery if (spell->SpellIconID == 3041 || spell->SpellIconID == 22 || spell->SpellIconID == 2622) m_amount = 0; break; @@ -4851,7 +4468,7 @@ void AuraEffect::HandlePeriodicDamage(bool apply, bool Real, bool changeAmount) // Curse of Doom // This is a hack - this aura should be handled by passive aura and proc doomguard spawn on kill, however there is no such aura in dbcs - if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags.IsEqual(0,0x02,0)) + if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[1] & 0x02) { if (Real && !apply && GetParentAura()->GetRemoveMode()==AURA_REMOVE_BY_DEATH) { @@ -4909,7 +4526,7 @@ void AuraEffect::HandlePeriodicDamage(bool apply, bool Real, bool changeAmount) case SPELLFAMILY_DRUID: { // Rip - if (m_spellProto->SpellVisual[0] == 3941) + if (m_spellProto->SpellFamilyFlags[0] & 0x00800000) { // 0.01*$AP*cp if (caster->GetTypeId() != TYPEID_PLAYER) @@ -4918,15 +4535,9 @@ void AuraEffect::HandlePeriodicDamage(bool apply, bool Real, bool changeAmount) uint8 cp = ((Player*)caster)->GetComboPoints(); // Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs - Unit::AuraEffectList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY); - for(Unit::AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr) - { - if((*itr)->GetId()==34241) - { - m_amount += cp * (*itr)->GetAmount(); - break; - } - } + if (AuraEffect const * aurEff = caster->GetAuraEffect(34241,0)) + m_amount += cp * aurEff->GetAmount(); + m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * cp / 100); return; } @@ -6062,7 +5673,7 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount) { case SPELLFAMILY_PRIEST: // Power Word: Shield - if(m_spellProto->SpellFamilyFlags.IsEqual(0x1, 0, 0x400)) + if(m_spellProto->SpellFamilyFlags[0] & 0x1 && m_spellProto->SpellFamilyFlags[2] & 0x400) { // +80.68% from sp bonus DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f; @@ -6070,7 +5681,7 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount) break; case SPELLFAMILY_MAGE: // ice barrier - if(m_spellProto->SpellFamilyFlags.IsEqual(0, 0x1, 0x8)) + if(m_spellProto->SpellFamilyFlags[1] & 0x1 && m_spellProto->SpellFamilyFlags[2] & 0x8) { // +80.67% from sp bonus DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8067f; @@ -6087,7 +5698,7 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount) break; case SPELLFAMILY_WARLOCK: // shadow ward - if(m_spellProto->SpellFamilyFlags.IsEqual(0, 0, 0x40)) + if(m_spellProto->SpellFamilyFlags[2]& 0x40) { // +30% from sp bonus DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.3f; @@ -6098,7 +5709,7 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount) if (m_spellProto->SpellFamilyFlags[1] & 0x80000) { // 0.75 from sp bonus - DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.75f; + DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * 0.75f; } break; default: @@ -6123,8 +5734,8 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount) Player *player = ((Player*)caster); // Glyph of Guardian Spirit - if(AuraEffect * aurEff = player->GetDummyAura(63231)) - { + if(AuraEffect * aurEff = player->GetAuraEffect(63231, 0)) + { if (GetParentAura()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) { if (!player->HasSpellCooldown(47788)) @@ -6132,7 +5743,7 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount) player->RemoveSpellCooldown(m_spellProto->Id, true); player->AddSpellCooldown(m_spellProto->Id, 0, uint32(time(NULL) + aurEff->GetAmount())); - + WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4+4); data << uint64(player->GetGUID()); data << uint8(0x0); // flags (0x1, 0x2) @@ -6172,15 +5783,15 @@ void AuraEffect::PeriodicTick() { switch(GetId()) { - case 43093: case 31956: case 38801: - case 35321: case 38363: case 39215: + case 43093: case 31956: case 38801: // Grievous Wound + case 35321: case 38363: case 39215: // Gushing Wound if(m_target->GetHealth() == m_target->GetMaxHealth() ) { m_target->RemoveAurasDueToSpell(GetId()); return; } break; - case 38772: + case 38772: // Grievous Wound { uint32 percent = GetEffIndex() < 2 && GetSpellProto()->Effect[GetEffIndex()]==SPELL_EFFECT_DUMMY ? @@ -6193,18 +5804,13 @@ void AuraEffect::PeriodicTick() } break; } - case 41337:// aura of anger + case 41337:// Aura of Anger { - Unit::AuraEffectList const& mMod = m_target->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); - for(Unit::AuraEffectList::const_iterator i = mMod.begin(); i != mMod.end(); ++i) + if (AuraEffect * aurEff = GetParentAura()->GetPartAura(1)) { - if ((*i)->GetId() == 41337) - { - (*i)->ApplyModifier(false); - (*i)->SetAmount((*i)->GetAmount()+5); - (*i)->ApplyModifier(true); - break; - } + aurEff->ApplyModifier(false, false, true); + aurEff->SetAmount(aurEff->GetAmount()+5); + aurEff->ApplyModifier(true, false, true); } m_amount = 100 * m_tickNumber; break; @@ -6410,7 +6016,7 @@ void AuraEffect::PeriodicTick() return; // heal for caster damage (must be alive) - if(m_target != pCaster && GetSpellProto()->SpellVisual[0]==163 && !pCaster->isAlive()) + if(m_target != pCaster && GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_HEALTH_FUNNEL && !pCaster->isAlive()) return; if(GetParentAura()->GetAuraDuration() ==-1 && m_target->GetHealth()==m_target->GetMaxHealth()) @@ -6471,7 +6077,7 @@ void AuraEffect::PeriodicTick() // Health Funnel // heal for caster damage - if(m_target!=pCaster && spellProto->SpellVisual[0]==163) + if(m_target!=pCaster && GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_HEALTH_FUNNEL) { uint32 dmg = spellProto->manaPerSecond; if(pCaster->GetHealth() <= dmg && pCaster->GetTypeId()==TYPEID_PLAYER) @@ -6896,165 +6502,10 @@ void AuraEffect::PeriodicDummyTick() // 7053 Forsaken Skill: Shadow return; } -// // Panda -// case 19230: break; -// // Gossip NPC Periodic - Talk -// case 33208: break; -// // Gossip NPC Periodic - Despawn -// case 33209: break; -// // Steal Weapon -// case 36207: break; -// // Simon Game START timer, (DND) -// case 39993: break; -// // Knockdown Fel Cannon: break; The Aggro Burst -// case 40119: break; -// // Old Mount Spell -// case 40154: break; -// // Magnetic Pull -// case 40581: break; -// // Ethereal Ring: break; The Bolt Burst -// case 40801: break; -// // Crystal Prison -// case 40846: break; -// // Copy Weapon -// case 41054: break; -// // Dementia -// case 41404: break; -// // Ethereal Ring Visual, Lightning Aura -// case 41477: break; -// // Ethereal Ring Visual, Lightning Aura (Fork) -// case 41525: break; -// // Ethereal Ring Visual, Lightning Jumper Aura -// case 41567: break; -// // No Man's Land -// case 41955: break; -// // Headless Horseman - Fire -// case 42074: break; -// // Headless Horseman - Visual - Large Fire -// case 42075: break; -// // Headless Horseman - Start Fire, Periodic Aura -// case 42140: break; -// // Ram Speed Boost -// case 42152: break; -// // Headless Horseman - Fires Out Victory Aura -// case 42235: break; -// // Pumpkin Life Cycle -// case 42280: break; -// // Brewfest Request Chick Chuck Mug Aura -// case 42537: break; -// // Squashling -// case 42596: break; -// // Headless Horseman Climax, Head: Periodic -// case 42603: break; -// // Fire Bomb -// case 42621: break; -// // Headless Horseman - Conflagrate, Periodic Aura -// case 42637: break; -// // Headless Horseman - Create Pumpkin Treats Aura -// case 42774: break; -// // Headless Horseman Climax - Summoning Rhyme Aura -// case 42879: break; -// // Tricky Treat -// case 42919: break; -// // Giddyup! -// case 42924: break; -// // Ram - Trot -// case 42992: break; -// // Ram - Canter -// case 42993: break; -// // Ram - Gallop -// case 42994: break; -// // Ram Level - Neutral -// case 43310: break; -// // Headless Horseman - Maniacal Laugh, Maniacal, Delayed 17 -// case 43884: break; -// // Wretched! -// case 43963: break; -// // Headless Horseman - Maniacal Laugh, Maniacal, other, Delayed 17 -// case 44000: break; -// // Energy Feedback -// case 44328: break; -// // Romantic Picnic -// case 45102: break; -// // Romantic Picnic -// case 45123: break; -// // Looking for Love -// case 45124: break; -// // Kite - Lightning Strike Kite Aura -// case 45197: break; -// // Rocket Chicken -// case 45202: break; -// // Copy Offhand Weapon -// case 45205: break; -// // Upper Deck - Kite - Lightning Periodic Aura -// case 45207: break; -// // Kite -Sky Lightning Strike Kite Aura -// case 45251: break; -// // Ribbon Pole Dancer Check Aura -// case 45390: break; -// // Holiday - Midsummer, Ribbon Pole Periodic Visual -// case 45406: break; -// // Parachute -// case 45472: break; -// // Alliance Flag, Extra Damage Debuff -// case 45898: break; -// // Horde Flag, Extra Damage Debuff -// case 45899: break; -// // Ahune - Summoning Rhyme Aura -// case 45926: break; -// // Ahune - Slippery Floor -// case 45945: break; -// // Ahune's Shield -// case 45954: break; -// // Nether Vapor Lightning -// case 45960: break; -// // Darkness -// case 45996: break; -// // Summon Blood Elves Periodic -// case 46041: break; -// // Transform Visual Missile Periodic -// case 46205: break; -// // Find Opening Beam End -// case 46333: break; -// // Ice Spear Control Aura -// case 46371: break; -// // Hailstone Chill -// case 46458: break; -// // Hailstone Chill, Internal -// case 46465: break; -// // Chill, Internal Shifter -// case 46549: break; -// // Summon Ice Spear Knockback Delayer -// case 46878: break; -// // Burninate Effect -// case 47214: break; -// // Fizzcrank Practice Parachute -// case 47228: break; -// // Send Mug Control Aura -// case 47369: break; -// // Direbrew's Disarm (precast) -// case 47407: break; -// // Mole Machine Port Schedule -// case 47489: break; -// case 47941: break; // Crystal Spike -// case 48200: break; // Healer Aura -// case 48630: break; // Summon Gauntlet Mobs Periodic -// case 49313: break; // Proximity Mine Area Aura -// // Mole Machine Portal Schedule -// case 49466: break; -// case 49555: break; // Corpse Explode -// case 49592: break; // Temporal Rift -// case 49957: break; // Cutting Laser -// case 50085: break; // Slow Fall -// // Listening to Music -// case 50493: break; -// // Love Rocket Barrage -// case 50530: break; case 58549: // Tenacity case 59911: // Tenacity (vehicle) GetParentAura()->RefreshAura(); break; -// Exist more after, need add later default: break; } @@ -7179,9 +6630,6 @@ void AuraEffect::PeriodicDummyTick() } switch (spell->Id) { - // Harpooner's Mark - // case 40084: - // return; // Feeding Frenzy Rank 1 case 53511: if ( m_target->GetHealth() * 100 < m_target->GetMaxHealth() * 35 ) @@ -7236,15 +6684,6 @@ void AuraEffect::PeriodicDummyTick() // Being pursuaded by Gargoyle - AI related? // if (spell->SpellFamilyFlags[1] & 0x00000080) // break; - // Bladed Armor - if (spell->SpellIconID == 2653) - { - // Increases your attack power by $s1 for every $s2 armor value you have. - // Calculate AP bonus (from 1 efect of this spell) - int32 apBonus = m_amount * m_target->GetArmor() / m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target); - m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, 0, true, 0, this); - return; - } // Blood of the North // Reaping // Death Rune Mastery @@ -7319,7 +6758,7 @@ void AuraEffect::HandleManaShield(bool apply, bool Real, bool changeAmount) switch(m_spellProto->SpellFamilyName) { case SPELLFAMILY_MAGE: - if(m_spellProto->SpellFamilyFlags[0] & 0x8000) + if(m_spellProto->SpellFamilyFlags[0] & 0x8000 && m_spellProto->SpellFamilyFlags[2] & 0x8) { // Mana Shield // +50% from +spd bonus @@ -7585,7 +7024,7 @@ void AuraEffect::HandleAuraSafeFall( bool Apply, bool Real , bool /*changeAmount { // implemented in WorldSession::HandleMovementOpcodes - // only special case + // Buffeting Winds of Susurrus - only special case if(Apply && Real && GetId()==32474 && m_target->GetTypeId()==TYPEID_PLAYER) ((Player*)m_target)->ActivateTaxiPathTo(506,GetId()); } |