Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
moonheart committed Jun 23, 2024
2 parents 43812ef + 53f4898 commit 158a62b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 15 deletions.
6 changes: 4 additions & 2 deletions MementoMori.BlazorShared/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,12 @@
}
}

protected override void OnInitialized()
protected override async Task OnInitializedAsync()
{
base.OnInitialized();
await base.OnInitializedAsync();
_ = CheckLatestVersion();

_ = Funcs.GetNoticeInfoList();
}

private void ShowNotice(NoticeInfo context)
Expand Down
7 changes: 6 additions & 1 deletion MementoMori/MementoMoriFuncs.Ops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
using ShopGetListResponse = MementoMori.Ortega.Share.Data.ApiInterface.Shop.GetListResponse;
using TradeShopGetListRequest = MementoMori.Ortega.Share.Data.ApiInterface.TradeShop.GetListRequest;
using TradeShopGetListResponse = MementoMori.Ortega.Share.Data.ApiInterface.TradeShop.GetListResponse;
using System.Globalization;
using System.Xml.Linq;
using MementoMori.Common.Localization;
using MementoMori.MagicOnion;
Expand Down Expand Up @@ -1957,6 +1958,7 @@ public async Task GetMonthlyLoginBonusInfo()
public async Task GetNoticeInfoList()
{
var countryCode = OrtegaConst.Addressable.LanguageNameDictionary[NetworkManager.LanguageType];

var response = await GetResponse<GetNoticeInfoListRequest, GetNoticeInfoListResponse>(new GetNoticeInfoListRequest()
{
AccessType = NoticeAccessType.Title,
Expand All @@ -1974,7 +1976,10 @@ public async Task GetNoticeInfoList()
LanguageType = NetworkManager.LanguageType,
UserId = AuthOption.UserId
});
EventInfoList = response2.NoticeInfoList.Where(d=>d.Id % 10 != 6).ToList();
EventInfoList = response2.NoticeInfoList
.GroupBy(n => n.Title)
.Select(g => g.First())
.ToList();
}

public TowerType[] GetAvailableTower()
Expand Down
1 change: 1 addition & 0 deletions MementoMori/MementoNetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public async Task<bool> DownloadMasterCatalog(Action<string> log = null)

public void SetCultureInfo(CultureInfo cultureInfo)
{
CultureInfo = cultureInfo;
Masters.TextResourceTable.SetLanguageType(parseLanguageType(cultureInfo));
Masters.LoadAllMasters();
}
Expand Down
22 changes: 14 additions & 8 deletions readme.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,20 +303,23 @@ When there is an event: Choose the mission with the highest number of event item

When there is no event: Select missions based on the configured reward weights in the options.

#### Reward Weights
### Reward Weight

Go to Options - Welcome Temple to set reward weights. The calculation method is as follows:
By going to Options - Phantom Temple, you can set the reward weight. The calculation method is as follows:

$$Sort = weight \times \frac{N^{lv\_current}_{star\_current}}{N^{lv\_max}_{star\_max}}$$

Suppose the settings are as follows:

- Gem Exchange Voucher: 5
- Potential Bead: 3
- Rune Exchange Coupon: 5
- Potential Orb: 3

There are two tasks:

There are two missions:
- Mission A rewards Gem Exchange Voucher x10, with a weight of 50.
- Mission B rewards Potential Bead x30, with a weight of 90.
- Task A rewards with Rune Exchange Coupon x10. The reward for a 127-level 10-star task is Rune Exchange Coupon x100, calculated as $0.5 = 5 \times \frac{10}{100}$.
- Task B rewards with Potential Orb x30. The reward for a 127-level 10-star task is Potential Orb x2000, calculated as $0.045 = 3 \times \frac{30}{2000}$.

The system will choose Mission B for battle because it has a higher total weight.
Ultimately, Task A will be chosen for the battle.

### Fountain of Wishes All Claim

Expand Down Expand Up @@ -399,6 +402,9 @@ To run multiple instances, modify the port number in `appsettings.user.json`. Fo

```json5
{
{
// original contents
},
"Kestrel": {
"Endpoints": {
"Http": {
Expand Down
13 changes: 9 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,20 @@ services:

#### 报酬权重

进入 选项 - 欢迎神殿 可以设置报酬权重,计算方法如下:
进入 选项 - 幻影神殿 可以设置报酬权重,计算方法如下:

$$Sort=weight\times\frac{N^{lv\_current}_{star\_current}}{N^{lv\_max}_{start\_max}}$$

假如设置是这样的:

- 符石兑换券:5
- 潜能宝珠:3

有两个任务:
- 任务 A 报酬为符石兑换券x10,加上权重可得 50
- 任务 B 为潜能宝珠x30,加上权重可得 90
- 任务 A 报酬为符石兑换券x10,127级10星的任务报酬为符石兑换券x100, 计算可得 $0.5=5\times\frac{10}{100}$
- 任务 B 为潜能宝珠x30,127级10星的任务报酬为潜能宝珠x2000, 计算可得 $0.045=3\times\frac{30}{2000}$

最终会选择任务 B 进行战斗。
最终会选择任务 A 进行战斗。

### 祈愿之泉全部领取

Expand Down Expand Up @@ -398,6 +400,9 @@ services:

```json5
{
{
// 原来的内容
},
"Kestrel": {
"Endpoints": {
"Http": {
Expand Down

0 comments on commit 158a62b

Please sign in to comment.