mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10205] Correctly implement flying mount restrictions in zone 4395 by use of special area flag.
Also drop existing spell_area entries if exist, workaround not needed anymore.
This commit is contained in:
parent
3ed6542c1d
commit
f2e3881a77
9 changed files with 50 additions and 23 deletions
|
|
@ -2676,7 +2676,7 @@ void Spell::cancel()
|
|||
if(m_spellState == SPELL_STATE_FINISHED)
|
||||
return;
|
||||
|
||||
// channeled spells don't display interrupted message even if they are interrupted, possible other cases with no "Interrupted" message
|
||||
// channeled spells don't display interrupted message even if they are interrupted, possible other cases with no "Interrupted" message
|
||||
bool sendInterrupt = IsChanneledSpell(m_spellInfo) ? false : true;
|
||||
|
||||
m_autoRepeat = false;
|
||||
|
|
@ -2705,7 +2705,7 @@ void Spell::cancel()
|
|||
|
||||
SendChannelUpdate(0);
|
||||
SendInterrupted(0);
|
||||
|
||||
|
||||
if (sendInterrupt)
|
||||
SendCastResult(SPELL_FAILED_INTERRUPTED);
|
||||
} break;
|
||||
|
|
@ -5219,7 +5219,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(), zone, area))
|
||||
if (!((Player*)m_caster)->CanStartFlyInArea(m_caster->GetMapId(), zone, area))
|
||||
return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
|
||||
}
|
||||
break;
|
||||
|
|
@ -6685,7 +6685,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(), zone, area))
|
||||
if (locRes != SPELL_CAST_OK || !((Player*)target)->CanStartFlyInArea(target->GetMapId(), zone, area))
|
||||
target->CastSpell(target, spellId150, true);
|
||||
else if (spellIdSpecial > 0)
|
||||
{
|
||||
|
|
@ -6729,4 +6729,4 @@ void Spell::ClearCastItem()
|
|||
m_targets.setItemTarget(NULL);
|
||||
|
||||
m_CastItem = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue