Core/Battlegrounds: Move to scripts (#29799)

* Introduce new BattlegroundScript class for map/bg specific scripts
* Remove all sub, zone specific, battleground classes except Arena
* Move all bg zone scripts to new BattlegroundScripts class in script folder
* Remove ZoneScript from Battleground class
* Remove some unused hooks from Battleground

(cherry picked from commit be11f42a16)
This commit is contained in:
Jeremy
2024-03-28 19:29:22 +01:00
committed by funjoker
parent aefa15ece7
commit d0d5d309bb
78 changed files with 6821 additions and 7805 deletions
+1 -1
View File
@@ -2010,7 +2010,7 @@ ZoneScript* WorldObject::FindZoneScript() const
if (InstanceMap* instanceMap = map->ToInstanceMap())
return reinterpret_cast<ZoneScript*>(instanceMap->GetInstanceScript());
if (BattlegroundMap* bgMap = map->ToBattlegroundMap())
return reinterpret_cast<ZoneScript*>(bgMap->GetBG());
return reinterpret_cast<ZoneScript*>(bgMap->GetBattlegroundScript());
if (!map->IsBattlegroundOrArena())
{
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(map, GetZoneId()))