Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the way to get right FP gacha subId #5

Closed
wants to merge 3 commits into from

Conversation

Zhen-Bo
Copy link

@Zhen-Bo Zhen-Bo commented May 15, 2024

how it works

Objects with commonReleaseId within the same level of high priority are checked first.
If all conditions of the high priority are present but not met, then the next priority level is checked.
The only condition that is currently being checked is 'clearQuest' and 'clearNum'

example

Right now, we've got three subIds activated: 402, 403, and 1000.
The function first checks the highest priority, which is 403. But there's a commonReleaseId and it's condition is 'Clear LB6'.

If your account doesn't clear LB6, it'll move on to check the lower priorities, which are 402 and 1000.

Now, if there are multiple subIds with the same priority, it'll prioritize the one with the commonReleaseId first, like 1000 in this case. But since its condition is 'Clear LB6', it'll then check the one without a commonReleaseId , which is 402.

notes

剛好最近重構到友抽的部分, 看到這邊你抽了 funtion 感覺可以發個 RP

結果抽 function 後改起來的體驗也沒好到哪裡去
看源碼時如果感到窒息就可以吸一口氧的話
我估計能把方圓 20 里內醫院裡的氧氣鋼瓶全吸光

已經盡量保證正確性的情況下對源碼做最小改動, 畢竟在我的 IDE 開啟專案後
只要一按保存就會瞬間對一堆東西做自動修正...

只開三個檔案就出了 118 個 error+warning....
image

* feat: add user quest info to User class

* chore: Changing up the way to find the right gacha subId.

* fix: add missing args for get FP gacha subId

* fix: add parameter value needs to be str
@DNNDHH
Copy link
Owner

DNNDHH commented May 16, 2024

池子是活动池优先,按现在的池子…没有过章新号在没有活动时候是0或401…有活动卡池时候是402…而正常已经过章完主线的账号是403

if gacha["commonReleaseId"] != 0 and isMatchedQuestCondition(region, userQuest, gacha["commonReleaseId"]):
return gacha["id"]
elif gacha["commonReleaseId"] == 0:
return gacha["id"]
Copy link
Author

@Zhen-Bo Zhen-Bo May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看 401 的 close at 已經超過現在的時間點了 (4/16)
所以如果以後沒有活動的話 EX: 402, 403 都關閉了, 只剩下 1000 還開啟
但是又有帳號還沒過 LB6 的話, 他就只能抽 subId 為 0 的池嗎?
如果是的話可能 那這邊的 for 迴圈底下就是要在加個 return 0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊應該是說如果 49 行這層 for 迴圈跑完後如果都沒有符合的條件就要返回 0
抱歉平時都是用 gitlab 不太熟悉 github

@DNNDHH DNNDHH closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants