Skip to content

Commit

Permalink
deploy: 8b0646c
Browse files Browse the repository at this point in the history
  • Loading branch information
QartemisT committed Sep 6, 2024
1 parent f35ea2e commit 184418f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cache/wowt.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cache/wowt_old.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let
"spellduration": null,
"spelleffect": {"DifficultyID":null, "EffectAura":null, "Effect":null, "EffectAmplitude":null, "EffectAuraPeriod":null, "EffectChainAmplitude":null, "EffectChainTargets":null, "EffectPointsPerResource":null, "EffectBasePointsF":null, "EffectMiscValue_0":null, "EffectRadiusIndex_0":null, "EffectRadiusIndex_1":null},
"spellmisc": {"DurationIndex":null, "RangeIndex":null},
"spellpower": {"ManaCost":null},
"spellname": null,
"spellradius": [null,null],
"spellrange": {"ID":null, "RangeMin_0":null, "RangeMax_0":null},
Expand Down Expand Up @@ -396,6 +397,20 @@ const sanityText = (cacheData, text, overrideSpellID, spellMultiplier) => {
return errorText;
}
});
text = text.replaceAll(/\$(\d+)?c(\d+)?/g, (_, spellID) => { // SpellPower variables
spellID = spellID || overrideSpellID || prevSpellID;
prevSpellID = spellID;
if (!spellID) {
console.log("Null spellID", "SpellPower", text);
return errorText;
}
const data = cacheData.spellpower[spellID]
if (!data) {
console.log("Failed SpellPower", text);
return errorText;
}
return data.ManaCost.toLocaleString();
});
text = text.replaceAll(/\$(\d+)?([rR])(\d+)?/g, (_, spellID, type) => { // Range variables
spellID = spellID || overrideSpellID || prevSpellID;
prevSpellID = spellID;
Expand Down

0 comments on commit 184418f

Please sign in to comment.