mojo_client/src/Client/World/CacheHandler.h
False.Genesis d6b6960c29 * Added support for item prototypes
* new DefScript command: "queryitem #id"
* added cache for known item prototypes
* fixed a little typo in script: reply.def
* error logs go to stderr now
* misc stuff
2007-02-03 23:24:02 +00:00

25 lines
607 B
C++

#ifndef _CACHEHANDLER_H
#define _CACHEHANDLER_H
struct PlayerNameCacheItem {
uint64 _guid;
std::string _name;
};
class PlayerNameCache {
public:
std::string GetName(uint64);
uint64 GetGuid(std::string);
bool AddInfo(uint64 guid, std::string name);
bool AddInfo(PlayerNameCacheItem*);
bool SaveToFile(void);
bool ReadFromFile(void);
uint32 GetSize(void);
private:
std::vector<PlayerNameCacheItem*> _cache;
};
void ItemProtoCache_InsertDataToSession(WorldSession *session);
void ItemProtoCache_WriteDataToCache(WorldSession *session);
#endif