mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-12-14 03:55:42 +00:00
Dev (#128)
* Changes wordig for one vs two hand items (#120) * [PoE2] - Rune type mod showing as "filters.tag_rune" instead of "RUNE" #108 * [PoE2] Missing Total / Elemental DPS on weapon #109 * [PoE2] no option to change from divine currency to exalt in price check #119 * Adds + to all ele res * version bump * also version bump
This commit is contained in:
@@ -635,6 +635,60 @@ function parseWeapon(section: string[], item: ParsedItem) {
|
||||
isParsed = "SECTION_PARSED";
|
||||
continue;
|
||||
}
|
||||
if (line.startsWith(_$.FIRE_DAMAGE)) {
|
||||
const fireDamage = line
|
||||
.slice(_$.FIRE_DAMAGE.length)
|
||||
.split(", ")
|
||||
.map((element) =>
|
||||
getRollOrMinmaxAvg(
|
||||
element.split("-").map((str) => parseInt(str, 10)),
|
||||
),
|
||||
)
|
||||
.reduce((sum, x) => sum + x, 0);
|
||||
if (item.weaponELEMENTAL) {
|
||||
item.weaponELEMENTAL = fireDamage + item.weaponELEMENTAL;
|
||||
} else {
|
||||
item.weaponELEMENTAL = fireDamage;
|
||||
}
|
||||
isParsed = "SECTION_PARSED";
|
||||
continue;
|
||||
}
|
||||
if (line.startsWith(_$.COLD_DAMAGE)) {
|
||||
const coldDamage = line
|
||||
.slice(_$.COLD_DAMAGE.length)
|
||||
.split(", ")
|
||||
.map((element) =>
|
||||
getRollOrMinmaxAvg(
|
||||
element.split("-").map((str) => parseInt(str, 10)),
|
||||
),
|
||||
)
|
||||
.reduce((sum, x) => sum + x, 0);
|
||||
if (item.weaponELEMENTAL) {
|
||||
item.weaponELEMENTAL = coldDamage + item.weaponELEMENTAL;
|
||||
} else {
|
||||
item.weaponELEMENTAL = coldDamage;
|
||||
}
|
||||
isParsed = "SECTION_PARSED";
|
||||
continue;
|
||||
}
|
||||
if (line.startsWith(_$.LIGHTNING_DAMAGE)) {
|
||||
const lightningDamage = line
|
||||
.slice(_$.LIGHTNING_DAMAGE.length)
|
||||
.split(", ")
|
||||
.map((element) =>
|
||||
getRollOrMinmaxAvg(
|
||||
element.split("-").map((str) => parseInt(str, 10)),
|
||||
),
|
||||
)
|
||||
.reduce((sum, x) => sum + x, 0);
|
||||
if (item.weaponELEMENTAL) {
|
||||
item.weaponELEMENTAL = lightningDamage + item.weaponELEMENTAL;
|
||||
} else {
|
||||
item.weaponELEMENTAL = lightningDamage;
|
||||
}
|
||||
isParsed = "SECTION_PARSED";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (isParsed === "SECTION_PARSED") {
|
||||
|
||||
Reference in New Issue
Block a user