Core/Reputation: Implemented paragon reputation

Port From (https://github.com/TrinityCore/TrinityCore/commit/b01fba4bd9530213ee0c9547e09d1f16b3ce5d67)
This commit is contained in:
hondacrx
2021-06-05 20:35:26 -04:00
parent 6ab6fc81a5
commit 21d8fbee40
8 changed files with 148 additions and 13 deletions
+10
View File
@@ -414,6 +414,10 @@ namespace Game.DataStorage
}
}
foreach (ParagonReputationRecord paragonReputation in CliDB.ParagonReputationStorage.Values)
if (CliDB.FactionStorage.HasRecord(paragonReputation.FactionID))
_paragonReputations[paragonReputation.FactionID] = paragonReputation;
foreach (var group in CliDB.PhaseXPhaseGroupStorage.Values)
{
PhaseRecord phase = CliDB.PhaseStorage.LookupByKey(group.PhaseId);
@@ -1722,6 +1726,11 @@ namespace Game.DataStorage
return 0;
}
public ParagonReputationRecord GetParagonReputation(uint factionId)
{
return _paragonReputations.LookupByKey(factionId);
}
public PvpDifficultyRecord GetBattlegroundBracketByLevel(uint mapid, uint level)
{
PvpDifficultyRecord maxEntry = null; // used for level > max listed level case
@@ -2275,6 +2284,7 @@ namespace Game.DataStorage
MultiMap<uint, MountXDisplayRecord> _mountDisplays = new();
Dictionary<uint, List<NameGenRecord>[]> _nameGenData = new();
List<string>[] _nameValidators = new List<string>[(int)Locale.Total + 1];
Dictionary<uint, ParagonReputationRecord> _paragonReputations = new();
MultiMap<uint, uint> _phasesByGroup = new();
Dictionary<PowerType, PowerTypeRecord> _powerTypes = new();
Dictionary<uint, byte> _pvpItemBonus = new();