File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,8 @@ app.service("LoadService",
218
218
CharCreatorService . charGeneration = character . generation ;
219
219
CharCreatorService . freebiePts = character . freebiePts ;
220
220
CharCreatorService . freebieSpent = character . freebieSpent ;
221
+ if ( character . freebieSpent == null ) //Error checking that freebieSpent update.
222
+ CharCreatorService . freebieSpent = ( ( 15 + character . addedFlawPts ) - character . freebiePts ) ;
221
223
CharCreatorService . freebieMode = character . freebieMode ;
222
224
var clanIndex = ClanService . clanList . map ( function ( clan ) {
223
225
return clan . name ;
Original file line number Diff line number Diff line change @@ -103,11 +103,22 @@ app.service("SaveService",
103
103
addedFlawPts : MeritFlawService . addedFlawPts
104
104
} ;
105
105
106
+ errorCheckPriorities ( charData . abilityPriorities ) ;
107
+ errorCheckPriorities ( charData . attributePriorities ) ;
108
+
106
109
var updates = { } ;
107
110
updates [ savePath ] = charData ;
108
111
return firebase . database ( ) . ref ( ) . update ( updates ) ;
109
112
}
110
113
114
+ this . errorCheckPriorities = errorCheckPriorities ;
115
+ function errorCheckPriorities ( priorityArray ) {
116
+ for ( var i = 0 ; i < priorityArray . length ; i ++ ) {
117
+ if ( priorityArray [ i ] == null )
118
+ priorityArray [ i ] = "" ;
119
+ }
120
+ }
121
+
111
122
this . removeHashKeys = removeHashKeys ;
112
123
function removeHashKeys ( ability ) {
113
124
for ( var i = 0 ; i < ability . points . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments