From 581d0fd1ffbf476141efe23390ac781fc25a680c Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 24 Dec 2018 01:01:29 -0500 Subject: [PATCH] Core/Misc: Removed oldTotal from LocaleConstant --- Source/Framework/Constants/SharedConst.cs | 5 +---- Source/Game/Chat/Commands/MiscCommands.cs | 2 +- Source/Game/DataStorage/ClientReader/DB6Storage.cs | 2 +- Source/Game/Maps/GridNotifiers.cs | 2 +- Source/Game/Text/CreatureTextManager.cs | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Source/Framework/Constants/SharedConst.cs b/Source/Framework/Constants/SharedConst.cs index 09237e288..a6efd6606 100644 --- a/Source/Framework/Constants/SharedConst.cs +++ b/Source/Framework/Constants/SharedConst.cs @@ -368,10 +368,7 @@ namespace Framework.Constants None = 9, ptBR = 10, itIT = 11, - Total = 12, - - Max = 11, - OldTotal = 9// @todo convert in simple system + Total = 12 } public enum ComparisionType diff --git a/Source/Game/Chat/Commands/MiscCommands.cs b/Source/Game/Chat/Commands/MiscCommands.cs index caf00a2ae..7b3b16dab 100644 --- a/Source/Game/Chat/Commands/MiscCommands.cs +++ b/Source/Game/Chat/Commands/MiscCommands.cs @@ -263,7 +263,7 @@ namespace Game.Chat { var record = CliDB.ItemSparseStorage.Values.FirstOrDefault(itemSparse => { - for (LocaleConstant i = 0; i < LocaleConstant.Max; ++i) + for (LocaleConstant i = 0; i < LocaleConstant.Total; ++i) if (itemName == itemSparse.Display[i]) return true; return false; diff --git a/Source/Game/DataStorage/ClientReader/DB6Storage.cs b/Source/Game/DataStorage/ClientReader/DB6Storage.cs index 918b88524..055ff107a 100644 --- a/Source/Game/DataStorage/ClientReader/DB6Storage.cs +++ b/Source/Game/DataStorage/ClientReader/DB6Storage.cs @@ -169,7 +169,7 @@ namespace Game.DataStorage if (preparedStatementLocale == 0) return; - for (LocaleConstant locale = 0; locale < LocaleConstant.OldTotal; ++locale) + for (LocaleConstant locale = 0; locale < LocaleConstant.Total; ++locale) { if (Global.WorldMgr.GetDefaultDbcLocale() == locale || locale == LocaleConstant.None) continue; diff --git a/Source/Game/Maps/GridNotifiers.cs b/Source/Game/Maps/GridNotifiers.cs index ae4531561..77c07bab9 100644 --- a/Source/Game/Maps/GridNotifiers.cs +++ b/Source/Game/Maps/GridNotifiers.cs @@ -771,7 +771,7 @@ namespace Game.Maps } MessageBuilder Builder; - ServerPacket[] i_data_cache = new ServerPacket[(int)LocaleConstant.Max]; // 0 = default, i => i-1 locale index + ServerPacket[] i_data_cache = new ServerPacket[(int)LocaleConstant.Total]; // 0 = default, i => i-1 locale index } public class LocalizedPacketListDo : IDoWork diff --git a/Source/Game/Text/CreatureTextManager.cs b/Source/Game/Text/CreatureTextManager.cs index 5aa3216fb..c18421700 100644 --- a/Source/Game/Text/CreatureTextManager.cs +++ b/Source/Game/Text/CreatureTextManager.cs @@ -398,7 +398,7 @@ namespace Game if (creatureTextEntry == null) return ""; - if (locale > LocaleConstant.Max) + if (locale >= LocaleConstant.Total) locale = LocaleConstant.enUS; string baseText = "";