From 77230036cc793daf4a8bbf4a64ff9c02d6034f71 Mon Sep 17 00:00:00 2001 From: Rat Date: Thu, 3 Jun 2010 16:54:12 +0200 Subject: SOTA anticheat Graveyards shouldn't be captured unless the respective gates are broken. Relic shouldn't be activated unless the respective gate is broken. by Snakeice --HG-- branch : trunk --- src/game/BattleGroundSA.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game/BattleGroundSA.cpp b/src/game/BattleGroundSA.cpp index 429ec07ff83..ccde43ce948 100644 --- a/src/game/BattleGroundSA.cpp +++ b/src/game/BattleGroundSA.cpp @@ -645,15 +645,18 @@ void BattleGroundSA::EventPlayerClickedOnFlag(Player *Source, GameObject* target { case 191307: case 191308: - CaptureGraveyard(BG_SA_LEFT_CAPTURABLE_GY, Source); + if (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED) + CaptureGraveyard(BG_SA_LEFT_CAPTURABLE_GY, Source); break; case 191305: case 191306: - CaptureGraveyard(BG_SA_RIGHT_CAPTURABLE_GY, Source); + if (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED) + CaptureGraveyard(BG_SA_RIGHT_CAPTURABLE_GY, Source); break; case 191310: case 191309: - CaptureGraveyard(BG_SA_CENTRAL_CAPTURABLE_GY, Source); + if ((GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED) && (GateStatus[BG_SA_RED_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_PURPLE_GATE] == BG_SA_GATE_DESTROYED)) + CaptureGraveyard(BG_SA_CENTRAL_CAPTURABLE_GY, Source); break; default: return; @@ -732,7 +735,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source) void BattleGroundSA::EventPlayerUsedGO(Player* Source, GameObject* object) { - if (object->GetEntry() == BG_SA_ObjEntries[BG_SA_TITAN_RELIC]) + if (object->GetEntry() == BG_SA_ObjEntries[BG_SA_TITAN_RELIC] && GateStatus[BG_SA_ANCIENT_GATE] == BG_SA_GATE_DESTROYED) { if (Source->GetTeamId() == attackers) { -- cgit v1.2.3