aboutsummaryrefslogtreecommitdiff
path: root/src/game/Wintergrasp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Wintergrasp.cpp')
-rw-r--r--src/game/Wintergrasp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp
index a780e7a91d4..518cc917833 100644
--- a/src/game/Wintergrasp.cpp
+++ b/src/game/Wintergrasp.cpp
@@ -253,7 +253,7 @@ bool OPvPWintergrasp::SetupOutdoorPvP()
}
SiegeWorkshop *workshop = new SiegeWorkshop(this, m_buildingStates[guid]);
- if(!workshop->AddCapturePoint(capturePointEntry, goData->mapid, goData->posX, goData->posY, goData->posZ))
+ if(!workshop->SetCapturePointData(capturePointEntry, goData->mapid, goData->posX, goData->posY, goData->posZ))
{
delete workshop;
sLog.outError("Cannot add capture point!");
@@ -269,7 +269,7 @@ bool OPvPWintergrasp::SetupOutdoorPvP()
workshop->m_engGuid = engGuid;
//workshop->AddCre(0, engGuid, creData->id);
//sLog.outDebug("Demolisher Engineerer lowguid %u is linked to workshop lowguid %u.", engGuid, guid);
- m_capturePoints.push_back(workshop);
+ AddCapturePoint(workshop);
workshop->SetStateByBuildingState();
}
}while(result->NextRow());
@@ -375,7 +375,7 @@ void OPvPWintergrasp::OnCreatureCreate(Creature *creature, bool add)
else if(entry == CRE_ENG_A || entry == CRE_ENG_H) // demolisher engineers
{
for(OutdoorPvP::OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if(SiegeWorkshop *workshop = dynamic_cast<SiegeWorkshop*>(*itr))
+ if(SiegeWorkshop *workshop = dynamic_cast<SiegeWorkshop*>(itr->second))
if(workshop->m_engGuid == creature->GetDBTableGUIDLow())
{
workshop->m_engineer = add ? creature : NULL;
@@ -427,7 +427,7 @@ void OPvPWintergrasp::UpdateAllWorldObject()
// update capture points
for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if(SiegeWorkshop *workshop = dynamic_cast<SiegeWorkshop*>(*itr))
+ if(SiegeWorkshop *workshop = dynamic_cast<SiegeWorkshop*>(itr->second))
workshop->SetStateByBuildingState();
SendInitWorldStatesTo();