Core/Misc: Change some logs from INFO to ERROR when loading invalid creature template resistances and spells

Port From (https://github.com/TrinityCore/TrinityCore/commit/0c1f707ca580fe60134092dba4e690def55762a7)
This commit is contained in:
hondacrx
2021-12-17 19:38:23 -05:00
parent 85f24d047e
commit aeb266b090
+3 -4
View File
@@ -1879,16 +1879,15 @@ namespace Game
{ {
uint creatureID = result.Read<uint>(0); uint creatureID = result.Read<uint>(0);
SpellSchools school = (SpellSchools)result.Read<byte>(1); SpellSchools school = (SpellSchools)result.Read<byte>(1);
if (school == SpellSchools.Normal || school >= SpellSchools.Max) if (school == SpellSchools.Normal || school >= SpellSchools.Max)
{ {
Log.outInfo(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this school {school} doesn't exist"); Log.outError(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this school {school} doesn't exist");
continue; continue;
} }
if (!creatureTemplateStorage.TryGetValue(creatureID, out CreatureTemplate creatureTemplate)) if (!creatureTemplateStorage.TryGetValue(creatureID, out CreatureTemplate creatureTemplate))
{ {
Log.outInfo(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this creature doesn't exist"); Log.outError(LogFilter.Sql, $"creature_template_resistance has resistance definitions for creature {creatureID} but this creature doesn't exist");
continue; continue;
} }
@@ -1922,7 +1921,7 @@ namespace Game
if (index >= SharedConst.MaxCreatureSpells) if (index >= SharedConst.MaxCreatureSpells)
{ {
Log.outInfo(LogFilter.Sql, $"creature_template_spell has spell definitions for creature {creatureID} with a incorrect index {index}"); Log.outError(LogFilter.Sql, $"creature_template_spell has spell definitions for creature {creatureID} with a incorrect index {index}");
continue; continue;
} }