From e2bae754ef545c20fd68cfd6e590819f61ea090c Mon Sep 17 00:00:00 2001 From: ArashGorge <52334511+ArashGorge@users.noreply.github.com> Date: Sat, 20 Jul 2019 05:09:13 +0430 Subject: [PATCH] fix(Core/Battleground): Warsong flags can be picked up while mounted (#2067) * Fixed Mount Bug (https://github.com/azerothcore/azerothcore-wotlk/issues/2065) * DisMount Player while Pickedup Flag --- src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index c7ca7fd35..6322e693f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -271,7 +271,11 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* gameOb } return; } - + if (player->IsMounted()) + { + player->Dismount(); + player->RemoveAurasByType(SPELL_AURA_MOUNTED); + } // Alliance Flag on ground if (GetFlagState(TEAM_ALLIANCE) == BG_WS_FLAG_STATE_ON_GROUND && player->IsWithinDistInMap(gameObject, 10.0f) && gameObject->GetEntry() == BG_OBJECT_A_FLAG_GROUND_WS_ENTRY) {