Core/Battlegrounds: Update BattlemasterListFlags (#26819)
This commit is contained in:
@@ -3037,7 +3037,7 @@ bool CriteriaHandler::ModifierSatisfied(ModifierTreeEntry const* modifier, uint6
|
||||
case ModifierTreeType::PlayerIsInPvpBrawl: // 220
|
||||
{
|
||||
BattlemasterListEntry const* bg = sBattlemasterListStore.LookupEntry(referencePlayer->GetBattlegroundTypeId());
|
||||
if (!bg || !(bg->Flags & BATTLEMASTER_LIST_FLAG_BRAWL))
|
||||
if (!bg || !(bg->GetFlags().HasFlag(BattlemasterListFlags::IsBrawl)))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -509,6 +509,8 @@ struct BattlemasterListEntry
|
||||
int32 IconFileDataID;
|
||||
int32 RequiredPlayerConditionID;
|
||||
int16 MapID[16];
|
||||
|
||||
EnumFlag<BattlemasterListFlags> GetFlags() const { return static_cast<BattlemasterListFlags>(Flags); }
|
||||
};
|
||||
|
||||
#define MAX_BROADCAST_TEXT_EMOTES 3
|
||||
|
||||
@@ -193,17 +193,20 @@ enum AzeriteTierUnlockSetFlags
|
||||
|
||||
#define BATTLE_PET_SPECIES_MAX_ID 3159
|
||||
|
||||
enum BattlemasterListFlags
|
||||
enum class BattlemasterListFlags : uint32
|
||||
{
|
||||
BATTLEMASTER_LIST_FLAG_DISABLED = 0x01,
|
||||
BATTLEMASTER_LIST_FLAG_SKIP_ROLE_CHECK = 0x02,
|
||||
BATTLEMASTER_LIST_FLAG_UNK04 = 0x04,
|
||||
BATTLEMASTER_LIST_FLAG_CAN_INIT_WAR_GAME = 0x08,
|
||||
BATTLEMASTER_LIST_FLAG_CAN_SPECIFIC_QUEUE = 0x10,
|
||||
BATTLEMASTER_LIST_FLAG_BRAWL = 0x20,
|
||||
BATTLEMASTER_LIST_FLAG_FACTIONAL = 0x40
|
||||
InternalOnly = 0x01,
|
||||
RatedOnly = 0x02, // Only set for rated battlegrounds
|
||||
ObsoleteDoNotList = 0x04,
|
||||
ShowInWarGames = 0x08,
|
||||
ShowInPvpBattlegroundList = 0x10,
|
||||
IsBrawl = 0x20,
|
||||
IsFactional = 0x40,
|
||||
IsEpic = 0x80
|
||||
};
|
||||
|
||||
DEFINE_ENUM_FLAG(BattlemasterListFlags);
|
||||
|
||||
enum class ChrRacesFlag : int32
|
||||
{
|
||||
AlliedRace = 0x80000
|
||||
|
||||
@@ -82,7 +82,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
|
||||
BattlemasterListEntry const* battlemasterListEntry = sBattlemasterListStore.AssertEntry(bgQueueTypeId.BattlemasterListId);
|
||||
|
||||
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgQueueTypeId.BattlemasterListId, nullptr) || (battlemasterListEntry->Flags & BATTLEMASTER_LIST_FLAG_DISABLED) != 0)
|
||||
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgQueueTypeId.BattlemasterListId, nullptr) || battlemasterListEntry->GetFlags().HasFlag(BattlemasterListFlags::InternalOnly))
|
||||
{
|
||||
ChatHandler(this).PSendSysMessage(LANG_BG_DISABLED);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user