koishi-plugin-ggcevo-game 1.3.54 → 1.3.55

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.
Files changed (2) hide show
  1. package/lib/index.js +6 -14
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -4663,11 +4663,7 @@ ${items.join("、")}
4663
4663
  total: initiatorPK.total + 1,
4664
4664
  wins: isWin ? initiatorPK.wins + 1 : initiatorPK.wins,
4665
4665
  todayCount: initiatorPK.todayCount + 1,
4666
- lastPK: /* @__PURE__ */ new Date(),
4667
- enable: initiatorPK.enable,
4668
- // 包含新字段
4669
- lastToggle: initiatorPK.lastToggle
4670
- // 包含新字段
4666
+ lastPK: /* @__PURE__ */ new Date()
4671
4667
  },
4672
4668
  // 应战者记录(新增部分)
4673
4669
  {
@@ -4678,12 +4674,8 @@ ${items.join("、")}
4678
4674
  // 应战者胜利时增加
4679
4675
  todayCount: targetPK.todayCount,
4680
4676
  // 不消耗应战者次数
4681
- lastPK: targetPK.lastPK,
4677
+ lastPK: targetPK.lastPK
4682
4678
  // 保留原有时间不更新
4683
- enable: targetPK.enable,
4684
- // 包含新字段
4685
- lastToggle: targetPK.lastToggle
4686
- // 包含新字段
4687
4679
  }
4688
4680
  ]);
4689
4681
  await ctx.database.create("ggcevo_pk_logs", {
@@ -4769,10 +4761,10 @@ ${items.join("、")}
4769
4761
  if (pageNum < 1) return "请输入有效的页码。";
4770
4762
  const offset = (pageNum - 1) * 10;
4771
4763
  const [records, total] = await Promise.all([
4772
- // 获取当前页记录(仅显示启用PK功能的用户)
4773
- ctx.database.select("ggcevo_pk").where({ enable: true }).orderBy("wins", "desc").limit(10).offset(offset).execute(),
4764
+ // 获取当前页记录
4765
+ ctx.database.select("ggcevo_pk").orderBy("wins", "desc").limit(10).offset(offset).execute(),
4774
4766
  // 获取总记录数(启用PK的用户总数)
4775
- ctx.database.select("ggcevo_pk").where({ enable: true }).execute((row) => import_koishi.$.count(row.handle))
4767
+ ctx.database.select("ggcevo_pk").execute((row) => import_koishi.$.count(row.handle))
4776
4768
  ]);
4777
4769
  const totalPages = Math.ceil(total / 10);
4778
4770
  if (pageNum > totalPages) return `查询失败,最多有 ${totalPages} 页`;
@@ -4787,7 +4779,7 @@ ${items.join("、")}
4787
4779
  ].join(" | ");
4788
4780
  }).join("\n");
4789
4781
  return [
4790
- "🏆 PK排行榜(已启用PK功能的玩家)",
4782
+ "🏆 PK排行榜 🏆",
4791
4783
  "──────────────",
4792
4784
  rankingText,
4793
4785
  "──────────────",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "《星际争霸2》咕咕虫-evolved地图的专属游戏助手插件,集成天梯排行、抽奖系统、签到福利、兑换商城等丰富功能。",
4
- "version": "1.3.54",
4
+ "version": "1.3.55",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [