mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 16:03:45 +00:00
fix(Core/Spells): show Execute/Slam misses/dodges/parries in combat log (#7494)
- Closes #7428.
This commit is contained in:
@@ -241,8 +241,13 @@ public:
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem();
|
||||
}
|
||||
|
||||
void HandleBeforeHit()
|
||||
void HandleBeforeHit(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Unit* target = GetHitUnit())
|
||||
// Deadly Poison
|
||||
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0x80000, 0, GetCaster()->GetGUID()))
|
||||
@@ -305,7 +310,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
BeforeHit += SpellHitFn(spell_rog_deadly_poison_SpellScript::HandleBeforeHit);
|
||||
BeforeHit += BeforeSpellHitFn(spell_rog_deadly_poison_SpellScript::HandleBeforeHit);
|
||||
AfterHit += SpellHitFn(spell_rog_deadly_poison_SpellScript::HandleAfterHit);
|
||||
}
|
||||
|
||||
|
||||
@@ -557,8 +557,13 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleBanish()
|
||||
void HandleBanish(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
if (target->GetAuraEffect(SPELL_AURA_SCHOOL_IMMUNITY, SPELLFAMILY_WARLOCK, 0, 0x08000000, 0))
|
||||
@@ -580,7 +585,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
BeforeHit += SpellHitFn(spell_warl_banish_SpellScript::HandleBanish);
|
||||
BeforeHit += BeforeSpellHitFn(spell_warl_banish_SpellScript::HandleBanish);
|
||||
AfterHit += SpellHitFn(spell_warl_banish_SpellScript::RemoveAura);
|
||||
}
|
||||
|
||||
|
||||
@@ -396,6 +396,20 @@ public:
|
||||
return ValidateSpellInfo({ SPELL_WARRIOR_SLAM });
|
||||
}
|
||||
|
||||
void SendMiss(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
caster->SendSpellMiss(target, SPELL_WARRIOR_SLAM, missInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetHitUnit())
|
||||
@@ -404,6 +418,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
BeforeHit += BeforeSpellHitFn(spell_warr_slam_SpellScript::SendMiss);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_warr_slam_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
@@ -465,6 +480,20 @@ public:
|
||||
return ValidateSpellInfo({ SPELL_WARRIOR_EXECUTE, SPELL_WARRIOR_GLYPH_OF_EXECUTION });
|
||||
}
|
||||
|
||||
void SendMiss(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
caster->SendSpellMiss(target, SPELL_WARRIOR_EXECUTE, missInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
@@ -493,6 +522,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
BeforeHit += BeforeSpellHitFn(spell_warr_execute_SpellScript::SendMiss);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_warr_execute_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user