mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7440] Use server-side only zone info. Optimize related calles in case zone and subzone use.
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.
This commit is contained in:
parent
071a0317f0
commit
329fb3f9d1
15 changed files with 103 additions and 56 deletions
|
|
@ -3756,7 +3756,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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue