Update Healer Man server
This commit is contained in:
1 parent
ab1434a3b8
commit
e284f4fc76
60 files changed
+2704
-118
No files matched your search
@@ -23,6 +23,8 @@ import {
|
||||
onlineSessionOwnsWorldSimulation,
|
||||
} from "./onlineSessionRuntime";
|
||||
import { combatSimulationTimerShouldRun } from "./combatSimulationLifecycle";
|
||||
import { advanceDungeonRaceAffixes, resetDungeonRaceAffixEffects, resumeDungeonRaceAffixes,
|
||||
suspendDungeonRaceAffixes } from "./dungeonRaceAffixRuntime";
|
||||
import {
|
||||
DUNGEON_SIMULATION_FIXED_STEP_MS,
|
||||
useDungeonSimulationStore,
|
||||
@@ -66,6 +68,7 @@ export function CombatBridge() {
|
||||
mountedResetRevision.current = encounterResetRevision;
|
||||
encounterMobCursor.current = {};
|
||||
useCombatStore.getState().resetEncounter();
|
||||
resetDungeonRaceAffixEffects();
|
||||
resetDungeonEncounters("dungeon", useGameStore.getState().activeDungeonId);
|
||||
}, [encounterResetRevision]);
|
||||
|
||||
@@ -153,8 +156,12 @@ export function CombatBridge() {
|
||||
epochNow,
|
||||
);
|
||||
encounterMobCursor.current = combatEvents.cursor;
|
||||
for (const event of combatEvents.events) dispatchActiveDungeonEntityEvent(event);
|
||||
const registeredEntityIds = Object.keys(mobs);
|
||||
for (const event of combatEvents.events) if (!event.entityId.startsWith("race-affix-"))
|
||||
dispatchActiveDungeonEntityEvent(event);
|
||||
advanceDungeonRaceAffixes(epochNow, combatEvents.events.filter((event) => (
|
||||
event.kind === "entity-death" && !event.entityId.startsWith("race-affix-")
|
||||
)).map((event) => event.entityId));
|
||||
const registeredEntityIds = Object.keys(mobs).filter((id) => !id.startsWith("race-affix-"));
|
||||
advanceDungeonEncounters(game.activeDungeonId, {
|
||||
kind: "tick",
|
||||
now: epochNow,
|
||||
@@ -205,8 +212,10 @@ export function CombatBridge() {
|
||||
// Reset the clock on resume so a long pause/background period cannot
|
||||
// leak into the first simulation delta.
|
||||
previous = performance.now();
|
||||
resumeDungeonRaceAffixes();
|
||||
timer = window.setInterval(advance, 100);
|
||||
} else if (!shouldRun && timer !== null) {
|
||||
suspendDungeonRaceAffixes();
|
||||
window.clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user