mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7154] Move allow player fly check to function.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
10468d170d
commit
25b120877e
4 changed files with 13 additions and 5 deletions
|
|
@ -18872,8 +18872,7 @@ void Player::SetClientControl(Unit* target, uint8 allowMove)
|
|||
void Player::UpdateZoneDependentAuras( uint32 newZone )
|
||||
{
|
||||
// remove new continent flight forms
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(GetMapId(), newZone);
|
||||
if( !isGameMaster() && v_map != 530 && v_map != 571)
|
||||
if( !IsAllowUseFlyMountsHere() )
|
||||
{
|
||||
RemoveSpellsCausingAura(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED);
|
||||
RemoveSpellsCausingAura(SPELL_AURA_FLY);
|
||||
|
|
@ -19363,3 +19362,12 @@ uint32 Player::CalculateTalentsPoints() const
|
|||
|
||||
return talentPointsForLevel;
|
||||
}
|
||||
|
||||
bool Player::IsAllowUseFlyMountsHere() const
|
||||
{
|
||||
if (isGameMaster())
|
||||
return true;
|
||||
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(GetMapId(), GetZoneId());
|
||||
return v_map == 530 || v_map == 571 && HasSpell(54197);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue