Browse Source

bug[#1599]: The afterCastSpell event is now fires after a castTime spell completes casting and the event also includes the action now

tags/v0.8.1^2
Shaun 3 years ago
parent
commit
34e6214c7c
2 changed files with 8 additions and 1 deletions
  1. +2
    -1
      src/server/components/spellbook.js
  2. +6
    -0
      src/server/config/spells/spellTemplate.js

+ 2
- 1
src/server/components/spellbook.js View File

@@ -427,7 +427,8 @@ module.exports = {

this.obj.fireEvent('afterCastSpell', {
castSuccess: success,
spell
spell,
action
});

//Null means we didn't fail but are initiating casting


+ 6
- 0
src/server/config/spells/spellTemplate.js View File

@@ -85,6 +85,12 @@ module.exports = {
this.consumeMana();
this.setCd();
this.currentAction = null;

this.obj.fireEvent('afterCastSpell', {
castSuccess: true,
spell: this,
action
});
}
} else {
if (this.onCastTick)


Loading…
Cancel
Save