forked from phenom/healer-man
Release Healer Man 0.1.21
This commit is contained in:
1 parent
699fc858c9
commit
f6f2375145
210 files changed
+976039
-6247
No files matched your search
@@ -12,6 +12,7 @@ import {
|
||||
updateCharacterEquipment,
|
||||
updateCharacterInventory,
|
||||
updateCharacterManastormProgress,
|
||||
updateCharacterDungeonRunCheckpoint,
|
||||
updateCharacterProgression,
|
||||
updateCharacterSettings,
|
||||
updateCharacterSpecialization,
|
||||
@@ -46,6 +47,7 @@ import {
|
||||
} from "../game/combatPresentation";
|
||||
import type { PartyRole } from "../game/partyRoles";
|
||||
import type { ManastormPartySize, ManastormProgress } from "../game/manastormProgress";
|
||||
import type { DungeonRunCheckpoint } from "../game/dungeonRunCheckpoint";
|
||||
import { dungeonShellRuntime } from "./dungeonShellRuntimeBridge";
|
||||
import { manastormShellRuntime } from "./manastormShellRuntimeBridge";
|
||||
import {
|
||||
@@ -112,6 +114,7 @@ export interface ShellState {
|
||||
updateCombatPresentationSettings: (patch: Partial<CombatPresentationSettings>) => void;
|
||||
resetCombatPresentationSettings: () => void;
|
||||
saveActiveManastormProgress: (progress: ManastormProgress) => void;
|
||||
saveActiveDungeonRunCheckpoint: (checkpoint: DungeonRunCheckpoint | null) => void;
|
||||
saveSelectedManastormLoadout: (loadout: readonly string[]) => boolean;
|
||||
setNotice: (notice: string) => void;
|
||||
}
|
||||
@@ -576,6 +579,20 @@ export const useShellStore = create<ShellState>((set, get) => ({
|
||||
characters: state.characters.map((character) => character.id === updated.id ? updated : character),
|
||||
}));
|
||||
},
|
||||
saveActiveDungeonRunCheckpoint: (checkpoint) => {
|
||||
const { session, activeCharacter } = get();
|
||||
if (!session || !activeCharacter) return;
|
||||
const updated = updateCharacterDungeonRunCheckpoint(
|
||||
session.ownerId,
|
||||
activeCharacter.id,
|
||||
checkpoint,
|
||||
);
|
||||
if (!updated) return;
|
||||
set((state) => ({
|
||||
activeCharacter: updated,
|
||||
characters: state.characters.map((character) => character.id === updated.id ? updated : character),
|
||||
}));
|
||||
},
|
||||
saveSelectedManastormLoadout: (loadout) => {
|
||||
const runtime = manastormShellRuntime();
|
||||
if (runtime) return runtime.saveSelectedLoadout(loadout);
|
||||
|
||||
Reference in new issue
Block a user