Release Healer Man 0.1.6
This commit is contained in:
1 parent
55cfd43d66
commit
b12fb84859
96 files changed
+10874
-609
No files matched your search
@@ -23,6 +23,8 @@ import { LazyLocalCompanionPanel } from "./LazyLocalCompanionPanel";
|
||||
import { ControllerButton } from "./ControllerButton";
|
||||
import { DungeonMapGraphic } from "./DungeonMapGraphic";
|
||||
import { BrandMark, ControllerLegend, FrontSurface } from "./FrontSurface";
|
||||
import { OnlineGroupPanel } from "./OnlineGroupPanel";
|
||||
import { useOnlineGroupStore } from "../app/onlineGroupStore";
|
||||
|
||||
installDungeonShellRuntime();
|
||||
|
||||
@@ -48,6 +50,10 @@ export function DungeonSelectScreen() {
|
||||
const enterDungeon = useShellStore((state) => state.enterDungeon);
|
||||
const returnToMainMenu = useShellStore((state) => state.returnToMainMenu);
|
||||
const notice = useShellStore((state) => state.notice);
|
||||
const session = useShellStore((state) => state.session);
|
||||
const onlineGroup = useOnlineGroupStore((state) => state.snapshot.group);
|
||||
const updateOnlineMember = useOnlineGroupStore((state) => state.updateMember);
|
||||
const startOnlineActivity = useOnlineGroupStore((state) => state.startActivity);
|
||||
const character = activeCharacter ?? rosterCharacter;
|
||||
const firstAvailable = DUNGEON_CATALOG.find((dungeon) => dungeon.available) ?? DUNGEON_CATALOG[0];
|
||||
const [selectedCategory, setSelectedCategory] = useState<DungeonCategoryId>(firstAvailable?.category ?? "wow");
|
||||
@@ -73,8 +79,22 @@ export function DungeonSelectScreen() {
|
||||
setRolePickerOpen(false);
|
||||
};
|
||||
|
||||
const enterAsRole = (role: PartyRole) => {
|
||||
if (selectedDungeon?.available) enterDungeon(selectedDungeon.id, role);
|
||||
const enterAsRole = async (role: PartyRole) => {
|
||||
if (!selectedDungeon?.available || !character) return;
|
||||
if (!onlineGroup || !session || session.kind !== "account") {
|
||||
enterDungeon(selectedDungeon.id, role);
|
||||
return;
|
||||
}
|
||||
if (!await updateOnlineMember(session, character, role)) return;
|
||||
if (onlineGroup.leaderAccountId !== session.ownerId) {
|
||||
useShellStore.getState().setNotice(`Ready as ${PARTY_ROLE_LABELS[role]}. Waiting for the group leader to start.`);
|
||||
return;
|
||||
}
|
||||
await startOnlineActivity(session, {
|
||||
type: "dungeon",
|
||||
contentId: selectedDungeon.id,
|
||||
partySize: 5,
|
||||
});
|
||||
};
|
||||
const actions = useMemo<MenuAction[]>(() => [
|
||||
...DUNGEON_CATEGORIES.map((category, index) => ({
|
||||
@@ -220,6 +240,7 @@ export function DungeonSelectScreen() {
|
||||
{selectedDungeon.available && !selectedPackInstalled && (
|
||||
<p className="front-notice" role="status">Install this expedition from Main menu / Downloads before playing offline.</p>
|
||||
)}
|
||||
<OnlineGroupPanel />
|
||||
{rolePickerOpen && characterClass ? (
|
||||
<section className="dungeon-role-picker" aria-labelledby="dungeon-role-title">
|
||||
<header>
|
||||
@@ -240,7 +261,7 @@ export function DungeonSelectScreen() {
|
||||
>
|
||||
<b aria-hidden="true">{ROLE_DETAILS[role].sigil}</b>
|
||||
<span>
|
||||
<strong>{PARTY_ROLE_LABELS[role]}</strong>
|
||||
<strong>{onlineGroup && session?.ownerId !== onlineGroup.leaderAccountId ? `Ready as ${PARTY_ROLE_LABELS[role]}` : PARTY_ROLE_LABELS[role]}</strong>
|
||||
<small>{ROLE_DETAILS[role].summary}</small>
|
||||
</span>
|
||||
</ControllerButton>
|
||||
|
||||
Reference in new issue
Block a user