diff --git a/src/server/config/spells/spellCharge.js b/src/server/config/spells/spellCharge.js index 6ce9d7e5..66ceefbf 100644 --- a/src/server/config/spells/spellCharge.js +++ b/src/server/config/spells/spellCharge.js @@ -95,6 +95,18 @@ module.exports = { let obj = this.obj; + const moveEvent = { + oldPos: { + x: obj.x, + y: obj.y + }, + newPos: targetPos, + source: this, + target: this, + spellName: 'charge', + spell: this + }; + obj.instance.physics.removeObject(obj, obj.x, obj.y); obj.x = targetPos.x; @@ -122,13 +134,6 @@ module.exports = { spellName: 'charge' }); - const moveEvent = { - newPos: targetPos, - source: this, - target: this, - spellName: 'charge', - spell: this - }; this.obj.fireEvent('afterPositionChange', moveEvent); if (this.castOnEnd) diff --git a/src/server/config/spells/spellFireblast.js b/src/server/config/spells/spellFireblast.js index 2fc1881c..6c3c4e94 100644 --- a/src/server/config/spells/spellFireblast.js +++ b/src/server/config/spells/spellFireblast.js @@ -179,6 +179,10 @@ module.exports = { syncer.o.y = yFinal; const moveEvent = { + oldPos: { + x: xOld, + y: yOld + }, newPos: { x: xFinal, y: yFinal