forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
15a5254380
commit
9d7e0e2f9e
71 files changed
+3490
-81
No files matched your search
@@ -12,6 +12,7 @@ import { registerDungeonShellRuntime, type DungeonEntrySettings } from "./dungeo
|
||||
import { touchCharacter } from "./accountRepository";
|
||||
import { specializationById } from "../game/specializationCatalog";
|
||||
import { dungeonContentIsUsable } from "../content/contentManager";
|
||||
import { preparedBiteSizedRunSelection } from "./biteSizedLayoutContent";
|
||||
|
||||
export function installDungeonShellRuntime(): void {
|
||||
registerDungeonShellRuntime({ enterDungeon });
|
||||
@@ -23,10 +24,6 @@ function enterDungeon(dungeonId: string, requestedRole?: PartyRole, settings?: D
|
||||
useShellStore.setState({ notice: "That dungeon is not available yet." });
|
||||
return false;
|
||||
}
|
||||
if (!dungeonContentIsUsable(dungeonId)) {
|
||||
useShellStore.setState({ notice: "Install this expedition from Downloads before entering." });
|
||||
return false;
|
||||
}
|
||||
const { session, selectedCharacterId, characters } = useShellStore.getState();
|
||||
if (!session || !selectedCharacterId) {
|
||||
useShellStore.setState({ notice: "Select or create a character first." });
|
||||
@@ -62,6 +59,12 @@ function enterDungeon(dungeonId: string, requestedRole?: PartyRole, settings?: D
|
||||
&& (settings?.bossDifficulty === undefined || checkpoint.run?.bossDifficulty === settings.bossDifficulty)
|
||||
? activeCharacter.dungeonRunCheckpoint
|
||||
: null;
|
||||
const biteSizedSelection = settings?.biteSizedSelection ?? resume?.run?.biteSizedSelection
|
||||
?? (settings?.runId ? preparedBiteSizedRunSelection(dungeonId, settings.runId) : undefined);
|
||||
if (!dungeonContentIsUsable(biteSizedSelection?.spot.sourceDungeonId ?? dungeonId)) {
|
||||
useShellStore.setState({ notice: "Install this expedition from Downloads before entering." });
|
||||
return false;
|
||||
}
|
||||
if (!activateDungeonSession(dungeonId, settings?.difficultyId ?? resume?.difficultyId, {
|
||||
bossDifficulty: settings?.bossDifficulty ?? resume?.run?.bossDifficulty,
|
||||
spawn: resume?.spawn,
|
||||
@@ -69,6 +72,7 @@ function enterDungeon(dungeonId: string, requestedRole?: PartyRole, settings?: D
|
||||
runProgress: resume?.run,
|
||||
legacyResume: Boolean(resume && resume.run?.bossDifficulty === undefined),
|
||||
runId: settings?.runId,
|
||||
biteSizedSelection,
|
||||
})) {
|
||||
useShellStore.setState({
|
||||
notice: dungeon.availabilityReason ?? "That dungeon failed its latest validation gate.",
|
||||
|
||||
Reference in new issue
Block a user