From 520de627fef4656e0cad025e2e45282aca4a013c Mon Sep 17 00:00:00 2001 From: Big Bad Waffle Date: Sun, 4 Feb 2018 10:27:45 +0200 Subject: [PATCH] Fixes #516 --- src/server/components/stats.js | 2 ++ src/server/config/quests/templates/questTemplate.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/components/stats.js b/src/server/components/stats.js index 1b79210a..f765f53f 100644 --- a/src/server/components/stats.js +++ b/src/server/components/stats.js @@ -212,6 +212,8 @@ define([ this.obj.syncer.setObject(true, 'stats', 'values', 'xpMax', this.values.xpMax); }, + //Source is the object that caused you to gain xp (mostly yourself) + //Target is the source of the xp (a mob or quest) getXp: function (amount, source, target) { var obj = this.obj; var values = this.values; diff --git a/src/server/config/quests/templates/questTemplate.js b/src/server/config/quests/templates/questTemplate.js index 395a42c1..8736e5c1 100644 --- a/src/server/config/quests/templates/questTemplate.js +++ b/src/server/config/quests/templates/questTemplate.js @@ -66,7 +66,7 @@ define([ this.obj.inventory.getItem(r); }, this); - this.obj.stats.getXp(this.xp || 10, this); + this.obj.stats.getXp(this.xp || 10, this.obj, this); }, simplify: function (self) {