False.Genesis 3100f68a30 last changes before 2.1.3:
* added script to support /me-like emotes (scriptname is "me")
* changed the permission system: now a script cant be used as game command f no permission is explicitly set
* implemented threadsafe CLI queue to solve crashes with short-intervalled events that ran on 2 threads
* fixed name return at "getitemprotovalue" script
* iplemented DrawObject class and a Mgr for those objects; they will ease object drawing once implemented. the Mgr works under control of the GUI thread and is threadsafe.
* implemented auto-loading of SCP files if a name-tag is present somewhere in the file ("#dbname=...") and no explicit db name was passed to "loadscp" script.
* changed internal ObjMgr storage to std::map (instead of list) for faster access
* fixed call of "_enterworld" script
* fixed handling of MyCharacter(), which could cause crashes after newly changes
* fixed GetFileList() func in tools.cpp (this fixes also related "lgetfiles" script func). now it will only parse files, not directories. might still need some fixing for linux.
2007-08-01 19:09:17 +00:00

46 lines
1.1 KiB
C++

#ifndef _OBJMGR_H
#define _OBJMGR_H
#include "common.h"
#include <list>
#include "Object.h"
#include "Item.h"
typedef std::vector<ItemProto*> ItemProtoList;
typedef std::map<uint64,Object*> ObjectMap;
class PseuInstance;
class ObjMgr
{
public:
ObjMgr();
~ObjMgr();
void SetInstance(PseuInstance*);
void RemoveAll(void); // TODO: this needs to be called on SMSG_LOGOUT_COMPLETE once implemented.
// Item Prototype functions
uint32 GetItemProtoCount(void) { return _iproto.size(); }
ItemProto *GetItemProto(uint32);
ItemProto *GetItemProtoByPos(uint32);
void Add(ItemProto*);
// nonexistent items handler
void AddNonexistentItem(uint32);
bool ItemNonExistent(uint32);
// Object functions
void Add(Object*);
void Remove(uint64); // remove all objects with that guid (should be only 1 object in total anyway)
Object *GetObj(uint64 guid);
inline uint32 GetObjectCount(void) { return _obj.size(); }
private:
ItemProtoList _iproto;
ObjectMap _obj;
std::vector<uint32> _noitem;
PseuInstance *_instance;
};
#endif