/* 文件名: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]; //绘制队长头像 local AXpos = X + gx - 110 + 42; local AYpos = Y + gy - 5 + 1; InfoObj.EquVos.DrawFace(AXpos, AYpos); 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");