mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 04:37:06 +00:00
[12660] Implement mount capabilities by Shauren.
Also update AreaFlags enum, implement mount capabilities check at teleport.
----------------------------
commit is partially based on ec5eabdc69
This commit is contained in:
parent
a253344a02
commit
46d4f07052
8 changed files with 105 additions and 36 deletions
|
|
@ -6105,12 +6105,13 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
}
|
||||
case SPELL_AURA_MOUNTED:
|
||||
{
|
||||
if (m_caster->IsInWater())
|
||||
return SPELL_FAILED_ONLY_ABOVEWATER;
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && ((Player*)m_caster)->GetTransport())
|
||||
return SPELL_FAILED_NO_MOUNTS_ALLOWED;
|
||||
|
||||
if (spellEffect->EffectMiscValueB && !m_caster->GetMountCapability(spellEffect->EffectMiscValueB))
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
|
||||
// Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !sMapStore.LookupEntry(m_caster->GetMapId())->IsMountAllowed() && !m_IsTriggeredSpell && !m_spellInfo->GetAreaGroupId())
|
||||
return SPELL_FAILED_NO_MOUNTS_ALLOWED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue