forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
e284f4fc76
commit
15a5254380
52 files changed
+637
-80
No files matched your search
@@ -25,6 +25,7 @@ import {
|
||||
type CombatEffectPhaseAsset,
|
||||
type CombatPresentationEvent,
|
||||
type CombatPresentationPhase,
|
||||
type CombatPresentationSource,
|
||||
type CombatVfxQuality,
|
||||
} from "../game/combatPresentation";
|
||||
import { fetchCombatMediaAsset } from "../game/combatMediaPack";
|
||||
@@ -163,6 +164,7 @@ function graphTailMs(graph: OriginalCombatEffectGraph): number {
|
||||
|
||||
function placementHeight(model: string | undefined, event: CombatPresentationEvent): number {
|
||||
const normalized = model?.toLowerCase() ?? "";
|
||||
if (event.abilityId === "race-affix-meteor-release") return 0.08;
|
||||
if (normalized.endsWith(".ros") && /(?:_|\/)down(?:\.|_|$)/.test(normalized)) return 0.08;
|
||||
if (/(?:_|\/)head(?:\.|_|$)/.test(normalized)) return 1.72;
|
||||
if (/(?:_|\/)chest(?:\.|_|$)/.test(normalized)) return 1.12;
|
||||
@@ -296,6 +298,18 @@ async function loadOriginalGraphAsset(asset: CombatEffectPhaseAsset): Promise<Lo
|
||||
return { asset, graph, textures: new Map(loadedTextures), sourceTextures };
|
||||
}
|
||||
|
||||
/** Warm a scripted effect before its warning starts so its first cue is not delayed by asset loading. */
|
||||
export async function preloadOriginalCombatEffectPhase(input: {
|
||||
readonly source: Exclude<CombatPresentationSource, "fallback">;
|
||||
readonly sourceSpellId: number;
|
||||
readonly phase: CombatPresentationPhase;
|
||||
readonly abilityId: string;
|
||||
}): Promise<void> {
|
||||
await preloadCombatEffectManifest();
|
||||
const assets = combatOriginalPhaseAssets(input);
|
||||
await Promise.allSettled(assets.map(loadOriginalGraphAsset));
|
||||
}
|
||||
|
||||
function materialForParticle(particle: OriginalCombatEffectParticle, texture: Texture): ShaderMaterial {
|
||||
const additive = particle.blend === "no-alpha-add"
|
||||
|| particle.blend === "add"
|
||||
@@ -727,7 +741,9 @@ function LoadedOriginalCombatEffect({
|
||||
const projectile = (event.phase === "release" || (event.phase === "tick" && isPenancePulseVisual(event)))
|
||||
&& event.delivery === "projectile"
|
||||
&& event.targetPosition !== undefined;
|
||||
const projectileDurationMs = projectile ? projectileTravelDurationMs(event) : 0;
|
||||
const projectileDurationMs = projectile
|
||||
? Math.max(1, event.visualTravelDurationMs ?? projectileTravelDurationMs(event))
|
||||
: 0;
|
||||
const anchor = event.phase === "cast-start" || projectile
|
||||
? event.origin
|
||||
: event.targetPosition ?? event.origin;
|
||||
@@ -800,7 +816,10 @@ function LoadedOriginalCombatEffect({
|
||||
&& item.asset.model?.toLowerCase() === "model/fx/skill/ice/act_riptide_t_freeze_hit.ros"
|
||||
? risingTideImpactPlacement(event, combatEffectTargetVisualSize(event.targetActorId))
|
||||
: null;
|
||||
const scale = effectScale(item.asset) * (risingTideTarget?.scale ?? 1) * tuning.scale;
|
||||
const scriptedScale = typeof event.visualScale === "number" && Number.isFinite(event.visualScale)
|
||||
? Math.max(0.01, event.visualScale) : 1;
|
||||
const scale = effectScale(item.asset) * (risingTideTarget?.scale ?? 1) * tuning.scale
|
||||
* scriptedScale;
|
||||
return (
|
||||
<group
|
||||
key={`${item.asset.effectGraphUrl}:${item.asset.model ?? "model"}`}
|
||||
|
||||
Reference in new issue
Block a user