diff options
-rw-r--r-- | sql/FULL/world_spell_full.sql | 6 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 8 | ||||
-rw-r--r-- | src/game/Unit.cpp | 26 |
3 files changed, 32 insertions, 8 deletions
diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index de0cfe946f0..708b17d70f4 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -1192,9 +1192,9 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 51474, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Astral Shift (Rank 1) ( 51478, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Astral Shift (Rank 2) ( 51479, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Astral Shift (Rank 3) -(51483, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0.000000, 0.000000, 0), -(51485, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0.000000, 0.000000, 0), -(51486, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0.000000, 0.000000, 0), +( 51483, 0x01, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0, 0, 0), -- Storm, Earth and Fire +( 51485, 0x01, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0, 0, 0), -- Storm, Earth and Fire +( 51486, 0x01, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0, 0, 0), -- Storm, Earth and Fire ( 51521, 0x00, 11, 0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Stormstrike ( 51522, 0x00, 11, 0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Stormstrike ( 51528, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 2.5, 0, 0), -- Maelstrom Weapon (Rank 1) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index d8471edcc6d..433a677e019 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -521,6 +521,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) damage += int32(energy * multiple); damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100); } + // Wrath + else if (m_spellInfo->SpellFamilyFlags[0] & 0x00000001) + { + // Improved Insect Swarm + if (AuraEffect const * aurEff = m_caster->GetDummyAura(SPELLFAMILY_DRUID, 1771, 0)) + if (unitTarget->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00200000)) + damage = int32(damage*(100.0f+aurEff->GetAmount())/100.0f); + } break; } case SPELLFAMILY_ROGUE: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 471709a7b2d..9e7663cba2e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5888,10 +5888,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger { if (procSpell->SpellVisual[0] == 750 && procSpell->EffectApplyAuraName[1] == 3) { - if (target->GetTypeId() == TYPEID_UNIT) + if (target->GetTypeId() == TYPEID_UNIT) { triggered_spell_id = 54820; - break; + break; } } return false; @@ -9568,10 +9568,22 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM // Custom crit by class switch(spellProto->SpellFamilyName) { + case SPELLFAMILY_DRUID: + // Starfire + if (spellProto->SpellFamilyFlags[0] & 0x4 && spellProto->SpellIconID == 1485) + { + // Improved Insect Swarm + if (AuraEffect const * aurEff = GetDummyAura(SPELLFAMILY_DRUID, 1771, 0)) + if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00000002)) + crit_chance+=aurEff->GetAmount(); + break; + } + break; case SPELLFAMILY_PALADIN: - // Sacred Shield + // Flash of light if (spellProto->SpellFamilyFlags[0] & 0x40000000) { + // Sacred Shield AuraEffect const* aura = pVictim->GetAuraEffect(58597,1); if (aura && aura->GetCasterGUID() == GetGUID()) crit_chance+=aura->GetAmount(); @@ -9599,7 +9611,6 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM break; } break; - } } break; @@ -14499,11 +14510,16 @@ void Unit::AddAura(uint32 spellId, Unit *target) return; uint8 eff_mask=0; + Unit * source = this; for(uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i) { if(spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA || IsAreaAuraEffect(spellInfo->Effect[i])) { + // Area auras applied as linked should have target as source (otherwise they'll be removed after first aura update) + if (spellInfo->Effect[i] != SPELL_EFFECT_APPLY_AURA) + source = target; + if(target->IsImmunedToSpellEffect(spellInfo, i)) continue; eff_mask|=1<<i; @@ -14514,7 +14530,7 @@ void Unit::AddAura(uint32 spellId, Unit *target) return; // Because source is not give, use caster as source - Aura *Aur = new Aura(spellInfo, eff_mask, target, this, this); + Aura *Aur = new Aura(spellInfo, eff_mask, target, source, this); target->AddAura(Aur); } |