mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Core/Spell): Make use of SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING (#4933)
This commit is contained in:
@@ -25520,11 +25520,19 @@ 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 zone, SpellInfo const* bySpell) const
|
||||
{
|
||||
// continent checked in SpellInfo::CheckLocation at cast and area update
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
|
||||
return v_map != 571 || HasSpell(54197); // 54197 = Cold Weather Flying
|
||||
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING))
|
||||
{
|
||||
if (!HasSpell(54197)) // 54197 = Cold Weather Flying
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Player::learnSpellHighRank(uint32 spellid)
|
||||
|
||||
Reference in New Issue
Block a user