Core/OutdoorPvP: Refactor OutdoorPvP creation to be linked to host map creation instead of having globally accessible objects
Port From (https://github.com/TrinityCore/TrinityCore/commit/775be0682a794d0a1f62d656f8c6c6dffca8de79)
This commit is contained in:
@@ -469,7 +469,7 @@ namespace Game.Scripting
|
||||
public override bool IsDatabaseBound() { return true; }
|
||||
|
||||
// Should return a fully valid OutdoorPvP object for the type ID.
|
||||
public virtual OutdoorPvP GetOutdoorPvP() { return null; }
|
||||
public virtual OutdoorPvP GetOutdoorPvP(Map map) { return null; }
|
||||
}
|
||||
|
||||
public class WeatherScript : ScriptObject
|
||||
|
||||
@@ -729,9 +729,9 @@ namespace Game.Scripting
|
||||
}
|
||||
|
||||
// OutdoorPvPScript
|
||||
public OutdoorPvP CreateOutdoorPvP(uint scriptId)
|
||||
public OutdoorPvP CreateOutdoorPvP(uint scriptId, Map map)
|
||||
{
|
||||
return RunScriptRet<OutdoorPvPScript, OutdoorPvP>(p => p.GetOutdoorPvP(), scriptId, null);
|
||||
return RunScriptRet<OutdoorPvPScript, OutdoorPvP>(p => p.GetOutdoorPvP(map), scriptId, null);
|
||||
}
|
||||
|
||||
// WeatherScript
|
||||
|
||||
Reference in New Issue
Block a user