Misc fixes

This commit is contained in:
hondacrx
2024-03-19 17:21:32 -04:00
parent 5237c49b77
commit 1e421b9f53
71 changed files with 337 additions and 319 deletions
+10 -6
View File
@@ -131,13 +131,13 @@ namespace Game.DataStorage
public uint[] Flags = new uint[2];
public ushort[] LiquidTypeID = new ushort[4];
public AreaFlags GetFlags() { return (AreaFlags)Flags[0]; }
public AreaFlags2 GetFlags2() { return (AreaFlags2)Flags[1]; }
public AreaMountFlags GetMountFlags() { return (AreaMountFlags)MountFlags; }
public bool HasFlag(AreaFlags areaFlags) { return (Flags[0] & (uint)areaFlags) != 0; }
public bool HasFlag(AreaFlags2 areaFlags2) { return (Flags[1] & (uint)areaFlags2) != 0; }
public bool HasMountFlag(AreaMountFlags areaMountFlags) { return (MountFlags & (uint)areaMountFlags) != 0; }
public bool IsSanctuary()
{
return GetFlags().HasFlag(AreaFlags.NoPvP);
return HasFlag(AreaFlags.NoPvP);
}
}
@@ -232,8 +232,10 @@ namespace Game.DataStorage
public byte ArtifactID;
public byte MaxPurchasableRank;
public int Label;
public ArtifactPowerFlag Flags;
public byte Flags;
public byte Tier;
public bool HasFlag(ArtifactPowerFlag artifactPowerFlag) { return (Flags & (byte)artifactPowerFlag) != 0; }
}
public sealed class ArtifactPowerLinkRecord
@@ -383,7 +385,9 @@ namespace Game.DataStorage
public sealed class AzeriteTierUnlockSetRecord
{
public uint Id;
public AzeriteTierUnlockSetFlags Flags;
public int Flags;
public bool HasFlag(AzeriteTierUnlockSetFlags azeriteTierUnlockSetFlags) { return (Flags & (int)azeriteTierUnlockSetFlags) != 0; }
}
public sealed class AzeriteUnlockMappingRecord
+4 -2
View File
@@ -62,7 +62,7 @@ namespace Game.DataStorage
public int LoadoutUIModelSceneID;
public int CovenantID;
public BattlePetSpeciesFlags GetFlags() { return (BattlePetSpeciesFlags)Flags; }
public bool HasFlag(BattlePetSpeciesFlags battlePetSpeciesFlags) { return (Flags & (int)battlePetSpeciesFlags) != 0; }
}
public sealed class BattlePetSpeciesStateRecord
@@ -89,10 +89,12 @@ namespace Game.DataStorage
public sbyte GroupsAllowed;
public sbyte MaxGroupSize;
public ushort HolidayWorldState;
public BattlemasterListFlags Flags;
public int Flags;
public int IconFileDataID;
public int RequiredPlayerConditionID;
public short[] MapId = new short[16];
public bool HasFlag(BattlemasterListFlags battlemasterListFlags) { return (Flags & (int)battlemasterListFlags) != 0; }
}
public sealed class BroadcastTextRecord
+26 -25
View File
@@ -18,7 +18,7 @@ namespace Game.DataStorage
public CfgCategoriesCharsets GetCreateCharsetMask() { return (CfgCategoriesCharsets)CreateCharsetMask; }
public CfgCategoriesCharsets GetExistingCharsetMask() { return (CfgCategoriesCharsets)ExistingCharsetMask; }
public CfgCategoriesFlags GetFlags() { return (CfgCategoriesFlags)Flags; }
public bool HasFlag(CfgCategoriesFlags cfgCategoriesFlags) { return (Flags & (byte)cfgCategoriesFlags) != 0; }
}
public sealed class Cfg_RegionsRecord
@@ -79,7 +79,7 @@ namespace Game.DataStorage
public sbyte FactionGroup;
public int Ruleset;
public ChatChannelFlags GetFlags() { return (ChatChannelFlags)Flags; }
public bool HasFlag(ChatChannelFlags chatChannelFlags) { return (Flags & (int)chatChannelFlags) != 0; }
public ChatChannelRuleset GetRuleset() { return (ChatChannelRuleset)Ruleset; }
}
@@ -213,7 +213,7 @@ namespace Game.DataStorage
public int OverrideArchive; // -1: allow any, otherwise must match OverrideArchive cvar
public uint ItemModifiedAppearanceID;
public ChrCustomizationReqFlag GetFlags() { return (ChrCustomizationReqFlag)Flags; }
public bool HasFlag(ChrCustomizationReqFlag chrCustomizationReqFlag) { return (Flags & (int)chrCustomizationReqFlag) != 0; }
}
public sealed class ChrCustomizationReqChoiceRecord
@@ -309,7 +309,7 @@ namespace Game.DataStorage
public sbyte MaleTextureFallbackSex;
public sbyte FemaleTextureFallbackSex;
public ChrRacesFlag GetFlags() { return (ChrRacesFlag)Flags; }
public bool HasFlag(ChrRacesFlag chrRacesFlag) { return (Flags & (int)chrRacesFlag) != 0; }
}
public sealed class ChrSpecializationRecord
@@ -328,7 +328,7 @@ namespace Game.DataStorage
public int AnimReplacements;
public uint[] MasterySpellID = new uint[PlayerConst.MaxMasterySpells];
public ChrSpecializationFlag GetFlags() { return (ChrSpecializationFlag)Flags; }
public bool HasFlag(ChrSpecializationFlag chrSpecializationFlag) { return (Flags & (uint)chrSpecializationFlag) != 0; }
public ChrSpecializationRole GetRole() { return (ChrSpecializationRole)Role; }
public bool IsPetSpecialization()
@@ -389,15 +389,14 @@ namespace Game.DataStorage
public int MinItemLevel;
public float QuestXpMultiplier;
public ContentTuningFlag GetFlags() { return (ContentTuningFlag)Flags; }
public bool HasFlag(ContentTuningFlag contentTuningFlag) { return (Flags & (int)contentTuningFlag) != 0; }
public int GetScalingFactionGroup()
{
ContentTuningFlag flags = GetFlags();
if (flags.HasFlag(ContentTuningFlag.Horde))
if (HasFlag(ContentTuningFlag.Horde))
return 5;
if (flags.HasFlag(ContentTuningFlag.Alliance))
if (HasFlag(ContentTuningFlag.Alliance))
return 3;
return 0;
@@ -534,7 +533,7 @@ namespace Game.DataStorage
public float Unknown820_2; // scale related
public float[] Unknown820_3 = new float[2]; // scale related
public CreatureModelDataFlags GetFlags() { return (CreatureModelDataFlags)Flags; }
public bool HasFlag(CreatureModelDataFlags creatureModelDataFlags) { return (Flags & (uint)creatureModelDataFlags) != 0; }
}
public sealed class CreatureTypeRecord
@@ -559,7 +558,7 @@ namespace Game.DataStorage
public ushort EligibilityWorldStateID;
public byte EligibilityWorldStateValue;
public CriteriaFlags GetFlags() => (CriteriaFlags)Flags;
public bool HasFlag(CriteriaFlags criteriaFlags) { return (Flags & (int)criteriaFlags) != 0; }
}
public sealed class CriteriaTreeRecord
@@ -571,7 +570,9 @@ namespace Game.DataStorage
public int Operator;
public uint CriteriaID;
public int OrderIndex;
public CriteriaTreeFlags Flags;
public int Flags;
public bool HasFlag(CriteriaTreeFlags criteriaTreeFlags) { return (Flags & (int)criteriaTreeFlags) != 0; }
}
public sealed class CurrencyContainerRecord
@@ -608,50 +609,50 @@ namespace Game.DataStorage
public uint RechargingCycleDurationMS;
public int[] Flags = new int[2];
public CurrencyTypesFlags GetFlags() { return (CurrencyTypesFlags)Flags[0]; }
public CurrencyTypesFlagsB GetFlagsB() { return (CurrencyTypesFlagsB)Flags[1]; }
public bool HasFlag(CurrencyTypesFlags currencyTypesFlags) { return (Flags[0] & (int)currencyTypesFlags) != 0; }
public bool HasFlag(CurrencyTypesFlagsB currencyTypesFlagsB) { return (Flags[1] & (int)currencyTypesFlagsB) != 0; }
// Helpers
public int GetScaler()
{
return GetFlags().HasFlag(CurrencyTypesFlags._100_Scaler) ? 100 : 1;
return HasFlag(CurrencyTypesFlags._100_Scaler) ? 100 : 1;
}
public bool HasMaxEarnablePerWeek()
{
return MaxEarnablePerWeek != 0 || GetFlags().HasFlag(CurrencyTypesFlags.ComputedWeeklyMaximum);
return MaxEarnablePerWeek != 0 || HasFlag(CurrencyTypesFlags.ComputedWeeklyMaximum);
}
public bool HasMaxQuantity(bool onLoad = false, bool onUpdateVersion = false)
{
if (onLoad && GetFlags().HasFlag(CurrencyTypesFlags.IgnoreMaxQtyOnLoad))
if (onLoad && HasFlag(CurrencyTypesFlags.IgnoreMaxQtyOnLoad))
return false;
if (onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags.UpdateVersionIgnoreMax))
if (onUpdateVersion && HasFlag(CurrencyTypesFlags.UpdateVersionIgnoreMax))
return false;
return MaxQty != 0 || MaxQtyWorldStateID != 0 || GetFlags().HasFlag(CurrencyTypesFlags.DynamicMaximum);
return MaxQty != 0 || MaxQtyWorldStateID != 0 || HasFlag(CurrencyTypesFlags.DynamicMaximum);
}
public bool HasTotalEarned()
{
return GetFlagsB().HasFlag(CurrencyTypesFlagsB.UseTotalEarnedForEarned);
return HasFlag(CurrencyTypesFlagsB.UseTotalEarnedForEarned);
}
public bool IsAlliance()
{
return GetFlags().HasFlag(CurrencyTypesFlags.IsAllianceOnly);
return HasFlag(CurrencyTypesFlags.IsAllianceOnly);
}
public bool IsHorde()
{
return GetFlags().HasFlag(CurrencyTypesFlags.IsHordeOnly);
return HasFlag(CurrencyTypesFlags.IsHordeOnly);
}
public bool IsSuppressingChatLog(bool onUpdateVersion = false)
{
if ((onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags.SuppressChatMessageOnVersionChange)) ||
GetFlags().HasFlag(CurrencyTypesFlags.SuppressChatMessages))
if ((onUpdateVersion && HasFlag(CurrencyTypesFlags.SuppressChatMessageOnVersionChange)) ||
HasFlag(CurrencyTypesFlags.SuppressChatMessages))
return true;
return false;
@@ -659,7 +660,7 @@ namespace Game.DataStorage
public bool IsTrackingQuantity()
{
return GetFlags().HasFlag(CurrencyTypesFlags.TrackQuantity);
return HasFlag(CurrencyTypesFlags.TrackQuantity);
}
}
+3 -1
View File
@@ -42,12 +42,14 @@ namespace Game.DataStorage
public byte FallbackDifficultyID;
public byte MinPlayers;
public byte MaxPlayers;
public DifficultyFlags Flags;
public ushort Flags;
public byte ItemContext;
public byte ToggleDifficultyID;
public uint GroupSizeHealthCurveID;
public uint GroupSizeDmgCurveID;
public uint GroupSizeSpellPointsCurveID;
public bool HasFlag(DifficultyFlags difficultyFlags) { return (Flags & (ushort)difficultyFlags) != 0; }
}
public sealed class DungeonEncounterRecord
+6 -2
View File
@@ -47,6 +47,8 @@ namespace Game.DataStorage
public ushort[] Friend = new ushort[MAX_FACTION_RELATIONS];
// helpers
public bool HasFlag(FactionTemplateFlags factionTemplateFlags) { return (Flags & (ushort)factionTemplateFlags) != 0; }
public bool IsFriendlyTo(FactionTemplateRecord entry)
{
if (this == entry)
@@ -87,7 +89,7 @@ namespace Game.DataStorage
return false;
return EnemyGroup == 0 && FriendGroup == 0;
}
public bool IsContestedGuardFaction() { return (Flags & (ushort)FactionTemplateFlags.ContestedGuard) != 0; }
public bool IsContestedGuardFaction() { return HasFlag(FactionTemplateFlags.ContestedGuard); }
}
public sealed class FriendshipRepReactionRecord
@@ -107,6 +109,8 @@ namespace Game.DataStorage
public uint Id;
public int FactionID;
public int TextureFileID;
public FriendshipReputationFlags Flags;
public int Flags;
public bool HasFlag(FriendshipReputationFlags friendshipReputationFlags) { return (Flags & (int)friendshipReputationFlags) != 0; }
}
}
+6 -2
View File
@@ -62,7 +62,9 @@ namespace Game.DataStorage
public sbyte GarrFollowerTypeID;
public int IconFileDataID;
public ushort FactionChangeGarrAbilityID;
public GarrisonAbilityFlags Flags;
public int Flags;
public bool HasFlag(GarrisonAbilityFlags garrisonAbilityFlags) { return (Flags & (int)garrisonAbilityFlags) != 0; }
}
public sealed class GarrBuildingRecord
@@ -91,7 +93,9 @@ namespace Game.DataStorage
public ushort GarrAbilityID;
public ushort BonusGarrAbilityID;
public ushort GoldCost;
public GarrisonBuildingFlags Flags;
public int Flags;
public bool HasFlag(GarrisonBuildingFlags garrisonBuildingFlags) { return (Flags & (int)garrisonBuildingFlags) != 0; }
}
public sealed class GarrBuildingPlotInstRecord
+3 -1
View File
@@ -335,10 +335,12 @@ namespace Game.DataStorage
{
public uint Id;
public LocalizedString Name;
public ItemSetFlags SetFlags;
public int SetFlags;
public uint RequiredSkill;
public ushort RequiredSkillRank;
public uint[] ItemID = new uint[ItemConst.MaxItemSetItems];
public bool HasFlag(ItemSetFlags itemSetFlags) { return (SetFlags & (int)itemSetFlags) != 0; }
}
public sealed class ItemSetSpellRecord
+15 -12
View File
@@ -92,9 +92,9 @@ namespace Game.DataStorage
}
}
public bool IsDynamicDifficultyMap() { return GetFlags().HasFlag(MapFlags.DynamicDifficulty); }
public bool IsFlexLocking() { return GetFlags().HasFlag(MapFlags.FlexibleRaidLocking); }
public bool IsGarrison() { return GetFlags().HasFlag(MapFlags.Garrison); }
public bool IsDynamicDifficultyMap() { return HasFlag(MapFlags.DynamicDifficulty); }
public bool IsFlexLocking() { return HasFlag(MapFlags.FlexibleRaidLocking); }
public bool IsGarrison() { return HasFlag(MapFlags.Garrison); }
public bool IsSplitByFaction()
{
return Id == 609 || // Acherus (DeathKnight Start)
@@ -104,8 +104,8 @@ namespace Game.DataStorage
Id == 2570; // Forbidden Reach (Dracthyr/Evoker Start)
}
public MapFlags GetFlags() { return (MapFlags)Flags[0]; }
public MapFlags2 GetFlags2() { return (MapFlags2)Flags[1]; }
public bool HasFlag(MapFlags mapFlags) { return (Flags[0] & (uint)mapFlags) != 0; }
public bool HasFlag(MapFlags2 mapFlags2) { return (Flags[1] & (uint)mapFlags2) != 0; }
}
public sealed class MapChallengeModeRecord
@@ -134,9 +134,9 @@ namespace Game.DataStorage
public uint MapID;
public bool HasResetSchedule() { return ResetInterval != MapDifficultyResetInterval.Anytime; }
public bool IsUsingEncounterLocks() { return GetFlags().HasFlag(MapDifficultyFlags.UseLootBasedLockInsteadOfInstanceLock); }
public bool IsRestoringDungeonState() { return GetFlags().HasFlag(MapDifficultyFlags.ResumeDungeonProgressBasedOnLockout); }
public bool IsExtendable() { return !GetFlags().HasFlag(MapDifficultyFlags.DisableLockExtension); }
public bool IsUsingEncounterLocks() { return HasFlag(MapDifficultyFlags.UseLootBasedLockInsteadOfInstanceLock); }
public bool IsRestoringDungeonState() { return HasFlag(MapDifficultyFlags.ResumeDungeonProgressBasedOnLockout); }
public bool IsExtendable() { return !HasFlag(MapDifficultyFlags.DisableLockExtension); }
public uint GetRaidDuration()
{
@@ -147,7 +147,7 @@ namespace Game.DataStorage
return 0;
}
public MapDifficultyFlags GetFlags() { return (MapDifficultyFlags)Flags; }
public bool HasFlag(MapDifficultyFlags mapFlags) { return (Flags & (int)mapFlags) != 0; }
}
public sealed class MapDifficultyXConditionRecord
@@ -185,7 +185,7 @@ namespace Game.DataStorage
public string Description;
public uint Id;
public ushort MountTypeID;
public MountFlags Flags;
public int Flags;
public sbyte SourceTypeEnum;
public uint SourceSpellID;
public uint PlayerConditionID;
@@ -194,13 +194,14 @@ namespace Game.DataStorage
public int MountSpecialRiderAnimKitID;
public int MountSpecialSpellVisualKitID;
public bool IsSelfMount() { return (Flags & MountFlags.SelfMount) != 0; }
public bool HasFlag(MountFlags mountFlags) { return (Flags & (int)mountFlags) != 0; }
public bool IsSelfMount() { return HasFlag(MountFlags.SelfMount); }
}
public sealed class MountCapabilityRecord
{
public uint Id;
public MountCapabilityFlags Flags;
public int Flags;
public ushort ReqRidingSkill;
public ushort ReqAreaID;
public uint ReqSpellAuraID;
@@ -209,6 +210,8 @@ namespace Game.DataStorage
public short ReqMapID;
public int PlayerConditionID;
public int FlightCapabilityID;
public bool HasFlag(MountCapabilityFlags mountCapabilityFlags) { return (Flags & (int)mountCapabilityFlags) != 0; }
}
public sealed class MountTypeXCapabilityRecord
@@ -3,21 +3,6 @@
namespace Game.DataStorage
{
public struct WMOAreaTableTripple
{
public WMOAreaTableTripple(int r, int a, int g)
{
groupId = g;
rootId = r;
adtId = a;
}
// ordered by entropy; that way memcmp will have a minimal medium runtime
int groupId;
int rootId;
int adtId;
}
public class TaxiPathBySourceAndDestination
{
public TaxiPathBySourceAndDestination(uint _id, uint _price)
+7 -4
View File
@@ -16,7 +16,9 @@ namespace Game.DataStorage
public sealed class PhaseRecord
{
public uint Id;
public PhaseEntryFlags Flags;
public int Flags;
public bool HasFlag(PhaseEntryFlags phaseEntryFlags) { return (Flags & (int)phaseEntryFlags) != 0; }
}
public sealed class PhaseXPhaseGroupRecord
@@ -141,7 +143,7 @@ namespace Game.DataStorage
public float RegenCombat;
public short Flags;
public PowerTypeFlags GetFlags() { return (PowerTypeFlags)Flags; }
public bool HasFlag(PowerTypeFlags powerTypeFlags) { return (Flags & (short)powerTypeFlags) != 0; }
}
public sealed class PrestigeLevelInfoRecord
@@ -150,10 +152,11 @@ namespace Game.DataStorage
public string Name;
public int PrestigeLevel;
public int BadgeTextureFileDataID;
public PrestigeLevelInfoFlags Flags;
public byte Flags;
public int AwardedAchievementID;
public bool IsDisabled() { return (Flags & PrestigeLevelInfoFlags.Disabled) != 0; }
public bool HasFlag(PrestigeLevelInfoFlags prestigeLevelInfoFlags) { return (Flags & (byte)prestigeLevelInfoFlags) != 0; }
public bool IsDisabled() { return HasFlag(PrestigeLevelInfoFlags.Disabled); }
}
public sealed class PvpDifficultyRecord
+21 -10
View File
@@ -28,14 +28,15 @@ namespace Game.DataStorage
public int RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
public ushort Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
public byte OrderIndex;
public ScenarioStepFlags Flags;
public byte Flags;
public uint VisibilityPlayerConditionID;
public ushort WidgetSetID;
// helpers
public bool HasFlag(ScenarioStepFlags scenarioStepFlags) { return (Flags & (byte)scenarioStepFlags) != 0; }
public bool IsBonusObjective()
{
return Flags.HasAnyFlag(ScenarioStepFlags.BonusObjective);
return HasFlag(ScenarioStepFlags.BonusObjective);
}
}
@@ -92,7 +93,7 @@ namespace Game.DataStorage
public int ExpansionNameSharedStringID;
public int HordeExpansionNameSharedStringID;
public SkillLineFlags GetFlags() => (SkillLineFlags)Flags;
public bool HasFlag(SkillLineFlags skillLineFlags) { return (Flags & (ushort)skillLineFlags) != 0; }
}
public sealed class SkillLineAbilityRecord
@@ -109,11 +110,13 @@ namespace Game.DataStorage
public AbilityLearnType AcquireMethod;
public ushort TrivialSkillLineRankHigh;
public ushort TrivialSkillLineRankLow;
public SkillLineAbilityFlags Flags;
public int Flags;
public byte NumSkillUps;
public short UniqueBit;
public short TradeSkillCategoryID;
public ushort SkillupSkillLineID;
public bool HasFlag(SkillLineAbilityFlags skillLineAbilityFlags) { return (Flags & (int)skillLineAbilityFlags) != 0; }
}
public sealed class SkillLineXTraitTreeRecord
@@ -130,10 +133,12 @@ namespace Game.DataStorage
public long RaceMask;
public ushort SkillID;
public int ClassMask;
public SkillRaceClassInfoFlags Flags;
public ushort Flags;
public sbyte Availability;
public sbyte MinLevel;
public ushort SkillTierID;
public bool HasFlag(SkillRaceClassInfoFlags skillRaceClassInfoFlags) { return (Flags & (int)skillRaceClassInfoFlags) != 0; }
}
public sealed class SoulbindConduitRankRecord
@@ -252,11 +257,13 @@ namespace Game.DataStorage
{
public uint Id;
public string Name;
public SpellCategoryFlags Flags;
public int Flags;
public byte UsesPerWeek;
public byte MaxCharges;
public int ChargeRecoveryTime;
public int TypeMask;
public bool HasFlag(SpellCategoryFlags spellCategoryFlags) { return (Flags & (int)spellCategoryFlags) != 0; }
}
public sealed class SpellClassOptionsRecord
@@ -372,7 +379,7 @@ namespace Game.DataStorage
public byte MinLevel;
public byte MaxLevel;
public SpellItemEnchantmentFlags GetFlags() { return (SpellItemEnchantmentFlags)Flags; }
public bool HasFlag(SpellItemEnchantmentFlags spellItemEnchantmentFlags) { return (Flags & (ushort)spellItemEnchantmentFlags) != 0; }
}
public sealed class SpellItemEnchantmentConditionRecord
@@ -505,9 +512,11 @@ namespace Game.DataStorage
public uint Id;
public string DisplayName;
public string DisplayNameShort;
public SpellRangeFlag Flags;
public byte Flags;
public float[] RangeMin = new float[2];
public float[] RangeMax = new float[2];
public bool HasFlag(SpellRangeFlag spellRangeFlag) { return (Flags & (byte)spellRangeFlag) != 0; }
}
public sealed class SpellReagentsRecord
@@ -552,13 +561,15 @@ namespace Game.DataStorage
public string Name;
public uint CreatureDisplayID;
public sbyte CreatureType;
public SpellShapeshiftFormFlags Flags;
public int Flags;
public int AttackIconFileID;
public sbyte BonusActionBar;
public ushort CombatRoundTime;
public float DamageVariance;
public ushort MountTypeID;
public uint[] PresetSpellID = new uint[SpellConst.MaxShapeshift];
public bool HasFlag(SpellShapeshiftFormFlags spellShapeshiftFormFlags) { return (Flags & (int)spellShapeshiftFormFlags) != 0; }
}
public sealed class SpellTargetRestrictionsRecord
@@ -681,6 +692,6 @@ namespace Game.DataStorage
public int Slot;
public uint[] Flags = new uint[2];
public SummonPropertiesFlags GetFlags() { return (SummonPropertiesFlags)Flags[0]; }
public bool HasFlag(SummonPropertiesFlags summonPropertiesFlags) { return (Flags[0] & (uint)summonPropertiesFlags) != 0; }
}
}
+8 -5
View File
@@ -3,6 +3,7 @@
using Framework.Constants;
using System.Numerics;
using System;
namespace Game.DataStorage
{
@@ -44,11 +45,11 @@ namespace Game.DataStorage
public uint VisibilityConditionID;
public uint[] MountCreatureID = new uint[2];
public TaxiNodeFlags GetFlags() { return (TaxiNodeFlags)Flags; }
public bool HasFlag(TaxiNodeFlags flag) { return (Flags & (int)flag) != 0; }
public bool IsPartOfTaxiNetwork()
{
return GetFlags().HasFlag(TaxiNodeFlags.ShowOnAllianceMap | TaxiNodeFlags.ShowOnHordeMap)
return HasFlag(TaxiNodeFlags.ShowOnAllianceMap | TaxiNodeFlags.ShowOnHordeMap)
// manually whitelisted nodes
|| Id == 1985 // [Hidden] Argus Ground Points Hub (Ground TP out to here, TP to Vindicaar from here)
|| Id == 1986 // [Hidden] Argus Vindicaar Ground Hub (Vindicaar TP out to here, TP to ground from here)
@@ -76,10 +77,12 @@ namespace Game.DataStorage
public ushort PathID;
public int NodeIndex;
public ushort ContinentID;
public TaxiPathNodeFlags Flags;
public int Flags;
public uint Delay;
public uint ArrivalEventID;
public uint DepartureEventID;
public bool HasFlag(TaxiPathNodeFlags taxiPathNodeFlags) { return (Flags & (int)taxiPathNodeFlags) != 0; }
}
public sealed class TotemCategoryRecord
@@ -288,7 +291,7 @@ namespace Game.DataStorage
public float Unused1000_2;
public float Unused1000_3;
public TraitTreeFlag GetFlags() { return (TraitTreeFlag)Flags; }
public bool HasFlag(TraitTreeFlag traitTreeFlag) { return (Flags & (int)traitTreeFlag) != 0; }
}
public sealed class TraitTreeLoadoutRecord
@@ -331,7 +334,7 @@ namespace Game.DataStorage
public int SpellItemEnchantmentID;
public int Flags;
public TransmogIllusionFlags GetFlags() { return (TransmogIllusionFlags)Flags; }
public bool HasFlag(TransmogIllusionFlags transmogIllusionFlags) { return (Flags & (int)transmogIllusionFlags) != 0; }
}
public sealed class TransmogSetRecord
+2 -2
View File
@@ -23,7 +23,7 @@ namespace Game.DataStorage
public int AlternateUiMapGroup;
public int ContentTuningID;
public UiMapFlag GetFlags() { return (UiMapFlag)Flags; }
public bool HasFlag(UiMapFlag uiMapFlag) { return (Flags & (int)uiMapFlag) != 0; }
}
public sealed class UiMapAssignmentRecord
@@ -90,7 +90,7 @@ namespace Game.DataStorage
public sbyte[] Op = new sbyte[8];
public int[] Value = new int[8];
public UnitConditionFlags GetFlags() { return (UnitConditionFlags)Flags; }
public bool HasFlag(UnitConditionFlags unitConditionFlags) { return (Flags & (byte)unitConditionFlags) != 0; }
}
public sealed class UnitPowerBarRecord
+7 -12
View File
@@ -10,7 +10,7 @@ namespace Game.DataStorage
public sealed class VehicleRecord
{
public uint Id;
public VehicleFlags Flags;
public int Flags;
public int FlagsB;
public float TurnSpeed;
public float PitchSpeed;
@@ -28,6 +28,8 @@ namespace Game.DataStorage
public ushort VehiclePOITypeID;
public ushort[] SeatID = new ushort[8];
public ushort[] PowerDisplayID = new ushort[3];
public bool HasFlag(VehicleFlags vehicleFlags) { return (Flags & (int)vehicleFlags) != 0; }
}
public sealed class VehicleSeatRecord
@@ -95,15 +97,8 @@ namespace Game.DataStorage
public short VehicleExitAnimKitID;
public short CameraModeID;
public bool HasFlag(VehicleSeatFlags flag)
{
return Flags.HasAnyFlag((int)flag);
}
public bool HasFlag(VehicleSeatFlagsB flag)
{
return FlagsB.HasAnyFlag((int)flag);
}
public bool HasFlag(VehicleSeatFlags flag) { return (Flags & (int)flag) != 0; }
public bool HasFlag(VehicleSeatFlagsB flag) { return (FlagsB & (int)flag) != 0; }
public bool CanEnterOrExit()
{
@@ -135,10 +130,10 @@ namespace Game.DataStorage
public int RewardQuestID;
public int UiWidgetSetID;
public VignetteFlags GetFlags() { return (VignetteFlags)Flags; }
public bool HasFlag(VignetteFlags vignetteFlags) { return (Flags & (int)vignetteFlags) != 0; }
public bool IsInfiniteAOI()
{
return GetFlags().HasFlag(VignetteFlags.InfiniteAOI | VignetteFlags.ZoneInfiniteAOI);
return HasFlag(VignetteFlags.InfiniteAOI | VignetteFlags.ZoneInfiniteAOI);
}
}
}