From 37a60916381c0dda0a882e1faa2db6f3feaaea08 Mon Sep 17 00:00:00 2001 From: Melissa Mcewen Date: Wed, 31 Dec 2014 19:29:08 -0600 Subject: [PATCH 1/3] Salt spell doesn't check to see if you have enough Gold #4454 --- public/js/controllers/rootCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/controllers/rootCtrl.js b/public/js/controllers/rootCtrl.js index 5065a93eb2..66b1e359a1 100644 --- a/public/js/controllers/rootCtrl.js +++ b/public/js/controllers/rootCtrl.js @@ -195,7 +195,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ $scope.castStart = function(spell) { if (User.user.stats.mp < spell.mana) return Notification.text(window.env.t('notEnoughMana')); - if (spell.key == 'nye' && User.user.stats.gp < spell.value) + if ((spell.key == 'nye' || spell.key == 'salt') && User.user.stats.gp < spell.value) return Notification.text('Not enough gold.'); $rootScope.applyingAction = true; From cf40ef8a721666ff32277ea2c79686546c9abe70 Mon Sep 17 00:00:00 2001 From: Melissa Mcewen Date: Wed, 31 Dec 2014 20:37:54 -0600 Subject: [PATCH 2/3] Salt spell doesn't check to see if you have enough Gold #4454 check if spell uses gold --- public/js/controllers/rootCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/controllers/rootCtrl.js b/public/js/controllers/rootCtrl.js index 66b1e359a1..73f31884cf 100644 --- a/public/js/controllers/rootCtrl.js +++ b/public/js/controllers/rootCtrl.js @@ -195,7 +195,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ $scope.castStart = function(spell) { if (User.user.stats.mp < spell.mana) return Notification.text(window.env.t('notEnoughMana')); - if ((spell.key == 'nye' || spell.key == 'salt') && User.user.stats.gp < spell.value) + if (spell.value !== null && User.user.stats.gp < spell.value) return Notification.text('Not enough gold.'); $rootScope.applyingAction = true; From 9d6d3756635f9852b83fd22c4f0b3265d6059fd0 Mon Sep 17 00:00:00 2001 From: Melissa Mcewen Date: Thu, 1 Jan 2015 14:31:11 -0600 Subject: [PATCH 3/3] Salt spell d oesn't check to see if you have enough Gold #4454 adjusting check --- public/js/controllers/rootCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/controllers/rootCtrl.js b/public/js/controllers/rootCtrl.js index 73f31884cf..24c7fbb290 100644 --- a/public/js/controllers/rootCtrl.js +++ b/public/js/controllers/rootCtrl.js @@ -195,7 +195,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ $scope.castStart = function(spell) { if (User.user.stats.mp < spell.mana) return Notification.text(window.env.t('notEnoughMana')); - if (spell.value !== null && User.user.stats.gp < spell.value) + if (spell.immediateUse && User.user.stats.gp < spell.value) return Notification.text('Not enough gold.'); $rootScope.applyingAction = true;