Core/Globals: validate creature_template mingold and maxgold fields
Port From (https://github.com/TrinityCore/TrinityCore/commit/f97e4ad1f462597a0702cfd2130fbac9c46a7eab)
This commit is contained in:
@@ -2584,6 +2584,12 @@ namespace Game
|
||||
ok = true;
|
||||
}
|
||||
|
||||
if (cInfo.MinGold > cInfo.MaxGold)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Creature (Entry: {cInfo.Entry}) has `mingold` {cInfo.MinGold} which is greater than `maxgold` {cInfo.MaxGold}, setting `maxgold` to {cInfo.MinGold}.");
|
||||
cInfo.MaxGold = cInfo.MinGold;
|
||||
}
|
||||
|
||||
if (!CliDB.FactionTemplateStorage.ContainsKey(cInfo.Faction))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Creature (Entry: {0}) has non-existing faction template ({1}). This can lead to crashes, set to faction 35", cInfo.Entry, cInfo.Faction);
|
||||
|
||||
Reference in New Issue
Block a user