Skip to content

Commit

Permalink
updated screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Aug 9, 2024
1 parent 014707a commit b53b8fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 2 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,23 +744,20 @@ $(document).ready(function() {
}

function calculateBuyValue(sellValue, type) {
console.warn(`generating buy value`);
console.log(`calculateBuyValue(${sellValue}, ${type})`);
const typeMod = type === 0 ? 0.25 : 0.2;
const totalCopper = sellValue / typeMod;
return calculateDenomination(totalCopper);
}

function calculateSellValue(itemClass, level, quality, slot, type) {
console.warn(`generating sell value`);
console.log(`calculateSellValue(${itemClass}, ${level}, ${quality}, ${slot}, ${type})`);
console.warn(`generating monetary values`);
const array = itemClass == '4' ? armorClass : weaponClass;
const invType = array[slot];
const sellMod = invType.sellMod;
const qualityMod = armorSubClass[type].sellMod;
const totalCopper = qualityCoefficients[quality].sellValue(level) * sellMod * qualityMod;
const buyValue = calculateBuyValue(totalCopper, type);
const sellValue = calculateDenomination(totalCopper);
const buyValue = calculateBuyValue(totalCopper, type);
return { buyValue, sellValue };
}

Expand Down

0 comments on commit b53b8fa

Please sign in to comment.