classes: cast URL fix

This commit is contained in:
Tyler Renelle
2013-12-16 00:18:50 -07:00
parent 616cf41017
commit a7100b6606

View File

@@ -158,7 +158,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
$scope.castEnd = function(target, type, $event){ $scope.castEnd = function(target, type, $event){
if ($scope.spell.target != type) return Notification.text("Invalid target"); if ($scope.spell.target != type) return Notification.text("Invalid target");
$scope.spell.cast(User.user, target); $scope.spell.cast(User.user, target);
$http.post('/api/v2/user/cast/' + $scope.spell.name, {target:target, type:type}).success(function(){ $http.post('/api/v2/user/class/cast/' + $scope.spell.name, {target:target, type:type}).success(function(){
var msg = "You cast " + $scope.spell.text; var msg = "You cast " + $scope.spell.text;
switch (type) { switch (type) {
case 'task': msg += ' on ' + target.text;break; case 'task': msg += ' on ' + target.text;break;