mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Spells: Holy Word: Sanctuary will now diminish when having 6 or more targets
*Surge of Light will now properly get removed when Flash Heal has been casted
This commit is contained in:
7
sql/updates/world/custom/custom_2018_07_10_00_world.sql
Normal file
7
sql/updates/world/custom/custom_2018_07_10_00_world.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_pri_holy_word_sanctuary_triggered';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(88686, 'spell_pri_holy_word_sanctuary_triggered');
|
||||
|
||||
DELETE FROM `spell_proc` WHERE `SpellId`= 88688;
|
||||
INSERT INTO `spell_proc` (`SpellId`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`, `Cooldown`, `Charges`, `Chance`) VALUES
|
||||
(88688, 6, 0x00000800, 0x0, 0x0, 0x00004000, 1, 1, 0, 0, 0, 1, 100);
|
||||
@@ -1411,6 +1411,7 @@ class spell_pri_chakra : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 81206 - Chakra: Sanctuary
|
||||
class spell_pri_chakra_sanctuary : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pri_chakra_sanctuary);
|
||||
@@ -1431,6 +1432,7 @@ class spell_pri_chakra_sanctuary : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 81585 - Chakra: Serenity
|
||||
class spell_pri_chakra_serenity_script : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_chakra_serenity_script);
|
||||
@@ -1452,6 +1454,7 @@ class spell_pri_chakra_serenity_script : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 88685 - Holy Word: Sanctuary
|
||||
class spell_pri_holy_word_sanctuary : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pri_holy_word_sanctuary);
|
||||
@@ -1464,7 +1467,7 @@ class spell_pri_holy_word_sanctuary : public AuraScript
|
||||
void HandleDummyTick(AuraEffect const* aurEff)
|
||||
{
|
||||
if (DynamicObject* dyn = GetTarget()->GetDynObject(aurEff->GetId()))
|
||||
GetTarget()->CastSpell(dyn->GetPositionX(), dyn->GetPositionY(), dyn->GetPositionZ(), SPELL_PRIEST_HOLY_WORD_SANCTUARY, true, nullptr, aurEff);
|
||||
GetTarget()->CastSpell(dyn->GetPositionX(), dyn->GetPositionY(), dyn->GetPositionZ(), SPELL_PRIEST_HOLY_WORD_SANCTUARY, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_DISALLOW_PROC_EVENTS), nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1473,6 +1476,38 @@ class spell_pri_holy_word_sanctuary : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 88686 - Holy Word: Sanctuary
|
||||
class spell_pri_holy_word_sanctuary_triggered : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_holy_word_sanctuary_triggered);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_targets = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetHitHeal() && _targets > 6)
|
||||
SetHitHeal(GetHitHeal() / _targets);
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
_targets = unitList.size();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_holy_word_sanctuary_triggered::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ALLY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_holy_word_sanctuary_triggered::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _targets;
|
||||
};
|
||||
|
||||
void AddSC_priest_spell_scripts()
|
||||
{
|
||||
new spell_pri_body_and_soul();
|
||||
@@ -1490,6 +1525,7 @@ void AddSC_priest_spell_scripts()
|
||||
new spell_pri_item_greater_heal_refund();
|
||||
new spell_pri_guardian_spirit();
|
||||
RegisterAuraScript(spell_pri_holy_word_sanctuary);
|
||||
RegisterSpellScript(spell_pri_holy_word_sanctuary_triggered);
|
||||
new spell_pri_leap_of_faith_effect_trigger();
|
||||
new spell_pri_lightwell_renew();
|
||||
new spell_pri_mana_leech();
|
||||
|
||||
Reference in New Issue
Block a user