class spells
This commit is contained in:
@@ -270,7 +270,9 @@ enum PriestSpells
|
||||
SPELL_PRIEST_WEAKENED_SOUL = 6788,
|
||||
SPELL_PRIEST_WHISPERING_SHADOWS = 406777,
|
||||
SPELL_PRIEST_WHISPERING_SHADOWS_DUMMY = 391286,
|
||||
SPELL_PVP_RULES_ENABLED_HARDCODED = 134735
|
||||
SPELL_PVP_RULES_ENABLED_HARDCODED = 134735,
|
||||
SPELL_PRIEST_MASTER_THE_DARKNESS = 1253590,
|
||||
SPELL_PRIEST_MASTER_THE_DARKNESS_AURA = 1253591,
|
||||
};
|
||||
|
||||
enum PriestSpellLabels
|
||||
@@ -5432,6 +5434,32 @@ class spell_pri_whispering_shadows_effect : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
//WowCommunity
|
||||
// 1253590 - Master the Darkness
|
||||
class spell_pri_master_the_darkness : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_MASTER_THE_DARKNESS_AURA });
|
||||
}
|
||||
|
||||
static bool CheckProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
return roll_chance(aurEff->GetAmount());
|
||||
}
|
||||
|
||||
void HandleOnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) const
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_MASTER_THE_DARKNESS_AURA, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckEffectProc += AuraCheckEffectProcFn(spell_pri_master_the_darkness::CheckProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_master_the_darkness::HandleOnProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_priest_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_pri_angelic_bulwark);
|
||||
@@ -5574,4 +5602,6 @@ void AddSC_priest_spell_scripts()
|
||||
RegisterSpellScript(spell_pri_void_volley);
|
||||
RegisterSpellScript(spell_pri_whispering_shadows);
|
||||
RegisterSpellScript(spell_pri_whispering_shadows_effect);
|
||||
//WowCommunity
|
||||
RegisterSpellScript(spell_pri_master_the_darkness);
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ enum WarriorSpells
|
||||
SPELL_WARRIOR_SECOND_WIND_DAMAGED = 202149,
|
||||
SPELL_WARRIOR_SECOND_WIND_HEALTH = 458245,
|
||||
SPELL_WARRIOR_CRACKLING_THUNDER = 203201,
|
||||
SPELL_WARRIOR_INDOMITABLE_HEAL = 316643,
|
||||
};
|
||||
|
||||
enum WarriorMisc
|
||||
@@ -2716,6 +2717,60 @@ class spell_warr_second_wind_proc : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 202095 - Indomitable
|
||||
class spell_warr_indomitable : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WARRIOR_INDOMITABLE_HEAL })
|
||||
&& ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 }, { spellInfo->Id, EFFECT_1 } })
|
||||
&& spellInfo->GetEffect(EFFECT_0).IsAura()
|
||||
&& spellInfo->GetEffect(EFFECT_1).IsAura();
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
Spell const* procSpell = eventInfo.GetProcSpell();
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
_rageAccumulator += procSpell->GetPowerTypeCostAmount(POWER_RAGE).value_or(0);
|
||||
return _rageAccumulator >= GetEffect(EFFECT_1)->GetAmount();
|
||||
}
|
||||
|
||||
void HandleProc(ProcEventInfo const& eventInfo)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
|
||||
int32 threshold = GetEffect(EFFECT_1)->GetAmount();
|
||||
if (threshold <= 0)
|
||||
return;
|
||||
|
||||
int32 healPct = GetEffect(EFFECT_0)->GetAmount() / 10;
|
||||
AuraEffect const* aurEff = GetEffect(EFFECT_0);
|
||||
|
||||
while (_rageAccumulator >= threshold)
|
||||
{
|
||||
_rageAccumulator -= threshold;
|
||||
|
||||
target->CastSpell(target, SPELL_WARRIOR_INDOMITABLE_HEAL,
|
||||
CastSpellExtraArgs()
|
||||
.SetTriggerFlags(TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR)
|
||||
.SetTriggeringAura(aurEff)
|
||||
.AddSpellMod(SPELLVALUE_BASE_POINT0, healPct));
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_warr_indomitable::CheckProc);
|
||||
OnProc += AuraProcFn(spell_warr_indomitable::HandleProc);
|
||||
}
|
||||
|
||||
private:
|
||||
int32 _rageAccumulator = 0;
|
||||
};
|
||||
|
||||
void AddSC_warrior_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_warr_anger_management_proc);
|
||||
@@ -2795,4 +2850,5 @@ void AddSC_warrior_spell_scripts()
|
||||
RegisterSpellScript(spell_warr_rend);
|
||||
RegisterSpellScript(spell_warr_defensive_stance);
|
||||
RegisterSpellScript(spell_warr_second_wind_proc);
|
||||
RegisterSpellScript(spell_warr_indomitable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user