diff --git a/Source/Game/DataStorage/DB2Manager.cs b/Source/Game/DataStorage/DB2Manager.cs index 63336da3f..d1ae657c5 100644 --- a/Source/Game/DataStorage/DB2Manager.cs +++ b/Source/Game/DataStorage/DB2Manager.cs @@ -691,7 +691,7 @@ namespace Game.DataStorage return; } - Dictionary, bool> deletedRecords = new Dictionary, bool>(); + Dictionary<(uint tableHash, int recordId), bool> deletedRecords = new Dictionary<(uint tableHash, int recordId), bool>(); uint count = 0; do @@ -702,8 +702,7 @@ namespace Game.DataStorage bool deleted = result.Read(3); if (!deleted && !_storage.ContainsKey(tableHash)) { - var key = Tuple.Create(tableHash, recordId); - if (!_hotfixBlob.Any(p => p.ContainsKey(key))) + if (!_hotfixBlob.Any(p => p.ContainsKey((tableHash, recordId)))) { Log.outError(LogFilter.Sql, $"Table `hotfix_data` references unknown DB2 store by hash 0x{tableHash:X} and has no reference to `hotfix_blob` in hotfix id {id} with RecordID: {recordId}"); continue; @@ -715,7 +714,7 @@ namespace Game.DataStorage hotfixRecord.RecordID = recordId; hotfixRecord.HotfixID = id; _hotfixData.Add(hotfixRecord); - deletedRecords[Tuple.Create(tableHash, recordId)] = deleted; + deletedRecords[(tableHash, recordId)] = deleted; ++count; } while (result.NextRow()); @@ -724,9 +723,9 @@ namespace Game.DataStorage { if (itr.Value) { - var store = _storage.LookupByKey(itr.Key.Item1); + var store = _storage.LookupByKey(itr.Key.tableHash); if (store != null) - store.EraseRecord((uint)itr.Key.Item2); + store.EraseRecord((uint)itr.Key.recordId); } } @@ -859,7 +858,7 @@ namespace Game.DataStorage { Cypher.Assert(SharedConst.IsValidLocale(locale), "Locale {locale} is invalid locale"); - return _hotfixBlob[(int)locale].LookupByKey(Tuple.Create(tableHash, recordId)); + return _hotfixBlob[(int)locale].LookupByKey((tableHash, recordId)); } public List GetHotfixOptionalData(uint tableHash, uint recordId, Locale locale) @@ -2244,9 +2243,9 @@ namespace Game.DataStorage Dictionary _storage = new Dictionary(); List _hotfixData = new List(); - Dictionary<(uint tableHas, int recordId), byte[]>[] _hotfixBlob = new Dictionary<(uint tableHas, int recordId), byte[]>[(int)Locale.Total]; + Dictionary<(uint tableHash, int recordId), byte[]>[] _hotfixBlob = new Dictionary<(uint tableHash, int recordId), byte[]>[(int)Locale.Total]; MultiMap> _allowedHotfixOptionalData = new MultiMap>(); - MultiMap<(uint tableHas, int recordId), HotfixOptionalData>[]_hotfixOptionalData = new MultiMap<(uint tableHas, int recordId), HotfixOptionalData>[(int)Locale.Total]; + MultiMap<(uint tableHash, int recordId), HotfixOptionalData>[]_hotfixOptionalData = new MultiMap<(uint tableHash, int recordId), HotfixOptionalData>[(int)Locale.Total]; MultiMap _areaGroupMembers = new MultiMap(); MultiMap _artifactPowers = new MultiMap(); diff --git a/Source/Game/Server/WorldConfig.cs b/Source/Game/Server/WorldConfig.cs index 81001a561..3f3b5f1b3 100644 --- a/Source/Game/Server/WorldConfig.cs +++ b/Source/Game/Server/WorldConfig.cs @@ -431,7 +431,7 @@ namespace Game } else if ((int)Values[WorldCfg.StartDemonHunterPlayerLevel] > (int)Values[WorldCfg.MaxPlayerLevel]) { - Log.outError(LogFilter.ServerLoading, "StartDemonHunterPlayerLevel ({0}) must be in range 98..MaxPlayerLevel({1}). Set to {2}.", + Log.outError(LogFilter.ServerLoading, "StartDemonHunterPlayerLevel ({0}) must be in range 1..MaxPlayerLevel({1}). Set to {2}.", Values[WorldCfg.StartDemonHunterPlayerLevel], Values[WorldCfg.MaxPlayerLevel], Values[WorldCfg.MaxPlayerLevel]); Values[WorldCfg.StartDemonHunterPlayerLevel] = Values[WorldCfg.MaxPlayerLevel]; } @@ -439,12 +439,12 @@ namespace Game Values[WorldCfg.StartAlliedRaceLevel] = GetDefaultValue("StartAlliedRacePlayerLevel", 10); if ((int)Values[WorldCfg.StartAlliedRaceLevel] < 1) { - Log.outError(LogFilter.ServerLoading, $"StartDemonHunterPlayerLevel ({Values[WorldCfg.StartAlliedRaceLevel]}) must be in range 1..MaxPlayerLevel({Values[WorldCfg.MaxPlayerLevel]}). Set to 1."); + Log.outError(LogFilter.ServerLoading, $"StartAlliedRaceLevel ({Values[WorldCfg.StartAlliedRaceLevel]}) must be in range 1..MaxPlayerLevel({Values[WorldCfg.MaxPlayerLevel]}). Set to 1."); Values[WorldCfg.StartAlliedRaceLevel] = 1; } else if ((int)Values[WorldCfg.StartAlliedRaceLevel] > (int)Values[WorldCfg.MaxPlayerLevel]) { - Log.outError(LogFilter.ServerLoading, $"StartDemonHunterPlayerLevel ({Values[WorldCfg.StartAlliedRaceLevel]}) must be in range 1..MaxPlayerLevel({Values[WorldCfg.MaxPlayerLevel]}). Set to {Values[WorldCfg.MaxPlayerLevel]}."); + Log.outError(LogFilter.ServerLoading, $"StartAlliedRaceLevel ({Values[WorldCfg.StartAlliedRaceLevel]}) must be in range 1..MaxPlayerLevel({Values[WorldCfg.MaxPlayerLevel]}). Set to {Values[WorldCfg.MaxPlayerLevel]}."); Values[WorldCfg.StartAlliedRaceLevel] = Values[WorldCfg.MaxPlayerLevel]; } @@ -507,12 +507,12 @@ namespace Game } Values[WorldCfg.CurrencyMaxJusticePoints] = (int)Values[WorldCfg.CurrencyMaxJusticePoints] * 100; //precision mod - Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevel] = GetDefaultValue("RecruitAFriend.MaxLevel", 85); + Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevel] = GetDefaultValue("RecruitAFriend.MaxLevel", 60); if ((int)Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevel] > (int)Values[WorldCfg.MaxPlayerLevel]) { Log.outError(LogFilter.ServerLoading, "RecruitAFriend.MaxLevel ({0}) must be in the range 0..MaxLevel({1}). Set to {2}.", - Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevel], Values[WorldCfg.MaxPlayerLevel], 85); - Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevel] = 85; + Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevel], Values[WorldCfg.MaxPlayerLevel], 60); + Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevel] = 60; } Values[WorldCfg.MaxRecruitAFriendBonusPlayerLevelDifference] = GetDefaultValue("RecruitAFriend.MaxDifference", 4);