Browse Source

bug: Fixed a crash related to heals causing infinite event loops

tags/v0.12.0.9^2
Shaun 11 months ago
parent
commit
e880aba3fb
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/server/components/stats.js

+ 4
- 4
src/server/components/stats.js View File

@@ -536,8 +536,8 @@ module.exports = {
target: Target object (heal.target)
spell: Optional spell object that caused this event
*/
getHp: function (event) {
const { heal, source } = event;
getHp: function (eventHeal) {
const { heal, source } = eventHeal;

let amount = heal.amount;
if (amount === 0)
@@ -588,8 +588,8 @@ module.exports = {
this.obj.syncer.setObject(false, 'stats', 'values', 'hp', values.hp);
}

if (!heal.noEvents)
source.fireEvent('afterGiveHp', event);
if (!eventHeal.noEvents)
source.fireEvent('afterGiveHp', eventHeal);
},

save: function () {


Loading…
Cancel
Save