更新茶服加密
This commit is contained in:
108
Project/Trainingroom/Trainingroom.nut
Normal file
108
Project/Trainingroom/Trainingroom.nut
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
文件名:Trainingroom.nut
|
||||
路径:Project/Trainingroom/Trainingroom.nut
|
||||
创建日期:2025-12-11 01:20
|
||||
文件用途:
|
||||
*/
|
||||
class TrainingroomC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
// NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
// Visible = false;
|
||||
|
||||
//位移修炼场信息
|
||||
MoveTrainingroomInfo = null;
|
||||
//位移修炼场Flag
|
||||
MoveTrainingroomFlag = false;
|
||||
//位移修炼场副本编号
|
||||
MoveTrainingroomDungeonId = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
InitPvf();
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
// //关闭按钮
|
||||
// local CloseButton = LenheartNewUI_BaseButton(278, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
// CloseButton.OnClick = function() {
|
||||
// this.Visible = false;
|
||||
// }.bindenv(this);
|
||||
// Childrens.append(CloseButton);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
|
||||
|
||||
//判断自己是否在需要位移修炼场的区域
|
||||
if (sq_GetCurrentModuleType() == 1) {
|
||||
if (MoveTrainingroomInfo) {
|
||||
if (L_sq_GetTownIndex() == MoveTrainingroomInfo[0] && L_sq_GetRegionIndex() == MoveTrainingroomInfo[1] && L_sq_GetTownXpos() >= MoveTrainingroomInfo[2] && L_sq_GetTownXpos() <= (MoveTrainingroomInfo[2] + MoveTrainingroomInfo[4]) && L_sq_GetTownYpos() >= MoveTrainingroomInfo[3] && L_sq_GetTownYpos() <= (MoveTrainingroomInfo[3] + MoveTrainingroomInfo[5])) {
|
||||
if (!MoveTrainingroomFlag) {
|
||||
MoveTrainingroomFlag = true;
|
||||
L_sq_GoDungeon(MoveTrainingroomDungeonId);
|
||||
}
|
||||
} else {
|
||||
if (MoveTrainingroomFlag) {
|
||||
MoveTrainingroomFlag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function InitPvf() {
|
||||
Rindro_Script.GetFileData("etc/trainingroom.etc", function(DataTable, Data) {
|
||||
while (!Data.Eof()) {
|
||||
local Fragment = Data.Get();
|
||||
if (Fragment == "[area]") {
|
||||
MoveTrainingroomInfo = [Data.Get(), Data.Get(), Data.Get(), Data.Get(), Data.Get(), Data.Get()];
|
||||
} else if (Fragment == "[dungeon]") {
|
||||
MoveTrainingroomDungeonId = Data.Get();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
L_Windows_List <- [];
|
||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
getroottable().rawdelete("EventList_Obj")
|
||||
getroottable().rawdelete("Trainingroom_Obj");
|
||||
|
||||
function Lenheart_Trainingroom_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("Trainingroom_Obj")) {
|
||||
RootTab.rawset("Trainingroom_Obj", true);
|
||||
LenheartNewUI_CreateWindow(TrainingroomC, "修炼场窗口", ((getroottable().Rindro_Scr_Width - 405) / 2).tointeger(), 64, 405, 372, 28);
|
||||
}
|
||||
}
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("TrainingroomFuncN", Lenheart_Trainingroom_Fun);
|
||||
Reference in New Issue
Block a user