2007-02-08 21:31:56 +00:00

35 lines
719 B
C++

#ifndef _OBJMGR_H
#define _OBJMGR_H
#include <list>
class Object;
struct ItemProto;
typedef std::list<Object*> ObjList;
typedef std::vector<ItemProto*> ItemProtoList;
class ObjMgr
{
public:
~ObjMgr();
void Add(Object*);
void Add(ItemProto*);
void AddNonexistentItem(uint32);
bool ItemNonExistent(uint32);
Object *GetObj(uint64);
void RemoveObject(uint64);
uint32 GetObjectCount(void) { return _obj.size(); }
uint32 GetItemProtoCount(void) { return _iproto.size(); }
ItemProto *GetItemProto(uint32);
ItemProto *GetItemProtoByPos(uint32);
private:
ObjList _obj;
ItemProtoList _iproto;
std::vector<uint32> _noitem;
};
#endif