fix(Core/Players): Fixed setting player's zone id to unknown value. (#10996)
* fix(Core/Players): Fixed setting player's zone id to unknown value. Fixed #10945 * Update. * Update.
This commit is contained in:
@@ -1192,6 +1192,11 @@ void Player::UpdateArea(uint32 newArea)
|
|||||||
|
|
||||||
void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||||
{
|
{
|
||||||
|
if (!newZone)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_zoneUpdateId != newZone)
|
if (m_zoneUpdateId != newZone)
|
||||||
{
|
{
|
||||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||||
|
|||||||
@@ -1499,7 +1499,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
|||||||
}
|
}
|
||||||
|
|
||||||
// continent limitation (virtual continent)
|
// continent limitation (virtual continent)
|
||||||
if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS))
|
if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS) && (area_id || zone_id))
|
||||||
{
|
{
|
||||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
|
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
|
||||||
if (!areaEntry)
|
if (!areaEntry)
|
||||||
|
|||||||
@@ -3827,7 +3827,7 @@ public:
|
|||||||
AreaTableEntry const* area = sAreaTableStore.LookupEntry(target->GetAreaId());
|
AreaTableEntry const* area = sAreaTableStore.LookupEntry(target->GetAreaId());
|
||||||
// Xinef: add battlefield check
|
// Xinef: add battlefield check
|
||||||
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(target->GetZoneId());
|
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(target->GetZoneId());
|
||||||
if (!area || (canFly && ((area->flags & AREA_FLAG_NO_FLY_ZONE) || (Bf && !Bf->CanFlyIn()))))
|
if ((area && canFly && (area->flags & AREA_FLAG_NO_FLY_ZONE)) || (Bf && !Bf->CanFlyIn()))
|
||||||
canFly = false;
|
canFly = false;
|
||||||
|
|
||||||
uint32 mount = 0;
|
uint32 mount = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user