Core/DataStores: Removed overriding field sign type based on db2 column compression
Port From (https://github.com/TrinityCore/TrinityCore/commit/89f490bdcdf88c2576c17218926e89b1082ae682)
This commit is contained in:
@@ -467,8 +467,8 @@ namespace Framework.Constants
|
||||
RaidRaidFinder = 4,
|
||||
RaidHeroic = 5,
|
||||
RaidMythic = 6,
|
||||
PvpUnranked1 = 7,
|
||||
PvpRanked1Unrated = 8,
|
||||
PVPUnranked1 = 7,
|
||||
PVPRanked1Unrated = 8,
|
||||
ScenarioNormal = 9,
|
||||
ScenarioHeroic = 10,
|
||||
QuestReward = 11,
|
||||
@@ -476,7 +476,7 @@ namespace Framework.Constants
|
||||
TradeSkill = 13,
|
||||
Vendor = 14,
|
||||
BlackMarket = 15,
|
||||
MythicplusEndOfRun = 16,
|
||||
MythicPlusEndofRun = 16,
|
||||
DungeonLvlUp1 = 17,
|
||||
DungeonLvlUp2 = 18,
|
||||
DungeonLvlUp3 = 19,
|
||||
@@ -493,36 +493,36 @@ namespace Framework.Constants
|
||||
WorldQuest6 = 30,
|
||||
MissionReward1 = 31,
|
||||
MissionReward2 = 32,
|
||||
MythicplusEndOfRunTimeChest = 33,
|
||||
ZzchallengeMode3 = 34,
|
||||
MythicplusJackpot = 35,
|
||||
MythicPlusEndofRunTimeChest = 33,
|
||||
MythicPlusTimewalkingEndofRun = 34,
|
||||
MythicPlusJackpot = 35,
|
||||
WorldQuest7 = 36,
|
||||
WorldQuest8 = 37,
|
||||
PvpRanked2Combatant = 38,
|
||||
PvpRanked3Challenger = 39,
|
||||
PvpRanked4Rival = 40,
|
||||
PvpUnranked2 = 41,
|
||||
PVPRanked2Combatant = 38,
|
||||
PVPRanked4Challenger = 39,
|
||||
PVPRanked6Rival = 40,
|
||||
PVPUnranked2 = 41,
|
||||
WorldQuest9 = 42,
|
||||
WorldQuest10 = 43,
|
||||
PvpRanked5Duelist = 44,
|
||||
PvpRanked6Elite = 45,
|
||||
PvpRanked7 = 46,
|
||||
PvpUnranked3 = 47,
|
||||
PvpUnranked4 = 48,
|
||||
PvpUnranked5 = 49,
|
||||
PvpUnranked6 = 50,
|
||||
PvpUnranked7 = 51,
|
||||
PvpRanked8 = 52,
|
||||
PVPRanked8Duelist = 44,
|
||||
PVPRanked9Elite = 45,
|
||||
PVPRanked3Combatant = 46,
|
||||
PVPUnranked3 = 47,
|
||||
PVPUnranked4 = 48,
|
||||
PVPUnranked5 = 49,
|
||||
PVPUnranked6 = 50,
|
||||
PVPUnranked7 = 51,
|
||||
PVPRanked5Challenger = 52,
|
||||
WorldQuest11 = 53,
|
||||
WorldQuest12 = 54,
|
||||
WorldQuest13 = 55,
|
||||
PvpRankedJackpot = 56,
|
||||
TournamentRealm = 57,
|
||||
PVPRankedJackpot = 56,
|
||||
TournamentRealm1 = 57,
|
||||
Relinquished = 58,
|
||||
LegendaryForge = 59,
|
||||
QuestBonusLoot = 60,
|
||||
CharacterBoostBfa = 61,
|
||||
CharacterBoostShadowlands = 62,
|
||||
CharacterBoostDragonflight70 = 61,
|
||||
CharacterBoostShadowlands50 = 62,
|
||||
LegendaryCrafting1 = 63,
|
||||
LegendaryCrafting2 = 64,
|
||||
LegendaryCrafting3 = 65,
|
||||
@@ -537,8 +537,8 @@ namespace Framework.Constants
|
||||
WorldQuestJackpot = 74,
|
||||
NewCharacter = 75,
|
||||
WarMode = 76,
|
||||
PvpBrawl1 = 77,
|
||||
PvpBrawl2 = 78,
|
||||
PvPBrawl1 = 77,
|
||||
PvPBrawl2 = 78,
|
||||
Torghast = 79,
|
||||
CorpseRecovery = 80,
|
||||
WorldBoss = 81,
|
||||
@@ -546,9 +546,9 @@ namespace Framework.Constants
|
||||
RaidRaidFinderExtended = 83,
|
||||
RaidHeroicExtended = 84,
|
||||
RaidMythicExtended = 85,
|
||||
CharacterTemplate91 = 86,
|
||||
ChallengeMode4 = 87,
|
||||
PvpRanked9 = 88,
|
||||
CharacterBoostShadowlands60 = 86,
|
||||
MythicPlusTimewalkingEndofRunTimeChest = 87,
|
||||
PvpRanked7Rival = 88,
|
||||
RaidNormalExtended2 = 89,
|
||||
RaidFinderExtended2 = 90,
|
||||
RaidHeroicExtended2 = 91,
|
||||
@@ -569,6 +569,62 @@ namespace Framework.Constants
|
||||
Delves2 = 106,
|
||||
Delves3 = 107,
|
||||
DelvesJackpot = 108,
|
||||
DelvesKey1 = 109,
|
||||
DelvesKey2 = 110,
|
||||
DelvesKey3 = 111,
|
||||
DelvesKey4 = 112,
|
||||
DelvesKey5 = 113,
|
||||
DelvesKey6 = 114,
|
||||
DelvesKey7 = 115,
|
||||
DelvesKey8 = 116,
|
||||
DelvesBounty1 = 117,
|
||||
DelvesBounty2 = 118,
|
||||
DelvesBounty3 = 119,
|
||||
DelvesBounty4 = 120,
|
||||
DelvesBounty5 = 121,
|
||||
DelvesBounty6 = 122,
|
||||
DelvesBounty7 = 123,
|
||||
DelvesBounty8 = 124,
|
||||
DelvesLevelUp1 = 125,
|
||||
DelvesLevelUp2 = 126,
|
||||
DelvesLevelUp3 = 127,
|
||||
DelvesLevelUp4 = 128,
|
||||
DelvesBonus1 = 129,
|
||||
DelvesBonus2 = 130,
|
||||
DelvesBonus3 = 131,
|
||||
DelvesBonus4 = 132,
|
||||
DelvesBonus5 = 133,
|
||||
DelvesBonus6 = 134,
|
||||
DelvesBonus7 = 135,
|
||||
DelvesBonus8 = 136,
|
||||
DelvesBonus9 = 137,
|
||||
DelvesBonus10 = 138,
|
||||
DungeonBonus1 = 139,
|
||||
DungeonBonus2 = 140,
|
||||
DungeonBonus3 = 141,
|
||||
DungeonBonus4 = 142,
|
||||
DungeonBonus5 = 143,
|
||||
DungeonBonus6 = 144,
|
||||
DungeonBonus7 = 145,
|
||||
DungeonBonus8 = 146,
|
||||
DungeonBonus9 = 147,
|
||||
DungeonBonus10 = 148,
|
||||
RaidBonus1 = 149,
|
||||
RaidBonus2 = 150,
|
||||
RaidBonus3 = 151,
|
||||
RaidBonus4 = 152,
|
||||
RaidBonus5 = 153,
|
||||
RaidBonus6 = 154,
|
||||
RaidBonus7 = 155,
|
||||
RaidBonus8 = 156,
|
||||
RaidBonus9 = 157,
|
||||
RaidBonus10 = 158,
|
||||
DungeonHardMode1 = 159,
|
||||
DungeonHardMode2 = 160,
|
||||
DungeonHardMode3 = 161,
|
||||
TournamentRealm2 = 162,
|
||||
TournamentRealm3 = 163,
|
||||
TournamentRealm4 = 164,
|
||||
|
||||
Max
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ namespace Game.DataStorage
|
||||
if (node.HasFlag(TaxiNodeFlags.ShowOnAllianceMap))
|
||||
AllianceTaxiNodesMask[field] |= submask;
|
||||
|
||||
int uiMapId;
|
||||
uint uiMapId;
|
||||
if (!Global.DB2Mgr.GetUiMapPosition(node.Pos.X, node.Pos.Y, node.Pos.Z, node.ContinentID, 0, 0, 0, UiMapSystem.Adventure, false, out uiMapId))
|
||||
Global.DB2Mgr.GetUiMapPosition(node.Pos.X, node.Pos.Y, node.Pos.Z, node.ContinentID, 0, 0, 0, UiMapSystem.Taxi, false, out uiMapId);
|
||||
|
||||
|
||||
@@ -575,7 +575,7 @@ namespace Game.DataStorage
|
||||
_uiMapAssignmentByWmoGroup[i] = new MultiMap<int, UiMapAssignmentRecord>();
|
||||
}
|
||||
|
||||
MultiMap<int, UiMapAssignmentRecord> uiMapAssignmentByUiMap = new();
|
||||
MultiMap<uint, UiMapAssignmentRecord> uiMapAssignmentByUiMap = new();
|
||||
foreach (UiMapAssignmentRecord uiMapAssignment in UiMapAssignmentStorage.Values)
|
||||
{
|
||||
uiMapAssignmentByUiMap.Add(uiMapAssignment.UiMapID, uiMapAssignment);
|
||||
@@ -594,9 +594,9 @@ namespace Game.DataStorage
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary<Tuple<int, uint>, UiMapLinkRecord> uiMapLinks = new();
|
||||
Dictionary<Tuple<uint, int>, UiMapLinkRecord> uiMapLinks = new();
|
||||
foreach (UiMapLinkRecord uiMapLink in UiMapLinkStorage.Values)
|
||||
uiMapLinks[Tuple.Create(uiMapLink.ParentUiMapID, (uint)uiMapLink.ChildUiMapID)] = uiMapLink;
|
||||
uiMapLinks[Tuple.Create(uiMapLink.ParentUiMapID, uiMapLink.ChildUiMapID)] = uiMapLink;
|
||||
|
||||
foreach (UiMapRecord uiMap in UiMapStorage.Values)
|
||||
{
|
||||
@@ -1022,7 +1022,7 @@ namespace Game.DataStorage
|
||||
return broadcastText.Text[SharedConst.DefaultLocale];
|
||||
}
|
||||
|
||||
public int GetBroadcastTextDuration(int broadcastTextId, Locale locale = Locale.enUS)
|
||||
public int GetBroadcastTextDuration(uint broadcastTextId, Locale locale = Locale.enUS)
|
||||
{
|
||||
return _broadcastTextDurations.LookupByKey((broadcastTextId, SharedConst.WowLocaleToCascLocaleBit[(int)locale]));
|
||||
}
|
||||
@@ -2185,7 +2185,7 @@ namespace Game.DataStorage
|
||||
return nearestMapAssignment.UiMapAssignment;
|
||||
}
|
||||
|
||||
Vector2 CalculateGlobalUiMapPosition(int uiMapID, Vector2 uiPosition)
|
||||
Vector2 CalculateGlobalUiMapPosition(uint uiMapID, Vector2 uiPosition)
|
||||
{
|
||||
UiMapRecord uiMap = UiMapStorage.LookupByKey(uiMapID);
|
||||
while (uiMap != null)
|
||||
@@ -2211,14 +2211,14 @@ namespace Game.DataStorage
|
||||
return GetUiMapPosition(x, y, z, mapId, areaId, wmoDoodadPlacementId, wmoGroupId, system, local, out _, out newPos);
|
||||
}
|
||||
|
||||
public bool GetUiMapPosition(float x, float y, float z, int mapId, int areaId, int wmoDoodadPlacementId, int wmoGroupId, UiMapSystem system, bool local, out int uiMapId)
|
||||
public bool GetUiMapPosition(float x, float y, float z, int mapId, int areaId, int wmoDoodadPlacementId, int wmoGroupId, UiMapSystem system, bool local, out uint uiMapId)
|
||||
{
|
||||
return GetUiMapPosition(x, y, z, mapId, areaId, wmoDoodadPlacementId, wmoGroupId, system, local, out uiMapId, out _);
|
||||
}
|
||||
|
||||
public bool GetUiMapPosition(float x, float y, float z, int mapId, int areaId, int wmoDoodadPlacementId, int wmoGroupId, UiMapSystem system, bool local, out int uiMapId, out Vector2 newPos)
|
||||
public bool GetUiMapPosition(float x, float y, float z, int mapId, int areaId, int wmoDoodadPlacementId, int wmoGroupId, UiMapSystem system, bool local, out uint uiMapId, out Vector2 newPos)
|
||||
{
|
||||
uiMapId = -1;
|
||||
uiMapId = uint.MaxValue;
|
||||
newPos = new Vector2();
|
||||
|
||||
UiMapAssignmentRecord uiMapAssignment = FindNearestMapAssignment(x, y, z, mapId, areaId, wmoDoodadPlacementId, wmoGroupId, system);
|
||||
@@ -2322,7 +2322,7 @@ namespace Game.DataStorage
|
||||
AzeriteItemMilestonePowerRecord[] _azeriteItemMilestonePowerByEssenceSlot = new AzeriteItemMilestonePowerRecord[SharedConst.MaxAzeriteEssenceSlot];
|
||||
MultiMap<uint, AzeritePowerSetMemberRecord> _azeritePowers = new();
|
||||
Dictionary<(uint azeriteUnlockSetId, ItemContext itemContext), byte[]> _azeriteTierUnlockLevels = new();
|
||||
Dictionary<(int broadcastTextId, CascLocaleBit cascLocaleBit), int> _broadcastTextDurations = new();
|
||||
Dictionary<(uint broadcastTextId, CascLocaleBit cascLocaleBit), int> _broadcastTextDurations = new();
|
||||
Dictionary<(sbyte, sbyte), CharBaseInfoRecord> _charBaseInfoByRaceAndClass = new();
|
||||
ChrClassUIDisplayRecord[] _uiDisplayByClass = new ChrClassUIDisplayRecord[(int)Class.Max];
|
||||
uint[][] _powersByClass = new uint[(int)Class.Max][];
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
public short Parent;
|
||||
public sbyte UiOrder;
|
||||
public byte UiOrder;
|
||||
}
|
||||
|
||||
public sealed class AdventureJournalRecord
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public int MaxQualityRoll;
|
||||
public float StateMultiplier;
|
||||
public sbyte QualityEnum;
|
||||
public byte QualityEnum;
|
||||
}
|
||||
|
||||
public sealed class BattlePetBreedStateRecord
|
||||
@@ -122,7 +122,7 @@ namespace Game.DataStorage
|
||||
public sealed class BroadcastTextDurationRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int BroadcastTextID;
|
||||
public uint BroadcastTextID;
|
||||
public int Locale;
|
||||
public int Duration;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Game.DataStorage
|
||||
public long RaceMask;
|
||||
public sbyte ChrClassID;
|
||||
public int Purpose;
|
||||
public sbyte ItemContext;
|
||||
public byte ItemContext;
|
||||
|
||||
public bool IsForNewCharacter() { return Purpose == 9; }
|
||||
}
|
||||
@@ -255,7 +255,7 @@ namespace Game.DataStorage
|
||||
public sealed class ChrRaceXChrModelRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int ChrRacesID;
|
||||
public uint ChrRacesID;
|
||||
public int ChrModelID;
|
||||
public int Sex;
|
||||
public int AllowedTransmogSlots;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Game.DataStorage
|
||||
public byte MinPlayers;
|
||||
public byte MaxPlayers;
|
||||
public ushort Flags;
|
||||
public sbyte ItemContext;
|
||||
public byte ItemContext;
|
||||
public byte ToggleDifficultyID;
|
||||
public uint GroupSizeHealthCurveID;
|
||||
public uint GroupSizeDmgCurveID;
|
||||
@@ -56,7 +56,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
public short MapID;
|
||||
public ushort MapID;
|
||||
public int DifficultyID;
|
||||
public int OrderIndex;
|
||||
public int CompleteWorldStateID;
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Reaction;
|
||||
public int FriendshipRepID;
|
||||
public uint FriendshipRepID;
|
||||
public int ReactionThreshold;
|
||||
public int OverrideColor;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Game.DataStorage
|
||||
public string Description;
|
||||
public string Tooltip;
|
||||
public sbyte GarrTypeID;
|
||||
public sbyte BuildingType;
|
||||
public byte BuildingType;
|
||||
public uint HordeGameObjectID;
|
||||
public uint AllianceGameObjectID;
|
||||
public int GarrSiteID;
|
||||
@@ -187,7 +187,7 @@ namespace Game.DataStorage
|
||||
public uint EnvGarrMechanicID;
|
||||
public int EnvGarrMechanicTypeID;
|
||||
public uint PlayerConditionID;
|
||||
public int GarrMissionSetID;
|
||||
public uint GarrMissionSetID;
|
||||
public sbyte TargetLevel;
|
||||
public ushort TargetItemLevel;
|
||||
public int MissionDuration;
|
||||
@@ -208,7 +208,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public sbyte PlotType;
|
||||
public byte PlotType;
|
||||
public uint HordeConstructObjID;
|
||||
public uint AllianceConstructObjID;
|
||||
public byte Flags;
|
||||
@@ -266,7 +266,7 @@ namespace Game.DataStorage
|
||||
public int GarrTalentTreeType;
|
||||
public int PlayerConditionID;
|
||||
public byte FeatureTypeIndex;
|
||||
public sbyte FeatureSubtypeIndex;
|
||||
public byte FeatureSubtypeIndex;
|
||||
public int CurrencyID;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public sbyte GlyphType;
|
||||
public byte GlyphType;
|
||||
public byte GlyphExclusiveCategoryID;
|
||||
public uint SpellIconID;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Game.DataStorage
|
||||
public sealed class ItemBonusListGroupEntryRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int ItemBonusListGroupID;
|
||||
public uint ItemBonusListGroupID;
|
||||
public int ItemBonusListID;
|
||||
public int ItemLevelSelectorID;
|
||||
public int SequenceValue;
|
||||
@@ -133,7 +133,7 @@ namespace Game.DataStorage
|
||||
public sealed class ItemBonusTreeNodeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public sbyte ItemContext;
|
||||
public byte ItemContext;
|
||||
public ushort ChildItemBonusTreeID;
|
||||
public ushort ChildItemBonusListID;
|
||||
public ushort ChildItemLevelSelectorID;
|
||||
@@ -164,7 +164,7 @@ namespace Game.DataStorage
|
||||
public sealed class ItemContextPickerEntryRecord
|
||||
{
|
||||
public uint Id;
|
||||
public sbyte ItemCreationContext;
|
||||
public byte ItemCreationContext;
|
||||
public byte OrderIndex;
|
||||
public int PVal;
|
||||
public int LabelID;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Name;
|
||||
public string Description;
|
||||
public LfgType TypeID;
|
||||
public sbyte Subtype;
|
||||
public byte Subtype;
|
||||
public sbyte Faction;
|
||||
public int IconTextureFileID;
|
||||
public int RewardsBgTextureFileID;
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace Game.DataStorage
|
||||
public sealed class MawPowerRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int SpellID;
|
||||
public uint SpellID;
|
||||
public int MawPowerRarityID;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace Game.DataStorage
|
||||
public sbyte ChrSpecializationRole;
|
||||
public uint ModifierTreeID;
|
||||
public sbyte PowerType;
|
||||
public sbyte PowerTypeComp;
|
||||
public byte PowerTypeComp;
|
||||
public byte PowerTypeValue;
|
||||
public int WeaponSubclassMask;
|
||||
public byte MaxGuildLevel;
|
||||
@@ -230,7 +230,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public string Description;
|
||||
public uint Id;
|
||||
public int SpecID;
|
||||
public uint SpecID;
|
||||
public uint SpellID;
|
||||
public uint OverridesSpellID;
|
||||
public int Flags;
|
||||
@@ -263,7 +263,7 @@ namespace Game.DataStorage
|
||||
public short MaxRating;
|
||||
public int PrevTier;
|
||||
public int NextTier;
|
||||
public sbyte BracketID;
|
||||
public byte BracketID;
|
||||
public sbyte Rank;
|
||||
public int RankIconFileDataID;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Game.DataStorage
|
||||
public sealed class SkillLineXTraitTreeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int SkillLineID;
|
||||
public uint SkillLineID;
|
||||
public int TraitTreeID;
|
||||
public int OrderIndex;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int CondType;
|
||||
public int TraitTreeID;
|
||||
public uint TraitTreeID;
|
||||
public int GrantedRanks;
|
||||
public uint QuestID;
|
||||
public uint AchievementID;
|
||||
@@ -155,7 +155,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public LocalizedString Requirement;
|
||||
public uint Id;
|
||||
public int TraitCurrencyID;
|
||||
public uint TraitCurrencyID;
|
||||
public int Amount;
|
||||
public uint QuestID;
|
||||
public uint AchievementID;
|
||||
@@ -179,7 +179,7 @@ namespace Game.DataStorage
|
||||
public sealed class TraitDefinitionEffectPointsRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitDefinitionID;
|
||||
public uint TraitDefinitionID;
|
||||
public int EffectIndex;
|
||||
public int OperationType;
|
||||
public int CurveID;
|
||||
@@ -191,7 +191,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int VisualStyle;
|
||||
public int LeftTraitNodeID;
|
||||
public uint LeftTraitNodeID;
|
||||
public int RightTraitNodeID;
|
||||
public int Type;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ namespace Game.DataStorage
|
||||
public sealed class TraitNodeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitTreeID;
|
||||
public uint TraitTreeID;
|
||||
public int PosX;
|
||||
public int PosY;
|
||||
public byte Type;
|
||||
@@ -224,20 +224,20 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitCondID;
|
||||
public int TraitNodeEntryID;
|
||||
public uint TraitNodeEntryID;
|
||||
}
|
||||
|
||||
public sealed class TraitNodeEntryXTraitCostRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitNodeEntryID;
|
||||
public uint TraitNodeEntryID;
|
||||
public int TraitCostID;
|
||||
}
|
||||
|
||||
public sealed class TraitNodeGroupRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitTreeID;
|
||||
public uint TraitTreeID;
|
||||
public int Flags;
|
||||
}
|
||||
|
||||
@@ -245,20 +245,20 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitCondID;
|
||||
public int TraitNodeGroupID;
|
||||
public uint TraitNodeGroupID;
|
||||
}
|
||||
|
||||
public sealed class TraitNodeGroupXTraitCostRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitNodeGroupID;
|
||||
public uint TraitNodeGroupID;
|
||||
public int TraitCostID;
|
||||
}
|
||||
|
||||
public sealed class TraitNodeGroupXTraitNodeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitNodeGroupID;
|
||||
public uint TraitNodeGroupID;
|
||||
public int TraitNodeID;
|
||||
public int Index;
|
||||
}
|
||||
@@ -267,20 +267,20 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitCondID;
|
||||
public int TraitNodeID;
|
||||
public uint TraitNodeID;
|
||||
}
|
||||
|
||||
public sealed class TraitNodeXTraitCostRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitNodeID;
|
||||
public uint TraitNodeID;
|
||||
public int TraitCostID;
|
||||
}
|
||||
|
||||
public sealed class TraitNodeXTraitNodeEntryRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitNodeID;
|
||||
public uint TraitNodeID;
|
||||
public int TraitNodeEntryID;
|
||||
public int Index;
|
||||
}
|
||||
@@ -291,13 +291,13 @@ namespace Game.DataStorage
|
||||
public LocalizedString Description;
|
||||
public uint ID;
|
||||
public int UiTextureAtlasElementID;
|
||||
public int TraitTreeID; // Parent tree
|
||||
public uint TraitTreeID; // Parent tree
|
||||
}
|
||||
|
||||
public sealed class TraitTreeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitSystemID;
|
||||
public uint TraitSystemID;
|
||||
public int Unused1000_1;
|
||||
public int FirstTraitNodeID;
|
||||
public int PlayerConditionID;
|
||||
@@ -311,14 +311,14 @@ namespace Game.DataStorage
|
||||
public sealed class TraitTreeLoadoutRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitTreeID;
|
||||
public uint TraitTreeID;
|
||||
public int ChrSpecializationID;
|
||||
}
|
||||
|
||||
public sealed class TraitTreeLoadoutEntryRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int TraitTreeLoadoutID;
|
||||
public uint TraitTreeLoadoutID;
|
||||
public int SelectedTraitNodeID;
|
||||
public int SelectedTraitNodeEntryID;
|
||||
public int NumPoints;
|
||||
@@ -336,7 +336,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int Index;
|
||||
public int TraitTreeID;
|
||||
public uint TraitTreeID;
|
||||
public int TraitCurrencyID;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ namespace Game.DataStorage
|
||||
public int Flags;
|
||||
public uint TransmogSetGroupID;
|
||||
public int ItemNameDescriptionID;
|
||||
public int ParentTransmogSetID;
|
||||
public uint ParentTransmogSetID;
|
||||
public int Unknown810;
|
||||
public int ExpansionID;
|
||||
public int PatchID;
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace Game.DataStorage
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
public int ParentUiMapID;
|
||||
public uint ParentUiMapID;
|
||||
public int Flags;
|
||||
public sbyte System;
|
||||
public byte System;
|
||||
public UiMapType Type;
|
||||
public int BountySetID;
|
||||
public uint BountyDisplayLocation;
|
||||
@@ -34,7 +34,7 @@ namespace Game.DataStorage
|
||||
public Vector2 UiMax;
|
||||
public Vector3[] Region = new Vector3[2];
|
||||
public uint Id;
|
||||
public int UiMapID;
|
||||
public uint UiMapID;
|
||||
public int OrderIndex;
|
||||
public int MapID;
|
||||
public int AreaID;
|
||||
@@ -47,7 +47,7 @@ namespace Game.DataStorage
|
||||
public Vector2 UiMin;
|
||||
public Vector2 UiMax;
|
||||
public uint Id;
|
||||
public int ParentUiMapID;
|
||||
public uint ParentUiMapID;
|
||||
public int OrderIndex;
|
||||
public int ChildUiMapID;
|
||||
public int PlayerConditionID;
|
||||
@@ -76,7 +76,7 @@ namespace Game.DataStorage
|
||||
public string RightFeatureDesc;
|
||||
public int AllianceQuestID;
|
||||
public int HordeQuestID;
|
||||
public sbyte ScreenType;
|
||||
public byte ScreenType;
|
||||
public int TextureKitID;
|
||||
public int SoundKitID;
|
||||
public int PlayerConditionID;
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace Game.Entities
|
||||
if (locale == Locale.enUS)
|
||||
lineField.StartTime = (uint)_lastLineEndTimes[(int)locale].TotalMilliseconds;
|
||||
|
||||
int broadcastTextDuration = Global.DB2Mgr.GetBroadcastTextDuration((int)convoLine.BroadcastTextID, locale);
|
||||
int broadcastTextDuration = Global.DB2Mgr.GetBroadcastTextDuration(convoLine.BroadcastTextID, locale);
|
||||
if (broadcastTextDuration != 0)
|
||||
_lastLineEndTimes[(int)locale] += TimeSpan.FromMilliseconds(broadcastTextDuration);
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace Game.Entities
|
||||
return 0;
|
||||
}
|
||||
|
||||
int textDuration = Global.DB2Mgr.GetBroadcastTextDuration((int)convoLine.BroadcastTextID, locale);
|
||||
int textDuration = Global.DB2Mgr.GetBroadcastTextDuration(convoLine.BroadcastTextID, locale);
|
||||
if (textDuration == 0)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Game.Entities
|
||||
{
|
||||
m_azeritePowers = Global.DB2Mgr.GetAzeritePowers(GetEntry());
|
||||
if (m_azeritePowers != null)
|
||||
m_maxTier = m_azeritePowers.Aggregate((a1, a2) => a1.Tier < a2.Tier ? a2 : a1).Tier;
|
||||
m_maxTier = m_azeritePowers.Max(p => p.Tier);
|
||||
}
|
||||
|
||||
public int GetMaxAzeritePowerTier() { return m_maxTier; }
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Game.Entities
|
||||
static MultiMap<uint /*azeriteUnlockMappingSetId*/, AzeriteUnlockMappingRecord> _azeriteUnlockMappings = new();
|
||||
static MultiMap<uint /*itemBonusTreeId*/, ChallengeModeItemBonusOverrideRecord> _challengeModeItemBonusOverrides = new();
|
||||
static MultiMap<uint /*itemBonusListId*/, ItemBonusRecord> _itemBonusLists = new();
|
||||
static MultiMap<int, ItemBonusListGroupEntryRecord> _itemBonusListGroupEntries = new();
|
||||
static MultiMap<uint, ItemBonusListGroupEntryRecord> _itemBonusListGroupEntries = new();
|
||||
static Dictionary<short /*itemLevelDelta*/, uint /*itemBonusListId*/> _itemLevelDeltaToBonusListContainer = new();
|
||||
static SortedMultiMap<uint /*itemLevelSelectorQualitySetId*/, ItemLevelSelectorQualityRecord> _itemLevelQualitySelectorQualities = new();
|
||||
static MultiMap<uint /*itemBonusTreeId*/, ItemBonusTreeNodeRecord> _itemBonusTrees = new();
|
||||
|
||||
@@ -4348,7 +4348,7 @@ namespace Game.Entities
|
||||
public UpdateField<int> ChrSpecializationID = new(8, 9);
|
||||
public UpdateField<int> CombatConfigFlags = new(8, 10);
|
||||
public UpdateField<int> LocalIdentifier = new(8, 11);
|
||||
public UpdateField<int> TraitSystemID = new(12, 13);
|
||||
public UpdateField<uint> TraitSystemID = new(12, 13);
|
||||
|
||||
public TraitConfig() : base(14) { }
|
||||
|
||||
@@ -4370,7 +4370,7 @@ namespace Game.Entities
|
||||
}
|
||||
if (Type == 3)
|
||||
{
|
||||
data.WriteInt32(TraitSystemID);
|
||||
data.WriteUInt32(TraitSystemID);
|
||||
}
|
||||
for (int i = 0; i < Entries.Size(); ++i)
|
||||
{
|
||||
@@ -4482,7 +4482,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (Type == 3)
|
||||
{
|
||||
data.WriteInt32(TraitSystemID);
|
||||
data.WriteUInt32(TraitSystemID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1095,7 +1095,7 @@ namespace Game.Entities
|
||||
traitConfig.SkillLineID = configsResult.Read<uint>(5);
|
||||
break;
|
||||
case TraitConfigType.Generic:
|
||||
traitConfig.TraitSystemID = configsResult.Read<int>(6);
|
||||
traitConfig.TraitSystemID = configsResult.Read<uint>(6);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Game.Entities
|
||||
static List<TaxiNodesRecord> m_nodesByVertex = new();
|
||||
static Dictionary<uint, uint> m_verticesByNode = new();
|
||||
|
||||
static void GetTaxiMapPosition(Vector3 position, int mapId, out Vector2 uiMapPosition, out int uiMapId)
|
||||
static void GetTaxiMapPosition(Vector3 position, int mapId, out Vector2 uiMapPosition, out uint uiMapId)
|
||||
{
|
||||
if (!Global.DB2Mgr.GetUiMapPosition(position.X, position.Y, position.Z, mapId, 0, 0, 0, UiMapSystem.Adventure, false, out uiMapId, out uiMapPosition))
|
||||
Global.DB2Mgr.GetUiMapPosition(position.X, position.Y, position.Z, mapId, 0, 0, 0, UiMapSystem.Taxi, false, out uiMapId, out uiMapPosition);
|
||||
@@ -62,7 +62,7 @@ namespace Game.Entities
|
||||
if (nodes[i - 1].HasFlag(TaxiPathNodeFlags.Teleport))
|
||||
continue;
|
||||
|
||||
int uiMap1, uiMap2;
|
||||
uint uiMap1, uiMap2;
|
||||
Vector2 pos1, pos2;
|
||||
|
||||
GetTaxiMapPosition(nodes[i - 1].Loc, nodes[i - 1].ContinentID, out pos1, out uiMap1);
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace Game.Networking.Packets
|
||||
public TraitCombatConfigFlags CombatConfigFlags;
|
||||
public int LocalIdentifier; // Local to specialization
|
||||
public uint SkillLineID;
|
||||
public int TraitSystemID;
|
||||
public uint TraitSystemID;
|
||||
public List<TraitEntryPacket> Entries = new();
|
||||
public List<TraitSubTreeCachePacket> SubTrees = new();
|
||||
public string Name = "";
|
||||
@@ -242,7 +242,7 @@ namespace Game.Networking.Packets
|
||||
SkillLineID = data.ReadUInt32();
|
||||
break;
|
||||
case TraitConfigType.Generic:
|
||||
TraitSystemID = data.ReadInt32();
|
||||
TraitSystemID = data.ReadUInt32();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -285,7 +285,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(SkillLineID);
|
||||
break;
|
||||
case TraitConfigType.Generic:
|
||||
data.WriteInt32(TraitSystemID);
|
||||
data.WriteUInt32(TraitSystemID);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -13,31 +13,31 @@ namespace Game
|
||||
public static uint COMMIT_COMBAT_TRAIT_CONFIG_CHANGES_SPELL_ID = 384255u;
|
||||
public static uint MAX_COMBAT_TRAIT_CONFIGS = 10u;
|
||||
|
||||
static Dictionary<int, NodeGroup> _traitGroups = new();
|
||||
static Dictionary<uint, NodeGroup> _traitGroups = new();
|
||||
static Dictionary<int, Node> _traitNodes = new();
|
||||
static Dictionary<int, SubTree> _traitSubTrees = new();
|
||||
static Dictionary<int, Tree> _traitTrees = new();
|
||||
static int[] _skillLinesByClass = new int[(int)Class.Max];
|
||||
static MultiMap<int, Tree> _traitTreesBySkillLine = new();
|
||||
static MultiMap<int, Tree> _traitTreesByTraitSystem = new();
|
||||
static uint[] _skillLinesByClass = new uint[(int)Class.Max];
|
||||
static MultiMap<uint, Tree> _traitTreesBySkillLine = new();
|
||||
static MultiMap<uint, Tree> _traitTreesByTraitSystem = new();
|
||||
static int _configIdGenerator;
|
||||
static MultiMap<int, TraitCurrencySourceRecord> _traitCurrencySourcesByCurrency = new();
|
||||
static MultiMap<int, TraitDefinitionEffectPointsRecord> _traitDefinitionEffectPointModifiers = new();
|
||||
static MultiMap<uint, TraitCurrencySourceRecord> _traitCurrencySourcesByCurrency = new();
|
||||
static MultiMap<uint, TraitDefinitionEffectPointsRecord> _traitDefinitionEffectPointModifiers = new();
|
||||
static MultiMap<int, TraitTreeLoadoutEntryRecord> _traitTreeLoadoutsByChrSpecialization = new();
|
||||
|
||||
public static void Load()
|
||||
{
|
||||
_configIdGenerator = int.MaxValue;
|
||||
|
||||
MultiMap<int, TraitCondRecord> nodeEntryConditions = new();
|
||||
MultiMap<uint, TraitCondRecord> nodeEntryConditions = new();
|
||||
foreach (TraitNodeEntryXTraitCondRecord traitNodeEntryXTraitCondEntry in CliDB.TraitNodeEntryXTraitCondStorage.Values)
|
||||
{
|
||||
TraitCondRecord traitCondEntry = CliDB.TraitCondStorage.LookupByKey(traitNodeEntryXTraitCondEntry.TraitCondID);
|
||||
if (traitCondEntry != null)
|
||||
nodeEntryConditions.Add((int)traitNodeEntryXTraitCondEntry.TraitNodeEntryID, traitCondEntry);
|
||||
nodeEntryConditions.Add(traitNodeEntryXTraitCondEntry.TraitNodeEntryID, traitCondEntry);
|
||||
}
|
||||
|
||||
MultiMap<int, TraitCostRecord> nodeEntryCosts = new();
|
||||
MultiMap<uint, TraitCostRecord> nodeEntryCosts = new();
|
||||
foreach (TraitNodeEntryXTraitCostRecord traitNodeEntryXTraitCostEntry in CliDB.TraitNodeEntryXTraitCostStorage.Values)
|
||||
{
|
||||
TraitCostRecord traitCostEntry = CliDB.TraitCostStorage.LookupByKey(traitNodeEntryXTraitCostEntry.TraitCostID);
|
||||
@@ -45,7 +45,7 @@ namespace Game
|
||||
nodeEntryCosts.Add(traitNodeEntryXTraitCostEntry.TraitNodeEntryID, traitCostEntry);
|
||||
}
|
||||
|
||||
MultiMap<int, TraitCondRecord> nodeGroupConditions = new();
|
||||
MultiMap<uint, TraitCondRecord> nodeGroupConditions = new();
|
||||
foreach (TraitNodeGroupXTraitCondRecord traitNodeGroupXTraitCondEntry in CliDB.TraitNodeGroupXTraitCondStorage.Values)
|
||||
{
|
||||
TraitCondRecord traitCondEntry = CliDB.TraitCondStorage.LookupByKey(traitNodeGroupXTraitCondEntry.TraitCondID);
|
||||
@@ -53,7 +53,7 @@ namespace Game
|
||||
nodeGroupConditions.Add(traitNodeGroupXTraitCondEntry.TraitNodeGroupID, traitCondEntry);
|
||||
}
|
||||
|
||||
MultiMap<int, TraitCostRecord> nodeGroupCosts = new();
|
||||
MultiMap<uint, TraitCostRecord> nodeGroupCosts = new();
|
||||
foreach (TraitNodeGroupXTraitCostRecord traitNodeGroupXTraitCostEntry in CliDB.TraitNodeGroupXTraitCostStorage.Values)
|
||||
{
|
||||
TraitCostRecord traitCondEntry = CliDB.TraitCostStorage.LookupByKey(traitNodeGroupXTraitCostEntry.TraitCostID);
|
||||
@@ -61,11 +61,11 @@ namespace Game
|
||||
nodeGroupCosts.Add(traitNodeGroupXTraitCostEntry.TraitNodeGroupID, traitCondEntry);
|
||||
}
|
||||
|
||||
MultiMap<int, int> nodeGroups = new();
|
||||
MultiMap<int, uint> nodeGroups = new();
|
||||
foreach (TraitNodeGroupXTraitNodeRecord traitNodeGroupXTraitNodeEntry in CliDB.TraitNodeGroupXTraitNodeStorage.Values)
|
||||
nodeGroups.Add(traitNodeGroupXTraitNodeEntry.TraitNodeID, traitNodeGroupXTraitNodeEntry.TraitNodeGroupID);
|
||||
|
||||
MultiMap<int, TraitCondRecord> nodeConditions = new();
|
||||
MultiMap<uint, TraitCondRecord> nodeConditions = new();
|
||||
foreach (TraitNodeXTraitCondRecord traitNodeXTraitCondEntry in CliDB.TraitNodeXTraitCondStorage.Values)
|
||||
{
|
||||
TraitCondRecord traitCondEntry = CliDB.TraitCondStorage.LookupByKey(traitNodeXTraitCondEntry.TraitCondID);
|
||||
@@ -78,10 +78,10 @@ namespace Game
|
||||
{
|
||||
TraitCostRecord traitCostEntry = CliDB.TraitCostStorage.LookupByKey(traitNodeXTraitCostEntry.TraitCostID);
|
||||
if (traitCostEntry != null)
|
||||
nodeCosts.Add((uint)traitNodeXTraitCostEntry.TraitNodeID, traitCostEntry);
|
||||
nodeCosts.Add(traitNodeXTraitCostEntry.TraitNodeID, traitCostEntry);
|
||||
}
|
||||
|
||||
MultiMap<int, TraitNodeEntryRecord> nodeEntries = new();
|
||||
MultiMap<uint, TraitNodeEntryRecord> nodeEntries = new();
|
||||
foreach (TraitNodeXTraitNodeEntryRecord traitNodeXTraitNodeEntryEntry in CliDB.TraitNodeXTraitNodeEntryStorage.Values)
|
||||
{
|
||||
TraitNodeEntryRecord traitNodeEntryEntry = CliDB.TraitNodeEntryStorage.LookupByKey(traitNodeXTraitNodeEntryEntry.TraitNodeEntryID);
|
||||
@@ -97,14 +97,14 @@ namespace Game
|
||||
treeCosts.Add(traitTreeXTraitCostEntry.TraitTreeID, traitCostEntry);
|
||||
}
|
||||
|
||||
MultiMap<int, TraitTreeXTraitCurrencyRecord> treeCurrencies = new();
|
||||
MultiMap<uint, TraitTreeXTraitCurrencyRecord> treeCurrencies = new();
|
||||
foreach (TraitTreeXTraitCurrencyRecord traitTreeXTraitCurrencyEntry in CliDB.TraitTreeXTraitCurrencyStorage.Values)
|
||||
{
|
||||
if (CliDB.TraitCurrencyStorage.HasRecord((uint)traitTreeXTraitCurrencyEntry.TraitCurrencyID))
|
||||
treeCurrencies.Add(traitTreeXTraitCurrencyEntry.TraitTreeID, traitTreeXTraitCurrencyEntry);
|
||||
}
|
||||
|
||||
MultiMap<int, int> traitTreesIdsByTraitSystem = new();
|
||||
MultiMap<uint, int> traitTreesIdsByTraitSystem = new();
|
||||
foreach (TraitTreeRecord traitTree in CliDB.TraitTreeStorage.Values)
|
||||
{
|
||||
Tree tree = new();
|
||||
@@ -155,7 +155,7 @@ namespace Game
|
||||
if (costs != null)
|
||||
nodeGroup.Costs = costs;
|
||||
|
||||
_traitGroups[(int)traitNodeGroup.Id] = nodeGroup;
|
||||
_traitGroups[traitNodeGroup.Id] = nodeGroup;
|
||||
}
|
||||
|
||||
foreach (TraitNodeRecord traitNode in CliDB.TraitNodeStorage.Values)
|
||||
@@ -295,7 +295,7 @@ namespace Game
|
||||
foreach (TraitDefinitionEffectPointsRecord traitDefinitionEffectPoints in CliDB.TraitDefinitionEffectPointsStorage.Values)
|
||||
_traitDefinitionEffectPointModifiers.Add(traitDefinitionEffectPoints.TraitDefinitionID, traitDefinitionEffectPoints);
|
||||
|
||||
MultiMap<int, TraitTreeLoadoutEntryRecord> traitTreeLoadoutEntries = new();
|
||||
MultiMap<uint, TraitTreeLoadoutEntryRecord> traitTreeLoadoutEntries = new();
|
||||
foreach (TraitTreeLoadoutEntryRecord traitTreeLoadoutEntry in CliDB.TraitTreeLoadoutEntryStorage.Values)
|
||||
traitTreeLoadoutEntries[traitTreeLoadoutEntry.TraitTreeLoadoutID].Add(traitTreeLoadoutEntry);
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace Game
|
||||
return null;
|
||||
}
|
||||
|
||||
public static bool HasEnoughCurrency(TraitEntryPacket entry, Dictionary<int, int> currencies)
|
||||
public static bool HasEnoughCurrency(TraitEntryPacket entry, Dictionary<uint, int> currencies)
|
||||
{
|
||||
int getCurrencyCount(int currencyId)
|
||||
{
|
||||
@@ -389,28 +389,28 @@ namespace Game
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void TakeCurrencyCost(TraitEntryPacket entry, Dictionary<int, int> currencies)
|
||||
public static void TakeCurrencyCost(TraitEntryPacket entry, Dictionary<uint, int> currencies)
|
||||
{
|
||||
Node node = _traitNodes.LookupByKey(entry.TraitNodeID);
|
||||
foreach (NodeGroup group in node.Groups)
|
||||
foreach (TraitCostRecord cost in group.Costs)
|
||||
currencies[cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
currencies[(uint)cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
|
||||
var nodeEntryItr = node.Entries.Find(nodeEntry => nodeEntry.Data.Id == entry.TraitNodeEntryID);
|
||||
if (nodeEntryItr != null)
|
||||
foreach (TraitCostRecord cost in nodeEntryItr.Costs)
|
||||
currencies[cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
currencies[(uint)cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
|
||||
foreach (TraitCostRecord cost in node.Costs)
|
||||
currencies[cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
currencies[(uint)cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
|
||||
Tree tree = _traitTrees.LookupByKey(node.Data.TraitTreeID);
|
||||
if (tree != null)
|
||||
foreach (TraitCostRecord cost in tree.Costs)
|
||||
currencies[cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
currencies[(uint)cost.TraitCurrencyID] -= cost.Amount * entry.Rank;
|
||||
}
|
||||
|
||||
public static void FillOwnedCurrenciesMap(TraitConfigPacket traitConfig, Player player, Dictionary<int, int> currencies)
|
||||
public static void FillOwnedCurrenciesMap(TraitConfigPacket traitConfig, Player player, Dictionary<uint, int> currencies)
|
||||
{
|
||||
List<Tree> trees = GetTreesForConfig(traitConfig);
|
||||
if (trees == null)
|
||||
@@ -430,9 +430,9 @@ namespace Game
|
||||
case TraitCurrencyType.Gold:
|
||||
{
|
||||
if (!currencies.ContainsKey((int)currency.Id))
|
||||
currencies[(int)currency.Id] = 0;
|
||||
currencies[currency.Id] = 0;
|
||||
|
||||
int amount = currencies[(int)currency.Id];
|
||||
int amount = currencies[currency.Id];
|
||||
if (player.GetMoney() > (ulong)(int.MaxValue - amount))
|
||||
amount = int.MaxValue;
|
||||
else
|
||||
@@ -441,9 +441,9 @@ namespace Game
|
||||
}
|
||||
case TraitCurrencyType.CurrencyTypesBased:
|
||||
if (!currencies.ContainsKey((int)currency.Id))
|
||||
currencies[(int)currency.Id] = 0;
|
||||
currencies[currency.Id] = 0;
|
||||
|
||||
currencies[(int)currency.Id] += (int)player.GetCurrencyQuantity((uint)currency.CurrencyTypesID);
|
||||
currencies[currency.Id] += (int)player.GetCurrencyQuantity((uint)currency.CurrencyTypesID);
|
||||
break;
|
||||
case TraitCurrencyType.TraitSourced:
|
||||
var currencySources = _traitCurrencySourcesByCurrency.LookupByKey(currency.Id);
|
||||
@@ -859,7 +859,7 @@ namespace Game
|
||||
subtreeDataItr.Active = data.IsSelected;
|
||||
}
|
||||
|
||||
Dictionary<int, int> grantedCurrencies = new();
|
||||
Dictionary<uint, int> grantedCurrencies = new();
|
||||
FillOwnedCurrenciesMap(traitConfig, player, grantedCurrencies);
|
||||
|
||||
foreach (var (traitCurrencyId, spentAmount) in spentCurrencies)
|
||||
@@ -948,7 +948,7 @@ namespace Game
|
||||
traitConfig.Entries.Add(newEntry);
|
||||
}
|
||||
|
||||
Dictionary<int, int> currencies = new();
|
||||
Dictionary<uint, int> currencies = new();
|
||||
FillOwnedCurrenciesMap(traitConfig, player, currencies);
|
||||
|
||||
var loadoutEntries = _traitTreeLoadoutsByChrSpecialization.LookupByKey(traitConfig.ChrSpecializationID);
|
||||
|
||||
Reference in New Issue
Block a user