fix(Core/Scripts): apply safety improvements (#24635)

This commit is contained in:
Francesco Borzì
2026-02-07 21:22:58 +01:00
committed by GitHub
parent 4bda3ca1a9
commit 3b8ac391d9
6 changed files with 17 additions and 9 deletions

View File

@@ -142,7 +142,8 @@ void OutdoorPvPTF::ResetZoneToTeamControlled(TeamId team)
for (auto& [guid, tower] : _capturePoints)
{
dynamic_cast<OPvPCapturePointTF*>(tower)->ResetToTeamControlled(team);
if (auto* capturePoint = dynamic_cast<OPvPCapturePointTF*>(tower))
capturePoint->ResetToTeamControlled(team);
}
SendUpdateWorldState(WORLD_STATE_OPVP_TF_UI_TOWER_COUNT_H, m_HordeTowersControlled);