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:
@@ -25,7 +25,7 @@ namespace Game.PvP
|
||||
{
|
||||
class HellfirePeninsulaPvP : OutdoorPvP
|
||||
{
|
||||
public HellfirePeninsulaPvP()
|
||||
public HellfirePeninsulaPvP(Map map) : base(map)
|
||||
{
|
||||
m_TypeId = OutdoorPvPTypes.HellfirePeninsula;
|
||||
m_AllianceTowersControlled = 0;
|
||||
@@ -36,7 +36,6 @@ namespace Game.PvP
|
||||
{
|
||||
m_AllianceTowersControlled = 0;
|
||||
m_HordeTowersControlled = 0;
|
||||
SetMapFromZone(HPConst.BuffZones[0]);
|
||||
|
||||
// add the zones affected by the pvp buff
|
||||
for (int i = 0; i < HPConst.BuffZones.Length; ++i)
|
||||
@@ -305,9 +304,9 @@ namespace Game.PvP
|
||||
{
|
||||
public OutdoorPvP_hellfire_peninsula() : base("outdoorpvp_hp") { }
|
||||
|
||||
public override OutdoorPvP GetOutdoorPvP()
|
||||
public override OutdoorPvP GetOutdoorPvP(Map map)
|
||||
{
|
||||
return new HellfirePeninsulaPvP();
|
||||
return new HellfirePeninsulaPvP(map);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user