Update Healer Man server

This commit is contained in:
phenom committed 2026-10-06 22:25:34 -04:00
1 parent 6114a2295f
commit 69809f7228
593 files changed
+903643 -40774

No files matched your search

+18 -2
View File
@@ -3,6 +3,7 @@ import fs from "node:fs";
import { createRequire } from "node:module";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { spellDbcEquipmentMetadata } from "./spellDbcEquipmentMetadata.mjs";
const require = createRequire(import.meta.url);
const { MpqArchive } = require("stormlib-js");
@@ -141,6 +142,7 @@ function parseSpells(buffer, castTimes, durations, radii, ranges, icons) {
const fieldCount = buffer.readUInt32LE(8);
const recordSize = buffer.readUInt32LE(12);
const stringSize = buffer.readUInt32LE(16);
const equipmentMetadata = spellDbcEquipmentMetadata(buffer);
const stringsOffset = 20 + count * recordSize;
const shift = fieldCount >= 239 ? 6 : 0;
const shifted = (field) => field >= 77 ? field + shift : field;
@@ -169,6 +171,8 @@ function parseSpells(buffer, castTimes, durations, radii, ranges, icons) {
rankText: localized(153),
description: localized(170) || localized(187),
attributes: Array.from({ length: 8 }, (_, attribute) => unsigned(4 + attribute)),
damageClass: unsigned(shifted(213)),
schoolMask: unsigned(shifted(225)),
castTimeMs: Math.max(0, castTimes.get(unsigned(28)) ?? 0),
recoveryTimeMs: unsigned(29),
categoryRecoveryTimeMs: unsigned(30),
@@ -181,8 +185,7 @@ function parseSpells(buffer, castTimes, durations, radii, ranges, icons) {
powerCost: unsigned(42),
rangeIndex: unsigned(46),
...(ranges.get(unsigned(46)) ?? { min: 0, max: 0 }),
equippedItemClass: signed(67),
equippedItemSubclassMask: signed(68),
...equipmentMetadata.get(unsigned(0)),
iconBasename: path.basename(icons.get(unsigned(shifted(133))) || "inv_misc_questionmark")
.replace(/\.(?:blp|tga)$/i, "")
.toLowerCase(),
@@ -305,6 +308,19 @@ function slimRank(spell, spells) {
rangeMax: spell.max,
equippedItemClass: spell.equippedItemClass,
equippedItemSubclassMask: spell.equippedItemSubclassMask,
equippedItemInventoryMask: spell.equippedItemInventoryMask,
wowSpellDefense: {
damageClass: spell.damageClass,
schoolMask: spell.schoolMask,
attributes0: spell.attributes[0],
attributes1: spell.attributes[1],
attributes3: spell.attributes[3],
attributes5: spell.attributes[5],
// SpellMgr::LoadSpellCustomAttr establishes CU_DIRECT_DAMAGE for these
// raw effects. Absence does not prove the SQL custom-attribute mask zero.
directDamageFromEffects: spell.effects.some((effect) => [2, 17, 31, 58, 121, 10].includes(effect.effectType)),
sourceProfile: "wow335",
},
effects: spell.effects,
};
}