From ba8d4661fdd3bd20b8746e2da40d9c320c55fd5c Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 6 Mar 2018 11:34:28 -0500 Subject: [PATCH] Core/Items: PvP item levels basic implementation --- .../Constants/Update/UpdateFields.cs | 2 +- .../Database/Databases/HotfixDatabase.cs | 5 ++++ Source/Game/BattleGrounds/BattleGround.cs | 2 +- .../Game/BattleGrounds/BattleGroundManager.cs | 2 +- .../Game/BattleGrounds/BattleGroundQueue.cs | 4 +-- Source/Game/DataStorage/CliDB.cs | 6 +++-- Source/Game/DataStorage/DB2Manager.cs | 19 +++++++++---- Source/Game/DataStorage/Structs/P_Records.cs | 9 ++++++- Source/Game/Entities/Item/Item.cs | 27 ++++++++++++++++--- Source/Game/Entities/Player/Player.Fields.cs | 1 + Source/Game/Entities/Player/Player.Items.cs | 18 +++++++++++++ Source/Game/Entities/Player/Player.PvP.cs | 8 ++++++ Source/Game/Entities/Player/Player.Spells.cs | 4 +-- Source/Game/Entities/Player/Player.cs | 2 ++ Source/Game/Groups/Group.cs | 6 ++--- Source/Game/Handlers/BattleGroundHandler.cs | 8 +++--- 16 files changed, 97 insertions(+), 26 deletions(-) diff --git a/Source/Framework/Constants/Update/UpdateFields.cs b/Source/Framework/Constants/Update/UpdateFields.cs index aa7ecb316..bdfb00b29 100644 --- a/Source/Framework/Constants/Update/UpdateFields.cs +++ b/Source/Framework/Constants/Update/UpdateFields.cs @@ -156,7 +156,7 @@ namespace Framework.Constants HoverHeight = ObjectFields.End + 0x0b3, // Size: 1, Flags: Public MinItemLevelCutoff = ObjectFields.End + 0x0b4, // Size: 1, Flags: Public MinItemLevel = ObjectFields.End + 0x0b5, // Size: 1, Flags: Public - Maxitemlevel = ObjectFields.End + 0x0b6, // Size: 1, Flags: Public + MaxItemlevel = ObjectFields.End + 0x0b6, // Size: 1, Flags: Public WildBattlepetLevel = ObjectFields.End + 0x0b7, // Size: 1, Flags: Public BattlepetCompanionNameTimestamp = ObjectFields.End + 0x0b8, // Size: 1, Flags: Public InteractSpellid = ObjectFields.End + 0x0b9, // Size: 1, Flags: Public diff --git a/Source/Framework/Database/Databases/HotfixDatabase.cs b/Source/Framework/Database/Databases/HotfixDatabase.cs index 476f93376..4431fa853 100644 --- a/Source/Framework/Database/Databases/HotfixDatabase.cs +++ b/Source/Framework/Database/Databases/HotfixDatabase.cs @@ -690,6 +690,9 @@ namespace Framework.Database // PvpDifficulty.db2 PrepareStatement(HotfixStatements.SEL_PVP_DIFFICULTY, "SELECT ID, BracketID, MinLevel, MaxLevel, MapID FROM pvp_difficulty ORDER BY ID DESC"); + // PvpItem.db2 + PrepareStatement(HotfixStatements.SEL_PVP_ITEM, "SELECT ID, ItemID, ItemLevelBonus FROM pvp_item ORDER BY ID DESC"); + // PvpReward.db2 PrepareStatement(HotfixStatements.SEL_PVP_REWARD, "SELECT ID, HonorLevel, Prestige, RewardPackID FROM pvp_reward ORDER BY ID DESC"); @@ -1391,6 +1394,8 @@ namespace Framework.Database SEL_PVP_DIFFICULTY, + SEL_PVP_ITEM, + SEL_PVP_REWARD, SEL_PVP_TALENT, diff --git a/Source/Game/BattleGrounds/BattleGround.cs b/Source/Game/BattleGrounds/BattleGround.cs index ccb0973c5..73fdf7423 100644 --- a/Source/Game/BattleGrounds/BattleGround.cs +++ b/Source/Game/BattleGrounds/BattleGround.cs @@ -1756,7 +1756,7 @@ namespace Game.BattleGrounds } } - public void SetBracket(PVPDifficultyRecord bracketEntry) + public void SetBracket(PvpDifficultyRecord bracketEntry) { m_BracketId = bracketEntry.GetBracketId(); SetLevelRange(bracketEntry.MinLevel, bracketEntry.MaxLevel); diff --git a/Source/Game/BattleGrounds/BattleGroundManager.cs b/Source/Game/BattleGrounds/BattleGroundManager.cs index e70e9d176..16ade7ddd 100644 --- a/Source/Game/BattleGrounds/BattleGroundManager.cs +++ b/Source/Game/BattleGrounds/BattleGroundManager.cs @@ -249,7 +249,7 @@ namespace Game.BattleGrounds } // create a new Battleground that will really be used to play - public Battleground CreateNewBattleground(BattlegroundTypeId originalBgTypeId, PVPDifficultyRecord bracketEntry, ArenaTypes arenaType, bool isRated) + public Battleground CreateNewBattleground(BattlegroundTypeId originalBgTypeId, PvpDifficultyRecord bracketEntry, ArenaTypes arenaType, bool isRated) { BattlegroundTypeId bgTypeId = GetRandomBG(originalBgTypeId); diff --git a/Source/Game/BattleGrounds/BattleGroundQueue.cs b/Source/Game/BattleGrounds/BattleGroundQueue.cs index 03b6273c5..95411d0f0 100644 --- a/Source/Game/BattleGrounds/BattleGroundQueue.cs +++ b/Source/Game/BattleGrounds/BattleGroundQueue.cs @@ -55,7 +55,7 @@ namespace Game.BattleGrounds } // add group or player (grp == null) to bg queue with the given leader and bg specifications - public GroupQueueInfo AddGroup(Player leader, Group grp, BattlegroundTypeId BgTypeId, PVPDifficultyRecord bracketEntry, ArenaTypes ArenaType, bool isRated, bool isPremade, uint ArenaRating, uint MatchmakerRating, uint arenateamid = 0) + public GroupQueueInfo AddGroup(Player leader, Group grp, BattlegroundTypeId BgTypeId, PvpDifficultyRecord bracketEntry, ArenaTypes ArenaType, bool isRated, bool isPremade, uint ArenaRating, uint MatchmakerRating, uint arenateamid = 0) { BattlegroundBracketId bracketId = bracketEntry.GetBracketId(); @@ -776,7 +776,7 @@ namespace Game.BattleGrounds return; } - PVPDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketById(bg_template.GetMapId(), bracket_id); + PvpDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketById(bg_template.GetMapId(), bracket_id); if (bracketEntry == null) { Log.outError(LogFilter.Battleground, "Battleground: Update: bg bracket entry not found for map {0} bracket id {1}", bg_template.GetMapId(), bracket_id); diff --git a/Source/Game/DataStorage/CliDB.cs b/Source/Game/DataStorage/CliDB.cs index 716deb7c4..9a3ab64ad 100644 --- a/Source/Game/DataStorage/CliDB.cs +++ b/Source/Game/DataStorage/CliDB.cs @@ -181,7 +181,8 @@ namespace Game.DataStorage PowerDisplayStorage = DBReader.Read("PowerDisplay.db2", HotfixStatements.SEL_POWER_DISPLAY); PowerTypeStorage = DBReader.Read("PowerType.db2", HotfixStatements.SEL_POWER_TYPE); PrestigeLevelInfoStorage = DBReader.Read("PrestigeLevelInfo.db2", HotfixStatements.SEL_PRESTIGE_LEVEL_INFO, HotfixStatements.SEL_PRESTIGE_LEVEL_INFO_LOCALE); - PVPDifficultyStorage = DBReader.Read("PVPDifficulty.db2", HotfixStatements.SEL_PVP_DIFFICULTY); + PvpDifficultyStorage = DBReader.Read("PVPDifficulty.db2", HotfixStatements.SEL_PVP_DIFFICULTY); + PvpItemStorage = DBReader.Read("PVPItem.db2", HotfixStatements.SEL_PVP_ITEM); PvpRewardStorage = DBReader.Read("PvpReward.db2", HotfixStatements.SEL_PVP_REWARD); PvpTalentStorage = DBReader.Read("PvpTalent.db2", HotfixStatements.SEL_PVP_TALENT, HotfixStatements.SEL_PVP_TALENT_LOCALE); PvpTalentUnlockStorage = DBReader.Read("PvpTalentUnlock.db2", HotfixStatements.SEL_PVP_TALENT_UNLOCK); @@ -512,7 +513,8 @@ namespace Game.DataStorage public static DB6Storage PowerDisplayStorage; public static DB6Storage PowerTypeStorage; public static DB6Storage PrestigeLevelInfoStorage; - public static DB6Storage PVPDifficultyStorage; + public static DB6Storage PvpDifficultyStorage; + public static DB6Storage PvpItemStorage; public static DB6Storage PvpRewardStorage; public static DB6Storage PvpTalentStorage; public static DB6Storage PvpTalentUnlockStorage; diff --git a/Source/Game/DataStorage/DB2Manager.cs b/Source/Game/DataStorage/DB2Manager.cs index cfa29ffa9..5c0bed071 100644 --- a/Source/Game/DataStorage/DB2Manager.cs +++ b/Source/Game/DataStorage/DB2Manager.cs @@ -345,6 +345,9 @@ namespace Game.DataStorage _powerTypes[powerType.PowerTypeEnum] = powerType; } + foreach (PvpItemRecord pvpItem in CliDB.PvpItemStorage.Values) + _pvpItemBonus[pvpItem.ItemID] = pvpItem.ItemLevelBonus; + foreach (PvpRewardRecord pvpReward in CliDB.PvpRewardStorage.Values) _pvpRewardPack[Tuple.Create((uint)pvpReward.Prestige, (uint)pvpReward.HonorLevel)] = pvpReward.RewardPackID; @@ -1142,10 +1145,10 @@ namespace Game.DataStorage return max; } - public PVPDifficultyRecord GetBattlegroundBracketByLevel(uint mapid, uint level) + public PvpDifficultyRecord GetBattlegroundBracketByLevel(uint mapid, uint level) { - PVPDifficultyRecord maxEntry = null; // used for level > max listed level case - foreach (var entry in CliDB.PVPDifficultyStorage.Values) + PvpDifficultyRecord maxEntry = null; // used for level > max listed level case + foreach (var entry in CliDB.PvpDifficultyStorage.Values) { // skip unrelated and too-high brackets if (entry.MapID != mapid || entry.MinLevel > level) @@ -1163,9 +1166,9 @@ namespace Game.DataStorage return maxEntry; } - public PVPDifficultyRecord GetBattlegroundBracketById(uint mapid, BattlegroundBracketId id) + public PvpDifficultyRecord GetBattlegroundBracketById(uint mapid, BattlegroundBracketId id) { - foreach (var entry in CliDB.PVPDifficultyStorage.Values) + foreach (var entry in CliDB.PvpDifficultyStorage.Values) if (entry.MapID == mapid && entry.GetBracketId() == id) return entry; @@ -1243,6 +1246,11 @@ namespace Game.DataStorage return null; } + public byte GetPvpItemLevelBonus(uint itemId) + { + return _pvpItemBonus.LookupByKey(itemId); + } + public List GetRewardPackItemsByRewardID(uint rewardPackID) { return _rewardPackItems.LookupByKey(rewardPackID); @@ -1513,6 +1521,7 @@ namespace Game.DataStorage List[] _nameValidators = new List[(int)LocaleConstant.Total + 1]; MultiMap _phasesByGroup = new MultiMap(); Dictionary _powerTypes = new Dictionary(); + Dictionary _pvpItemBonus = new Dictionary(); Dictionary, uint> _pvpRewardPack = new Dictionary, uint>(); List[][][] _pvpTalentsByPosition = new List[(int)Class.Max][][]; uint[][] _pvpTalentUnlock = new uint[PlayerConst.MaxPvpTalentTiers][]; diff --git a/Source/Game/DataStorage/Structs/P_Records.cs b/Source/Game/DataStorage/Structs/P_Records.cs index 516188272..0a452f854 100644 --- a/Source/Game/DataStorage/Structs/P_Records.cs +++ b/Source/Game/DataStorage/Structs/P_Records.cs @@ -156,7 +156,7 @@ namespace Game.DataStorage public bool IsDisabled() { return Flags.HasAnyFlag(PrestigeLevelInfoFlags.Disabled); } } - public sealed class PVPDifficultyRecord + public sealed class PvpDifficultyRecord { public uint Id; public byte BracketID; @@ -168,6 +168,13 @@ namespace Game.DataStorage public BattlegroundBracketId GetBracketId() { return (BattlegroundBracketId)BracketID; } } + public sealed class PvpItemRecord + { + public uint Id; + public uint ItemID; + public byte ItemLevelBonus; + } + public sealed class PvpRewardRecord { public uint Id; diff --git a/Source/Game/Entities/Item/Item.cs b/Source/Game/Entities/Item/Item.cs index 8683f9c3a..d7cbd0f4a 100644 --- a/Source/Game/Entities/Item/Item.cs +++ b/Source/Game/Entities/Item/Item.cs @@ -1975,10 +1975,16 @@ namespace Game.Entities public uint GetItemLevel(Player owner) { - return GetItemLevel(GetTemplate(), _bonusData, owner.getLevel(), GetModifier(ItemModifier.ScalingStatDistributionFixedLevel), GetModifier(ItemModifier.UpgradeId)); + uint minItemLevel = owner.GetUInt32Value(UnitFields.MinItemLevel); + uint minItemLevelCutoff = owner.GetUInt32Value(UnitFields.MinItemLevelCutoff); + uint maxItemLevel = GetTemplate().GetFlags3().HasAnyFlag(ItemFlags3.IgnoreItemLevelCapInPvp) ? 0 : owner.GetUInt32Value(UnitFields.MaxItemlevel); + bool pvpBonus = owner.IsUsingPvpItemLevels(); + return GetItemLevel(GetTemplate(), _bonusData, owner.getLevel(), GetModifier(ItemModifier.ScalingStatDistributionFixedLevel), GetModifier(ItemModifier.UpgradeId), + minItemLevel, minItemLevelCutoff, maxItemLevel, pvpBonus); } - public static uint GetItemLevel(ItemTemplate itemTemplate, BonusData bonusData, uint level, uint fixedLevel, uint upgradeId) + public static uint GetItemLevel(ItemTemplate itemTemplate, BonusData bonusData, uint level, uint fixedLevel, uint upgradeId, + uint minItemLevel, uint minItemLevelCutoff, uint maxItemLevel, bool pvpBonus) { if (itemTemplate == null) return 1; @@ -2004,12 +2010,25 @@ namespace Game.Entities itemLevel += (uint)bonusData.ItemLevelBonus; + for (uint i = 0; i < ItemConst.MaxGemSockets; ++i) + itemLevel += bonusData.GemItemLevelBonus[i]; + + uint itemLevelBeforeUpgrades = itemLevel; ItemUpgradeRecord upgrade = CliDB.ItemUpgradeStorage.LookupByKey(upgradeId); if (upgrade != null) itemLevel += upgrade.ItemLevelBonus; - for (uint i = 0; i < ItemConst.MaxGemSockets; ++i) - itemLevel += bonusData.GemItemLevelBonus[i]; + if (pvpBonus) + itemLevel += Global.DB2Mgr.GetPvpItemLevelBonus(itemTemplate.GetId()); + + if (itemTemplate.GetInventoryType() != InventoryType.NonEquip) + { + if (minItemLevel != 0 && (minItemLevelCutoff == 0 || itemLevelBeforeUpgrades >= minItemLevelCutoff) && itemLevel < minItemLevel) + itemLevel = minItemLevel; + + if (maxItemLevel != 0 && itemLevel > maxItemLevel) + itemLevel = maxItemLevel; + } return Math.Min(Math.Max(itemLevel, 1), 1300); } diff --git a/Source/Game/Entities/Player/Player.Fields.cs b/Source/Game/Entities/Player/Player.Fields.cs index be8e972e7..e62ba365a 100644 --- a/Source/Game/Entities/Player/Player.Fields.cs +++ b/Source/Game/Entities/Player/Player.Fields.cs @@ -65,6 +65,7 @@ namespace Game.Entities uint m_ArenaTeamIdInvited; long m_lastHonorUpdateTime; uint m_contestedPvPTimer; + bool _usePvpItemLevels; //Groups/Raids GroupReference m_group = new GroupReference(); diff --git a/Source/Game/Entities/Player/Player.Items.cs b/Source/Game/Entities/Player/Player.Items.cs index 64decf350..47d915507 100644 --- a/Source/Game/Entities/Player/Player.Items.cs +++ b/Source/Game/Entities/Player/Player.Items.cs @@ -6713,5 +6713,23 @@ namespace Game.Entities return null; } + + //Misc + void UpdateItemLevelAreaBasedScaling() + { + // @todo Activate pvp item levels during world pvp + Map map = GetMap(); + bool pvpActivity = map.IsBattlegroundOrArena() || ((int)map.GetEntry().Flags[1]).HasAnyFlag(0x40) || HasPvpRulesEnabled(); + + if (_usePvpItemLevels != pvpActivity) + { + float healthPct = GetHealthPct(); + _RemoveAllItemMods(); + ActivatePvpItemLevels(pvpActivity); + _ApplyAllItemMods(); + SetHealth(MathFunctions.CalculatePct(GetMaxHealth(), healthPct)); + } + // @todo other types of power scaling such as timewalking + } } } diff --git a/Source/Game/Entities/Player/Player.PvP.cs b/Source/Game/Entities/Player/Player.PvP.cs index 2c8c1c540..46b0b7dfd 100644 --- a/Source/Game/Entities/Player/Player.PvP.cs +++ b/Source/Game/Entities/Player/Player.PvP.cs @@ -334,6 +334,9 @@ namespace Game.Entities public uint GetHonorLevel() { return GetUInt32Value(PlayerFields.HonorLevel); } public bool IsMaxHonorLevelAndPrestige() { return IsMaxPrestige() && GetHonorLevel() == PlayerConst.MaxHonorLevel; } + public void ActivatePvpItemLevels(bool activate) { _usePvpItemLevels = activate; } + public bool IsUsingPvpItemLevels() { return _usePvpItemLevels; } + void ResetPvpTalents() { foreach (var talentInfo in CliDB.PvpTalentStorage.Values) @@ -489,6 +492,8 @@ namespace Game.Entities aura.SetDuration(-1); } } + + UpdateItemLevelAreaBasedScaling(); } void DisablePvpRules() @@ -498,7 +503,10 @@ namespace Game.Entities return; if (GetCombatTimer() == 0) + { RemoveAurasDueToSpell(PlayerConst.SpellPvpRulesEnabled); + UpdateItemLevelAreaBasedScaling(); + } else { Aura aura = GetAura(PlayerConst.SpellPvpRulesEnabled); diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index dac96b91e..0fd5188d7 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -651,7 +651,7 @@ namespace Game.Entities if (pEnchant.ScalingClass != 0) { int scalingClass = pEnchant.ScalingClass; - if ((GetUInt32Value(UnitFields.MinItemLevel) != 0 || GetUInt32Value(UnitFields.Maxitemlevel) != 0) && pEnchant.ScalingClassRestricted != 0) + if ((GetUInt32Value(UnitFields.MinItemLevel) != 0 || GetUInt32Value(UnitFields.MaxItemlevel) != 0) && pEnchant.ScalingClassRestricted != 0) scalingClass = pEnchant.ScalingClassRestricted; uint minLevel = ((uint)(pEnchant.Flags)).HasAnyFlag(0x20u) ? 1 : 60u; @@ -691,7 +691,7 @@ namespace Game.Entities if (pEnchant.ScalingClass != 0) { int scalingClass = pEnchant.ScalingClass; - if ((GetUInt32Value(UnitFields.MinItemLevel) != 0 || GetUInt32Value(UnitFields.Maxitemlevel) != 0) && pEnchant.ScalingClassRestricted != 0) + if ((GetUInt32Value(UnitFields.MinItemLevel) != 0 || GetUInt32Value(UnitFields.MaxItemlevel) != 0) && pEnchant.ScalingClassRestricted != 0) scalingClass = pEnchant.ScalingClassRestricted; uint minLevel = ((uint)(pEnchant.Flags)).HasAnyFlag(0x20u) ? 1 : 60u; diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index e8b35a0ad..1ff30ec32 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -5702,6 +5702,8 @@ namespace Game.Entities if (_garrison != null) _garrison.SendRemoteInfo(); + + UpdateItemLevelAreaBasedScaling(); } public bool CanSpeak() diff --git a/Source/Game/Groups/Group.cs b/Source/Game/Groups/Group.cs index b241188f1..74228f46b 100644 --- a/Source/Game/Groups/Group.cs +++ b/Source/Game/Groups/Group.cs @@ -1705,7 +1705,7 @@ namespace Game.Groups if (!reference) return GroupJoinBattlegroundResult.JoinFailed; - PVPDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bgOrTemplate.GetMapId(), reference.getLevel()); + PvpDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bgOrTemplate.GetMapId(), reference.getLevel()); if (bracketEntry == null) return GroupJoinBattlegroundResult.JoinFailed; @@ -1729,7 +1729,7 @@ namespace Game.Groups return GroupJoinBattlegroundResult.JoinTimedOut; } // not in the same Battleground level braket, don't let join - PVPDifficultyRecord memberBracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bracketEntry.MapID, member.getLevel()); + PvpDifficultyRecord memberBracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bracketEntry.MapID, member.getLevel()); if (memberBracketEntry != bracketEntry) return GroupJoinBattlegroundResult.JoinRangeIndex; // don't let join rated matches if the arena team id doesn't match @@ -2633,7 +2633,7 @@ namespace Game.Groups BonusData bonusData = new BonusData(itemInstance); ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(itemid); - uint itemLevel = Item.GetItemLevel(itemTemplate, bonusData, player.getLevel(), 0, lootItemInSlot.upgradeId); + uint itemLevel = Item.GetItemLevel(itemTemplate, bonusData, player.getLevel(), 0, lootItemInSlot.upgradeId, 0, 0, 0, false); return Item.GetDisenchantLoot(itemTemplate, (uint)bonusData.Quality, itemLevel); } diff --git a/Source/Game/Handlers/BattleGroundHandler.cs b/Source/Game/Handlers/BattleGroundHandler.cs index 79f8d254f..297281aa3 100644 --- a/Source/Game/Handlers/BattleGroundHandler.cs +++ b/Source/Game/Handlers/BattleGroundHandler.cs @@ -89,7 +89,7 @@ namespace Game return; // expected bracket entry - PVPDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); + PvpDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); if (bracketEntry == null) return; @@ -302,7 +302,7 @@ namespace Game bgTypeId = bg.GetTypeID(); // expected bracket entry - PVPDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); + PvpDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); if (bracketEntry == null) return; @@ -466,7 +466,7 @@ namespace Game continue; // expected bracket entry - PVPDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); + PvpDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); if (bracketEntry == null) continue; @@ -503,7 +503,7 @@ namespace Game BattlegroundTypeId bgTypeId = bg.GetTypeID(); BattlegroundQueueTypeId bgQueueTypeId = Global.BattlegroundMgr.BGQueueTypeId(bgTypeId, arenatype); - PVPDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); + PvpDifficultyRecord bracketEntry = Global.DB2Mgr.GetBattlegroundBracketByLevel(bg.GetMapId(), GetPlayer().getLevel()); if (bracketEntry == null) return;