Browse Source

fix #1972: Fix mob animations

tags/v0.12.0
kckckc 1 year ago
parent
commit
6cba6b0687
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/server/world/mobBuilder.js

+ 4
- 3
src/server/world/mobBuilder.js View File

@@ -105,6 +105,10 @@ const buildCpnSpells = (mob, blueprint, typeDefinition, preferStat) => {
const dmgMult = 4.5 * typeDefinition.dmgMult * dmgMults[blueprint.level - 1];

const spells = extend([], blueprint.spells);
spells.forEach(s => {
if (!s.animation && mob.sheetName === 'mobs' && animations.mobs[mob.cell])
s.animation = 'basic';
});

mob.addComponent('spellbook', { spells });

@@ -123,9 +127,6 @@ const buildCpnSpells = (mob, blueprint, typeDefinition, preferStat) => {
s.dmgMult = s.name ? dmgMult / 3 : dmgMult;
s.statType = preferStat;
s.manaCost = 0;

if (!s.animation && mob.sheetName === 'mobs' && animations.mobs[mob.cell])
s.animation = 'basic';
});
};



Loading…
Cancel
Save