mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9888] Party restore IsKnowHowFlyIn and add area arg
This commit is contained in:
parent
a002f22916
commit
0344a8e838
4 changed files with 5 additions and 8 deletions
|
|
@ -20906,11 +20906,8 @@ uint32 Player::CalculateTalentsPoints() const
|
|||
return uint32(talentPointsForLevel * sWorld.getConfig(CONFIG_FLOAT_RATE_TALENT));
|
||||
}
|
||||
|
||||
bool Player::IsKnowHowFlyIn(uint32 mapid) const
|
||||
bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone, uint32 area) const
|
||||
{
|
||||
uint32 zone;
|
||||
uint32 area;
|
||||
GetZoneAndAreaId(zone, area);
|
||||
// continent checked in SpellMgr::GetSpellAllowedInLocationError at cast and area update
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
|
||||
|
||||
|
|
|
|||
|
|
@ -2150,7 +2150,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
|
||||
bool CanFly() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_CAN_FLY); }
|
||||
bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_FLYING); }
|
||||
bool IsKnowHowFlyIn(uint32 mapid) const;
|
||||
bool IsKnowHowFlyIn(uint32 mapid, uint32 zone, uint32 area) const;
|
||||
|
||||
void SetClientControl(Unit* target, uint8 allowMove);
|
||||
void SetMover(Unit* target) { m_mover = target ? target : this; }
|
||||
|
|
|
|||
|
|
@ -5113,7 +5113,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
// allow always ghost flight spells
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isAlive())
|
||||
{
|
||||
if (!((Player*)m_caster)->IsKnowHowFlyIn(m_caster->GetMapId()))
|
||||
if (!((Player*)m_caster)->IsKnowHowFlyIn(m_caster->GetMapId(), zone, area))
|
||||
return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
|
||||
}
|
||||
break;
|
||||
|
|
@ -6548,7 +6548,7 @@ void Spell::SelectMountByAreaAndSkill(Unit* target, uint32 spellId75, uint32 spe
|
|||
target->GetZoneAndAreaId(zone, area);
|
||||
|
||||
SpellCastResult locRes= sSpellMgr.GetSpellAllowedInLocationError(pSpell, target->GetMapId(), zone, area, target->GetCharmerOrOwnerPlayerOrPlayerItself());
|
||||
if (locRes != SPELL_CAST_OK || !((Player*)target)->IsKnowHowFlyIn(target->GetMapId()))
|
||||
if (locRes != SPELL_CAST_OK || !((Player*)target)->IsKnowHowFlyIn(target->GetMapId(), zone, area))
|
||||
target->CastSpell(target, spellId150, true);
|
||||
else if (spellIdSpecial > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9887"
|
||||
#define REVISION_NR "9888"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue