Skip to content

Commit

Permalink
crafted mods parsing hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eruyome committed Mar 9, 2019
1 parent bbf1123 commit 7e78b50
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion data_trade/uniques.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions resources/Updates_Trade.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
The following is a list of what has been updated, starting with 1.1.0

2.14.1
================================================================================================
* Hotfixed the parsing of crafted mords (advanced search) which was broken in PoE 3.6.
* Updated data files (uniques, supported mods).

2.14.0
================================================================================================
* Initial support for the Synthesis league (synthesised and fractured items):
Expand Down
2 changes: 1 addition & 1 deletion resources/VersionTrade.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TradeReleaseVersion := "v2.14.0"
TradeReleaseVersion := "v2.14.1"
TradeAHKVersionRequired := "1.1.26.00"
10 changes: 5 additions & 5 deletions resources/ahk/POE-ItemInfo.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -3955,7 +3955,7 @@ ParseAffixes(ItemDataAffixes, Item)
; --- PRE-PASS ---
Loop, Parse, ItemDataChunk, `n, `r
{
LoopField := RegExReplace(Trim(A_LoopField), "i) \(fractured\)$")
LoopField := RegExReplace(Trim(A_LoopField), "i) \(fractured|crafted\)$")
If StrLen(LoopField) = 0
{
Continue ; Not interested in blank lines
Expand Down Expand Up @@ -4210,7 +4210,7 @@ ParseAffixes(ItemDataAffixes, Item)
; --- PRE-PASS ---
Loop, Parse, ItemDataChunk, `n, `r
{
LoopField := RegExReplace(Trim(A_LoopField), "i) \(fractured\)$")
LoopField := RegExReplace(Trim(A_LoopField), "i) \(fractured|crafted\)$")
If StrLen(LoopField) = 0
{
Continue ; Not interested in blank lines
Expand Down Expand Up @@ -4252,7 +4252,7 @@ ParseAffixes(ItemDataAffixes, Item)

Loop, Parse, ItemDataChunk, `n, `r
{
LoopField := RegExReplace(Trim(A_LoopField), "i) \(fractured\)$")
LoopField := RegExReplace(Trim(A_LoopField), "i) \(fractured|crafted\)$")
If StrLen(LoopField) = 0
{
Continue ; Not interested in blank lines
Expand Down Expand Up @@ -8636,7 +8636,7 @@ ModStringToObject(string, isImplicit) {
RegExMatch(val, "i) \((fractured)\)$", sType)
spawnType := sType1

val := RegExReplace(val, "i) \((fractured)\)$")
val := RegExReplace(val, "i) \((fractured|crafted)\)$")

; Collect all numeric values in the mod-string
Pos := 0
Expand Down Expand Up @@ -8837,7 +8837,7 @@ CreatePseudoMods(mods, returnAllMods := False) {
mod.spawnType := spawnType1
}

mod.name := RegExReplace(mod.name, "i) \((fractured)\)$")
mod.name := RegExReplace(mod.name, "i) \((fractured|crafted)\)$")

; ### Base stats
; life and mana
Expand Down
6 changes: 3 additions & 3 deletions resources/ahk/TradeMacro.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -3517,7 +3517,7 @@ TradeFunc_RemoveAlternativeVersionsMods(_item, Affixes) {
spawnType := ""
For key, val in Affixes {
RegExMatch(Trim(val), "i)\((fractured)\)", sType)
val := RegExReplace(Trim(val), "i)\((fractured)\)")
val := RegExReplace(Trim(val), "i)\((fractured|crafted)\)")

; remove negative sign also
t := TradeUtils.CleanUp(RegExReplace(val, "i)-?[\d\.]+", "#"))
Expand Down Expand Up @@ -3559,7 +3559,7 @@ TradeFunc_RemoveAlternativeVersionsMods(_item, Affixes) {
}

For key, val in Affixes {
val := RegExReplace(Trim(val), "i)\((fractured)\)")
val := RegExReplace(Trim(val), "i)\((fractured|crafted)\)")

t := TradeUtils.CleanUp(RegExReplace(val, "i)-?[\d\.]+", "#"))
modFound := false
Expand Down Expand Up @@ -4003,7 +4003,7 @@ TradeFunc_GetModValueGivenPoeTradeMod(itemModifiers, poeTradeMod) {
{
Continue ; Not interested in blank lines
}
LoopField := Trim(RegExReplace(A_LoopField, "i)\((fractured)\)"))
LoopField := Trim(RegExReplace(A_LoopField, "i)\((fractured|crafted)\)"))

ModStr := ""
CurrValues := []
Expand Down

0 comments on commit 7e78b50

Please sign in to comment.