修复装备融合BUG 装备继承半程进度
This commit is contained in:
@@ -342,6 +342,26 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
//绘制道具带道具信息
|
||||
function DrawItemObject(X, Y, Object) {
|
||||
if (!Object) return;
|
||||
L_Sq_DrawItem(X, Y, Object.ItemId, Object.Count, 0, 0, 0);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 30, 30)) {
|
||||
//打开道具信息窗口
|
||||
if (!ItemInfoDrawS) {
|
||||
ItemInfoDrawS = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, Object.ItemAddress, 41);
|
||||
//校准道具信息窗口位置
|
||||
L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], ItemInfoDrawS, IMouse.GetXPos(), IMouse.GetYPos(), 28, 28);
|
||||
//我自己UI打开的道具信息窗口需要把渲染队列改为下层 以显示我打开的道具
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
} else {
|
||||
if (ItemInfoDrawS) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoDrawS = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制标题
|
||||
function DrawWindowTitle(Width) {
|
||||
@@ -1477,4 +1497,83 @@ class Yosin_ScrollBar {
|
||||
ScrollButton.Reset();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class LenheartNewUI_ItemSlot extends LenheartNewUI_CommonUi {
|
||||
|
||||
ItemId = null;
|
||||
ItemCount = null;
|
||||
ItemObject = null;
|
||||
ItemInfoWindow = null;
|
||||
|
||||
//禁止点击
|
||||
NoClick = false;
|
||||
|
||||
RemoveCallBack = null;
|
||||
|
||||
constructor(X, Y) {
|
||||
LenheartNewUI_CommonUi.constructor(X, Y, 30, 30);
|
||||
}
|
||||
|
||||
|
||||
function Show(obj) {
|
||||
if (ItemObject) {
|
||||
L_Sq_DrawItem(X, Y, ItemId, ItemCount, 0, 0, 0);
|
||||
if (isInRect) {
|
||||
//打开道具信息窗口
|
||||
if (!ItemInfoWindow) {
|
||||
ItemInfoWindow = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, ItemObject.C_Object, 41);
|
||||
//校准道具信息窗口位置
|
||||
L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], ItemInfoWindow, IMouse.GetXPos(), IMouse.GetYPos(), 28, 28);
|
||||
//我自己UI打开的道具信息窗口需要把渲染队列改为下层 以显示我打开的道具
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
} else {
|
||||
if (ItemInfoWindow) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoWindow = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//悬停光效
|
||||
if (isInRect) {
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
Rindro_Image_GlobalMap["lenheartui"].DrawPng(353, X - 2, Y - 2);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
}
|
||||
}
|
||||
|
||||
function SetItem(item) {
|
||||
ItemObject = item;
|
||||
ItemId = item.GetIndex();
|
||||
ItemCount = 1;
|
||||
}
|
||||
|
||||
function RemoveItem()
|
||||
{
|
||||
ItemObject = null;
|
||||
ItemId = null;
|
||||
ItemCount = null;
|
||||
}
|
||||
|
||||
function SetRemoveCallBack(Func){
|
||||
RemoveCallBack = Func;
|
||||
}
|
||||
|
||||
//鼠标右键按下回调
|
||||
function OnMouseRbDown(MousePos_X, MousePos_Y) {
|
||||
if(NoClick)return;
|
||||
if (isInRect) {
|
||||
if(ItemObject){
|
||||
ItemObject = null;
|
||||
ItemId = null;
|
||||
ItemCount = null;
|
||||
}
|
||||
if (ItemInfoWindow) {
|
||||
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
|
||||
ItemInfoWindow = null;
|
||||
}
|
||||
if(RemoveCallBack)RemoveCallBack(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
67
Base/_Tool/Item_Class.nut
Normal file
67
Base/_Tool/Item_Class.nut
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user