koishi-plugin-noah 2.3.0 → 2.3.1
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.
|
@@ -10,7 +10,7 @@ export declare class AsphyxiaSDVXService implements GameService {
|
|
|
10
10
|
private constructor();
|
|
11
11
|
static getInstance(logger: Logger, config: SDVXConfig): AsphyxiaSDVXService;
|
|
12
12
|
private getModel;
|
|
13
|
-
getRefid(ctx: Context, url: string,
|
|
13
|
+
getRefid(ctx: Context, url: string, cardId: string): Promise<string>;
|
|
14
14
|
getUserName(ctx: Context, url: string, cardId: string): Promise<string>;
|
|
15
15
|
getAllScore(ctx: Context, url: string, cardId: string, config: SDVXConfig): Promise<SDVXScore[]>;
|
|
16
16
|
private getClearType;
|
package/lib/index.cjs
CHANGED
|
@@ -3265,7 +3265,8 @@ var SDVXDrawer = class extends BaseDrawer {
|
|
|
3265
3265
|
3: "GRV",
|
|
3266
3266
|
4: "HVN",
|
|
3267
3267
|
5: "VVD",
|
|
3268
|
-
6: "XCD"
|
|
3268
|
+
6: "XCD",
|
|
3269
|
+
7: "NBL"
|
|
3269
3270
|
};
|
|
3270
3271
|
diffKey = infVerNum != null && infMap[infVerNum] ? infMap[infVerNum] : "INF";
|
|
3271
3272
|
}
|
|
@@ -4464,6 +4465,8 @@ function getDiffName(diffStr, infVer) {
|
|
|
4464
4465
|
return "VVD";
|
|
4465
4466
|
case "6":
|
|
4466
4467
|
return "XCD";
|
|
4468
|
+
case "7":
|
|
4469
|
+
return "NBL";
|
|
4467
4470
|
}
|
|
4468
4471
|
}
|
|
4469
4472
|
break;
|
|
@@ -4496,6 +4499,8 @@ function getDiffFullName(diffStr, infVer) {
|
|
|
4496
4499
|
return "VIVID";
|
|
4497
4500
|
case "6":
|
|
4498
4501
|
return "EXCEED";
|
|
4502
|
+
case "7":
|
|
4503
|
+
return "NABLA";
|
|
4499
4504
|
}
|
|
4500
4505
|
}
|
|
4501
4506
|
break;
|
|
@@ -4525,6 +4530,8 @@ function getDiffStringFromAbbr(diffAbbr) {
|
|
|
4525
4530
|
return { diffStr: "infinite", infVer: 5 };
|
|
4526
4531
|
case "XCD":
|
|
4527
4532
|
return { diffStr: "infinite", infVer: 6 };
|
|
4533
|
+
case "NBL":
|
|
4534
|
+
return { diffStr: "infinite", infVer: 7 };
|
|
4528
4535
|
case "MXM":
|
|
4529
4536
|
return { diffStr: "maximum", infVer: null };
|
|
4530
4537
|
case "ULT":
|
|
@@ -4556,13 +4563,12 @@ var AsphyxiaSDVXService = class _AsphyxiaSDVXService {
|
|
|
4556
4563
|
}
|
|
4557
4564
|
async getModel(ctx) {
|
|
4558
4565
|
if (this.cachedModel) return this.cachedModel;
|
|
4559
|
-
const resp = await ctx.http.get(
|
|
4560
|
-
`${this.config.sdvx_data_url}/model`
|
|
4561
|
-
);
|
|
4566
|
+
const resp = await ctx.http.get(`${this.config.sdvx_data_url}/model`);
|
|
4562
4567
|
this.cachedModel = String(resp.model);
|
|
4563
4568
|
return this.cachedModel;
|
|
4564
4569
|
}
|
|
4565
|
-
async getRefid(ctx, url,
|
|
4570
|
+
async getRefid(ctx, url, cardId) {
|
|
4571
|
+
const model = await this.getModel(ctx);
|
|
4566
4572
|
const requestUrl = `?model=KFC:J:G:A:${model}&f=message.get`;
|
|
4567
4573
|
const xmlRequestBody = `<?xml version="1.0" encoding="UTF-8"?>
|
|
4568
4574
|
<call model="KFC:J:G:A:${model}" srcid="00010203040506070809">
|
|
@@ -4577,7 +4583,7 @@ var AsphyxiaSDVXService = class _AsphyxiaSDVXService {
|
|
|
4577
4583
|
}
|
|
4578
4584
|
async getUserName(ctx, url, cardId) {
|
|
4579
4585
|
const model = await this.getModel(ctx);
|
|
4580
|
-
const refid = await this.getRefid(ctx, url,
|
|
4586
|
+
const refid = await this.getRefid(ctx, url, cardId);
|
|
4581
4587
|
const requestUrl = `?model=KFC:J:G:A:${model}&f=message.get`;
|
|
4582
4588
|
const xmlRequestBody = `<call model="KFC:J:G:A:${model}" srcid="00010203040506070809">
|
|
4583
4589
|
<game method="sv7_load" ver="0">
|
|
@@ -4596,7 +4602,7 @@ var AsphyxiaSDVXService = class _AsphyxiaSDVXService {
|
|
|
4596
4602
|
}
|
|
4597
4603
|
async getAllScore(ctx, url, cardId, config) {
|
|
4598
4604
|
const model = await this.getModel(ctx);
|
|
4599
|
-
const refid = await this.getRefid(ctx, url,
|
|
4605
|
+
const refid = await this.getRefid(ctx, url, cardId);
|
|
4600
4606
|
const requestUrl = `?model=KFC:J:G:A:${model}&f=message.get`;
|
|
4601
4607
|
const xmlRequestBody = `<call model="KFC:J:G:A:${model}" srcid="00010203040506070809">
|
|
4602
4608
|
<game method="sv7_load_m" ver="0">
|