stoneage8.5/石器时代8.5客户端最新源代码/石器源码/other/ItemsMall.h

66 lines
1.8 KiB
C
Raw Permalink Normal View History

2020-06-23 15:27:59 +08:00
#ifndef _ITEMS_MALL_H__
#define _ITEMS_MALL_H__
#include <map>
#define ITEMS_MALL_FILE_NAME "shopsellitems.bin"
typedef struct ITEMSMALL
{
int id; //id
int itemId; //<2F><>Ʒ/<2F><><EFBFBD><EFBFBD>ID
char itemName[128]; //<2F><>Ʒ/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int itemFlag; //<2F><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>dz<EFBFBD><C7B3><EFBFBD><EFA3AC>ƷΪ<C6B7><CEAA>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>2<EFBFBD><32>
int bmpNo; //<2F><><EFBFBD><EFBFBD>/<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ͼƬ
int currencyType; //<2F><><EFBFBD><EFBFBD>Щ<EFBFBD><D0A9>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int currencyNum; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô˻<C3B4><CBBB>ҹ<EFBFBD><D2B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>Ϊ<EFBFBD><CEAA>-1
int recordType; //<2F><>Ʒ<EFBFBD><C6B7><EFBFBD>ࣺ1<E0A3BA><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ϼۣ<CFBC>4<EFBFBD><34>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
char szLine1[128];
char szLine2[128];
char szLine3[128];
}*LP_ITEMSMALL;
//<2F><><EFBFBD><EFBFBD><EFBFBD>̳<EFBFBD><CCB3><EFBFBD><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
class ItemsMall
{
public:
static ItemsMall& MakeInstance();
static void Destroy();
void SetItemDatas(char* pszData);
int GetItemsNums();
int GetPetsNums();
int GetAllItemSize() { return g_mapItemsMall.size(); }
ITEMSMALL* GetItemByIndex(int nIndex);
ITEMSMALL* GetItemByType(int nIndex, int nType, int recordType = 1); //recodTypeĬ<65><C4AC>ֵΪ1<CEAA><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>Ʒ<EFBFBD><C6B7><34><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ
ITEMSMALL* GetAllItemsByIndex(int nIndex, int nType);
ITEMSMALL* GetAllPetsByIndex(int nIndex, int nType);
ITEMSMALL* GetAllOtherItemsByIndex(int nIndex, int nType);
int GetCurrentItemNum(int nCurrencyType, int nType);
//int GetAllLatestNum(); //<2F><><EFBFBD><EFBFBD><EFBFBD>ϼۻ<CFBC>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
//int GetAllItemsNum(); //װ<><D7B0><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
//int GetAllPetsNum(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
//int GetAllOthersNum(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
protected:
ItemsMall(void){}
ItemsMall(ItemsMall&);
~ItemsMall(void){}
static ItemsMall* instance;
static std::map<int, ITEMSMALL> g_mapItemsMall;
//static int m_nAllLatestNum;
//static int m_nAllItemsNum;
//static int m_nAllPetsNum;
//static int m_nAllOthersNum;
};
#endif