mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Define and use ChrRacesFlag and CreatureModelDataFlags (ref 772f506a3b)
This commit is contained in:
@@ -1004,6 +1004,8 @@ struct CreatureModelDataEntry
|
||||
int8 Unknown820_1; // scale related
|
||||
float Unknown820_2; // scale related
|
||||
float Unknown820_3[2]; // scale related
|
||||
|
||||
EnumFlag<CreatureModelDataFlags> GetFlags() const { return static_cast<CreatureModelDataFlags>(Flags); }
|
||||
};
|
||||
|
||||
struct CreatureTypeEntry
|
||||
|
||||
@@ -231,7 +231,31 @@ DEFINE_ENUM_FLAG(BattlemasterListFlags);
|
||||
|
||||
enum class ChrRacesFlag : int32
|
||||
{
|
||||
AlliedRace = 0x80000
|
||||
NPCOnly = 0x000001,
|
||||
DoNotComponentFeet = 0x000002,
|
||||
CanMount = 0x000004,
|
||||
HasBald = 0x000008,
|
||||
BindToStartingArea = 0x000010,
|
||||
AlternateForm = 0x000020,
|
||||
CanMountSelf = 0x000040,
|
||||
ForceToHDModelIfAvailable = 0x000080,
|
||||
ExaltedWithAllVendors = 0x000100,
|
||||
NotSelectable = 0x000200,
|
||||
ReputationBonus = 0x000400,
|
||||
UseLoincloth = 0x000800,
|
||||
RestBonus = 0x001000,
|
||||
NoStartKits = 0x002000,
|
||||
NoStartingWeapon = 0x004000,
|
||||
DontRedeemAccountLicenses = 0x008000,
|
||||
SkinVariationIsHairColor = 0x010000,
|
||||
UsePandarenRingForComponentingTexture = 0x020000,
|
||||
IgnoreForAssetManifestComponentInfoParsing = 0x040000,
|
||||
IsAlliedRace = 0x080000,
|
||||
VoidVendorDiscount = 0x100000,
|
||||
DAMMComponentNoMaleGeneration = 0x200000,
|
||||
DAMMComponentNoFemaleGeneration = 0x400000,
|
||||
NoAssociatedFactionReputationInRaceChange = 0x800000,
|
||||
InternalOnly = 0x100000,
|
||||
};
|
||||
|
||||
DEFINE_ENUM_FLAG(ChrRacesFlag);
|
||||
@@ -271,6 +295,30 @@ enum class CorruptionEffectsFlag
|
||||
|
||||
DEFINE_ENUM_FLAG(CorruptionEffectsFlag);
|
||||
|
||||
enum class CreatureModelDataFlags : uint32
|
||||
{
|
||||
NoFootprintParticles = 0x00001,
|
||||
NoBreathParticles = 0x00002,
|
||||
IsPlayerModel = 0x00004,
|
||||
NoAttachedWeapons = 0x00010,
|
||||
NoFootprintTrailTextures = 0x00020,
|
||||
DisableHighlight = 0x00040,
|
||||
CanMountWhileTransformedAsThis = 0x00080,
|
||||
DisableScaleInterpolation = 0x00100,
|
||||
ForceProjectedTex = 0x00200,
|
||||
CanJumpInPlaceAsMount = 0x00400,
|
||||
AICannotUseWalkBackwardsAnim = 0x00800,
|
||||
IgnoreSpineLowForSplitBody = 0x01000,
|
||||
IgnoreHeadForSplitBody = 0x02000,
|
||||
IgnoreSpineLowForSplitBodyWhenFlying = 0x04000,
|
||||
IgnoreHeadForSplitBodyWhenFlying = 0x08000,
|
||||
UseWheelAnimationOnUnitWheelBones = 0x10000,
|
||||
IsHDModel = 0x20000,
|
||||
SuppressEmittersOnLowSettings = 0x40000
|
||||
};
|
||||
|
||||
DEFINE_ENUM_FLAG(CreatureModelDataFlags);
|
||||
|
||||
enum class CriteriaFailEvent : uint8
|
||||
{
|
||||
None = 0,
|
||||
|
||||
@@ -24039,7 +24039,7 @@ void Player::ReportedAfkBy(Player* reporter)
|
||||
uint8 Player::GetStartLevel(uint8 race, uint8 playerClass, Optional<int32> characterTemplateId) const
|
||||
{
|
||||
uint8 startLevel = sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL);
|
||||
if (sChrRacesStore.AssertEntry(race)->GetFlags().HasFlag(ChrRacesFlag::AlliedRace))
|
||||
if (sChrRacesStore.AssertEntry(race)->GetFlags().HasFlag(ChrRacesFlag::IsAlliedRace))
|
||||
startLevel = sWorld->getIntConfig(CONFIG_START_ALLIED_RACE_LEVEL);
|
||||
|
||||
if (playerClass == CLASS_DEATH_KNIGHT)
|
||||
|
||||
@@ -8517,8 +8517,8 @@ bool Unit::IsDisallowedMountForm(uint32 spellId, ShapeshiftForm form, uint32 dis
|
||||
CreatureModelDataEntry const* model = sCreatureModelDataStore.LookupEntry(display->ModelID);
|
||||
ChrRacesEntry const* race = sChrRacesStore.LookupEntry(displayExtra->DisplayRaceID);
|
||||
|
||||
if (model && !(model->Flags & 0x80))
|
||||
if (race && !(race->Flags & 0x4))
|
||||
if (model && !model->GetFlags().HasFlag(CreatureModelDataFlags::CanMountWhileTransformedAsThis))
|
||||
if (race && !race->GetFlags().HasFlag(ChrRacesFlag::CanMount))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user