*Use map instead of vector to store capture points in opvp.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-19 18:17:30 -05:00
parent bd0dbcc9ad
commit 47b30023a5
8 changed files with 58 additions and 63 deletions
+5 -5
View File
@@ -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);
}
}