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
@@ -75,7 +75,7 @@ namespace Game.Entities
base.InitStats(duration);
// Get spell cast by totem
SpellInfo totemSpell = Global.SpellMgr.GetSpellInfo(GetSpell());
SpellInfo totemSpell = Global.SpellMgr.GetSpellInfo(GetSpell(), GetMap().GetDifficultyID());
if (totemSpell != null)
if (totemSpell.CalcCastTime(GetLevel()) != 0) // If spell has cast time . its an active totem
m_type = TotemType.Active;
@@ -124,7 +124,7 @@ namespace Game.Entities
{
owner.SendAutoRepeatCancel(this);
SpellInfo spell = Global.SpellMgr.GetSpellInfo(m_unitData.CreatedBySpell);
SpellInfo spell = Global.SpellMgr.GetSpellInfo(m_unitData.CreatedBySpell, GetMap().GetDifficultyID());
if (spell != null)
GetSpellHistory().SendCooldownEvent(spell, 0, null, false);
@@ -149,7 +149,7 @@ namespace Game.Entities
if (GetEntry() == 5925)
return false;
SpellEffectInfo effect = spellInfo.GetEffect(GetMap().GetDifficultyID(), index);
SpellEffectInfo effect = spellInfo.GetEffect(index);
if (effect == null)
return true;