Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
Debug Log |
Added function for calculated values |
||
Line 8: | Line 8: | ||
var statContainer = selectBox.closest('.stattable'); | var statContainer = selectBox.closest('.stattable'); | ||
tdollData = updateCalculatedValues(tdollData); | |||
for (var key in tdollData) { | for (var key in tdollData) { | ||
Line 15: | Line 14: | ||
var valField = statContainer.find('*[data-tdoll-stat-id="' + key + '"]'); | var valField = statContainer.find('*[data-tdoll-stat-id="' + key + '"]'); | ||
var newValue = tdollData[key]; | var newValue = tdollData[key]; | ||
valField.text(newValue); | valField.text(newValue); | ||
} | } | ||
} | } | ||
} | |||
function updateCalculatedValues(data) { | |||
var ret = data; | |||
// Calculating Max HP for full dummied T-Doll | |||
if (ret.hasOwnProperty("hpmax")) { | |||
ret.hpmaxwd = ret.hpmax * 5; | |||
} | |||
return ret; | |||
} | } | ||