Core/Spells: Do not proc spells with PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_(NEG|POS) if there is no target, reimplemented Storm, Earth and Fire talent in another way
Closes #3367 Closes #2424 If you find more spells that are broken because of this, please notify us Signed-off-by: Subv <[email protected]>
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
DELETE FROM `spell_proc_event` WHERE `entry` IN (51486,51485,51483);
|
||||||
@@ -7356,20 +7356,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||||||
triggered_spell_id = 63685;
|
triggered_spell_id = 63685;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Storm, Earth and Fire
|
|
||||||
if (dummySpell->SpellIconID == 3063)
|
|
||||||
{
|
|
||||||
// Earthbind Totem summon only
|
|
||||||
if (procSpell->Id != 2484)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
float chance = (float)triggerAmount;
|
|
||||||
if (!roll_chance_f(chance))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
triggered_spell_id = 64695;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// Ancestral Awakening
|
// Ancestral Awakening
|
||||||
if (dummySpell->SpellIconID == 3065)
|
if (dummySpell->SpellIconID == 3065)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3427,36 +3427,6 @@ void Spell::_handle_immediate_phase()
|
|||||||
// process items
|
// process items
|
||||||
for (std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
|
for (std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
|
||||||
DoAllEffectOnTarget(&(*ihit));
|
DoAllEffectOnTarget(&(*ihit));
|
||||||
|
|
||||||
if (!m_originalCaster)
|
|
||||||
return;
|
|
||||||
// Handle procs on cast
|
|
||||||
// TODO: finish new proc system:P
|
|
||||||
if (m_UniqueTargetInfo.empty())
|
|
||||||
{
|
|
||||||
uint32 procAttacker = m_procAttacker;
|
|
||||||
if (!procAttacker)
|
|
||||||
{
|
|
||||||
bool positive = m_spellInfo->IsPositive();
|
|
||||||
switch (m_spellInfo->DmgClass)
|
|
||||||
{
|
|
||||||
case SPELL_DAMAGE_CLASS_MAGIC:
|
|
||||||
if (positive)
|
|
||||||
procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS;
|
|
||||||
else
|
|
||||||
procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG;
|
|
||||||
break;
|
|
||||||
case SPELL_DAMAGE_CLASS_NONE:
|
|
||||||
if (positive)
|
|
||||||
procAttacker |= PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS;
|
|
||||||
else
|
|
||||||
procAttacker |= PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Proc damage for spells which have only dest targets (2484 should proc 51486 for example)
|
|
||||||
m_originalCaster->ProcDamageAndSpell(NULL, procAttacker, 0, m_procEx | PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::_handle_finish_phase()
|
void Spell::_handle_finish_phase()
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ enum ShamanSpells
|
|||||||
SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349,
|
SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349,
|
||||||
SHAMAN_SPELL_SATED = 57724,
|
SHAMAN_SPELL_SATED = 57724,
|
||||||
SHAMAN_SPELL_EXHAUSTION = 57723,
|
SHAMAN_SPELL_EXHAUSTION = 57723,
|
||||||
|
|
||||||
|
SHAMAN_SPELL_STORM_EARTH_AND_FIRE = 51483,
|
||||||
|
EARTHBIND_TOTEM_SPELL_EARTHGRAB = 64695,
|
||||||
|
|
||||||
// For Earthen Power
|
// For Earthen Power
|
||||||
SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474,
|
SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474,
|
||||||
@@ -221,9 +224,25 @@ class spell_sha_earthbind_totem : public SpellScriptLoader
|
|||||||
caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff);
|
caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Apply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (!GetCaster())
|
||||||
|
return;
|
||||||
|
Player* owner = GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||||
|
if (!owner)
|
||||||
|
return;
|
||||||
|
// Storm, Earth and Fire
|
||||||
|
if (AuraEffect* aurEff = owner->GetAuraEffectOfRankedSpell(SHAMAN_SPELL_STORM_EARTH_AND_FIRE, EFFECT_1))
|
||||||
|
{
|
||||||
|
if (roll_chance_i(aurEff->GetAmount()))
|
||||||
|
GetCaster()->CastSpell(GetCaster(), EARTHBIND_TOTEM_SPELL_EARTHGRAB, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
{
|
{
|
||||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_earthbind_totem_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_earthbind_totem_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||||
|
OnEffectApply += AuraEffectApplyFn(spell_sha_earthbind_totem_AuraScript::Apply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user