feat(Battlegrounds): make it compatible with custom arena type (#18679)

* feat(Battlegrounds): make it compatible with custom arena type

* fix(BattlegroundQueue.cpp): ignore bg for arena condition

* feat(Scripting): add OnQueueUpdateValidity hook

* fix: codestyle
This commit is contained in:
Stefano Borzì
2024-09-08 20:05:58 +02:00
committed by GitHub
parent cf95c1dfbd
commit 0dd5c6e3b4
5 changed files with 17 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ enum AllBattlegroundHook
ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_BEFORE_ADD_PLAYER,
ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_REMOVE_PLAYER_AT_LEAVE,
ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE,
ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE_VALIDITY,
ALLBATTLEGROUNDHOOK_ON_ADD_GROUP,
ALLBATTLEGROUNDHOOK_CAN_FILL_PLAYERS_TO_BG,
ALLBATTLEGROUNDHOOK_IS_CHECK_NORMAL_MATCH,
@@ -78,6 +79,8 @@ public:
virtual void OnQueueUpdate(BattlegroundQueue* /*queue*/, uint32 /* diff */, BattlegroundTypeId /* bgTypeId */, BattlegroundBracketId /* bracket_id */, uint8 /* arenaType */, bool /* isRated */, uint32 /* arenaRating */) { }
[[nodiscard]] virtual bool OnQueueUpdateValidity(BattlegroundQueue* /*queue*/, uint32 /* diff */, BattlegroundTypeId /* bgTypeId */, BattlegroundBracketId /* bracket_id */, uint8 /* arenaType */, bool /* isRated */, uint32 /* arenaRating */) { return true; }
virtual void OnAddGroup(BattlegroundQueue* /*queue*/, GroupQueueInfo* /*ginfo*/, uint32& /*index*/, Player* /*leader*/, Group* /*group*/, BattlegroundTypeId /* bgTypeId */, PvPDifficultyEntry const* /* bracketEntry */,
uint8 /* arenaType */, bool /* isRated */, bool /* isPremade */, uint32 /* arenaRating */, uint32 /* matchmakerRating */, uint32 /* arenaTeamId */, uint32 /* opponentsArenaTeamId */) { }