mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 11:38:24 +00:00
save user on spell-cast (so we don't get second mp loss notif)
This commit is contained in:
parent
9518cd1b51
commit
a4ba5b036f
1 changed files with 1 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||
$scope.castEnd = function(target, type, $event){
|
||||
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(){
|
||||
var msg = "You cast " + $scope.spell.text;
|
||||
switch (type) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue