fix(Core/Battlegrounds): allow SotA turrets to be used during warmup (#24908)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-02-28 15:16:05 -03:00
committed by GitHub
parent 8298e73057
commit 6fdcd717c2

View File

@@ -718,6 +718,8 @@ void BattlegroundSA::DemolisherStartState(bool start)
if (!BgCreatures[0])
return;
// Only lock demolishers during warmup - they are attacker vehicles.
// Cannons/turrets are defender weapons and must remain usable from the start.
for (uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4; i++)
if (Creature* dem = GetBGCreature(i))
{
@@ -727,15 +729,6 @@ void BattlegroundSA::DemolisherStartState(bool start)
dem->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
}
for (uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10; i++)
if (Creature* gun = GetBGCreature(i))
{
if (start)
gun->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
else
gun->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
}
// xinef: enable first gates damaging at start
if (!start)
{