no message

This commit is contained in:
2025-11-08 12:21:06 +08:00
parent e195b0f168
commit 204151d95c
82 changed files with 151530 additions and 12 deletions

View File

@@ -42,7 +42,14 @@ class HudUiC extends LenheartNewUI_Windows {
//修补内存
function FixMemory() {
printf("宽屏UI已加载!");
printf("宽屏UI已加载!");
printf("宽屏UI已加载!");
printf("宽屏UI已加载!");
printf("宽屏UI已加载!");
printf("宽屏UI已加载!");
printf("宽屏UI已加载!");
L_sq_WAB(0x400E10, 9);
L_sq_WAB(0x400E11, 4);
L_sq_WAB(0x400E12, 7);
@@ -53,6 +60,7 @@ class HudUiC extends LenheartNewUI_Windows {
L_sq_WAB(0x400E17, 7);
L_sq_WAB(0x400E18, 0);
return;
// 干掉nut初始化基础技能栏坐标
L_sq_WAB(0x4B3239, 0xEB);
@@ -192,7 +200,7 @@ class HudUiC extends LenheartNewUI_Windows {
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
FixMemory();
return;
local BallFrameArr = [];
for (local i = 0; i< 120; i++) {
local T = {
@@ -628,6 +636,7 @@ class HudUiC extends LenheartNewUI_Windows {
function TopShow(obj) {
return;
//血蓝球悬停逻辑
BallRectLogic(obj);
//经验条悬停逻辑
@@ -636,12 +645,14 @@ class HudUiC extends LenheartNewUI_Windows {
}
function BottomShow(obj) {
return;
DrawMain(obj);
LenheartNewUI_Windows.Show(obj);
}
//动态窗口设置逻辑
function Active_Windows_SyncPos() {
return;
//任务快捷导航窗口
{
local WindowAddress = L_sq_GetWindowById(1);
@@ -651,6 +662,7 @@ class HudUiC extends LenheartNewUI_Windows {
//逻辑入口
function Proc(obj) {
return;
LenheartNewUI_Windows.SyncPos(X, Y);
Active_Windows_SyncPos();
}

View File

@@ -12,8 +12,9 @@ class NpcTransactionC extends LenheartNewUI_Windows {
// NoWindow = true;
//是否可见
// Visible = false;
Visible = false;
NPCPath = null;
EquList = null;
NPCList = null;
Dialog = null;
@@ -41,8 +42,15 @@ class NpcTransactionC extends LenheartNewUI_Windows {
CurNpcId = -1;
NPCAvatar = null;
//当前交易NPC头像信息
CurNpcAvatar = null;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
NPCAvatar = {};
//注册控件
RegisterWidget();
@@ -81,7 +89,7 @@ class NpcTransactionC extends LenheartNewUI_Windows {
if (Jso.rawin("glod")) {
TransactionGlod = Jso.glod;
}
if(Jso.rawin("equ")){
if (Jso.rawin("equ")) {
TransactionEqu = Jso.equ;
}
}.bindenv(this));
@@ -115,7 +123,7 @@ class NpcTransactionC extends LenheartNewUI_Windows {
CloseWindow();
}.bindenv(this);
ConfirmButton.SetCallBackFunc(function(Btn) {
if (mode >= 1 && mode < 3) {
if (mode >= 1 && mode< 3) {
Btn.Visible = true;
} else {
Btn.Visible = false;
@@ -146,9 +154,11 @@ class NpcTransactionC extends LenheartNewUI_Windows {
L_sq_DrawCode("Lv." + PlayerLevel.tostring(), X + 46, Y + 185, sq_RGBA(179, 169, 135, 255), 0, 1);
L_sq_DrawCode(PlayerName, X + 46, Y + 196, sq_RGBA(179, 169, 135, 255), 0, 1);
L_sq_DrawImg("map/npc/npcface02.img", 5, X + 20, Y + 44);
L_sq_DrawCode("Lv.99", X + 46, Y + 41, sq_RGBA(179, 169, 135, 255), 0, 1);
L_sq_DrawCode(NpcName, X + 46, Y + 53, sq_RGBA(179, 169, 135, 255), 0, 1);
if (CurNpcAvatar) {
L_sq_DrawImg(CurNpcAvatar.Path, CurNpcAvatar.Index, X + 20, Y + 44);
L_sq_DrawCode(CurNpcAvatar.Name, X + 46, Y + 47, sq_RGBA(179, 169, 135, 255), 0, 1);
}
//置换装备
@@ -162,7 +172,7 @@ class NpcTransactionC extends LenheartNewUI_Windows {
}
//交易装备
if(TransactionEqu){
if (TransactionEqu) {
DrawItemBase(X + 122, Y + 98, TransactionEqu, 1);
}
@@ -248,7 +258,7 @@ class NpcTransactionC extends LenheartNewUI_Windows {
}
Dialog.append(T);
}
}else if (Fragment == "[value]") {
} else if (Fragment == "[value]") {
while (true) {
local Fbuf = Data.Get();
if (Fbuf == "[/value]") {
@@ -260,6 +270,15 @@ class NpcTransactionC extends LenheartNewUI_Windows {
}
}
});
NPCPath = {};
Rindro_Script.GetFileData("npc/npc.lst", function(DataTable, Data) {
while (!Data.Eof()) {
local Id = Data.Get();
local Path = "npc/" + Data.Get().tolower();
NPCPath.rawset(Id, Path);
}
});
}
function RegNpc() {
@@ -311,8 +330,33 @@ class NpcTransactionC extends LenheartNewUI_Windows {
}
}
function GetNpcAvatar(Id) {
if (NPCAvatar.rawin(Id)) return NPCAvatar[Id];
//获取NPC路径
local Path = NPCPath.rawget(CurNpcId);
local Info = Rindro_Script.GetFileData(Path, function(DataTable, Data) {
while (!Data.Eof()) {
local Fragment = Data.Get();
if (Fragment == "[popup face]") {
DataTable.ImgPath <- Data.Get().tolower();
DataTable.Index <- Data.Get();
} else if (Fragment == "[name]") {
DataTable.Name <- Sq_ConvertWideChar(Data.Get(), "big5");
}
}
});
NPCAvatar.rawset(Id, {
Path = Info.ImgPath,
Index = Info.Index,
Name = Info.Name
});
return NPCAvatar[Id];
}
function InitWindow() {
//TODO 读NPC头像 读NPC名字
CurNpcAvatar = GetNpcAvatar(CurNpcId);
Visible = true;
}
}