@sjtdev/koishi-plugin-dota2tracker 1.2.9-pre → 1.2.9-pre.3
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/changelog.md +9 -3
- package/lib/index.js +30 -28
- package/package.json +1 -1
- package/template/match/match_1.ejs +15 -9
- package/template/player/player_1.ejs +5 -6
package/changelog.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
### 1.2.9-pre
|
|
2
|
-
|
|
3
|
-
-
|
|
1
|
+
### 1.2.9-pre.3
|
|
2
|
+
**改进**:
|
|
3
|
+
- 尝试修改逻辑:在追踪到群友比赛后等待解析时,此前为按添加顺序等待队列中的比赛,现在修改了判断逻辑,对当前时间分钟数与等待队列的长度进行取余,周期性访问队列中每一场比赛,这样可以优先发送已解析完成的比赛而不会被早加入但迟迟未解析的比赛阻塞。
|
|
4
4
|
|
|
5
|
+
### 1.2.9-pre.2
|
|
5
6
|
**改进**:
|
|
7
|
+
- 现在可在战报模板`match_1`和玩家信息模板中正确显示打野玩家的对线结果为“野区霸主”并有对应的图标,而不是跟随默认的中路对线结果。([wiki/match_1](https://github.com/sjtdev/koishi-plugin-dota2tracker/wiki/match_1)也已更新。)
|
|
8
|
+
|
|
9
|
+
### 1.2.9-pre
|
|
10
|
+
**修复&改进**:
|
|
11
|
+
- `查询英雄`:尝试修复DOTA2 7.37版本更新后API变动导致部分英雄查询报错。
|
|
6
12
|
- `查询英雄`:命石技能的技能名栏位添加对应命石图标与背景色用于标识。
|
|
7
13
|
|
|
8
14
|
# 1.2.8
|
package/lib/index.js
CHANGED
|
@@ -642,6 +642,9 @@ function getFormattedMatchData(match) {
|
|
|
642
642
|
case "OFF_LANE":
|
|
643
643
|
player.laneResult = laneResult[!player.isRadiant ? "bottom" : "top"][player.team];
|
|
644
644
|
break;
|
|
645
|
+
case "JUNGLE":
|
|
646
|
+
player.laneResult = "jungle";
|
|
647
|
+
break;
|
|
645
648
|
default:
|
|
646
649
|
player.laneResult = laneResult.mid[player.team];
|
|
647
650
|
break;
|
|
@@ -1206,31 +1209,7 @@ var inject = ["http", "database", "cron", "puppeteer"];
|
|
|
1206
1209
|
var Config = import_koishi.Schema.intersect([
|
|
1207
1210
|
import_koishi.Schema.object({
|
|
1208
1211
|
STRATZ_API_TOKEN: import_koishi.Schema.string().required().description("※必须。stratz.com的API TOKEN,可在 https://stratz.com/api 获取。"),
|
|
1209
|
-
dataParsingTimeoutMinutes: import_koishi.Schema.number().default(60).min(0).max(1440).description("等待比赛数据解析的时间(单位:分钟)。如果数据解析时间超过等待时间,将直接生成战报而不再等待解析完成。")
|
|
1210
|
-
}).description("基础设置"),
|
|
1211
|
-
import_koishi.Schema.object({
|
|
1212
|
-
dailyReportSwitch: import_koishi.Schema.boolean().default(false).description("日报功能").experimental()
|
|
1213
|
-
}),
|
|
1214
|
-
import_koishi.Schema.union([
|
|
1215
|
-
import_koishi.Schema.object({
|
|
1216
|
-
dailyReportSwitch: import_koishi.Schema.const(true).required(),
|
|
1217
|
-
dailyReportHours: import_koishi.Schema.number().min(0).max(23).default(6).description("日报时间小时"),
|
|
1218
|
-
dailyReportShowCombi: import_koishi.Schema.boolean().default(true).description("日报是否显示组合")
|
|
1219
|
-
}),
|
|
1220
|
-
import_koishi.Schema.object({})
|
|
1221
|
-
]),
|
|
1222
|
-
import_koishi.Schema.object({
|
|
1223
|
-
weeklyReportSwitch: import_koishi.Schema.boolean().default(false).description("周报功能").experimental()
|
|
1224
|
-
}),
|
|
1225
|
-
import_koishi.Schema.union([
|
|
1226
|
-
import_koishi.Schema.object({
|
|
1227
|
-
weeklyReportSwitch: import_koishi.Schema.const(true).required(),
|
|
1228
|
-
weeklyReportDayHours: import_koishi.Schema.tuple([import_koishi.Schema.number().min(1).max(7), import_koishi.Schema.number().min(0).max(23)]).default([1, 10]).description("周报发布于周(几)的(几)点"),
|
|
1229
|
-
weeklyReportShowCombi: import_koishi.Schema.boolean().default(true).description("周报是否显示组合")
|
|
1230
|
-
}),
|
|
1231
|
-
import_koishi.Schema.object({})
|
|
1232
|
-
]),
|
|
1233
|
-
import_koishi.Schema.object({
|
|
1212
|
+
dataParsingTimeoutMinutes: import_koishi.Schema.number().default(60).min(0).max(1440).description("等待比赛数据解析的时间(单位:分钟)。如果数据解析时间超过等待时间,将直接生成战报而不再等待解析完成。"),
|
|
1234
1213
|
urlInMessageType: import_koishi.Schema.array(
|
|
1235
1214
|
import_koishi.Schema.union([
|
|
1236
1215
|
import_koishi.Schema.const("match").description("在查询比赛与战报消息中附带stratz比赛页面链接"),
|
|
@@ -1238,7 +1217,29 @@ var Config = import_koishi.Schema.intersect([
|
|
|
1238
1217
|
import_koishi.Schema.const("hero").description("在查询英雄数据消息中附带刀塔百科对应英雄页面链接")
|
|
1239
1218
|
])
|
|
1240
1219
|
).role("checkbox").description("在消息中附带链接,<br/>请选择消息类型:")
|
|
1241
|
-
}),
|
|
1220
|
+
}).description("基础设置"),
|
|
1221
|
+
import_koishi.Schema.intersect([
|
|
1222
|
+
import_koishi.Schema.object({
|
|
1223
|
+
dailyReportSwitch: import_koishi.Schema.boolean().default(false).description("日报功能").experimental()
|
|
1224
|
+
}).description("总结设置"),
|
|
1225
|
+
import_koishi.Schema.union([
|
|
1226
|
+
import_koishi.Schema.object({
|
|
1227
|
+
dailyReportSwitch: import_koishi.Schema.const(true).required(),
|
|
1228
|
+
dailyReportHours: import_koishi.Schema.number().min(0).max(23).default(6).description("日报时间小时"),
|
|
1229
|
+
dailyReportShowCombi: import_koishi.Schema.boolean().default(true).description("日报是否显示组合")
|
|
1230
|
+
})
|
|
1231
|
+
]),
|
|
1232
|
+
import_koishi.Schema.object({
|
|
1233
|
+
weeklyReportSwitch: import_koishi.Schema.boolean().default(false).description("周报功能").experimental()
|
|
1234
|
+
}),
|
|
1235
|
+
import_koishi.Schema.union([
|
|
1236
|
+
import_koishi.Schema.object({
|
|
1237
|
+
weeklyReportSwitch: import_koishi.Schema.const(true).required(),
|
|
1238
|
+
weeklyReportDayHours: import_koishi.Schema.tuple([import_koishi.Schema.number().min(1).max(7), import_koishi.Schema.number().min(0).max(23)]).default([1, 10]).description("周报发布于周(几)的(几)点"),
|
|
1239
|
+
weeklyReportShowCombi: import_koishi.Schema.boolean().default(true).description("周报是否显示组合")
|
|
1240
|
+
})
|
|
1241
|
+
])
|
|
1242
|
+
]),
|
|
1242
1243
|
import_koishi.Schema.object({
|
|
1243
1244
|
template_match: import_koishi.Schema.union([...readDirectoryFilesSync(`./node_modules/@sjtdev/koishi-plugin-${name}/template/match`)]).default("match_1").description("生成比赛信息图片使用的模板,见 https://github.com/sjtdev/koishi-plugin-dota2tracker/wiki 有模板展示。"),
|
|
1244
1245
|
template_player: import_koishi.Schema.union([...readDirectoryFilesSync(`./node_modules/@sjtdev/koishi-plugin-${name}/template/player`)]).default("player_1").description("生成玩家信息图片使用的模板。(目前仅有一张模板)"),
|
|
@@ -1720,7 +1721,8 @@ async function apply(ctx, config) {
|
|
|
1720
1721
|
});
|
|
1721
1722
|
}
|
|
1722
1723
|
if (pendingMatches.length > 0) {
|
|
1723
|
-
const
|
|
1724
|
+
const now = (0, import_moment.default)();
|
|
1725
|
+
const pendingMatch = pendingMatches[(now.hours() * 60 + now.minutes()) % pendingMatches.length];
|
|
1724
1726
|
try {
|
|
1725
1727
|
let match;
|
|
1726
1728
|
let queryLocal = await ctx.database.get("dt_previous_query_results", pendingMatch.matchId, ["data"]);
|
|
@@ -1729,7 +1731,7 @@ async function apply(ctx, config) {
|
|
|
1729
1731
|
ctx.database.set("dt_previous_query_results", match.id, { queryTime: /* @__PURE__ */ new Date() });
|
|
1730
1732
|
} else
|
|
1731
1733
|
match = getFormattedMatchData((await query(MATCH_INFO(pendingMatch.matchId))).data.match);
|
|
1732
|
-
if (match.parsedDateTime || import_moment.default.unix(match.endDateTime).isBefore(
|
|
1734
|
+
if (match.parsedDateTime || import_moment.default.unix(match.endDateTime).isBefore(now.subtract(config.dataParsingTimeoutMinutes, "minutes"))) {
|
|
1733
1735
|
pendingMatches = pendingMatches.filter((item) => item.matchId != match.id);
|
|
1734
1736
|
const img = await ctx.puppeteer.render(genImageHTML(match, config.template_match, "match" /* Match */));
|
|
1735
1737
|
for (let commingGuild of pendingMatch.guilds) {
|
package/package.json
CHANGED
|
@@ -313,6 +313,7 @@
|
|
|
313
313
|
.hero .player_lane svg {
|
|
314
314
|
width: 44px;
|
|
315
315
|
height: 44px;
|
|
316
|
+
margin-bottom: 3px;
|
|
316
317
|
}
|
|
317
318
|
|
|
318
319
|
.hero .player_lane svg path {
|
|
@@ -345,6 +346,10 @@
|
|
|
345
346
|
content: "对线被碾";
|
|
346
347
|
}
|
|
347
348
|
|
|
349
|
+
.hero .player_lane.jungle::after {
|
|
350
|
+
content: "野区霸主";
|
|
351
|
+
}
|
|
352
|
+
|
|
348
353
|
.hero .player_lane.victory svg path {
|
|
349
354
|
fill: lightgreen;
|
|
350
355
|
}
|
|
@@ -666,15 +671,15 @@
|
|
|
666
671
|
<body>
|
|
667
672
|
<% const match = data;
|
|
668
673
|
let kcndcStyle = {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
674
|
+
kc: function (num) {
|
|
675
|
+
let red = (255 - (num * 255) / 100).toFixed(2);
|
|
676
|
+
return `rgb(255,${red},${red})`;
|
|
677
|
+
},
|
|
678
|
+
dc: function (num) {
|
|
679
|
+
let gray = ((50 - Math.min(num, 50)) * (255 / 50)).toFixed(2);
|
|
680
|
+
return `rgb(${gray},${gray},${gray})`;
|
|
681
|
+
},
|
|
682
|
+
};
|
|
678
683
|
// 对线结果的图标(来自免费SVG素材网)
|
|
679
684
|
const laneSVG = {
|
|
680
685
|
stomp: `<svg viewBox="0 0 24 24" class="hitagi__sc-1apuy4g-0 hmhZOG"><path d="M8.05731 22.3674L9.60454 22.8002L11.5974 21.6551L12.043 20.0773L13.5902 20.51L15.583 19.3649L16.0287 17.7871L17.5759 18.2199L19.5687 17.0748L20.0143 15.4969L21.5615 15.9297L23.5544 14.7846L24 13.2068L23.4492 12.2014L7.50651 21.3621L8.05731 22.3674ZM12.1328 3.50265L11.0312 1.49196C10.8798 1.21549 10.5316 1.11811 10.2576 1.27556L0.29345 7.00098C0.0194354 7.15843 -0.0808273 7.51346 0.0706444 7.78993L1.44766 10.3033L11.91 4.29159C12.184 4.13414 12.2843 3.77912 12.1328 3.50265ZM18.3935 8.4063L14.1658 9.60458L12.4221 10.6065C12.2851 10.6853 12.111 10.6366 12.0353 10.4983L11.7599 9.99565C11.6842 9.85742 11.7343 9.6799 11.8713 9.60118L13.615 8.59924L13.0642 7.59389L11.3205 8.59584C11.1835 8.67456 11.0094 8.62587 10.9337 8.48765L10.6583 7.98497C10.5826 7.84673 10.6327 7.66922 10.7697 7.5905L12.5134 6.58855L11.9626 5.58321L1.99846 11.3086L6.9557 20.3567L22.8984 11.196L22.2615 10.0336C21.5024 8.64813 19.9073 7.97847 18.3935 8.4063Z"></path></svg>`,
|
|
@@ -682,6 +687,7 @@
|
|
|
682
687
|
fail: `<svg viewBox="0 0 36 36"><path fill="#ff6961" d="M36 32a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h28a4 4 0 0 1 4 4v28z"></path><circle fill="#FFF" cx="27" cy="7" r="3"></circle><path fill="#FFF" d="M13.06 13.06l2.367-2.366l3.859 1.158l-2.635 2.847a10.018 10.018 0 0 1 4.392 3.379l5.017-5.017a1.5 1.5 0 0 0-.63-2.497l-9.999-3a1.495 1.495 0 0 0-1.492.376l-3 3a1.5 1.5 0 1 0 2.121 2.12zm16.065 4.949a1.496 1.496 0 0 0-1.262-.503l-6.786.617a9.966 9.966 0 0 1 1.464 2.879l3.548-.322l-1.554 6.995a1.499 1.499 0 1 0 2.928.65l2-9a1.5 1.5 0 0 0-.338-1.316zM13 16a8 8 0 1 0 0 16a8 8 0 0 0 0-16zm0 14a6 6 0 1 1 .002-12.002A6 6 0 0 1 13 30z"></path></svg>`,
|
|
683
688
|
stomped: `<svg viewBox="-1 0 19 19"><path d="M16.417 9.579A7.917 7.917 0 1 1 8.5 1.662a7.917 7.917 0 0 1 7.917 7.917zm-2.458 2.96a.396.396 0 0 0-.396-.397h-.667a1.527 1.527 0 0 0-1.249-1.114.777.777 0 0 0 .014-.145V9.378a.794.794 0 0 0-.792-.792H8.201a2.984 2.984 0 0 0-1.682-.516l-.11.002V7.42h2.997a.396.396 0 1 0 0-.792H6.41v-1.3a.396.396 0 0 0-.396-.397H4.891a.396.396 0 0 0 0 .792h.727V8.21a2.997 2.997 0 1 0 3.836 3.466h.71a1.526 1.526 0 1 0 2.732 1.26h.667a.396.396 0 0 0 .396-.397zM8.078 9.507a2.205 2.205 0 1 1-1.559-.646 2.19 2.19 0 0 1 1.559.646zm4.078 3.03a.734.734 0 1 1-.733-.734.735.735 0 0 1 .733.733z"/></svg>`,
|
|
684
689
|
tie: `<svg fill="#fff" viewBox="0 0 512.001 512.001"><g><g><path d="M120.988,239.868c-4.496,10.625-5.122,20.183-5.157,20.811c-0.267,4.607,3.243,8.547,7.849,8.829 c4.618,0.29,8.574-3.228,8.873-7.833c0.265-4.771,2.339-13.092,5.884-19.44C137.421,242.113,141.397,242.649,120.988,239.868z"/></g></g><g><g><path d="M391.178,255.418c-0.211,8.054-2.458,17.62-6.74,28.398c-1.708,4.299,0.393,9.168,4.692,10.875 c4.293,1.708,9.167-0.39,10.875-4.692c5.103-12.842,7.74-24.392,7.943-34.581H391.178z"/></g></g><g><g><path d="M164.769,210.51c1.046,3.339,1.397,6.953,0.893,10.65c-0.293,2.146-0.857,4.188-1.648,6.1c0,0,51.266,3.416,198.065,3.949 c-0.086-6.331,2.19-12.199,6.244-16.732C217.627,214.046,164.769,210.51,164.769,210.51z"/></g></g><g><g><circle cx="37.179" cy="128.669" r="29.491"/></g></g><g><g><path d="M510.146,391.511l-37.916-66.985c14.35-49.173,20.678-68.137,20.678-68.137l8.949-67.014 c1.502-10.977-6.248-21.075-17.235-22.468l-18.183-2.305c-10.984-1.393-20.996,6.445-22.293,17.431l-1.884,15.955l28.718-21.317 l-37.91,42.278h-46.432c-6.571,0-11.898,5.328-11.898,11.898c0,6.57,5.328,11.898,11.898,11.898h51.744 c3.381,0,6.601-1.438,8.859-3.956l41.456-46.234l-32.023,54.694c-5.28,9.018-14.374,8.169-18.293,8.167c-1.959,0-3.31,0-5.295,0 c-0.399,0.898,3.152-7.399-24.44,57.181c-0.548,1.284-0.907,2.642-1.06,4.031l-8.934,80.338 c-0.939,8.447,5.667,15.857,14.208,15.857c7.179,0,13.361-5.401,14.172-12.701l8.702-78.244l21.512-50.353l-14.121,50.463 c-1.158,3.756-0.718,7.823,1.218,11.243l40.949,72.345c3.885,6.864,12.596,9.276,19.459,5.392 C511.615,407.085,514.03,398.373,510.146,391.511z"/></g></g><g><g><circle cx="464.865" cy="128.702" r="29.491"/></g></g><g><g><path d="M142.923,206.051l-59.556-8.118l-39.135-18.451l13.626,2.292c-1.422-10.945-11.411-18.577-22.254-17.202l-18.182,2.305 C6.43,168.271-1.315,178.374,0.186,189.345l9.12,68.689l21.865,70.857l5.829,70.795c0.646,7.848,7.527,13.705,15.401,13.057 c7.859-0.647,13.705-7.542,13.058-15.401l-5.956-72.345c-0.084-1.031-0.281-2.05-0.585-3.039l-14.123-50.463l21.514,50.353 l8.702,78.244c0.873,7.86,7.96,13.486,15.768,12.612c7.838-0.871,13.483-7.931,12.612-15.768l-8.934-80.338 c-0.154-1.388-0.511-2.747-1.06-4.032l-27.336-61.43l-2.945-24.951l-29.029-25.179l40.79,19.231 c1.097,0.517,2.266,0.862,3.468,1.027l61.369,8.365c6.521,0.887,12.509-3.68,13.396-10.183 C153.994,212.936,149.435,206.939,142.923,206.051z"/></g></g></svg>`,
|
|
690
|
+
jungle: `<svg fill="#fff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 395 395" xml:space="preserve"><g><path d="M313.002,0H82C36.785,0,0,36.784,0,81.998v230.993C0,358.211,36.785,395,82,395h231.002 C358.216,395,395,358.211,395,312.991V81.998C395,36.784,358.216,0,313.002,0z M380,312.991C380,349.94,349.944,380,313.002,380H82 c-36.944,0-67-30.06-67-67.009V81.998C15,45.055,45.056,15,82,15h231.002C349.944,15,380,45.055,380,81.998V312.991z"/><path d="M305.336,107.5c-21.492,0-38.915,17.422-38.915,38.912c0,21.495,17.423,38.915,38.915,38.915 c21.49,0,38.911-17.42,38.911-38.915C344.247,124.922,326.826,107.5,305.336,107.5z"/><path d="M309.227,186.313c-10.602,0-21.818,7.267-21.818,7.267l-20.557-20.553c-2.876-2.876-3.857-3.915-6.746-3.915H145.701 H65.539v-0.193c0-2.149-1.742-3.891-3.892-3.891c-2.149,0-3.892,1.742-3.892,3.891v0.193h-7.003c-4.298,0-7.782,3.484-7.782,7.783 c0,4.298,3.484,7.783,7.782,7.783h87.166v9.081c0,4.298,3.484,7.783,7.782,7.783h36.863c-0.523,5.762,2.184,11.588,7.477,14.765 l53.325,31.996c2.468,1.48,5.238,2.218,8.009,2.218c2.905,0,5.809-0.813,8.355-2.433l14.475-9.209V287.5h70.042v-66.164 C344.247,201.992,328.567,186.313,309.227,186.313z M251.135,216.658L225.94,201.54h26.137l8.872,8.873L251.135,216.658z"/><path d="M167.491,165.612h45.528c4.298,0,7.782-3.484,7.782-7.783s-3.484-7.783-7.782-7.783h-45.528 c-4.298,0-7.782,3.484-7.782,7.783S163.193,165.612,167.491,165.612z"/></g></svg>`
|
|
685
691
|
};
|
|
686
692
|
%>
|
|
687
693
|
<div class="wrapper">
|
|
@@ -312,6 +312,7 @@
|
|
|
312
312
|
fail: `<svg viewBox="0 0 36 36"><path fill="#ff6961" d="M36 32a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h28a4 4 0 0 1 4 4v28z"></path><circle fill="#FFF" cx="27" cy="7" r="3"></circle><path fill="#FFF" d="M13.06 13.06l2.367-2.366l3.859 1.158l-2.635 2.847a10.018 10.018 0 0 1 4.392 3.379l5.017-5.017a1.5 1.5 0 0 0-.63-2.497l-9.999-3a1.495 1.495 0 0 0-1.492.376l-3 3a1.5 1.5 0 1 0 2.121 2.12zm16.065 4.949a1.496 1.496 0 0 0-1.262-.503l-6.786.617a9.966 9.966 0 0 1 1.464 2.879l3.548-.322l-1.554 6.995a1.499 1.499 0 1 0 2.928.65l2-9a1.5 1.5 0 0 0-.338-1.316zM13 16a8 8 0 1 0 0 16a8 8 0 0 0 0-16zm0 14a6 6 0 1 1 .002-12.002A6 6 0 0 1 13 30z"></path></svg>`,
|
|
313
313
|
stomped: `<svg viewBox="-1 0 19 19"><path d="M16.417 9.579A7.917 7.917 0 1 1 8.5 1.662a7.917 7.917 0 0 1 7.917 7.917zm-2.458 2.96a.396.396 0 0 0-.396-.397h-.667a1.527 1.527 0 0 0-1.249-1.114.777.777 0 0 0 .014-.145V9.378a.794.794 0 0 0-.792-.792H8.201a2.984 2.984 0 0 0-1.682-.516l-.11.002V7.42h2.997a.396.396 0 1 0 0-.792H6.41v-1.3a.396.396 0 0 0-.396-.397H4.891a.396.396 0 0 0 0 .792h.727V8.21a2.997 2.997 0 1 0 3.836 3.466h.71a1.526 1.526 0 1 0 2.732 1.26h.667a.396.396 0 0 0 .396-.397zM8.078 9.507a2.205 2.205 0 1 1-1.559-.646 2.19 2.19 0 0 1 1.559.646zm4.078 3.03a.734.734 0 1 1-.733-.734.735.735 0 0 1 .733.733z"/></svg>`,
|
|
314
314
|
tie: `<svg fill="#fff" viewBox="0 0 512.001 512.001"><g><g><path d="M120.988,239.868c-4.496,10.625-5.122,20.183-5.157,20.811c-0.267,4.607,3.243,8.547,7.849,8.829 c4.618,0.29,8.574-3.228,8.873-7.833c0.265-4.771,2.339-13.092,5.884-19.44C137.421,242.113,141.397,242.649,120.988,239.868z"/></g></g><g><g><path d="M391.178,255.418c-0.211,8.054-2.458,17.62-6.74,28.398c-1.708,4.299,0.393,9.168,4.692,10.875 c4.293,1.708,9.167-0.39,10.875-4.692c5.103-12.842,7.74-24.392,7.943-34.581H391.178z"/></g></g><g><g><path d="M164.769,210.51c1.046,3.339,1.397,6.953,0.893,10.65c-0.293,2.146-0.857,4.188-1.648,6.1c0,0,51.266,3.416,198.065,3.949 c-0.086-6.331,2.19-12.199,6.244-16.732C217.627,214.046,164.769,210.51,164.769,210.51z"/></g></g><g><g><circle cx="37.179" cy="128.669" r="29.491"/></g></g><g><g><path d="M510.146,391.511l-37.916-66.985c14.35-49.173,20.678-68.137,20.678-68.137l8.949-67.014 c1.502-10.977-6.248-21.075-17.235-22.468l-18.183-2.305c-10.984-1.393-20.996,6.445-22.293,17.431l-1.884,15.955l28.718-21.317 l-37.91,42.278h-46.432c-6.571,0-11.898,5.328-11.898,11.898c0,6.57,5.328,11.898,11.898,11.898h51.744 c3.381,0,6.601-1.438,8.859-3.956l41.456-46.234l-32.023,54.694c-5.28,9.018-14.374,8.169-18.293,8.167c-1.959,0-3.31,0-5.295,0 c-0.399,0.898,3.152-7.399-24.44,57.181c-0.548,1.284-0.907,2.642-1.06,4.031l-8.934,80.338 c-0.939,8.447,5.667,15.857,14.208,15.857c7.179,0,13.361-5.401,14.172-12.701l8.702-78.244l21.512-50.353l-14.121,50.463 c-1.158,3.756-0.718,7.823,1.218,11.243l40.949,72.345c3.885,6.864,12.596,9.276,19.459,5.392 C511.615,407.085,514.03,398.373,510.146,391.511z"/></g></g><g><g><circle cx="464.865" cy="128.702" r="29.491"/></g></g><g><g><path d="M142.923,206.051l-59.556-8.118l-39.135-18.451l13.626,2.292c-1.422-10.945-11.411-18.577-22.254-17.202l-18.182,2.305 C6.43,168.271-1.315,178.374,0.186,189.345l9.12,68.689l21.865,70.857l5.829,70.795c0.646,7.848,7.527,13.705,15.401,13.057 c7.859-0.647,13.705-7.542,13.058-15.401l-5.956-72.345c-0.084-1.031-0.281-2.05-0.585-3.039l-14.123-50.463l21.514,50.353 l8.702,78.244c0.873,7.86,7.96,13.486,15.768,12.612c7.838-0.871,13.483-7.931,12.612-15.768l-8.934-80.338 c-0.154-1.388-0.511-2.747-1.06-4.032l-27.336-61.43l-2.945-24.951l-29.029-25.179l40.79,19.231 c1.097,0.517,2.266,0.862,3.468,1.027l61.369,8.365c6.521,0.887,12.509-3.68,13.396-10.183 C153.994,212.936,149.435,206.939,142.923,206.051z"/></g></g></svg>`,
|
|
315
|
+
jungle: `<svg fill="#fff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 395 395" xml:space="preserve"><g><path d="M313.002,0H82C36.785,0,0,36.784,0,81.998v230.993C0,358.211,36.785,395,82,395h231.002 C358.216,395,395,358.211,395,312.991V81.998C395,36.784,358.216,0,313.002,0z M380,312.991C380,349.94,349.944,380,313.002,380H82 c-36.944,0-67-30.06-67-67.009V81.998C15,45.055,45.056,15,82,15h231.002C349.944,15,380,45.055,380,81.998V312.991z"/><path d="M305.336,107.5c-21.492,0-38.915,17.422-38.915,38.912c0,21.495,17.423,38.915,38.915,38.915 c21.49,0,38.911-17.42,38.911-38.915C344.247,124.922,326.826,107.5,305.336,107.5z"/><path d="M309.227,186.313c-10.602,0-21.818,7.267-21.818,7.267l-20.557-20.553c-2.876-2.876-3.857-3.915-6.746-3.915H145.701 H65.539v-0.193c0-2.149-1.742-3.891-3.892-3.891c-2.149,0-3.892,1.742-3.892,3.891v0.193h-7.003c-4.298,0-7.782,3.484-7.782,7.783 c0,4.298,3.484,7.783,7.782,7.783h87.166v9.081c0,4.298,3.484,7.783,7.782,7.783h36.863c-0.523,5.762,2.184,11.588,7.477,14.765 l53.325,31.996c2.468,1.48,5.238,2.218,8.009,2.218c2.905,0,5.809-0.813,8.355-2.433l14.475-9.209V287.5h70.042v-66.164 C344.247,201.992,328.567,186.313,309.227,186.313z M251.135,216.658L225.94,201.54h26.137l8.872,8.873L251.135,216.658z"/><path d="M167.491,165.612h45.528c4.298,0,7.782-3.484,7.782-7.783s-3.484-7.783-7.782-7.783h-45.528 c-4.298,0-7.782,3.484-7.782,7.783S163.193,165.612,167.491,165.612z"/></g></svg>`
|
|
315
316
|
};
|
|
316
317
|
const outcomeCounts = {
|
|
317
318
|
victory: 0,
|
|
@@ -356,13 +357,11 @@
|
|
|
356
357
|
};
|
|
357
358
|
|
|
358
359
|
let laneKey = "mid"; // 默认中路
|
|
359
|
-
if (innerPlayer.lane === "SAFE_LANE")
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
360
|
+
if (innerPlayer.lane === "SAFE_LANE") laneKey = innerPlayer.isRadiant ? "bottom" : "top";
|
|
361
|
+
else if (innerPlayer.lane === "OFF_LANE") laneKey = innerPlayer.isRadiant ? "top" : "bottom";
|
|
362
|
+
if (innerPlayer.lane === "JUNGLE") match.laneResult = "jungle";
|
|
363
|
+
else match.laneResult = laneResult[laneKey][innerPlayer.isRadiant ? "radiant" : "dire"];
|
|
364
364
|
|
|
365
|
-
match.laneResult = laneResult[laneKey][innerPlayer.isRadiant ? "radiant" : "dire"];
|
|
366
365
|
if (match.laneResult in outcomeCounts) {
|
|
367
366
|
outcomeCounts[match.laneResult]++;
|
|
368
367
|
}
|