This commit is contained in:
Lenheart 2022-04-01 20:02:04 +08:00
parent ab9555996d
commit 01a3e912bf
2 changed files with 60 additions and 26 deletions

View File

@ -739,7 +739,6 @@ static int Set_STL(uint32_t v)
return 1;
}
//new 잚謹휭포
static int New_STL(uint32_t v)
{
@ -797,6 +796,38 @@ static int New_STL(uint32_t v)
return 1;
}
//时间容器
int squirrel::Timer_STL(uint32_t v)
{
char* Name;
int Type;
int ParameterNum = SQGetTop(v);
if (ParameterNum == 3)
{
//获取容器名字
SQGetStringc(v, 2, &Name);
//获取容器类型
SQGetInt(v, 3, &Type);
if (STL::Check_STL(Name, Type) != 0)
{
SQPushBool(v, false);
return 1;
}
switch (Type)
{
case 0:
Int_STL[Name] = 0;//单Int容器
break;
}
SQPushBool(v, true);
}
else
{
SQPushBool(v, false);
}
return 1;
}
//谿꼍 질분鑒앴관
static int Sync_Dragon_Pack(uint32_t v)
{
@ -936,35 +967,35 @@ void squirrel::RegisterNutApi(const wchar_t* funcName, void* funcAddr, uint32_t
void squirrel::R_Register_Nut()
{
RegisterNutApi(L"L_sq_Test", sq_Test);
RegisterNutApi(L"L_sq_GetCharacterAttribute", GetCharacterAttribute);
RegisterNutApi(L"L_sq_SetCharacterAttribute", SetCharacterAttribute);
RegisterNutApi(L"L_sq_GetTownIndex", GetTownIndex);
RegisterNutApi(L"L_sq_GetRegionIndex", GetRegionIndex);
RegisterNutApi(L"L_sq_GetTownXpos", GetTownXpos);
RegisterNutApi(L"L_sq_GetTownYpos", GetTownYpos);
RegisterNutApi(L"L_sq_GetFatigue", GetFatigue);
RegisterNutApi(L"L_sq_GetExp", GetExp);
RegisterNutApi(L"L_sq_GetCharacterAttribute", GetCharacterAttribute);//获取人物或装备属性
RegisterNutApi(L"L_sq_SetCharacterAttribute", SetCharacterAttribute);//设置人物或装备属性
RegisterNutApi(L"L_sq_GetTownIndex", GetTownIndex);//获取城镇编号
RegisterNutApi(L"L_sq_GetRegionIndex", GetRegionIndex);//获取区域编号
RegisterNutApi(L"L_sq_GetTownXpos", GetTownXpos);//获取城镇X坐标
RegisterNutApi(L"L_sq_GetTownYpos", GetTownYpos);//获取城镇Y坐标
RegisterNutApi(L"L_sq_GetFatigue", GetFatigue);//获取疲劳值
RegisterNutApi(L"L_sq_GetExp", GetExp);//获取经验值
RegisterNutApi(L"L_sq_SendPackType", SendPackType);
RegisterNutApi(L"L_sq_SendPackByte", SendPackByte);
RegisterNutApi(L"L_sq_SendPackWord", SendPackWord);
RegisterNutApi(L"L_sq_SendPackDWord", SendPackDWord);
RegisterNutApi(L"L_sq_SendPack", SendPack);
RegisterNutApi(L"L_sq_GivePlayerItem", GivePlayerItem);
RegisterNutApi(L"L_sq_GivePlayerEqu", GivePlayerEqu);
RegisterNutApi(L"L_sq_GoDungeon", GoDungeon);
RegisterNutApi(L"L_sq_GoTown", GoTown);
RegisterNutApi(L"L_sq_Dofile", LDofile);
RegisterNutApi(L"L_cout", Lcout);
RegisterNutApi(L"L_NewWindows", NewWindows);
RegisterNutApi(L"L_SetSlot", SetSlot);
RegisterNutApi(L"L_sq_SendPackType", SendPackType);//发包类型
RegisterNutApi(L"L_sq_SendPackByte", SendPackByte);//包数据Byte
RegisterNutApi(L"L_sq_SendPackWord", SendPackWord);//包数据Word
RegisterNutApi(L"L_sq_SendPackDWord", SendPackDWord);//包数据DWord
RegisterNutApi(L"L_sq_SendPack", SendPack);//发包
RegisterNutApi(L"L_sq_GivePlayerItem", GivePlayerItem);//给用户物品
RegisterNutApi(L"L_sq_GivePlayerEqu", GivePlayerEqu);//给用户装备
RegisterNutApi(L"L_sq_GoDungeon", GoDungeon);//去副本
RegisterNutApi(L"L_sq_GoTown", GoTown);//去城镇
RegisterNutApi(L"L_sq_Dofile", LDofile);//加密读取
RegisterNutApi(L"L_cout", Lcout);//输出公告
RegisterNutApi(L"L_NewWindows", NewWindows);//创建窗口
RegisterNutApi(L"L_SetSlot", SetSlot);//设置槽坐标
RegisterNutApi(L"L_New_STL", New_STL);
RegisterNutApi(L"L_Set_STL", Set_STL);
RegisterNutApi(L"L_Get_STL", Get_STL);
RegisterNutApi(L"L_New_STL", New_STL);//新建容器
RegisterNutApi(L"L_Set_STL", Set_STL);//设置容器
RegisterNutApi(L"L_Get_STL", Get_STL);//获取容器
RegisterNutApi(L"L_Timer_STL", Timer_STL);//获取容器
RegisterNutApi(L"L_Get_DragonModel", Get_DragonModel);//삿혤질분친駕
RegisterNutApi(L"L_Set_DragonModel", Set_DragonModel);//<2F>零질분친駕

View File

@ -145,6 +145,9 @@ public:
static int SQdofile(uint32_t v, const wchar_t* filename, bool retval, bool printerror);
public://容器类接口
static int Timer_STL(uint32_t v);//时间容器
public:
//新增nut接口funcName绑定C语言函数funcAddr