aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/DataStores
diff options
context:
space:
mode:
authorMeji <alvaromegias_46@hotmail.com>2021-09-29 22:26:25 +0200
committerGitHub <noreply@github.com>2021-09-29 22:26:25 +0200
commitde4eaa0de9565da604fa3b6e2b4b59efe117fd7a (patch)
tree1ad955f009dc8796f8d15bc5e2154082c8e8fc85 /src/server/game/DataStores
parentf507737ecff5d564da999c56d672274387d70ec2 (diff)
Core/BattlePets: Misc fixes (#26964)
* Define BattlePetSpeciesFlags enum class. * Define BattlePetDbFlags enum class. * Added check to prevent the pet from being caged if its species has flag BattlePetSpeciesFlags::NotTradable. * Added check to prevent the pet from being caged if it's in battle pet slots. * Added check to prevent the pet from being caged if its health is below maximum health. * Only add pet if the species has flag BattlePetSpeciesFlags::WellKnown. * Added function to check flag BattlePetSpeciesFlags::LegacyAccountUnique to avoid learning copies of unique pets. * Implemented CMSG_BATTLE_PET_CLEAR_FANFARE.
Diffstat (limited to 'src/server/game/DataStores')
-rw-r--r--src/server/game/DataStores/DB2Structure.h2
-rw-r--r--src/server/game/DataStores/DBCEnums.h22
2 files changed, 24 insertions, 0 deletions
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index 941ecc72605..351f6e3d94e 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -479,6 +479,8 @@ struct BattlePetSpeciesEntry
int32 CardUIModelSceneID;
int32 LoadoutUIModelSceneID;
int32 CovenantID;
+
+ EnumFlag<BattlePetSpeciesFlags> GetFlags() const { return static_cast<BattlePetSpeciesFlags>(Flags); }
};
struct BattlePetSpeciesStateEntry
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index babc2fde7a2..26dbebefc37 100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -193,6 +193,28 @@ enum AzeriteTierUnlockSetFlags
#define BATTLE_PET_SPECIES_MAX_ID 3159
+enum class BattlePetSpeciesFlags : uint16
+{
+ NoRename = 0x0001,
+ WellKnown = 0x0002,
+ NotAccountWide = 0x0004,
+ Capturable = 0x0008,
+ NotTradable = 0x0010,
+ HideFromJournal = 0x0020,
+ LegacyAccountUnique = 0x0040,
+ CantBattle = 0x0080,
+ HordeOnly = 0x0100,
+ AllianceOnly = 0x0200,
+ Boss = 0x0400,
+ RandomDisplay = 0x0800,
+ NoLicenseRequired = 0x1000,
+ AddsAllowedWithBoss = 0x2000,
+ HideUntilLearned = 0x4000,
+ MatchPlayerHighPetLevel = 0x8000
+};
+
+DEFINE_ENUM_FLAG(BattlePetSpeciesFlags);
+
enum class BattlemasterListFlags : uint32
{
InternalOnly = 0x01,