Files
Client/GameTools/GLOBALSCRIPT/Item/ItemFactory.h
LGram16 dd97ddec92 Restructure repository to include all source folders
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>
2025-11-29 20:17:20 +09:00

46 lines
1.1 KiB
C++

#ifndef _ITEM_FACTORY_H_
#define _ITEM_FACTORY_H_
#include <Pattern/Singleton.h>
namespace Item
{
// 전방 참조
class CItem;
struct ItemInfo;
#pragma pack(8)
class CItemFactory : public CSingleton<CItemFactory>
{
public:
inline unsigned __int64 GetItemUID() { return m_nCurrentUID; }
inline void SetItemUID(unsigned __int64 nCurrentUID) { m_nCurrentUID = nCurrentUID; }
// Desc : 종류로 아이템 생성(기본 능력치)
CItem* CreateItem(const ItemInfo& itemInfo);
// Desc : 종류 ID로 아이템 생성(기본 능력치)
CItem* CreateItem(unsigned short usProtoTypeID);
// Desc : SerializeOut된 버퍼로 아이템 생성.
// In : 버퍼, 버퍼 크기
// Out : (Return)성공 여부, nParseLength_InOut - 사용한 버퍼 크기
CItem* CreateItem(const char* lpSerializedItem_In, size_t& nParseLength_InOut);
~CItemFactory();
private:
CItemFactory();
unsigned __int64 m_nCurrentUID;
static CItemFactory ms_this;
};
#pragma pack()
};
#endif