From 9f111ffcb0ed70b1b94ffc8aff4aa49f0a9c3b08 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Tue, 13 Dec 2022 18:37:03 +0100 Subject: [PATCH] Core/Datastores: added official definitions for all relevant summon properties dbc fields --- src/server/game/DataStores/DBCEnums.h | 55 +++++++++++++++++++++++ src/server/game/DataStores/DBCStructure.h | 2 + 2 files changed, 57 insertions(+) diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index 9b820c3768..6e30aaee2e 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -653,6 +653,61 @@ enum TotemCategoryType TOTEM_CATEGORY_TYPE_SPANNER = 24 }; +// SummonProperties.dbc, col 1 +enum class SummonPropertiesControl : uint8 +{ + None = 0, // Wild + Guardian = 1, + Pet = 2, + Possessed = 3, + PossessedVehicle = 4, + Vehicle = 5 // Wild, but Ride Spell will be cast +}; + +// SummonProperties.dbc, col 4 +enum class SummonPropertiesSlot : int8 +{ + None = 0, + Totem1 = 1, + Totem2 = 2, + Totem3 = 3, + Totem4 = 4, + Critter = 5, + Quest = 6, // Players Only + + Max, + AnyAvailableTotem = -1 +}; + +// SummonProperties.dbc, col 5 +enum class SummonPropertiesFlags : uint32 +{ + None = 0x000000, + AttackSummoner = 0x000001, + HelpWhenSummonedInCombat = 0x000002, + UseLevelOffset = 0x000004, + DespawnOnSummonerDeath = 0x000008, + OnlyVisibleToSummoner = 0x000010, + CannotDismissPet = 0x000020, + UseDemonTimeout = 0x000040, + UnlimitedSummons = 0x000080, + UseCreatureLevel = 0x000100, + JoinSummonerSpawnGroup = 0x000200, + DoNotToggle = 0x000400, + DespawnWhenExpired = 0x000800, + UseSummonerFaction = 0x001000, + DoNotFollowMountedSummoner = 0x002000, + SavePetAutocast = 0x004000, + IgnoreSummonerPhase = 0x008000, + OnlyVisibleToSummonerGroup = 0x010000, + DespawnOnSummonerLogout = 0x020000, + CastRideVehicleSpellOnSummoner = 0x040000, + GuardianActsLikePet = 0x080000, + DontSnapSessileToGround = 0x100000 +}; + +DEFINE_ENUM_FLAG(SummonPropertiesFlags); + // SummonProperties.dbc, col 1 enum SummonPropGroup { diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 5d6fe23419..9bc9c94ff0 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1999,6 +1999,8 @@ struct SummonPropertiesEntry int32 Title; // 3, see enum int32 Slot; // 4, 0-6 uint32 Flags; // 5 + + EnumFlag GetFlags() const { return static_cast(Flags); } }; struct TalentEntry