更新累计在线

This commit is contained in:
Lenheart 2025-10-14 16:46:15 +08:00
parent 6eb4d6a2f9
commit e587e6a3cc
1 changed files with 29 additions and 1 deletions

View File

@ -119,7 +119,6 @@ class CumulativeRewardC extends LenheartNewUI_Windows {
CurrentStageTime = Arr[2]; CurrentStageTime = Arr[2];
NextStageTime = Arr[3]; NextStageTime = Arr[3];
RecvPackTime = Clock(); RecvPackTime = Clock();
}.bindenv(this)); }.bindenv(this));
@ -163,7 +162,30 @@ class CumulativeRewardC extends LenheartNewUI_Windows {
//绘制阶段文字 //绘制阶段文字
Img1.DrawExPng(25 + CurrentStage, X + 46, Y + 3, 0, sq_RGBA(255, 255, 255, 250), 0.85, 0.85); Img1.DrawExPng(25 + CurrentStage, X + 46, Y + 3, 0, sq_RGBA(255, 255, 255, 250), 0.85, 0.85);
if (IsOpen) { if (IsOpen) {
if (CurrentStage != null) {
local StageText = "累计在线得好礼 (" + (CurrentStage + 1) + "/4 阶段)";
L_sq_DrawCode(StageText, X + 6, Y + 42, sq_RGBA(255, 177, 0, 255), 1, 1);
if (CurrentStage >= 3) {
local Str = "今天的累计在线活动已完成!";
L_sq_DrawCode(Str, X + 6, Y + 61, sq_RGBA(150, 150, 150, 255), 1, 1);
}else{
local Second = ((NextStageTime - (CurrentStageTime + ((Clock() - RecvPackTime)))) / 1000);
local SecondStr = Second % 60;
local Minute = (Second - SecondStr) / 60;
local Str = "距离下一阶段还有 " + (Minute> 0 ? Minute.tostring() : "") + SecondStr.tostring() + " 秒";
L_sq_DrawCode(Str, X + 6, Y + 61, sq_RGBA(150, 150, 150, 255), 1, 1);
}
}
if (TotalCount) {
local IntroductionText = "满阶段在线" + TotalCount[TotalCount.len() - 1] + "次获得丰厚好礼!";
L_sq_DrawCode(IntroductionText, X + 6, Y + 146, sq_RGBA(255, 177, 0, 255), 1, 1);
local CurCount = "累计次数 [" + CurrentCount.tostring() + "/" + TotalCount[TotalCount.len() - 1].tostring() + "]";
L_sq_DrawCode(CurCount, X + 6, Y + 166, sq_RGBA(104, 213, 237, 255), 1, 1);
}
//绘制所有奖励道具 //绘制所有奖励道具
if (RewardItemInfo) { if (RewardItemInfo) {
foreach(pos, value in RewardItemInfo) { foreach(pos, value in RewardItemInfo) {
@ -244,6 +266,12 @@ class CumulativeRewardC extends LenheartNewUI_Windows {
} }
L_Windows_List <- [];
getroottable().rawdelete("LenheartPluginsInitFlag");
getroottable().rawdelete("EventList_Obj")
getroottable().rawdelete("CumulativeReward_Obj");
function Lenheart_CumulativeReward_Fun(obj) { function Lenheart_CumulativeReward_Fun(obj) {
local RootTab = getroottable(); local RootTab = getroottable();
if (!RootTab.rawin("CumulativeReward_Obj")) { if (!RootTab.rawin("CumulativeReward_Obj")) {