mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Updated spell casting to v3
This commit is contained in:
@@ -293,11 +293,11 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||||||
User.save();
|
User.save();
|
||||||
|
|
||||||
var spell = $scope.spell;
|
var spell = $scope.spell;
|
||||||
var targetId = (type == 'party' || type == 'self') ? '' : type == 'task' ? target.id : target._id;
|
var targetId = target._id;
|
||||||
$scope.spell = null;
|
$scope.spell = null;
|
||||||
$rootScope.applyingAction = false;
|
$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(){
|
.success(function(){
|
||||||
var msg = window.env.t('youCast', {spell: spell.text()});
|
var msg = window.env.t('youCast', {spell: spell.text()});
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user