修复装备融合BUG 装备继承半程进度

This commit is contained in:
2025-12-17 10:48:30 +08:00
6 changed files with 300 additions and 36 deletions

67
Base/_Tool/Item_Class.nut Normal file
View File

@@ -0,0 +1,67 @@
class Rindro_Item {
C_Object = null;
constructor() {
}
function LoadById(Index) {
local itemBuffer = Memory.alloc(0xD0);
L_Sq_CallFunc(0x65DE50, "pointer", FFI_FASTCALL, ["pointer", "int"], itemBuffer.C_Object, 0); //Fastcall 补位
C_Object = L_Sq_CallFunc(0x972220, "int", FFI_MS_CDECL, ["int", "pointer", "int"], Index, itemBuffer.C_Object, 1); //ID 后面的1未知
}
function LoadByAddress(Address) {
C_Object = Address;
}
//获取ID
function GetIndex() {
return NativePointer(C_Object).add(0x1C).readInt();
}
//设置ID
function SetIndex(Index) {
NativePointer(C_Object).add(0x1C).writeInt(Index);
}
//获取强化值
function GetUpgrade() {
return MemoryTool.DecodeMemoryData(C_Object + 0x1054);
}
//设置强化值
function SetUpgrade(Upgrade) {
MemoryTool.EncodeMemoryData(C_Object + 0x1054, Upgrade);
}
//获取增幅属性
function GetAmplification() {
return MemoryTool.DecodeMemoryData(C_Object + 0x10A8);
}
//设置增幅属性
function SetAmplification(Amplification) {
MemoryTool.EncodeMemoryData(C_Object + 0x10A8, Amplification);
}
//获取锻造等级
function GetForging() {
return MemoryTool.DecodeMemoryData(C_Object + 0x10E8);
}
//设置锻造等级
function SetForging(Forging) {
MemoryTool.EncodeMemoryData(C_Object + 0x10E8, Forging);
}
//获取锻造属性
function GetForgingAttribute() {
return MemoryTool.DecodeMemoryData(C_Object + 0xE1C);
}
//设置锻造属性
function SetForgingAttribute(ForgingAttribute) {
MemoryTool.EncodeMemoryData(C_Object + 0xE1C, ForgingAttribute);
}
//获取附魔卡片ID
function GetEnchanting() {
return MemoryTool.DecodeMemoryData(C_Object + 0x1084);
}
//设置附魔卡片ID
function SetEnchanting(Enchanting) {
MemoryTool.EncodeMemoryData(C_Object + 0x1084, Enchanting);
}
}