diff options
author | Liberate <none@none> | 2010-07-28 01:34:01 +0200 |
---|---|---|
committer | Liberate <none@none> | 2010-07-28 01:34:01 +0200 |
commit | ac01c9796b040da6cbed1c7b36e5d016dea4b334 (patch) | |
tree | 8f946261d97b9b74a32e4c311679b2d439294f0d /src | |
parent | 4476247f10deefcab0c3a54d0d8622bb93087605 (diff) |
SotA Fixes:
*When 10 min are over in the first round, the ship does appear in the second round
*Defender's Portals
*Seaforium Charges spawned
*Graveyards not recappable by the defenders
Thanks to beberlescaraber for some pieces of the code and the exact locations.
Fixes issue #2665
Fixes issue #2585
Fixes issue #2638
Fixes issue #2781
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp | 43 | ||||
-rw-r--r-- | src/server/game/BattleGrounds/Zones/BattleGroundSA.h | 113 |
2 files changed, 139 insertions, 17 deletions
diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp b/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp index ccde43ce948..408f4ab2397 100644 --- a/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp +++ b/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp @@ -146,9 +146,27 @@ bool BattleGroundSA::ResetObjs() } //GY capture points - for (uint8 i = BG_SA_CENTRAL_FLAG; i < BG_SA_MAXOBJ; i++) + for (uint8 i = BG_SA_CENTRAL_FLAG; i < BG_SA_PORTAL_DEFFENDER_BLUE; i++) { - AddObject(i, BG_SA_ObjEntries[(i + (attackers == TEAM_ALLIANCE ? 3:0))], + AddObject(i, (BG_SA_ObjEntries[i] - (attackers == TEAM_ALLIANCE ? 1:0)), + BG_SA_ObjSpawnlocs[i][0], BG_SA_ObjSpawnlocs[i][1], + BG_SA_ObjSpawnlocs[i][2], BG_SA_ObjSpawnlocs[i][3], + 0,0,0,0,RESPAWN_ONE_DAY); + GetBGObject(i)->SetUInt32Value(GAMEOBJECT_FACTION, atF); + } + + for (uint8 i = BG_SA_PORTAL_DEFFENDER_BLUE; i < BG_SA_BOMB; i++) + { + AddObject(i, BG_SA_ObjEntries[i], + BG_SA_ObjSpawnlocs[i][0], BG_SA_ObjSpawnlocs[i][1], + BG_SA_ObjSpawnlocs[i][2], BG_SA_ObjSpawnlocs[i][3], + 0,0,0,0,RESPAWN_ONE_DAY); + GetBGObject(i)->SetUInt32Value(GAMEOBJECT_FACTION, defF); + } + + for (uint8 i = BG_SA_BOMB; i < BG_SA_MAXOBJ; i++) + { + AddObject(i, BG_SA_ObjEntries[BG_SA_BOMB], BG_SA_ObjSpawnlocs[i][0], BG_SA_ObjSpawnlocs[i][1], BG_SA_ObjSpawnlocs[i][2], BG_SA_ObjSpawnlocs[i][3], 0,0,0,0,RESPAWN_ONE_DAY); @@ -302,7 +320,10 @@ void BattleGroundSA::Update(uint32 diff) TotalTime = 0; status = BG_SA_SECOND_WARMUP; attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE; - status = BG_SA_SECOND_WARMUP; + UpdateWaitTimer = 5000; + SignaledRoundTwo = false; + SignaledRoundTwoHalfMin = false; + InitSecondRound = true; ToggleTimer(); ResetObjs(); return; @@ -665,6 +686,9 @@ void BattleGroundSA::EventPlayerClickedOnFlag(Player *Source, GameObject* target void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source) { + if (GraveyardStatus[i] == attackers) + return; + DelCreature(BG_SA_MAXNPC + i); GraveyardStatus[i] = Source->GetTeamId(); WorldSafeLocsEntry const *sg = NULL; @@ -678,7 +702,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source) case BG_SA_LEFT_CAPTURABLE_GY: flag = BG_SA_LEFT_FLAG; DelObject(flag); - AddObject(flag,BG_SA_ObjEntries[(flag + (Source->GetTeamId() == TEAM_ALLIANCE ? 0:3))], + AddObject(flag,(BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0:1)), BG_SA_ObjSpawnlocs[flag][0],BG_SA_ObjSpawnlocs[flag][1], BG_SA_ObjSpawnlocs[flag][2],BG_SA_ObjSpawnlocs[flag][3],0,0,0,0,RESPAWN_ONE_DAY); @@ -697,7 +721,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source) case BG_SA_RIGHT_CAPTURABLE_GY: flag = BG_SA_RIGHT_FLAG; DelObject(flag); - AddObject(flag,BG_SA_ObjEntries[(flag + (Source->GetTeamId() == TEAM_ALLIANCE ? 0:3))], + AddObject(flag, (BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0:1)), BG_SA_ObjSpawnlocs[flag][0],BG_SA_ObjSpawnlocs[flag][1], BG_SA_ObjSpawnlocs[flag][2],BG_SA_ObjSpawnlocs[flag][3],0,0,0,0,RESPAWN_ONE_DAY); @@ -716,7 +740,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source) case BG_SA_CENTRAL_CAPTURABLE_GY: flag = BG_SA_CENTRAL_FLAG; DelObject(flag); - AddObject(flag,BG_SA_ObjEntries[(flag + (Source->GetTeamId() == TEAM_ALLIANCE ? 0:3))], + AddObject(flag, (BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0:1)), BG_SA_ObjSpawnlocs[flag][0],BG_SA_ObjSpawnlocs[flag][1], BG_SA_ObjSpawnlocs[flag][2],BG_SA_ObjSpawnlocs[flag][3],0,0,0,0,RESPAWN_ONE_DAY); @@ -806,11 +830,8 @@ void BattleGroundSA::UpdateDemolisherSpawns() { uint8 gy = (i >= BG_SA_DEMOLISHER_3 ? 3 : 2); if (GraveyardStatus[gy] == attackers) - Demolisher->Relocate(BG_SA_NpcSpawnlocs[i + 6][0], BG_SA_NpcSpawnlocs[i + 6][1], - BG_SA_NpcSpawnlocs[i + 6][2], BG_SA_NpcSpawnlocs[i + 6][3]); - else - Demolisher->Relocate(BG_SA_NpcSpawnlocs[i][0], BG_SA_NpcSpawnlocs[i][1], - BG_SA_NpcSpawnlocs[i][2], BG_SA_NpcSpawnlocs[i][3]); + Demolisher->Relocate(BG_SA_NpcSpawnlocs[i + 11][0], BG_SA_NpcSpawnlocs[i + 10][1], + BG_SA_NpcSpawnlocs[i + 10][2], BG_SA_NpcSpawnlocs[i + 10][3]); Demolisher->Respawn(); } diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundSA.h b/src/server/game/BattleGrounds/Zones/BattleGroundSA.h index f1299fbb4a4..1f30ba2d4ee 100644 --- a/src/server/game/BattleGrounds/Zones/BattleGroundSA.h +++ b/src/server/game/BattleGrounds/Zones/BattleGroundSA.h @@ -110,6 +110,11 @@ enum BG_SA_NPCs BG_SA_DEMOLISHER_2, BG_SA_DEMOLISHER_3, BG_SA_DEMOLISHER_4, + BG_SA_NPC_TRIGGER_1, + BG_SA_NPC_TRIGGER_2, + BG_SA_NPC_TRIGGER_3, + BG_SA_NPC_TRIGGER_4, + BG_SA_NPC_TRIGGER_5, BG_SA_NPC_SPARKLIGHT, BG_SA_NPC_RIGSPARK, BG_SA_MAXNPC @@ -132,9 +137,15 @@ const uint32 BG_SA_NpcEntries[BG_SA_MAXNPC] = 28781, 28781, 28781, + //Triggers + 23472, + 23472, + 23472, + 23472, + 23472, //Fizzle Sparklight, or whatever his name was 29260, - 29262, + 29262 }; const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC + BG_SA_DEMOLISHER_AMOUNT][4] = @@ -155,6 +166,12 @@ const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC + BG_SA_DEMOLISHER_AMOUNT][4] = { 1575.562500,-158.421875,5.024450,2.129302}, { 1618.047729,61.424641,7.248210,3.979351}, { 1575.103149,98.873344,2.830360,3.752458}, + //trigger + { 1453.49, -250.453, 30.896, 4.2883}, + { 1377.05, 97.036, 30.8605, 2.46539}, + { 1186.05, 58.8048, 56.5491, 2.75992}, + { 1042.83, -72.839, 84.8145, 3.58615}, + { 1233.62, -250.49, 55.4036, 3.7016}, //Npcs { 1348.644165, -298.786469, 31.080130, 1.710423}, { 1358.191040, 195.527786, 31.018187, 4.171337}, @@ -162,7 +179,7 @@ const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC + BG_SA_DEMOLISHER_AMOUNT][4] = { 1371.055786, -317.071136, 35.007359, 1.947460}, { 1424.034912, -260.195190, 31.084425, 2.820013}, { 1353.139893, 223.745438, 35.265411, 4.343684}, - { 1404.809570, 197.027237, 32.046032, 3.605401}, + { 1404.809570, 197.027237, 32.046032, 3.605401} }; enum BG_SA_Objects @@ -187,7 +204,13 @@ enum BG_SA_Objects BG_SA_CENTRAL_FLAG, BG_SA_RIGHT_FLAG, BG_SA_LEFT_FLAG, - BG_SA_MAXOBJ + BG_SA_PORTAL_DEFFENDER_BLUE, + BG_SA_PORTAL_DEFFENDER_GREEN, + BG_SA_PORTAL_DEFFENDER_YELLOW, + BG_SA_PORTAL_DEFFENDER_PURPLE, + BG_SA_PORTAL_DEFFENDER_RED, + BG_SA_BOMB, + BG_SA_MAXOBJ = BG_SA_BOMB+68 }; const float BG_SA_ObjSpawnlocs[BG_SA_MAXOBJ][4] = @@ -216,6 +239,81 @@ const float BG_SA_ObjSpawnlocs[BG_SA_MAXOBJ][4] = { 1215.108032,-65.715767,70.084267,-3.124123}, { 1338.859253,-153.327316,30.895077,-2.530723}, { 1309.192017,9.416233,30.893402,1.518436}, + //Portal + {1468.380005, -225.798996, 30.896200, 0.0}, //blue + {1394.270020, 72.551399, 31.054300, 0.0},//green + {1065.260010, -89.79501, 81.073402, 0.0},//yellow + {1216.069946, 47.904301, 54.278198,0.0}, //purple + {1255.569946, -233.548996, 56.43699, 0.0},//red + //Bombs + {1333.45, 211.354, 31.0538, 5.03666}, + {1334.29, 209.582, 31.0532, 1.28088}, + {1332.72, 210.049, 31.0532, 1.28088}, + {1334.28, 210.78, 31.0538, 3.85856}, + {1332.64, 211.39, 31.0532, 1.29266}, + {1371.41, 194.028, 31.5107, 0.753095}, + {1372.39, 194.951, 31.4679, 0.753095}, + {1371.58, 196.942, 30.9349, 1.01777}, + {1370.43, 196.614, 30.9349, 0.957299}, + {1369.46, 196.877, 30.9351, 2.45348}, + {1370.35, 197.361, 30.9349, 1.08689}, + {1369.47, 197.941, 30.9349, 0.984787}, + {1592.49, 47.5969, 7.52271, 4.63218}, + {1593.91, 47.8036, 7.65856, 4.63218}, + {1593.13, 46.8106, 7.54073, 4.63218}, + {1589.22, 36.3616, 7.45975, 4.64396}, + {1588.24, 35.5842, 7.55613, 4.79564}, + {1588.14, 36.7611, 7.49675, 4.79564}, + {1595.74, 35.5278, 7.46602, 4.90246}, + {1596, 36.6475, 7.47991, 4.90246}, + {1597.03, 36.2356, 7.48631, 4.90246}, + {1597.93, 37.1214, 7.51725, 4.90246}, + {1598.16, 35.888, 7.50018, 4.90246}, + {1579.6, -98.0917, 8.48478, 1.37996}, + {1581.2, -98.401, 8.47483, 1.37996}, + {1580.38, -98.9556, 8.4772, 1.38781}, + {1585.68, -104.966, 8.88551, 0.493246}, + {1586.15, -106.033, 9.10616, 0.493246}, + {1584.88, -105.394, 8.82985, 0.493246}, + {1581.87, -100.899, 8.46164, 0.929142}, + {1581.48, -99.4657, 8.46926, 0.929142}, + {1583.2, -91.2291, 8.49227, 1.40038}, + {1581.94, -91.0119, 8.49977, 1.40038}, + {1582.33, -91.951, 8.49353, 1.1844}, + {1342.06, -304.049, 30.9532, 5.59507}, + {1340.96, -304.536, 30.9458, 1.28323}, + {1341.22, -303.316, 30.9413, 0.486051}, + {1342.22, -302.939, 30.986, 4.87643}, + {1382.16, -287.466, 32.3063, 4.80968}, + {1381, -287.58, 32.2805, 4.80968}, + {1381.55, -286.536, 32.3929, 2.84225}, + {1382.75, -286.354, 32.4099, 1.00442}, + {1379.92, -287.34, 32.2872, 3.81615}, + {1100.52, -2.41391, 70.2984, 0.131054}, + {1099.35, -2.13851, 70.3375, 4.4586}, + {1099.59, -1.00329, 70.238, 2.49903}, + {1097.79, 0.571316, 70.159, 4.00307}, + {1098.74, -7.23252, 70.7972, 4.1523}, + {1098.46, -5.91443, 70.6715, 4.1523}, + {1097.53, -7.39704, 70.7959, 4.1523}, + {1097.32, -6.64233, 70.7424, 4.1523}, + {1096.45, -5.96664, 70.7242, 4.1523}, + {971.725, 0.496763, 86.8467, 2.09233}, + {973.589, 0.119518, 86.7985, 3.17225}, + {972.524, 1.25333, 86.8351, 5.28497}, + {971.993, 2.05668, 86.8584, 5.28497}, + {973.635, 2.11805, 86.8197, 2.36722}, + {974.791, 1.74679, 86.7942, 1.5936}, + {974.771, 3.0445, 86.8125, 0.647199}, + {979.554, 3.6037, 86.7923, 1.69178}, + {979.758, 2.57519, 86.7748, 1.76639}, + {980.769, 3.48904, 86.7939, 1.76639}, + {979.122, 2.87109, 86.7794, 1.76639}, + {986.167, 4.85363, 86.8439, 1.5779}, + {986.176, 3.50367, 86.8217, 1.5779}, + {987.33, 4.67389, 86.8486, 1.5779}, + {985.23, 4.65898, 86.8368, 1.5779}, + {984.556, 3.54097, 86.8137, 1.5779}, }; /* Ships: @@ -253,9 +351,12 @@ const uint32 BG_SA_ObjEntries[BG_SA_MAXOBJ + BG_SA_FLAG_AMOUNT] = 191310, 191306, 191308, - 191309, - 191305, - 191307, + 192819, + 192819, + 192819, + 192819, + 192819, + 190753 }; const uint32 BG_SA_Factions[2] = |