feat(Core/Player): Addition of a Hook in CanFlyInZone check (#16590)

---------

Co-authored-by: tmoos <tmoos@meteomatics.com>
Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Tralenor
2023-09-20 22:40:08 +02:00
committed by GitHub
parent 152429867b
commit 0796df57ac
6 changed files with 35 additions and 4 deletions

View File

@@ -13550,8 +13550,13 @@ uint32 Player::CalculateTalentsPoints() const
return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT));
}
bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) const
bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell)
{
if (!sScriptMgr->OnCanPlayerFlyInZone(this, mapid,zone,bySpell))
{
return false;
}
// continent checked in SpellInfo::CheckLocation at cast and area update
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT))