Scripts/Spells: Moved Blessing of Faith script to spell_items
Port From (https://github.com/TrinityCore/TrinityCore/commit/af0edf5afc2bc41b87f2408868f8bc5c2a3065e3)
This commit is contained in:
@@ -37,6 +37,12 @@ namespace Scripts.Spells.Items
|
|||||||
//ZezzaksShard
|
//ZezzaksShard
|
||||||
public const uint EyeOfGrillok = 38495;
|
public const uint EyeOfGrillok = 38495;
|
||||||
|
|
||||||
|
// LowerCityPrayerbook
|
||||||
|
public const uint BlessingOfLowerCityDruid = 37878;
|
||||||
|
public const uint BlessingOfLowerCityPaladin = 37879;
|
||||||
|
public const uint BlessingOfLowerCityPriest = 37880;
|
||||||
|
public const uint BlessingOfLowerCityShaman = 37881;
|
||||||
|
|
||||||
//Alchemiststone
|
//Alchemiststone
|
||||||
public const uint AlchemistStoneExtraHeal = 21399;
|
public const uint AlchemistStoneExtraHeal = 21399;
|
||||||
public const uint AlchemistStoneExtraMana = 21400;
|
public const uint AlchemistStoneExtraMana = 21400;
|
||||||
@@ -586,6 +592,49 @@ namespace Scripts.Spells.Items
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 37877 - Blessing of Faith
|
||||||
|
class spell_item_blessing_of_faith : SpellScript
|
||||||
|
{
|
||||||
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo(SpellIds.BlessingOfLowerCityDruid, SpellIds.BlessingOfLowerCityPaladin, SpellIds.BlessingOfLowerCityPriest, SpellIds.BlessingOfLowerCityShaman);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleDummy(uint effIndex)
|
||||||
|
{
|
||||||
|
Unit unitTarget = GetHitUnit();
|
||||||
|
if (unitTarget != null)
|
||||||
|
{
|
||||||
|
uint spellId = 0;
|
||||||
|
switch (unitTarget.GetClass())
|
||||||
|
{
|
||||||
|
case Class.Druid:
|
||||||
|
spellId = SpellIds.BlessingOfLowerCityDruid;
|
||||||
|
break;
|
||||||
|
case Class.Paladin:
|
||||||
|
spellId = SpellIds.BlessingOfLowerCityPaladin;
|
||||||
|
break;
|
||||||
|
case Class.Priest:
|
||||||
|
spellId = SpellIds.BlessingOfLowerCityPriest;
|
||||||
|
break;
|
||||||
|
case Class.Shaman:
|
||||||
|
spellId = SpellIds.BlessingOfLowerCityShaman;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return; // ignore for non-healing classes
|
||||||
|
}
|
||||||
|
|
||||||
|
Unit caster = GetCaster();
|
||||||
|
caster.CastSpell(caster, spellId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectHitTarget.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Item - 13503: Alchemist's Stone
|
// Item - 13503: Alchemist's Stone
|
||||||
// Item - 35748: Guardian's Alchemist Stone
|
// Item - 35748: Guardian's Alchemist Stone
|
||||||
// Item - 35749: Sorcerer's Alchemist Stone
|
// Item - 35749: Sorcerer's Alchemist Stone
|
||||||
|
|||||||
@@ -32,10 +32,6 @@ namespace Scripts.Spells.Paladin
|
|||||||
public const uint AvengingWrath = 31884;
|
public const uint AvengingWrath = 31884;
|
||||||
public const uint BeaconOfLight = 53563;
|
public const uint BeaconOfLight = 53563;
|
||||||
public const uint BeaconOfLightHeal = 53652;
|
public const uint BeaconOfLightHeal = 53652;
|
||||||
public const uint BlessingOfLowerCityDruid = 37878;
|
|
||||||
public const uint BlessingOfLowerCityPaladin = 37879;
|
|
||||||
public const uint BlessingOfLowerCityPriest = 37880;
|
|
||||||
public const uint BlessingOfLowerCityShaman = 37881;
|
|
||||||
public const uint BlindingLightEffect = 105421;
|
public const uint BlindingLightEffect = 105421;
|
||||||
public const uint ConcentractionAura = 19746;
|
public const uint ConcentractionAura = 19746;
|
||||||
public const uint ConsecratedGroundPassive = 204054;
|
public const uint ConsecratedGroundPassive = 204054;
|
||||||
@@ -100,49 +96,6 @@ namespace Scripts.Spells.Paladin
|
|||||||
public const uint HolyShockHealCrit = 83880;
|
public const uint HolyShockHealCrit = 83880;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 37877 - Blessing of Faith
|
|
||||||
[Script]
|
|
||||||
class spell_pal_blessing_of_faith : SpellScript
|
|
||||||
{
|
|
||||||
public override bool Validate(SpellInfo spellInfo)
|
|
||||||
{
|
|
||||||
return ValidateSpellInfo(SpellIds.BlessingOfLowerCityDruid, SpellIds.BlessingOfLowerCityPaladin, SpellIds.BlessingOfLowerCityPriest, SpellIds.BlessingOfLowerCityShaman);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleDummy(uint effIndex)
|
|
||||||
{
|
|
||||||
Unit unitTarget = GetHitUnit();
|
|
||||||
if (unitTarget)
|
|
||||||
{
|
|
||||||
uint spell_id;
|
|
||||||
switch (unitTarget.GetClass())
|
|
||||||
{
|
|
||||||
case Class.Druid:
|
|
||||||
spell_id = SpellIds.BlessingOfLowerCityDruid;
|
|
||||||
break;
|
|
||||||
case Class.Paladin:
|
|
||||||
spell_id = SpellIds.BlessingOfLowerCityPaladin;
|
|
||||||
break;
|
|
||||||
case Class.Priest:
|
|
||||||
spell_id = SpellIds.BlessingOfLowerCityPriest;
|
|
||||||
break;
|
|
||||||
case Class.Shaman:
|
|
||||||
spell_id = SpellIds.BlessingOfLowerCityShaman;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return; // ignore for non-healing classes
|
|
||||||
}
|
|
||||||
Unit caster = GetCaster();
|
|
||||||
caster.CastSpell(caster, spell_id, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHitTarget.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1022 - Blessing of Protection
|
// 1022 - Blessing of Protection
|
||||||
[Script] // 204018 - Blessing of Spellwarding
|
[Script] // 204018 - Blessing of Spellwarding
|
||||||
class spell_pal_blessing_of_protection : SpellScript
|
class spell_pal_blessing_of_protection : SpellScript
|
||||||
|
|||||||
Reference in New Issue
Block a user