*Cleanup in single target auras (thanks to JuliuSZS some useable debug info)
*Add ToInstanceMap() and ToMapInstanced() typecast functions and CAST_INST macro to use in scripts. --HG-- branch : trunk
This commit is contained in:
@@ -51,6 +51,8 @@ struct ScriptInfo;
|
||||
struct ScriptAction;
|
||||
struct Position;
|
||||
class BattleGround;
|
||||
class MapInstanced;
|
||||
class InstanceMap;
|
||||
|
||||
//******************************************
|
||||
// Map file format defines
|
||||
@@ -446,6 +448,12 @@ class Map : public GridRefManager<NGridType>
|
||||
Creature* GetCreature(uint64 guid);
|
||||
GameObject* GetGameObject(uint64 guid);
|
||||
DynamicObject* GetDynamicObject(uint64 guid);
|
||||
|
||||
MapInstanced* ToMapInstanced(){ if (Instanceable()) return reinterpret_cast<MapInstanced*>(this); else return NULL; }
|
||||
const MapInstanced* ToMapInstanced() const { if (Instanceable()) return (const MapInstanced*)((MapInstanced*)this); else return NULL; }
|
||||
|
||||
InstanceMap* ToInstanceMap(){ if (IsDungeon()) return reinterpret_cast<InstanceMap*>(this); else return NULL; }
|
||||
const InstanceMap* ToInstanceMap() const { if (IsDungeon()) return (const InstanceMap*)((InstanceMap*)this); else return NULL; }
|
||||
private:
|
||||
void LoadMapAndVMap(int gx, int gy);
|
||||
void LoadVMap(int gx, int gy);
|
||||
|
||||
Reference in New Issue
Block a user