Skip to content

Commit 281726c

Browse files
Merge AzerothCore 3.3.5 to ElunaAzerothcore [skip ci]
2 parents b58e1c6 + 884289a commit 281726c

7 files changed

Lines changed: 48 additions & 15 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- DB update 2026_06_11_02 -> 2026_06_12_00
2+
-- DB update 2026_06_11_02 -> 2026_06_11_03
3+
-- Spell (ID: 30213) was added to spell_cone in 2026_06_11_02 but does not have
4+
-- a cone implicit target, causing a server warning on startup.
5+
DELETE FROM `spell_cone` WHERE `ID` = 30213;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- DB update 2026_06_12_00 -> 2026_06_12_01
2+
--
3+
-- Remove "We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!"
4+
DELETE FROM `creature_text` WHERE (`CreatureID` = 28787) AND `GroupID` = 0 AND `ID` = 0;
5+
-- Remove "Let's get the hell out of here"
6+
DELETE FROM `creature_text` WHERE (`CreatureID` = 28787) AND `GroupID` = 6 AND `ID` = 0;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- DB update 2026_06_12_01 -> 2026_06_12_02
2+
DELETE FROM `creature_loot_template` WHERE `Entry` = 31610 AND `Item` = 41796;
3+
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
4+
(31610, 41796, 0, 100, 0, 1, 0, 1, 1, 'Anub\'arak (1) - Design: Infused Twilight Opal');

src/server/game/Battlefield/Battlefield.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ void Battlefield::HandlePlayerEnterZone(Player* player, uint32 /*zone*/)
9797
TryRejoinAfterLogout(player); // relog: auto-rejoin, skip invite below
9898

9999
// Xinef: do not invite players on taxi
100-
if (!player->IsInFlight())
100+
// GMs are not invited to war (see InvitePlayerToWar), so skip queue and slot tracking too
101+
if (!player->IsInFlight() && !player->IsGameMaster())
101102
{
102103
// If battle is started,
103104
// If not full of players > invite player to join the war
@@ -109,7 +110,7 @@ void Battlefield::HandlePlayerEnterZone(Player* player, uint32 /*zone*/)
109110
else
110111
{
111112
/// @todo: Send a packet to announce it to player
112-
PlayersWillBeKick[player->GetTeamId()][player->GetGUID()] = GameTime::GetGameTime().count() + (player->IsGameMaster() ? 30 * MINUTE : 10);
113+
PlayersWillBeKick[player->GetTeamId()][player->GetGUID()] = GameTime::GetGameTime().count() + 10;
113114
InvitePlayerToQueue(player);
114115
}
115116
}
@@ -214,6 +215,9 @@ void Battlefield::InvitePlayersInZoneToQueue()
214215

215216
void Battlefield::InvitePlayerToQueue(Player* player)
216217
{
218+
if (player->IsGameMaster()) // GMs are not invited to war, so don't queue them either
219+
return;
220+
217221
if (PlayersInQueue[player->GetTeamId()].count(player->GetGUID()))
218222
return;
219223

@@ -238,6 +242,10 @@ void Battlefield::InvitePlayersInZoneToWar()
238242
{
239243
ForEachPlayerInZone([this](Player* player)
240244
{
245+
// Skip GMs: they are never invited, so they would linger in PlayersWillBeKick forever
246+
if (player->IsGameMaster())
247+
return;
248+
241249
if (IsPlayerInWarOrInvited(player))
242250
return;
243251

src/server/game/Battlegrounds/Arena.cpp

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,13 @@ void Arena::EndBattleground(TeamId winnerTeamId)
246246
trans->Append(stmt2);
247247

248248
uint8 memberId = 0;
249-
for (auto const& [playerGuid, arenaLogEntryData] : ArenaLogEntries)
249+
for (auto& [playerGuid, arenaLogEntryData] : ArenaLogEntries)
250250
{
251251
auto const& score = PlayerScores.find(playerGuid.GetCounter());
252+
// Update stats from PlayerScores if player is still in arena
253+
if (score != PlayerScores.end())
254+
arenaLogEntryData.SaveStats(score->second->GetDamageDone(), score->second->GetHealingDone(), score->second->GetKillingBlows());
255+
252256
stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_LOG_MEMBERSTATS);
253257
stmt2->SetData(0, fightId);
254258
stmt2->SetData(1, ++memberId);
@@ -257,18 +261,9 @@ void Arena::EndBattleground(TeamId winnerTeamId)
257261
stmt2->SetData(4, arenaLogEntryData.ArenaTeamId);
258262
stmt2->SetData(5, arenaLogEntryData.Acc);
259263
stmt2->SetData(6, arenaLogEntryData.IP);
260-
if (score != PlayerScores.end())
261-
{
262-
stmt2->SetData(7, score->second->GetDamageDone());
263-
stmt2->SetData(8, score->second->GetHealingDone());
264-
stmt2->SetData(9, score->second->GetKillingBlows());
265-
}
266-
else
267-
{
268-
stmt2->SetData(7, 0);
269-
stmt2->SetData(8, 0);
270-
stmt2->SetData(9, 0);
271-
}
264+
stmt2->SetData(7, arenaLogEntryData.DamageDone);
265+
stmt2->SetData(8, arenaLogEntryData.HealingDone);
266+
stmt2->SetData(9, arenaLogEntryData.KillingBlows);
272267
trans->Append(stmt2);
273268
}
274269

src/server/game/Battlegrounds/Battleground.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,11 @@ void Battleground::RemovePlayerAtLeave(Player* player)
10801080
auto const& itr2 = PlayerScores.find(player->GetGUID().GetCounter());
10811081
if (itr2 != PlayerScores.end())
10821082
{
1083+
// Save stats to ArenaLogEntries before deleting score (for arena logging)
1084+
auto itr3 = ArenaLogEntries.find(player->GetGUID());
1085+
if (itr3 != ArenaLogEntries.end())
1086+
itr3->second.SaveStats(itr2->second->GetDamageDone(), itr2->second->GetHealingDone(), itr2->second->GetKillingBlows());
1087+
10831088
delete itr2->second;
10841089
PlayerScores.erase(itr2);
10851090
}

src/server/game/Battlegrounds/Battleground.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,21 @@ class ArenaLogEntryData
258258
IP = ip;
259259
}
260260

261+
void SaveStats(uint32 damageDone, uint32 healingDone, uint32 killingBlows)
262+
{
263+
DamageDone = damageDone;
264+
HealingDone = healingDone;
265+
KillingBlows = killingBlows;
266+
}
267+
261268
std::string Name{};
262269
ObjectGuid::LowType Guid{0};
263270
uint32 Acc{0};
264271
uint32 ArenaTeamId{0};
265272
std::string IP{};
273+
uint32 DamageDone{0};
274+
uint32 HealingDone{0};
275+
uint32 KillingBlows{0};
266276
};
267277

268278
enum BGHonorMode

0 commit comments

Comments
 (0)