1
This commit is contained in:
258
Project/Luke/Rindro_Luke_PartyApplyJoin.nut
Normal file
258
Project/Luke/Rindro_Luke_PartyApplyJoin.nut
Normal file
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_PartyApplyJoin.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_PartyApplyJoin.nut
|
||||
创建日期:2024-07-16 21:54
|
||||
文件用途:卢克玩家申请加入攻坚队
|
||||
*/
|
||||
class Rindro_LukeApplyJoinC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//角色对象
|
||||
Charc = null;
|
||||
//角色等级
|
||||
Level = "100级";
|
||||
//角色名称
|
||||
Name = "凌众K";
|
||||
//角色职业
|
||||
Job = 0;
|
||||
//角色决斗等级
|
||||
PvpLevel = 1;
|
||||
//职业名称
|
||||
JobName = "大暗黑天";
|
||||
//角色复活币
|
||||
Coin = "139个";
|
||||
//角色疲劳值
|
||||
Fatigue = "156";
|
||||
//战斗力
|
||||
Combat = "170051206";
|
||||
//通过次数
|
||||
ClearanceCount = 63;
|
||||
//玩家世界Session
|
||||
PlayerSession = 0;
|
||||
|
||||
//请求者信息集合
|
||||
RequestJoinTeamArr = null;
|
||||
NowSelectJoinIndex = 0;
|
||||
|
||||
//角色头像集合
|
||||
AvatarArr = null;
|
||||
|
||||
//初始化Flag
|
||||
InitFlag = false;
|
||||
|
||||
//X Y 裁切开始X Y 裁切结束X Y
|
||||
OffsetArr = [
|
||||
//男鬼剑士
|
||||
[56, 112, 220, 222],
|
||||
//女格斗家
|
||||
[54, 103, 240, 278],
|
||||
//男神枪手
|
||||
[55, 130, 236, 246],
|
||||
//女魔法师
|
||||
[57, 88, 234, 291],
|
||||
//男圣职者
|
||||
[57, 124, 208, 190],
|
||||
//女神枪手
|
||||
[56, 119, 226, 209],
|
||||
//暗夜使者
|
||||
[56, 117, 225, 212],
|
||||
//男格斗家
|
||||
[56, 118, 233, 212],
|
||||
//男魔法师
|
||||
[54, 103, 236, 276],
|
||||
//黑暗武士
|
||||
[56, 112, 220, 222],
|
||||
//缔造者
|
||||
[57, 88, 234, 291],
|
||||
]
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
RequestJoinTeamArr = [];
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
}
|
||||
|
||||
function InitInfo() {
|
||||
local InfoObj = RequestJoinTeamArr[NowSelectJoinIndex];
|
||||
Charc = InfoObj.Charc;
|
||||
//角色等级
|
||||
Level = InfoObj.Level;
|
||||
//角色名称
|
||||
Name = InfoObj.Name;
|
||||
//角色职业
|
||||
Job = InfoObj.Job;
|
||||
//角色决斗等级
|
||||
PvpLevel = InfoObj.PvpLevel;
|
||||
//职业名称
|
||||
JobName = InfoObj.JobName;
|
||||
//角色复活币
|
||||
Coin = InfoObj.Coin + "个";
|
||||
//角色疲劳值
|
||||
Fatigue = InfoObj.Fatigue.tostring();
|
||||
//战斗力
|
||||
Combat = InfoObj.Combat;
|
||||
//通过次数
|
||||
ClearanceCount = InfoObj.ClearanceCount;
|
||||
//头像
|
||||
AvatarArr = InfoObj.AvatarArr;
|
||||
//玩家世界Session
|
||||
this.PlayerSession = InfoObj.PlayerSession;
|
||||
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
InitFlag = true;
|
||||
}
|
||||
|
||||
function PopOne() {
|
||||
if (RequestJoinTeamArr.len() > 1) {
|
||||
RequestJoinTeamArr.remove(0);
|
||||
InitInfo();
|
||||
} else {
|
||||
RequestJoinTeamArr = [];
|
||||
CloseWindow();
|
||||
}
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(244, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
PopOne();
|
||||
}.bindenv(this);
|
||||
AddChild(CloseButton);
|
||||
|
||||
//冒险团按钮
|
||||
local MButton = LenheartNewUI_ButtonText(24, 114, 15, "冒险团信息");
|
||||
MButton.SetTextOffset(-13, 2);
|
||||
AddChild(MButton);
|
||||
//冒险图鉴按钮
|
||||
local FQButton = LenheartNewUI_ButtonText(95, 113, 15, "冒险图鉴");
|
||||
FQButton.State = 8;
|
||||
FQButton.SetTextOffset(-7, 2);
|
||||
AddChild(FQButton);
|
||||
//查看信息按钮
|
||||
local CButton = LenheartNewUI_ButtonText(166, 114, 15, "查看信息");
|
||||
CButton.SetTextOffset(-7, 2);
|
||||
CButton.OnClick = function() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
// obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(8);
|
||||
L_sq_SendPackWord(this.PlayerSession);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPack();
|
||||
getroottable().WindowsShowABFlag <- false; //让原生窗口置顶
|
||||
}.bindenv(this);
|
||||
AddChild(CButton);
|
||||
|
||||
//确认按钮
|
||||
local OkButton = LenheartNewUI_ButtonText(74, 192, -1, "是");
|
||||
OkButton.SetTextOffset(3, 2);
|
||||
OkButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20084003,
|
||||
teamsId = RinDro_Luke_Obj.MyRaidTeamId,
|
||||
applyCid = Charc.CID
|
||||
}
|
||||
SendPackEx(T);
|
||||
PopOne();
|
||||
}.bindenv(this);
|
||||
AddChild(OkButton);
|
||||
//拒绝按钮
|
||||
local NoButton = LenheartNewUI_ButtonText(130, 192, -1, "否");
|
||||
NoButton.SetTextOffset(3, 2);
|
||||
NoButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20084019,
|
||||
charac = Charc.CID
|
||||
}
|
||||
SendPackEx(T);
|
||||
PopOne();
|
||||
}.bindenv(this);
|
||||
AddChild(NoButton);
|
||||
|
||||
//左翻页按钮
|
||||
local LeftButton = LenheartNewUI_BaseButton(90, 220, 15, 15, "interface/lenheartwindowcommon.img", 34);
|
||||
LeftButton.OnClick = function() {
|
||||
if (NowSelectJoinIndex > 0) NowSelectJoinIndex--;
|
||||
InitInfo();
|
||||
}.bindenv(this);
|
||||
AddChild(LeftButton);
|
||||
|
||||
//右翻页按钮
|
||||
local RightButton = LenheartNewUI_BaseButton(154, 220, 15, 15, "interface/lenheartwindowcommon.img", 38);
|
||||
RightButton.OnClick = function() {
|
||||
if (NowSelectJoinIndex< RequestJoinTeamArr.len() - 1) NowSelectJoinIndex++;
|
||||
InitInfo();
|
||||
}.bindenv(this);
|
||||
AddChild(RightButton);
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
if (!InitFlag) return;
|
||||
//标题栏
|
||||
L_sq_DrawButton(X - 2, Y, 252, "interface/lenheartwindowcommon.img", 609, 2, 7);
|
||||
//绘制窗口名字
|
||||
L_sq_DrawCode("攻坚队申请", X + 100, Y + 4, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y + 16, 240, 200, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
//绘制背景
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 15, X + 6, Y + 22);
|
||||
//绘制角色背景
|
||||
L_sq_DrawImg("hud/fiendwarl.img", 14, X + 8, Y + 40);
|
||||
//绘制角色头像
|
||||
if (AvatarArr) {
|
||||
foreach(AvatarObj in AvatarArr) {
|
||||
local AXpos = AvatarObj.F[0][2] + X + OffsetArr[Job][0] - 8;
|
||||
local AYpos = AvatarObj.F[0][3] + Y + OffsetArr[Job][1] + 40;
|
||||
setClip(AXpos + OffsetArr[Job][2], AYpos + OffsetArr[Job][3], AXpos + OffsetArr[Job][2] + 22, AYpos + OffsetArr[Job][3] + 18); //开始裁切
|
||||
L_sq_DrawImg("character/" + AvatarObj.B + ".img", AvatarObj.F[0][0], AXpos, AYpos);
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
}
|
||||
//绘制角色等级
|
||||
L_sq_DrawCode(Level, X + 78 - LenheartTextClass.GetStringLength(Level) / 2, Y + 45, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制角色名字
|
||||
L_sq_DrawCode(Name, X + 137 - LenheartTextClass.GetStringLength(Name) / 2, Y + 45, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制角色职业类型图标
|
||||
if (Job != 4) L_sq_DrawImg("hud/fiendwarl.img", 16, X + 176, Y + 43);
|
||||
//绘制角色职业名称
|
||||
L_sq_DrawCode(JobName, X + 224 - LenheartTextClass.GetStringLength(JobName) / 2, Y + 45, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X + 21, Y + 65, 30, 30, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
L_sq_DrawWindow(X + 62, Y + 65, 156, 30, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
//绘制决斗等级
|
||||
local PvpImg = PvpLevel / 6;
|
||||
L_sq_DrawImg("hud/fiendwarl1.img", 99, X + 25, Y + 74);
|
||||
L_sq_DrawCode(PvpLevel.tostring(), X + 45 - LenheartTextClass.GetStringLength(PvpLevel.tostring()) / 2, Y + 91, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制各项信息
|
||||
L_sq_DrawCode("复活币:", X + 70, Y + 76, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
L_sq_DrawCode(Coin, X + 134 - LenheartTextClass.GetStringLength(Coin) / 2, Y + 76, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
L_sq_DrawCode("疲劳值:", X + 158, Y + 76, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
L_sq_DrawCode(Fatigue, X + 216 - LenheartTextClass.GetStringLength(Fatigue) / 2, Y + 76, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
L_sq_DrawCode("战斗力:", X + 70, Y + 93, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
L_sq_DrawCode(Combat, X + 170 - LenheartTextClass.GetStringLength(Combat) / 2, Y + 93, sq_RGBA(74, 162, 86, 255), 0, 1);
|
||||
L_sq_DrawCode("通关卢克攻坚战" + ClearanceCount + "次", X + 130 - LenheartTextClass.GetStringLength("通关卢克攻坚战" + ClearanceCount + "次") / 2, Y + 144, sq_RGBA(221, 213, 147, 255), 0, 1);
|
||||
L_sq_DrawCode("申请加入攻坚队。", X + 87, Y + 160, sq_RGBA(160, 132, 75, 255), 0, 1);
|
||||
L_sq_DrawCode("请确定是否同意?", X + 87, Y + 176, sq_RGBA(160, 132, 75, 255), 0, 1);
|
||||
|
||||
L_sq_DrawWindow(X + 77, Y + 216, 100, 20, "interface/lenheartwindowcommon.img", 204, 4, 14, 4, 14);
|
||||
//绘制页数
|
||||
local Str = (NowSelectJoinIndex + 1) + " / " + RequestJoinTeamArr.len();
|
||||
L_sq_DrawCode(Str, X + 137 - LenheartTextClass.GetStringLength(Str) / 2, Y + 222, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user