mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/OutdoorPvP: Refactor OutdoorPvP creation to be linked to host map creation instead of having globally accessible objects
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -550,7 +550,7 @@ class TC_GAME_API OutdoorPvPScript : public ScriptObject
|
||||
~OutdoorPvPScript();
|
||||
|
||||
// Should return a fully valid OutdoorPvP object for the type ID.
|
||||
virtual OutdoorPvP* GetOutdoorPvP() const = 0;
|
||||
virtual OutdoorPvP* GetOutdoorPvP(Map* map) const = 0;
|
||||
};
|
||||
|
||||
class TC_GAME_API CommandScript : public ScriptObject
|
||||
@@ -1154,7 +1154,7 @@ class TC_GAME_API ScriptMgr
|
||||
|
||||
public: /* OutdoorPvPScript */
|
||||
|
||||
OutdoorPvP* CreateOutdoorPvP(uint32 scriptId);
|
||||
OutdoorPvP* CreateOutdoorPvP(uint32 scriptId, Map* map);
|
||||
|
||||
public: /* CommandScript */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user