*Update OutdoorPvP functions. No longer need creature triggers for capture points.
--HG-- branch : trunk
This commit is contained in:
+11
-11
@@ -207,6 +207,17 @@ bool OutdoorPvPMgr::HandleCustomSpell(Player *plr, uint32 spellId, GameObject *
|
||||
return false;
|
||||
}
|
||||
|
||||
void OutdoorPvPMgr::OnGameObjectCreate(GameObject *go, bool add)
|
||||
{
|
||||
if(go->GetGoType() != GAMEOBJECT_TYPE_CAPTURE_POINT)
|
||||
return;
|
||||
|
||||
for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
for(OutdoorPvP::OPvPCapturePointMap::iterator itr2 = (*itr)->m_capturePoints.begin(); itr2 != (*itr)->m_capturePoints.end(); ++itr2)
|
||||
if((*itr2)->m_CapturePointGUID == go->GetDBTableGUIDLow())
|
||||
(*itr2)->m_capturePoint = add ? go : NULL;
|
||||
}
|
||||
|
||||
bool OutdoorPvPMgr::HandleOpenGo(Player *plr, uint64 guid)
|
||||
{
|
||||
for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
@@ -217,16 +228,6 @@ bool OutdoorPvPMgr::HandleOpenGo(Player *plr, uint64 guid)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OutdoorPvPMgr::HandleCaptureCreaturePlayerMoveInLos(Player * plr, Creature * c)
|
||||
{
|
||||
for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
{
|
||||
if((*itr)->HandleCaptureCreaturePlayerMoveInLos(plr,c))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OutdoorPvPMgr::HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid)
|
||||
{
|
||||
for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
@@ -254,4 +255,3 @@ void OutdoorPvPMgr::HandleDropFlag(Player *plr, uint32 spellId)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user