From e666d2f837608caa9e4cbee74d9df7382e8042a6 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 3 Oct 2014 00:31:37 -0600 Subject: [PATCH] fix(spookDust): user serverside method for spookdust as it's path-protected --- public/js/controllers/inventoryCtrl.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/js/controllers/inventoryCtrl.js b/public/js/controllers/inventoryCtrl.js index 10a833e10f..e1b47a47f0 100644 --- a/public/js/controllers/inventoryCtrl.js +++ b/public/js/controllers/inventoryCtrl.js @@ -87,11 +87,7 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User', } $scope.purchase = function(type, item){ - if (item.key=='spookDust') { - // FIXME stupid method of special-handling spookDust, since it can be purchased with gold and the system only accomodates gem-purchasable holiday spells - if (user.stats.gp < item.value) return alert(window.env.t('messageNotEnoughGold')); - return User.set({'stats.gp':user.stats.gp-item.value, 'items.special.spookDust':(user.items.special.spookDust || 0)+1}); - } + if (item.key=='spookDust') return User.user.ops.buySpookDust({}); var gems = User.user.balance * 4;