diff options
-rw-r--r-- | src/game/Spell.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index f4bb7eeebb6..5c29e5889b0 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2684,8 +2684,8 @@ void Spell::SendCastResult(uint8 result) case 45373: // Bloodberry Elixir data << uint32(4075); break; - default: // default case - data << uint32(m_spellInfo->AreaId); + default: // default case (don't must be) + data << uint32(0); break; } break; @@ -3625,8 +3625,8 @@ uint8 Spell::CanCast(bool strict) return SPELL_FAILED_NOT_IN_ARENA; // zone check - if(!IsSpellAllowedInLocation(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId())) - return SPELL_FAILED_REQUIRES_AREA; + if(uint8 res= GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId())) + return res; // not let players cast spells at mount (and let do it to creatures) if( m_caster->IsMounted() && m_caster->GetTypeId()==TYPEID_PLAYER && !m_IsTriggeredSpell && @@ -4256,7 +4256,7 @@ uint8 Spell::CanCast(bool strict) return SPELL_FAILED_NO_MOUNTS_ALLOWED; // 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->AreaId) + if (m_caster->GetTypeId()==TYPEID_PLAYER && !sMapStore.LookupEntry(m_caster->GetMapId())->IsMountAllowed() && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId) return SPELL_FAILED_NO_MOUNTS_ALLOWED; ShapeshiftForm form = m_caster->m_form; @@ -5552,4 +5552,4 @@ int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *mul } } return m_damage; -}
\ No newline at end of file +} |