*Use map instead of vector to store capture points in opvp.
--HG-- branch : trunk
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP *pvp, ZM_BeaconType type)
|
||||
: OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(ZM_TOWERSTATE_N)
|
||||
{
|
||||
AddCapturePoint(ZMCapturePoints[type].entry,ZMCapturePoints[type].map,ZMCapturePoints[type].x,ZMCapturePoints[type].y,ZMCapturePoints[type].z,ZMCapturePoints[type].o,ZMCapturePoints[type].rot0,ZMCapturePoints[type].rot1,ZMCapturePoints[type].rot2,ZMCapturePoints[type].rot3);
|
||||
SetCapturePointData(ZMCapturePoints[type].entry,ZMCapturePoints[type].map,ZMCapturePoints[type].x,ZMCapturePoints[type].y,ZMCapturePoints[type].z,ZMCapturePoints[type].o,ZMCapturePoints[type].rot0,ZMCapturePoints[type].rot1,ZMCapturePoints[type].rot2,ZMCapturePoints[type].rot3);
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_Beacon::FillInitialWorldStates(WorldPacket &data)
|
||||
@@ -182,10 +182,10 @@ bool OutdoorPvPZM::SetupOutdoorPvP()
|
||||
for(int i = 0; i < OutdoorPvPZMBuffZonesNum; ++i)
|
||||
RegisterZone(OutdoorPvPZMBuffZones[i]);
|
||||
|
||||
m_capturePoints.push_back(new OPvPCapturePointZM_Beacon(this,ZM_BEACON_WEST));
|
||||
m_capturePoints.push_back(new OPvPCapturePointZM_Beacon(this,ZM_BEACON_EAST));
|
||||
AddCapturePoint(new OPvPCapturePointZM_Beacon(this,ZM_BEACON_WEST));
|
||||
AddCapturePoint(new OPvPCapturePointZM_Beacon(this,ZM_BEACON_EAST));
|
||||
m_GraveYard = new OPvPCapturePointZM_GraveYard(this);
|
||||
m_capturePoints.push_back(m_GraveYard); // though the update function isn't used, the handleusego is!
|
||||
AddCapturePoint(m_GraveYard); // though the update function isn't used, the handleusego is!
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -393,7 +393,7 @@ void OutdoorPvPZM::FillInitialWorldStates(WorldPacket &data)
|
||||
data << ZM_WORLDSTATE_UNK_1 << uint32(1);
|
||||
for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
{
|
||||
(*itr)->FillInitialWorldStates(data);
|
||||
itr->second->FillInitialWorldStates(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user