@sjtdev/koishi-plugin-dota2tracker 1.3.0-pre.1 → 1.3.0-pre.2
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 +4 -3
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -980,7 +980,7 @@ function getFormattedMatchData(matchQuery, constantsQuery) {
|
|
|
980
980
|
)?.titles.push({ name: "魂", color: "#6cf" });
|
|
981
981
|
findMaxByProperty("networth")?.titles.push({ name: "富", color: "#FFD700" });
|
|
982
982
|
findMaxByProperty("experiencePerMinute")?.titles.push({ name: "睿", color: "#8888FF" });
|
|
983
|
-
if (match.parsedDateTime) {
|
|
983
|
+
if (match.parsedDateTime && match.players.every((player) => player?.stats?.heroDamageReport?.dealtTotal)) {
|
|
984
984
|
match.players.reduce(
|
|
985
985
|
(max, player) => player.stats.heroDamageReport.dealtTotal.stunDuration + player.stats.heroDamageReport.dealtTotal.disableDuration / 2 + player.stats.heroDamageReport.dealtTotal.slowDuration / 4 > max.stats.heroDamageReport.dealtTotal.stunDuration + max.stats.heroDamageReport.dealtTotal.disableDuration / 2 + max.stats.heroDamageReport.dealtTotal.slowDuration / 4 ? player : max
|
|
986
986
|
).titles.push({ name: "控", color: "#FF00FF" });
|
|
@@ -1393,7 +1393,8 @@ async function apply(ctx, config) {
|
|
|
1393
1393
|
ctx.cache.set("dt_previous_query_results", String(matchQuery.match.id), queryLocal, days_30);
|
|
1394
1394
|
} else {
|
|
1395
1395
|
matchQuery = await query("MatchInfo", { matchId });
|
|
1396
|
-
if (matchQuery.match?.parsedDateTime
|
|
1396
|
+
if (matchQuery.match?.parsedDateTime && matchQuery.match.players.filter((player) => player?.stats?.heroDamageReport?.dealtTotal).length > 0)
|
|
1397
|
+
ctx.cache.set("dt_previous_query_results", String(matchQuery.match.id), matchQuery, days_30);
|
|
1397
1398
|
}
|
|
1398
1399
|
return matchQuery;
|
|
1399
1400
|
} catch (error) {
|
|
@@ -1905,7 +1906,7 @@ async function apply(ctx, config) {
|
|
|
1905
1906
|
const pendingMatch = pendingMatches[(now.hours() * 60 + now.minutes()) % pendingMatches.length];
|
|
1906
1907
|
try {
|
|
1907
1908
|
let matchQuery = await queryMatchData(pendingMatch.matchId);
|
|
1908
|
-
if (matchQuery.match.parsedDateTime || import_moment.default.unix(matchQuery.match.endDateTime).isBefore(now.subtract(config.dataParsingTimeoutMinutes, "minutes"))) {
|
|
1909
|
+
if (matchQuery.match.parsedDateTime && matchQuery.match.players.filter((player) => player?.stats?.heroDamageReport?.dealtTotal).length > 0 || import_moment.default.unix(matchQuery.match.endDateTime).isBefore(now.subtract(config.dataParsingTimeoutMinutes, "minutes"))) {
|
|
1909
1910
|
for (const languageTag of Object.keys(pendingMatch.guilds)) {
|
|
1910
1911
|
let match = await formatMatchData(matchQuery, languageTag);
|
|
1911
1912
|
const img = await generateMatchImage(match, languageTag);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjtdev/koishi-plugin-dota2tracker",
|
|
3
3
|
"description": "koishi插件-追踪群友的DOTA2对局",
|
|
4
|
-
"version": "1.3.0-pre.
|
|
4
|
+
"version": "1.3.0-pre.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"contributors": [
|
|
15
15
|
"sjtdev <sh1j1n9ta0@foxmail.com>"
|
|
16
16
|
],
|
|
17
|
-
"homepage": "https://github.
|
|
17
|
+
"homepage": "https://sjtdev.github.io/koishi-plugin-dota2tracker/",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/sjtdev/koishi-plugin-dota2tracker.git"
|