[7440] Use server-side only zone info. Optimize related calles in case zone and subzone use. Author: VladimirMangos

This in some cases make some zones not explorable if it not have server side data in current maps
    but not allow cheating with zone set from client.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-03-11 16:17:37 -06:00
1 parent 5286f2351f
commit 6e29ab4fbb
15 files changed
+107 -67

No files matched your search

+4 -1
View File
@@ -3733,7 +3733,10 @@ uint8 Spell::CanCast(bool strict)
return SPELL_FAILED_NOT_IN_ARENA;
// zone check
if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(),
uint32 zone, area;
m_caster->GetZoneAndAreaId(zone,area);
if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),zone,area,
m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster) : NULL))
return res;