Core/Misc: Removed oldTotal from LocaleConstant

This commit is contained in:
hondacrx
2018-12-24 01:01:29 -05:00
parent f414068883
commit 581d0fd1ff
5 changed files with 5 additions and 8 deletions
+1 -4
View File
@@ -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
+1 -1
View File
@@ -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;
@@ -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;
+1 -1
View File
@@ -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<Player>
+1 -1
View File
@@ -398,7 +398,7 @@ namespace Game
if (creatureTextEntry == null)
return "";
if (locale > LocaleConstant.Max)
if (locale >= LocaleConstant.Total)
locale = LocaleConstant.enUS;
string baseText = "";