mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Units: downgraded power types enum and disabled Death Knight rune regeneration mechanics for the time being
This commit is contained in:
@@ -97,9 +97,11 @@ class spell_dk_advantage_t10_4p : public AuraScript
|
||||
if (!player || caster->GetClass() != CLASS_DEATH_KNIGHT)
|
||||
return false;
|
||||
|
||||
/*
|
||||
for (uint8 i = 0; i < player->GetMaxPower(POWER_RUNES); ++i)
|
||||
if (player->GetRuneCooldown(i) == 0)
|
||||
return false;
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -182,16 +182,6 @@ class spell_mage_arcane_barrage : public SpellScript
|
||||
&& ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
|
||||
}
|
||||
|
||||
void ConsumeArcaneCharges()
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
// Consume all arcane charges
|
||||
if (int32 arcaneCharges = -caster->ModifyPower(POWER_ARCANE_CHARGES, -caster->GetMaxPower(POWER_ARCANE_CHARGES), false))
|
||||
if (AuraEffect const* auraEffect = caster->GetAuraEffect(SPELL_MAGE_ARCANE_BARRAGE_R3, EFFECT_0, caster->GetGUID()))
|
||||
caster->CastSpell(caster, SPELL_MAGE_ARCANE_BARRAGE_ENERGIZE, { SPELLVALUE_BASE_POINT0, arcaneCharges * auraEffect->GetAmount() / 100 });
|
||||
}
|
||||
|
||||
void HandleEffectHitTarget(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetHitUnit()->GetGUID() != _primaryTarget)
|
||||
@@ -207,7 +197,6 @@ class spell_mage_arcane_barrage : public SpellScript
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_arcane_barrage::HandleEffectHitTarget, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
OnEffectLaunchTarget += SpellEffectFn(spell_mage_arcane_barrage::MarkPrimaryTarget, EFFECT_1, SPELL_EFFECT_DUMMY);
|
||||
AfterCast += SpellCastFn(spell_mage_arcane_barrage::ConsumeArcaneCharges);
|
||||
}
|
||||
|
||||
ObjectGuid _primaryTarget;
|
||||
|
||||
@@ -465,9 +465,6 @@ class spell_pal_divine_purpose : public AuraScript
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
if (!procSpell->HasPowerTypeCost(POWER_HOLY_POWER))
|
||||
return false;
|
||||
|
||||
return roll_chance_i(aurEff->GetAmount());
|
||||
}
|
||||
|
||||
@@ -636,14 +633,6 @@ class spell_pal_fist_of_justice : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_PALADIN_HAMMER_OF_JUSTICE });
|
||||
}
|
||||
|
||||
bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (Spell const* procSpell = eventInfo.GetProcSpell())
|
||||
return procSpell->HasPowerTypeCost(POWER_HOLY_POWER);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& /*procInfo*/)
|
||||
{
|
||||
int32 value = aurEff->GetAmount() / 10;
|
||||
@@ -653,7 +642,6 @@ class spell_pal_fist_of_justice : public AuraScript
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckEffectProc += AuraCheckEffectProcFn(spell_pal_fist_of_justice::CheckEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pal_fist_of_justice::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
@@ -1255,16 +1243,6 @@ class spell_pal_righteous_protector : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_PALADIN_AVENGING_WRATH, SPELL_PALADIN_GUARDIAN_OF_ANCIENT_KINGS });
|
||||
}
|
||||
|
||||
bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (SpellInfo const* procSpell = eventInfo.GetSpellInfo())
|
||||
_baseHolyPowerCost = procSpell->CalcPowerCost(POWER_HOLY_POWER, false, eventInfo.GetActor(), eventInfo.GetSchoolMask());
|
||||
else
|
||||
_baseHolyPowerCost.reset();
|
||||
|
||||
return _baseHolyPowerCost.has_value();
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
int32 value = aurEff->GetAmount() * 100 * _baseHolyPowerCost->Amount;
|
||||
@@ -1275,7 +1253,6 @@ class spell_pal_righteous_protector : public AuraScript
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckEffectProc += AuraCheckEffectProcFn(spell_pal_righteous_protector::CheckEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pal_righteous_protector::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
|
||||
@@ -1306,9 +1283,6 @@ class spell_pal_selfless_healer : public AuraScript
|
||||
{
|
||||
bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (Spell const* procSpell = eventInfo.GetProcSpell())
|
||||
return procSpell->HasPowerTypeCost(POWER_HOLY_POWER);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -143,20 +143,11 @@ class spell_sha_aftershock : public AuraScript
|
||||
|
||||
bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (Spell const* procSpell = eventInfo.GetProcSpell())
|
||||
if (Optional<int32> cost = procSpell->GetPowerTypeCostAmount(POWER_MAELSTROM))
|
||||
return cost > 0 && roll_chance_i(aurEff->GetAmount());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Spell const* procSpell = eventInfo.GetProcSpell();
|
||||
int32 energize = *procSpell->GetPowerTypeCostAmount(POWER_MAELSTROM);
|
||||
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHAMAN_AFTERSHOCK_ENERGIZE, CastSpellExtraArgs(energize)
|
||||
.AddSpellMod(SPELLVALUE_BASE_POINT0, energize));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user