mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
Updated spell casting to v3
This commit is contained in:
parent
439d20c82e
commit
6222c23810
1 changed files with 2 additions and 2 deletions
|
|
@ -293,11 +293,11 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||
User.save();
|
||||
|
||||
var spell = $scope.spell;
|
||||
var targetId = (type == 'party' || type == 'self') ? '' : type == 'task' ? target.id : target._id;
|
||||
var targetId = target._id;
|
||||
$scope.spell = null;
|
||||
$rootScope.applyingAction = false;
|
||||
|
||||
$http.post(ApiUrl.get() + '/api/v2/user/class/cast/'+spell.key+'?targetType='+type+'&targetId='+targetId)
|
||||
$http.post(ApiUrl.get() + '/api/v3/user/class/cast/'+spell.key+'?targetType='+type+'&targetId='+targetId)
|
||||
.success(function(){
|
||||
var msg = window.env.t('youCast', {spell: spell.text()});
|
||||
switch (type) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue