Release Healer Man 0.1.21

This commit is contained in:
phenom committed 2026-09-08 10:40:26 -04:00
1 parent 699fc858c9
commit f6f2375145
210 files changed
+976039 -6247

No files matched your search

+36
View File
@@ -31,6 +31,14 @@ import { useGameStore } from "./store";
import { useManastormStore } from "./manastormStore";
import { advanceManastormSession } from "./manastormSession";
import { useWailingEncounterStore } from "./wailingCavernsEncounter";
import {
exportDungeonEncounterSnapshots,
importDungeonEncounterSnapshots,
} from "./dungeonEncounterRuntime";
import {
dispatchDungeonWorldObjectInteraction,
dungeonInteractionCandidateAt,
} from "./dungeonWorldInteraction";
const SYNC_INTERVAL_MS = 100;
const WORLD_INTERVAL_MS = 200;
@@ -56,6 +64,10 @@ function sharedWorld(): OnlineSharedWorld {
}),
);
return {
dungeonId: game.activeDungeonId,
encounters: game.gameMode === "dungeon"
? exportDungeonEncounterSnapshots(game.activeDungeonId)
: [],
mobs: combat.mobs,
mobTransforms,
partyMembers: party.members,
@@ -89,6 +101,10 @@ function applySharedWorld(world: OnlineSharedWorld): void {
}
if (world.wailing) useWailingEncounterStore.setState(world.wailing as never);
if (world.manastorm) useManastormStore.setState(world.manastorm as never);
const activeDungeonId = useGameStore.getState().activeDungeonId;
if (world.dungeonId === activeDungeonId && world.encounters) {
importDungeonEncounterSnapshots(activeDungeonId, world.encounters);
}
}
function eventForRelay(
@@ -140,6 +156,26 @@ function applyRelayEvent(
useCombatStore.getState().lootMob(event.targetActorId, event.occurredAt || Date.now());
return;
}
if (event.kind === "interact" && snapshot.authority && event.targetActorId) {
const source = snapshot.players.find((player) => player.accountId === event.sourceAccountId);
const candidate = source ? dungeonInteractionCandidateAt(source.position) : null;
if (candidate?.object.id === event.targetActorId) {
dispatchDungeonWorldObjectInteraction(
candidate.object,
event.sourceActorId,
event.occurredAt || Date.now(),
);
}
return;
}
if (event.kind === "party-teleport" && !snapshot.authority && event.position) {
const game = useGameStore.getState();
game.relocatePlayer({ footPosition: event.position, yaw: game.cameraYaw }, true);
for (const member of usePartyStore.getState().members) {
updatePartyRuntimePosition(member.id, ...event.position);
}
return;
}
if (event.targetActorId === localActorId) {
if (event.kind === "damage") {
const sourceLevel = useCombatStore.getState().mobs[event.sourceActorId]?.level;