Spells/Scripts: Updated Gift of the Naaru script
Port From (https://github.com/TrinityCore/TrinityCore/commit/d2b70397ab98fe8a24a5880b757a50e3736787d3)
This commit is contained in:
@@ -1445,30 +1445,14 @@ namespace Scripts.Spells.Generic
|
||||
if (!GetCaster() || aurEff.GetTotalTicks() == 0)
|
||||
return;
|
||||
|
||||
float heal = 0.0f;
|
||||
switch (GetSpellInfo().SpellFamilyName)
|
||||
SpellEffectInfo eff1 = GetSpellInfo().GetEffect(1);
|
||||
if (eff1 != null)
|
||||
{
|
||||
case SpellFamilyNames.Mage:
|
||||
case SpellFamilyNames.Warlock:
|
||||
case SpellFamilyNames.Priest:
|
||||
heal = 1.885f * (GetCaster().SpellBaseDamageBonusDone(GetSpellInfo().GetSchoolMask()));
|
||||
break;
|
||||
case SpellFamilyNames.Paladin:
|
||||
case SpellFamilyNames.Shaman:
|
||||
heal = Math.Max(1.885f * (GetCaster().SpellBaseDamageBonusDone(GetSpellInfo().GetSchoolMask())), 1.1f * (GetCaster().GetTotalAttackPowerValue(WeaponAttackType.BaseAttack)));
|
||||
break;
|
||||
case SpellFamilyNames.Warrior:
|
||||
case SpellFamilyNames.Hunter:
|
||||
case SpellFamilyNames.Deathknight:
|
||||
heal = 1.1f * (Math.Max(GetCaster().GetTotalAttackPowerValue(WeaponAttackType.BaseAttack), GetCaster().GetTotalAttackPowerValue(WeaponAttackType.RangedAttack)));
|
||||
break;
|
||||
case SpellFamilyNames.Generic:
|
||||
default:
|
||||
break;
|
||||
float healPct = eff1.CalcValue() / 100.0f;
|
||||
float heal = healPct * GetCaster().GetMaxHealth();
|
||||
int healTick = (int)Math.Floor(heal / aurEff.GetTotalTicks());
|
||||
amount += healTick;
|
||||
}
|
||||
|
||||
int healTick = (int)Math.Floor(heal / aurEff.GetTotalTicks());
|
||||
amount += Math.Max(healTick, 0);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_gen_gift_of_naaru';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(28880, 'spell_gen_gift_of_naaru'), -- Warrior
|
||||
(59542, 'spell_gen_gift_of_naaru'), -- Paladin
|
||||
(59543, 'spell_gen_gift_of_naaru'), -- Hunter
|
||||
(59544, 'spell_gen_gift_of_naaru'), -- Priest
|
||||
(59545, 'spell_gen_gift_of_naaru'), -- Death Knight
|
||||
(59547, 'spell_gen_gift_of_naaru'), -- Shaman
|
||||
(59548, 'spell_gen_gift_of_naaru'), -- Mage
|
||||
(121093, 'spell_gen_gift_of_naaru'); -- Monk
|
||||
Reference in New Issue
Block a user