[7005] Request Area/Zone Ids using 3D coordinates.

.map files not have 3D specifci area infor. So use hack way for update areaflag for some cases (areas 4281, 4342)
where exist area dependent auras.
This commit is contained in:
VladimirMangos 2009-01-02 19:07:34 +03:00
parent d2d5cb4643
commit bd4fc1b0ae
8 changed files with 42 additions and 21 deletions

View file

@ -45,13 +45,13 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
Map const* GetBaseMap(uint32 id) const { return const_cast<MapManager*>(this)->_GetBaseMap(id); }
void DeleteInstance(uint32 mapid, uint32 instanceId);
inline uint16 GetAreaFlag(uint32 mapid, float x, float y) const
inline uint16 GetAreaFlag(uint32 mapid, float x, float y, float z) const
{
Map const* m = GetBaseMap(mapid);
return m->GetAreaFlag(x, y);
return m->GetAreaFlag(x, y, z);
}
inline uint32 GetAreaId(uint32 mapid, float x, float y) { return Map::GetAreaId(GetAreaFlag(mapid, x, y),mapid); }
inline uint32 GetZoneId(uint32 mapid, float x, float y) { return Map::GetZoneId(GetAreaFlag(mapid, x, y),mapid); }
inline uint32 GetAreaId(uint32 mapid, float x, float y, float z) { return Map::GetAreaId(GetAreaFlag(mapid, x, y, z),mapid); }
inline uint32 GetZoneId(uint32 mapid, float x, float y, float z) { return Map::GetZoneId(GetAreaFlag(mapid, x, y, z),mapid); }
void Initialize(void);
void Update(time_t);