Skip to content

Commit

Permalink
[9888] Party restore IsKnowHowFlyIn and add area arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Laise committed May 13, 2010
1 parent 099c2f6 commit 6ab5446
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/game/Player.cpp
Expand Up @@ -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

This comment has been minimized.

Copy link
@3raZar3

3raZar3 May 14, 2010

IsKnowHowFlyIn doesnt accept two arguments.... this commit breaks the build

This comment has been minimized.

Copy link
@VladimirMangos

VladimirMangos May 14, 2010

All work fine. Custom code changes possible used in your code. This is not mangos team problem.

This comment has been minimized.

Copy link
@3raZar3

3raZar3 May 14, 2010

yeah just found that out from a co-developer... once again, my bad, sorry vlad... when i pulled mangos into our repo i had already been working 8hr straight fiing errors i made myself and was loopy... sorry bout that guys

{
uint32 zone;
uint32 area;
GetZoneAndAreaId(zone, area);
// continent checked in SpellMgr::GetSpellAllowedInLocationError at cast and area update
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);

Expand Down
2 changes: 1 addition & 1 deletion src/game/Player.h
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions src/game/Spell.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9887"
#define REVISION_NR "9888"
#endif // __REVISION_NR_H__

0 comments on commit 6ab5446

Please sign in to comment.