diff options
author | w12x <none@none> | 2008-10-05 08:48:32 -0500 |
---|---|---|
committer | w12x <none@none> | 2008-10-05 08:48:32 -0500 |
commit | 6f0c3469a63c97eef57f36f1a39fed0b281b7cc9 (patch) | |
tree | 7089d31e4493160bed067ac9da519841704b230a /src/game/BattleGroundWS.cpp | |
parent | 8b3fcc37c624c3ee4808d63160f563c070950cb4 (diff) |
[svn] -enabled instantiated battlegrounds
-enabled arena matches
-rewritten battleground queuing to support joining as group
-removed queue announcements
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGroundWS.cpp')
-rw-r--r-- | src/game/BattleGroundWS.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index d907b6e3bcb..76ce4236cc0 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -49,6 +49,13 @@ void BattleGroundWS::Update(time_t diff) { m_Events |= 0x01; + // setup here, only when at least one player has ported to the map + if(!SetupBattleGround()) + { + EndNow(); + return; + } + for(uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_H_4; i++) { SpawnBGObject(i, RESPAWN_IMMEDIATELY); @@ -285,7 +292,32 @@ void BattleGroundWS::EventPlayerCapturedFlag(Player *Source) void BattleGroundWS::EventPlayerDroppedFlag(Player *Source) { - // Drop allowed in any BG state + if(GetStatus() != STATUS_IN_PROGRESS) + { + // if not running, do not cast things at the dropper player (prevent spawning the "dropped" flag), neither send unnecessary messages + // just take off the aura + if(Source->GetTeam() == ALLIANCE) + { + if(!this->IsHordeFlagPickedup()) + return; + if(GetHordeFlagPickerGUID() == Source->GetGUID()) + { + SetHordeFlagPicker(0); + Source->RemoveAurasDueToSpell(BG_WS_SPELL_WARSONG_FLAG); + } + } + else + { + if(!this->IsAllianceFlagPickedup()) + return; + if(GetAllianceFlagPickerGUID() == Source->GetGUID()) + { + SetAllianceFlagPicker(0); + Source->RemoveAurasDueToSpell(BG_WS_SPELL_SILVERWING_FLAG); + } + } + return; + } const char *message = ""; uint8 type = 0; |