fix teleport to draenei/blood elves areas with flying aura
This commit is contained in:
1 parent
616c5ca2b3
commit
40f2ae4d07
2 files changed
+11
-4
No files matched your search
@@ -24923,12 +24923,12 @@ uint32 Player::CalculateTalentsPoints() const
|
||||
return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT));
|
||||
}
|
||||
|
||||
bool Player::CanFlyInZone(uint32 mapid, uint32 zone) const
|
||||
bool Player::CanFlyInZone(uint32 mapid, uint32 areaid) const
|
||||
{
|
||||
// continent checked in SpellInfo::CheckLocation at cast and area update
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
|
||||
AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaid);
|
||||
bool can_fly = false;
|
||||
switch (v_map)
|
||||
switch (mapid)
|
||||
{
|
||||
case 0: // Eastern Kingdoms
|
||||
case 1: // Kalimdor
|
||||
@@ -24939,7 +24939,10 @@ bool Player::CanFlyInZone(uint32 mapid, uint32 zone) const
|
||||
can_fly = HasSpell(54197); // Cold Weather Flying
|
||||
break;
|
||||
case 530: // Outland
|
||||
can_fly = true;
|
||||
// Draenei and blood elves starting zones belong to Outland map, but are not flyable
|
||||
// These zones don't have flag AREA_FLAG_OUTLAND2
|
||||
if (sAreaTableStore.LookupEntry(areaid)->flags & AREA_FLAG_OUTLAND2)
|
||||
can_fly = true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -263,6 +263,10 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recvPacket)
|
||||
// in friendly area
|
||||
else if (plMover->IsPvP() && !plMover->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP))
|
||||
plMover->UpdatePvP(false, false);
|
||||
|
||||
// can fly check
|
||||
if (!plMover->CanFlyInZone(plMover->GetMapId(), newzone))
|
||||
plMover->RemoveAurasByType(SPELL_AURA_FLY);
|
||||
}
|
||||
|
||||
// resummon pet
|
||||
|
||||
Reference in new issue
Block a user