mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user