aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r--src/game/BattleGround.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 772368841d1..098b5a0d28e 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -946,14 +946,21 @@ void BattleGround::AddPlayer(Player *plr)
plr->RemoveArenaAuras();
plr->RemoveArenaSpellCooldowns();
plr->RemoveAllEnchantments(TEMP_ENCHANTMENT_SLOT);
- if(team == ALLIANCE && plr->GetTeam() == ALLIANCE)
- plr->CastSpell(plr,SPELL_ALLIANCE_GOLD_FLAG,true);
- else if(team == HORDE && plr->GetTeam() == ALLIANCE)
- plr->CastSpell(plr,SPELL_ALLIANCE_GREEN_FLAG,true);
- else if(team == ALLIANCE && plr->GetTeam() == HORDE)
- plr->CastSpell(plr,SPELL_HORDE_GOLD_FLAG,true);
- else
- plr->CastSpell(plr,SPELL_HORDE_GREEN_FLAG,true);
+ if(team == ALLIANCE) // gold
+ {
+ if(plr->GetTeam() == HORDE)
+ plr->CastSpell(plr, SPELL_HORDE_GOLD_FLAG,true);
+ else
+ plr->CastSpell(plr, SPELL_ALLIANCE_GOLD_FLAG,true);
+ }
+ else // green
+ {
+ if(plr->GetTeam() == HORDE)
+ plr->CastSpell(plr, SPELL_HORDE_GREEN_FLAG,true);
+ else
+ plr->CastSpell(plr, SPELL_ALLIANCE_GREEN_FLAG,true);
+ }
+
plr->DestroyConjuredItems(true);
Pet* pet = plr->GetPet();