aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundEY.cpp
diff options
context:
space:
mode:
authorw12x <none@none>2008-10-05 08:48:32 -0500
committerw12x <none@none>2008-10-05 08:48:32 -0500
commit6f0c3469a63c97eef57f36f1a39fed0b281b7cc9 (patch)
tree7089d31e4493160bed067ac9da519841704b230a /src/game/BattleGroundEY.cpp
parent8b3fcc37c624c3ee4808d63160f563c070950cb4 (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/BattleGroundEY.cpp')
-rw-r--r--src/game/BattleGroundEY.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp
index dbde3295f4d..18b2645d25e 100644
--- a/src/game/BattleGroundEY.cpp
+++ b/src/game/BattleGroundEY.cpp
@@ -54,6 +54,13 @@ void BattleGroundEY::Update(time_t diff)
{
m_Events |= 0x01;
+ // setup here, only when at least one player has ported to the map
+ if(!SetupBattleGround())
+ {
+ EndNow();
+ return;
+ }
+
SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_IMMEDIATELY);
SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_IMMEDIATELY);
@@ -572,7 +579,17 @@ void BattleGroundEY::HandleKillPlayer(Player *player, Player *killer)
void BattleGroundEY::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, neither send unnecessary messages
+ // just take off the aura
+ if(IsFlagPickedup() && GetFlagPickerGUID() == Source->GetGUID())
+ {
+ SetFlagPicker(0);
+ Source->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
+ }
+ return;
+ }
if(!IsFlagPickedup())
return;