Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
#ifndef _CITEM_MGR_H_
|
|
#define _CITEM_MGR_H_
|
|
|
|
#define g_ItemMgr Item::CItemMgr::GetInstance()
|
|
#include <Pattern/Singleton.h>
|
|
|
|
#include <vector>
|
|
#include "ItemStructure.h"
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// class : CItemMgr ( must use in single thread )
|
|
// 아이템 스크립트를 로딩하고, 저장하고, 새 아이템을 생성하는 등의 역할을 한다.
|
|
|
|
namespace Item
|
|
{
|
|
// 전방 참조
|
|
class CItem;
|
|
|
|
class CItemMgr : public CSingleton<CItemMgr>
|
|
{
|
|
public:
|
|
|
|
// 파일로부터 읽고 쓰는 기능
|
|
bool LoadItemProtoType(const char* szFileName = 0);
|
|
bool LoadItemProtoTypeBinary(const char* szFileNameBinary = 0);
|
|
bool SaveItemProtoTypeBinary(const char* szFileNameBinary = 0, const char* szTrashFile = 0);
|
|
|
|
const Item::ItemInfo* GetItemInfo(unsigned short usProtoTypeID);
|
|
const Item::ItemInfo* GetItemInfoFromItemName(const char* szItemName);
|
|
const Item::ItemInfo* GetItemInfoFromEquipName(const char* szEquipName);
|
|
|
|
const char* GetEquipName(const unsigned short usItemProtoTypeID);
|
|
const unsigned short GetItemIDFromSkillID(const unsigned short usSkill_ID, const unsigned short unSkill_LockCount);
|
|
|
|
~CItemMgr();
|
|
|
|
private:
|
|
|
|
CItemMgr();
|
|
|
|
void DestoryItemInfo();
|
|
|
|
static const char* ms_szItemScriptFileName;
|
|
static CItemMgr ms_this;
|
|
|
|
size_t m_nItemNum;
|
|
Item::ItemInfo* m_ItemInfoArray;
|
|
};
|
|
}
|
|
|
|
#endif |