mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Battlefields: Refactor Battlefield creation to be linked to host map creation instead of having globally accessible objects
This commit is contained in:
@@ -1737,10 +1737,10 @@ bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger, b
|
||||
return entered ? tmpscript->OnTrigger(player, trigger) : tmpscript->OnExit(player, trigger);
|
||||
}
|
||||
|
||||
Battlefield* ScriptMgr::CreateBattlefield(uint32 scriptId)
|
||||
Battlefield* ScriptMgr::CreateBattlefield(uint32 scriptId, Map* map)
|
||||
{
|
||||
GET_SCRIPT_RET(BattlefieldScript, scriptId, tmpscript, nullptr);
|
||||
return tmpscript->GetBattlefield();
|
||||
return tmpscript->GetBattlefield(map);
|
||||
}
|
||||
|
||||
Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId /*typeId*/)
|
||||
|
||||
Reference in New Issue
Block a user