1111
This commit is contained in:
parent
99d1e4e300
commit
ba3f6c0325
20
test/STL.h
20
test/STL.h
|
|
@ -33,13 +33,22 @@ 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;
|
||||
|
||||
|
||||
ifdenf DRAGONBOX_SWITCH
|
||||
//녜쉽 잚謹써뭐竟
|
||||
struct Dargonresult
|
||||
{
|
||||
int ItemIndex;
|
||||
int ItemNum;
|
||||
int ItemGrade;
|
||||
};
|
||||
//질분써뭐竟
|
||||
struct DargonMap
|
||||
{
|
||||
int LuckyValue;
|
||||
|
|
@ -47,14 +56,11 @@ struct DargonMap
|
|||
int sync;
|
||||
int box_num;
|
||||
};
|
||||
//질분榴檄Map
|
||||
static std::map<std::string, DargonMap>DargonState_STL;
|
||||
//질분친駕Map
|
||||
static std::map<std::string, int>DargonModel_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;
|
||||
|
||||
ifndef
|
||||
|
||||
class STL
|
||||
{
|
||||
|
|
|
|||
|
|
@ -268,6 +268,25 @@ int squirrel::SendPackDWord(uint32_t v)
|
|||
SQPushInt(v, 1);
|
||||
return 1;
|
||||
}
|
||||
//发包wchar_t* (转了char*)
|
||||
int squirrel::SendPackWChar(uint32_t v)
|
||||
{
|
||||
wchar_t* n1;
|
||||
|
||||
SQGetString(v, 2, &n1);
|
||||
std::wcout << u8"字符串值为:" << n1 << std::endl;
|
||||
|
||||
//wchar_t* 转 char*
|
||||
int size = wcslen(n1);
|
||||
char* fname = (char*)new char[size];
|
||||
DNFTOOL::UnicodeToAnsi(n1, fname, size);
|
||||
fname[size] = '\0';
|
||||
std::cout << u8"字符串值为:" << fname << std::endl;
|
||||
_SendPacksChar(*_SendClass, 0, fname, strlen(fname));
|
||||
|
||||
SQPushInt(v, 1);
|
||||
return 1;
|
||||
}
|
||||
//发包
|
||||
int squirrel::SendPack(uint32_t v)
|
||||
{
|
||||
|
|
@ -1065,6 +1084,7 @@ void squirrel::R_Register_Nut()
|
|||
RegisterNutApi(L"L_sq_SendPackByte", squirrel::SendPackByte);//包数据Byte
|
||||
RegisterNutApi(L"L_sq_SendPackWord", squirrel::SendPackWord);//包数据Word
|
||||
RegisterNutApi(L"L_sq_SendPackDWord", squirrel::SendPackDWord);//包数据DWord
|
||||
RegisterNutApi(L"L_sq_SendPackWChar", squirrel::SendPackWChar);//包数据DWord
|
||||
RegisterNutApi(L"L_sq_SendPack", squirrel::SendPack);//发包
|
||||
RegisterNutApi(L"L_sq_GivePlayerItem", squirrel::GivePlayerItem);//给用户物品
|
||||
RegisterNutApi(L"L_sq_GivePlayerEqu", squirrel::GivePlayerEqu);//给用户装备
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ public://
|
|||
static int SendPackByte(uint32_t v);//发包Byte
|
||||
static int SendPackWord(uint32_t v);//发包Word
|
||||
static int SendPackDWord(uint32_t v);//发包DWord
|
||||
static int SendPackWChar(uint32_t v);//发包char*
|
||||
static int SendPack(uint32_t v);//发包
|
||||
|
||||
static int GivePlayerItem(uint32_t v);//发物品给玩家
|
||||
|
|
|
|||
Loading…
Reference in New Issue