Core/Spells: move paladins judgements to spellscripts

This commit is contained in:
joschiwald committed 2014-01-26 23:56:53 +01:00
1 parent db2718cccb
commit 6dc15294e2
6 files changed
+86 -69

No files matched your search

+3 -3
View File
@@ -1022,7 +1022,7 @@ class spell_dru_wild_growth : public SpellScriptLoader
bool Validate(SpellInfo const* spellInfo) OVERRIDE
{
if (spellInfo->Effects[EFFECT_2].IsEffect() || !spellInfo->Effects[EFFECT_2].CalcValue())
if (spellInfo->Effects[EFFECT_2].IsEffect() || spellInfo->Effects[EFFECT_2].CalcValue() <= 0)
return false;
return true;
}
@@ -1031,9 +1031,9 @@ class spell_dru_wild_growth : public SpellScriptLoader
{
targets.remove_if(RaidCheck(GetCaster()));
int32 const maxTargets = GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster());
uint32 const maxTargets = uint32(GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster()));
if (targets.size() > uint32(maxTargets))
if (targets.size() > maxTargets)
{
targets.sort(Trinity::HealthPctOrderPred());
targets.resize(maxTargets);