Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower

Port From (https://github.com/TrinityCore/TrinityCore/commit/c7306439e7004288fb85890d6a5f730cf1761d71)
This commit is contained in:
hondacrx
2020-06-18 12:39:39 -04:00
parent f0942a257e
commit d7954f4fc7
89 changed files with 1738 additions and 1893 deletions
+3 -3
View File
@@ -106,7 +106,7 @@ namespace Game.Entities
for (byte i = 0; i < SharedConst.MaxCreatureSpells; ++i)
{
uint spellId = _unit.ToCreature().m_spells[i];
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellId);
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellId, _unit.GetMap().GetDifficultyID());
if (spellInfo != null)
{
if (spellInfo.IsPassive())
@@ -133,7 +133,7 @@ namespace Game.Entities
for (uint x = 0; x < SharedConst.MaxSpellCharm; ++x)
{
uint spellId = _unit.ToCreature().m_spells[x];
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellId);
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellId, _unit.GetMap().GetDifficultyID());
if (spellInfo == null)
{
@@ -260,7 +260,7 @@ namespace Game.Entities
// check correctness
if (PetActionBar[index].IsActionBarForSpell())
{
SpellInfo spelInfo = Global.SpellMgr.GetSpellInfo(PetActionBar[index].GetAction());
SpellInfo spelInfo = Global.SpellMgr.GetSpellInfo(PetActionBar[index].GetAction(), _unit.GetMap().GetDifficultyID());
if (spelInfo == null)
SetActionBar(index, 0, ActiveStates.Passive);
else if (!spelInfo.IsAutocastable())