diff options
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r-- | src/server/game/Spells/SpellScript.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index e2a54597b2e..10722473019 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -39,7 +39,7 @@ bool _SpellScript::_ValidateSpellInfo(uint32 const* begin, uint32 const* end) bool allValid = true; while (begin != end) { - if (!sSpellMgr->GetSpellInfo(*begin)) + if (!sSpellMgr->GetSpellInfo(*begin, DIFFICULTY_NONE)) { TC_LOG_ERROR("scripts.spells", "_SpellScript::ValidateSpellInfo: Spell %u does not exist.", *begin); allValid = false; @@ -685,6 +685,11 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result) m_spell->m_customError = result; } +Difficulty SpellScript::GetCastDifficulty() const +{ + return m_spell->GetCastDifficulty(); +} + SpellValue const* SpellScript::GetSpellValue() const { return m_spell->m_spellValue; @@ -692,7 +697,7 @@ SpellValue const* SpellScript::GetSpellValue() const SpellEffectInfo const* SpellScript::GetEffectInfo(SpellEffIndex effIndex) const { - return m_spell->GetEffect(effIndex); + return GetSpellInfo()->GetEffect(effIndex); } bool AuraScript::_Validate(SpellInfo const* entry) @@ -1230,3 +1235,8 @@ AuraApplication const* AuraScript::GetTargetApplication() const { return m_auraApplication; } + +Difficulty AuraScript::GetCastDifficulty() const +{ + return GetAura()->GetCastDifficulty(); +} |