Permalink
Browse files

ADDED: Dalaran Sewers and Ring of Valor, patch by Datastream. Thanks. h…

  • Loading branch information...
dfighter1985 committed Feb 26, 2012
1 parent cd49477 commit 1a0c0a07bec73fb7e18ed8069b731d902b71c3bf
Showing with 83 additions and 5 deletions.
  1. +6 −2 src/arcemu-world/AIInterface.cpp
  2. +75 −1 src/arcemu-world/Arenas.cpp
  3. +2 −2 src/arcemu-world/BattlegroundMgr.cpp
@@ -2482,7 +2482,10 @@ void AIInterface::_UpdateMovement(uint32 p_time)
if(sWorld.DisableFearMovement)
{
if(m_Unit->GetMapId() == 529 || m_Unit->GetMapId() == 566 || m_Unit->GetMapId() == 489 || m_Unit->GetMapId() == 572 || m_Unit->GetMapId() == 562 || m_Unit->GetMapId() == 559)
if(m_Unit->GetMapId() == 529 || m_Unit->GetMapId() == 566 ||
m_Unit->GetMapId() == 489 || m_Unit->GetMapId() == 572 ||
m_Unit->GetMapId() == 562 || m_Unit->GetMapId() == 559 ||
m_Unit->GetMapId() == 617 || m_Unit->GetMapId() == 618)
{
return;
}
@@ -2494,7 +2497,8 @@ void AIInterface::_UpdateMovement(uint32 p_time)
float dist = m_Unit->CalcDistance(unitToFear);
if(dist > 30.0f || (Rand(25) && dist > 10.0f)) // not too far or too close
{
if(m_Unit->GetMapId() == 572 || m_Unit->GetMapId() == 562 || m_Unit->GetMapId() == 559) //GET MAP ID
if(m_Unit->GetMapId() == 572 || m_Unit->GetMapId() == 562 || m_Unit->GetMapId() == 559 ||
m_Unit->GetMapId() == 617 || m_Unit->GetMapId() == 618 ) //GET MAP ID
{
Fx = m_Unit->GetPositionX();
Fy = m_Unit->GetPositionY();
@@ -299,7 +299,55 @@ void Arena::OnCreate()
}
break;
}
/* dalaran sewers */
case 617: {
obj = SpawnGameObject(192643, 617, 1232.11f, 764.699f, 20.3f, 0.0f, 32, 1375, 2.0f);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_STATE, 1);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
m_gates.insert(obj);
obj = SpawnGameObject(192642, 617, 1350.02f, 817.502f, 19.1398f, 0.0f, 32, 1375, 2.0f);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_STATE, 1);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
m_gates.insert(obj);
obj = SpawnGameObject(191877, 617, 1291.974487f, 791.844666f, 9.339742f, 3.116816f, 32, 1375, 1.0f);
obj->PushToWorld(m_mapMgr);
}break;
/* ring of valor */
case 618: {
obj = SpawnGameObject(194030, 618, 763.93f, -295.0f, 26.0f, 0.0f, 40, 1375, 1.0f);
obj->PushToWorld(m_mapMgr);
obj = SpawnGameObject(194031, 618, 763.93f, -274.0f, 26.0f, 0.0f, 40, 1375, 1.0f);
obj->PushToWorld(m_mapMgr);
obj = SpawnGameObject(193458, 618, 763.630f, -261.783f, 26.0f, 0.0f, 40, 1375, 1.0f);
obj->PushToWorld(m_mapMgr);
// These GOs freeze the client, probably db issue tho, however I will leave it commented for now
// -dfighter
//obj = SpawnGameObject(193459, 618, 763.761f, -306.230f, 26.0f, 0.0f, 40, 1375, 1.0f);
//obj->PushToWorld(m_mapMgr);
//obj = SpawnGameObject(193460, 618, 802.313f, -284.349f, 24.6f, 0.0f, 40, 1375, 1.0f);
//obj->PushToWorld(m_mapMgr);
obj = SpawnGameObject(193461, 618, 723.522f, -284.428f, 24.6f, 0.0f, 40, 1375, 1.0f);
obj->PushToWorld(m_mapMgr);
obj = SpawnGameObject(192392, 618, 763.93f, -295.0f, 27.0f, 0.0f, 32, 1375, 1.0f);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_STATE, 1);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
m_gates.insert(obj);
obj = SpawnGameObject(192391, 618, 763.93f, -274.0f, 27.0f, 0.0f, 32, 1375, 1.0f);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_STATE, 1);
obj->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
m_gates.insert(obj);
}break;
}
/* push gates into world */
for(set<GameObject*>::iterator itr = m_gates.begin(); itr != m_gates.end(); ++itr)
@@ -600,6 +648,22 @@ LocationVector Arena::GetStartingCoords(uint32 Team)
return LocationVector(4085.861328f, 2866.750488f, 12.417445f);
}
break;
/* dalaran sewers */
case 617:{
if(Team)
return LocationVector(1363.3609f, 817.3569f, 14.8128f);
else
return LocationVector(1219.5115f, 765.0264f, 14.8253f);
}break;
/* Ring of Valor */
case 618:{
if(Team)
return LocationVector(763.6011f, -294.3227f, 28.4f);
else
return LocationVector(763.9755f, -274.0825f, 28.4f);
}break;
}
return LocationVector(0, 0, 0, 0);
@@ -647,6 +711,16 @@ bool Arena::HookHandleRepop(Player* plr)
dest.ChangeCoords(4057.042725f, 2918.686523f, 13.051933f);
}
break;
/* dalaran sewers */
case 617: {
dest.ChangeCoords(1292.51f, 792.05f, 9.34f);
}break;
/* The Ring of Valor */
case 618: {
dest.ChangeCoords(762.91f, -284.28f, 28.28f);
}break;
}
plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
@@ -1260,8 +1260,8 @@ CBattleground* CBattlegroundManager::CreateInstance(uint32 Type, uint32 LevelGro
if(IS_ARENA(Type))
{
/* arenas follow a different procedure. */
static const uint32 arena_map_ids[3] = { 559, 562, 572 };
uint32 mapid = arena_map_ids[RandomUInt(2)];
static const uint32 arena_map_ids[5] = { 559, 562, 572, 617, 618 };
uint32 mapid = arena_map_ids[RandomUInt(4)];
uint32 players_per_side;
mgr = sInstanceMgr.CreateBattlegroundInstance(mapid);

0 comments on commit 1a0c0a0

Please sign in to comment.