From 19e2ba9657db338426f6fa3939ff2e58510b928d Mon Sep 17 00:00:00 2001 From: Daniel Asher Resnick Date: Wed, 28 Dec 2022 00:29:57 -0600 Subject: [PATCH] Use stride data from stock objects --- src/public/js/burning-service.js | 1 + src/public/js/burning.js | 14 +------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/public/js/burning-service.js b/src/public/js/burning-service.js index 48301bb..9b3f013 100644 --- a/src/public/js/burning-service.js +++ b/src/public/js/burning-service.js @@ -295,6 +295,7 @@ function BurningDataService($http) { $http.get("/stock_objs", {'timeout': 3000}). success(function(data,status,headers,config){ console.log(data); + myself.stock_objs = data; stocks = Object.keys(data); for (var i = 0; i < stocks.length; i++) { loadLifepathsForStock(stocks[i]); diff --git a/src/public/js/burning.js b/src/public/js/burning.js index 5de227d..d7dc362 100644 --- a/src/public/js/burning.js +++ b/src/public/js/burning.js @@ -1024,20 +1024,8 @@ function BurningCtrl($scope, $http, $modal, $timeout, settings, appropriateWeapo return {"shade" : "", "exp" : 10 - $scope.statsByName["Will"].exp() + bonus}; } else if ( "Stride" == name ){ - var stride = 0; - if( $scope.stock == 'dwarf' ) - stride = 6; - else if( $scope.stock == 'elf' ) - stride = 8; - else if( $scope.stock == 'roden' ) - stride = 8; - else if( $scope.stock == 'wolf' ) - stride = 11; - else - stride = 7; - + var stride = burningData.stock_objs[$scope.stock].stride; stride += bonus; - return {"shade" : "", "exp" : stride}; } else if ( "Circles" == name ){