Eluna add new system for userdata management. single userdata with GC.

Note that this will still need the core side destructors to have the ref remove function used in order to have invalid pointer errors.
This commit is contained in:
Rochet2
2014-05-28 11:54:26 +03:00
committed by Foereaper
parent 74aaea30d5
commit e131f36d39
6 changed files with 301 additions and 176 deletions

View File

@@ -37,6 +37,8 @@ struct AreaTriggerEntry;
class ReactorAI;
typedef ReactorAI ScriptedAI;
#else
#undef UNORDERED_MAP
#define UNORDERED_MAP std::unordered_map
struct ScriptedAI;
#endif
class AuctionHouseObject;
@@ -321,7 +323,8 @@ enum GossipEvents
class HookMgr
{
public:
friend class ACE_Singleton<HookMgr, ACE_Thread_Mutex>;
int userdata_table;
void RemoveRef(const void* obj) const;
CreatureAI* GetAI(Creature* creature);