Release Healer Man 0.1.20

This commit is contained in:
phenom committed 2026-09-06 14:38:59 -04:00
1 parent d9bebb4e81
commit 699fc858c9
22 files changed
+551 -295

No files matched your search

@@ -707,6 +707,18 @@ function smartAiMechanicsFor(entity, boss, spells, worldAi) {
return mechanics;
}
function initializationSpawnChance(entry, worldAi) {
const despawnRows = (worldAi?.smartScriptsByEntry?.[String(entry)] ?? []).filter((row) => (
Number(row.event_type) === 37
&& Number(row.action_type) === 41
&& Number(row.target_type) === 1
));
if (!despawnRows.length) return 1;
return rounded(despawnRows.reduce((chance, row) => (
chance * (1 - Math.max(0, Math.min(100, Number(row.event_chance) || 0)) / 100)
), 1));
}
function uniqueMechanics(mechanics) {
const seenIds = new Set();
const seenSpellIds = new Set();
@@ -1233,6 +1245,7 @@ async function compile() {
const id = encounter.eventOnly
? "mutanus-spawn"
: candidate?.id ?? `encounter-${encounter.encounterId}`;
const spawnChance = initializationSpawnChance(encounter.creatureId, azerothCoreWorldAi);
usedBossSpawnIds.add(id);
return {
id,
@@ -1240,6 +1253,7 @@ async function compile() {
name: encounter.name,
position,
yaw: candidate?.yaw ?? 0,
...(spawnChance < 1 ? { optional: true } : {}),
...(encounter.eventOnly ? { eventOnly: true } : {}),
};
});
@@ -1248,6 +1262,7 @@ async function compile() {
const roamingPacks = [];
for (const spawn of sourceSpawns) {
const entry = Number(spawn.entityId.replace("entry-", ""));
const spawnChance = initializationSpawnChance(entry, azerothCoreWorldAi);
const isBoss = bossEntries.has(entry);
const transformedPosition = mapPosition(spawn.position);
if (!isBoss && spawn.waypoints?.length >= 2) {
@@ -1269,6 +1284,7 @@ async function compile() {
pathId: spawn.pathId,
formationSource: "database-solo",
spawnMask: spawn.spawnMask,
...(spawnChance < 1 ? { spawnChance } : {}),
waypoints,
members: [{
id: "member",
@@ -1286,6 +1302,7 @@ async function compile() {
position: transformedPosition,
yaw: spawn.yaw,
spawnMask: spawn.spawnMask,
...(spawnChance < 1 ? { spawnChance } : {}),
});
}
for (const boss of bossObjectives) {
@@ -1337,10 +1354,11 @@ async function compile() {
...roamingPacks.flatMap((pack) => pack.waypoints),
];
const bounds = finiteBounds(allPoints);
const bosses = bossObjectives.map(({ id, name, position, eventOnly }) => ({
const bosses = bossObjectives.map(({ id, name, position, optional, eventOnly }) => ({
id,
name,
position,
...(optional ? { optional: true } : {}),
...(eventOnly ? { eventOnly: true } : {}),
}));
const databaseKind = recipe.clientBuild === "3.3.5a-Epoch" || draft?.spawns?.length