Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Lib9cVersion>1.32.0</Lib9cVersion>
<LibplanetVersion>5.5.2</LibplanetVersion>
</PropertyGroup>
<PropertyGroup>
<Lib9cVersion>1.36.1</Lib9cVersion>
<LibplanetVersion>5.5.2</LibplanetVersion>
</PropertyGroup>
</Project>
15 changes: 14 additions & 1 deletion Mimir.Worker/ActionHandler/ItemSlotStateHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ IStateGetterService stateGetterService
store,
headlessGqlClient,
initializerManager,
"^hack_and_slash[0-9]*$|^hack_and_slash_sweep[0-9]*$|^battle_arena[0-9]*$|^event_dungeon_battle[0-9]*$|^join_arena[0-9]*$|^raid[0-9]*$",
"^hack_and_slash[0-9]*$|^hack_and_slash_sweep[0-9]*$|^battle_arena[0-9]*$|^event_dungeon_battle[0-9]*$|^event_dungeon_battle_sweep[0-9]*$|^join_arena[0-9]*$|^raid[0-9]*$",
Log.ForContext<ItemSlotStateHandler>(),
stateGetterService
)
Expand Down Expand Up @@ -97,6 +97,19 @@ protected override async Task<IEnumerable<WriteModel<BsonDocument>>> HandleActio
);
}

if (Regex.IsMatch(actionType, "^event_dungeon_battle_sweep[0-9]*$"))
{
var action = new EventDungeonBattleSweep();
action.LoadPlainValue(actionPlainValue);
return await ItemSlotCollectionUpdater.UpdateAsync(
StateService,
blockIndex,
BattleType.Adventure,
action.AvatarAddress,
stoppingToken
);
}

if (Regex.IsMatch(actionType, "^join_arena[0-9]*$"))
{
var action = new JoinArena();
Expand Down
24 changes: 23 additions & 1 deletion Mimir.Worker/ActionHandler/RuneSlotStateHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PlanetType planetType
store,
headlessGqlClient,
initializerManager,
"^(battle_arena[0-9]*|event_dungeon_battle[0-9]*|hack_and_slash[0-9]*|hack_and_slash_sweep[0-9]*|join_arena[0-9]*|raid[0-9]*|unlock_rune_slot[0-9]*)$",
"^(battle_arena[0-9]*|event_dungeon_battle[0-9]*|event_dungeon_battle_sweep[0-9]*|hack_and_slash[0-9]*|hack_and_slash_sweep[0-9]*|join_arena[0-9]*|raid[0-9]*|unlock_rune_slot[0-9]*)$",
Log.ForContext<RuneSlotStateHandler>(),
stateGetterService
)
Expand Down Expand Up @@ -86,6 +86,13 @@ private async Task<IEnumerable<WriteModel<BsonDocument>>> TryProcessRuneSlotStat
return await TryProcessRuneSlotStateAsync(blockIndex, action, stoppingToken);
}

if (Regex.IsMatch(actionType, "^event_dungeon_battle_sweep[0-9]*$"))
{
var action = new EventDungeonBattleSweep();
action.LoadPlainValue(actionPlainValue);
return await TryProcessRuneSlotStateAsync(blockIndex, action, stoppingToken);
}

if (Regex.IsMatch(actionType, "^hack_and_slash[0-9]*$"))
{
var action = new HackAndSlash();
Expand Down Expand Up @@ -147,6 +154,21 @@ private async Task<IEnumerable<WriteModel<BsonDocument>>> TryProcessRuneSlotStat
);
}

private async Task<IEnumerable<WriteModel<BsonDocument>>> TryProcessRuneSlotStateAsync(
long blockIndex,
EventDungeonBattleSweep action,
CancellationToken stoppingToken = default
)
{
return await RuneSlotCollectionUpdater.UpdateAsync(
blockIndex,
StateService,
BattleType.Adventure,
action.AvatarAddress,
stoppingToken
);
}

private async Task<IEnumerable<WriteModel<BsonDocument>>> TryProcessRuneSlotStateAsync(
long blockIndex,
HackAndSlash action,
Expand Down
3 changes: 3 additions & 0 deletions Mimir.Worker/Util/ActionParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ public static ExtractedActionValues ExtractActionValue(string raw)
case IEventDungeonBattleV2 eventDungeonBattle2:
avatarAddress = eventDungeonBattle2.AvatarAddress;
break;
case IEventDungeonBattleSweep eventDungeonBattleSweep:
avatarAddress = eventDungeonBattleSweep.AvatarAddress;
break;
case IEventMaterialItemCraftsV1 eventMaterialItemCrafts:
avatarAddress = eventMaterialItemCrafts.AvatarAddress;
break;
Expand Down
Loading