Spell/GameObject: Fix flying upon teleport between map initiated from GO (#23390)

This commit is contained in:
killerwife
2025-10-25 11:00:55 +02:00
committed by GitHub
parent a05cc525f0
commit f95dabdfb9
2 changed files with 9 additions and 14 deletions

View File

@@ -1573,17 +1573,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (oldmap)
oldmap->RemovePlayerFromMap(this, false);
// xinef: do this before setting fall information!
if (IsMounted() && (!GetMap()->GetEntry()->IsDungeon() && !GetMap()->GetEntry()->IsBattlegroundOrArena()) && !m_transport)
{
AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_MOUNTED);
if (!auras.empty())
{
SetMountBlockId((*auras.begin())->GetId());
RemoveAurasByType(SPELL_AURA_MOUNTED);
}
}
teleportStore_dest = WorldLocation(mapid, x, y, z, orientation);
SetFallInformation(GameTime::GetGameTime().count(), z);
// if the player is saved before worldportack (at logout for example)