Update Healer Man server
This commit is contained in:
1 parent
a64b2cb575
commit
71246e5b75
502 files changed
+4245
-19
No files matched your search
@@ -53,12 +53,17 @@ import { updateCombatEffectAnchorPosition } from "./combatEffectAnchorRegistry";
|
||||
import { shouldUseGeneratedOriginalFallback } from "./combatEffectRuntime";
|
||||
import { OriginalWowModel } from "./OriginalWowModel";
|
||||
import { OriginalParticleGeometry } from "./OriginalParticleGeometry";
|
||||
import { RunewakerParticleEffect } from "./RunewakerParticleEffect";
|
||||
import {
|
||||
parseRunewakerParticleGraph, runeDurationMs, type RunewakerParticleGraph,
|
||||
} from "./runewakerParticleRuntime";
|
||||
import {
|
||||
parseOriginalWowModelGraph, updateWowBoneMatrices, wowModelFrame, wowModelDurationMs, wowModelTextureUrls, wowParticleChild,
|
||||
type OriginalWowModelGraph,
|
||||
} from "./originalWowModelRuntime";
|
||||
|
||||
type OriginalSourceEffectGraph = OriginalCombatEffectGraph | OriginalCombatMeshGraph | OriginalWowModelGraph;
|
||||
type OriginalSourceEffectGraph = OriginalCombatEffectGraph | OriginalCombatMeshGraph
|
||||
| OriginalWowModelGraph | RunewakerParticleGraph;
|
||||
|
||||
function sourceParticles(graph: OriginalSourceEffectGraph): OriginalCombatEffectGraph | null {
|
||||
return graph.kind === "wow-m2-model" ? graph.particleGraph
|
||||
@@ -155,6 +160,7 @@ function graphTailMs(graph: OriginalCombatEffectGraph): number {
|
||||
|
||||
function placementHeight(model: string | undefined, event: CombatPresentationEvent): number {
|
||||
const normalized = model?.toLowerCase() ?? "";
|
||||
if (normalized.endsWith(".ros") && /(?:_|\/)down(?:\.|_|$)/.test(normalized)) return 0.08;
|
||||
if (/(?:_|\/)head(?:\.|_|$)/.test(normalized)) return 1.72;
|
||||
if (/(?:_|\/)chest(?:\.|_|$)/.test(normalized)) return 1.12;
|
||||
if (/(?:_|\/)base(?:\.|_|$)/.test(normalized)) return 0.08;
|
||||
@@ -227,7 +233,8 @@ async function loadGraph(url: string): Promise<OriginalSourceEffectGraph> {
|
||||
? response.json()
|
||||
: Promise.reject(new Error(`Original effect graph request failed (${response.status}): ${url}`)))
|
||||
.then((value) => (
|
||||
value?.kind === "wow-m2-model" ? parseOriginalWowModelGraph(value)
|
||||
value?.kind === "runewaker-ros-particle-archive" ? parseRunewakerParticleGraph(value)
|
||||
: value?.kind === "wow-m2-model" ? parseOriginalWowModelGraph(value)
|
||||
: value && typeof value === "object" && (value as { kind?: unknown }).kind === "wow-m2-static-mesh"
|
||||
? parseOriginalCombatMeshGraph(value)
|
||||
: parseOriginalCombatEffectGraph(value)
|
||||
@@ -264,11 +271,17 @@ async function loadOriginalGraphAsset(asset: CombatEffectPhaseAsset): Promise<Lo
|
||||
const sourceTextures = new Map<string, Texture>();
|
||||
if (graph.kind === "wow-m2-model") {
|
||||
await Promise.all(wowModelTextureUrls(graph).map(async (url) => sourceTextures.set(url, await loadTexture(url))));
|
||||
} else if (graph.kind === "runewaker-ros-particle-archive") {
|
||||
await Promise.all(graph.textures.map(async (texture) => (
|
||||
sourceTextures.set(texture.url, await loadTexture(texture.url))
|
||||
)));
|
||||
}
|
||||
const textureIndices = graph.kind === "wow-m2-model"
|
||||
? graph.textures.flatMap((texture, index) => texture.url ? [index] : [])
|
||||
: graph.kind === "wow-m2-static-mesh"
|
||||
? [...new Set(graph.layers.map((layer) => layer.textureIndex))]
|
||||
: graph.kind === "runewaker-ros-particle-archive"
|
||||
? []
|
||||
: [...new Set(graph.runtime.readyParticleIndices.map((particleIndex) => (
|
||||
graph.particles[particleIndex]?.textureIndex
|
||||
)).filter((textureIndex): textureIndex is number => textureIndex !== undefined))];
|
||||
@@ -690,6 +703,8 @@ function LoadedOriginalCombatEffect({
|
||||
+ (item.graph.particleGraph ? graphTailMs(item.graph.particleGraph) : 0)
|
||||
: item.graph.kind === "wow-m2-static-mesh"
|
||||
? 6_000
|
||||
: item.graph.kind === "runewaker-ros-particle-archive"
|
||||
? runeDurationMs(item.graph, event.phase)
|
||||
: graphDurationMs(item.graph) + graphTailMs(item.graph),
|
||||
)
|
||||
), 0);
|
||||
@@ -790,7 +805,11 @@ function LoadedOriginalCombatEffect({
|
||||
>
|
||||
{graph.kind === "wow-m2-model" && <OriginalWowModel graph={graph} textures={item.textures}
|
||||
active={active} playbackRef={staticMeshPlaybackRef} loop={loopTimeline} />}
|
||||
{graph.kind === "wow-m2-static-mesh" ? (
|
||||
{graph.kind === "runewaker-ros-particle-archive" ? (
|
||||
<RunewakerParticleEffect graph={graph} textures={item.sourceTextures}
|
||||
phase={event.phase} quality={quality} active={active} eventId={event.id}
|
||||
playbackRef={staticMeshPlaybackRef} />
|
||||
) : graph.kind === "wow-m2-static-mesh" ? (
|
||||
<OriginalStaticMesh
|
||||
graph={graph}
|
||||
textures={item.textures}
|
||||
|
||||
Reference in new issue
Block a user