mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
*Moved CanUnload function to header files - by Zor
*Move flycheck under function - by Zor --HG-- branch : trunk
This commit is contained in:
@@ -4172,34 +4172,11 @@ uint8 Spell::CanCast(bool strict)
|
||||
case SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED:
|
||||
case SPELL_AURA_FLY:
|
||||
{
|
||||
// not allow cast fly spells at old maps by players (all spells is self target)
|
||||
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
if(!((Player*)m_caster)->isGameMaster())
|
||||
{
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId());
|
||||
switch(v_map)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
{
|
||||
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_AZEROTH))
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
} break;
|
||||
case 530:
|
||||
{
|
||||
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OUTLAND))
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
} break;
|
||||
default:
|
||||
{
|
||||
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OTHERS))
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
} break;
|
||||
}
|
||||
}
|
||||
if(!((Player*)m_caster)->CanFlyInMap(GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId())))
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
||||
|
||||
Reference in New Issue
Block a user