fix(Core/Arena): flying upon arrival in arena if joining on flying mount (#23440)
This commit is contained in:
@@ -1178,16 +1178,19 @@ void Battleground::AddPlayer(Player* player)
|
|||||||
sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, player);
|
sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, player);
|
||||||
SendPacketToTeam(teamId, &data, player, false);
|
SendPacketToTeam(teamId, &data, player, false);
|
||||||
|
|
||||||
player->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
|
||||||
|
|
||||||
// add arena specific auras
|
// add arena specific auras
|
||||||
if (isArena())
|
if (isArena())
|
||||||
{
|
{
|
||||||
// restore pets health before remove
|
// restore pets health before remove
|
||||||
if (Pet* pet = player->GetPet())
|
Pet* pet = player->GetPet();
|
||||||
|
if (pet)
|
||||||
if (pet->IsAlive())
|
if (pet->IsAlive())
|
||||||
pet->SetHealth(pet->GetMaxHealth());
|
pet->SetHealth(pet->GetMaxHealth());
|
||||||
|
|
||||||
|
player->RemoveArenaAuras();
|
||||||
|
if (pet)
|
||||||
|
pet->RemoveArenaAuras();
|
||||||
|
player->RemoveArenaSpellCooldowns(true);
|
||||||
player->RemoveArenaEnchantments(TEMP_ENCHANTMENT_SLOT);
|
player->RemoveArenaEnchantments(TEMP_ENCHANTMENT_SLOT);
|
||||||
player->DestroyConjuredItems(true);
|
player->DestroyConjuredItems(true);
|
||||||
player->UnsummonPetTemporaryIfAny();
|
player->UnsummonPetTemporaryIfAny();
|
||||||
|
|||||||
@@ -1533,17 +1533,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||||||
|
|
||||||
CombatStop();
|
CombatStop();
|
||||||
|
|
||||||
// remove arena spell coldowns/buffs now to also remove pet's cooldowns before it's temporarily unsummoned
|
|
||||||
if (mEntry->IsBattleArena() && (HasPendingSpectatorForBG(0) || !HasPendingSpectatorForBG(GetBattlegroundId())))
|
|
||||||
{
|
|
||||||
// KEEP THIS ORDER!
|
|
||||||
RemoveArenaAuras();
|
|
||||||
if (pet)
|
|
||||||
pet->RemoveArenaAuras();
|
|
||||||
|
|
||||||
RemoveArenaSpellCooldowns(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove pet on map change
|
// remove pet on map change
|
||||||
if (pet)
|
if (pet)
|
||||||
UnsummonPetTemporaryIfAny();
|
UnsummonPetTemporaryIfAny();
|
||||||
|
|||||||
Reference in New Issue
Block a user