*Use correct type name for opvp object. (no real change)
--HG-- branch : trunk
This commit is contained in:
+9
-12
@@ -245,10 +245,13 @@ bool OutdoorPvPObjective::AddCapturePoint(uint32 entry, uint32 map, float x, flo
|
|||||||
|
|
||||||
m_CapturePoint = MAKE_NEW_GUID(guid, entry, HIGHGUID_GAMEOBJECT);
|
m_CapturePoint = MAKE_NEW_GUID(guid, entry, HIGHGUID_GAMEOBJECT);
|
||||||
|
|
||||||
|
if(goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
|
||||||
|
sLog.outError("OutdoorPvP: GO %u is not capture point!", goinfo->id);
|
||||||
|
|
||||||
// get the needed values from goinfo
|
// get the needed values from goinfo
|
||||||
m_ShiftMaxPhase = goinfo->raw.data[17];
|
m_ShiftMaxPhase = goinfo->capturePoint.maxTime;
|
||||||
m_ShiftMaxCaptureSpeed = m_ShiftMaxPhase / float(goinfo->raw.data[16]);
|
m_ShiftMaxCaptureSpeed = m_ShiftMaxPhase / float(goinfo->capturePoint.minTime);
|
||||||
m_NeutralValue = goinfo->raw.data[12];
|
m_NeutralValue = goinfo->capturePoint.neutralPercent;
|
||||||
|
|
||||||
// add to map if map is already loaded
|
// add to map if map is already loaded
|
||||||
Map * pMap = MapManager::Instance().FindMap(map);
|
Map * pMap = MapManager::Instance().FindMap(map);
|
||||||
@@ -546,16 +549,10 @@ bool OutdoorPvPObjective::HandleCaptureCreaturePlayerMoveInLos(Player * p, Creat
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// check range and activity
|
// check range and activity
|
||||||
if(cp->IsWithinDistInMap(p,cp->GetGOInfo()->raw.data[0]) && p->IsOutdoorPvPActive())
|
if(cp->IsWithinDistInMap(p,cp->GetGOInfo()->capturePoint.radius) && p->IsOutdoorPvPActive())
|
||||||
{
|
return HandleCapturePointEvent(p, cp->GetGOInfo()->capturePoint.progressEventID1); //i_objective->HandlePlayerEnter((Player*)u);
|
||||||
// data[8] will be used for player enter
|
|
||||||
return HandleCapturePointEvent(p, cp->GetGOInfo()->raw.data[8]); //i_objective->HandlePlayerEnter((Player*)u);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
return HandleCapturePointEvent(p, cp->GetGOInfo()->capturePoint.progressEventID2); //i_objective->HandlePlayerLeave((Player*)u);
|
||||||
// data[9] will be used for player leave
|
|
||||||
return HandleCapturePointEvent(p, cp->GetGOInfo()->raw.data[9]); //i_objective->HandlePlayerLeave((Player*)u);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutdoorPvP::SendUpdateWorldState(uint32 field, uint32 value)
|
void OutdoorPvP::SendUpdateWorldState(uint32 field, uint32 value)
|
||||||
|
|||||||
Reference in New Issue
Block a user