1
This commit is contained in:
427
Project/Luke/Rindro_Luke.nut
Normal file
427
Project/Luke/Rindro_Luke.nut
Normal file
@@ -0,0 +1,427 @@
|
||||
/*
|
||||
文件名:Rindro_Luke.nut
|
||||
路径:Project/Luke/Rindro_Luke.nut
|
||||
创建日期:2024-08-13 09:30
|
||||
文件用途:卢克
|
||||
*/
|
||||
|
||||
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_CreateParty.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_FightSituation.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_Noti.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_Party.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_PartyApplyJoin.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_PartyFormation.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_PartyHall.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_PartyInfo.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_PartyMemberInfo.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_PlayerInteractive.nut");
|
||||
dofile("sqr/Project/Luke/Rindro_Luke_Reward.nut");
|
||||
|
||||
|
||||
//卢克核心数据类
|
||||
class RinDro_Luke extends Rindro_BaseToolClass {
|
||||
//基础配置
|
||||
BaseConfig = null;
|
||||
//攻坚配置
|
||||
FightConfig = null;
|
||||
|
||||
//我的攻坚队状态
|
||||
MyRaidState = null;
|
||||
//我的攻坚队伍
|
||||
MyRaidTeam = null;
|
||||
//我的攻坚队伍ID
|
||||
MyRaidTeamId = null;
|
||||
//我的Cid
|
||||
MyCid = null;
|
||||
//我是否是攻坚队队长
|
||||
IsCaptain = null;
|
||||
//结束时间
|
||||
EndTime = null;
|
||||
//我的攻坚队攻坚阶段
|
||||
RaidStage = 0;
|
||||
//我的攻坚队伍头像存储
|
||||
Portrait = null;
|
||||
|
||||
|
||||
//卢克我的队伍窗口
|
||||
PartyWindow_Object = null;
|
||||
//攻坚战况表窗口
|
||||
FightSituationWindow_Object = null;
|
||||
//攻坚大厅窗口
|
||||
PartyHallWindow_Object = null;
|
||||
//翻牌奖励窗口
|
||||
RewardWindow_Object = null;
|
||||
//编队窗口
|
||||
PartyFormationWindow_Object = null;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//攻坚开始动画的Flag
|
||||
DrawStartAniMark = false;
|
||||
|
||||
|
||||
//请求基础信息配置
|
||||
function GetFiendwarBase() {
|
||||
local T = {
|
||||
op = 20084501,
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
//请求掉线配置信息
|
||||
function GetFiendwarDown() {
|
||||
local T = {
|
||||
op = 20084063,
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
|
||||
//基础信息配置
|
||||
function FiendwarBase(Chunk) {
|
||||
BaseConfig = Json.Decode(Chunk);
|
||||
FiendwarChannelTownLogicCallBack();
|
||||
}
|
||||
|
||||
//基础攻坚信息配置
|
||||
function LukeFightBase(Chunk) {
|
||||
FightConfig = Json.Decode(Chunk);
|
||||
}
|
||||
|
||||
//团本专属频道上线城镇移动包
|
||||
function FiendwarChannelTownLogicCallBack() {
|
||||
if (BaseConfig.channel_index.find("19")) {
|
||||
if (L_sq_GetTownIndex() != BaseConfig.town_index) {
|
||||
L_sq_MoveTown(BaseConfig.town_index, 0, 474, 249);
|
||||
}
|
||||
} else {
|
||||
//在卢克区域的 要转移回普通城镇
|
||||
if (L_sq_GetTownIndex() == BaseConfig.town_index) {
|
||||
L_sq_MoveTown(1, 1, 474, 249);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//获取攻坚队信息回调
|
||||
function GetTeamInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
local ZlibStr = Jso.ZipS;
|
||||
Jso.ZipS = Json.Decode(L_sq_Dezlib(Jso.ZipS));
|
||||
Jso.team <- Jso.ZipS.team;
|
||||
|
||||
//取的窗口对象
|
||||
local Win = PartyWindow_Object;
|
||||
Win.InfoFlag = true;
|
||||
|
||||
//如果攻坚队伍信息中已经有了角色成员 清空成员对象集合
|
||||
for (local i = 0; i< Win.Childrens.len(); i++) {
|
||||
local Cobj = Win.Childrens[i];
|
||||
if (Cobj instanceof Rindro_LukePartyInfoMemberC) {
|
||||
Win.Childrens.remove(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
//重置成员数组
|
||||
Win.MembersList = [];
|
||||
|
||||
//清空是否为我的队伍状态
|
||||
Win.IsMyTeam = false;
|
||||
//清空是否为队长状态
|
||||
Win.IsCaptain = false;
|
||||
//赋值队伍名称
|
||||
Win.TeamName = Jso.team.TeamName;
|
||||
//赋值队伍ID
|
||||
Win.TeamID = Jso.team.TeamId;
|
||||
|
||||
//还原头像
|
||||
Portrait = {};
|
||||
//遍历Team包 用于构造队伍窗口中的每一位成员
|
||||
foreach(_index, MemberObj in Jso.team.characNum) {
|
||||
// for (local i = 0; i< 8; i++) {
|
||||
// local MemberObj = Jso.team.characNum[0];
|
||||
// local MemberObj = Jso.team.characNum[0];
|
||||
//说明我在这个攻坚队里
|
||||
if (Jso.cid == MemberObj.CID) {
|
||||
Win.IsMyTeam = true;
|
||||
MyRaidState = Jso.team.State;
|
||||
MyRaidTeam = PartyWindow_Object;
|
||||
//向全局类存入我的攻坚队伍ID
|
||||
MyRaidTeamId = Jso.team.TeamId;
|
||||
//存入我的CID
|
||||
MyCid = Jso.cid;
|
||||
//说明是队长
|
||||
if (Jso.cid == Jso.team.captainCid) {
|
||||
Win.IsCaptain = true;
|
||||
//存入我是攻坚队队长
|
||||
IsCaptain = true;
|
||||
}
|
||||
}
|
||||
//构造CID对应的装备数组方便绘制
|
||||
Portrait.rawset(MemberObj.CID, {
|
||||
EquVos = clone(MemberObj.equVos),
|
||||
Job = MemberObj.PlayerJob,
|
||||
TeamId = MemberObj.characNum,
|
||||
Name = MemberObj.PlayerName,
|
||||
});
|
||||
local T = {
|
||||
PartyId = Jso.team.TeamId, //攻坚队ID
|
||||
TeamId = MemberObj.characNum, //小队编号
|
||||
Level = MemberObj.PlayerLevel.tostring(), //等级
|
||||
Name = MemberObj.PlayerName, //名字
|
||||
JobName = MemberObj.PlayerGrowTypeJob, //职业名
|
||||
Job = MemberObj.PlayerJob, //职业编号
|
||||
StkHasFlag = MemberObj.isPrepare, //是否拥有攻坚材料
|
||||
EquVos = MemberObj.equVos, //装备List 用于显示头像
|
||||
Captain = MemberObj.CaptainBool, //是否为攻坚队队长
|
||||
Cid = MemberObj.CID, //Cid
|
||||
OnlineState = MemberObj.onLineStart, //在线状态
|
||||
ExitTime = MemberObj.exitTime, //离队时间
|
||||
PlayerSession = MemberObj.PlayerSession, //玩家在世界中的Session 用于进行原生用户操作
|
||||
ClearanceCount = MemberObj.ClearanceCount, //通关次数
|
||||
ClearanceCountMax = FightConfig.rewardCondition, //总通关次数
|
||||
}
|
||||
//通过类构造并添加队伍成员UI对象
|
||||
local TeamBuf = Rindro_LukePartyInfoMemberC(T);
|
||||
Win.AddChild(TeamBuf);
|
||||
Win.MembersList.append(TeamBuf);
|
||||
}
|
||||
|
||||
if (("OpenWin" in Jso)) {
|
||||
//开启队伍窗口显示
|
||||
Win.Visible = true;
|
||||
//设置置顶
|
||||
Win.ResetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
//攻坚队攻坚开始回调
|
||||
function RaidStartFightCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
RaidStage = Jso.state;
|
||||
MyRaidState = Jso.state;
|
||||
|
||||
//在获取一下攻坚队信息
|
||||
local Jso = {
|
||||
op = 20084011
|
||||
}
|
||||
SendPackEx(Jso);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//结束时间
|
||||
EndTime = null;
|
||||
//上次刷新信息包的时间
|
||||
PackCurT = null;
|
||||
|
||||
//攻坚队信息包
|
||||
function RaidFightInfoCallBack(Chunk) {
|
||||
PackCurT = Clock();
|
||||
local Info = Json.Decode(Chunk).fightInfo;
|
||||
EndTime = Info.endTime;
|
||||
|
||||
if (FightSituationWindow_Object) FightSituationWindow_Object.InitInfo(Info);
|
||||
|
||||
//如果存在
|
||||
if (MyRaidTeam && MyRaidTeam.InfoFlag) {
|
||||
for (local i = 0; i< MyRaidTeam.MembersList.len(); i++) {
|
||||
local PInfo = MyRaidTeam.MembersList[i].InfoObj;
|
||||
local CID = PInfo.Cid;
|
||||
|
||||
local Flag = false;
|
||||
foreach(scid in Info.Standby) {
|
||||
if (scid == CID) Flag = true;
|
||||
}
|
||||
if (Flag) {
|
||||
MyRaidTeam.MembersList[i].InfoObj.Standby <- true;
|
||||
} else {
|
||||
MyRaidTeam.MembersList[i].InfoObj.Standby <- false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//收到奖励包
|
||||
function RaidRewardInfoCallBack(Chunk) {
|
||||
local Info = Json.Decode(Chunk);
|
||||
RewardWindow_Object.Init(Info);
|
||||
}
|
||||
|
||||
//收到初始化包
|
||||
function RaidInitCallBack(Chunk) {
|
||||
//我的攻坚队状态
|
||||
MyRaidState = null;
|
||||
//我的攻坚队伍
|
||||
MyRaidTeam = null;
|
||||
//我的攻坚队伍ID
|
||||
MyRaidTeamId = null;
|
||||
//我的Cid
|
||||
MyCid = null;
|
||||
//我是否是攻坚队队长
|
||||
IsCaptain = null;
|
||||
//结束时间
|
||||
EndTime = null;
|
||||
//我的攻坚队攻坚阶段
|
||||
RaidStage = 0;
|
||||
//我的攻坚队伍头像存储
|
||||
Portrait = null;
|
||||
|
||||
//卢克我的队伍窗口
|
||||
PartyWindow_Object.DestroyWindow();
|
||||
//攻坚战况表窗口
|
||||
FightSituationWindow_Object.DestroyWindow();
|
||||
//攻坚大厅窗口
|
||||
PartyHallWindow_Object.DestroyWindow();
|
||||
//翻牌奖励窗口
|
||||
RewardWindow_Object.DestroyWindow();
|
||||
//编队窗口
|
||||
PartyFormationWindow_Object.DestroyWindow();
|
||||
|
||||
//卢克我的队伍窗口
|
||||
PartyWindow_Object = null;
|
||||
//攻坚战况表窗口
|
||||
FightSituationWindow_Object = null;
|
||||
//攻坚大厅窗口
|
||||
PartyHallWindow_Object = null;
|
||||
//翻牌奖励窗口
|
||||
RewardWindow_Object = null;
|
||||
//编队窗口
|
||||
PartyFormationWindow_Object = null;
|
||||
|
||||
}
|
||||
|
||||
MonsterFMap = [202210052, 202210053, 202210054, 202210055];
|
||||
//火山怪物投放包
|
||||
function MonsterSendCallBack(Chunk) {
|
||||
local Info = Json.Decode(Chunk);
|
||||
if (sq_GetCurrentModuleType() == 3) {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj = sq_ObjectToSQRCharacter(obj);
|
||||
obj.sq_SendCreatePassiveObjectPacket(MonsterFMap[Info.id], 0, 120, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
// DrawStartAniMark = true;
|
||||
// DrawStartAniT = Clock();
|
||||
|
||||
Pack_Control.rawset(20084028, RaidStartFightCallBack.bindenv(this));
|
||||
Pack_Control.rawset(20084016, RaidFightInfoCallBack.bindenv(this));
|
||||
Pack_Control.rawset(20084004, GetTeamInfoCallBack.bindenv(this));
|
||||
Pack_Control.rawset(20084036, LukeFightBase.bindenv(this));
|
||||
//攻坚奖励包
|
||||
Pack_Control.rawset(20084026, RaidRewardInfoCallBack.bindenv(this));
|
||||
//初始化包 退出队伍 或者 被 请出队伍
|
||||
Pack_Control.rawset(20084008, RaidInitCallBack.bindenv(this));
|
||||
//火山怪物投放
|
||||
Pack_Control.rawset(20084050, MonsterSendCallBack.bindenv(this));
|
||||
//绘制动画包
|
||||
Pack_Control.rawset(20084038, RaidPlayAniCallBack.bindenv(this));
|
||||
|
||||
|
||||
//获取基础配置回调包
|
||||
Pack_Control.rawset(20084502, FiendwarBase.bindenv(this));
|
||||
//第一次上线要重新请求一下位置信息
|
||||
GetFiendwarBase();
|
||||
//看看是否有断线重连
|
||||
GetFiendwarDown();
|
||||
}
|
||||
|
||||
|
||||
function Proc(obj) {
|
||||
PartyHallWindow_Object = LenheartNewUI_CreateWindow(Rindro_Luke_PartyHallC, "新卢克攻坚大厅窗口", ((getroottable().Rindro_Scr_Width - 478)).tointeger(), 40, 478, 434, 18);
|
||||
PartyFormationWindow_Object = LenheartNewUI_CreateWindow(Rindro_LukePartyFormation, "卢克我的队伍编队窗口", 375, 190, 294, 192, 18);
|
||||
FightSituationWindow_Object = LenheartNewUI_CreateWindow(Rindro_LukeFightSituationC, "卢克攻坚战况表", ((getroottable().Rindro_Scr_Width - 800) / 2).tointeger(), 8, 800, 600, 0);
|
||||
PartyWindow_Object = LenheartNewUI_CreateWindow(Rindro_LukePartyInfoC, "卢克我的队伍窗口", 6, 15, 354, 566, 18);
|
||||
RewardWindow_Object = LenheartNewUI_CreateWindow(Rindro_Luke_RewardC, "卢克翻牌奖励窗口", 0, 0, 0, 0, 0);
|
||||
LenheartNewUI_CreateWindow(Rindro_Luke_NotiC, "卢克攻坚队伍消息分发", 0, 0, 0, 0, 0);
|
||||
|
||||
if (FightSituationWindow_Object) FightSituationWindow_Object.TopDraw(obj);
|
||||
|
||||
//绘制动画
|
||||
DrawPlayAni(obj);
|
||||
}
|
||||
|
||||
|
||||
DrawPlayAniMark = null;
|
||||
DrawPlayAniT = null;
|
||||
|
||||
function RaidPlayAniCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
DrawPlayAniMark = Jso.type;
|
||||
DrawPlayAniT = Clock();
|
||||
}
|
||||
|
||||
//绘制通关副本动画
|
||||
function DrawPlayAni(obj) {
|
||||
if (!DrawPlayAniMark || !DrawPlayAniT) return;
|
||||
local Offset = 0;
|
||||
if (getroottable().Rindro_Scr_Width > 800) Offset = ((getroottable().Rindro_Scr_Width - 800) / 2);
|
||||
local Ct = Clock() - DrawPlayAniT;
|
||||
switch (DrawPlayAniMark) {
|
||||
case 1: //通关擎天A
|
||||
case 2: //通关擎天B
|
||||
case 13: //通关擎天B
|
||||
local Ani = T_DrawDynamicAni(obj, "common/anton/title/04_clear_back.ani", 0 + Offset, 180, "卢克通关擎天A" + DrawPlayAniT);
|
||||
local str = "擎天之柱A";
|
||||
if (DrawPlayAniMark == 2) str = "擎天之柱B"
|
||||
if (DrawPlayAniMark == 13) str = "黑色火山"
|
||||
if (Ct >= 350 && Ct <= 1400) L_sq_DrawCode(str, 236 + Offset + 158 - LenheartTextClass.GetStringLength(str) / 2, 244, sq_RGBA(255, 146, 0, 250), 0, 1);
|
||||
break;
|
||||
case 5:
|
||||
T_DrawDynamicAni(obj, "common/luke/newtile/00_start_back.ani", 401 + Offset, 210 + 26, "卢克阻截开始" + DrawPlayAniT);
|
||||
break;
|
||||
case 6:
|
||||
T_DrawDynamicAni(obj, "common/luke/newtile/02_success_back.ani", 401 + Offset, 210 + 26, "卢克阻截成功" + DrawPlayAniT);
|
||||
break;
|
||||
case 7:
|
||||
T_DrawDynamicAni(obj, "common/luke/newtile/01_fail_back.ani", 401 + Offset, 210 + 26, "卢克阻截失败" + DrawPlayAniT);
|
||||
break;
|
||||
case 8:
|
||||
T_DrawDynamicAni(obj, "common/luke/newtile/00_start_back_1.ani", 401 + Offset, 210 + 26, "卢克灭杀开始" + DrawPlayAniT);
|
||||
break;
|
||||
case 9:
|
||||
T_DrawDynamicAni(obj, "common/luke/newtile/02_success_back_1.ani", 401 + Offset, 210 + 26, "卢克灭杀成功" + DrawPlayAniT);
|
||||
break;
|
||||
case 10:
|
||||
T_DrawDynamicAni(obj, "common/luke/newtile/01_fail_back_1.ani", 401 + Offset, 210 + 26, "卢克灭杀失败" + DrawPlayAniT);
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
T_DrawDynamicAni(obj, "common/anton/title/03_warning_back.ani", 0 + Offset, 210 + 26, "卢克火山警告" + DrawPlayAniT);
|
||||
local str = "火山能量即将过载,请立即前往压制!!!";
|
||||
if (DrawPlayAniMark == 12) str = "震颤的大地已经复活,请立即前往压制!!!"
|
||||
if (Ct >= 350 && Ct <= 1600) L_sq_DrawCode(str, 236 + Offset + 158 - LenheartTextClass.GetStringLength(str) / 2, 320, sq_RGBA(255, 50, 50, 250), 0, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (Ct >= 3000) {
|
||||
DrawPlayAniMark = null;
|
||||
DrawPlayAniT = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getroottable().rawdelete("RinDro_Luke_Obj");
|
||||
|
||||
function Lenheart_Rindro_Luke_New(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("RinDro_Luke_Obj")) {
|
||||
RootTab.rawset("RinDro_Luke_Obj", RinDro_Luke());
|
||||
} else {
|
||||
RootTab["RinDro_Luke_Obj"].Proc(obj);
|
||||
}
|
||||
}
|
||||
|
||||
if (getroottable().rawin("LenheartTopFuncTab")) {
|
||||
getroottable()["LenheartTopFuncTab"].rawset("Lenheart_Rindro_Luke_NewFunc", Lenheart_Rindro_Luke_New);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("Lenheart_Rindro_Luke_NewFunc", Lenheart_Rindro_Luke_New);
|
||||
getroottable().rawset("LenheartTopFuncTab", T);
|
||||
}
|
||||
106
Project/Luke/Rindro_Luke_CreateParty.nut
Normal file
106
Project/Luke/Rindro_Luke_CreateParty.nut
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_CreateParty.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_CreateParty.nut
|
||||
创建日期:2024-07-15 20:28
|
||||
文件用途:卢克创建队伍窗口
|
||||
*/
|
||||
|
||||
|
||||
class Rindro_LukeCreatePartyC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
DeBugMode = false;
|
||||
|
||||
X = 290;
|
||||
Y = 220;
|
||||
//输入框
|
||||
InputObject = null;
|
||||
|
||||
//时装 帽子 头部 脸 上衣 下装 鞋子 胸部 腰部 皮肤 光环
|
||||
AvatarInfoIdx = [0x3038, 0x3010, 0x3014, 0x3018, 0x301c, 0x3020, 0x3024, 0x3028, 0x302c, 0x3030, 0x3034];
|
||||
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(266, 2, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
DestroyWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(CloseButton);
|
||||
|
||||
local OkButton = LenheartNewUI_ButtonText(78, 124, 5, "确定");
|
||||
OkButton.SetTextOffset(0, 1);
|
||||
OkButton.OnClick = function() {
|
||||
|
||||
//如果队伍名输出框的文字长度大于0就创建队伍 创建时告诉服务端自己的 头发 帽子 脸部 皮肤
|
||||
if (InputObject.str.len() > 0) {
|
||||
|
||||
local C_Object = L_sq_RA(0x1ab7cdc);
|
||||
local avataritemsbuf = [];
|
||||
foreach(offset in AvatarInfoIdx) {
|
||||
local AvatarEquiAddress = L_sq_RA(C_Object + offset);
|
||||
if (AvatarEquiAddress >= 0x400000) {
|
||||
local Ab = [];
|
||||
local NormalIndex = L_sq_RA(AvatarEquiAddress + 0x1c);
|
||||
local ExIndex = L_sq_RA(AvatarEquiAddress + 0x13E0);
|
||||
Ab.append(NormalIndex);
|
||||
Ab.append(ExIndex);
|
||||
avataritemsbuf.append(Ab);
|
||||
} else {
|
||||
local Ab = [];
|
||||
Ab.append(0);
|
||||
Ab.append(0);
|
||||
avataritemsbuf.append(Ab);
|
||||
}
|
||||
}
|
||||
|
||||
local T = {
|
||||
op = 20084001,
|
||||
teamsName = InputObject.str,
|
||||
items = avataritemsbuf,
|
||||
}
|
||||
SendPackEx(T);
|
||||
DestroyWindow();
|
||||
}
|
||||
}.bindenv(this);
|
||||
AddChild(OkButton);
|
||||
|
||||
local CloseButton = LenheartNewUI_ButtonText(144, 124, 5, "取消");
|
||||
CloseButton.SetTextOffset(0, 1);
|
||||
CloseButton.OnClick = function() {
|
||||
DestroyWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(CloseButton);
|
||||
|
||||
InputObject = LenheartNewUI_BaseInput(62, 68, 152, 20);
|
||||
AddChild(InputObject);
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2);
|
||||
L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2);
|
||||
L_sq_DrawImg("interface2/gcontents/rindroanton/raid/raid_areaimg_fiend.img", 1, X + 11, Y + 21);
|
||||
|
||||
L_sq_DrawImg("hud/rindroanton.img", 9, X - 2, Y + 2);
|
||||
L_sq_DrawCode("创建攻坚队", X + 112, Y + 4, sq_RGBA(179, 169, 135, 255), 0, 1);
|
||||
|
||||
L_sq_DrawImg("hud/rindroanton.img", 10, X + 72, Y + 44);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
}
|
||||
1026
Project/Luke/Rindro_Luke_FightSituation.nut
Normal file
1026
Project/Luke/Rindro_Luke_FightSituation.nut
Normal file
File diff suppressed because it is too large
Load Diff
127
Project/Luke/Rindro_Luke_Noti.nut
Normal file
127
Project/Luke/Rindro_Luke_Noti.nut
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_Noti.nut
|
||||
路径:Plugins/Rindro_Luke_/Rindro_Luke_Noti.nut
|
||||
创建日期:2024-04-12 22:12
|
||||
文件用途:超时空攻坚战队伍消息
|
||||
*/
|
||||
class Rindro_Luke_NotiC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
//不要窗口模式
|
||||
NoWindow = true;
|
||||
//消息内容
|
||||
Msg = null;
|
||||
//队长名称
|
||||
Name = null;
|
||||
//消息时间
|
||||
Timer = null;
|
||||
|
||||
|
||||
//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],
|
||||
]
|
||||
|
||||
//队伍聊天消息分发
|
||||
function Rindro_Luke_PartyNotiCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
Name = Jso.Name;
|
||||
Msg = Jso.msg;
|
||||
Timer = Clock();
|
||||
}
|
||||
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
//队伍聊天消息分发
|
||||
Pack_Control.rawset(20084018, Rindro_Luke_PartyNotiCallBack.bindenv(this));
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
|
||||
}
|
||||
|
||||
//队长头像
|
||||
PartyMasterIcon = null;
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
|
||||
if (!Name || !Msg) return;
|
||||
local Ct = Clock() - Timer;
|
||||
T_DrawDynamicAni(obj, "common/anton/title/06_leader_message_00.ani", 180, 180, "攻坚队团长消息分发" + Timer);
|
||||
|
||||
if (RinDro_Luke_Obj.MyRaidTeam) {
|
||||
local Mt = RinDro_Luke_Obj.MyRaidTeam;
|
||||
local PartyMaster = null;
|
||||
foreach(index, value in Mt.MembersList) {
|
||||
if (value.InfoObj.Captain) {
|
||||
PartyMasterIcon = clone(value);
|
||||
}
|
||||
}
|
||||
|
||||
if (Ct >= 200) {
|
||||
//绘制队长头像
|
||||
foreach(AvatarObj in PartyMasterIcon.InfoObj.EquVos) {
|
||||
local AXpos = AvatarObj.F[0][2] + X + OffsetArr[PartyMasterIcon.InfoObj.Job][0] - 9 + 150;
|
||||
local AYpos = AvatarObj.F[0][3] + Y + OffsetArr[PartyMasterIcon.InfoObj.Job][1] + 184;
|
||||
setClip(AXpos + OffsetArr[PartyMasterIcon.InfoObj.Job][2], AYpos + OffsetArr[PartyMasterIcon.InfoObj.Job][3], AXpos + OffsetArr[PartyMasterIcon.InfoObj.Job][2] + 22, AYpos + OffsetArr[PartyMasterIcon.InfoObj.Job][3] + 18); //开始裁切
|
||||
L_sq_DrawImg("character/" + AvatarObj.B + ".img", AvatarObj.F[0][0], AXpos, AYpos);
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制消息
|
||||
if (Ct >= 200) L_sq_DrawCode(Msg, X + 270 + LenheartTextClass.GetStringLength(Name), Y + 190, sq_RGBA(230, 200, 155, 255), 0, 1);
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
if (Name && Msg)
|
||||
ResetFocus();
|
||||
else
|
||||
// CloseWindow();
|
||||
|
||||
if (Timer) {
|
||||
if (Clock() - Timer >= 3000) {
|
||||
Timer = null;
|
||||
Name = null;
|
||||
Msg = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
79
Project/Luke/Rindro_Luke_Party.nut
Normal file
79
Project/Luke/Rindro_Luke_Party.nut
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_Party.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_Party.nut
|
||||
创建日期:2024-07-15 21:02
|
||||
文件用途:卢克队伍对象
|
||||
*/
|
||||
|
||||
class Rindro_LukePartyC extends LenheartNewUI_CommonUi {
|
||||
X = 0;
|
||||
Y = 0;
|
||||
Width = null;
|
||||
Height = null;
|
||||
TeamObj = null;
|
||||
//选中状态
|
||||
SelectState = false;
|
||||
//攻坚状态
|
||||
OffensiveState = 0;
|
||||
|
||||
constructor(gTeamObj) {
|
||||
//拿到信息Map
|
||||
TeamObj = gTeamObj;
|
||||
//设定宽高 坐标不重要 会被父窗口的Sync同步坐标
|
||||
this.Width = 458;
|
||||
this.Height = 21;
|
||||
|
||||
this.OnClick = function() {
|
||||
//还原父对象中其他攻坚队伍类 选中自己
|
||||
foreach(Obj in Parent.Childrens) {
|
||||
if (Obj instanceof Rindro_LukePartyC) {
|
||||
Obj.SelectState = false;
|
||||
}
|
||||
}
|
||||
SelectState = !SelectState;
|
||||
//发送查看攻坚队具体信息包
|
||||
local T = {
|
||||
op = 20084013,
|
||||
teamsId = TeamObj.TeamId
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
LenheartNewUI_CommonUi.constructor(10, 82, this.Width, this.Height);
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//绘制底槽
|
||||
L_sq_DrawImg("hud/rindroanton.img", 4, X, Y);
|
||||
|
||||
//绘制队伍编号
|
||||
L_sq_DrawCode(TeamObj.TeamId, X + 22 - LenheartTextClass.GetStringLength(TeamObj.TeamId) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制队长头像
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 55, X + 52, Y + 7);
|
||||
try {
|
||||
local channel_index = FiendwarTotal.GetInstance().BaseConfig.channel_index;
|
||||
channel_index = channel_index.slice(channel_index.len() - 2, channel_index.len());
|
||||
//绘制频道信息
|
||||
L_sq_DrawCode(channel_index, X + 102 - LenheartTextClass.GetStringLength(channel_index) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
} catch (exception) {
|
||||
|
||||
}
|
||||
//绘制攻坚队名称
|
||||
L_sq_DrawCode(TeamObj.TeamName, X + 130, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
// print(TeamObj.State);
|
||||
//绘制攻坚队攻坚状态
|
||||
L_sq_DrawImg("hud/newantonui.img", 4 + TeamObj.State, X + 314, Y + 2);
|
||||
|
||||
local PartyPlayerCountStr = TeamObj.TeamPlayerCount + " / " + 20;
|
||||
//绘制攻坚队队员数量
|
||||
L_sq_DrawCode(PartyPlayerCountStr, X + 434 - LenheartTextClass.GetStringLength(PartyPlayerCountStr) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
|
||||
if (SelectState) {
|
||||
L_sq_DrawImg("hud/rindroanton.img", 5, X, Y);
|
||||
}
|
||||
|
||||
if (isInRect) {
|
||||
L_sq_DrawImg("hud/rindroanton.img", 5, X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
121
Project/Luke/Rindro_Luke_PartyFormation.nut
Normal file
121
Project/Luke/Rindro_Luke_PartyFormation.nut
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_PartyFormation.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_PartyFormation.nut
|
||||
创建日期:2024-07-16 16:22
|
||||
文件用途:卢克 队内编队
|
||||
*/
|
||||
//编队用按钮需要传递参数所以重写
|
||||
class Rindro_LukePartyInfoEdit_BaseButton extends LenheartNewUI_BaseButton {
|
||||
MyInfoIndex = 0;
|
||||
constructor(X, Y, W, H, Path, Idx, InfoIndex) {
|
||||
MyInfoIndex = InfoIndex;
|
||||
LenheartNewUI_BaseButton.constructor(X, Y, W, H, Path, Idx);
|
||||
}
|
||||
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
if (isLBDown && OnClick) {
|
||||
OnClick(MyInfoIndex);
|
||||
}
|
||||
isLBDown = false;
|
||||
}
|
||||
}
|
||||
//编队窗口
|
||||
class Rindro_LukePartyFormation extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
Visible = false;
|
||||
|
||||
PartyMarkFlag = -1;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
}
|
||||
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(278, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(CloseButton);
|
||||
|
||||
//搜索按钮
|
||||
local QdButton = LenheartNewUI_ButtonText(10, 157, 5, "签到");
|
||||
QdButton.State = 8;
|
||||
QdButton.SetTextOffset(0, 1);
|
||||
AddChild(QdButton);
|
||||
|
||||
//解散队伍按钮
|
||||
local BreakPartyButton = LenheartNewUI_ButtonText(80, 158, 5, "解散队伍");
|
||||
BreakPartyButton.SetTextOffset(-12, 1);
|
||||
BreakPartyButton.OnClick = function() {
|
||||
PartyMarkFlag = 99;
|
||||
}.bindenv(this);
|
||||
AddChild(BreakPartyButton);
|
||||
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_ButtonText(150, 158, 5, "关闭");
|
||||
CloseButton.SetTextOffset(0, 1);
|
||||
CloseButton.OnClick = function() {
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(CloseButton);
|
||||
|
||||
for (local i = 0; i< 8; i++) {
|
||||
//右翻页按钮
|
||||
local PartyIndexButton = Rindro_LukePartyInfoEdit_BaseButton(12 + (i % 2 * 136), 35 + ((i / 2) * 30), 41, 17, "interface/newstyle/windows/party/party_icon.img", 3 + (i * 3), i);
|
||||
//继承类 并重写 调用时传入InfoIndex
|
||||
PartyIndexButton.OnClick = function(MyInfoIndex) {
|
||||
PartyMarkFlag = MyInfoIndex;
|
||||
}.bindenv(this);
|
||||
AddChild(PartyIndexButton);
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//标题栏
|
||||
L_sq_DrawButton(X - 1, Y, 284, "interface/lenheartwindowcommon.img", 609, 2, 7);
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y + 17, 272, 154, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2);
|
||||
|
||||
for (local q = 0; q< 8; q++) {
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 358, X + 60 + (q % 2 * 136), Y + 34 + ((q / 2) * 30));
|
||||
for (local i = 0; i< 3; i++) {
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 361, X + 80 + (q % 2 * 136) + (i * 20), Y + 34 + ((q / 2) * 30));
|
||||
}
|
||||
}
|
||||
|
||||
if (PartyMarkFlag != -1) {
|
||||
R_Mouse.SetType(151);
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
|
||||
}
|
||||
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
//还原编队的鼠标指针
|
||||
if (this.PartyMarkFlag != -1) {
|
||||
this.PartyMarkFlag = -1;
|
||||
R_Mouse.SetType(0);
|
||||
}
|
||||
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
}
|
||||
}
|
||||
350
Project/Luke/Rindro_Luke_PartyHall.nut
Normal file
350
Project/Luke/Rindro_Luke_PartyHall.nut
Normal file
@@ -0,0 +1,350 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_PartyHall.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_PartyHall.nut
|
||||
创建日期:2024-07-15 16:50
|
||||
文件用途:卢克组队大厅
|
||||
*/
|
||||
class Rindro_Luke_PartyHallC extends LenheartNewUI_Windows {
|
||||
|
||||
Visible = false;
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
|
||||
//页数
|
||||
Page = 0;
|
||||
//一页放多少个队伍
|
||||
PageMaxCount = 13;
|
||||
//攻坚队List
|
||||
PartyList = null;
|
||||
|
||||
|
||||
|
||||
//获取所有队伍
|
||||
function GetAllTeamCall() {
|
||||
local Jso = {
|
||||
op = 20084011
|
||||
}
|
||||
SendPack(Jso);
|
||||
}
|
||||
|
||||
//获取所有队伍收包
|
||||
function GetAllTeamCallCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
|
||||
//清除原来的List PartyList可以直接清除 但是Childrens中的窗口需要调用底层方法清除队伍类
|
||||
PartyList = [];
|
||||
|
||||
RemoveAllParty();
|
||||
//遍历包构造攻坚队UI对象
|
||||
foreach(TeamsSimple in Jso.TeamSimList) {
|
||||
local RealState = 0;
|
||||
if (TeamsSimple.State == 1) RealState = 1;
|
||||
else if (TeamsSimple.State == 2) RealState = 0;
|
||||
else if (TeamsSimple.State == 3) RealState = 2;
|
||||
else if (TeamsSimple.State == 4) RealState = 3;
|
||||
local T = {
|
||||
TeamId = TeamsSimple.TeamId.tostring(),
|
||||
TeamName = TeamsSimple.TeamName,
|
||||
TeamPlayerCount = TeamsSimple.TeamPlayerCount,
|
||||
State = RealState
|
||||
}
|
||||
local TeamBuf = Rindro_LukePartyC(T);
|
||||
AddChild(TeamBuf);
|
||||
PartyList.append(TeamBuf);
|
||||
}
|
||||
//收到刷新队伍列表包时需要将队伍窗口关闭 //TODO
|
||||
// if ("Close" in Jso) LenheartNewUI_DestoryWindow("超时空我的队伍窗口");
|
||||
}
|
||||
|
||||
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
|
||||
PartyList = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
|
||||
Pack_Control.rawset(20084002, GetAllTeamCallCallBack.bindenv(this));
|
||||
|
||||
|
||||
GetAllTeamCall();
|
||||
}
|
||||
|
||||
|
||||
OnlyPreparingBtn = null;
|
||||
OnlyPreparingFlag = 1;
|
||||
InputObject = null;
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(457, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(CloseButton);
|
||||
|
||||
|
||||
//我的频道复选框
|
||||
local MyChannelBtn = LenheartNewUI_SwitchButtonText(16, 30, "我的频道");
|
||||
MyChannelBtn.State = 1;
|
||||
MyChannelBtn.ImgIndex = 358;
|
||||
MyChannelBtn.SetTextPos(12, 2);
|
||||
MyChannelBtn.Width = 76;
|
||||
MyChannelBtn.Height = 16;
|
||||
AddChild(MyChannelBtn);
|
||||
|
||||
//只查看招募中的攻坚队
|
||||
OnlyPreparingBtn = LenheartNewUI_SwitchButtonText(110, 30, "只查看招募中的攻坚队");
|
||||
OnlyPreparingBtn.ImgIndex = 358;
|
||||
OnlyPreparingBtn.SetTextPos(12, 2);
|
||||
OnlyPreparingBtn.Width = 76;
|
||||
OnlyPreparingBtn.Height = 16;
|
||||
OnlyPreparingBtn.OnClick = function() {
|
||||
switch (OnlyPreparingFlag) {
|
||||
case 0:
|
||||
OnlyPreparingFlag = 1;
|
||||
break;
|
||||
case 1:
|
||||
OnlyPreparingFlag = 0;
|
||||
break;
|
||||
}
|
||||
OnlyPreparingBtn.State = OnlyPreparingFlag;
|
||||
}.bindenv(this);
|
||||
AddChild(OnlyPreparingBtn);
|
||||
|
||||
//搜索队伍输入框
|
||||
InputObject = LenheartNewUI_BaseInput(260, 31, 80, 20);
|
||||
AddChild(InputObject);
|
||||
|
||||
//搜索按钮
|
||||
local FindButton = LenheartNewUI_ButtonText(348, 28, 5, "搜索");
|
||||
FindButton.SetTextOffset(0, 1);
|
||||
FindButton.OnClick = function() {
|
||||
if (InputObject.str.len() > 0) {
|
||||
|
||||
}
|
||||
}.bindenv(this);
|
||||
AddChild(FindButton);
|
||||
|
||||
//重置按钮
|
||||
local ResetButton = LenheartNewUI_ButtonText(408, 28, 5, "重置");
|
||||
ResetButton.SetTextOffset(0, 1);
|
||||
ResetButton.OnClick = function() {
|
||||
InputObject.str = "";
|
||||
}.bindenv(this);
|
||||
AddChild(ResetButton);
|
||||
|
||||
//编号按钮
|
||||
local ModelButton = LenheartNewUI_ButtonText(9, 56, -18, "编号");
|
||||
ModelButton.Idx = 163;
|
||||
ModelButton.DWidth = -8;
|
||||
ModelButton.SetTextOffset(-9, 1);
|
||||
AddChild(ModelButton);
|
||||
|
||||
//状态按钮
|
||||
local StateButton = LenheartNewUI_ButtonText(51, 56, -18, "状态");
|
||||
StateButton.Idx = 163;
|
||||
StateButton.DWidth = -8;
|
||||
StateButton.SetTextOffset(-9, 1);
|
||||
AddChild(StateButton);
|
||||
|
||||
//频道按钮
|
||||
local ChannelButton = LenheartNewUI_ButtonText(93, 56, -18, "频道");
|
||||
ChannelButton.Idx = 163;
|
||||
ChannelButton.DWidth = -8;
|
||||
ChannelButton.SetTextOffset(-9, 1);
|
||||
AddChild(ChannelButton);
|
||||
|
||||
//攻坚队名称按钮
|
||||
local PartyNameButton = LenheartNewUI_ButtonText(135, 56, 100, "攻坚队名称");
|
||||
PartyNameButton.Idx = 163;
|
||||
PartyNameButton.DWidth = 223;
|
||||
PartyNameButton.FillWidth = 1;
|
||||
PartyNameButton.FirstWidth = 21;
|
||||
PartyNameButton.SetTextOffset(26, 1);
|
||||
AddChild(PartyNameButton);
|
||||
|
||||
//阶段按钮
|
||||
local StageButton = LenheartNewUI_ButtonText(289, 56, 52, "阶段");
|
||||
StageButton.Idx = 163;
|
||||
StageButton.DWidth = 140;
|
||||
StageButton.FillWidth = 1;
|
||||
StageButton.FirstWidth = 21;
|
||||
StageButton.SetTextOffset(26, 1);
|
||||
AddChild(StageButton);
|
||||
|
||||
//队员数量按钮
|
||||
local TeammembersButton = LenheartNewUI_ButtonText(402, 56, 50, "队员数量");
|
||||
TeammembersButton.Idx = 163;
|
||||
TeammembersButton.FillWidth = 1;
|
||||
TeammembersButton.FirstWidth = 21;
|
||||
TeammembersButton.DWidth = 47;
|
||||
TeammembersButton.SetTextOffset(-8, 1);
|
||||
AddChild(TeammembersButton);
|
||||
|
||||
//创建攻坚队按钮
|
||||
local MyPartyButton = LenheartNewUI_ButtonText(15, 395, 30, "创建攻坚队");
|
||||
MyPartyButton.SetTextOffset(-6, 1);
|
||||
MyPartyButton.OnClick = function() {
|
||||
//有队伍则查看队伍信息
|
||||
if (RinDro_Luke_Obj.MyRaidTeamId) {
|
||||
//发送查看攻坚队具体信息包
|
||||
local T = {
|
||||
op = 20084013,
|
||||
teamsId = RinDro_Luke_Obj.MyRaidTeamId
|
||||
}
|
||||
SendPackEx(T);
|
||||
}
|
||||
//否则创建队伍
|
||||
else {
|
||||
local Win = LenheartNewUI_CreateWindow(Rindro_LukeCreatePartyC, "卢克创建队伍窗口", 290, 220, 284, 154, 18);
|
||||
Win.Visible = true;
|
||||
Win.ResetFocus();
|
||||
}
|
||||
}.bindenv(this);
|
||||
//设置动态回调改变按钮名称
|
||||
MyPartyButton.SetCallBackFunc(function(window) {
|
||||
if (RinDro_Luke_Obj.MyRaidTeamId) window.TextStr = "我的攻坚队";
|
||||
else window.TextStr = "创建攻坚队";
|
||||
}.bindenv(this));
|
||||
|
||||
AddChild(MyPartyButton);
|
||||
|
||||
//左翻页按钮
|
||||
local LeftButton = LenheartNewUI_BaseButton(160, 400, 15, 15, "interface/lenheartwindowcommon.img", 34);
|
||||
LeftButton.OnClick = function() {
|
||||
if (Page > 0) Page--;
|
||||
}.bindenv(this);
|
||||
AddChild(LeftButton);
|
||||
|
||||
//右翻页按钮
|
||||
local RightButton = LenheartNewUI_BaseButton(220, 400, 15, 15, "interface/lenheartwindowcommon.img", 38);
|
||||
RightButton.OnClick = function() {
|
||||
if (Page<(((PartyList.len() / PageMaxCount)))) Page++;
|
||||
}.bindenv(this);
|
||||
AddChild(RightButton);
|
||||
|
||||
//进入待机按钮
|
||||
local FQButton = LenheartNewUI_ButtonText(300, 394, 20, "进入待机");
|
||||
FQButton.SetTextOffset(-5, 2);
|
||||
FQButton.State = 8;
|
||||
AddChild(FQButton);
|
||||
|
||||
//刷新按钮
|
||||
local RefreshButton = LenheartNewUI_BaseButton(410, 395, 25, 25, "interface/lenheartwindowcommon.img", 366);
|
||||
RefreshButton.OnClick = function() {
|
||||
GetAllTeamCall();
|
||||
}.bindenv(this);
|
||||
AddChild(RefreshButton);
|
||||
|
||||
//设置按钮
|
||||
local SettingButton = LenheartNewUI_BaseButton(440, 394, 15, 15, "interface/lenheartwindowcommon.img", 362);
|
||||
SettingButton.State = 8;
|
||||
AddChild(SettingButton);
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y + 10, 540 * 0.85, 420 * 0.9, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
L_sq_DrawWindow(X + 6, Y + 19, 528 * 0.85, 47, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
//绘制背景框标题栏
|
||||
L_sq_DrawImg("hud/rindroanton.img", 3, X + 1, Y);
|
||||
|
||||
L_sq_DrawCode("寻找攻坚队", X + 217, Y + 3, sq_RGBA(179, 169, 135, 255), 0, 1);
|
||||
|
||||
//绘制队伍List
|
||||
DrawPartyList(obj);
|
||||
|
||||
L_sq_DrawWindow(X + 6, Y + 382, 528 * 0.85, 24, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
|
||||
//计算页数
|
||||
local PageStr = Page + 1 + " / " + ((PartyList.len() / PageMaxCount) + 1);
|
||||
//绘制当前页数
|
||||
L_sq_DrawCode(PageStr, X + 166 + LenheartTextClass.GetStringLength(PageStr) / 2, Y + 402, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
}
|
||||
|
||||
//重置所有选中
|
||||
function ResetAllSelect() {
|
||||
foreach(Index, TeamObj in PartyList) {
|
||||
TeamObj.SelectState = false;
|
||||
}
|
||||
}
|
||||
|
||||
//移除队伍
|
||||
function RemoveParty(TeamId) {
|
||||
local ObjectID = null;
|
||||
for (local i = 0; i< Childrens.len(); i++) {
|
||||
local Cobj = Childrens[i];
|
||||
if (Cobj instanceof Rindro_LukePartyC) {
|
||||
if (Cobj.TeamObj.TeamId.tointeger() == TeamId.tointeger()) {
|
||||
ObjectID = Cobj.ObjectId;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ObjectID) RemoveChild(ObjectID);
|
||||
}
|
||||
|
||||
//移除所有队伍
|
||||
function RemoveAllParty() {
|
||||
for (local i = 0; i< Childrens.len(); i++) {
|
||||
local Cobj = Childrens[i];
|
||||
if (Cobj instanceof Rindro_LukePartyC) {
|
||||
Childrens.remove(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制队伍信息
|
||||
function DrawPartyList(obj) {
|
||||
if (PartyList.len() <= 0) return;
|
||||
//先遍历一遍全部挪走
|
||||
foreach(Index, TeamObj in PartyList) {
|
||||
TeamObj.SyncPos(9999, 9999);
|
||||
}
|
||||
//在遍历需要显示的同步坐标
|
||||
foreach(Index, TeamObj in PartyList.slice((((Page) * PageMaxCount) > 0) ? ((Page) * PageMaxCount) : 0, ((Page + 1) * PageMaxCount) > PartyList.len() ? PartyList.len() : ((Page + 1) * PageMaxCount))) {
|
||||
TeamObj.SyncPos(X, Y + 2 + (Index % PageMaxCount) * 23);
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
MainButton = null;
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
|
||||
|
||||
//界面未打开
|
||||
if (!this.Visible && L_sq_RA(0x1A5FB4C, "0x14+0x28+")< 2) {
|
||||
//在甲板
|
||||
if (RinDro_Luke_Obj.BaseConfig && RinDro_Luke_Obj.BaseConfig.channel_index.find("19") && L_sq_GetTownIndex() == RinDro_Luke_Obj.BaseConfig.town_index && L_sq_GetRegionIndex() >= 1) {
|
||||
local PaW = sq_GetPopupWindowMainCotrol(6);
|
||||
if (PaW) {
|
||||
L_sq_UseSkill(DIK_ESCAPE);
|
||||
this.Visible = true;
|
||||
GetAllTeamCall();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
}
|
||||
311
Project/Luke/Rindro_Luke_PartyInfo.nut
Normal file
311
Project/Luke/Rindro_Luke_PartyInfo.nut
Normal file
@@ -0,0 +1,311 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_PartyInfo.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_PartyInfo.nut
|
||||
创建日期:2024-07-15 22:12
|
||||
文件用途:卢克队伍信息窗口
|
||||
*/
|
||||
class Rindro_LukePartyInfoC extends LenheartNewUI_Windows {
|
||||
|
||||
Visible = false;
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//是否存在信息
|
||||
InfoFlag = false;
|
||||
|
||||
//队员列表
|
||||
MembersList = null;
|
||||
|
||||
//队伍名称
|
||||
TeamName = "";
|
||||
//队伍ID
|
||||
TeamID = 99999999;
|
||||
|
||||
//是否是我的攻坚队
|
||||
IsMyTeam = false;
|
||||
//是否是队长
|
||||
IsCaptain = false;
|
||||
|
||||
|
||||
|
||||
//收到请求加入攻坚队包
|
||||
function JoinTeamCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
local win = LenheartNewUI_CreateWindow(Rindro_LukeApplyJoinC, "卢克申请加入队伍窗口", 542, 348, 257, 240, 18);
|
||||
win.Visible = true;
|
||||
win.ResetFocus();
|
||||
local T = {
|
||||
Charc = Jso.charac, //角色对象
|
||||
Level = Jso.charac.PlayerLevel,
|
||||
Name = Jso.charac.PlayerName,
|
||||
Job = Jso.charac.PlayerJob,
|
||||
PvpLevel = Jso.charac.pvp,
|
||||
JobName = Jso.charac.PlayerGrowTypeJob,
|
||||
Coin = Jso.charac.PlayCoin,
|
||||
Fatigue = Jso.charac.PlayFatigue,
|
||||
Combat = Jso.charac.ZL,
|
||||
ClearanceCount = Jso.charac.ClearanceCount,
|
||||
AvatarArr = Jso.charac.equVos,
|
||||
PlayerSession = Jso.charac.PlayerSession
|
||||
}
|
||||
//没人
|
||||
if (win.RequestJoinTeamArr.len() == 0) {
|
||||
win.RequestJoinTeamArr.append(T);
|
||||
win.InitInfo();
|
||||
} else win.RequestJoinTeamArr.append(T);
|
||||
}
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
// RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
|
||||
Pack_Control.rawset(20084006, JoinTeamCallBack.bindenv(this));
|
||||
|
||||
RegisterWidget();
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(336, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
AddChild(CloseButton);
|
||||
|
||||
|
||||
//队伍按钮
|
||||
local ModelButton = LenheartNewUI_ButtonText(9, 60, -18, "队伍");
|
||||
ModelButton.Idx = 163;
|
||||
ModelButton.DWidth = -8;
|
||||
ModelButton.SetTextOffset(-9, 1);
|
||||
AddChild(ModelButton);
|
||||
|
||||
//等级按钮
|
||||
local StateButton = LenheartNewUI_ButtonText(51, 60, -18, "等级");
|
||||
StateButton.Idx = 163;
|
||||
StateButton.DWidth = -8;
|
||||
StateButton.SetTextOffset(-9, 1);
|
||||
AddChild(StateButton);
|
||||
|
||||
//角色名按钮
|
||||
local ChannelButton = LenheartNewUI_ButtonText(93, 60, 44, "角色名");
|
||||
ChannelButton.Idx = 163;
|
||||
ChannelButton.DWidth = 120;
|
||||
ChannelButton.FillWidth = 1;
|
||||
ChannelButton.FirstWidth = 21;
|
||||
ChannelButton.SetTextOffset(17, 1);
|
||||
AddChild(ChannelButton);
|
||||
|
||||
//攻坚队名称按钮
|
||||
local PartyNameButton = LenheartNewUI_ButtonText(196, 60, 36, "职业名");
|
||||
PartyNameButton.Idx = 163;
|
||||
PartyNameButton.DWidth = 100;
|
||||
PartyNameButton.FillWidth = 1;
|
||||
PartyNameButton.FirstWidth = 21;
|
||||
PartyNameButton.SetTextOffset(11, 1);
|
||||
AddChild(PartyNameButton);
|
||||
|
||||
//入场材料按钮
|
||||
local StageButton = LenheartNewUI_ButtonText(289, 60, 0, "入场材料");
|
||||
StageButton.Idx = 163;
|
||||
StageButton.DWidth = 26;
|
||||
StageButton.FillWidth = 1;
|
||||
StageButton.FirstWidth = 21;
|
||||
StageButton.SetTextOffset(-14, 1);
|
||||
StageButton.SetCallBackFunc(function(window) {
|
||||
if (RinDro_Luke_Obj.EndTime) window.TextStr = "通关次数";
|
||||
else window.TextStr = "入场材料";
|
||||
}.bindenv(this));
|
||||
AddChild(StageButton);
|
||||
|
||||
//如果不是我的队伍 并且我没有攻坚队
|
||||
local JoinPartyButton = LenheartNewUI_ButtonText(10, 268 + 8, 10, "参加攻坚队");
|
||||
JoinPartyButton.SetTextOffset(-15, 1);
|
||||
JoinPartyButton.OnClick = function() {
|
||||
|
||||
//时装 帽子 头部 脸 上衣 下装 鞋子 胸部 腰部 皮肤 光环
|
||||
local AvatarInfoIdx = [0x3038, 0x3010, 0x3014, 0x3018, 0x301c, 0x3020, 0x3024, 0x3028, 0x302c, 0x3030, 0x3034];
|
||||
|
||||
local C_Object = L_sq_RA(0x1ab7cdc);
|
||||
local avataritemsbuf = [];
|
||||
foreach(offset in AvatarInfoIdx) {
|
||||
local AvatarEquiAddress = L_sq_RA(C_Object + offset);
|
||||
if (AvatarEquiAddress >= 0x400000) {
|
||||
local Ab = [];
|
||||
local NormalIndex = L_sq_RA(AvatarEquiAddress + 0x1c);
|
||||
local ExIndex = L_sq_RA(AvatarEquiAddress + 0x13E0);
|
||||
Ab.append(NormalIndex);
|
||||
Ab.append(ExIndex);
|
||||
avataritemsbuf.append(Ab);
|
||||
} else {
|
||||
local Ab = [];
|
||||
Ab.append(0);
|
||||
Ab.append(0);
|
||||
avataritemsbuf.append(Ab);
|
||||
}
|
||||
}
|
||||
|
||||
local T = {
|
||||
op = 20084005,
|
||||
teamsId = TeamID,
|
||||
items = avataritemsbuf,
|
||||
}
|
||||
SendPackEx(T);
|
||||
|
||||
}.bindenv(this);
|
||||
JoinPartyButton.SetCallBackFunc(function(window) {
|
||||
if (!IsMyTeam && !RinDro_Luke_Obj.MyRaidTeamId)
|
||||
window.X = 10;
|
||||
else window.X = 90000;
|
||||
}.bindenv(this));
|
||||
AddChild(JoinPartyButton);
|
||||
|
||||
//如果是我的队伍
|
||||
//退出按钮
|
||||
local ExitButton = LenheartNewUI_ButtonText(220, 268 + 8, 5, "退出");
|
||||
ExitButton.SetTextOffset(-1, 1);
|
||||
ExitButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20084009,
|
||||
teamsId = TeamID
|
||||
}
|
||||
SendPackEx(T);
|
||||
RinDro_Luke_Obj.MyCid = null;
|
||||
RinDro_Luke_Obj.MyRaidTeamId = null;
|
||||
RinDro_Luke_Obj.IsCaptain = null;
|
||||
|
||||
//重置所有选中 并且从攻坚大厅对象中移除这个子对象
|
||||
local HallWin = LenheartNewUI_CreateWindow(Rindro_Luke_PartyHallC, "新卢克攻坚大厅窗口", 320, 40, 478, 434, 18);
|
||||
HallWin.ResetAllSelect();
|
||||
HallWin.RemoveParty(this.TeamID);
|
||||
DestroyWindow();
|
||||
}.bindenv(this);
|
||||
ExitButton.SetCallBackFunc(function(window) {
|
||||
if (!IsMyTeam) window.X = X + 900000;
|
||||
else window.X = X + 220;
|
||||
}.bindenv(this));
|
||||
AddChild(ExitButton);
|
||||
|
||||
|
||||
//队伍编制按钮
|
||||
local PartyEditButton = LenheartNewUI_ButtonText(10, 268 + 8, 5, "队伍编制");
|
||||
PartyEditButton.SetTextOffset(-12, 1);
|
||||
PartyEditButton.OnClick = function() {
|
||||
local win = LenheartNewUI_CreateWindow(Rindro_LukePartyFormation, "卢克我的队伍编队窗口", 105, 40, 294, 192, 18);
|
||||
win.Visible = true;
|
||||
win.ResetFocus();
|
||||
}.bindenv(this);
|
||||
PartyEditButton.SetCallBackFunc(function(window) {
|
||||
if (!IsMyTeam || !IsCaptain) window.X = X + 900000;
|
||||
else window.X = X + 10;
|
||||
}.bindenv(this));
|
||||
AddChild(PartyEditButton);
|
||||
|
||||
//修改信息按钮
|
||||
local FqButton = LenheartNewUI_ButtonText(100, 267 + 8, 5, "修改信息");
|
||||
FqButton.State = 8;
|
||||
FqButton.SetTextOffset(-12, 1);
|
||||
FqButton.SetCallBackFunc(function(window) {
|
||||
if (!IsMyTeam || !IsCaptain) window.X = X + 900000;
|
||||
else window.X = X + 100;
|
||||
}.bindenv(this));
|
||||
AddChild(FqButton);
|
||||
|
||||
//队伍招募按钮
|
||||
local FqButton1 = LenheartNewUI_ButtonText(160, 267 + 8, 5, "队伍招募");
|
||||
FqButton1.State = 8;
|
||||
FqButton1.SetTextOffset(-12, 1);
|
||||
FqButton1.SetCallBackFunc(function(window) {
|
||||
if (!IsMyTeam || !IsCaptain) window.X = X + 900000;
|
||||
else window.X = X + 160;
|
||||
}.bindenv(this));
|
||||
AddChild(FqButton1);
|
||||
|
||||
|
||||
//队伍招募按钮
|
||||
local FightOpenButton = LenheartNewUI_ButtonText(290, 268 + 8, 5, "开始攻坚");
|
||||
FightOpenButton.SetTextOffset(-12, 1);
|
||||
FightOpenButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20084051,
|
||||
teamsId = TeamID
|
||||
}
|
||||
SendPackEx(T);
|
||||
}.bindenv(this);
|
||||
FightOpenButton.SetCallBackFunc(function(window) {
|
||||
// if (!IsMyTeam || !IsCaptain || RinDro_Luke_Obj.EndTime) window.X = X + 900000;
|
||||
// else window.X = X + 290;
|
||||
if ((RinDro_Luke_Obj.MyRaidState == 0 || RinDro_Luke_Obj.MyRaidState == 2) && IsCaptain && IsMyTeam) window.X = X + 290;
|
||||
else window.X = X + 900000;
|
||||
}.bindenv(this));
|
||||
AddChild(FightOpenButton);
|
||||
}
|
||||
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
//如果没有信息则直接返回不绘制
|
||||
if (!InfoFlag) return;
|
||||
//标题栏
|
||||
L_sq_DrawButton(X, Y, 344, "interface/lenheartwindowcommon.img", 609, 2, 7);
|
||||
//绘制队伍名字
|
||||
L_sq_DrawCode(TeamName, X + 178 - LenheartTextClass.GetStringLength(TeamName) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y + 17, 340, 252, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
//绘制头图
|
||||
L_sq_DrawImg("interface2/gcontents/180621_fiendwar/raid/memberwindow.img", 1, X + 10, Y + 24);
|
||||
//绘制阶段图 //TODO 根据阶段绘制img
|
||||
L_sq_DrawImg("hud/rindroanton.img", 7, X + 296, Y + 34);
|
||||
|
||||
//绘制队伍List
|
||||
DrawMembersList(obj);
|
||||
}
|
||||
|
||||
//绘制队伍信息
|
||||
function DrawMembersList(obj) {
|
||||
if (MembersList.len() <= 0) return;
|
||||
//遍历需要显示的同步坐标
|
||||
foreach(Index, TeamObj in MembersList) {
|
||||
TeamObj.SyncPos(X, Y + 2 + Index * 23);
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
# override # "
|
||||
* @函数作用:
|
||||
* @参数 name
|
||||
* @返回值
|
||||
*/
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
foreach(Window in Childrens) {
|
||||
Window.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
}
|
||||
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
//判断没有点到具体角色就隐藏
|
||||
if (!sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X, Y + 80, Width, MembersList.len() * 21)) {
|
||||
//交互窗口需要隐藏
|
||||
local Each = LenheartNewUI_CreateWindow(Rindro_LukePlayerInteractiveC, "卢克玩家交互", X, Y, 100, 21, 0);
|
||||
Each.Visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
192
Project/Luke/Rindro_Luke_PartyMemberInfo.nut
Normal file
192
Project/Luke/Rindro_Luke_PartyMemberInfo.nut
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_PartyMemberInfo.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_PartyMemberInfo.nut
|
||||
创建日期:2024-07-15 22:52
|
||||
文件用途:卢克队伍横条
|
||||
*/
|
||||
//队员显示类
|
||||
class Rindro_LukePartyInfoMemberC extends LenheartNewUI_CommonUi {
|
||||
X = 0;
|
||||
Y = 0;
|
||||
Width = null;
|
||||
Height = null;
|
||||
InfoObj = null;
|
||||
|
||||
//构造时间
|
||||
ConstructorTime = null;
|
||||
//选中状态
|
||||
SelectState = false;
|
||||
//攻坚状态
|
||||
OffensiveState = 0;
|
||||
//头像框的颜色
|
||||
HandBoxColor = [
|
||||
0xff717272,
|
||||
0xff7b2a29,
|
||||
0xff874e0d,
|
||||
0xff8b8108,
|
||||
0xff658e2d,
|
||||
0xff0f5c8a,
|
||||
0xff27238f,
|
||||
0xff4e2491,
|
||||
0xff932586,
|
||||
]
|
||||
|
||||
//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(gInfoObj) {
|
||||
ConstructorTime = Clock();
|
||||
|
||||
InfoObj = gInfoObj;
|
||||
this.Width = 458;
|
||||
this.Height = 21;
|
||||
|
||||
this.OnClick = function() {
|
||||
//还原其他 选中自己
|
||||
foreach(Obj in Parent.MembersList) {
|
||||
Obj.SelectState = false;
|
||||
}
|
||||
SelectState = !SelectState;
|
||||
|
||||
local win = LenheartNewUI_CreateWindow(Rindro_LukePartyFormation, "卢克我的队伍编队窗口", 105, 40, 294, 192, 18);
|
||||
//编队状态
|
||||
if (win.PartyMarkFlag != -1) {
|
||||
//并且是属于我的攻坚队的成员
|
||||
if (RinDro_Luke_Obj.MyRaidTeamId == InfoObj.PartyId) {
|
||||
local gnum = win.PartyMarkFlag + 1;
|
||||
if (gnum == 100) gnum = 0;
|
||||
local T = {
|
||||
op = 20084015,
|
||||
teamsId = InfoObj.PartyId,
|
||||
cidNew = InfoObj.Cid,
|
||||
num = gnum
|
||||
}
|
||||
SendPackEx(T);
|
||||
win.PartyMarkFlag = -1;
|
||||
R_Mouse.SetType(0);
|
||||
win.ResetFocus();
|
||||
return;
|
||||
}
|
||||
//点了其他队伍成员要还原编队状态
|
||||
else {
|
||||
win.PartyMarkFlag = -1;
|
||||
R_Mouse.SetType(0);
|
||||
}
|
||||
}
|
||||
|
||||
local Interactive = LenheartNewUI_CreateWindow(Rindro_LukePlayerInteractiveC, "卢克玩家交互", 0, 0, 100, 21, 0);
|
||||
//改变鼠标坐标
|
||||
Interactive.X = MousePos_X;
|
||||
Interactive.Y = MousePos_Y;
|
||||
//赋值对象参数
|
||||
Interactive.InfoObj = InfoObj;
|
||||
//对象不是我
|
||||
if (InfoObj.Cid == RinDro_Luke_Obj.MyCid) {
|
||||
Interactive.InfoObj.IsMyself <- true;
|
||||
}
|
||||
//刷新UI
|
||||
Interactive.InitInfo();
|
||||
}
|
||||
LenheartNewUI_CommonUi.constructor(10, 82, this.Width, this.Height);
|
||||
|
||||
|
||||
//如果没有材料要建立一个购买材料的Button 并且要判断是否是自己 //TODO 这里还不行 要拓展一个函数来比对名字
|
||||
/*
|
||||
local Name = L_Sq_GetObjectName(sq_GetMyMasterCharacter());
|
||||
local Name2 = "夜刃";
|
||||
Name == Name2 失败了
|
||||
*/
|
||||
// if (!InfoObj.StkHasFlag && InfoObj.Name == L_Sq_GetObjectName(sq_GetMyMasterCharacter())) {
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
// print(this);
|
||||
//绘制底槽
|
||||
L_sq_DrawImg("hud/rindroanton.img", 12, X, Y);
|
||||
|
||||
|
||||
//绘制队伍编号
|
||||
L_sq_DrawImg("interface/newstyle/windows/party/party_icon.img", InfoObj.TeamId * 3, X, Y + 1);
|
||||
|
||||
sq_DrawBox(X + 42, Y + 1, 22, 18, HandBoxColor[InfoObj.TeamId]);
|
||||
//绘制队长头像
|
||||
foreach(AvatarObj in InfoObj.EquVos) {
|
||||
local AXpos = AvatarObj.F[0][2] + X + OffsetArr[InfoObj.Job][0];
|
||||
local AYpos = AvatarObj.F[0][3] + Y + OffsetArr[InfoObj.Job][1];
|
||||
setClip(AXpos + OffsetArr[InfoObj.Job][2], AYpos + OffsetArr[InfoObj.Job][3], AXpos + OffsetArr[InfoObj.Job][2] + 22, AYpos + OffsetArr[InfoObj.Job][3] + 18); //开始裁切
|
||||
L_sq_DrawImg("character/" + AvatarObj.B + ".img", AvatarObj.F[0][0], AXpos, AYpos);
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
|
||||
if (InfoObj.Captain) L_sq_DrawImg("hud/rindroanton.img", 18, X + 42, Y + 1);
|
||||
|
||||
|
||||
//绘制等级
|
||||
L_sq_DrawCode(InfoObj.Level, X + 76 - LenheartTextClass.GetStringLength(InfoObj.Level) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制角色名
|
||||
L_sq_DrawCode(InfoObj.Name, X + 138 - LenheartTextClass.GetStringLength(InfoObj.Name) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
//绘制职业名
|
||||
L_sq_DrawCode(InfoObj.JobName, X + 234 - LenheartTextClass.GetStringLength(InfoObj.JobName) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
||||
|
||||
|
||||
//离线了
|
||||
if (InfoObj.ExitTime > 0) {
|
||||
local DrawTime = InfoObj.ExitTime - (Clock() - ConstructorTime);
|
||||
local seconds = (DrawTime / 1000) % 60; // 计算秒数
|
||||
local minutes = (DrawTime / (1000 * 60)) % 60; // 计算分钟数
|
||||
local DrawTimeStr = format("%02d分%02d秒", minutes, seconds);
|
||||
|
||||
L_sq_DrawCode(DrawTimeStr, X + 306 - LenheartTextClass.GetStringLength(DrawTimeStr) / 2, Y + 5, sq_RGBA(255, 50, 50, 255), 0, 1);
|
||||
}
|
||||
//通关次数
|
||||
else if (InfoObj.ClearanceCount > 0) {
|
||||
L_sq_DrawCode((InfoObj.ClearanceCount - 1) + "/" + (InfoObj.ClearanceCountMax), X + 306 - LenheartTextClass.GetStringLength((InfoObj.ClearanceCount - 1) + "/" + (InfoObj.ClearanceCountMax)) / 2, Y + 5, sq_RGBA(250, 250, 181, 255), 0, 1);
|
||||
} else if (InfoObj.StkHasFlag) {
|
||||
L_sq_DrawImg("hud/rindroantonstk.img", 0, X + 280, Y + 3);
|
||||
} else {
|
||||
L_sq_DrawImg("hud/rindroantonstk.img", 1, X + 280, Y + 3);
|
||||
}
|
||||
|
||||
if (SelectState) {
|
||||
L_sq_DrawImg("hud/rindroanton.img", 13, X, Y);
|
||||
}
|
||||
|
||||
if (isInRect) {
|
||||
L_sq_DrawImg("hud/rindroanton.img", 13, X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
MousePos_X = 0;
|
||||
MousePos_Y = 0;
|
||||
//鼠标事件回调
|
||||
function OnMouseProc(Flag, gMousePos_X, gMousePos_Y) {
|
||||
this.MousePos_X = gMousePos_X;
|
||||
this.MousePos_Y = gMousePos_Y;
|
||||
LenheartNewUI_CommonUi.OnMouseProc(Flag, gMousePos_X, gMousePos_Y);
|
||||
}
|
||||
}
|
||||
227
Project/Luke/Rindro_Luke_PlayerInteractive.nut
Normal file
227
Project/Luke/Rindro_Luke_PlayerInteractive.nut
Normal file
@@ -0,0 +1,227 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_PlayerInteractive.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_PlayerInteractive.nut
|
||||
创建日期:2024-07-16 11:02
|
||||
文件用途:卢克攻坚队玩家交互按钮
|
||||
*/
|
||||
//角色交互按钮需要传递参数所以重写
|
||||
class Rindro_LukeInteractive_BaseButton extends LenheartNewUI_BaseButton {
|
||||
|
||||
OnShow = null;
|
||||
|
||||
constructor(X, Y, W, H, Path, Idx) {
|
||||
|
||||
LenheartNewUI_BaseButton.constructor(X, Y, W, H, Path, Idx);
|
||||
}
|
||||
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
Y--;
|
||||
if (isLBDown && OnClick) {
|
||||
OnClick();
|
||||
}
|
||||
isLBDown = false;
|
||||
local Each = LenheartNewUI_CreateWindow(Rindro_LukePlayerInteractiveC, "卢克玩家交互", X, Y, 100, 21, 0);
|
||||
Each.Visible = false;
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//不可用
|
||||
if (State == 8) {
|
||||
L_sq_DrawImg(Path, Idx + 3, X, Y + 1);
|
||||
} else {
|
||||
//按下
|
||||
if (isLBDown) {
|
||||
Y++;
|
||||
L_sq_DrawImg(Path, (Idx * 2) + 2, X, Y);
|
||||
}
|
||||
//悬停
|
||||
else if (isInRect) {
|
||||
L_sq_DrawImg(Path, (Idx * 2) + 1, X, Y);
|
||||
}
|
||||
//普通
|
||||
else {
|
||||
L_sq_DrawImg(Path, 0, X, Y);
|
||||
}
|
||||
}
|
||||
if (OnShow) OnShow(X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
//角色交互类
|
||||
class Rindro_LukePlayerInteractiveC extends LenheartNewUI_Windows {
|
||||
// DeBugMode = true;
|
||||
|
||||
//信息对象
|
||||
InfoObj = null;
|
||||
|
||||
//初始化Flag 初始化以后才显示
|
||||
InitInfoFlag = false;
|
||||
|
||||
//有多少个标签
|
||||
InitIndexFlag = 1;
|
||||
|
||||
//头像框颜色
|
||||
HandBoxColor = [
|
||||
0xff717272,
|
||||
0xff7b2a29,
|
||||
0xff874e0d,
|
||||
0xff8b8108,
|
||||
0xff658e2d,
|
||||
0xff0f5c8a,
|
||||
0xff27238f,
|
||||
0xff4e2491,
|
||||
0xff932586,
|
||||
]
|
||||
|
||||
//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 = [];
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
}
|
||||
|
||||
//初始化信息
|
||||
function InitInfo() {
|
||||
Childrens = [];
|
||||
//还原标签数量
|
||||
InitIndexFlag = 1;
|
||||
//还原高度
|
||||
Height = 21;
|
||||
//还原可见性
|
||||
Visible = true;
|
||||
//置顶窗口
|
||||
ResetFocus();
|
||||
RegisterWidget();
|
||||
InitInfoFlag = true;
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
|
||||
|
||||
//是团长才能委任 并且不是我自己 并且我们在同一个攻坚队
|
||||
if (RinDro_Luke_Obj.IsCaptain && !("IsMyself" in InfoObj) && RinDro_Luke_Obj.MyRaidTeamId == InfoObj.PartyId) {
|
||||
//委任团长按钮
|
||||
local GiveMasterButton = Rindro_LukeInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 0);
|
||||
GiveMasterButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_character.img", 11, X, Y + 2);
|
||||
L_sq_DrawCode("委任团长", X + 36, Y + 5, sq_RGBA(104, 213, 237, 255), 0, 1);
|
||||
}
|
||||
GiveMasterButton.OnClick = function() {
|
||||
|
||||
}.bindenv(this);
|
||||
AddChild(GiveMasterButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
}
|
||||
|
||||
//查看信息按钮
|
||||
local CheckInfoButton = Rindro_LukeInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 0);
|
||||
CheckInfoButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_character.img", 10, X, Y + 2);
|
||||
L_sq_DrawCode("查看信息", X + 36, Y + 5, sq_RGBA(104, 213, 237, 255), 0, 1);
|
||||
}
|
||||
CheckInfoButton.OnClick = function() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
//obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(8);
|
||||
L_sq_SendPackWord(InfoObj.PlayerSession);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPack();
|
||||
getroottable().WindowsShowABFlag <- false; //让原生窗口置顶
|
||||
}.bindenv(this);
|
||||
AddChild(CheckInfoButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
|
||||
if (!("IsMyself" in InfoObj)) {
|
||||
//交易按钮
|
||||
local TransactionButton = Rindro_LukeInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 0);
|
||||
TransactionButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_character.img", 0, X, Y + 2);
|
||||
L_sq_DrawCode("交易", X + 46, Y + 5, sq_RGBA(104, 213, 237, 255), 0, 1);
|
||||
}
|
||||
TransactionButton.OnClick = function() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
//obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(InfoObj.PlayerSession);
|
||||
L_sq_SendPackByte(1);
|
||||
L_sq_SendPackDWord(22053);
|
||||
L_sq_SendPack();
|
||||
getroottable().WindowsShowABFlag <- false; //让原生窗口置顶
|
||||
}.bindenv(this);
|
||||
AddChild(TransactionButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
|
||||
|
||||
if (RinDro_Luke_Obj.IsCaptain && RinDro_Luke_Obj.MyRaidTeamId == InfoObj.PartyId) {
|
||||
//攻坚队员强退按钮
|
||||
local KickMemberButton = Rindro_LukeInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 4);
|
||||
KickMemberButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_warning.img", 3, X, Y + 2);
|
||||
L_sq_DrawCode("攻坚队员强退", X + 24, Y + 5, sq_RGBA(255, 50, 50, 255), 0, 1);
|
||||
}
|
||||
KickMemberButton.OnClick = function() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
//obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local T = {
|
||||
op = 20084021,
|
||||
teamsId = InfoObj.PartyId,
|
||||
charCid = InfoObj.Cid
|
||||
}
|
||||
SendPackEx(T);
|
||||
}.bindenv(this);
|
||||
AddChild(KickMemberButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (!InitInfoFlag) return;
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_back.img", 0, X, Y);
|
||||
//绘制角色名
|
||||
L_sq_DrawCode(InfoObj.Name, X + 61 - LenheartTextClass.GetStringLength(InfoObj.Name) / 2, Y + 4, sq_RGBA(169, 255, 171, 255), 0, 1);
|
||||
//绘制头像
|
||||
foreach(AvatarObj in InfoObj.EquVos) {
|
||||
local AXpos = AvatarObj.F[0][2] + X + OffsetArr[InfoObj.Job][0] - 40;
|
||||
local AYpos = AvatarObj.F[0][3] + Y + OffsetArr[InfoObj.Job][1];
|
||||
setClip(AXpos + OffsetArr[InfoObj.Job][2], AYpos + OffsetArr[InfoObj.Job][3], AXpos + OffsetArr[InfoObj.Job][2] + 22, AYpos + OffsetArr[InfoObj.Job][3] + 18); //开始裁切
|
||||
L_sq_DrawImg("character/" + AvatarObj.B + ".img", AvatarObj.F[0][0], AXpos, AYpos);
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
}
|
||||
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
}
|
||||
785
Project/Luke/Rindro_Luke_Reward.nut
Normal file
785
Project/Luke/Rindro_Luke_Reward.nut
Normal file
@@ -0,0 +1,785 @@
|
||||
/*
|
||||
文件名:Rindro_Luke_Reward.nut
|
||||
路径:Plugins/New_Luke/Rindro_Luke_Reward.nut
|
||||
创建日期:2024-07-29 10:04
|
||||
文件用途:卢克翻牌奖励
|
||||
*/
|
||||
class Rindro_Luke_RewardC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
NoWindow = true;
|
||||
//奖励阶段
|
||||
Stage = 1;
|
||||
|
||||
//小队奖励包
|
||||
PartyReward = null;
|
||||
//团队奖励包
|
||||
TeamReward = null;
|
||||
//死亡次数
|
||||
Deaths = 0;
|
||||
//通关时间
|
||||
Time = 0;
|
||||
//奖励动画开始时间
|
||||
AniStartFlag = null;
|
||||
|
||||
//紫色闪光
|
||||
PurpleLight = null;
|
||||
//粉色闪光
|
||||
PinkLight = null;
|
||||
//金色闪光
|
||||
GoldenLight = null;
|
||||
//彩色闪光
|
||||
RarityLight = null;
|
||||
|
||||
ItemNameColor = [
|
||||
0xffffffff, //白装
|
||||
0xffedd568, //蓝装
|
||||
0xffff6bb3, //紫装
|
||||
0xfff000ff, //粉装
|
||||
0xff0082ff, //传说
|
||||
0xff00b1ff //史诗
|
||||
]
|
||||
|
||||
//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) {
|
||||
PurpleLight = [];
|
||||
PinkLight = [];
|
||||
GoldenLight = [];
|
||||
RarityLight = [];
|
||||
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
local PurpleFrameArr = [];
|
||||
for (local i = 0; i< 11; i++) {
|
||||
local T = {
|
||||
ImgIndex = i,
|
||||
Delay = 60,
|
||||
Pos = [0, 0]
|
||||
}
|
||||
PurpleFrameArr.append(T);
|
||||
}
|
||||
for (local i = 0; i< 24; i++) {
|
||||
local PurpleLightBuf = Lenheart_Ani("", PurpleFrameArr, [0, 0]);
|
||||
PurpleLightBuf.ImgPath = "common/commoneffect/itemdropeffect/rare_beam.img";
|
||||
PurpleLightBuf.LoopFlag = false;
|
||||
PurpleLight.append(PurpleLightBuf);
|
||||
}
|
||||
|
||||
local PinkFrameArr = [];
|
||||
for (local i = 0; i< 11; i++) {
|
||||
local T = {
|
||||
ImgIndex = i,
|
||||
Delay = 60,
|
||||
Pos = [0, 0]
|
||||
}
|
||||
PinkFrameArr.append(T);
|
||||
}
|
||||
for (local i = 0; i< 24; i++) {
|
||||
local PinkLightBuf = Lenheart_Ani("", PinkFrameArr, [0, 0]);
|
||||
PinkLightBuf.ImgPath = "common/commoneffect/itemdropeffect/unique_beam.img";
|
||||
PinkLightBuf.LoopFlag = false;
|
||||
PinkLight.append(PinkLightBuf);
|
||||
}
|
||||
|
||||
local FrameArr = [];
|
||||
for (local i = 0; i< 11; i++) {
|
||||
local T = {
|
||||
ImgIndex = i,
|
||||
Delay = 60,
|
||||
Pos = [0, 0]
|
||||
}
|
||||
FrameArr.append(T);
|
||||
}
|
||||
for (local i = 0; i< 24; i++) {
|
||||
local GoldenLightBuf = Lenheart_Ani("anton/lightbar.img", FrameArr, [0, 0]);
|
||||
GoldenLightBuf.ImgPath = "anton/lightbar.img";
|
||||
GoldenLightBuf.LoopFlag = false;
|
||||
GoldenLight.append(GoldenLightBuf);
|
||||
}
|
||||
|
||||
local FrameArr2 = [];
|
||||
for (local i = 0; i< 11; i++) {
|
||||
local T = {
|
||||
ImgIndex = i,
|
||||
Delay = 60,
|
||||
Pos = [0, 0]
|
||||
}
|
||||
FrameArr2.append(T);
|
||||
}
|
||||
for (local i = 0; i< 24; i++) {
|
||||
local RarityLightBuf = Lenheart_Ani("anton/lightbar.img", FrameArr2, [0, 0]);
|
||||
RarityLightBuf.ImgPath = "anton/ralightbar.img";
|
||||
RarityLightBuf.LoopFlag = false;
|
||||
RarityLight.append(RarityLightBuf);
|
||||
}
|
||||
}
|
||||
|
||||
function Init(Info) {
|
||||
Stage = Info.state;
|
||||
|
||||
//小队奖励信息
|
||||
PartyReward = [];
|
||||
for (local i = 0; i< 4; i++) {
|
||||
if (Info.rewards.len() > i && Info.rewards[i].item != -1) {
|
||||
Info.rewards[i].Flag <- true;
|
||||
PartyReward.append(Info.rewards[i]);
|
||||
} else {
|
||||
PartyReward.append({
|
||||
Flag = false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
TeamReward = [];
|
||||
for (local i = 0; i< 20; i++) {
|
||||
if (Info.rewards2.len() > i && Info.rewards2[i][0].item != -1) {
|
||||
Info.rewards2[i][0].Flag <- true;
|
||||
TeamReward.append(Info.rewards2[i][0]);
|
||||
} else {
|
||||
TeamReward.append({
|
||||
Flag = false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Deaths = Info.deathsNum;
|
||||
Time = Info.time;
|
||||
|
||||
AniName_Flag = Clock();
|
||||
AniStartFlag = Clock();
|
||||
InitActStage();
|
||||
|
||||
//重置演出Flag
|
||||
ActFlag = 0;
|
||||
//重置紫色闪光
|
||||
foreach(obj in PurpleLight) {
|
||||
obj.Reset();
|
||||
}
|
||||
//重置粉色闪光
|
||||
foreach(obj in PinkLight) {
|
||||
obj.Reset();
|
||||
}
|
||||
//重置金色闪光
|
||||
foreach(obj in GoldenLight) {
|
||||
obj.Reset();
|
||||
}
|
||||
//重置彩色闪光
|
||||
foreach(obj in RarityLight) {
|
||||
obj.Reset();
|
||||
}
|
||||
|
||||
Visible = true;
|
||||
ResetFocus();
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
AniName_Flag = 0;
|
||||
//演出Flag
|
||||
ActFlag = 0;
|
||||
|
||||
//演出脚本List
|
||||
ActStageList = null;
|
||||
//演出脚本时间
|
||||
ActStageTime = null;
|
||||
//演出Img
|
||||
ActStageImg = null;
|
||||
//演出脚本初始化
|
||||
function InitActStage() {
|
||||
ActStageList = [];
|
||||
ActStageImg = {};
|
||||
ActStageTime = Clock();
|
||||
|
||||
|
||||
ActStageImg.luke_reward_new <- Rindro_Image("interface2/raid/luke/reward/luke_reward_new.img");
|
||||
ActStageImg.luke_reward_rank <- Rindro_Image("interface2/raid/luke/reward/luke_reward_rank/luke_reward_rank.img");
|
||||
ActStageImg.luke_reward_digit <- Rindro_Image("interface2/raid/luke/reward/luke_reward_digit/luke_reward_digit.img");
|
||||
ActStageImg.anton_reward <- Rindro_Image("interface2/raid/anton/reward/anton_reward.img");
|
||||
|
||||
//绘制背景
|
||||
RegisterActStage(0, 9999999, function(CTime) {
|
||||
//背景
|
||||
ActStageImg.luke_reward_new.DrawExPng(10, X + 0, Y + 0, 0, sq_RGBA(255, 255, 255, 250), 1.0 * (getroottable().Rindro_Scr_Width / 800.0), 1.0);
|
||||
//标题背景
|
||||
ActStageImg.luke_reward_new.DrawPng(0, X + ((getroottable().Rindro_Scr_Width - 220) / 2), Y + 20);
|
||||
|
||||
})
|
||||
|
||||
//绘制标题
|
||||
RegisterActStage(0, 9999999, function(CTime) {
|
||||
local SX = ((getroottable().Rindro_Scr_Width - 135) / 2) - 43;
|
||||
local TitleImgIdx = 1;
|
||||
if (Stage == 2) TitleImgIdx = 7;
|
||||
local TileMoveTime = 1000;
|
||||
local TitleXposOffset = sq_GetAccel(0, 50, CTime, TileMoveTime, true);
|
||||
local TitleAlphaOffset = sq_GetAccel(0, 250, CTime, TileMoveTime * 2, true);
|
||||
ActStageImg.luke_reward_new.DrawExPng(TitleImgIdx + 1, SX + 50 - TitleXposOffset, Y + 12, 0, sq_RGBA(255, 255, 255, TitleAlphaOffset), 1.0, 1.0);
|
||||
ActStageImg.luke_reward_new.DrawExPng(TitleImgIdx, SX + 50 - TitleXposOffset, Y + 12, 0, sq_RGBA(255, 255, 255, TitleAlphaOffset), 1.0, 1.0);
|
||||
}.bindenv(this));
|
||||
|
||||
//绘制时间
|
||||
RegisterActStage(1000, 9999999, function(CTime) {
|
||||
local SX = ((getroottable().Rindro_Scr_Width - 507) / 2) - 25;
|
||||
local obj = sq_getMyCharacter();
|
||||
local TitleAlphaOffset = sq_GetAccel(0, 250, CTime, 1000 * 2, true);
|
||||
ActStageImg.luke_reward_new.DrawExPng(11, SX, Y + 114, 0, sq_RGBA(255, 255, 255, TitleAlphaOffset), 1.0, 1.0);
|
||||
ActStageImg.luke_reward_new.DrawExPng(12, SX, Y + 114, 0, sq_RGBA(255, 255, 255, TitleAlphaOffset), 1.0, 1.0);
|
||||
T_DrawDynamicAni(obj, "common/luke/newre/reward_time_01.ani", SX + 500, Y + 147, "luke_reward_TimeLunAni" + ActStageTime);
|
||||
|
||||
|
||||
local Yoffset = 136;
|
||||
local al = sq_GetUniformVelocity(0, 100, CTime, 800);
|
||||
local AlphaValue = al.tofloat() / 100.0;
|
||||
|
||||
local DrawTime = Time;
|
||||
if (al< 100) {
|
||||
DrawTime = (Time - 500) + ((500 * AlphaValue).tointeger());
|
||||
}
|
||||
local seconds = DrawTime / 10;
|
||||
local hours = seconds / 3600;
|
||||
local minutes = seconds / 60;
|
||||
|
||||
seconds %= 60;
|
||||
hours = format("%02d", hours);
|
||||
seconds = format("%02d", seconds).slice(-2);
|
||||
minutes = format("%02d", minutes).slice(-2);
|
||||
|
||||
local Offset = 153;
|
||||
ActStageImg.luke_reward_digit.DrawExPng(hours.slice(0, 1).tointeger(), SX - 280 + 240 + Offset, Y + Yoffset, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
ActStageImg.luke_reward_digit.DrawExPng(hours.slice(1).tointeger(), SX - 280 + 255 + Offset, Y + Yoffset, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
ActStageImg.luke_reward_digit.DrawExPng(11, SX - 280 + 276 + Offset, Y + Yoffset - 1, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
|
||||
Offset += 60;
|
||||
ActStageImg.luke_reward_digit.DrawExPng(minutes.slice(0, 1).tointeger(), SX - 280 + 240 + Offset, Y + Yoffset, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
ActStageImg.luke_reward_digit.DrawExPng(minutes.slice(1).tointeger(), SX - 280 + 255 + Offset, Y + Yoffset, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
ActStageImg.luke_reward_digit.DrawExPng(12, SX - 280 + 286 + Offset, Y + Yoffset - 1, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
|
||||
Offset += 210;
|
||||
local DrawDieStr = format("%02d", Deaths);
|
||||
ActStageImg.luke_reward_digit.DrawExPng(DrawDieStr.slice(0, 1).tointeger(), SX - 280 + 240 + Offset, Y + Yoffset, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
ActStageImg.luke_reward_digit.DrawExPng(DrawDieStr.slice(1).tointeger(), SX - 280 + 260 + Offset, Y + Yoffset, 0, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
|
||||
ActStageImg.luke_reward_rank.DrawExPng(0, SX + 454, Y + 114, 0, sq_RGBA(255, 255, 255, TitleAlphaOffset), 1.0, 1.0);
|
||||
}.bindenv(this))
|
||||
|
||||
|
||||
//绘制小队分牌
|
||||
RegisterActStage(2000, 3000, function(CTime) {
|
||||
local SX = ((getroottable().Rindro_Scr_Width) / 2);
|
||||
local obj = sq_getMyCharacter();
|
||||
T_DrawDynamicAni(obj, "common/luke/newre/cardspread_000.ani", SX - 406, Y + 56, "cardspread_000" + ActStageTime);
|
||||
}.bindenv(this));
|
||||
|
||||
// 绘制小队翻牌
|
||||
RegisterActStage(3000, 7000, function(CTime) {
|
||||
if (Stage == 1 && CTime >= 3000) ActStageTime = null;
|
||||
|
||||
local SX = ((getroottable().Rindro_Scr_Width) / 2);
|
||||
local obj = sq_getMyCharacter();
|
||||
local CradAlphaOffset = sq_GetAccel(0, 250, CTime, 400, true);
|
||||
local OpenRealXrate = sq_GetAccel(0, 100, CTime, 400, true);
|
||||
|
||||
for (local i = 0; i< 4; i++) {
|
||||
local CardInfo = PartyReward[i];
|
||||
local Path = "common/luke/newre/reward_card_open1_00.ani";
|
||||
if (CardInfo.Flag == false) {
|
||||
Path = "common/luke/newre/reward_card_open2_00.ani";
|
||||
}
|
||||
local Ani = T_DrawDynamicAni(obj, Path, SX - 406 + 30 + (189 * i), Y + 56 + 225, Path + "2jd" + ActStageTime);
|
||||
|
||||
if (CardInfo.Flag == false) continue;
|
||||
GetItemInfo(CardInfo.item);
|
||||
local Rarity = L_sq_RA(Rindro_ItemInfoObject[CardInfo.item] + 0xF4);
|
||||
local NamePointer = L_sq_RA(Rindro_ItemInfoObject[CardInfo.item] + 0x20);
|
||||
local Name = NativePointer(L_sq_I2P(NamePointer)).readUnicodeString();
|
||||
ActStageImg.anton_reward.DrawExPng(5 + Rarity, SX - 311 + (189 * i), Y + 346, 0, sq_RGBA(255, 255, 255, CradAlphaOffset), OpenRealXrate / 100.0, 1.0);
|
||||
//绘制物品
|
||||
if (sq_GetCurrentTime(Ani) >= 350) {
|
||||
DrawItemBase(SX - 308 + (189 * i), Y + 348, CardInfo.item, CardInfo.num);
|
||||
L_sq_DrawCode(Name, SX - 293 + (189 * i) - LenheartTextClass.GetStringLength(Name) / 2, Y + 381, ItemNameColor[Rarity], 0, 1);
|
||||
}
|
||||
//物品出现光
|
||||
if (!CardInfo.grade) {
|
||||
if (Rarity <= 2) { //低于紫色闪紫光
|
||||
PurpleLight[20 + i].X = SX - 378 + (160 * i) - 218 + 54;
|
||||
PurpleLight[20 + i].Y = Y + 285 - 152 - 24 - 7;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PurpleLight[20 + i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 3) { //粉光
|
||||
PinkLight[20 + i].X = SX - 378 + (160 * i) - 218 + 54;
|
||||
PinkLight[20 + i].Y = Y + 285 - 152 - 24 - 7;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PinkLight[20 + i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 4) { //金光
|
||||
GoldenLight[20 + i].X = SX - 378 + (160 * i) - 218;
|
||||
GoldenLight[20 + i].Y = Y + 285 - 152 - 7;
|
||||
GoldenLight[20 + i].Show(Duration);
|
||||
}
|
||||
} else { //彩光
|
||||
RarityLight[20 + i].X = SX - 378 + (160 * i) - 218;
|
||||
RarityLight[20 + i].Y = Y + 285 - 152 - 7;
|
||||
RarityLight[20 + i].Show(Duration);
|
||||
}
|
||||
|
||||
if (CardInfo.Flag) {
|
||||
DrawProfile(CardInfo.cid, SX - 378 + (160 * i) - 218 + 313, Y + 285 - 152 - 7 + 180, 0);
|
||||
}
|
||||
}
|
||||
}.bindenv(this));
|
||||
|
||||
//如果是二阶段
|
||||
if (Stage == 2) {
|
||||
//绘制团队分牌
|
||||
RegisterActStage(7000, 8000, function(CTime) {
|
||||
local SX = ((getroottable().Rindro_Scr_Width) / 2);
|
||||
local obj = sq_getMyCharacter();
|
||||
T_DrawDynamicAni(obj, "common/luke/newre/cardspread_00.ani", SX - 406, Y - 12, "cardspread_00" + ActStageTime);
|
||||
}.bindenv(this));
|
||||
|
||||
//绘制小队翻牌
|
||||
RegisterActStage(8000, 12000, function(CTime) {
|
||||
if (Stage == 2 && CTime >= 3500) ActStageTime = null;
|
||||
|
||||
local SX = ((getroottable().Rindro_Scr_Width) / 2);
|
||||
local obj = sq_getMyCharacter();
|
||||
local CradAlphaOffset = sq_GetAccel(0, 250, CTime, 400, true);
|
||||
local OpenRealXrate = sq_GetAccel(0, 100, CTime, 400, true);
|
||||
|
||||
for (local i = 0; i< 8; i++) {
|
||||
local CardInfo = TeamReward[i];
|
||||
local Path = "common/luke/newre/reward_card_open1_00.ani";
|
||||
if (CardInfo.Flag == false) {
|
||||
Path = "common/luke/newre/reward_card_open2_00.ani";
|
||||
}
|
||||
local Ani = T_DrawDynamicAni(obj, Path, SX - 406 + 30 + (189 * (i % 4)), Y - 12 + 225 + ((i / 4) * 185), Path + ActStageTime);
|
||||
|
||||
if (CardInfo.Flag == false) continue;
|
||||
GetItemInfo(CardInfo.item);
|
||||
local Rarity = L_sq_RA(Rindro_ItemInfoObject[CardInfo.item] + 0xF4);
|
||||
local NamePointer = L_sq_RA(Rindro_ItemInfoObject[CardInfo.item] + 0x20);
|
||||
local Name = NativePointer(L_sq_I2P(NamePointer)).readUnicodeString();
|
||||
ActStageImg.anton_reward.DrawExPng(5 + Rarity, SX - 406 + 30 + (189 * (i % 4)) + 65, Y - 12 + 225 + ((i / 4) * 185) + 65, 0, sq_RGBA(255, 255, 255, CradAlphaOffset), OpenRealXrate / 100.0, 1.0);
|
||||
//绘制物品
|
||||
if (sq_GetCurrentTime(Ani) >= 350) {
|
||||
DrawItemBase(SX - 406 + 30 + (189 * (i % 4)) + 68, Y - 12 + 225 + ((i / 4) * 185) + 69, CardInfo.item, CardInfo.num);
|
||||
L_sq_DrawCode(Name, SX - 406 + (189 * (i % 4)) + 112 - LenheartTextClass.GetStringLength(Name) / 2, Y - 12 + 225 + ((i / 4) * 185) + 104, ItemNameColor[Rarity], 0, 1);
|
||||
}
|
||||
|
||||
//物品出现光
|
||||
if (!CardInfo.grade) {
|
||||
if (Rarity <= 2) { //低于紫色闪紫光
|
||||
PurpleLight[20 + i].X = SX - 540 + (189 * (i % 4));
|
||||
PurpleLight[20 + i].Y = Y - 12 + ((i / 4) * 185) + 45;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PurpleLight[20 + i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 3) { //粉光
|
||||
PinkLight[20 + i].X = SX - 540 + (189 * (i % 4));
|
||||
PinkLight[20 + i].Y = Y - 12 + ((i / 4) * 185) + 45;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PinkLight[20 + i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 4) { //金光
|
||||
GoldenLight[20 + i].X = SX - 540 + (189 * (i % 4)) - 58;
|
||||
GoldenLight[20 + i].Y = Y - 12 + 74 + ((i / 4) * 185);
|
||||
GoldenLight[20 + i].Show(Duration);
|
||||
}
|
||||
} else { //彩光
|
||||
RarityLight[20 + i].X = SX - 598 + (189 * (i % 4));
|
||||
RarityLight[20 + i].Y = Y - 12 + 74 + ((i / 4) * 185);
|
||||
RarityLight[20 + i].Show(Duration);
|
||||
}
|
||||
|
||||
if (CardInfo.Flag) {
|
||||
DrawProfile(CardInfo.cid, SX + (189 * (i % 4)) - 283, Y - 12 + 74 + 176 + ((i / 4) * 185), 0);
|
||||
}
|
||||
}
|
||||
}.bindenv(this));
|
||||
}
|
||||
}
|
||||
//演出脚本注册
|
||||
function RegisterActStage(StartTime, EndTime, Func) {
|
||||
local ActObject = {};
|
||||
ActObject.StartTime <- StartTime;
|
||||
ActObject.EndTime <- EndTime;
|
||||
ActObject.Func <- Func;
|
||||
ActStageList.append(ActObject);
|
||||
}
|
||||
//演出脚本执行
|
||||
function RunActStage() {
|
||||
if (!ActStageTime) return;
|
||||
//当前演出时间
|
||||
local C_Time = Clock() - ActStageTime;
|
||||
foreach(ActObject in ActStageList) {
|
||||
local ActStartTime = ActObject.StartTime;
|
||||
local ActEndTime = ActObject.EndTime;
|
||||
local ActFunc = ActObject.Func;
|
||||
//如果演出时间在演出时间内
|
||||
if (C_Time >= ActStartTime && C_Time <= ActEndTime) {
|
||||
//传入的相对时间
|
||||
ActFunc(C_Time - ActStartTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主界面
|
||||
function DrawMain(obj) {
|
||||
RunActStage();
|
||||
return;
|
||||
//如果初始化完成
|
||||
if (AniStartFlag) {
|
||||
local ExiTime = Clock() - AniStartFlag;
|
||||
//已经过时间
|
||||
local FlagTime = 0;
|
||||
|
||||
//绘制背景
|
||||
L_sq_DrawImg("interface2/raid/luke/reward/luke_reward_new.img", 10, X + 0, Y + 0, 1, sq_RGBA(255, 255, 255, 250), 1.0, 1.0);
|
||||
|
||||
|
||||
//绘制标题
|
||||
local TitleImgIdx = 14;
|
||||
if (Stage == 2) TitleImgIdx = 15;
|
||||
local TileMoveTime = 350;
|
||||
local TitleXposOffset = sq_GetAccel(0, 230, ExiTime, TileMoveTime, true);
|
||||
local TitleAlphaOffset = sq_GetAccel(0, 100, ExiTime, TileMoveTime, true);
|
||||
L_sq_DrawImg("interface2/raid/luke/reward/luke_reward.img", TitleImgIdx, X + TitleXposOffset - 50, Y + 40, 1, sq_RGBA(255, 255, 255, 150 + TitleAlphaOffset), 1.0, 1.0);
|
||||
if (TitleXposOffset >= 230 && ActFlag == 0) {
|
||||
ActFlag = 1;
|
||||
}
|
||||
FlagTime += TileMoveTime;
|
||||
|
||||
//绘制成功标志
|
||||
if (ActFlag >= 1) {
|
||||
//绘制成功
|
||||
local SuccessMoveTime = 350;
|
||||
local SuccessXposOffset = sq_GetAccel(150, 440, ExiTime - FlagTime, SuccessMoveTime, true);
|
||||
local SuccessAlphaOffset = sq_GetAccel(0, 100, ExiTime - FlagTime, SuccessMoveTime, true);
|
||||
L_sq_DrawImg("interface2/raid/luke/reward/luke_reward.img", 16, X + SuccessXposOffset - 70, Y + 26, 1, sq_RGBA(255, 255, 255, 150 + SuccessAlphaOffset), 1.0, 1.0);
|
||||
if (SuccessXposOffset >= 440 && ActFlag == 1) {
|
||||
ActFlag = 2;
|
||||
}
|
||||
|
||||
FlagTime += SuccessMoveTime;
|
||||
}
|
||||
|
||||
|
||||
//绘制时间底槽
|
||||
if (ActFlag >= 2) {
|
||||
local TimeSlotMoveTime = 350;
|
||||
local TimeSlotXposOffset = sq_GetAccel(280, 120, ExiTime - FlagTime, TimeSlotMoveTime, true);
|
||||
local TimeSlotAlphaOffset = sq_GetAccel(0, 100, ExiTime - FlagTime, TimeSlotMoveTime, true);
|
||||
L_sq_DrawImg("hud/newantondungeonreward.img", 3, X + TimeSlotXposOffset, Y + 100, 1, sq_RGBA(255, 255, 255, 150 + TimeSlotAlphaOffset), 1.0, 1.0);
|
||||
if (TimeSlotXposOffset <= 120 && ActFlag == 2) {
|
||||
ActFlag = 3;
|
||||
FlagTime += TimeSlotMoveTime;
|
||||
}
|
||||
}
|
||||
|
||||
//绘制通关时间
|
||||
if (ActFlag >= 3) {
|
||||
local Yoffset = 114;
|
||||
local al = sq_GetUniformVelocity(0, 100, ExiTime - FlagTime, 800);
|
||||
local AlphaValue = al.tofloat() / 100.0;
|
||||
|
||||
local DrawTime = Time;
|
||||
if (al< 100) {
|
||||
DrawTime = (Time - 500) + ((500 * AlphaValue).tointeger());
|
||||
}
|
||||
local seconds = DrawTime / 10;
|
||||
local hours = seconds / 3600;
|
||||
local minutes = seconds / 60;
|
||||
|
||||
seconds %= 60;
|
||||
hours = format("%02d", hours);
|
||||
seconds = format("%02d", seconds).slice(-2);
|
||||
minutes = format("%02d", minutes).slice(-2);
|
||||
|
||||
local Offset = -6;
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", hours.slice(0, 1).tointeger(), X + 240 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", hours.slice(1).tointeger(), X + 260 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", 10, X + 286 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
Offset += 60;
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", minutes.slice(0, 1).tointeger(), X + 240 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", minutes.slice(1).tointeger(), X + 260 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", 10, X + 286 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
Offset += 60;
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", seconds.slice(0, 1).tointeger(), X + 240 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", seconds.slice(1).tointeger(), X + 260 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
|
||||
Offset += 160;
|
||||
local DrawDieStr = format("%02d", Deaths);
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", DrawDieStr.slice(0, 1).tointeger(), X + 240 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
L_sq_DrawImg("hud/newantonrewardtime.img", DrawDieStr.slice(1).tointeger(), X + 260 + Offset, Y + Yoffset, 1, sq_RGBA(255, 255, 255, (250.0 * AlphaValue).tointeger()), 1.0, 1.0);
|
||||
|
||||
if (al >= 100) {
|
||||
if (ActFlag == 3) {
|
||||
ActFlag = 4;
|
||||
FlagTime += 800;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//绘制评分
|
||||
if (ActFlag >= 4) {
|
||||
local Ani = T_DrawDynamicAni(obj, "common/anton/reward/reward_rank_00.ani", X + 570, Y + 76, "卢克评分" + AniName_Flag);
|
||||
if (sq_IsEnd(Ani)) {
|
||||
if (ActFlag == 4) {
|
||||
ActFlag = 5;
|
||||
FlagTime += 1900;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制卡牌
|
||||
if (ActFlag >= 5 && ActFlag< 7) {
|
||||
local CardOpenFlag = false;
|
||||
|
||||
local CradMoveTime = 1500;
|
||||
local CradAlphaOffset = sq_GetAccel(0, 250, ExiTime - FlagTime, CradMoveTime, true);
|
||||
FlagTime += 1500;
|
||||
|
||||
local CradReduceTime = 300;
|
||||
local CradXrate = sq_GetAccel(100, 2, ExiTime - FlagTime, CradReduceTime, true);
|
||||
local RealXrate = CradXrate.tofloat() / 100.0;
|
||||
FlagTime += 300;
|
||||
|
||||
local OpenCradReduceTime = 300;
|
||||
local OpenCradXrate = sq_GetAccel(2, 100, ExiTime - FlagTime, CradReduceTime, true);
|
||||
local OpenRealXrate = OpenCradXrate.tofloat() / 100.0;
|
||||
FlagTime += 300;
|
||||
//如果时间来到了打开就转换
|
||||
if (OpenCradXrate > 2) CardOpenFlag = true;
|
||||
//卢克标题
|
||||
// L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 28, X + 124, Y + 180, 1, sq_RGBA(255, 255, 255, CradAlphaOffset), 1.0, 1.0);
|
||||
|
||||
for (local i = 0; i< 4; i++) {
|
||||
local CardInfo = PartyReward[i];
|
||||
local BackGroundAniIndex = 11;
|
||||
|
||||
|
||||
//卡牌背面
|
||||
if (!CardOpenFlag) { //空的卡牌奖励
|
||||
L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 26, X + 94 + (160 * i), Y + 340, 1, sq_RGBA(255, 255, 255, CradAlphaOffset), RealXrate, 1.0);
|
||||
|
||||
} else {
|
||||
//无奖励
|
||||
if (CardInfo.Flag == false) {
|
||||
L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 34, X + 94 + (160 * i), Y + 340, 1, sq_RGBA(255, 255, 255, CradAlphaOffset), OpenRealXrate, 1.0);
|
||||
} else {
|
||||
if (CardInfo.grade) {
|
||||
L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 32, X + 94 + (160 * i), Y + 340, 1, sq_RGBA(255, 255, 255, CradAlphaOffset), OpenRealXrate, 1.0);
|
||||
} else {
|
||||
L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 31, X + 94 + (160 * i), Y + 340, 1, sq_RGBA(255, 255, 255, CradAlphaOffset), OpenRealXrate, 1.0);
|
||||
}
|
||||
//绘制物品边框
|
||||
if (OpenRealXrate >= 0.6) {
|
||||
GetItemInfo(CardInfo.item);
|
||||
local Rarity = L_sq_RA(Rindro_ItemInfoObject[CardInfo.item] + 0xF4);
|
||||
local NamePointer = L_sq_RA(Rindro_ItemInfoObject[CardInfo.item] + 0x20);
|
||||
local Name = NativePointer(L_sq_I2P(NamePointer)).readUnicodeString();
|
||||
L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 5 + Rarity, X + 156 + (160 * i), Y + 378, 1, sq_RGBA(255, 255, 255, CradAlphaOffset), OpenRealXrate, 1.0);
|
||||
|
||||
//绘制物品
|
||||
if (OpenRealXrate >= 1.0 && i == 3) {
|
||||
DrawItemBase(X + 159 + (160 * i), Y + 380, CardInfo.item, CardInfo.num);
|
||||
L_sq_DrawCode(Name, X + 174 + (160 * i) - LenheartTextClass.GetStringLength(Name) / 2, Y + 416, ItemNameColor[Rarity], 0, 1);
|
||||
// if (ActFlag == 5) {
|
||||
// ActFlag = 6;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
//物品出现光
|
||||
if (!CardInfo.grade) {
|
||||
if (Rarity <= 2) { //低于紫色闪紫光
|
||||
PurpleLight[20 + i].X = X + 90 + (160 * i) - 218 + 54;
|
||||
PurpleLight[20 + i].Y = Y + 320 - 152 - 24 - 7;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PurpleLight[20 + i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 3) { //粉光
|
||||
PinkLight[20 + i].X = X + 90 + (160 * i) - 218 + 54;
|
||||
PinkLight[20 + i].Y = Y + 320 - 152 - 24 - 7;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PinkLight[20 + i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 4) { //金光
|
||||
GoldenLight[20 + i].X = X + 90 + (160 * i) - 218;
|
||||
GoldenLight[20 + i].Y = Y + 320 - 152 - 7;
|
||||
GoldenLight[20 + i].Show(Duration);
|
||||
}
|
||||
} else { //彩光
|
||||
RarityLight[20 + i].X = X + 90 + (160 * i) - 218;
|
||||
RarityLight[20 + i].Y = Y + 320 - 152 - 7;
|
||||
RarityLight[20 + i].Show(Duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (OpenRealXrate >= 1.0 && i == 3) {
|
||||
if (ActFlag == 5) {
|
||||
ActFlag = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制头像与名字
|
||||
if (ActFlag >= 6) {
|
||||
if (CardInfo.Flag) {
|
||||
DrawProfile(CardInfo.cid, X + 174 + (160 * i), Y + 356, 0);
|
||||
}
|
||||
|
||||
if (ExiTime - FlagTime >= 2000) {
|
||||
if (ActFlag == 6) {
|
||||
FlagTime += 2000;
|
||||
ActFlag = 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
FlagTime += 4100;
|
||||
}
|
||||
|
||||
|
||||
//渐渐淡出2阶段
|
||||
if (ActFlag >= 7) {
|
||||
local CradMoveTime = 1500;
|
||||
local CradAlphaOffset = sq_GetAccel(0, 250, ExiTime - FlagTime, CradMoveTime, true);
|
||||
FlagTime += 1500;
|
||||
|
||||
for (local i = 0; i< 20; i++) {
|
||||
//奖励对象
|
||||
local CardInfo = TeamReward[i];
|
||||
if (CardInfo.Flag == false) {
|
||||
L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 19, X + 89 + (128 * (i % 5)), Y + 220 + (80 * (i / 5)), 1, sq_RGBA(255, 255, 255, CradAlphaOffset), 1.0, 1.0);
|
||||
} else {
|
||||
//领取过奖励了
|
||||
if (CardInfo.item == -1) {
|
||||
L_sq_DrawImg("interface2/raid/anton/reward/anton_reward.img", 24, X + 89 + (128 * (i % 5)), Y + 220 + (80 * (i / 5)), 1, sq_RGBA(255, 255, 255, CradAlphaOffset), 1.0, 1.0);
|
||||
|
||||
} else {
|
||||
L_sq_DrawImg("hud/newantondungeonreward.img", 22, X + 89 + (128 * (i % 5)), Y + 220 + (80 * (i / 5)), 1, sq_RGBA(255, 255, 255, CradAlphaOffset), 1.0, 1.0);
|
||||
if (CradAlphaOffset >= 200) DrawItemEx(X + 133 + (128 * (i % 5)), Y + 252 + (80 * (i / 5)), CardInfo.item, CardInfo.num);
|
||||
}
|
||||
if (CradAlphaOffset >= 200)
|
||||
DrawProfile(CardInfo.cid, X + 160 + (128 * (i % 5)), Y + 229 + (80 * (i / 5)), -6);
|
||||
}
|
||||
}
|
||||
|
||||
if (CradAlphaOffset >= 200) {
|
||||
for (local i = 0; i< 20; i++) {
|
||||
//奖励对象
|
||||
local CardInfo = TeamReward[i];
|
||||
if (CardInfo.Flag && CardInfo.item != -1) {
|
||||
GetItemInfo(CardInfo.item);
|
||||
local Rarity = L_sq_RA(Rindro_ItemInfoObject[CardInfo.item] + 0xF4);
|
||||
//物品出现光
|
||||
if (!CardInfo.grade) {
|
||||
if (Rarity <= 2) { //低于紫色闪紫光
|
||||
PurpleLight[i].X = X + 133 + (128 * (i % 5)) - 230;
|
||||
PurpleLight[i].Y = Y + 252 + (80 * (i / 5)) - 246;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PurpleLight[i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 3) { //粉光
|
||||
PinkLight[i].X = X + 133 + (128 * (i % 5)) - 230;
|
||||
PinkLight[i].Y = Y + 252 + (80 * (i / 5)) - 246;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
PinkLight[i].Show(Duration);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
} else if (Rarity == 4) { //金光
|
||||
GoldenLight[i].X = X + 133 + (128 * (i % 5)) - 284;
|
||||
GoldenLight[i].Y = Y + 252 + (80 * (i / 5)) - 220;
|
||||
GoldenLight[i].Show(Duration);
|
||||
}
|
||||
} else { //彩光
|
||||
RarityLight[i].X = X + 133 + (128 * (i % 5)) - 284;
|
||||
RarityLight[i].Y = Y + 252 + (80 * (i / 5)) - 220;
|
||||
RarityLight[i].Show(Duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CradAlphaOffset >= 250 && (ExiTime - FlagTime >= 3000)) {
|
||||
if (ActFlag == 7) {
|
||||
FlagTime += 3000;
|
||||
ActFlag = 8;
|
||||
CloseWindow();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DrawProfile(Cid, gx, gy, CodeXOffset) {
|
||||
if (RinDro_Luke_Obj.Portrait.rawin(Cid)) {
|
||||
local InfoObj = RinDro_Luke_Obj.Portrait[Cid];
|
||||
//绘制队长头像
|
||||
foreach(AvatarObj in InfoObj.EquVos) {
|
||||
local AXpos = AvatarObj.F[0][2] + X + OffsetArr[InfoObj.Job][0] + gx - 110;
|
||||
local AYpos = AvatarObj.F[0][3] + Y + OffsetArr[InfoObj.Job][1] + gy - 5;
|
||||
setClip(AXpos + OffsetArr[InfoObj.Job][2], AYpos + OffsetArr[InfoObj.Job][3], AXpos + OffsetArr[InfoObj.Job][2] + 22, AYpos + OffsetArr[InfoObj.Job][3] + 18); //开始裁切
|
||||
L_sq_DrawImg("character/" + AvatarObj.B + ".img", AvatarObj.F[0][0], AXpos, AYpos);
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
|
||||
L_sq_DrawCode(InfoObj.Name, gx + CodeXOffset - LenheartTextClass.GetStringLength(InfoObj.Name) / 2, gy, 0xff00b1ff, 0, 1);
|
||||
} else {
|
||||
L_sq_DrawImg("interface/lenheartwindowcommon.img", 606, gx - 65, gy - 2);
|
||||
L_sq_DrawCode("未知姓名玩家", gx - LenheartTextClass.GetStringLength("未知姓名玩家") / 2, gy, 0xff00b1ff, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
DrawMain(obj);
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getroottable().rawdelete("RinDro_Luke_Obj");
|
||||
Reference in New Issue
Block a user