koishi-plugin-ggcevo-game 1.6.43 → 1.6.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +3 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -10171,9 +10171,9 @@ ${discountDetails.join("\n")}`;
|
|
|
10171
10171
|
const lastDate = convertUTCtoChinaTime(new Date(lastAttack.lastattackDate));
|
|
10172
10172
|
const today = convertUTCtoChinaTime(/* @__PURE__ */ new Date());
|
|
10173
10173
|
if (verification.verificationPassed) {
|
|
10174
|
-
const lastQuarter = Math.floor(lastDate.
|
|
10175
|
-
const currentQuarter = Math.floor(today.
|
|
10176
|
-
const sameDay = lastDate.
|
|
10174
|
+
const lastQuarter = Math.floor(lastDate.getUTCHours() / 6);
|
|
10175
|
+
const currentQuarter = Math.floor(today.getUTCHours() / 6);
|
|
10176
|
+
const sameDay = lastDate.getUTCDate() === today.getUTCDate() && lastDate.getUTCMonth() === today.getUTCMonth() && lastDate.getUTCFullYear() === today.getUTCFullYear();
|
|
10177
10177
|
if (sameDay && lastQuarter === currentQuarter) {
|
|
10178
10178
|
return "您在当前时间段内已参与过斩杀攻击,请等待下一个6小时周期(0点、6点、12点或18点)再挑战!";
|
|
10179
10179
|
}
|