This commit is contained in:
2024-11-15 10:32:19 +08:00
parent c1df659af4
commit e1528c41bb
35 changed files with 6343 additions and 62 deletions

View File

@@ -336,7 +336,7 @@ class Lenheart_Character_Info_ClassC extends LenheartNewUI_Windows {
GetMyInfoFlag = false;
}
if (!WindowX || !OldWindowAddress) return;
if (!WindowX) return;
if (!GetMyInfoFlag) {
GetMyInfoFlag = true;
@@ -347,41 +347,39 @@ class Lenheart_Character_Info_ClassC extends LenheartNewUI_Windows {
SendPackEx(T);
}
X = L_sq_RA(OldWindowAddress + 0x14);
Y = L_sq_RA(OldWindowAddress + 0x18);
X = Base_X;
Y = Base_Y;
}
Base_X = 0;
Base_Y = 0;
OldWindowAddress = null;
function SyncState(Address) {
local WindowX = sq_GetPopupWindowMainCotrol(74);
local WindowAddress = L_sq_GetWindowById(74);
if (!WindowX || !WindowAddress) return false;
//确定是个人信息窗口才执行逻辑 并且返回true 不执行原逻辑
if (Address - WindowAddress <= 0x50000 && L_sq_RA(Address + 0x34) == 4089) {
OldWindowAddress = Address;
local obj = sq_getMyCharacter();
RealShow(obj);
Visible = true;
return true;
}
function SyncState(Args) {
Base_X = Args[0] + 800;
Base_Y = Args[1] - 174;
local obj = sq_getMyCharacter();
RealShow(obj);
Visible = true;
}
}
DrawCodeCallBackFunc.Rindro_Character_Info <- function(Args) {
if (getroottable().rawin("Lenheart_Character_Info_Class_Obj")) {
local MyWindow = getroottable().rawget("Lenheart_Character_Info_Class_Obj");
MyWindow.SyncState(Args);
}
}
//个人信息窗口逻辑
function L_Character_Info_Window(WindowObject) {
//返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
local Flag = false;
if (getroottable().rawin("Lenheart_Character_Info_Class_Obj")) {
local MyWindow = getroottable().rawget("Lenheart_Character_Info_Class_Obj");
local Ret = MyWindow.SyncState(WindowObject);
if (Ret) Flag = true;
}
return Flag;
// //返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
// local Flag = false;
// if (getroottable().rawin("Lenheart_Character_Info_Class_Obj")) {
// local MyWindow = getroottable().rawget("Lenheart_Character_Info_Class_Obj");
// local Ret = MyWindow.SyncState(WindowObject);
// if (Ret) Flag = true;
// }
// return Flag;
}
getroottable().rawdelete("Lenheart_Character_Info_Class_Obj");

View File

@@ -122,13 +122,19 @@ class Lenheart_EachC extends LenheartNewUI_Windows {
function InitNpcButton() {
Childrens = [];
if (NPC_ButtonMap.rawin(NPC_Index)) {
NPC_ButtonMap[NPC_Index](this);
foreach(Func in NPC_ButtonMap[NPC_Index]) {
Func(this);
}
}
this.Visible = true;
}
function AddEachForNpc(Index, Func) {
NPC_ButtonMap.rawset(Index, Func);
if (NPC_ButtonMap.rawin(Index)) {
NPC_ButtonMap[Index].append(Func);
return;
}
NPC_ButtonMap.rawset(Index, [Func]);
}
function RemoveEachForNpc(Index) {

View File

@@ -23,11 +23,26 @@ class R_Mouse {
function Lock() {
_Rindro_Cusor_.UseState = 1;
L_sq_WAB(0x1B46886, 1);
//技能描述窗口
Sq_Memory_WriteByteArr(L_sq_I2P(0x4CC47E), [0xE9, 0xA0, 0x00, 0x00, 0x00, 0x90]);
//物品描述窗口
Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x90, 0x90, 0x90, 0x90, 0x90, 0x90]);
//buff信息描述窗口
Sq_Memory_WriteByteArr(L_sq_I2P(0x4BF532), [0x90, 0x90, 0x90, 0x90]);
//原生商城 个人信息等按钮的悬停
L_sq_WAB(0x4C4690, 0xC3);
//活动图标的悬停
L_sq_WAB(0x11C6510, 0xC3);
}
//解锁鼠标
function UnLock() {
_Rindro_Cusor_.UseState = 0;
L_sq_WAB(0x1B46886, 0);
Sq_Memory_WriteByteArr(L_sq_I2P(0x4CC47E), [0x39, 0x05, 0xE0, 0xF6, 0xA3, 0x01]);
Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x56, 0xE8, 0x10, 0xFE, 0xFF, 0xFF]);
Sq_Memory_WriteByteArr(L_sq_I2P(0x4BF532), [0x75, 0x07, 0x32, 0xC0]);
L_sq_WAB(0x4C4690, 0x55);
L_sq_WAB(0x11C6510, 0x55);
}
//获取鼠标工作类型
function GetType() {