Skip to content

Commit 6fafe41

Browse files
authored
Merge branch 'azerothcore:master' into master
2 parents 303aac1 + 67b52c7 commit 6fafe41

File tree

13 files changed

+370
-28
lines changed

13 files changed

+370
-28
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
-- DB update 2026_02_15_07 -> 2026_02_16_00
2+
-- Onyx Blaze Mistress
3+
-- Updates comments, add Conjure Flame Orb
4+
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30681);
5+
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
6+
(30681, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 12000, 13000, 0, 0, 11, 39529, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Blaze Mistress - In Combat - Cast \'Flame Shock\''),
7+
(30681, 0, 1, 0, 0, 0, 100, 0, 8000, 8000, 19000, 22000, 0, 0, 11, 57757, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Blaze Mistress - In Combat - Cast \'Rain of Fire\''),
8+
(30681, 0, 2, 0, 0, 0, 100, 0, 3000, 11000, 8000, 15000, 0, 0, 11, 57753, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Blaze Mistress - In Combat - Cast \'Conjure Flame Orb\''),
9+
(30681, 0, 3, 0, 8, 0, 100, 0, 57753, 0, 0, 0, 0, 0, 11, 57752, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Blaze Mistress - On Spellhit \'Conjure Flame Orb\' - Cast \'Flame Orb Summon\'');
10+
11+
-- Onyx Brood General
12+
-- Update comments, add Draconic Rage 25m, text
13+
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30680);
14+
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
15+
(30680, 0, 0, 0, 60, 0, 100, 0, 0, 0, 600000, 600000, 0, 0, 11, 57740, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - On Update - Cast \'Devotion Aura\''),
16+
(30680, 0, 1, 0, 0, 0, 100, 0, 5000, 6000, 7000, 8000, 0, 0, 11, 13737, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - In Combat - Cast \'Mortal Strike\''),
17+
(30680, 0, 2, 0, 0, 0, 100, 0, 15000, 15000, 40000, 40000, 0, 0, 11, 57733, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - In Combat - Cast \'Draconic Rage\''),
18+
(30680, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 57742, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - On Just Died - Cast \'Avenging Fury\''),
19+
(30680, 0, 4, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Brood General - On Initialize - Say Line 0');
20+
21+
DELETE FROM `spelldifficulty_dbc` WHERE `ID`=57733;
22+
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES
23+
(57733, 57733, 58942, 0, 0);
24+
25+
DELETE FROM `creature_text` WHERE `CreatureID`=30680;
26+
INSERT INTO `creature_text` (`CreatureID`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES
27+
(30680, 0, 0, 'Brood Guardians reporting in!', 14, 0, 100, 0, 0, 0, 'Onyx Brood General', 31397);
28+
29+
-- Onyx Sanctum Guardian
30+
-- use 25m spells, update comments, add text
31+
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30453);
32+
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
33+
(30453, 0, 0, 0, 0, 0, 100, 0, 7000, 9000, 17000, 18000, 0, 0, 11, 57728, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - In Combat - Cast \'Shockwave\''),
34+
(30453, 0, 1, 0, 0, 0, 100, 0, 13000, 13000, 30000, 30000, 0, 0, 11, 58948, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - In Combat - Cast \'Curse of Mending\''),
35+
(30453, 0, 2, 3, 12, 0, 100, 0, 25, 30, 5000, 5000, 0, 0, 11, 53801, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - Target Between 25-30% Health - Cast \'Frenzy\''),
36+
(30453, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - Target Between 25-30% Health - Say Line 0'),
37+
(30453, 0, 4, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Onyx Sanctum Guardian - On Initialize - Say Line 1');
38+
39+
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (58948, 57728);
40+
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES
41+
(58948, 58948, 39647, 0, 0),
42+
(57728, 57728, 58947, 0, 0);
43+
44+
DELETE FROM `creature_text` WHERE `CreatureID`=30453;
45+
INSERT INTO `creature_text` (`CreatureID`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES
46+
(30453, 0, 0, '%s goes into a frenzy!', 16, 0, 100, 0, 0, 0, 'Onyx Sanctum Guardian', 38630),
47+
(30453, 1, 0, 'Sanctum Guardians reporting in!', 14, 0, 100, 0, 0, 0, 'Onyx Sanctum Guardian', 31398);
48+
49+
-- Flame Orb
50+
UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `flags_extra` = `flags_extra` | (128 | 64) WHERE `entry`=30702;
51+
DELETE FROM `creature_template_movement` WHERE `CreatureId`=30702;
52+
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`) VALUES
53+
(30702, 1, 0, 1, 0, 0, 0);
54+
55+
DELETE FROM `spelldifficulty_dbc` WHERE `ID`=57750;
56+
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES
57+
(57750, 57750, 58037, 0, 0);
58+
59+
DELETE FROM `creature_template_addon` WHERE (`entry` = 30702);
60+
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
61+
(30702, 0, 0, 0, 0, 0, 0, '57750 55928');

src/server/game/Battlegrounds/Arena.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,16 +436,16 @@ void Arena::EndBattleground(TeamId winnerTeamId)
436436

437437
// Last standing - Rated 5v5 arena & be solely alive player
438438
if (GetArenaType() == ARENA_TYPE_5v5 && aliveWinners == 1 && player->IsAlive())
439-
{
440439
player->CastSpell(player, SPELL_LAST_MAN_STANDING, true);
441-
}
442440

443-
winnerArenaTeam->MemberWon(player, loserMatchmakerRating, winnerMatchmakerChange);
441+
if (sScriptMgr->OnBeforeArenaTeamMemberUpdate(winnerArenaTeam, player, true, loserMatchmakerRating, winnerMatchmakerChange))
442+
winnerArenaTeam->MemberWon(player, loserMatchmakerRating, winnerMatchmakerChange);
444443
}
445444
}
446445
else
447446
{
448-
loserArenaTeam->MemberLost(player, winnerMatchmakerRating, loserMatchmakerChange);
447+
if (sScriptMgr->OnBeforeArenaTeamMemberUpdate(loserArenaTeam, player, false, winnerMatchmakerRating, loserMatchmakerChange))
448+
loserArenaTeam->MemberLost(player, winnerMatchmakerRating, loserMatchmakerChange);
449449

450450
// Arena lost => reset the win_rated_arena having the "no_lose" condition
451451
player->ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_CONDITION_NO_LOSE, 0);

src/server/game/Battlegrounds/ArenaTeam.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -966,12 +966,15 @@ void ArenaTeam::SaveToDB(bool forceMemberSave)
966966
stmt->SetData(6, itr->Guid.GetCounter());
967967
trans->Append(stmt);
968968

969-
stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CHARACTER_ARENA_STATS);
970-
stmt->SetData(0, itr->Guid.GetCounter());
971-
stmt->SetData(1, GetSlot());
972-
stmt->SetData(2, itr->MatchMakerRating);
973-
stmt->SetData(3, itr->MaxMMR);
974-
trans->Append(stmt);
969+
if (sScriptMgr->CanSaveArenaStatsForMember(this, itr->Guid))
970+
{
971+
stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CHARACTER_ARENA_STATS);
972+
stmt->SetData(0, itr->Guid.GetCounter());
973+
stmt->SetData(1, GetSlot());
974+
stmt->SetData(2, itr->MatchMakerRating);
975+
stmt->SetData(3, itr->MaxMMR);
976+
trans->Append(stmt);
977+
}
975978
}
976979

977980
CharacterDatabase.CommitTransaction(trans);

src/server/game/Battlegrounds/BattlegroundQueue.cpp

Lines changed: 81 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -565,15 +565,37 @@ void BattlegroundQueue::FillPlayersToBG(Battleground* bg, BattlegroundBracketId
565565

566566
//index to queue which group is current
567567
uint32 aliIndex = 0;
568-
for (; aliIndex < aliCount && m_SelectionPools[TEAM_ALLIANCE].AddGroup((*Ali_itr), aliFree); aliIndex++)
568+
for (; aliIndex < aliCount; aliIndex++)
569+
{
570+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, (*Ali_itr), m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount(), bg, bracket_id))
571+
{
572+
++Ali_itr;
573+
continue;
574+
}
575+
576+
if (!m_SelectionPools[TEAM_ALLIANCE].AddGroup((*Ali_itr), aliFree))
577+
break;
578+
569579
++Ali_itr;
580+
}
570581

571582
//the same thing for horde
572583
GroupsQueueType::const_iterator Horde_itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].begin();
573584

574585
uint32 hordeIndex = 0;
575-
for (; hordeIndex < hordeCount && m_SelectionPools[TEAM_HORDE].AddGroup((*Horde_itr), hordeFree); hordeIndex++)
586+
for (; hordeIndex < hordeCount; hordeIndex++)
587+
{
588+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, (*Horde_itr), m_SelectionPools[TEAM_HORDE].GetPlayerCount(), bg, bracket_id))
589+
{
590+
++Horde_itr;
591+
continue;
592+
}
593+
594+
if (!m_SelectionPools[TEAM_HORDE].AddGroup((*Horde_itr), hordeFree))
595+
break;
596+
576597
++Horde_itr;
598+
}
577599

578600
//if ofc like BG queue invitation is set in config, then we are happy
579601
if (sWorld->getIntConfig(CONFIG_BATTLEGROUND_INVITATION_TYPE) == BG_QUEUE_INVITATION_TYPE_NO_BALANCE)
@@ -599,8 +621,19 @@ void BattlegroundQueue::FillPlayersToBG(Battleground* bg, BattlegroundBracketId
599621
//kick alliance group, add to pool new group if needed
600622
if (m_SelectionPools[TEAM_ALLIANCE].KickGroup(diffHorde - diffAli))
601623
{
602-
for (; aliIndex < aliCount && m_SelectionPools[TEAM_ALLIANCE].AddGroup((*Ali_itr), (aliFree >= diffHorde) ? aliFree - diffHorde : 0); aliIndex++)
624+
for (; aliIndex < aliCount; aliIndex++)
625+
{
626+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, (*Ali_itr), m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount(), bg, bracket_id))
627+
{
628+
++Ali_itr;
629+
continue;
630+
}
631+
632+
if (!m_SelectionPools[TEAM_ALLIANCE].AddGroup((*Ali_itr), (aliFree >= diffHorde) ? aliFree - diffHorde : 0))
633+
break;
634+
603635
++Ali_itr;
636+
}
604637
}
605638

606639
//if ali selection is already empty, then kick horde group, but if there are less horde than ali in bg - break;
@@ -617,8 +650,19 @@ void BattlegroundQueue::FillPlayersToBG(Battleground* bg, BattlegroundBracketId
617650
//kick horde group, add to pool new group if needed
618651
if (m_SelectionPools[TEAM_HORDE].KickGroup(diffAli - diffHorde))
619652
{
620-
for (; hordeIndex < hordeCount && m_SelectionPools[TEAM_HORDE].AddGroup((*Horde_itr), (hordeFree >= diffAli) ? hordeFree - diffAli : 0); hordeIndex++)
653+
for (; hordeIndex < hordeCount; hordeIndex++)
654+
{
655+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, (*Horde_itr), m_SelectionPools[TEAM_HORDE].GetPlayerCount(), bg, bracket_id))
656+
{
657+
++Horde_itr;
658+
continue;
659+
}
660+
661+
if (!m_SelectionPools[TEAM_HORDE].AddGroup((*Horde_itr), (hordeFree >= diffAli) ? hordeFree - diffAli : 0))
662+
break;
663+
621664
++Horde_itr;
665+
}
622666
}
623667

624668
if (!m_SelectionPools[TEAM_HORDE].GetPlayerCount())
@@ -656,6 +700,12 @@ bool BattlegroundQueue::CheckPremadeMatch(BattlegroundBracketId bracket_id, uint
656700
// if found both groups
657701
if (ali_group != m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].end() && horde_group != m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].end())
658702
{
703+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, (*ali_group), 0, nullptr, bracket_id))
704+
return false;
705+
706+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, (*horde_group), m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount(), nullptr, bracket_id))
707+
return false;
708+
659709
m_SelectionPools[TEAM_ALLIANCE].AddGroup((*ali_group), MaxPlayersPerTeam);
660710
m_SelectionPools[TEAM_HORDE].AddGroup((*horde_group), MaxPlayersPerTeam);
661711

@@ -667,9 +717,14 @@ bool BattlegroundQueue::CheckPremadeMatch(BattlegroundBracketId bracket_id, uint
667717
{
668718
for (itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin(); itr != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++itr)
669719
{
670-
//if itr can join BG and player count is less that maxPlayers, then add group to selectionpool
671-
if (!(*itr)->IsInvitedToBGInstanceGUID && !m_SelectionPools[i].AddGroup((*itr), maxPlayers))
672-
break;
720+
if (!(*itr)->IsInvitedToBGInstanceGUID)
721+
{
722+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, (*itr), m_SelectionPools[i].GetPlayerCount(), nullptr, bracket_id))
723+
continue;
724+
725+
if (!m_SelectionPools[i].AddGroup((*itr), maxPlayers))
726+
break;
727+
}
673728
}
674729
}
675730

@@ -727,9 +782,12 @@ bool BattlegroundQueue::CheckNormalMatch(Battleground* bgTemplate, BattlegroundB
727782
{
728783
if (!(*(itr_team[i]))->IsInvitedToBGInstanceGUID)
729784
{
730-
m_SelectionPools[i].AddGroup(*(itr_team[i]), maxPlayers);
731-
if (m_SelectionPools[i].GetPlayerCount() >= minPlayers)
732-
break;
785+
if (sScriptMgr->CanAddGroupToMatchingPool(this, *(itr_team[i]), m_SelectionPools[i].GetPlayerCount(), bgTemplate, bracket_id))
786+
{
787+
m_SelectionPools[i].AddGroup(*(itr_team[i]), maxPlayers);
788+
if (m_SelectionPools[i].GetPlayerCount() >= minPlayers)
789+
break;
790+
}
733791
}
734792
}
735793
}
@@ -747,8 +805,13 @@ bool BattlegroundQueue::CheckNormalMatch(Battleground* bgTemplate, BattlegroundB
747805
for (; itr_team[j] != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + j].end(); ++(itr_team[j]))
748806
{
749807
if (!(*(itr_team[j]))->IsInvitedToBGInstanceGUID)
808+
{
809+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, *(itr_team[j]), m_SelectionPools[j].GetPlayerCount(), bgTemplate, bracket_id))
810+
continue;
811+
750812
if (!m_SelectionPools[j].AddGroup(*(itr_team[j]), m_SelectionPools[(j + 1) % PVP_TEAMS_COUNT].GetPlayerCount()))
751813
break;
814+
}
752815
}
753816

754817
// do not allow to start bg with more than 2 players more on 1 faction
@@ -795,9 +858,14 @@ bool BattlegroundQueue::CheckSkirmishForSameFaction(BattlegroundBracketId bracke
795858
//invite players to other selection pool
796859
for (; itr_team2 != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + static_cast<uint8>(teamIndex)].end(); ++itr_team2)
797860
{
798-
//if selection pool is full then break;
799-
if (!(*itr_team2)->IsInvitedToBGInstanceGUID && !m_SelectionPools[otherTeam].AddGroup(*itr_team2, minPlayersPerTeam))
800-
break;
861+
if (!(*itr_team2)->IsInvitedToBGInstanceGUID)
862+
{
863+
if (!sScriptMgr->CanAddGroupToMatchingPool(this, *itr_team2, m_SelectionPools[otherTeam].GetPlayerCount(), nullptr, bracket_id))
864+
continue;
865+
866+
if (!m_SelectionPools[otherTeam].AddGroup(*itr_team2, minPlayersPerTeam))
867+
break;
868+
}
801869
}
802870

803871
if (m_SelectionPools[otherTeam].GetPlayerCount() != minPlayersPerTeam)

src/server/game/Entities/Player/PlayerStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4870,7 +4870,7 @@ void Player::_LoadArenaTeamInfo()
48704870
ArenaTeam* arenaTeam = sArenaTeamMgr->GetArenaTeamById(arenaTeamId);
48714871
if (!arenaTeam)
48724872
{
4873-
LOG_ERROR("bg.arena", "Player::_LoadArenaTeamInfo: No arena team was found.");
4873+
LOG_ERROR("bg.arena", "Player::_LoadArenaTeamInfo: Team with ID {} not found.", arenaTeamId);
48744874
continue;
48754875
}
48764876
ArenaTeamMember const* member = arenaTeam->GetMember(GetGUID());

src/server/game/Handlers/GroupHandler.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,8 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket& /*recvData*/)
445445
if (!grp && !grpInvite)
446446
return;
447447

448-
if (_player->InBattleground())
449-
{
450-
SendPartyResult(PARTY_OP_INVITE, "", ERR_INVITE_RESTRICTED);
448+
if (_player->InBattleground()) // Do not leave group, give no error. Verified on TBC Classic
451449
return;
452-
}
453450

454451
/** error handling **/
455452
/********************/

src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ void ScriptMgr::OnBattlegroundCreate(Battleground* bg)
104104
CALL_ENABLED_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_CREATE, script->OnBattlegroundCreate(bg));
105105
}
106106

107+
bool ScriptMgr::CanAddGroupToMatchingPool(BattlegroundQueue* queue, GroupQueueInfo* group, uint32 poolPlayerCount, Battleground* bg, BattlegroundBracketId bracketId)
108+
{
109+
CALL_ENABLED_BOOLEAN_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_CAN_ADD_GROUP_TO_MATCHING_POOL, !script->CanAddGroupToMatchingPool(queue, group, poolPlayerCount, bg, bracketId));
110+
}
111+
112+
bool ScriptMgr::GetPlayerMatchmakingRating(ObjectGuid playerGuid, BattlegroundTypeId bgTypeId, float& outRating)
113+
{
114+
CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_GET_PLAYER_MATCHMAKING_RATING, script->GetPlayerMatchmakingRating(playerGuid, bgTypeId, outRating));
115+
}
116+
107117
AllBattlegroundScript::AllBattlegroundScript(char const* name, std::vector<uint16> enabledHooks) :
108118
ScriptObject(name, ALLBATTLEGROUNDHOOK_END)
109119
{

0 commit comments

Comments
 (0)