mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
fix(Core/Spells): show Execute/Slam misses/dodges/parries in combat log (#7494)
- Closes #7428.
This commit is contained in:
@@ -1594,8 +1594,13 @@ public:
|
||||
targets.push_back(caster);
|
||||
}
|
||||
|
||||
void HandleBeforeHit()
|
||||
void HandleBeforeHit(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
if (!GetCaster() || target->GetGUID() == GetCaster()->GetGUID())
|
||||
@@ -1640,7 +1645,7 @@ public:
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_brewfest_toss_mug_SpellScript::CheckCast);
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_brewfest_toss_mug_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||
BeforeHit += SpellHitFn(spell_brewfest_toss_mug_SpellScript::HandleBeforeHit);
|
||||
BeforeHit += BeforeSpellHitFn(spell_brewfest_toss_mug_SpellScript::HandleBeforeHit);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_brewfest_toss_mug_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1672,15 +1672,20 @@ public:
|
||||
{
|
||||
PrepareSpellScript(spell_valanar_kinetic_bomb_knockback_SpellScript);
|
||||
|
||||
void KnockIntoAir()
|
||||
void KnockIntoAir(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Creature* target = GetHitCreature())
|
||||
target->AI()->DoAction(ACTION_KINETIC_BOMB_JUMP);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
BeforeHit += SpellHitFn(spell_valanar_kinetic_bomb_knockback_SpellScript::KnockIntoAir);
|
||||
BeforeHit += BeforeSpellHitFn(spell_valanar_kinetic_bomb_knockback_SpellScript::KnockIntoAir);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -862,8 +862,13 @@ public:
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
}
|
||||
|
||||
void OnCast()
|
||||
void OnCast(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetCaster()->GetTypeId() != TYPEID_PLAYER || GetCaster()->GetMapId() != 631)
|
||||
return;
|
||||
InstanceScript* instance = GetCaster()->GetInstanceScript();
|
||||
@@ -899,7 +904,7 @@ public:
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_blood_queen_vampiric_bite_SpellScript::CheckTarget);
|
||||
BeforeHit += SpellHitFn(spell_blood_queen_vampiric_bite_SpellScript::OnCast);
|
||||
BeforeHit += BeforeSpellHitFn(spell_blood_queen_vampiric_bite_SpellScript::OnCast);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_blood_queen_vampiric_bite_SpellScript::HandlePresence, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2626,15 +2626,20 @@ public:
|
||||
{
|
||||
PrepareSpellScript(spell_igb_below_zero_SpellScript);
|
||||
|
||||
void RemovePassengers()
|
||||
void RemovePassengers(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GetHitUnit()->SetPower(POWER_ENERGY, 0);
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_EJECT_ALL_PASSENGERS, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
BeforeHit += SpellHitFn(spell_igb_below_zero_SpellScript::RemovePassengers);
|
||||
BeforeHit += BeforeSpellHitFn(spell_igb_below_zero_SpellScript::RemovePassengers);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1973,8 +1973,13 @@ public:
|
||||
targets.resize(1);
|
||||
}
|
||||
|
||||
void CheckAura()
|
||||
void CheckAura(SpellMissInfo missInfo)
|
||||
{
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetHitUnit()->HasAura(GetSpellInfo()->Id))
|
||||
_hadJumpingAura = true;
|
||||
else if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, GetHitUnit()))
|
||||
@@ -1998,7 +2003,7 @@ public:
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_necrotic_plague_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||
BeforeHit += SpellHitFn(spell_the_lich_king_necrotic_plague_SpellScript::CheckAura);
|
||||
BeforeHit += BeforeSpellHitFn(spell_the_lich_king_necrotic_plague_SpellScript::CheckAura);
|
||||
OnHit += SpellHitFn(spell_the_lich_king_necrotic_plague_SpellScript::AddMissingStack);
|
||||
}
|
||||
|
||||
|
||||
@@ -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