Core/Wintergrasp: cleanup some magic numbers and set the destructable state of the final gate to destroyed.

This commit is contained in:
Kandera
2012-08-27 10:43:11 -04:00
parent 9b7b8152e7
commit 7b11decc26
2 changed files with 8 additions and 4 deletions
@@ -176,8 +176,8 @@ bool BattlefieldWG::SetupBattlefield()
for (uint8 i = 0; i < WG_MAX_OBJ; i++) for (uint8 i = 0; i < WG_MAX_OBJ; i++)
{ {
GameObject* go = SpawnGameObject(WGGameObjectBuilding[i].entry, WGGameObjectBuilding[i].x, WGGameObjectBuilding[i].y, WGGameObjectBuilding[i].z, WGGameObjectBuilding[i].o); GameObject* go = SpawnGameObject(WGGameObjectBuilding[i].entry, WGGameObjectBuilding[i].x, WGGameObjectBuilding[i].y, WGGameObjectBuilding[i].z, WGGameObjectBuilding[i].o);
if (!m_IsEnabled && go->GetGOData()->id == 191810) if (!m_IsEnabled && go->GetGOData()->id == GO_WINTERGRASP_VAULT_GATE)
go->SwitchDoorOrButton(true); go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
BfWGGameObjectBuilding* b = new BfWGGameObjectBuilding(this); BfWGGameObjectBuilding* b = new BfWGGameObjectBuilding(this);
b->Init(go, WGGameObjectBuilding[i].type, WGGameObjectBuilding[i].WorldState, WGGameObjectBuilding[i].nameId); b->Init(go, WGGameObjectBuilding[i].type, WGGameObjectBuilding[i].WorldState, WGGameObjectBuilding[i].nameId);
BuildingsInZone.insert(b); BuildingsInZone.insert(b);
@@ -540,6 +540,10 @@ enum WintergraspGameObject
GO_WINTERGRASP_SHADOWSIGHT_TOWER = 190356, GO_WINTERGRASP_SHADOWSIGHT_TOWER = 190356,
GO_WINTERGRASP_WINTER_S_EDGE_TOWER = 190357, GO_WINTERGRASP_WINTER_S_EDGE_TOWER = 190357,
GO_WINTERGRASP_FLAMEWATCH_TOWER = 190358, GO_WINTERGRASP_FLAMEWATCH_TOWER = 190358,
GO_WINTERGRASP_FORTRESS_GATE = 190375,
GO_WINTERGRASP_VAULT_GATE = 191810,
}; };
struct WintergraspObjectPositionData struct WintergraspObjectPositionData
@@ -610,10 +614,10 @@ const WintergraspBuildingSpawnData WGGameObjectBuilding[WG_MAX_OBJ] =
{ 190358, 3706, 4459.1f, 1944.33f, 434.991f, -2.00276f, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_TEXT_TOWER_NAME_E }, { 190358, 3706, 4459.1f, 1944.33f, 434.991f, -2.00276f, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_TEXT_TOWER_NAME_E },
// Door of forteress (Not spawned in db) // Door of forteress (Not spawned in db)
{ 190375, 3763, 5162.99f, 2841.23f, 410.162f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_DOOR, 0 }, { GO_WINTERGRASP_FORTRESS_GATE, 3763, 5162.99f, 2841.23f, 410.162f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_DOOR, 0 },
// Last door (Not spawned in db) // Last door (Not spawned in db)
{ 191810, 3773, 5397.11f, 2841.54f, 425.899f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST, 0 }, { GO_WINTERGRASP_VAULT_GATE, 3773, 5397.11f, 2841.54f, 425.899f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST, 0 },
}; };