diff --git a/CHANGELOG b/CHANGELOG index 0d61231..6ea0794 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,50 +1,57 @@ -0.1.14 +## 0.1.15 + +fix: rank point change is not uploaded at first challenge ([#11](https://github.com/spacemeowx2/s3si.ts/issues/11)) + +## 0.1.14 fix: FEST upload failed -0.1.13 +## 0.1.13 feat: auto track after promotion challenge success + fix: failed promotion challenge can also lead to tracked promotions -0.1.12 +## 0.1.12 feat: add rank tracker -0.1.11 +## 0.1.11 feat: use s3s' namespace. (see https://github.com/frozenpandaman/s3s/issues/65 for detail) + refactor: remove `_bid` in exported file -0.1.10 +## 0.1.10 fix: missing draw judgement -0.1.9 +## 0.1.9 update WEB_VIEW_VERSION -0.1.8 +## 0.1.8 feat: add coop export -0.1.7 +## 0.1.7 feat: refetch token when 401 close #5 + feat: add github link to UA -0.1.6 +## 0.1.6 fix: wrong base64 encode/decode. (#4) -0.1.5 +## 0.1.5 fix: rank_up sent on last battle of challenge -0.1.4 +## 0.1.4 fix: wrong win/lose count in challenge -0.1.3 +## 0.1.3 feat: send challenge win/lose count every battle diff --git a/src/constant.ts b/src/constant.ts index 062e94f..76641a4 100644 --- a/src/constant.ts +++ b/src/constant.ts @@ -1,7 +1,7 @@ import type { StatInkPostBody, VsHistoryDetail } from "./types.ts"; export const AGENT_NAME = "s3si.ts"; -export const S3SI_VERSION = "0.1.14"; +export const S3SI_VERSION = "0.1.15"; export const NSOAPP_VERSION = "2.3.1"; export const WEB_VIEW_VERSION = "1.0.0-5644e7a2"; export const S3SI_LINK = "https://github.com/spacemeowx2/s3si.ts"; diff --git a/src/exporters/stat.ink.ts b/src/exporters/stat.ink.ts index f09a11b..bfa628a 100644 --- a/src/exporters/stat.ink.ts +++ b/src/exporters/stat.ink.ts @@ -287,12 +287,15 @@ export class StatInkExporter implements GameExporter { result.challenge_lose = challengeProgress.loseCount; } - if (rankBeforeState) { + if (rankBeforeState && rankState) { result.rank_before_exp = rankBeforeState.rankPoint; - } - - if (rankState) { result.rank_after_exp = rankState.rankPoint; + + // splatnet returns null, so we need to calculate it + if (result.rank_exp_change === null) { + result.rank_exp_change = result.rank_after_exp - result.rank_before_exp; + } + if (!result.rank_after) { [result.rank_after, result.rank_after_s_plus] = parseUdemae( rankState.rank,