DNF_DLL/test/STL.h

112 lines
2.7 KiB
C++

#pragma once
//普通 STL
#if defined NORMAL_STL
//构造int类型容器
static std::map<std::string, int>Int_STL;
//构造float类型容器
static std::map<std::string, FLOAT>Float_STL;
//构造string类型容器
static std::map<std::string, std::string>String_STL;
//构造bool类型容器
static std::map<std::string, BOOL>Bool_STL;
//构造intarr类型容器
static std::map<std::string, std::map<int, int>>IntArr_STL;
//构造floatarr类型容器
static std::map<std::string, std::map<int, FLOAT>>FloatArr_STL;
//构造stringarr类型容器
static std::map<std::string, std::map<int, std::string>>StringArr_STL;
//构造boolarr类型容器
static std::map<std::string, std::map<int, BOOL>>BoolArr_STL;
static std::map<int, int>aod;
static std::map<int, FLOAT>bod;
static std::map<int, std::string>cod;
static std::map<int, BOOL>dod;
#endif
//时间 STL
#if defined TIME_STL
struct TimeSTLStruct
{
wchar_t* Name;
int Max_Time;
int Now_Time;
long long Static_Time;
HANDLE Thand;
};
//构造Time类型容器
static std::map<wchar_t*, TimeSTLStruct>Time_STL;
#endif
//龙盒
#if defined DRAGONBOX_SWITCH
//抽奖 类型结构体
struct Dargonresult
{
int ItemIndex;
int ItemNum;
int ItemGrade;
};
//龙盒结构体
struct DargonMap
{
int LuckyValue;
Dargonresult Result[10];
int sync;
int box_num;
};
//龙盒状态Map
static std::map<std::string, DargonMap>DargonState_STL;
//龙盒模式Map
static std::map<std::string, int>DargonModel_STL;
#endif
class STL
{
private:
public:
//普通 STL
#if defined NORMAL_STL
//查询指定容器是否存在
static int Check_STL(std::string name,int Type,int idx = 0);
//static int Check_STL_Idx(std::string name,int idx);
//构造 Int数组容器
static void BuildIntArr_STL(std::string name);
static void BuildFloatArr_STL(std::string name);
static void BuildStringArr_STL(std::string name);
static void BuildBoolArr_STL(std::string name);
//设置 Int数组容器
static void SetIntArr_STL(std::string name,int idx,int value);
static void SetFloatArr_STL(std::string name,int idx, FLOAT value);
static void SetStringArr_STL(std::string name,int idx,std::string value);
static void SetBoolArr_STL(std::string name,int idx,BOOL value);
//获取 Int数组容器
static int GetIntArr_STL(std::string name, int idx);
static FLOAT GetFloatArr_STL(std::string name, int idx);
static std::string GetStringArr_STL(std::string name, int idx);
static BOOL GetBoolArr_STL(std::string name, int idx);
#endif
//龙盒
#if defined DRAGONBOX_SWITCH
static void SyncDargonBox_STL();//同调龙盒包
static void DrawDargonBox_STL(char* Buffer);//设置龙盒包
static int SelectDargonBox_STL(int Type,int Index = 0);//获取龙盒包
static void DrawDargonModel_STL(int Value);//设置龙盒模式
static int SelectDargonModel_STL(int Type);//获取龙盒模式
#endif
};