毁梦更新

This commit is contained in:
lenheart
2025-12-31 15:27:22 +08:00
parent f58fc1e30e
commit ea5d573cde
5 changed files with 421 additions and 66 deletions

View File

@@ -28,7 +28,6 @@ Cb_MyDisPatcher_DisJointItem_disjoint_Enter_Func["茶服自定义分解机"] <-
if (Sq_CallFunc(S_Ptr("0x81424E8"), "int", ["pointer"], v9)) return null;
}
ChaFuCustomDecompositionFixFlag = true;
//跳过原逻辑
Sq_WriteByteArr(S_Ptr("0x81F92D0"), Haker.AsmGenerateMcd(
@@ -42,6 +41,8 @@ Cb_MyDisPatcher_DisJointItem_disjoint_Enter_Func["茶服自定义分解机"] <-
try {
HandleDisjointRequest(SelfUser, args[1], args[2], args[3], OthersUser, args[5]);
} catch (exception){
print("error:")
print(exception)
Sq_CallFunc(S_Ptr("0x0867bf42"), "int", ["pointer", "int", "char"], SelfUser.C_Object, args[3], 19);
Sq_CallFunc(S_Ptr("0x0867bf42"), "int", ["pointer", "int", "char"], OthersUser.C_Object, args[3], 19);
}
@@ -321,10 +322,11 @@ function HandleDisjointRequest(MyUser, EquStol, Inventype, HeadId, ObjUser, Chan
// 添加物品到玩家背包
// 参数说明:玩家对象, 物品ID, 数量, 类型(6=直接添加), 物品空间指针, 标志位(0)
local slot = MyUser.GiveItem(itemId, itemCount);
// local slot = MyUser.GiveItem(itemId, itemCount);
local slot = Sq_CallFunc(S_Ptr("0x867B6D4"), "int", ["pointer", "int", "int", "int", "pointer", "int"], MyUser.C_Object, itemId, itemCount, 6, item_space.C_Object, 0);
// 将物品信息写入数据包
PackObject.Put_Short(slot[1]); // 槽位
PackObject.Put_Short(slot); // 槽位
PackObject.Put_Int(itemId); // 物品ID
PackObject.Put_Int(itemCount); // 数量
}
@@ -438,7 +440,6 @@ function SetLevelCnt(itemId, equLevel, disjointerLevel) {
return ret;
}
}
// 确保至少返回1个
return baseCount > 0 ? baseCount : 1;
}