2 Commits

Author SHA1 Message Date
9994938088 chore: 更新子项目提交记录为dirty状态 2026-05-06 16:43:48 +08:00
70376c380e refactor: 清理代码格式并修复拼写错误
移除多余空行并修正Timer.SetTimeOut方法名拼写
调整随机数生成范围避免数组越界
添加调试打印语句用于测试
2026-05-03 19:59:02 +08:00
4 changed files with 37 additions and 6 deletions

View File

@@ -115,10 +115,22 @@ Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) {
Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
SUser.SendItemWindowNotification([[33900, 1]]);
local State = Sq_CallFunc(S_Ptr("0x080da38c"), "int", ["pointer"], SUser.C_Object);
if (State <= 2) {
SUser.SendNotiPacketMessage("already in select character state", 8);
return;
}
SUser.SendNotiPacketMessage("return select character after 1 second", 7);
Timer.SetTimeOut(function(SUser) {
local State = Sq_CallFunc(S_Ptr("0x080da38c"), "int", ["pointer"], SUser.C_Object);
if (State > 2) {
Sq_CallFunc(S_Ptr("0x08686fee"), "void", ["pointer", "bool"], SUser.C_Object, true);
Sq_CallFunc(S_Ptr("0x08651740"), "void", ["pointer"], SUser.C_Object);
}
}, 1, SUser);
}
Timer.SetTimeOut(function() {
// _Dps_Equ2AvaJewel_Main_()

View File

@@ -140,6 +140,24 @@ class StealSystem {
RequestCache[cid].rawset(npcId, 2);
}.bindenv(this));
ClientSocketPackFuncMap.rawset(21017005, function(SUser, Jso) {
local InvenObj = SUser.GetInven();
local itemSlot = InvenObj.GetSlotById(UseItem);
if (itemSlot == -1) {
SUser.SendJso({
op = 21017006,
ret = false
});
return;
}
else{
InvenObj.DeleteItemCount(UseItem, 1);
SUser.SendNotiPacketMessage("密码错误,已消耗一个材料!", 8);
}
}.bindenv(this));
}
function InitDailyResetTask() {
@@ -187,7 +205,7 @@ class StealSystem {
function GetRandomGroupName() {
local groupNames = ["normal", "rarity", "epic"];
return groupNames[MathClass.Rand(0, groupNames.len() - 1)];
return groupNames[MathClass.Rand(0, groupNames.len())];
}
function RollRewardFromGroup(GroupData) {

View File

@@ -336,6 +336,7 @@ class FatalismStone {
function RegisterDebugCmd() {
Gm_InputFunc_Handle["给魂石"] <- function(SUser, CmdString) {
print(123123);
local count = -1;
local pos = 0;
local handler = [];

View File

@@ -53,7 +53,7 @@ function _Dps_OneClickDisassemblyOfRoll_Logic_() {
SUser.SendNotiPacketMessage("装备分解失败,道具已返还", 8);
}
if (Config["是否返还分解券道具(true代表返还,false代表不返还)"]) {
Timer.setTimeout(function() {
Timer.SetTimeOut(function() {
SUser.GiveItem(ItemId, 1);
}, 1);
}