Quests: hurt boss via score method, refactor chat function, change all content.*.name to content.*.key for consistency

This commit is contained in:
Tyler Renelle
2013-12-20 15:43:10 -07:00
parent ecb354e2cc
commit 8095397317
16 changed files with 230 additions and 103 deletions

View File

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