Core/OutdoorPvP: Refactor OutdoorPvP creation to be linked to host map creation instead of having globally accessible objects

This commit is contained in:
Shauren
2022-07-18 22:45:03 +02:00
parent 21ae376692
commit 775be0682a
19 changed files with 94 additions and 112 deletions

View File

@@ -1750,10 +1750,10 @@ Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId /*typeId*/)
return nullptr;
}
OutdoorPvP* ScriptMgr::CreateOutdoorPvP(uint32 scriptId)
OutdoorPvP* ScriptMgr::CreateOutdoorPvP(uint32 scriptId, Map* map)
{
GET_SCRIPT_RET(OutdoorPvPScript, scriptId, tmpscript, nullptr);
return tmpscript->GetOutdoorPvP();
return tmpscript->GetOutdoorPvP(map);
}
Trinity::ChatCommands::ChatCommandTable ScriptMgr::GetChatCommands()