From 2810ca9e8e6df84348b26c993fc54c198254ced9 Mon Sep 17 00:00:00 2001 From: Alejandro Akbal <37181533+VoidlessSeven7@users.noreply.github.com> Date: Tue, 8 Sep 2020 10:31:08 +0200 Subject: [PATCH] fix: correct /setXP functionality --- src/Commands/Player/XP.gml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Commands/Player/XP.gml b/src/Commands/Player/XP.gml index 51375e2..983e917 100644 --- a/src/Commands/Player/XP.gml +++ b/src/Commands/Player/XP.gml @@ -12,7 +12,14 @@ _quantity = real(_args[0]); // Set XP - objPlayer.xp = _quantity + if (_quantity > objPlayer.xp){ + objPlayer.xpToGain = _quantity + } + + else { + objPlayer.xp = _quantity + objPlayer.xpToGain = _quantity + } // Message Trace("Set XP to " + string(_quantity));