*Provide another way to implement dynamic spawns. Now a creature will call its zonescript before spawn to determine the spawned entry. This can be used to implement zones such as wintergrasp with less data requirement (only need to know the entry of counterpart creatures, not require spawn points)

*Use zonescript as basic class of opvp script and dugeon script (can also be used for bg)
*Store zonescript in worldobject.
*Add door for sapphiron.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-30 22:15:05 -05:00
parent b5778357d9
commit 8d1f4f9ea0
25 changed files with 224 additions and 263 deletions
+6 -8
View File
@@ -207,15 +207,13 @@ bool OutdoorPvPMgr::HandleCustomSpell(Player *plr, uint32 spellId, GameObject *
return false;
}
void OutdoorPvPMgr::OnGameObjectCreate(GameObject *go, bool add)
ZoneScript * OutdoorPvPMgr::GetZoneScript(uint32 zoneId)
{
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;
OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneId);
if(itr != m_OutdoorPvPMap.end())
return itr->second;
else
return NULL;
}
bool OutdoorPvPMgr::HandleOpenGo(Player *plr, uint64 guid)