mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Speedup map checks
This commit is contained in:
parent
b9e695b727
commit
8e32c8ca76
3 changed files with 6 additions and 7 deletions
|
|
@ -4062,9 +4062,8 @@ uint8 Spell::CanCast(bool strict)
|
|||
// 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() &&
|
||||
GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) != 530 &&
|
||||
!(GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) == 571 && ((Player*)m_caster)->HasSpell(54197)))
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(), m_caster->GetZoneId());
|
||||
if( !((Player*)m_caster)->isGameMaster() && v_map != 530 && !(v_map == 571 && ((Player*)m_caster)->HasSpell(54197)))
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue