build: fix build
This commit is contained in:
parent
1425be7d8f
commit
312c79ebe6
1 changed files with 5 additions and 4 deletions
|
@ -19,21 +19,22 @@ export function calculateSpellPrice(data: DS4SpellDataSourceData): number | null
|
||||||
function calculateSpellPriceFactor(temporalData: UnitData<TemporalUnit>): number {
|
function calculateSpellPriceFactor(temporalData: UnitData<TemporalUnit>): number {
|
||||||
let days: number;
|
let days: number;
|
||||||
if (Number.isNumeric(temporalData.value)) {
|
if (Number.isNumeric(temporalData.value)) {
|
||||||
|
const value = Number.fromString(temporalData.value);
|
||||||
switch (temporalData.unit) {
|
switch (temporalData.unit) {
|
||||||
case "days": {
|
case "days": {
|
||||||
days = temporalData.value;
|
days = value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "hours": {
|
case "hours": {
|
||||||
days = temporalData.value / hoursPerDay;
|
days = value / hoursPerDay;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "minutes": {
|
case "minutes": {
|
||||||
days = temporalData.value / (hoursPerDay * minutesPerHour);
|
days = value / (hoursPerDay * minutesPerHour);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "rounds": {
|
case "rounds": {
|
||||||
days = (temporalData.value * secondsPerRound) / (hoursPerDay * minutesPerHour * secondsPerMinute);
|
days = (value * secondsPerRound) / (hoursPerDay * minutesPerHour * secondsPerMinute);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue